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 symmetric cubical sets. 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.

Any Kan structure κ defines a composition operationκ which provides the missing lid of the open box, given by: We denote the set of all Kan structures on A ∈ Ty(Γ) as Fill(Γ, A). If σ : ∆ → Γ and κ is an element in Fill(Γ, A), we get an element κσ in Fill(∆, Aσ) defined by (κσ) ρ = κ (σρ).
Given a cubical set Γ a Kan type is a pair (A, κ) where A ∈ Ty(Γ) and κ ∈ Fill(Γ, A). We denote the collection of all such Kan types by KTy(Γ). 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 Id A for the identity type with the usual judgmental equality defined in Section 4. Recall that the path type Path A u v ∈ Ty(Γ) for A ∈ Ty(Γ) and u, v ∈ Ter(Γ, A) is defined by the sets (Path A u v)ρ containing equivalence classes i w where i / ∈ I and w ∈ Aρs i with w(i/0) = uρ and w(i/1) = vρ. 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 Γ and ∆, we say that u ∈ Γ(I) and v ∈ ∆(I) are separated, denoted by u # v, if they come through degeneration from cubes with disjoint sets of directions. More precisely, if there are J ⊆ I, K ⊆ I with J ∩ K = ∅ and u ∈ Γ(J), v ∈ ∆(K) such that u = u s and v = v s with s and s induced by the inclusion J ⊆ I and K ⊆ I, respectively. The separated product Γ * ∆ of Γ and ∆ is the cubical set defined by The restrictions are inherited from Γ × ∆, that is, they are defined component wise. It can be shown that − * − extends to a functor, and that − * ∆ has a right adjoint.
Of particular interest is Γ * I where I is the interval defined by I(J) = J ∪ {0, 1} (see [2, Section 6.1]). Then If (ρ, i) ∈ (Γ * I)(I) with i ∈ I, then ρ = ρ s i for a uniquely determined ρ which we denote by ρ − i.
We can use Γ * I to formulate the following introduction rule for path types where [0], [1] : Γ → Γ * I are induced by the global elements 0 and 1 of I, respectively, and p : Γ * I → Γ is the first projection. The binding operation is interpreted by ( w)ρ = i w(ρs i , i) with i a fresh name (see [2,Section 8.2]).
Given an element i w ∈ (Path A u v)ρ with ρ ∈ Γ(I), we set ( i w) @ 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: where A and B are types, t : A → B, and v : B (all in an ambient context Γ). This can of course also be formally written name-free: for example, the first type can be written as ΣAΠAp (Path App qp q) ∈ Ty(Γ) and the second one as ΣAp (Path Bpp app(tpp, q) qp) ∈ Ty(Γ.B).
Proof. Let κ ∈ Fill(Γ, A) and p ∈ Ter(Γ, isContr A). To define ϕ κ p ∈ Contr(Γ, A), let ρ ∈ Γ(I) and u a J-tube in A over ρ. We take a fresh dimension i and form an open box with the center of contraction pρ.1 at the closed end and u at the open end, connected by pρ.2; filling this gives us an extension of u. Formally: where (pρ.2 u) @ i is the J-tube given by (p(ρ(j/c)).2 u jc ) @ i at side (j, c) ∈ J × {0, 1}.
Conversely, let ext ∈ Contr(Γ, A). To get a Kan structure we first fill the missing lid and then the interior, that is, we set and likewise for the other filling. To define ψ 1 ext ρ we choose ext ρ [] as center of contraction, which is connected to any a ∈ Aρ by the path One can show uniformity, naturality, and that ψ 0 , ψ 1 is a section of ϕ.
Next we will define an operation 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 → U and a path p : x = T y with its transport function p * : P x → P y. If P x and P y are different types, there is no ordinary path connecting u : P x and v : P y. Therefore the pathovers connecting u and v are taken to be the paths of type p * u = P y v (in the fiber P y).
We apply the same idea to G t, which should be a path from A to B in U such that transport along this path is t : A → B. For the type family P we take id 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 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 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 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 G (and ug below) have A and B as implicit arguments.

