# The Univalence Axiom in Cubical Sets

- 347 Downloads

## Abstract

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. https://doi.org/10.4230/LIPIcs.TYPES.2013.107. http://drops.dagstuhl.de/opus/volltexte/2014/4628) 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.

## Keywords

Dependent type theory Univalence axiom Cubical sets## 1 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 *f**defined on**i*. 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 *J*, *i*. 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*.

*(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

*m*.

*composition operation*\(\bar{\kappa }\) which provides the missing lid of the open box, given by:

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.

## 2 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.

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

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

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.

## 3 Equivalences and Univalence

*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

*(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

*J*we have

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

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 )\).

### Proof

*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:

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

Next we will define an operation \({{\mathrm{\mathsf {G}}}}\) which allows us to transform an equivalence into a “path”.^{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.)

*A*and

*B*as implicit arguments.

### Definition 3

*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:

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

*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

### Proof

*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

*B*over \(\rho \) given by

*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

*J*,

*i*-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

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.

*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:

*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:

*Case*s \(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

*J*-tube over \((\rho -i,w_{i1})\) in the contractible type \(\mathsf {fib}\,t \in {{\mathrm{Ty}}}(\varGamma .B)\).

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*.

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

*j*,

*J*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

*j*,

*J*but not on

*i*, the first case has to apply—to simplify notation assume

*f*is \((i / c)\)—then by construction (Eqs. 4, 5)

### Theorem 2

### Proof

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

*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*(*J*, *f*) 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 (*J*, *f*). 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 \):

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.

### Proof

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

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

### Theorem 4

### Proof

*t*using Lemma 1. Hence \(\ulcorner ({{\mathrm{\mathsf {G}}}}(t.1), \kappa ) \urcorner \in {{\mathrm{Ter}}}(\varGamma *\mathbb {I}, \mathsf {U})\) with

## 4 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 transformations^{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 \).

### Proof

*B*over \(\rho \) by setting \(v_{jb} = p_\alpha \,m_{jb}\). We define

### Lemma 3

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).

### Proof

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:

Moreover, this assignment is stable under substitution.

### Proof

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

### Proof

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

*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.,

*j*) inwhere 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:

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:

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:

## Footnotes

- 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.

## Notes

### Acknowledgements

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.

## References

- 1.Awodey, S., Warren, M.A.: Homotopy theoretic models of identity types. Math. Proc. Camb. Philos. Soc.
**146**(1), 45–55 (2009)MathSciNetCrossRefzbMATHGoogle 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). https://doi.org/10.4230/LIPIcs.TYPES.2013.107. http://drops.dagstuhl.de/opus/volltexte/2014/4628
- 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 2015Google Scholar
- 4.Coquand, T.: A remark on contractible families of types (2013). Unpublished note available at http://www.cse.chalmers.se/~coquand/contr.pdf
- 5.Garner, R.: Understanding the small object argument. Appl. Categ. Struct.
**17**(3), 247–285 (2009)MathSciNetCrossRefzbMATHGoogle Scholar - 6.Huber, S.: A model of type theory in cubical sets. Licentiate thesis, University of Gothenburg (2015)Google Scholar
- 7.Swan, A.: An algebraic weak factorisation system on 01-substitution sets: a constructive proof (2014). Preprint arXiv:1409.1829 [math.LO]

## Copyright information

**Open Access**This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), 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.