Skip to main content

The Univalence Axiom in Cubical Sets


In this note we show that Voevodsky’s univalence axiom holds in the model of type theory based on cubical sets as described in Bezem et al. (in: Matthes and Schubert (eds.) 19th international conference on types for proofs and programs (TYPES 2013), Leibniz international proceedings in informatics (LIPIcs), Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Dagstuhl, Germany, vol 26, pp 107–128, 2014. and Huber (A model of type theory in cubical sets. Licentiate thesis, University of Gothenburg, 2015). We will also discuss Swan’s construction of the identity type in this variation of cubical sets. This proves that we have a model of type theory supporting dependent products, dependent sums, univalent universes, and identity types with the usual judgmental equality, and this model is formulated in a constructive metatheory.

Review of the Cubical Set Model

We give a brief overview of the cubical set model, introducing some different notations, but will otherwise assume the reader is familiar with [2, 6].

As opposed to [2, 6] let us define cubical sets as contravariant presheaves on the opposite of the category used there, that is, the category of cubes \(\mathscr {C}\) contains as objects finite sets \(I = \{i_1,\ldots ,i_n\}\) (\(n \ge 0\)) of names and a morphism \(f {:}J \rightarrow I\) is given by a set-theoretic map \(I \rightarrow J \cup \{0,1\}\) which is injective when restricted to the preimage of J; we will write compositions in applicative order. The category of cubical sets is the category \([\mathscr {C}^\mathrm {op},\mathbf {Set}]\) of presheaves on \(\mathscr {C}\). A morphism \(f {:}J \rightarrow I\) in \(\mathscr {C}\) can be viewed as a substitution. If \(f(i) \in J\), we call fdefined oni. For \(i \notin I\), the face morphisms are denoted by \((i / 0), (i / 1) {:}I \rightarrow I,i\) and are induced by setting i to 0 and 1, respectively; degenerating along \(i \notin I\) is denoted by \(s_i {:}I,i \rightarrow I\) and is induced by the inclusion \(I \subseteq I,i\).

If \(\varGamma \) is a cubical set, we write \({{\mathrm{Ty}}}(\varGamma )\) for the collection/class of presheaves on the category of elements of \(\varGamma \) [2, 6]. Such a presheaf \(A \in {{\mathrm{Ty}}}(\varGamma )\) is given by a family of sets \(A (I,\rho )\) for \(I \in \mathscr {C}\) and \(\rho \in \varGamma (I)\) together with restriction functions. As \(\rho \in \varGamma (I)\) determines I we simply write \(A \rho \) for \(A (I,\rho )\). Given \(A \in {{\mathrm{Ty}}}(\varGamma )\) and a natural transformation (substitution) \(\sigma {:}\varDelta \rightarrow \varGamma \) we get \(A \sigma \in {{\mathrm{Ty}}}(\varDelta )\) defined as \((A \sigma ) \rho = A (\sigma \rho )\) which extends canonically to the restrictions. For \(A \in {{\mathrm{Ty}}}(\varGamma )\) we denote the set of sections of A by \({{\mathrm{Ter}}}(\varGamma , A)\); so \(a \in {{\mathrm{Ter}}}(\varGamma ,A)\) is given by a family \(a \rho \in A \rho \) for \(\rho \in \varGamma (I)\) such that \((a \rho ) f = a (\rho f)\) for \(f {:}J \rightarrow I\). Substitution also extends to terms via \((a\sigma ) \rho = a (\sigma \rho )\).

Let us recall the construction of \(\varPi \)-types: \(\varPi \,A\,B \in {{\mathrm{Ty}}}(\varGamma )\) for \(A \in {{\mathrm{Ty}}}(\varGamma )\) and \(B \in {{\mathrm{Ty}}}(\varGamma .A)\) is given by letting each element w of \((\varPi \,A\,B)\rho \) (with \(\rho \in \varGamma (I)\)) be a family of \(w_f\,a \in B (\rho f, a)\) for \(f {:}J \rightarrow I\) and \(a \in A\rho \) satisfying \((w_f\,a)g = w_{fg}\,(a g)\); the restriction of such a w is given by \((wf)_g = w_{fg}\). In the sequel we will however only have to refer to \(w_f\) when f is the identity, and will thus simply write \(w\,a\) for \(w_\mathrm {id}\,a\). We also occasionally switch between sections in \({{\mathrm{Ter}}}(\varGamma .A, B)\) and \({{\mathrm{Ter}}}(\varGamma ,\varPi A B)\) without warning the reader.

Let \(A \in {{\mathrm{Ty}}}(\varGamma )\), \(\rho \in \varGamma (I)\), and \(J \subseteq I\). A J-tube in A over \(\rho \) is given by a family \(\mathbf {u}\) of elements \(u_{jc} \in A \rho (j / c)\) for \((j,c) \in J \times \{0,1\}\) which is adjacent compatible, that is, \(u_{jc} (k / d) = u_{k d} (j / c)\) for \((j,c),(k,d) \in J \times \{0,1\}\). For \((i,a) \in (I - J) \times \{0,1\}\) we say that an element \(u_{ia} \in A \rho (i / a)\) is a lid of such a tube \(\mathbf {u}\) if \(u_{jc} (i / a) = u_{ia} (j / c)\) for all \((j,c) \in J \times \{0,1\}\). In this situation we call the pair \([J \mapsto \mathbf {u}; (i,a) \mapsto u_{ia}]\) an open box in A over \(\rho \). A filler for such an open box is an element \(u \in A \rho \) such that \(u (j / c) = u_{jc}\) for \((j,c) \in \{(i,a)\} \cup (J \times \{0,1\})\). In case J is empty, we simply write \([(i,a) \mapsto u_{ia}]\).

Given \(f {:}K \rightarrow I\) and an open box \(m = [J \mapsto \mathbf {u}; (i,a) \mapsto u_{ia}]\) in A over \(\rho \) we call f allowed for m if f is defined on Ji. In this case we define the open box mf in A in \(\rho f\) to be \([J f \mapsto \mathbf {u}f; (f (i), a) \mapsto u_{ia} (f - i)]\) where \(\mathbf {u}f\) is given by \((\mathbf {u}f)_{f(j)\, c} = u_{j c} (f - j)\) with \(f - i {:}K - {f (i)} \rightarrow I-i\) being like f but skipping i, and Jf is the image of J under f.

Recall from [2, Section 4] that a (uniform) Kan structure for a type \(A \in {{\mathrm{Ty}}}(\varGamma )\) is given by an operation \(\kappa \) which (uniformly) fills open boxes: for any \(\rho \in \varGamma (I)\) and open box m in A over \(\rho \) we get a filler \(\kappa \,\rho \,m\) of m subject to the uniformity condition

$$\begin{aligned} (\kappa \,\rho \,m) f = \kappa \,(\rho f)\,(m f) \end{aligned}$$

for all \(f {:}K \rightarrow I\) allowed for m.

Any Kan structure \(\kappa \) defines a composition operation\(\bar{\kappa }\) which provides the missing lid of the open box, given by:

$$\begin{aligned} \bar{\kappa }\,\rho \,[J \mapsto \mathbf {u}; (i,0) \mapsto u_{i0}]&= (\kappa \,\rho \,[J \mapsto \mathbf {u}; (i,0) \mapsto u_{i0}]) (i / 1)\\ \bar{\kappa }\,\rho \,[J \mapsto \mathbf {u}; (i,1) \mapsto u_{i1}]&= (\kappa \,\rho \,[J \mapsto \mathbf {u}; (i,1) \mapsto u_{i1}]) (i / 0) \end{aligned}$$

We denote the set of all Kan structures on \(A \in {{\mathrm{Ty}}}(\varGamma )\) as \({{\mathrm{Fill}}}(\varGamma , A)\). If \(\sigma {:}\varDelta \rightarrow \varGamma \) and \(\kappa \) is an element in \({{\mathrm{Fill}}}(\varGamma , A)\), we get an element \(\kappa \sigma \) in \({{\mathrm{Fill}}}(\varDelta , A \sigma )\) defined by \((\kappa \sigma ) \, \rho = \kappa \, (\sigma \rho )\).

Given a cubical set \(\varGamma \) a Kan type is a pair \((A,\kappa )\) where \(A \in {{\mathrm{Ty}}}(\varGamma )\) and \(\kappa \in {{\mathrm{Fill}}}(\varGamma ,A)\). We denote the collection of all such Kan types by \({{\mathrm{KTy}}}(\varGamma )\). In [2] we showed that Kan types are closed under dependent products and sums constituting a model of type theory.

Path Types

In [2] we introduced identity types which were however only “weak”, e.g., transport along reflexivity is only propositionally equal to the identity function but not necessarily judgmentally equal. For this reason we will call these types path types and reserve \(\mathsf {Id}_{A}\) for the identity type with the usual judgmental equality defined in Sect. 4.

Recall that the path type \(\mathsf {Path}_{A}\,u\,v \in {{\mathrm{Ty}}}(\varGamma )\) for \(A \in {{\mathrm{Ty}}}(\varGamma )\) and \(u,v \in {{\mathrm{Ter}}}(\varGamma ,A)\) is defined by the sets \((\mathsf {Path}_{A}\,u\,v)\rho \) containing equivalence classes \(\langle i \rangle w\) where \(i \notin I\) and \(w\in A\rho s_i\) with \(w(i / 0) = u \rho \) and \(w(i / 1) = v \rho \). Restrictions are defined as expected, and we showed that Kan types are closed under forming path types [2].

It will be convenient below to introduce paths using separated products.

Definition 1

Given cubical sets \(\varGamma \) and \(\varDelta \), we say that \(u\in \varGamma (I)\) and \(v\in \varDelta (I)\) are separated, denoted by \(u \mathrel {\#}v\), if they come through degeneration from cubes with disjoint sets of directions. More precisely, if there are \(J \subseteq I\), \(K \subseteq I\) with \(J \cap K = \emptyset \) and \(u' \in \varGamma (J), v' \in \varDelta (K)\) such that \(u = u' s\) and \(v = v' s'\) with \(s\) and \(s'\) induced by the inclusion \(J \subseteq I\) and \(K \subseteq I\), respectively.

The separated product\(\varGamma * \varDelta \) of \(\varGamma \) and \(\varDelta \) is the cubical set defined by

$$\begin{aligned} (\varGamma * \varDelta ) (I) = \{ (u,v) \in \varGamma (I) \times \varDelta (I)\mid u \mathrel {\#}v \} \subseteq (\varGamma \times \varDelta ) (I). \end{aligned}$$

The restrictions are inherited from \(\varGamma \times \varDelta \), that is, they are defined component wise. It can be shown that \({-} * {-}\) extends to a functor, and that \({-} * \varDelta \) has a right adjoint.

Of particular interest is \(\varGamma *\mathbb {I}\) where \(\mathbb {I}\) is the interval defined by \(\mathbb {I}(J) = J \cup \{0,1\}\) (see [2, Section 6.1]). Then

$$\begin{aligned} (\varGamma * \mathbb {I}) (I) = (\varGamma (I) \times \{0,1\}) \cup \{ (\rho s_i, i) \mid i \in I \wedge \rho \in \varGamma (I-i)\}. \end{aligned}$$

If \((\rho , i) \in (\varGamma * \mathbb {I}) (I)\) with \(i\in I\), then \(\rho = \rho ' s_i\) for a uniquely determined \(\rho '\) which we denote by \(\rho - i\).

We can use \(\varGamma *\mathbb {I}\) to formulate the following introduction rule for path types

figure a

where \([0],[1] {:}\varGamma \rightarrow \varGamma * \mathbb {I}\) are induced by the global elements 0 and 1 of \(\mathbb {I}\), respectively, and \(\mathsf {p}{:}\varGamma *\mathbb {I}\rightarrow \varGamma \) is the first projection. The binding operation is interpreted by \((\langle \rangle w) \rho = \langle i \rangle \, w (\rho s_i, i)\) with i a fresh name (see [2, Section 8.2]).

Given an element \(\langle i \rangle w \in (\mathsf {Path}_{A}\,u\,v) \rho \) with \(\rho \in \varGamma (I)\), we set \((\langle i \rangle w) \mathop {\varvec{@}}a = w (i / a)\) where a is 0, 1, or a fresh name.

Equivalences and Univalence

We will now recall the definition of an equivalence as a map having contractible fibers and then derive an operation for contractible and Kan types. To enhance readability we define the following types using variable names:

$$\begin{aligned} {{\mathrm{\mathsf {isContr}}}}A&= \varSigma (x : A)\, \varPi (y : A) \, \mathsf {Path}_{A}\,x\,y\\ \mathsf {fib}\,t\,v&= \varSigma (x : A) \, \mathsf {Path}_{B}\,(t \, x)\,v\\ {{\mathrm{\mathsf {isEquiv}}}}t&= \varPi (y : B) \, {{\mathrm{\mathsf {isContr}}}}(\mathsf {fib}\,t\,y)\\ \mathsf {Equiv}\,A\,B&= \varSigma (t : A \rightarrow B) \, {{\mathrm{\mathsf {isEquiv}}}}t \end{aligned}$$

where A and B are types, \(t : A \rightarrow B\), and v : B (all in an ambient context \(\varGamma \)). This can of course also be formally written name-free: for example, the first type can be written as \(\varSigma A \varPi A\mathsf {p}\, (\mathsf {Path}_{A\mathsf {p}\mathsf {p}} \mathsf {q}\mathsf {p}~\mathsf {q}) \in {{\mathrm{Ty}}}(\varGamma )\) and the second one as \(\varSigma A\mathsf {p}\, (\mathsf {Path}_{B\mathsf {p}\mathsf {p}} \,\mathsf {app}(t\mathsf {p}\mathsf {p},\mathsf {q})\,\mathsf {q}\mathsf {p}) \in {{\mathrm{Ty}}}(\varGamma .B)\).

Definition 2

A (uniform) acyclic-fibration structure on a type \(A \in {{\mathrm{Ty}}}(\varGamma )\) is given by an operation \(\mathsf {ext}\) uniformly filling any tube, that is, given \(\rho \in \varGamma (I)\), \(J \subseteq I\), a J-tube \(\mathbf {u}\) in \(A \rho \), we have

$$\begin{aligned} \mathsf {ext}\,\rho \,[J\mapsto {\mathbf {u}}] \in A \rho \end{aligned}$$

extending \(\mathbf {u}\) (so \((\mathsf {ext}\,\rho \,[J\mapsto \mathbf {u}]) (i / a) = u_{ia}\) for \((i,a) \in J \times \{0,1\}\)) and for \(f {:}K \rightarrow I\) defined on J we have

$$\begin{aligned} (\mathsf {ext}\,\rho \,[J\mapsto {\mathbf {u}}]) f = \mathsf {ext}\,(\rho f)\,[J f \mapsto \mathbf {u}f]. \end{aligned}$$

We denote the set of acyclic-fibration structures on \(A \in {{\mathrm{Ty}}}(\varGamma )\) by \({{\mathrm{Contr}}}(\varGamma ,A)\).

Note that given \(\mathsf {ext}\in {{\mathrm{Contr}}}(\varGamma ,A)\) and \(\sigma {:}\varDelta \rightarrow \varGamma \) we obtain \(\mathsf {ext}\, \sigma \in {{\mathrm{Contr}}}(\varDelta , A\sigma )\) via \((\mathsf {ext}\,\sigma )\, \rho = \mathsf {ext}\, (\sigma \rho )\).

Lemma 1

Given a type A in \({{\mathrm{Ty}}}(\varGamma )\) we have maps

figure b

with \(\varphi \, {\langle \psi _0,\psi _1 \rangle } = \mathrm {id}\). Moreover, these maps are natural: if \(\sigma {:}\varDelta \rightarrow \varGamma \), then \((\varphi \,\kappa \,p) \sigma = \varphi \,(\kappa \sigma )\,(p \sigma )\), \((\psi _0\,\mathsf {ext}) \sigma = \psi _0\,(\mathsf {ext}\,\sigma )\), and \((\psi _1\,\mathsf {ext}) \sigma = \psi _1\,(\mathsf {ext}\,\sigma )\).


Let \(\kappa \in {{\mathrm{Fill}}}(\varGamma ,A)\) and \(p \in {{\mathrm{Ter}}}(\varGamma , {{\mathrm{\mathsf {isContr}}}}A)\). To define \(\varphi \,\kappa \,p \in {{\mathrm{Contr}}}(\varGamma ,A)\), let \(\rho \in \varGamma (I)\) and \(\mathbf {u}\) a J-tube in A over \(\rho \). We take a fresh dimension i and form an open box with the center of contraction \(p\rho .1\) at the closed end and \(\mathbf {u}\) at the open end, connected by \(p\rho .2\); filling this gives us an extension of \(\mathbf {u}\). Formally:

$$\begin{aligned} \varphi \,\kappa \,p\,\rho \,[J\mapsto {\mathbf {u}}] = \bar{\kappa }\,(\rho s_i)\,[J \mapsto (p \rho .2 \, \mathbf {u}) \mathop {\varvec{@}}i; (i,0) \mapsto p\rho .1] \end{aligned}$$

where \((p\rho .2 \, \mathbf {u}) \mathop {\varvec{@}}i\) is the J-tube given by \((p(\rho (j / c)).2\, u_{jc}) \mathop {\varvec{@}}i\) at side \((j,c) \in J \times \{0,1\}\).

Conversely, let \(\mathsf {ext}\in {{\mathrm{Contr}}}(\varGamma ,A)\). To get a Kan structure we first fill the missing lid and then the interior, that is, we set

$$\begin{aligned}&\psi _0\,\mathsf {ext}\,\rho \,[J \mapsto \mathbf {u}; (i,0) \mapsto u_{i0}] \\&\quad =\mathsf {ext}\,\rho \,[J\mapsto \mathbf {u}, (i,0) \mapsto u_{i0}, (i,1) \mapsto \mathsf {ext}\,\rho (i / 1)\,[J\mapsto \mathbf {u}(i / 1)]], \end{aligned}$$

and likewise for the other filling. To define \(\psi _1\,\mathsf {ext}\,\rho \) we choose \(\mathsf {ext}\,\rho \,[]\) as center of contraction, which is connected to any \(a \in A \rho \) by the path

$$\begin{aligned} \langle i \rangle \, \mathsf {ext}\,(\rho s_i)\,[(i,0) \mapsto \mathsf {ext}\,\rho \,[], (i,1) \mapsto a]. \end{aligned}$$

One can show uniformity, naturality, and that \(\langle \psi _0,\psi _1 \rangle \) is a section of \(\varphi \). \(\square \)

Next we will define an operation \({{\mathrm{\mathsf {G}}}}\) which allows us to transform an equivalence into a “path”.Footnote 1 This operation was introduced in [4] and motivated the “glueing” operation of [3]. We will define it in such a way that the associated transport of this path is given by underlying map of the equivalence.

A useful analogy is provided by the notion of pathover, a heterogeneous path lying over another path. We shortly review this notion from type theory with inductive equality. Given a type family \(P{:}T \rightarrow \mathsf {U}\) and a path \(p{:}x=_T y\) with its transport function \(p_*{:}Px\rightarrow Py\). If Px and Py are different types, there is no ordinary path connecting \(u {:}Px\) and \(v {:}Py\). Therefore the pathovers connecting u and v are taken to be the paths of type \(p_* u =_{Py} v\) (in the fiber Py).

We apply the same idea to \({{\mathrm{\mathsf {G}}}}t\), which should be a path from A to B in \(\mathsf {U}\) such that transport along this path is \(t {:}A\rightarrow B\). For the type family P we take \(\mathrm {id}_{\mathsf {U}}\) such that A and B indeed are fibers of P. Intuitively, a path from A to B is a set of heterogeneous paths between elements a of A and b of B. We want t to be the transport function along the path from A to B. By analogy we would take \({{\mathrm{\mathsf {G}}}}t\) to be the set of pathovers connecting \(a{:}A\) and \(b{:}B\) defined as the set of paths in B connecting t a and b. However, since we must be able to recover the startpoint a, we define \({{\mathrm{\mathsf {G}}}}t\) to be the set of pairs consisting of \(a{:}A\) and a path connecting t a and b. (Unlike a, the endpoint b can be recovered from the pathover and need not be remembered.)

With the above informal explanation in mind, we define the operation \({{\mathrm{\mathsf {G}}}}\) first on cubical sets and then explain how it lifts to Kan structures. It satisfies the rules:


The latter rule expresses stability under substitutions. Here and below \({{\mathrm{\mathsf {G}}}}\) (and \(\mathsf {ug}\) below) have A and B as implicit arguments.

Definition 3

Assume the premiss of (1) and define for every \(\rho \in \varGamma (I)\):

$$\begin{aligned} {\begin{matrix} ({{\mathrm{\mathsf {G}}}}t) (\rho , 0) &{}= A \rho , \text { with restrictions as in { A},}\\ ({{\mathrm{\mathsf {G}}}}t) (\rho , 1) &{}= B \rho , \text { with restrictions as in { B}, and }\\ ({{\mathrm{\mathsf {G}}}}t) (\rho , i) &{}= \{ (u,v) \mid u \in A (\rho -i) \wedge v \in B \rho \wedge v (i / 0) = t (\rho -i)\, u\}. \end{matrix}} \end{aligned}$$

In the last case \(\rho \mathrel {\#}i\), so \(\rho = (\rho - i) s_i\). The restrictions in the latter case are a little involved. We need \((u,v)f \in ({{\mathrm{\mathsf {G}}}}t) (\rho f, f(i))\) for \(f {:}J \rightarrow I\). If \(f(i)=0\), we take \((u,v)f = u s_i f\), indeed in \(A\rho f\). If \(f(i)=1\), we take \((u,v)f = vf\), indeed in \(B\rho f\). Finally, if f is defined on i, we have \(f - i {:}J - {f (i)} \rightarrow I-i\) and we define \((u,v) f = (u (f-i), v f)\), which is indeed correct as \((\rho -i)(f-i) = \rho f -f(i)\) under the given assumptions. It can then be checked that the restrictions satisfy the presheaf requirements. This concludes the definition of \({{\mathrm{\mathsf {G}}}}t\).

We have a map \(\mathsf {ug}\in {{\mathrm{Ter}}}(\varGamma * \mathbb {I}.{{\mathrm{\mathsf {G}}}}t, B \mathsf {p})\) given by:

figure c

The fact that a map \(t \in {{\mathrm{Ter}}}(\varGamma ,A \rightarrow B)\) is an equivalence can be represented as an element of \({{\mathrm{Contr}}}(\varGamma .B, \mathsf {fib}\,t)\). By Lemma 1 this is the case whenever A and B have Kan structures and the fibers of t are contractible.

Theorem 1

The operation \({{\mathrm{\mathsf {G}}}}\) can be lifted to Kan structures provided t is an equivalence, i.e., there is an operation \({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\) which given the premiss of (1) and \(\kappa _A \in {{\mathrm{Fill}}}(\varGamma ,A)\), \(\kappa _B \in {{\mathrm{Fill}}}(\varGamma ,B)\), and \(\mathsf {ext}\in {{\mathrm{Contr}}}(\varGamma .B, \mathsf {fib}\,t)\) returns \({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}\in {{\mathrm{Fill}}}(\varGamma *\mathbb {I},{{\mathrm{\mathsf {G}}}}t)\). This operation satisfies

$$\begin{aligned} ({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}) [0]&= \kappa _A\\ ({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}) [1]&= \kappa _B\\ ({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}) (\sigma * \mathrm {id})&= {{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,(\kappa _A \sigma )\,(\kappa _B \sigma )\,(\mathsf {ext}\,(\sigma \mathsf {p},\mathsf {q})) \end{aligned}$$

where \(\sigma {:}\varDelta \rightarrow \varGamma \).


To define \(({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}) (\rho ,r)\) for \((\rho , r) \in (\varGamma * \mathbb {I}) (I)\) we argue by cases. For \(r = 0,1\) we take:

$$\begin{aligned} ({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}) (\rho ,0)&= \kappa _A \, \rho \\ ({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}) (\rho ,1)&= \kappa _B \, \rho \end{aligned}$$

Let us now consider the main case where \(r = i \in I\) is a name and thus \(\rho \mathrel {\#}i\), \(\rho = (\rho - i) s_i\). We are given j (the name along which we fill), \(\mathbf {w}\) a J-tube in \(({{\mathrm{\mathsf {G}}}}t)\) over \((\rho ,i)\) (with \(J \subseteq I - j\)), and \(w_{ja} \in ({{\mathrm{\mathsf {G}}}}t) (\rho ,i) (j / a)\) for \(a = 0\) or 1, which fits \(\mathbf {w}\). We want to define

$$\begin{aligned} w := ({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext})\, (\rho ,i)\,[ J \mapsto \mathbf {w}; (j,a) \mapsto w_{ja}] \end{aligned}$$

in \(({{\mathrm{\mathsf {G}}}}t) (\rho ,i)\). For this we have to construct \(w = (u,v)\) with \(u \in A (\rho -i)\) and \(v \in B\rho \) such that \(v (i / 0) = t (\rho - i)\, u\).

We can map \(w_{ja},\mathbf {w}\) using \(\mathsf {ug}\) and obtain an open box \(v_{ja},\mathbf {v}\) in B over \(\rho \) given by

$$\begin{aligned} v_{kb} := \mathsf {ug}((\rho , i) (k / b), w_{kb}) \in B \rho (k / b). \end{aligned}$$

There are four cases to consider depending on how the open box relates to the direction i. Each case will be illustrated afterwards with simplified J. Note that in all these pictures the part in A is mapped by t to the left face of the part in B. Here are the four cases:

Case\(i \ne j\) and \(i \notin J\). We extend the J-tube \(\mathbf {w}\) to Ji-tube by constructing \(w_{i0}\) and \(w_{i1}\) and then proceed as in the next case with the tube \(\mathbf {w}, w_{i0}, w_{i1}\). Note that we want

$$\begin{aligned} w_{i0}&\in ({{\mathrm{\mathsf {G}}}}t) (\rho ,i) (i / 0) = A (\rho - i), \text{ and }\\ w_{i1}&\in ({{\mathrm{\mathsf {G}}}}t) (\rho ,i) (i / 1) = B (\rho - i), \end{aligned}$$

so we can take

$$\begin{aligned} w_{i0}&= \kappa _A\,(\rho -i)\,[J \mapsto \mathbf {w}(i / 0); (j,a) \mapsto w_{ja} (i / 0) ], \text { and}\end{aligned}$$
$$\begin{aligned} w_{i1}&= \kappa _B\,(\rho -i)\,[J \mapsto \mathbf {w}(i / 1); (j,a) \mapsto w_{ja} (i / 1) ]. \end{aligned}$$

The resulting open box is compatible by construction. Note that this (together with the cases for \(r=0\) and \(r=1\)) also ensures that the Kan structure satisfies the equations in (1).

We illustrate this case in the picture below. Here and below the left part is in A and on the right we have the open box \(\mathbf {v}\) in B. For simplicity we also omit \(\rho \). We construct \(w_{i0}\) and \(w_{i1}\) by filling the open boxes indicated by thicker lines on the left and on the right, respectively.

figure d

Case\(i \ne j\) and \(i \in J\). In this case \(v_{i0} = \mathsf {ug}((\rho {(i / 0)},0),w_{i0}) = t \rho {(i / 0)} \, w_{i0} = t (\rho -i) \,w_{i0}\) since \(\rho \mathrel {\#}i\). We can therefore take \(w = (w_{i0}, v) \in ({{\mathrm{\mathsf {G}}}}t) (\rho ,i)\) where \(v = \kappa _B\,(\rho -i)\,[J \mapsto \mathbf {v}; (j,a) \mapsto v_{ja}]\). This can be illustrated by:

figure e

Case\(j = i\) and \(a = 0\). Like in the previous case we can take \(w = (w_{i0}, v) \in ({{\mathrm{\mathsf {G}}}}w) (\rho ,i)\) where \(v = \kappa _B\,(\rho -i)\,[J \mapsto \mathbf {v}; (j,a) \mapsto v_{ja} ]\). This case is illustrated as follows:

figure f

Cases \(j = i\) and \(a = 1\). In this case the direction of the filling is opposite to t, and therefore we have to use \(\mathsf {ext}\) which expresses that \(\mathsf {fib}\,t\) is contractible. The family \(\mathbf {m}\) defined by

$$\begin{aligned} m_{kb} := (w_{kb}, \langle i \rangle \, v_{kb}) \in (\mathsf {fib}\,t) ((\rho -i) (k / b), w_{i1} (k / b)) \end{aligned}$$

for \((k,b) \in J \times \{0,1\}\) constitutes a J-tube over \((\rho -i,w_{i1})\) in the contractible type \(\mathsf {fib}\,t \in {{\mathrm{Ty}}}(\varGamma .B)\).

So we can extend this tube to obtain

$$\begin{aligned} (u,\omega ) = \mathsf {ext}\,(\rho -i,w_{i1})\,[J\mapsto \mathbf {m}] \in (\mathsf {fib}\,t)(\rho -i,w_{i1}) \end{aligned}$$

and we can take \(w := (u,\omega \mathop {\varvec{@}}i) \in ({{\mathrm{\mathsf {G}}}}t) (\rho ,i)\).

Let us illustrate this case: we are given the two dots on the left and the solid lines on the right in the picture below, and we want to construct the dashed line and a square on the right such that the dashed line is mapped to the dotted line via t, that is, we basically want to construct an element in the fiber of \(w_{i1}\) under t.

figure g

This concludes the definition of the filling operations of \({{\mathrm{\mathsf {G}}}}t\).

To see that this filling operation is uniform, note that for an \(f {:}K \rightarrow I\) defined on jJ and on i the case which defines the filling of \([ J \mapsto \mathbf {w}; (j,a) \mapsto w_{ja}] f\) coincides with the case used to defined \([ J \mapsto \mathbf {w}; (j,a) \mapsto w_{ja}]\) by the injectivity requirement on f—uniformity then follows for each case separately since we only used operations that suitably commute with f in the definition of the filling. If f is only defined on jJ but not on i, the first case has to apply—to simplify notation assume f is \((i / c)\)—then by construction (Eqs. 45)

$$\begin{aligned}&\bigl (({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext})\, (\rho ,i)\,[ J \mapsto \mathbf {w}; (j,a) \mapsto w_{ja}] \bigr ) (i / c)\\&\quad =({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext})\, (\rho -i,c)\,[ J \mapsto \mathbf {w}(i / c); (j,a) \mapsto (w_{ja} (i / c))], \end{aligned}$$

concluding the proof. \(\square \)

Theorem 2

We can refine the Kan structure \({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}\) given in Theorem 1 such that it satisfies

$$\begin{aligned} (\overline{{{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}}) \, (\rho ,i) \,[(i,0) \mapsto u] = t \rho \, u. \end{aligned}$$


We modify the Kan structure given in the proof of Theorem 1 to obtain the above equations. The last two cases in the proof above where \(i=j\) are modified by an additional case distinction on whether J is empty or not. If J is not empty or \(a = 1\), proceed as before. In case J is empty and \(a = 0\), then we are given \(u_{i0} \in A (\rho -i)\) and an empty tube and can define \(({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext})\,{(\rho ,i)}\,[(i,0) \mapsto u_{i0}] = (u_{i0}, t \rho \,u_{i0})\). That this definition remains uniform is proved as in Theorem 1 using the observation that \(|J |= |J f |\) for f defined on J. In addition we retain stability under substitution. \(\square \)

Remark 1

It is also possible to change the Kan structure such that it satisfies

$$\begin{aligned} (\overline{{{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,\kappa _A\,\kappa _B\,\mathsf {ext}}) \, (\rho ,i) \,[(i,1) \mapsto u] = t^{-1} \rho \, u, \end{aligned}$$

where \(t^{-1}\) is the inverse of t which can be constructed from \(\mathsf {ext}\). For this one also has to modify the case where J is empty and \(a = 1\) from the definition of \({{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\) using \(t^{-1}\) and that \(t^{-1}\) is a (point-wise) right inverse of t (in the sense of path types). The latter is also definable using \(\mathsf {ext}\).

Let us recall the definition of a universe \(\mathsf {U}\) of small Kan types (assuming a Grothendieck universe of small sets in the ambient set theory). A type \(A \in {{\mathrm{Ty}}}(\varGamma )\) is small if all the sets \(A \rho \) for \(\rho \in \varGamma (I)\) are so. A Kan type \((A,\kappa ) \in {{\mathrm{KTy}}}(\varGamma )\) is small if \(A \in {{\mathrm{Ty}}}(\varGamma )\) is small. We denote the set of all such small types and Kan types by \({{\mathrm{Ty}}}_0(\varGamma )\) and \({{\mathrm{KTy}}}_0(\varGamma )\), respectively. Substitution makes both \({{\mathrm{Ty}}}_0\) and \({{\mathrm{KTy}}}_0\) into presheaves on the category of cubical sets. The universe \(\mathsf {U}\) is now given as \(U = {{\mathrm{KTy}}}_0 \circ {{\mathrm{\mathbf {y}}}}\) where \({{\mathrm{\mathbf {y}}}}\) denotes the Yoneda embedding. For an I-cube \((A,\kappa ) \in \mathsf {U}(I) = {{\mathrm{KTy}}}_0({{\mathrm{\mathbf {y}}}}I)\) we have that A is a presheaf on the category of elements of \({{\mathrm{\mathbf {y}}}}I\), and A(Jf) is a small set for every element \((J,f{:}J \rightarrow I)\). Moreover, \(\kappa (J,f)\) is a filler function for open boxes in A over (Jf). Of particular interest are the small set \(A(I,\mathrm {id}_I)\) and filler function \(\kappa (I,\mathrm {id}_I)\).

Given \(a \in {{\mathrm{Ter}}}(\varGamma ,\mathsf {U})\) we can associate a small type \({{\mathrm{\mathsf {El}}}}a\) in \({{\mathrm{Ty}}}_0 (\varGamma )\) by \(({{\mathrm{\mathsf {El}}}}a) \rho = A(I,\mathrm {id}_I)\) where \(a \rho = (A,\kappa )\). We equip \({{\mathrm{\mathsf {El}}}}a\) with the Kan structure \({{\mathrm{\underline{\mathsf {El}}}}}\,a\) defined by \(({{\mathrm{\underline{\mathsf {El}}}}}\,a)\rho = \kappa (I,\mathrm {id}_I)\). This results in an isomorphism which is natural in \(\varGamma \):

figure h

where \(\ulcorner X \urcorner \rho = X \hat{\rho }\in \mathsf {U}(I)\) for \(X \in {{\mathrm{KTy}}}_0 (\varGamma )\). Here \(\hat{\rho }{:}{{\mathrm{\mathbf {y}}}}I \rightarrow \varGamma \) is the associated substitution of \(\rho \in \varGamma (I)\), that is, \(\hat{\rho }f = \rho f \in \varGamma (J)\) for any \(f {:}J \rightarrow I\). Since moreover \({{\mathrm{Hom}}}(\varGamma ,\mathsf {U}) \cong {{\mathrm{Ter}}}(\varGamma ,\mathsf {U})\), we get that \({{\mathrm{KTy}}}_0\) is representable.

Theorem 3

\(\mathsf {U}\) has a Kan structure.


[6, Theorem 4.2]. \(\square \)

We are now ready for the first main result of this paper.

Theorem 4

(Univalence) The type

$$\begin{aligned} \varPi (a : \mathsf {U})\, {{\mathrm{\mathsf {isContr}}}}\bigl (\varSigma (b : \mathsf {U}) \, \mathsf {Equiv}\,({{\mathrm{\mathsf {El}}}}a)\,({{\mathrm{\mathsf {El}}}}b) \bigr ) \end{aligned}$$

in \({{\mathrm{Ty}}}(1)\) has a section, where \(1\) denotes the empty context.


Because our operation \({{\mathrm{\mathsf {G}}}}\) preserves smallness we obtain an operation turning an equivalence between small Kan types into a path in \(\mathsf {U}\): given \(a \in {{\mathrm{Ter}}}(\varGamma , \mathsf {U})\) and \(b \in {{\mathrm{Ter}}}(\varGamma , \mathsf {U})\) with \(t \in {{\mathrm{Ter}}}(\varGamma , \mathsf {Equiv}\,({{\mathrm{\mathsf {El}}}}a)\,({{\mathrm{\mathsf {El}}}}\,b))\) we get a small type \({{\mathrm{\mathsf {G}}}}(t.1) \in {{\mathrm{Ty}}}_0 (\varGamma * \mathbb {I})\) which has the Kan structure \(\kappa = {{\mathrm{\underline{{{\mathrm{\mathsf {G}}}}}}}}\,({{\mathrm{\underline{\mathsf {El}}}}}a)\,({{\mathrm{\underline{\mathsf {El}}}}}b)\,\mathsf {ext}\) by Theorem 1 where \(\mathsf {ext}\) is constructed from \({{\mathrm{\underline{\mathsf {El}}}}}a\), \({{\mathrm{\underline{\mathsf {El}}}}}b\), and t using Lemma 1. Hence \(\ulcorner ({{\mathrm{\mathsf {G}}}}(t.1), \kappa ) \urcorner \in {{\mathrm{Ter}}}(\varGamma *\mathbb {I}, \mathsf {U})\) with

$$\begin{aligned} \ulcorner ({{\mathrm{\mathsf {G}}}}(t.1),\kappa ) \urcorner [0] = \ulcorner ({{\mathrm{\mathsf {G}}}}(t.1) [0], \kappa [0]) \urcorner = \ulcorner ({{\mathrm{\mathsf {El}}}}a,{{\mathrm{\underline{\mathsf {El}}}}}a) \urcorner = a \end{aligned}$$

and likewise \(\ulcorner ({{\mathrm{\mathsf {G}}}}(t.1),\kappa ) \urcorner [1]\!=\!b\). Finally, we get a path \(\langle \rangle \ulcorner ({{\mathrm{\mathsf {G}}}}(t.1), \kappa ) \urcorner \!\in \!{{\mathrm{Ter}}}(\varGamma , \mathsf {Path}_{\mathsf {U}}\,a\,b)\).

Choosing \(a : \mathsf {U}, b : \mathsf {U}, t : \mathsf {Equiv}\,({{\mathrm{\mathsf {El}}}}a)\,({{\mathrm{\mathsf {El}}}}b)\) as the context \(\varGamma \) above we get using currying

$$\begin{aligned} \mathsf {ua}\in {{\mathrm{Ter}}}\bigl (1,\varPi (a\,b : \mathsf {U}) (\mathsf {Equiv}\,({{\mathrm{\mathsf {El}}}}a)\,({{\mathrm{\mathsf {El}}}}b) \rightarrow \mathsf {Path}_{\mathsf {U}}\,a\,b)\bigr ). \end{aligned}$$

Observe that we didn’t use that \({{\mathrm{\mathsf {G}}}}\) and its Kan structure commute with substitutions to derive \(\mathsf {ua}\).

In addition to \(\mathsf {ua}\) we obtain a section \(\mathsf {ua}_\beta \) of

$$\begin{aligned} \varPi (a\,b : \mathsf {U}) \,\varPi (t : \mathsf {Equiv}\,({{\mathrm{\mathsf {El}}}}a)\,({{\mathrm{\mathsf {El}}}}b)) ~ \mathsf {Path}_{{{\mathrm{\mathsf {El}}}}a \rightarrow {{\mathrm{\mathsf {El}}}}b}\,(\mathsf {T_{{{\mathrm{\mathsf {El}}}}}}\,(\mathsf {ua}\,t))\,(t.1) \end{aligned}$$

where \(\mathsf {T_{{{\mathrm{\mathsf {El}}}}}}: \mathsf {Path}_{\mathsf {U}}\,a\,b \rightarrow {{\mathrm{\mathsf {El}}}}a \rightarrow {{\mathrm{\mathsf {El}}}}b\) is the transport operation for paths for \(({{\mathrm{\mathsf {El}}}}\mathsf {q},{{\mathrm{\underline{\mathsf {El}}}}}\mathsf {q})\) in \({{\mathrm{KTy}}}_0 (\mathsf {U})\) (see the operation \(\mathsf {T}\) in [2, Section 8.2]). Indeed, the path to justify \(\mathsf {ua}_\beta \) is given by reflexivity using our refined Kan structure from Theorem 2 plus that \(\mathsf {T_{{{\mathrm{\mathsf {El}}}}}}\) is given in terms of composition with an empty tube.

The transport operation \(\mathsf {T_{{{\mathrm{\mathsf {El}}}}}}\) can easily be extended to an operation

$$\begin{aligned} \mathsf {T^{\mathsf {Equiv}}_{{{\mathrm{\mathsf {El}}}}}}: \mathsf {Path}_{\mathsf {U}}\,a\,b \rightarrow \mathsf {Equiv}\,({{\mathrm{\mathsf {El}}}}a)\,({{\mathrm{\mathsf {El}}}}b) \end{aligned}$$

which goes in the opposite direction as \(\mathsf {ua}\). Actually, \(\mathsf {ua}\) and \(\mathsf {T^{\mathsf {Equiv}}_{{{\mathrm{\mathsf {El}}}}}}\) constitute a section-retraction pair because of \(\mathsf {ua}_\beta \) and the fact that \({{\mathrm{\mathsf {isEquiv}}}}t.1\) is a proposition, that is, all its inhabitants are path-equal. Hence \(\varSigma (b : \mathsf {U}) \, \mathsf {Equiv}\,({{\mathrm{\mathsf {El}}}}a)\,({{\mathrm{\mathsf {El}}}}b)\) is a retract of \(\varSigma (b : \mathsf {U}) \, \mathsf {Path}_{\mathsf {U}}\,a\,b\). Since \(\mathsf {U}\) has a Kan structure by Theorem 3, the latter type is contractible (see [2, Section 8.2]) and thus so is the former, concluding the proof. \(\square \)

Identity Types

We will now describe the identity type which justifies the usual judgmental equality for its eliminator following Swan [7].

Let \(\varGamma \) be a cubical set and \(A,B\in {{\mathrm{Ty}}}(\varGamma )\), i.e., A and B are presheaves on the category of elements of \(\varGamma \). For natural transformationsFootnote 2\(\alpha {:}A \rightarrow B\) we are going to define a factorization as \(\alpha = p_\alpha \, i_\alpha \) with \(i_\alpha {:}A \rightarrow M_\alpha \) and \(p_\alpha {:}M_\alpha \rightarrow B\). Furthermore, \(i_{\alpha }\) will be a cofibration (i.e., has the lifting property w.r.t. any acyclic fibration as formulated in Corollary 2) and \(p_{\alpha }\) will be equipped with an acyclic-fibration structure. This factorization corresponds to Garner’s factorization using the refined small object argument [5] specialized to cubical sets.

For \(\rho \) in \(\varGamma (I)\) we will define the sets \(M_\alpha \rho \) together with the restriction maps \(M_\alpha \rho \rightarrow M_\alpha (\rho f)\) (for \(f {:}J \rightarrow I\)) and the components \(M_\alpha \rho \rightarrow B \rho \) of the natural transformation \(p_\alpha \) by an inductive process (see Remark 2 below). The elements of \(M_\alpha \rho \) are either of the form \(\mathsf {i}\, u\) with u in \(A \rho \) (and \(\mathsf {i}\) considered as a constructor) and we set in this case \((\mathsf {i}\, u) f = \mathsf {i}(u \, f)\) and \(p_\alpha (\mathsf {i}\, u) = \alpha \,u\). Or the elements are of the form \((v, [J \mapsto \mathbf {u}])\) where \(v \in B\rho \), \(J \subseteq I\), and \(\mathbf {u}\) is a J-tube in \(M_\alpha \rho \) over v (meaning \(p_\alpha \, u_{jb} = v (j / b)\)). In the latter case we set \(p_\alpha (v, [J \mapsto \mathbf {u}]) = v\) and for the restrictions \((v,[J\mapsto \mathbf {u}])f = u_{jb}(f-j)\) if \(f(j)=b\in \{0,1\}\) for some \(j\in J\), and \((v,[J\mapsto \mathbf {u}])f = (vf,[Jf\mapsto \mathbf {u}f])\) if f is defined on J. Note that restrictions do not increase the syntactic complexity of an element \(m \in M_\alpha \rho \). This defines \(M_\alpha \in {{\mathrm{Ty}}}(\varGamma )\) and we set \(i_\alpha \,u = \mathsf {i}\,u\).

Remark 2

This construction is rather subtle in a set-theoretic framework. One possible way to define this factorization is to first inductively define larger sets \(M'_\alpha \rho \) containing all formal elements \(\mathsf {i}\,u\) with \(u \in A \rho \), and \((v, [J \mapsto \mathbf {u}])\) with \(v \in B\rho \) and where \(\mathbf {u}\) is represented by a family of elements \(u_f \in M'_\alpha (\rho f)\) indexed by all \(f{:}K \rightarrow I\) with \(f j = 0\) or 1 for some \(j \in J\), but without requiring compatibility. On these sets one can then define maps \(M'_\alpha \rho \rightarrow M'_\alpha (\rho f)\) and \(M'_\alpha \rho \rightarrow B \rho \). Given these maps, we can single out the sets \(M_\alpha \rho \subseteq M'_\alpha \rho \) of the well-formed elements as in the definition above, on which the corresponding maps then induce restriction operations (satisfying the required equations) and the natural transformation \(p_\alpha \).

We use \(M_\alpha , i_\alpha , p_\alpha \) in the following way. Let A be a Kan type and let \(B=\mathsf {Path}_{A}\) be the Kan type of paths over A without specified endpoints. (The Kan structure on A induces the Kan structure on B, much in the same way as shown in [2] for types \(\mathsf {Path}_{A}\,a\,b\).) As mentioned in Sect. 2, transport along reflexivity paths is not necessarily the identity function. One could solve this problem if one could recognize the reflexivity paths, which is not possible in \(\mathsf {Path}_{A}\). Swan’s [7] solution to this problem is to define a type equivalent to \(\mathsf {Path}_{A}\) in which one can recognize (representations of) reflexivity paths. This is the type \(M_\alpha \) with \(\alpha {:}A \rightarrow \mathsf {Path}_{A}\) mapping each a in A to its reflexivity path. The representation of the reflexivity path of a in \(M_\alpha \) is \(\mathsf {i}\,a\), with \(\mathsf {i}\) a constructor of the inductively defined type \(M_\alpha \), and recognizing \(\mathsf {i}\,a\) is done through pattern matching. All the rest of the complicated definition above is to make sure that \(M_\alpha \) has the right Kan structure (Lemma 2), and that elimination generally has the right properties (Corollary 1).

Constructors of the form \((v,[J\mapsto \mathbf {u}])\) equip \(p_\alpha {:}M_\alpha \rightarrow B\) with an acyclic-fibration structure which (uniformly) fills tubes \([J \mapsto \mathbf {u}]\) in \(M_\alpha \rho \) over a filled cube v in \(B \rho \). Thus to, say, construct a path between specified endpoints in \(M_\alpha \) it is enough to give a path in B between the images of the endpoints under \(p_\alpha \).

There are two important observations to make at this point: First, this construction preserves smallness, i.e., \(M_\alpha \in {{\mathrm{Ty}}}_0 (\varGamma )\) whenever \(A, B \in {{\mathrm{Ty}}}_0 (\varGamma )\). And, second, this construction is stable under substitution: given \(\sigma {:}\varDelta \rightarrow \varGamma \) we have \(M_\alpha \sigma = M_{\alpha \sigma }\), \(i_\alpha \sigma = i_{\alpha \sigma }\), and \(p_\alpha \sigma = p_{\alpha \sigma }\). Neither of these properties holds for the corresponding factorization into an acyclic cofibration followed by a fibration (sketched in [6, Section 3.5] for a special case).

Lemma 2

Given \(\kappa \in {{\mathrm{Fill}}}(\varGamma ,B)\) there is \(\underline{M}_\alpha \kappa \in {{\mathrm{Fill}}}(\varGamma ,M_{\alpha })\). Moreover, this assignment is stable under substitution, i.e., \((\underline{M}_\alpha \kappa ) \sigma = \underline{M}_{\alpha \sigma }(\kappa \sigma )\) for \(\sigma {:}\varDelta \rightarrow \varGamma \).


Let \(\rho \in \varGamma (I)\) and, say, \(m = [ J \mapsto \mathbf {m}; (i,0) \mapsto m_{i0}]\) be an open box in \(M_\alpha \) over \(\rho \). We get an open box \(v = [J \mapsto \mathbf {v}; (i,0) \mapsto v_{i0}]\) in B over \(\rho \) by setting \(v_{jb} = p_\alpha \,m_{jb}\). We define

$$\begin{aligned} \underline{M}_\alpha \,\kappa \,\rho \,m = (\kappa \,\rho \,v, [J,i\mapsto \mathbf {m},m_{i0},m_{i1}]) \end{aligned}$$

with \(m_{i1} = ({\bar{\kappa }}\,\rho \,v, [J \mapsto \mathbf {m}(i / 1)])\). \(\square \)

Lemma 3

Given a Kan type \((D,\kappa _D) \in {{\mathrm{KTy}}}(\varGamma .M_\alpha )\) and sections \(s \in {{\mathrm{Ter}}}(\varGamma .A, D i_\alpha )\) and \(s' \in {{\mathrm{Ter}}}(\varGamma .M_\alpha , D)\) together with a homotopy

$$\begin{aligned} e \in {{\mathrm{Ter}}}\bigl (\varGamma , \varPi (a : A)\,\mathsf {Path}_{D (i_\alpha \, a)}\,(s' (i_\alpha \,a))\,(s\,a)\bigr ), \end{aligned}$$

it is possible to find a section \(\tilde{s} \in {{\mathrm{Ter}}}(\varGamma .M_\alpha , D)\) such that \(\tilde{s} i_\alpha = s \in {{\mathrm{Ter}}}(\varGamma .A,D i_\alpha )\). Or stated as a diagram, we are given a commuting square

figure i

where the upper left triangle only commutes up to the homotopy e and the lower triangle commutes strictly, and we get a new diagonal lift where both triangles commute strictly. Moreover, this assignment is stable under substitutions, i.e., given \(\sigma {:}\varDelta \rightarrow \varGamma \), substituting the chosen diagonal lift \(\tilde{s}\) (for the data \(\alpha ,D,\kappa _D,s,s',e\)) along \((\sigma \mathsf {p},\mathsf {q}) {:}\varDelta .M_{\alpha \sigma } \rightarrow \varGamma .M_\alpha \) results in the chosen diagonal lift for the substituted data (where \(\sigma \) is weakened appropriately if needed).


For \(\rho \in \varGamma (I)\) and \(m \in M_\alpha \rho \) we define \(\tilde{s} (\rho ,m) \in D (\rho ,m)\) and a path \(\tilde{e} (\rho ,m)\) between \(s' (\rho ,m)\) and \(\tilde{s} (\rho ,m)\) in \(D (\rho ,m)\) by induction on the syntactic complexity of \(m \in M_\alpha \rho \) such that \((\tilde{s}(\rho ,m))f = \tilde{s} (\rho f, m f)\) and \((\tilde{e} (\rho ,m)) f = \tilde{e} (\rho f,m f)\). In case \(m = \mathsf {i}\,u\) for \(u \in A \rho \), we set \(\tilde{s} (\rho , \mathsf {i}\,u) = s (\rho , u)\) and \(\tilde{e} (\rho , \mathsf {i}\,u) = e (\rho , u)\). In case \(m = (v, [J \mapsto \mathbf {m}])\), we set

$$\begin{aligned} \tilde{e} (\rho , m) = \langle i \rangle \, \kappa _D\,(\rho s_i)\,[J \mapsto \mathbf {w};(i,0) \mapsto s' (\rho ,m) ] \end{aligned}$$

where \(w_{jb} = \tilde{e} (\rho (j / b), m_{jb}) \mathop {\varvec{@}}i\), and correspondingly \(\tilde{s} (\rho , m) = \tilde{e} (\rho , m) \mathop {\varvec{@}}1\). \(\square \)

If the Kan structure is an acyclic-fibration structure as in Definition 2, that is, if we can fill tubes without a closing lid, the above proof can be carried out without \(s'\). This implies the following result, which expresses that \(i_{\alpha } {:}A \rightarrow M_{\alpha }\) is a cofibration.

Corollary 1

Given \(D \in {{\mathrm{Ty}}}(\varGamma .M_\alpha )\) equipped with an acyclic-fibration structure and a section \(s \in {{\mathrm{Ter}}}(\varGamma .A, D i_\alpha )\) it is possible to define a section \(\tilde{s} \in {{\mathrm{Ter}}}(\varGamma .M_\alpha , D)\) such that \(\tilde{s} i_\alpha = s \in {{\mathrm{Ter}}}(\varGamma .A, D i_\alpha )\). That is, there is a diagonal lift in the diagram:

figure j

Moreover, this assignment is stable under substitution.


By Lemma 1 we know that D has a Kan structure and is contractible. From the contractibility we get a section \(s' \in {{\mathrm{Ter}}}(\varGamma .M_\alpha ,D)\) and a homotopy between \(s' \, i_\alpha \) and s, and can thus apply Lemma 3 to get a strict diagonal filler. \(\square \)

This also implies the following result, which expresses that \(i_{\alpha } {:}A \rightarrow M_{\alpha }\) is a acyclic cofibration as soon as \(\alpha \) has a well-behaved homotopy inverse. Recall that application \(\mathsf {ap}\,\alpha \,p \in {{\mathrm{Ter}}}(\varGamma , \mathsf {Path}_{B}\, (\alpha \,u)\,(\alpha \,v))\) of \(\alpha {:}A \rightarrow B\) to a path \(p \in {{\mathrm{Ter}}}(\varGamma ,\mathsf {Path}_{A}\,u\,v)\) is given by \((\mathsf {ap}\,\alpha \,p)\rho = \langle i \rangle \, \alpha (p \rho \mathop {\varvec{@}}i)\) (see [6, Section 3.3.2]).

Corollary 2

Let \(\alpha {:}A \rightarrow B\) and assume we are given \(\beta : B \rightarrow A\) and sections

$$\begin{aligned} \eta&\in {{\mathrm{Ter}}}\bigl (\varGamma , \varPi (a:A)\, \mathsf {Path}_{A}\,(\beta (\alpha \, a))\,a\bigr ),\\ \varepsilon&\in {{\mathrm{Ter}}}\bigl (\varGamma , \varPi (b : B)\,\mathsf {Path}_{B}\,(\alpha (\beta \, b))\,b\bigr ), \text { and}\\ \tau&\in {{\mathrm{Ter}}}\bigl (\varGamma , \varPi (a: A)\, \mathsf {Path}_{}\,(\varepsilon (\alpha \, a))\,(\mathsf {ap}\,\alpha \,(\eta \,a))\bigr ), \end{aligned}$$

where the omitted subscript of the path-type in \(\tau \) is \(\mathsf {Path}_{B}\,(\alpha \,(\beta (\alpha \, a)))\,(\alpha \,a)\). Then given \(D \in {{\mathrm{Ty}}}(\varGamma .M_\alpha )\) with Kan structure \(\kappa _D\) we can extend any section \(s \in {{\mathrm{Ter}}}(\varGamma .A, D i_\alpha )\) to a section \(\tilde{s} \in {{\mathrm{Ter}}}(\varGamma .M_\alpha , D)\) satisfying \(\tilde{s} \, i_\alpha = s\). Moreover, this assignment is stable under substitution.


It is sufficient to construct \(s'\) and e as in Lemma 3. To enhance readability we omit the arguments from \(\varGamma \).

First, given \(m \in M_\alpha \) we have a path \(m^*\) connecting \(i_\alpha (\beta (p_\alpha m))\) to m, since the images of the endpoints under \(p_\alpha \) are \(\alpha (\beta (p_\alpha \, m))\) and \(p_\alpha \,m\) which are connected by \(\varepsilon (p_\alpha \,m)\). Thus the acyclic-fibration structure on \(p_\alpha \) gives us a desired path \(m^*\), which moreover lies over \(\varepsilon (p_\alpha \,m)\), i.e.,

$$\begin{aligned} p_\alpha (m^* \mathop {\varvec{@}}j) = \varepsilon (p_\alpha \,m) \mathop {\varvec{@}}j \quad \text {for fresh { j}.} \end{aligned}$$

Next, we have \(s (\beta (p_\alpha \, m)) \in D (i_\alpha (\beta (p_\alpha \, m)))\) which we then can transport to \(D \, m\) using the Kan structure and the path \(m^*\). Thus we set

$$\begin{aligned} s' m := \bar{\kappa }_D \,(m^* \mathop {\varvec{@}}j)\,[(j,0) \mapsto s (\beta (p_\alpha \, m))]. \end{aligned}$$

It remains to give a path \(e\,a\) connecting \(s' (i_\alpha \,a)\) to \(s\,a\) in \(D (i_\alpha \, a)\) for \(a \in A\). We have the two horizontal lines (in direction j) in


where the top line is given by \(s (\eta \, a \mathop {\varvec{@}}j)\) in \(D (i_\alpha (\eta \,a \mathop {\varvec{@}}j))\) and the bottom line is given by a filling in \(D ((i_\alpha \, a)^* \mathop {\varvec{@}}j)\) following the construction (7) of \(s'\). We want to construct the vertical dashed line in \(D (i_\alpha \, a)\). We can define this line using a composition on the open box specified in (8) as soon as we can provide an interior of the following square in \(M_\alpha \) over which (8) is an open box:

figure k

But by (6), mapping this square to B using \(p_\alpha \) has a filler given by \(\tau \,a\mathop {\varvec{@}}k \mathop {\varvec{@}}j\) (where k extends vertically), and thus also a filler in \(M_\alpha \) since \(p_\alpha \) has an acyclic-fibration structure, concluding the proof. \(\square \)

The representation of the identity type with the usual judgmental equality for its eliminator follows from these results by considering the case where B is the type of paths without specified endpoints \(\mathsf {Path}_{A}\) over a type A and \(\alpha \,a\) is the constant path a. We get a factorization with \(\mathsf {Id}_{A} := M_\alpha \), \({{\mathrm{\mathsf {refl}}}}:= i_\alpha \), and where the right vertical map is given by taking endpoints:

figure l

This \(\alpha \) satisfies the hypothesis of Corollary 2 using the properties of path-types from [2, Section 8.2], and hence \({{\mathrm{\mathsf {refl}}}}{:}A \rightarrow \mathsf {Id}_{A}\) has diagonal lifts against types with Kan structure. These diagonal lifts serve as the interpretation of the eliminator (cf. [1, p. 52]) and their choice is stable under substitution, allowing us thus to interpret identity types.

One can also explain \(\mathsf {Id}_{A}\) with fixed endpoints as Kan type in context \(\varGamma .A.A\mathsf {p}\) and then show that \(\mathsf {Id}_{A}\,u\,v\) is \(\mathsf {Path}\)-equivalent to \(\mathsf {Path}_{A}\,u\,v\). It follows that a type is \(\mathsf {Path}_{}\)-contractible if, and only if, it is \(\mathsf {Id}_{}\)-contractible. The univalence axiom for \(\mathsf {Path}_{}\)-types (Theorem 4) hence also holds formulated with \(\mathsf {Id}_{}\)-types.

We can summarize the results of this section as:

Theorem 5

The cubical set model of [2, 6] supports identity types and validates the univalence axiom.


  1. We will see later that this indeed induces a path in a universe whenever both types A and B are small.

  2. Natural transformations \(\alpha {:}A \rightarrow B\) correspond to sections in \({{\mathrm{Ter}}}(\varGamma , A \rightarrow B)\), and also to maps between the projections \(\varGamma .A \rightarrow \varGamma \) and \(\varGamma .B \rightarrow \varGamma \) in the slice over \(\varGamma \). To simplify notation, we will write \(\alpha \) for either of these.


  1. Awodey, S., Warren, M.A.: Homotopy theoretic models of identity types. Math. Proc. Camb. Philos. Soc. 146(1), 45–55 (2009)

    MathSciNet  Article  MATH  Google Scholar 

  2. Bezem, M., Coquand, T., Huber, S.: A model of type theory in cubical sets. In: Matthes, R., Schubert, A. (eds.) 19th International Conference on Types for Proofs and Programs (TYPES 2013), Leibniz International Proceedings in Informatics (LIPIcs), vol. 26, pp. 107–128. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Dagstuhl, Germany (2014).

  3. Cohen, C., Coquand, T., Huber, S., Mörtberg, A.: Cubical type theory: a constructive interpretation of the univalence axiom (2015). To appear in the proceedings of TYPES 2015

  4. Coquand, T.: A remark on contractible families of types (2013). Unpublished note available at

  5. Garner, R.: Understanding the small object argument. Appl. Categ. Struct. 17(3), 247–285 (2009)

    MathSciNet  Article  MATH  Google Scholar 

  6. Huber, S.: A model of type theory in cubical sets. Licentiate thesis, University of Gothenburg (2015)

  7. Swan, A.: An algebraic weak factorisation system on 01-substitution sets: a constructive proof (2014). Preprint arXiv:1409.1829 [math.LO]

Download references


We want to thank Cyril Cohen and Anders Mörtberg for several discussions around an implementation of this system, as well as Andrew Swan for discussions on the representation of the identity type in the cubical set model.

Author information

Authors and Affiliations


Corresponding authors

Correspondence to Marc Bezem or Simon Huber.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Bezem, M., Coquand, T. & Huber, S. The Univalence Axiom in Cubical Sets. J Autom Reasoning 63, 159–171 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:


  • Dependent type theory
  • Univalence axiom
  • Cubical sets