Definition 4.
Assume the premiss of (1) and define for every ρ ∈ Γ(I): In the last case ρ # i, so ρ = (ρ − i)s i . The restrictions in the latter case are a little involved. We need under the given assumptions. It can then be checked that the restrictions satisfy the presheaf requirements. This concludes the definition of G t.
We have a map ug ∈ Ter(Γ * I. G t, Bp) given by: The fact that a map t ∈ Ter(Γ, A → B) is an equivalence can be represented as an element of Contr(Γ.B, fib t). By Lemma 3 this is the case whenever A and B have Kan structures and the fibers of t are contractible.
Theorem 5. The operation G can be lifted to Kan structures provided t is an equivalence, i.e., there is an operation G which given the premiss of (1) and we argue by cases. For r = 0, 1 we take: Let us now consider the main case where r = i ∈ I is a name and thus ρ # i, ρ = (ρ − i)s i . We are given j (the name along which we fill), w a J-tube in (G t) over (ρ, i) (with J ⊆ I − j), and w ja ∈ (G t)(ρ, i)(j/a) for a = 0 or 1, which fits w. We want to define We can map w ja , w using ug and obtain an open box v ja , v in B over ρ given by 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: We extend the J-tube w to J, i-tube by constructing w i0 and w i1 and then proceed as in the next case with the tube w, w i0 , w i1 . Note that we want 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 v in B. For simplicity we also omit ρ. We construct w i0 and w i1 by filling the open boxes indicated by thicker lines on the left and on the right, respectively.
. This can be illustrated by: . This case is illustrated as follows: Case j = i and a = 1. In this case the direction of the filling is opposite to t, and therefore we have to use ext which expresses that fib t is contractible. The family m defined by So we can extend this tube to obtain and we can take w := (u, ω @ i) ∈ (G t)(ρ, 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. wi1 J i This concludes the definition of the filling operations of G t.
To see that this filling operation is uniform, note that for an f : K → I defined on j, J and on i the case which defines the filling of [J → w; (j, a) → w ja ]f coincides with the case used to defined [J → w; (j, a) → 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 (equations (4) and (5)) concluding the proof. Theorem 6. We can refine the Kan structure G κ A κ B ext given in Theorem 5 such that it satisfies Proof. We modify the Kan structure given in the proof of Theorem 5 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 ∈ A(ρ − i) and an empty tube and can define ( . That this definition remains uniform is proved as in Theorem 5 using the observation that |J| = |Jf | for f defined on J. In addition we retain stability under substitution.
Remark 7. It is also possible to change the Kan structure such that it satisfies where t −1 is the inverse of t which can be constructed from ext. For this one also has to modify the case where J is empty and a = 1 from the definition of 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 ext.
Let us recall the definition of a universe U of small Kan types (assuming a Grothendieck universe of small sets in the ambient set theory). A type A ∈ Ty(Γ) is small if all the sets Aρ for ρ ∈ Γ(I) are so. A Kan type (A, κ) ∈ KTy(Γ) is small if A ∈ Ty(Γ) is small. We denote the set of all such small types and Kan types by Ty 0 (Γ) and KTy 0 (Γ), respectively. Substitution makes both Ty 0 and KTy 0 into presheaves on the category of cubical sets. The universe U is now given as U = KTy 0 • y where y denotes the Yoneda embedding. Given a ∈ Ter(Γ, U) we can associate a small type El a in Ty 0 (Γ) by (El a)ρ = A(I, id I ) where aρ = (A, κ). We equip El a with the Kan structure El a defined by (El a)ρ = κ(I, id I ). This results in an isomorphism which is natural in Γ: KTy 0 (Γ),
We are now ready for the first main result of this paper.  Path U a b).
Choosing a : U, b : U, t : Equiv (El a) (El b) as the context Γ above we get using currying ua ∈ Ter 1, Π(a b : Observe that we didn't use that G and its Kan structure commute with substitutions to derive ua.
In addition to ua we obtain a section ua β of where T El : Path U a b → El a → El b is the transport operation for paths for the type (El q, El q) ∈ KTy 0 (U) (see the operation T in [2, Section 8.2]). Indeed, the path to justify ua β is given by reflexivity using our refined Kan structure from Theorem 6 plus that T El is given in terms of composition with an empty tube. The transport operation T El can easily be extended to an operation which goes in the opposite direction as ua. Actually, ua and T Equiv El constitute a section-retraction pair because of ua β and the fact that isEquiv t.1 is a proposition, that is, all its inhabitants are path-equal. Hence also Σ(b : U) Equiv (El a) (El b) is a retract of Σ(b : U) Path U a b. Since U has a Kan structure by Theorem 8, the latter type is contractible (see [2,Section 8.2]) and thus so is the former, concluding the proof.

Identity types
We will now describe the identity type which justifies the usual judgmental equality for its eliminator following Swan [7].
Let Γ be a cubical set and A, B ∈ Ty(Γ), i.e., A and B are presheaves on the category of elements of Γ. For natural transformations 2 α : A → B we are going to define a factorization as α = p α i α with i α : A → M α and p α : M α → B. Furthermore, i α will be a cofibration (i.e., has the lifting property w.r.t. any acyclic fibration as formulated in Corollary 14) and p α will be equipped with an acyclicfibration structure. This factorization corresponds to Garner's factorization using the refined small object argument [5] specialized to cubical sets.
For ρ in Γ(I) we will define the sets M α ρ together with the restriction maps M α ρ → M α (ρf ) (for f : J → I) and the components M α ρ → Bρ of the natural transformation p α by an inductive process (see Remark 10 below). The elements of M α ρ are either of the form i u with u in Aρ (and i considered as a constructor) and we set in this case (i u)f = i(u f ) and p α (i u) = α u. Or the elements are of the form (v, [J → u]) where v ∈ Bρ, J ⊆ I, and u is a J-tube in M α ρ over v (meaning p α u jb = v(j/b)). In the latter case we set p α (v, [J → u]) = v and for the restrictions (v, Note that restrictions do not increase the syntactic complexity of an element m ∈ M α ρ. This defines M α ∈ Ty(Γ) and we set i α u = i u.
Remark 10. 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 α ρ containing all formal elements i u with u ∈ Aρ, and (v, [J → u]) with v ∈ Bρ and where u is represented by a family of elements u f ∈ M α (ρf ) indexed by all f : K → I with f j = 0 or 1 for some j ∈ J, but without requiring compatibility. On these sets one can then define maps M α ρ → M α (ρf ) and M α ρ → Bρ. Given these maps, we can single out the sets M α ρ ⊆ M α ρ 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 α .
We use M α , i α , p α in the following way. Let A be a Kan type and let B = 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 Path A a b.) As mentioned in Section 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 Path A . Swan's [7] solution to this problem is to define a type equivalent to Path A in which one can recognize (representations of) reflexivity paths. This is the type M α with α : A → Path A mapping each a in A to its reflexivity path. The representation of the reflexivity path of a in M α is i a, with i a constructor of the inductively defined type M α , and recognizing i a is done through pattern matching. All the rest of the complicated definition above is to make sure that M α has the right Kan structure (Lemma 11), and that elimination generally has the right properties (Corollary 13).
Constructors of the form (v, [J → u]) equip p α : M α → B with an acyclicfibration structure which (uniformly) fills tubes [J → u] in M α ρ over a filled cube v in Bρ. Thus to, say, construct a path between specified endpoints in M α it is enough to give a path in B between the images of the endpoints under p α .
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 α : A → M α is a cofibration.
Corollary 13. Given D ∈ Ty(Γ.M α ) with an acyclic-fibration structure and a section s ∈ Ter(Γ.A, Di α ) it is possible to define a sections ∈ Ter(Γ.M α , D) such thatsi α = s ∈ Ter(Γ.A, Di α ). That is, there is a diagonal lift in the diagram: Moreover, this assignment is stable under substitution.
Proof. By Lemma 3 we know that D has a Kan structure and is contractible. From the contractibility we get a section s ∈ Ter(Γ.M α , D) and a homotopy between s i α and s, and can thus apply Lemma 12 to get a strict diagonal filler.
This also implies the following result, which expresses that i α : A → M α is a acyclic cofibration as soon as α has a well-behaved homotopy inverse. Recall that application ap α p ∈ Ter(Γ, Path B (α u) (α v)) of α : A → B to a path p ∈ Ter(Γ, Path A u v) is given by (ap α p)ρ = i α(pρ @ i) (see [ where the omitted subscript of the path-type in τ is Path B (α (β(α a))) (α a). Then given D ∈ Ty(Γ.M α ) with Kan structure κ D we can extend any section s ∈ Ter(Γ.A, Di α ) to a sections ∈ Ter(Γ.M α , D) satisfyings i α = s. Moreover, this assignment is stable under substitution.
Proof. It is sufficient to construct s and e as in Lemma 12. To enhance readability we omit the arguments from Γ.
First, given m ∈ M α we have a path m * connecting i α (β(p α m)) to m, since the images of the endpoints under p α are α(β(p α m)) and p α m which are connected by ε(p α m). Thus the acyclic-fibration structure on p α gives us a desired path m * , which moreover lies over ε(p α m), i.e., (6) p α (m * @ j) = ε(p α m) @ j for fresh j.