Reasoning about higher identity types uses two equalities, strict equality and equivalence of cells witnessed by a path. Strict equality is a congruence for every operation on cells, but associativity and the identity laws fail for it. Equivalence of cells satisfies those two laws, but it is not a congruence. Representations of higher identity types often conflate equational properties that hold strictly with those that hold only up to a path. We separate the two and axiomatize the former, introducing SEq, an equational theory generated by eleven axioms for strict equality between cells. We prove soundness and completeness for homotopy models, and completeness already over finite CW-complexes. Nine of these axioms form a strongly normalizing rewrite system whose normal forms are unique up to picture equivalence, and the resulting word problem is decidable in exponential time. We also give presheaf models over a cubical base category in which composition arises from a pushout in the base category itself, without requiring Kan filling structure. The same pushout structure provides explicit higher-dimensional witnesses for associativity and the identity laws.
1 Introduction
Recent years have seen the development of many complementary approaches to understanding the structure of higher types, especially higher identity types, in Martin-Löf type theory and constructive mathematics. This includes topological approaches such as HoTT and univalent foundations [24], categorical approaches such as strong and weak ω-categories and their cubical counterparts [1,13], type-theoretic approaches such as cubical type theory [7,9,12,19], and algebraic approaches such as computads [20]. These approaches are all related on some basic level but may differ in their axiomatizations, choice of primitive concepts, and degree of constructivity.
A fundamental notion, and perhaps the primary motivation for much research in this area, is that of equality at a type, where Martin-Löf's higher identity types play a dominant role. A proof of equality is typically a path in a space, serving as a witness for an equality judgment. This type of equality is often called propositional equality and is denoted ≃ in this paper. This is weaker than strict equality, often called judgmental equality and here denoted =. Paths form spaces themselves, so one may speak of paths between paths, and so on, giving the hierarchy of higher identity types. Many of the structures above were designed to capture the properties of this hierarchy at an abstract level.
In this paper we focus on the model theory of higher identity types in their various incarnations as weak ω-categories, homotopy models, and presheaf models over cubical sets. Our starting point is the observation that standard presentations tend to conflate desirable equational properties that come from strict equality (=) and those that come from equivalence as witnessed by a path ( ≃), whereas there are subtle but important reasons to treat them separately. For example, two n-cells of a higher identity type can be composed only when their boundaries agree on the nose: the composite 1α∘n−knβ exists only if srckα=tgtkβ, and no path
1For α and β n-dimensional cells, α∘kmβ means the composition of α and β along their (n−k)th (m−1)-dimensional faces; see section 2.1 for the definition.
can be asked to witness that equation, because until it holds there is nothing for a path to connect. The same is true of the globular laws srctgtα=src2α and tgtsrcα=tgt2α.
Standard presentations, however, do not isolate it and in fact mix laws that hold strictly with laws that hold only up to equivalence witnessed by a path. Strict equality enjoys the advantage that all relevant algebraic operations (e.g., the globular maps src and tgt, the identity map id, and compositions ∘kn) are congruences. However, associativity of composition and the identity laws α=α∘n−knidksrckα and α=idktgtkα∘n−knα do not hold strictly, but only up to ≃. On the other hand, although ≃ satisfies associativity and the identity laws, it fails to be a congruence with respect to id. Write α≃β when some cell ϕ one dimension higher has α as source and β as target. If id α≃idβ via ϕ, then α=srcidα=srcsrcϕ=srctgtϕ=srcidβ=β, using only src id α=α and the globular law. So ≃ can be a congruence for id only if it is equality.
Definitions of weak ω-categories [5,6,8,13,16–18] and computads [20] impose both kinds of law at once. The division also presents itself in the exchange rule that is usually presented as a law of ≃, yet under the standard topological definition of composition it holds strictly. Another example is id α=idα∘n−1nidα. In the strict setting it is an immediate consequence of the identity laws [1,11,13], and its type-theoretic shadow is the judgmental equality refl a⋅refla≡refla of [24, §2.1]. But once the identity laws are weakened to hold only up to ≃, it seems that it must be taken as a law in its own right.
These observations indicate that there is insight to be gained from a more careful separation of concerns. We propose to consider separately the properties of = and ≃ in models of higher identity types. In this paper, we focus on the former. We provide SEq, an equational axiomatization of strict equality (=) consisting of eleven equational axioms and explore its consequences. The axiomatization consists of various well-known laws involving the globular maps src and tgt, the identity map id, and compositions ∘mn, including the globular laws and exchange. Thus our strict equational theory is quite different from computads [13, 20], which are assumed to satisfy associativity and identity laws for composition, and from strong ω-categories [22], in which additionally id is a congruence. Futia [13] takes a step in this direction and considers the two equational theories separately, but his axiomatization of the strict theory does not mention the equation id α=idα∘n−1nidα and treats the exchange law as a property of ≃. The separation of the two layers also has a semantic counterpart: Swan [23] shows that path types and identity types can be separated in presheaf models of univalent type theory.
Our main results are that SEq is sound and complete for the strict equational theory of all homotopy models. More strongly, we show that it is sound for a (very wide) class of presheaf models over a certain cubical base category and complete for a (very narrow) class of topological models, namely the finite CW-complexes. We also show that the equational theory admits an exponential-time decision procedure.
That the laws of SEq hold on the nose is a consequence of how composition is obtained. Cubical algebra has carried composition as primitive structure since [1,11], where each ∘mn is part of the data. The presheaf models of cubical type theory do not. They differ in what the interval object of the base category carries, a de Morgan algebra in [12] and merely Cartesian structure in [2], but in all of them composition of cells is absent from the base category: each type must instead be equipped with Kan composition structure of its own. Thus, composition is not primitive and does not respect globularity. We here recover it as structure on the base category itself (§5). Concretely, we propose a primitive composition mechanism in the form of a certain pushout on the base category of cubes. One can then define compositions natively without recourse to space-filling and in a way that respects the structure of higher identity types.
The construction provides a direct, constructive account of the weak laws. In standard presheaf models of cubical type theory, higher-dimensional witnesses are obtained through Kan filling, whereas we construct them from morphisms of the cubical base category. In particular, witnesses for associativity and identity laws arise from the same pushout structure defining composition, and coherence conditions such as the pentagon identity can be verified equationally. This complements our decidability result for strict equality: equality of terms in our equational theory can be decided algorithmically, while associativity and the identity laws are given explicit witnesses.
Main contributions:
an equational presentation of the strict equational theory of higher identity types, including a construction of free models and their properties ( §3);
• completeness for homotopy models ( §4);
• completeness for finite CW-complexes ( §4.4);
• an exponential-time decision procedure for strict equality ( §4.5);
• a formulation of presheaf models with native composition and soundness over these models ( §5);
a calculus for the morphisms of □, in which witnesses for associativity and the identity laws are constructed directly ( §6, §B, and §C).
a homeomorphism between higher identity types as iterated path spaces and as cubical sets ( §2 and §D).
2 Homotopy Models
Our motivating semantic models are the homotopy models of higher identity types [4] as they arise in topological models of HoTT and cubical type theory. There are two equivalent views of these models, one as an iterated hierarchy of spaces of continuous paths generated inductively in a uniform way, the other as a class of homotopies α:In→X satisfying a certain boundary-preservation condition, where I is the closed real unit interval and X is an arbitrary topological space. The two views are homeomorphic. Passing from the first to the second is currying: a path between paths is a map I→(I→X), which uncurries to a map I2→X, and iterating gives In→X. This is a homeomorphism and not merely a bijection because I is compact Hausdorff, so that (−)×I is left adjoint to (−)I in the compact-open topology. Under the correspondence, the endpoint conditions at each level, p(0)=a and p(1)=b, become the boundary-preservation condition on In→X. Further details are in §D.
In the first view, one has an inductively constructed hierarchy of spaces
• Level 0: a:X
• Level 1: p:IdX(a,b), where a,b:X
• Level 2: α:IdIdX(a,b)(p,q), where p,q:IdX(a,b)
• Level 3: ϕ:IdIdX(a,b)(p,q)(α,β), where α,β:IdIdX(a,b)(p,q),
etc., where the space of continuous functions I→X is endowed with the compact-open topology relative to X and IdX(a,b) denotes the subspace of all paths p:I→X such that p(0)=a and p(1)=b.
In the second view, we have a family of n-cells for each n≥0, which are continuous maps α:In→X satisfying a certain boundary preservation condition. These will be models of the axioms to be presented later in §3.2.
An n-dimensional homotopy is a continuous map α:In→X. Not all homotopies are n-cells, but only those satisfying the boundary-preservation condition. We define dimα=n. The set of n-dimensional homotopies is denoted Hn.
Given an n-dimensional homotopy α:In→X and 1≤k≤n, let α(k) be α curried on its k-th component:
We always think of the first component as time and often write t for x1, so
α(1)(t)(x2,…,xn)=α(t,x2,…,xn).
For α∈Hn, x∈I, and 1≤k≤n, α(k)(x) is called a section of α. A face of α is a section α(k)(b) with b∈{0,1}. Two special faces are srcα=α(1)(0) and tgtα=α(1)(1), called the source and target of α, respectively. We thus view α as a continuous deformation of srcα to tgtα, passing through intermediate states α(1)(t):In−1→X. For n≥2, the maps α(2)(0) and α(2)(1) describe the trajectory of srcsrcα and tgtsrcα throughout the deformation.
Lower-dimensional sections and faces can be defined inductively. For 1≤i1<i2<⋯<ik≤n and α∈Hn, let α(i1,…,ik):Ik→In−k→X be α curried on components i1,…,ik: α(i1,…,ik)(x1,…,xk)=α(ik)(xk)(i1,…,ik−1)(x1,…,xk−1). The function α(i1,…,ik)(x1,…,xk):In−k→X is an n−k-dimensional section and represents α partially evaluated at values x1,…,xk for the variables at positions i1,…,ik, respectively. For example, α(1,3)(a,b)(x,y,z)=α(a,x,b,y,z). An α∈Hn is completely determined by its sections α(i1,…,ik)(x1,…,xk) for any fixed selection of indices 1≤i1<⋯<ik≤n. One can define α by specifying these sections and verifying that the corresponding uncurried version is continuous. An essential tool in this regard is Lemma D.1.
Regarding notation: When using prefix and postfix unary operators together, the postfix takes precedence. For example, srcα(1)(t) should be read as src(α(1)(t)). To obtain (srcα)(1)(t), parentheses must be used. As before, binary operators have least precedence; thus srcα∘kntgtα should be read as (srcα)∘kn(tgtα).
2.1 Identities and Composition
If α∈Hn, define idα by (idα)(1)(t)=α; that is, (idα)(1) is the constant function λt.α. Then idα∈Hn+1, as it is the composition of α:In→X with the continuous projection λt,xˉ.xˉ:In+1→In. An identity is any homotopy of the form idα; that is, β is an identity iff the value of β(1)(t) is independent of t. Note that β is an identity iff β=idsrcβ, and also iff β=idtgtβ.
If α,β∈Hn, 1≤k≤n, and α(k)(1)=β(k)(0), we can compose them along their k-th (n−1)-dimensional faces:
There is no discontinuity at x=1/2, because α(k)(1)=β(k)(0). For k=1 this is the familiar concatenation, defined whenever tgtα=srcβ.
Routine expansion of these definitions shows that src and tgt are left inverses of id (see (A.1)), that the source and target of a composite are determined by those of its arguments (see (A.2), (A.4) and (A.5)), and that id distributes over composition (see (A.6)). The calculations are carried out in §A.
Viewing α∈Hn for n≥1 as a deformation from srcα to tgtα, there is an α−∈Hn giving a deformation in the reverse direction, namely (α−)(1)(t)=α(1)(1−t). This is an involution in the sense that (α−)−=α.
2.2 Cells
As mentioned, a cell is a homotopy satisfying a certain boundary-preservation condition. All 0- and 1-dimensional homotopies are cells by definition. For n≥2, an n-cell is an α∈Hn such that (a) for all t∈I, α(1)(t) is (inductively) an (n−1)-cell, and (b) for b∈{0,1}, α(2)(b) is an identity. Condition (b) says that α(2)(b)(1)(t) is independent of t, equivalently α(2)(b)=idsrcα(2)(b); for b=0 it is equivalent to α(2)(0)=idsrc2α, since srcα(2)(0)=α(1)(0)(2)(0)=α(1)(0)(1)(0)=src2α.
One thinks of a cell as an open set whose boundary comprises lower-dimensional cells. Fig. 1 illustrates a cell α:I3→X of dimension three.
In the rectilinear diagram, each point of I3 maps to a point of X, and the source and target of α are the front and back faces. Along the left face every vertical line has the same image as src2α, so that two-dimensional face represents a one-dimensional line in X; likewise α is constant on the top face, which therefore represents a single point. The map α:I3→X thus factors through the spherical diagram beside it. The rectilinear representation comes from cubical type theory and it is more convenient for formalizing compositions and is in general more amenable to constructions. Further properties of these models, including the soundness of the axioms of §3.2, are developed in §A.
3 Equational Presentation
This section provides an equational presentation that delineates a wide class of algebraic models, among them the homotopy models of §2. In §4 we show that the axioms are complete for those models.
Figure 1: A 3-cell α:I3→X in cubical and globular representations.
3.1 Syntax
Let (X,dim) be a stratified set with dim:X→N. The value dimx is the dimension of x. A term over atomic symbols X, unary operators src, tgt, id, and binary operators ∘mn for 0≤m<n is well-formed (and has a dimension) if these facts can be inferred from the following rules:
• every x∈X is well-formed, and its dimension is dimx
• if t is well-formed and has dimension dim t, then id t is well-formed and dim id t = dim t + 1
• if t is well-formed and dimt≥1, then srct and tgtt are well-formed and dimsrct=dimtgtt=dimt−1
if u and v are well-formed and dimu=dimv=n≥1, and if 0≤m≤n−1, then u∘mnv is well-formed and dim(u∘mnv)=n.
Let T denote the set of well-formed terms, let Xn={x∈X∣dimx=n}, and let Tn denote the set of well-formed terms over ⋃m≤nXm. Not all well-formed terms are meaningful; see §3.3 below.
3.2 Axioms for Equality
In addition to the usual axioms for equality and congruence with respect to the operations id, src, tgt, and ∘mn, we have the axioms of Fig. 2. We write SEq for the resulting equational theory. Axiom (xi) is called the exchange rule and axioms (viii) and (ix) are called the globular rules.
3.3 Algebraic Semantics
Because we have postulated an equational system, there is a ready-made algebraic semantics available from equational logic and universal algebra [14] that can be stated without reference to topological models or higher categories.
As mentioned, not all well-formed terms are meaningful in all models. Let E be a dimension-respecting equational theory containing SEq. A well-formed term is meaningful (under E) if that fact can be deduced from the following rules:
A well-formed term u∘mnv is meaningful iff u and v are meaningful and E⊢srcn−mu=tgtn−mv, where n=dimu=dimv=dimu∘mnv. For m=n−1, this says E⊢srcu=tgtv.
• Well-formed terms src u, tgt u, and id u are meaningful if u is.
• Any x∈X is meaningful.
Given X and an equational theory E over X, there is a quotient algebra T(X)/E consisting of the set of meaningful terms over X modulo the equations E. This is a model of the axioms and of E, and is the free such model.
If X⊆X′ and E⊆E′, then there is a canonical homomorphism T(X)/E→T(X′)/E′ extending the inclusion map X↪X′. However, because there may be terms over X that are meaningful under E′ but not under E, it does not necessarily have an epi-mono factorization, as the image of T(X)/E in T(X′)/E′ may not be closed under the composition operations.
These models are called globular models because of the maps src and tgt on E-congruence classes, which go from dimension n to dimension n-1 and satisfy the globular rules (viii) and (ix). The underlying globular set is the set of E-congruence classes along with these maps.
3.4 Free Globular Models
The free globular models are formed from a sequence of equational theories En defined with respect to a given pair of globular maps s,t:X→T satisfying certain properties listed below. In addition to the axioms listed in Fig. 2 of §3.2, we take the additional equations
(xii) srcx=s(x),dimx≥1
(xiii) tgtx=t(x),dimx≥1.
These are not really additional axioms, but just a way to link src and tgt to the globular maps s,t in the model specification when interpreting over a particular model. The theory Est is the equational theory on T generated by (i)-(xiii), and Enst is the equational theory on Tn generated by instances of (i)-(xiii) restricted to Tn. We require that the globular functions s,t satisfy the following properties: For x∈Xn,
• s(x),t(x)∈Tn−1
• dims(x)=dimt(x)=n−1
• Enst⊢srct(x)=srcs(x) and Enst⊢tgts(x)=tgtt(x).
We are interested in the sequence of models Tn/Enst and their colimit T(X)/Est.
It will follow from Corollary 3.6 below that the substructure of T(X)/Est generated by Tn is already determined at stage n; that is, the canonical maps Tn/Enst→T(X)/Est and Tn/Enst→Tn+1/En+1st are injective. This says that Tn+1/En+1st is a conservative extension of Tn/Enst. This result is analogous to [20, §4.(2), p. 35] for computads, but we emphasize that these are not computads, nor are they weak or strong ω-categories.
3.5 Properties of Free Globular Models
The following lemma says that the models Tn/Enst are n-skeletal [13].
Lemma 3.1. Every term in Tn of dimension k≥n is Enst-equivalent to a term of the form idk−na, where a∈Tn and dima=n.
Proof. By induction on term structure. Let t∈Tn, dimt=k≥n. If t∈Xn or k=n, or if k=n+1 and t=ida, there is nothing to prove. For t of the form idb and k≥n+2, by the induction hypothesis, Enst⊢b=idk−1−na for some a∈Tn and dima=n, so Enst⊢t=idk−na.
For t of the form srcb, by the induction hypothesis, Enst⊢b=idk−n+1a for some a∈Tn and dima=n, so Enst⊢t=srcidk−n+1a=idk−na. The case of tgt is similar.
Finally, for t of the form u∘mv, by the induction hypothesis, Enst⊢u=idk−na and Enst⊢v=idk−nb for some a,b∈Tn and dima=dimb=n. If m<n, then Enst⊢u∘mv=idk−na∘midk−nb=idk−n(a∘mb) by (v), and dim(a∘mb)=n. Otherwise n≤m≤k−1. Since idk−na∘midk−nb is meaningful, Enst⊢srck−midk−na=srck−midk−nb, therefore Enst⊢idm−na=idm−nb, and applying srcm−n gives Enst⊢a=b. It follows that
Read left to right, axioms (i)–(ix) of Fig. 2 together with (xii) and (xiii) of §3.4 form a rewrite system. The rules push src, tgt and id down, collapse src id and tgt id, change src tgt to src src and tgt src to tgt tgt, and replace src x and tgt x with s(x) and t(x). Axioms (x) and (xi) are left out since they are not orientable in a way that preserves confluence. However, they play a special role that will emerge from the following development.
Lemma 3.2. The rewrite system above is strongly normalizing.
Proof. The system without (xii) or (xiii) is clearly strongly normalizing because src, tgt, and id move down and the ∘k move up, and only finitely many applications of the globular rules can occur before something else has to happen. Rules (xii) and (xiii) only introduce variables of lower dimension than the variable x that was eliminated, and no other rule introduces new variables. Thus the whole system is strongly normalizing.
Lemma 3.3. Adding new elements at stages above n does not create any new elements of dimension n or less. That is, if t∈T and dimt≤n, then there exists t′∈Tn such that Est⊢t=t′.
Proof. Let t′ be an irreducible form of t∈T obtained by applying the above rewrite rules. There are no occurrences of src or tgt in t′, as they all disappeared via (vi)-(vii) or (xii)-(xiii), so dimension does not increase along any path from the root to a leaf. Thus if dimt=dimt′≤n, then all atomic symbols in t′ are of dimension at most n, so t′∈Tn, and Est⊢t=t′ since all the rewrite rules are axioms.
Lemma 3.4. On terms in Tn, the rewrite system consisting of rules (i)-(ix) above is confluent. If the rules (xii), (xiii) are included, the system is confluent modulo En−1st.
Proof. To show confluence, we must show how to resolve conflicts due to overlapping redexes. The only overlapping redexes are between
• rule (v) and rules (vi), (vii),
• rule (viii) and rules (ii), (iv), (vii), (ix), and (xiii),
• rule (ix) and rules (i), (iii), (vi), (viii), and (xii).
Up to symmetry, all but one of these cases have an immediate common reduct.
All other cases not involving (xii) and (xiii) are symmetric versions of those above. This establishes the first statement of the lemma.
For the second statement, in the case of a conflict between (viii) and (xiii), we do not have an immediate common reduct, but we use the assumption on the globular functions s and t.
Since dimx≤n, we have by assumption En−1st⊢srcs(x)=srct(x).
The case of a conflict between (ix) and (xii) is symmetric.
Two terms are picture-equivalent if they are provably equivalent using axioms (v), (x), and (xi) only.
Theorem 3.5. Let u,v∈Tn.
(a) All irreducible forms of u are picture-equivalent.
(b) If Enst⊢u=v, then for any u′,v′ irreducible forms of u,v respectively, u′ and v′ are picture-equivalent.
Proof. We prove (a) and (b) by mutual induction on n.
(a) For n = 0, when reducing u to an irreducible form, the reduction rules (xii) and (xiii) never apply. By Lemma 3.4, the rewrite system without these rules is confluent, therefore irreducible forms are unique. Thus (a) holds trivially in this case.
For n > 0, by Lemma 3.2 and König's lemma, there is a uniform bound on the length of derivations starting from any term (which may depend on s and t). This allows proofs by induction on derivation length, which we will use here.
Consider two reduction sequences from u starting with u→u1 and u→u2, respectively. If u→u1 and u→u2 are instances of any pair of overlapping redexes except (viii), (xiii) or (ix), (xii), or if the redexes do not overlap, then by Lemma 3.4 there is a term u′ such that u1→u′ and u2→u′. By the induction hypothesis on derivation length, all irreducible forms of u1 are picture-equivalent, all irreducible forms of u2 are picture-equivalent, and there is a nonempty intersection containing an irreducible form of u′, thus all irreducible forms of u starting from u→u1 or u→u2 are picture-equivalent.
If the first steps of a pair of reductions from u involve (viii) and (xiii), say u=e(src tgt x) and e(src tgt x)→e(src src x) and e(src tgt x)→e(src t(x)), let z be a fresh variable of dimension dimx−2. Any irreducible form of e(z) is of the form e′(Pz), where P is an operator of the form idisrcj or iditgtj and e′(Pz) contains no occurrences of src or tgt outside Pz. Since u∈Tn, e′(Psrc s(x)) and e′(Psrc t(x)) are also in Tn. Let u1 and u2 be irreducible forms of Psrc s(x) and Psrc t(x), respectively. Then e′(u1) and e′(u2) are irreducible and
We have En−1st⊢srcs(x)=srct(x) by an assumption on s and t, therefore En−1st⊢Psrcs(x)=Psrct(x). By the induction hypothesis on n, u1 and u2 are picture-equivalent, therefore so are e′(u1) and e′(u2). By the induction hypothesis on derivation length, all irreducible forms of e(srcsrcx), including e′(u1), are picture-equivalent, and all irreducible forms of e(srct(x)), including e′(u2), are picture-equivalent, therefore all irreducible forms of u starting with (viii) and (xiii) are picture-equivalent.
The argument for conflicting reduction steps (ix) and (xii) is symmetric.
(b) By (a), it suffices to show that for any e(u),e(v)∈Tn where u=v is an axiom of Enst, there exist irreducible forms u′,v′ of e(u),e(v), respectively, such that u′ and v′ are picture-equivalent. This is trivial if u=v is one of (i)-(ix) and (xii)-(xiii), as these are reduction rules themselves, so u and v have a common irreducible form and there is nothing to do. Thus we need only consider the picture axioms (x) and (xi).
(x) id u∘k id u=idu, k=dimu
(xi) (u∘nv)∘m(x∘ny)=(u∘mx)∘n(v∘my),m=n
For the case of (x), say we have (x)-equivalent terms e(idu∘kidu) and e(idu). Let z be a fresh variable of dimension dimu. Apply the reduction rules in tandem to e(idz∘kidz) and e(idz) to obtain irreducible forms. Depending on the number and arrangement of occurrences of src, tgt, and id at ancestors of the critical subterms, after this step we will have either
e′(idmz) and e′(idmz) for some m≥0, if there was a reduction step using (iii) or (iv) applied to the left-hand side, for example (iii) with redex src(idz∘kidz) on the left and srcidz on the right,
e′(v) and e′(v) with no occurrence of z, if there was a reduction step using (iii) or (iv) that eliminated the critical subterms altogether, for example (iii) with redex src((idz∘kidz)∘kv) on the left and src(idz∘kv) on the right, or
e′(idmz∘kidmz) and e′(idmz) for some m≥1, if neither of the above events occurred.
Note that the operator idm that appears in the first and third cases cannot be idisrcj or iditgtj with j≥1 as in case (a), because (iii) or (iv) would have applied.
In the first two cases, we have a common irreducible form, so there is nothing to do. In the last case, let u′ be an irreducible form of u and let u′′ be an irreducible form of idmu′. Then u′′ is an irreducible form of idmu as well, and e′(u′′∘ku′′) and e′(u′′) are irreducible forms of the original terms e(idu∘kidu) and
e(idu), respectively. Note that since u′ is irreducible, u′′ is obtained from idmu′ simply by applying axiom (v) in the left-to-right direction, thus idmu′ and u′′ are equivalent modulo (v). Moreover,
so u′′∘ku′′ and u′′ are picture-equivalent, therefore so are e′(u′′∘ku′′) and e′(u′′).
For the case of (xi), suppose we have (xi)-equivalent terms
e((u∘kv)∘m(x∘ky))e((u∘mx)∘k(v∘my))(3.1)
We will show that they have (xi)-equivalent irreducible forms. Let zu,zv,zx,zy be fresh variables of the same dimension as u,v,x,y. Apply the reduction rules in tandem to
to obtain irreducible forms. By an analysis similar to the previous case, depending on the number and arrangement of occurrences of src, tgt, and id at ancestors of the critical subterms, after this step we will have either
• e′(v) and e′(v),
• e′(Pzu∘kPzv) and e′(Pzu∘kPzv),
• e′(Pzx∘kPzy) and e′(Pzx∘kPzy),
• e′(Pzu∘mPzx) and e′(Pzu∘mPzx),
• e′(Pzv∘mPzy) and e′(Pzv∘mPzy), or
• e′((Pzu∘kPzv)∘m(Pzx∘kPzy)) and e′((Pzu∘mPzx)∘k(Pzv∘mPzy)),
where P is an operator of the form idisrcj or iditgtj for some i,j≥0. In all but the last case, we have common irreducible forms, so there is nothing to do. In the last case, let u′,v′,x′,y′ be irreducible forms of P u, P v, P x, P y, respectively. Then the original terms (3.1) have irreducible forms
Corollary 3.6. Adding new elements at higher stages does not create any new equations among elements of dimension n or less. That is, if u,v∈T, dimu=dimv≤n, and Est⊢u=v, then Enst⊢u′=v′, where u′ and v′ are irreducible forms of u and v, respectively.
Proof. Suppose u,v∈T, dimu=dimv≤n, and Est⊢u=v. Let u′ and v′ be irreducible forms of u and v, respectively. Since dimu′=dimu=dimv=dimv′≤n, and since u′ and v′ contain no occurrences of src or tgt, dimension cannot increase on any path from a root to a leaf in u′ or v′, thus all subterms of u′ and v′ are of dimension at most n and u′,v′∈Tn. By Theorem 3.5, u′ and v′ are picture equivalent, therefore provably equivalent in Enst.
4 Completeness and Decidability
In this section we prove that SEq is complete for the strict equational theory of the homotopy models of §2, and that the theory is decidable. Both rest on a single construction: an interpretation Pic that reads a term as a cell over an ambient space with no topological structure at all. We show that Pic is a complete invariant, that it is determined by finite data, and that the completeness is not an artifact of the trivial topology, since the same separation is realized in a finite CW-complex, as shown in §4.4.
4.1 Pictures
Fix a free globular model T/Est relative to a given pair of globular maps s,t. A picture is one of a certain class of n-cells over the ambient space X consisting of the elements of the stratified set (X,dim) with the trivial indiscrete topology whose only open sets are the empty set and X. This is a little bizarre, as the topology has no separation whatsoever. However, the definition of homotopy models does not place any restrictions at all on the topology of the ambient space. For this X, all functions In→X are continuous, thus the only interesting structure we care about is boundary preservation.
We define an interpretation Pic that interprets each term t of dimension n as a picture Pic(t):In→X. A picture is then a cell of the form Pic(t) for some t.
The three conditions are mutually exclusive and exhaustive, so Pic(a) is uniquely defined on all elements of In. Once Pic is defined on elements of X, we can extend homomorphically to all terms, as SEq is sound in homotopy models.
A 2-dimensional picture I2→X is illustrated in Fig. 3. In that picture, every point of the interior of each unshaded small rectangle is labeled with the same letter a∈X2. A small rectangle hatched with vertical lines is an identity that duplicates its source and target, which are its northern and southern borders, respectively. Every doubly hatched rectangle is a double identity id2c, where c∈X0. Horizontal lines are labeled with elements of X1∪X0 and are one-dimensional pictures, defined inductively in the same fashion. Vertical lines are labeled with element of X0 and are identities. Note that if we assume the sides of the outer rectangle are of unit length, then all interior lines occur at fractional powers of 2, aka dyadic rationals; thus the picture is uniquely determined by its points at regularly spaced dyadic rationals of sufficient density. For this reason, a picture conveys only a finite amount of information and can be represented by a finite array.
Figure 3: A picture of dimension 2
Lemma 4.1. For all terms t, Pic(t) is a cell.
Proof. All operations map cells to cells, so it suffices to show that Pic(a) is a cell for a∈Xn. By Lemma A.1, a homotopy α:In→X is a cell iff whenever 1≤j≤n and xj∈{0,1}, α(x1,…,xn) is independent of x1,…,xj−1. This is true of Pic(a) for a∈Xn: if j is maximum such that xj∈{0,1}, then
If j=1, there is nothing to prove. If j≥2, then by the induction hypothesis on dimension, Pic(a)(x1,…,xn) is independent of x2,…,xj−1, and since x1 does not appear on the right-hand side in this case, it is independent of x1 also.
It follows from this construction that two provably equivalent terms have the same picture. In the next section we show that a term can be uniquely recovered up to Enst-equivalence from its picture.
4.2 Finite Representation
Although pictures are maps In→X, they only contain a finite amount of information. We would like to have a finite representation for algorithmic purposes. In this section we develop such a representation.
For terms t with dimt=n and 0≤m≤n−1, let hm(t) be a function giving the maximum depth of nesting of compositions ∘m in t. We define hm(t) formally by induction on dimension and term structure for terms that are irreducible with respect to the reduction rules of §3.5.
For a∈X0 and k≥0, let hm(idka)=1. For a∈Xn with n≥1, let hm(idka)=maxhm(srca), hm(tgta). For compositions u∘kv, let
The conditions defining the three cases are equivalent for ri and gki(ri); that is, 0<ri<1 iff 0<gki(ri)<1, rj=0 iff gkj(rj)=0, and rj=1 iff gkj(rj)=1. Thus the corresponding cases in the two definitions are either both true or both false. For the first case, the two definitions are the same. For the second and third cases, we have ki≥hn−i(a)≥maxhn−i(srca),hn−i(tgta) for all i by Lemma 4.2, therefore
by the induction hypothesis. As all three cases coincide, Pic(a)(r1,…,rn)=Pic(a)(gk1(r1),…,gkn(rn)). For terms of the form idt, if km≥hn−m(idt) for 1≤m≤n, then
Finally, for compositions u∘n−mv, where n=dimu=dimv and 1≤m≤n, we have ki≥hn−i(u∘n−mv)=maxhn−i(u),hn−i(v) for i=m and km≥hn−m(u∘n−mv)=1+maxhn−m(u),hn−m(v), thus km−1≥maxhn−m(u),hn−m(v). Using the induction hypothesis and Lemma 4.4 at index m,
We have shown that every pair of terms that are Est-equivalent have the same picture, which is a particular homotopy model with trivial topological structure. Now we show the converse. This says that the Pic interpretation is isomorphic to the free model with given globular functions s and t. It also establishes that SEq (augmented by (xii) and (xiii) for each particular model) is complete for the equational theory of homotopy models, although one might wish to show completeness over a more conventional class of topological models such as compact Hausdorff spaces or CW-complexes [15]. We address the latter question in §4.4.
Lemma 4.6. Let Pic(t):In→X be a picture and let 1≤m≤n. If Pic(t)=α∘n−mβ and the interface Pic(t)(m)(1/2)=idm−1srcmα=idm−1tgtmβ is a picture, then α and β are pictures.
Proof. Assume that t is irreducible. The proof is by induction on term structure and on dimension.
The term t cannot be a symbol a∈Xn, because Pic(a)(1/2,…,1/2)=a, whereas the hyperplane Pic(t)(m)(1/2), which contains that point, is assumed to be a picture of dimension n−1, thus cannot contain any element of Xn.
If t=idu and m=1, then Pic(t)=idPic(u)=idPic(u)∘n−1idPic(u)=Pic(t)∘n−1Pic(t), so α=β=Pic(t).
If t=idu and m>1, then Pic(t)=idPic(u), where u=srct=tgtt. The picture Pic(u)=srcPic(t) is represented by the bottom horizontal line in (4.1).
Pic(t)=axis1βαaxism(4.1)
As Pic(t)=idsrcPic(t), this is also true of any fiber over Pic(u), including α and β and their interface Pic(t)(m)(1/2); thus α=idsrcα and β=idsrcβ. But since the interface Pic(t)(m)(1/2) is a picture, its source src(Pic(t)(m)(1/2))=Pic(t)(1,m)(0,1/2) is also a picture. This is represented by the midpoint of the bottom horizontal line in (4.1). It is the interface of srcβ and srcα, which compose under ∘n−m to give the picture srcPic(t). By the induction hypothesis on dimension, srcα and srcβ are pictures. Since α=idsrcα and β=idsrcβ, α and β are pictures.
If t=u∘n−kv and k=m, then Pic(t)=Pic(u)∘n−mPic(v), so α=Pic(u) and β=Pic(v).
Finally, if t=u∘n−kv where k=m, decompose Pic(t) into four quadrants γij:In→X for i,j∈{0,1} as follows:
The term w=idk−1srcku must be Est-equivalent to idk−1tgtkv for u∘n−kv to be meaningful. Then the interface between Pic(u) and Pic(v) is Pic(t)(k)(1/2)=idk−1srckPic(u)=idk−1tgtkPic(v), and this is a picture, namely Pic(w). The interface between α and β, namely Pic(t)(m)(1/2)=idm−1srcmα=idm−1tgtmβ, is also a picture Pic(z) by assumption.
It is not hard to see that for 1≤i≤j, (idjα)(i)(x)=idj−1α. Briefly,
Using this fact, we can show that Pic(t)(m,k)(1/2,1/2) is a picture. This is represented by the point at the intersection of the central vertical and horizontal lines in (4.2). If 1≤m<k, then
In either case, Pic(t)(m,k)(1/2,1/2) is a picture of dimension n−2. This is the interface between the (n−1)-cells forming the interfaces between adjacent γij. By the induction hypothesis on dimension, the interface between γ00 and γ01 and the interface between γ10 and γ11 are pictures. Likewise, the interface between γ00 and γ10 and the interface between γ01 and γ11 are pictures. By the induction hypothesis on term structure, γ00,γ01,γ10, and γ11 are pictures. Thus α=γ11∘n−kγ10 and β=γ01∘n−kγ00 are pictures.
Note that in this case, t can be represented as a composition in two ways (4.3) and (4.4), and they are provably equivalent by exchange.
Theorem 4.7 (Completeness over homotopy models). Est⊢t1=t2 if and only if t1 and t2 represent the same cell in all homotopy models with globular maps s,t.
Proof. We have shown that SEq is sound over homotopy models, so Est⊢t1=t2 implies t1 and t2 represent the same cell in all interpretations in homotopy models. For the converse, we show that Pic(t1)=Pic(t2) implies Est⊢t1=t2. Suppose Pic(t1)=Pic(t2) for t1 and t2 in irreducible form. Let dimt1=dimt2=n and pick the parameters k1,…,kn of the representation of Theorem 4.5 sufficiently large to accommodate both terms.
The proof proceeds by induction on term structure and on dimension. Assume that the theorem holds for dimensions less than n and subterms of t1 and t2.
If t=a for a∈Xn, then Pic(t1)(1/2,…,1/2)=a. In that case t2=a as well, because Pic(u∘mv) or Pic(idu) for any composition or identity would have an element of Xm for some m<n at that position.
If t1=idu1 and t2=idu2, then Pic(t1)=idPic(u1) and Pic(t2)=idPic(u2), thus Pic(u1)=Pic(u2). By the induction hypothesis on dimension, Est⊢u1=u2, therefore Est⊢idu1=idu2.
If t1=idw and t2=u∘n−mv, then Est⊢idw∘n−1idw, so this case reverts to the next case t1=u1∘n−kv1 and t2=u2∘n−mv2.
If t1=u1∘n−kv1 and t2=u2∘n−mv2 and k=m, then Pic(u1)=Pic(u2) and Pic(v1)=Pic(v2). By the induction hypothesis on term structure, Est⊢u1=u2 and Est⊢v1=v2, therefore Est⊢u1∘n−mv1=u2∘n−mv2.
If t1=u1∘n−mv1 and t2=u2∘n−kv2 and k=m, then as in (4.2), Pic(t1)=Pic(t2) can be decomposed into quadrants γij,i,j∈{0,1}, with
and by the same argument as in Lemma 4.6, these are pictures. By (4.3) and (4.4), t1 and t2 are provably equivalent by exchange.
4.4 Completeness over Finite CW-Complexes
As mentioned, the reader might be somewhat skeptical of the significance of the completeness result of §4.3, as the homotopy model constructed in §4.1 and used in that proof has a trivial topological structure. One might wish for a stronger result showing completeness over a more conventional class of topological models such as compact Hausdorff spaces or CW-complexes. We show that both are true. This is mainly due to the fact that the picture model is a retract of a CW-complex. The complex is obtained by gluing in one closed cube per generator, dimension by dimension, with the attaching maps prescribed by sources and targets. Collapsing each cube back to its generator sends the interpretation of a term in the complex to its picture, so two terms with different pictures are already distinguished there. A finite subcomplex suffices, and finite CW-complexes are compact Hausdorff, so the claim holds for that class too. The construction is given in full in the proof of Theorem 4.8.
Theorem 4.8 (Completeness over finite CW-complexes). Est⊢t1=t2 if t1=t2 in all finite CW-complexes with globular maps s,t.
Proof. Let F be the free model generated by (X,dim,s,t). We will construct a CW-complex H that will serve as the ambient space and simultaneously a map C defined on F-meaningful terms such that if dimt=n, then C(t):In→H is a cell. The construction is by induction on dimension. The 0-skeleton H0 of H is just the discrete space X0, and C(a)=a for a∈H0.
Assume that the (n−1)-skeleton Hn−1 of H and C(t):Im→Hn−1 have been constructed for all t∈Tn−1 of dimension m. For each a∈Xn, let Ua be a fresh copy of the closed unit hypercube In. Define C(a):In→Hn−1⊎⊎a∈XnUa as follows.
The latter two cases are defined on the boundary of In and take values in Hn−1, thus when applied to the boundary of Ua specify attaching maps.
Now let Hn=(Hn−1⊎⊎a∈XnUa)/∼, where ∼ is the equivalence relation determined by the attaching maps. Modulo ∼, C(a) has type In→Hn. We claim that with this type, C(a) is a cell. To show this, we use Lemma A.1. We must show that if some xj∈{0,1}, then C(a)(x1,…,xn) is independent of x1,…,xj−1. Let j be the largest index such that xj∈{0,1}. If j=1, there is nothing to prove. Otherwise, if xj=0, by the second clause in the definition, C(a)(x1,…,xn)=C(s(a))(x2,…,xn). By the induction hypothesis on dimension, C(s(a))(x2,…,xn) is independent of x2,…,xj−1, and the definition does not involve x1, so C(a)(x1,…,xn) is independent of x1 as well. A similar argument holds if xj=1 using the third clause in the definition.
Having constructed the n-skeleton Hn and the n-cells C(a) for a∈Xn, we can now extend C to give a cell Im→Hn to each term t∈Tn of dimension m by applying the cell operations inductively; that is,
These operations map cells to cells, so each C(t):Im→Hn is a cell, where t∈Tn with dimt=m.
Now we construct another map h:H→X as follows: for each a∈H0=X0, let h(a)=a. For a∈Xn with n≥1, let h(x)=a for all x in the interior of Ua, that is, for x=(x1,…,xn) where 0<xi<1 for all 1≤i≤n. The value of h(x) for x on the boundary of a will be some b∈X of lower dimension as determined by the attaching maps.
We claim that Pic(t)=h∘C(t) for all t∈T. Thus for t of dimension n,
For a∈H0=X0, we have Pic(a)=a=h(a)=h(C(a)). For a∈Xn with n≥1, if if 0<xi<1 for all 1≤i≤n, we have Pic(a)(x1,…,xn)=a=h(C(a)(x1,…,xn)), as C(a)(x1,…,xn) is in the interior of Ua. If xj=0 and 0<xi<1 for j+1≤i≤n, then by the induction hypothesis on dimension,
Since SEq is sound over homotopy models, Est⊢t1=t2 implies C(t1)=C(t2). Conversely, if C(t1)=C(t2), then Pic(t1)=h(C(t1))=h(C(t2))=Pic(t2), and by Theorem 4.7, Est⊢t1=t2. Thus SEq is sound and complete over CW-complexes. Although H itself may be infinite, each interpretation lands in a finite subcomplex. Let X′ be the set of generators occurring in t1 or t2, closed under s and t; this set is finite, since s(a) and t(a) involve only generators of dimension strictly less than dima. Let K⊆H be the union of the closed cells Ua for a∈X′. Because X′ is closed under s and t, the attaching map of each such cube lands in cells of K, so K is a finite subcomplex of H. The image of C(ti) lies in K, and K carries the subspace topology, so corestriction gives a cell C(ti):In→K. Hence t1 and t2 are already distinguished in the finite CW-complex K.
4.5 Decision Procedure
The decision procedure falls out of the construction in §4. By Theorem 4.7, two terms are provably equal exactly when they have the same picture, so deciding the theory reduces to constructing two pictures and comparing them, and by §4.2 a picture is determined by its values on a regular dyadic grid, so each is a finite array. The grid resolution needed is governed by how deeply compositions nest, which gives the bound below. Two consequences are worth mentioning. First, the procedure decides more than equality: because a composite u∘mnv is meaningful exactly when Est⊢srcn−mu=tgtn−mv (§3.3), the same algorithm decides whether a term denotes a cell at all. Second, we have no matching lower bound, and the array representation is almost certainly wasteful, so the gap between this upper bound and the true complexity of the word problem is open.
Theorem 4.9. Equality of terms t1 and t2 is decidable in time O(2maxh(t1),h(t2)), where h(t)=∑m=0n−1hm(t) and hm(t) is the ∘m-height of t in irreducible form as defined in §4.2.
Proof. Given two terms of dimension n in irreducible form, by Theorem 4.7 it suffices to construct their pictures and check whether they are equal. A finite representation of each picture as described in Theorem 4.5 can be constructed inductively and requires a multidimensional array of size
2k1×⋯×2kn=2k1+⋯+kn,
where km=hn−m(t) is the ∘m-height of t as defined in §4.2.
5 Soundness over Presheaf Models
In presheaf models of cubical type theory [3,9,12], a cubical set is a functor □op→Set, where □ is a category capturing in an abstract way the properties of finite-dimensional hypercubes. There is some variation in the encodings found in the literature, but one typically sees constructions for face maps, degeneracies, and connections, the last being used in conjunction with Kan space-filling operations to synthesize paths to witness equalities.
The prototypical example of such a presheaf model, and the primary motivating example, are the homotopy models. These functors map the object □n to the set of continuous maps α:In→X, where I is the unit real interval and X is an arbitrary topological space.
In the traditional approach, compositions are normally defined using de Morgan connections in conjunction with Kan space-filling operations. However, the construction of compositions using de Morgan connections violates globularity. One would like a more symmetric construction that respects globularity. This is possible, as we show in this section. We introduce a variant in which compositions are internalized in the base category.
Like □, our base category □ is a strict monoidal category with objects [n] for n∈N, strict tensor product [m]⊗[n]=[m+n], monoidal unit [0] which is a terminal object, primitive face maps δ0,δ1:[0]→[1],δ0=δ1, and degeneracy map σ:[1]→[0].
Unlike □, □ will always have at least countably many other morphisms δt:[0]→[1] besides δ0 and δ1. One can view Hom([0],[1]) as a prototypical interval, linearly ordered with least element δ0 and greatest element δ1. As [0] is terminal, σ∘δt=1[0] for all δt:[0]→[1].
A morphism of the form δt∘σ:[1]→[1] is called a reflexor. These morphisms correspond to the reflexivity paths refl a of identity types in Martin-Löf type theory. There will be other morphisms [1]→[1] as well.
Let □1 be the induced subcategory of □ on objects [0] and [1]. We assume that all morphisms of □ are generated by morphisms of □1 under composition and tensor product.
Higher face and degeneracy maps are defined via the monoidal structure. Define the endofunctor
Thus for 0≤k≤m≤n, Hkn+1δs∘Hmnδt=Hm+1n+1δt∘Hknδs:[n]→[n+2]. Also, every Hmnσ is a split epi and every Hmnδt a split mono:
Hmnσ∘Hmnδt=Hmn(σ∘δt)=Hmn1[0]=1[n].
5.1 Boundary preservation
We wish to limit models to those satisfying the globular axioms, as appropriate for higher identity types. A presheaf F on □ is said to preserve boundaries if it satisfies the following
Boundary preservation condition: For all m≥0, all b∈{0,1}, and all s,t,
F(δs⊗δb⊗1[m])=F(δt⊗δb⊗1[m]).(5.2)
Theorem 5.2. If F preserves boundaries, then for all h:[k]→[m], s1,…,sn, t1,…,tn and b∈{0,1},
We will show that the globular axioms are a consequence.
5.2 Composition
Traditionally, composites are produced by Kan composition structure on each type, with the filling operation derived from it using a connection [12,21]. Connections are extra degeneracies in the sense of Brown and Higgins [10], and by themselves they do not produce composites.
Here we take an alternative approach, which internalizes composition in the structure of our base category. We postulate
Composition axioms:
The object [1] is a pushout of δ1:[0]→[1] and δ0:[0]→[1] completed by morphisms L:[1]→[1] and R:[1]→[1] with L∘δ1=R∘δ0.
• L∘δ0=δ0 and R∘δ1=δ1.
(5.3)
We assume that the image of (5.3) under Hmn is a pushout as well. This structure will enable us to define composition natively in presheaf models without connections or Kan filling.
Intuitively, we can view (5.3) as gluing two intervals end-to-end. Let us write δ1/2:[0]→[1] for the morphism L∘δ1=R∘δ0. Since 1[1]∘δ1=δ1=δ1∘σ∘δ0, by the universality property of pushouts, there is a unique map L′:[1]→[1] such that L′∘L=1[1] and L′∘R=δ1∘σ. Similarly, since 1[1]∘δ0=δ0=δ0∘σ∘δ1, there is a unique map R′:[1]→[1] such that R′∘R=1[1] and R′∘L=δ0∘σ.
(5.4)
It follows that L and R are split monos and L′ and R′ are split epis, and that L and R are jointly epic. This implies that δ1/2 cannot be δ0 or δ1, otherwise we would have δ0=δ1. In fact, one can show that Hom([0],[1]) must contain countably many distinct morphisms δt, one for each dyadic rational t∈{a2−n∣n≥0,0≤a≤2n}, obtained by inductively defining δt/2=L∘δt and δ(t+1)/2=R∘δt. This set comprises Hom([0],[1]) in the minimal base category.
Concretely, it is helpful to think of the object [1] as the unit real interval I, the unit rational interval I∩Q, or the set {a2−n∣n≥0,0≤a≤2n} itself, and L(t)=t/2 and R(t)=(t+1)/2, in which case
The pushout structure entails the existence of more elements of Hom([1],[1]) than just L,R,L′,R′. For each pair of maps U,V:[1]→[1] such that U∘δ1=V∘δ0, there exists a unique mediating morphism U⋄V:[1]→[1] such that U=(U⋄V)∘L and V=(U⋄V)∘R. Thus L′=1[1]⋄(δ1∘σ) and R′=(δ0∘σ)⋄1[1]. A characterization of □1 is given in Appendix B.
5.3 Soundness of the axioms
In this section we show that SEq is sound for presheaf models over our base category □ satisfying the boundary preservation condition (5.2). In particular, these structures are globular, therefore model higher identity types.
Let F:□op→Set be a pullback-preserving presheaf satisfying the boundary preservation condition (5.2). The canonical example is
F[n]={globularcontinuousmapsα:In→X}
as described in §2, where I=[0,1] is the real unit interval and X is an arbitrary topological space. The assumption of preservation of pullbacks is needed for the composition structure of §5.2 to carry over to Set.
Let Hmn be the functors defined in (5.1). Define polymorphic source and target maps for n≥1:
There are also partial composition operators ∘n−mn:F[n]×F[n]→F[n] for 1≤m≤n modeling the composition of n-cells along their m-th (n−1)-dimensional faces. We claim that if 1≤m≤n, α,β∈F[n], and srcmβ=tgtmα, then β∘n−mnα exists. Since the image of (5.3) under Hm−1n−1 is a pushout in □, and since F is assumed to preserve pullbacks, the image of that diagram under F is a pullback in Set, thus in one-to-one correspondence with
for α,β∈F[n] and k>1. For (i), let us first check that β∘n−knα is defined iff srcβ∘n−kn−1srcα is defined. The conditions are srckβ=tgtkα and srck−1(srcβ)=tgtk−1(tgtα), respectively, which are clearly equivalent. Now β∘n−knα is the unique γ∈F[n] such that
α=FHk−1n−1L(γ)β=FHk−1n−1R(γ),
and srcβ∘n−kn−1srcα is the unique γ′∈F[n−1] such that
srcα=FHk−2n−2L(γ′)srcβ=FHk−2n−2R(γ′),
and we wish to show that srcγ=γ′. Since γ′ is unique, it suffices to show
Axioms (viii) and (ix) are the globularity axioms src tgt α=src src α and tgt src α=tgt tgt α, respectively. For (viii), by (5.2), F(δt⊗δb⊗1[m])=F(δs⊗δb⊗1[m]) for b∈{0,1}. Then
Axiom (x) is id α∘n−1n id α=idα for id α∈[n]. The composition id α∘n−1n id α is defined, since src id α=tgt idα=α, and the composition is the unique γ such that
idα=FH0n−1L(γ)=FH0n−1R(γ).
We must show that γ=idα. Since γ is unique, it suffices to show
The pushout structure on ☐ serves two purposes. In §5 it made SEq hold on the nose, with no space-filling operation anywhere in the argument. Here we show that the same structure generates the laws that do not hold on the nose. Associativity and the identity laws hold only up to ≃, so each requires a cell of the next dimension to witness it, and in the de Morgan approach such cells are produced by Kan filling. In our setting they are produced instead by the mediating morphisms of the pushout, and the point of this section is that reasoning about them is equational: five equations on the morphisms of ☐ suffice to build the witnesses and to verify the coherence conditions they must satisfy, including the pentagon. Thus, laws that are equations get axioms and a decision procedure, while laws that are not equations get witnesses, built from the same categorical structure.
6.1 A Calculus for the Morphisms of ☐
Let I be the real unit interval and let J be any subset of I satisfying the following closure properties:
• 0,1/2,1∈J
• if t∈J then 2tmod1∈J
• if t,u,v∈J then tu+(1−t)v∈J.
Equivalently,
• 0,1/2,1∈J
• if s,t∈J, then st∈J
• if t∈J then 1−t∈J
• if s,t∈J then (s+t)mod1∈J.
The smallest set satisfying these properties is A={a2−n∣n≥0,0≤a≤2n}, the set of dyadic rationals in I. Let us assume that the index set J of Hom([0],[1]) satisfies these properties. This is the set of indices t that we have been using to write δt. This gives us a topology to work with, as the inclusion map J→I induces a metric d on J with d(s,t)=∣s−t∣.
Now, the covariant hom-functor Hom([0],−) composed with the bijection Hom([0],[n])≅Jn, which identifies δt1⊗⋯⊗δtn with (t1,…,tn), gives a faithful functor K:□→Set with
K[n]=Jnf:[n]→[m]↦Kf:Jn→Jm
with Kf(t1,…,tn)=(s1,…,sm), where f∘(δt1⊗⋯⊗δtn)=δs1⊗⋯⊗δsm. Consequently an identity between morphisms of □ can be verified pointwise on Jn, which is how every computation below is carried out. Further details are given in §B.
6.2 Connections and Associativity
A connection is built from a morphism c:[1]→[1] with c∘δ0=δ0 and c∘δ1=δ1, equivalently Kc(0)=0 and Kc(1)=1; these conditions are what give boundary preservation. The connection itself is the morphism f:[2]→[1] with Kf(t,s)=tKc(s)+(1−t)s. The base category should be augmented with these morphisms to effect the connection.
Associativity uses c=(L⋄RL)⋄RR, whose inverse is LL⋄(LR⋄R). Unwinding the definition,
so this morphism maps 0↦0, 1/4↦1/2, 1/2↦3/4 and 1↦1. The interpolation is shown below: from top to bottom, the left segment is stretched, the right segment compressed, and the middle band simply shifted.
That (L⋄RL)⋄RR and LL⋄(LR⋄R) are mutually inverse is a calculation in Lemma B.1. So is the observation that the same term associated the other way collapses: L⋄(RL⋄RR)=L⋄(R∘(L⋄R))=L⋄R=1[1].
Now let F be a presheaf as in §5 and let α,β,γ∈F[n] be such that α∘n−1nβ and β∘n−1nγ exist. Unwinding the definitions of src and tgt shows that (α∘n−1nβ)∘n−1nγ and α∘n−1n(β∘n−1nγ) exist as well. Associativity up to ≃ is witnessed by applying FH0n−1f to (α∘n−1nβ)∘n−1nγ, where f is the connection above.
so FH0n−1f((α∘n−1nβ)∘n−1nγ) is an (n+1)-cell witnessing the associativity.
Proof. First we observe that K(f∘(δt⊗1[1]))=λs.tKc(s)+(1−t)s, which implies that K(f∘(δ0⊗1[1]))=λs.s=K1[1] and K(f∘(δ1⊗1[1]))=λs.Kc(s)=Kc=K((L⋄RL)⋄RR). Since K is faithful, f∘(δ0⊗1[1])=1[1] and f∘(δ1⊗1[1])=(L⋄RL)⋄RR. Then for (6.1),
For the identity laws, we use L and R in one direction and L′=1[1]⋄(δ1∘σ) and R′=(δ0∘σ)⋄1[1] in the other. Interpolating between 1[1] and L, we have KL(s)=s/2, giving Kf(t,s)=ts/2+(1−t)s=s−ts/2.
6.3 Higher Coherence
The same calculus can be used to verify coherence conditions. For example, the pentagon identity for associativity is the statement
each composition factor representing one of the five reassociations around the pentagon
(LLL⋄(LLR⋄LR))⋄R
L⋄(RLL⋄(RLR⋄RR))
LL⋄((LRL⋄LRR)⋄R) and this follows by equational reasoning from Lemma B.1 alone.
These terms are not pulled out of thin air. To write the morphism that reassociates one bracketing of a composite into another, list the leaf paths of the target bracketing from left to right as words in L and R, then combine that list with ♢ according to the shape of the source bracketing. For example, to reassociate (α∘n−1nβ)∘n−1nγ to α∘n−1n(β∘n−1nγ), the target has leaves L, RL and RR while the source is bracketed to the left, which gives (L♢RL)♢RR. Every factor of the pentagon above is built by the same rule, and so is every higher reassociation. The construction is therefore quite mechanical, and so is its verification: coherence in this setting is rewriting with five equations rather than diagram chasing and is amenable to mechanization.
7 Conclusion
We have given SEq, eleven equational axioms for strict equality between cells of higher identity types, and shown that they are exactly the equations that hold in every homotopy model, and indeed already in every finite CW-complex (§4). All but two of them, read left to right, form a strongly normalizing rewrite system whose normal forms are unique up to picture equivalence, and adding generators in higher dimensions proves no new equations below (§3). Thus, the resulting word problem is decidable. On the semantic side, internalizing composition as a pushout on the base category makes all of SEq hold on the nose in every boundary-preserving, pullback-preserving presheaf (§5), and the same pushout supplies the witnesses for the laws that hold only up to ≃ (§6).
Everything provable in our theory is an equation, and everything else requires a witness. The calculus of mediating morphisms of §6 produces those witnesses for associativity and the identity laws, as well as higher coherences. A second direction for future work is type theory. The models of §5 already carry composition, boundaries and witnesses, but not the fibration structure that interpreting dependent types requires. We would like to know which boundary-preserving presheaves over □ admit such structure, how large that class is, and whether it is closed under the type constructors. Finally, our decision procedure materializes pictures as arrays and gives only a rough exponential upper bound. Comparing succinct representations rather than whole arrays may well do better.
References
[1] Al-Agl, F.A., Brown, R., Steiner, R.: Multiple categories: the equivalence of a globular and a cubical approach. Advances in Mathematics 170(1), 71–118 (2002)
[2] Angiuli, C., Brunerie, G., Coquand, T., Hou (Favonia), K.B., Harper, R., Licata, D.R.: Syntax and models of cartesian cubical type theory. Mathematical Structures in Computer Science 31(10), 1117–1166 (2021)
[4] Awodey, S., Warren, M.A.: Homotopy theoretic models of identity types. Mathematical Proceedings of the Cambridge Philosophical Society 146(1), 45–55 (2009). https://doi.org/10.1017/S0305004108001783
[5] Baez, J.C., Dolan, J.: Higher-dimensional algebra iii: n-categories and the algebra of opetopes. Advances in Mathematics 135(2), 145–206 (1998)
[6] Batanin, M.A.: Monoidal globular categories as a natural environment for the theory of weak n-categories. Advances in Mathematics 136(1), 39–103 (1998). https://doi.org/10.1006/aima.1998.1724
[12] Cohen, C., Coquand, T., Huber, S., Mörtberg, A.: Cubical type theory: A constructive interpretation of the univalence axiom. In: 21st International Conference on Types for Proofs and Programs (TYPES 2015). vol. 69, pp. 5–1. Schloss Dagstuhl–Leitniz-Zentrum für Informatik (2018)
[14] Grätzer, G.: Universal Algebra. Van Nostrand, Princeton, NJ (1968)
[15] Hatcher, A.: Algebraic Topology. Cambridge University Press, Cambridge (2002)
[16] Hermida, C., Makkai, M., Power, J.: On weak higher-dimensional categories i-1. Journal of Pure and Applied Algebra 154(1–3), 221–246 (2000)
[17] Hermida, C., Makkai, M., Power, J.: On weak higher-dimensional categories i-2. Journal of Pure and Applied Algebra 157(2–3), 247–277 (2001)
[18] Hermida, C., Makkai, M., Power, J.: On weak higher-dimensional categories i-3. Journal of Pure and Applied Algebra 166(1–2), 83–104 (2002)
[19] Licata, D.R., Orton, I., Pitts, A.M., Spitters, B.: Internal universes in models of homotopy type theory. In: 3rd International Conference on Formal Structures for Computation and Deduction (FSCD 2018). vol. 108, pp. 22–1. Schloss Dagstuhl–Leibniz-Zentrum für Informatik (2018)
[22] Street, R.: The algebra of oriented simplexes. Journal of Pure and Applied Algebra 49(3), 283–335 (1987)
[23] Swan, A.W.: Separating path and identity types in presheaf models of univalent type theory. Mathematical Structures in Computer Science 36(6), 1–32 (2026). https://doi.org/10.1017/S0960129526100656a
[24] The Univalent Foundations Program: Homotopy Type Theory: Univalent Foundations of Mathematics. Institute for Advanced Study, Princeton (2013), https://homotopytypetheory.org/book/
A Soundness over Homotopy Models
We record here the calculations underlying the equations cited in §2.1 and prove soundness of the axioms of §3.
Both src and tgt are left inverses of id:
srcidα=(idα)(1)(0)=αtgtidα=(idα)(1)(1)=α.(A.1)
For β∘n−1nα, evaluating (2.1) at k=1 and x∈{0,1} gives
(iii) for all 1≤k≤n, α(k)(0)=idk−1srckα and α(k)(1)=idk−1tgtkα;
(iv) for all 1≤m≤n−1 and b∈{0,1}, the value of α(m,m+1)(x,b) is independent of x.
Proof. First we observe that if α is a cell, then so are srcα, tgtα, and idα. The first two are by definition of cells. For idα, we have (idα)(1)(t)=α, so the first condition is satisfied, and (idα)(2)(b)(1)(t)=(idα)(1)(t)(1)(b)=α(1)(b), which is independent of t, so the second condition is satisfied.
(i) ⇒ (ii): The argument is by induction on dimension.
so α(1)(t) satisfies (iii). By the induction hypothesis, α(1)(t) is a cell. Moreover, α(1,2)(t,b) is independent of t by assumption, thus α(2)(b) is an identity. Therefore α is a cell.
It follows from the characterization of Lemma A.1(iii) that
after reindexing, which is a cell by the induction hypothesis, thus α(i1,…,ik)(xi1,…,xik) satisfies the first condition of cellhood. For the second condition, we must show that α(i1,…,ik)(xi1,…,xik)(2)(0) is an identity, provided n−k≥2 (otherwise, there is nothing to prove). By (A.7),
As this is independent of x, α(i1,…,ik)(xi1,…,xik)(2)(b) is an identity.
A.1 Soundness
All of the equations of §3.2 hold in homotopy models. Axioms (i) and (ii) were established in (A.4), axioms (iii) and (iv) in (A.2), axiom (v) in (A.6), axioms (vi) and (vii) in (A.1), and axioms (viii) and (ix) in (A.8). This leaves only axiom (x) and the exchange law axiom (xi), which we argue now.
Lemma A.3 (Axiom (x)). For all α of dimension n−1, idα∘n−1nidα=idα.
Proof. The term on the left-hand side is always meaningful, as src idα=α=tgt idα. By definition of ∘n−1n,
For cells α,β of dimension n, we might say α and β are path equivalent and write α≃β if there exists a cell ϕ of dimension n+1 such that α=srcϕ and β=tgtϕ. One can show that ≃ is an equivalence relation and a congruence with respect to the operations src, tgt, and ∘kn, but not id. Indeed, if idα≃idβ as witnessed by ϕ, then
α=srcidα=srcsrcϕ=srctgtϕ=srcidβ=β,(A.9)
so even if α≃β, it is not the case that idα≃idβ unless α=β.
B Characterization of □1
B.1 Set Representation
In this section we develop the properties of the functor K defined in §6.1.
The covariant hom-functor Hom([0],−):□→Set maps each object [n] to the set of morphisms Hom([0],[n]) and each morphism f:[n]→[m] to the set function f∘−:Hom([0],[n])→Hom([0],[m]) that post-composes with f. This functor is faithful by Theorem C.4. Specifically, each element of Hom([0],[n]) has a unique representation δt1⊗⋯⊗δtn, and morphisms f:[n]→[m] are uniquely determined by their action on these representations by post-composition. There is a bijection Hom([0],[n])≅Jn identifying δt1⊗⋯⊗δtn with the tuple (t1,…,tn), and composing this bijection with the hom-functor gives a faithful functor K:□→Set with
In this view, all functions Kf:J→J representing morphisms f:[1]→[1] are uniformly continuous in the metric topology on J. The maps KL and KR are each contractive with constant of contraction 1/2: KL(t)=t/2 and KR(t)=(t+1)/2, so
The first two quantities are bounded by 2cfd(s,t) and 2cgd(s,t), respectively. For the last case, recalling that Kf(1)=Kg(0) and using the triangle inequality,
Lemma B.1. Let U,V,W:[1]→[1]. The following equations are sound whenever both sides exist.
• (U♢V)∘L=U
• (U♢V)∘R=V
• U∘(V♢W)=(U∘V)♢(U∘W)
• (δt∘σ)♢(δt∘σ)=δt∘σ
• L♢R=1[1]
In all cases, if the left-hand side exists, then so does the right.
Proof. The first two are by definition. For the third, a left distributive law, if V∘δ1=W∘δ0, then U∘V∘δ1=U∘W∘δ0, so if the left-hand side exists, then so does the right. The two sides are equal, because U∘(V♢W)∘L=U∘V=((U∘V)♢(U∘W))∘L and U∘(V♢W)∘R=U∘W=((U∘V)♢(U∘W))∘R, and the mediating morphism is unique. The last two equations can be proved by the same technique.
Lemma B.2. Every element of Hom([1],[1]) generated by σ, L, R, and the δt under ∘ and ⋄ is represented by a term generated by the grammar
S::=S⋄S∣X∣δt∘σX::=R∘X∣L∘X∣1[1]
with start symbol S.
Proof. We reduce any term over the stated primitives to the desired form using the equations of Lemma B.1. First apply the left-distributive law U∘(V♢W)=(U∘V)♢(U∘W) in the left-to-right direction as far as possible. After this step, there are no subterms of the form U∘(V♢W). Any remaining compositions (U♢V)∘L or (U♢V)∘R can be simplified to U and V, respectively. Any remaining compositions (U♢V)∘δt are equal to δs for some s, so can be replaced by δs. There are no compositions of the form (U♢V)∘σ because it is not type-correct.
After this step, there are no compositions with any U♢V as a composition factor. Any remaining compositions with an occurrence of σ or δt as a composition factor reduces to some δt∘σ, because σ∘L=σ∘R=σ and L∘δt and R∘δt are equal to some δs.
At this point the term is of the desired form as specified by the grammar in the statement of the lemma. However further simplifications are possible using the remaining equations. Any subterm of the form (δs∘σ)♢(δt∘σ) must have s=t, as δs=δs∘σ∘δ1=δt∘σ∘δ0=δt, thus the subterm can be reduced to δt∘σ. The equation is valid, as ((δt∘σ)♢(δt∘σ))∘L=δt∘σ=δt∘σ∘L and ((δt∘σ)♢(δt∘σ))∘R=δt∘σ=δt∘σ∘R. Also, any subterm of the form (U∘L)♢(U∘R) can be reduced to U, as (U∘L)♢(U∘R)=U∘(L♢R)=U∘1[1]=U. 2
Now we show that after these simplifications, the representation is unique. We show that any pair of reduced terms that are semantically equal are also syntactically equal.
Theorem B.3. Let f,g:[1]→[1]. Let A={a2−n∣n≥0,0≤a≤2n}. The following are equivalent:
(i) f=g
(ii) for all t, f∘δt=g∘δt
(iii) for all t∈A, f∘δt=g∘δt
(iv) the reduced forms of f and g as described in Lemma B.2 are identical.
2Above we applied left distributive law only in the left-to-right direction. Here the reverse direction (right-to-left) is still valid because L∘δ1=R∘δ0=δ1/2.
Proof. The implications (i) ⇒ (ii), (ii) ⇒ (iii), and (iv) ⇒ (i) are obvious. For (iii) ⇒ (iv), the proof is by induction. Let us write ≡ for syntactic equality of expressions.
Suppose U1◊V1 and U2◊V2 are reduced. If for all t∈A, (U1◊V1)∘δt=(U2◊V2)∘δt, then for all t∈A, U1∘δt=(U1◊V1)∘L∘δt=(U2◊V2)∘L∘δt=U2∘δt and V1∘δt=(U1◊V1)∘R∘δt=(U2◊V2)∘R∘δt=V2∘δt. By the induction hypothesis, U1≡U2 and V1≡V2, therefore U1◊V1≡U2◊V2.
Suppose U◊V is reduced. If for all t∈A, U◊V=δt∘σ, then for all t∈A, U∘δt=(U◊V)∘L∘δt=δt∘σ∘L∘δt=δt∘σ∘δt and V∘δt=(U◊V)∘R∘δt=δt∘σ∘R∘δt=δt∘σ∘δt. By the induction hypothesis, U≡δt∘σ and V≡δt∘σ, therefore U◊V≡(δt∘σ)◊(δt∘σ). But then U◊V was not fully reduced, as it reduces to δt∘σ.
Suppose U◊V is reduced. Let W be a composition of R and L. If for all t∈A, (U◊V)∘δt=W∘δt, then for all t∈A, U∘δt=(U◊V)∘L∘δt=W∘L∘δt and V∘δt=(U◊V)∘R∘δt=W∘R∘δt. By the induction hypothesis, U≡W∘L and V≡W∘R, therefore U◊V≡(W∘L)◊(W∘R). But then U◊V was not fully reduced, as it reduces to W.
For the remaining cases involving U a composition of L and R, let #U denote the number represented by U in binary, taking L as 0 and R as 1, and let ∣U∣ be the number of composition factors in U. One can show inductively that for any t∈A, U∘δt=δs, where s=(#U+t)⋅2−∣U∣. Thus we cannot have U=δt∘σ, because U∘δ0=U∘δ1, since #U⋅2−∣U∣=(#U+1)⋅2−∣U∣, whereas δt∘σ∘δ0=δt∘σ∘δ1=δt∘σ.
Moreover, if U and V are compositions of L and R and U∘δt=V∘δt for all t∈A, then (#U+t)⋅2−∣U∣=(#V+t)⋅2−∣V∣. In particular, for t∈{0,1}, we have #U⋅2−∣U∣=#V⋅2−∣V∣ and (#U+1)⋅2−∣U∣=(#V+1)⋅2−∣V∣, which implies ∣U∣=∣V∣ and #U=#V, thus U≡V.
Lemma C.2. The tensor product in □, as a bifunctor ⊗:□×□→□, is faithful.
Proof. We need to show that if f,f′:[n]→[m],g,g′:[k]→[ℓ], and f⊗g=f′⊗g′, then f=f′ and g=g′. Let h⊗n=nh⊗⋯⊗h and h⊗0=1[0]. Then f and g can be extracted from f⊗g:
Let □1 be the induced subcategory of □ on objects [0] and [1]. Let ∑n□1n be the free strict monoidal category on □1. The objects of ∑n□1n are sequences [d1];⋯;[dn], where di∈{0,1}, and the morphisms are sequences f1;⋯;fn:[d1];⋯;[dn]→[e1];⋯;[en], where fi:[di]→[ei]. Tensor product for both objects and morphisms is concatenation, denoted by ;.
The tensor product ⊗ in □ gives a monoidal functor ⊗:∑n⊡1n→□ in which ⊗([d1];⋯;[dn])=[d1]⊗⋯⊗[dn]=[∑i=1ndi] and ⊗(f1;⋯;fn)=f1⊗⋯⊗fn. It follows from Lemma C.2 that ⊗ is faithful.
A decomposition of f:[n]→[m] is a morphism f^ of ∑n⊡1n such that ⊗f^=f.
Lemma C.3. Every morphism of □ has a decomposition f1;⋯;fn such that each fi is either
• some δt:[0]→[1],
• σ:[1]→[0],or
• a morphism [1]→[1] in the reduced form of Lemma B.2, but not δt∘σ,
and there is no adjacent pair fi; fi+1 with fi=δt and fi+1=σ.
Proof. First we show that every morphism has a decomposition. Recall that the morphisms of □ are generated by morphisms of ⊡1 under composition and tensor product. The morphisms of ⊡1 are already decomposed. Preservation of decomposability under ⊗ is also obvious.
For composition, suppose f^ and g^ are decompositions of f:[k]→[ℓ] and g:[ℓ]→[m], respectively. By adding in extra null identities 1[0]:[0]→[0] as necessary, we can assume without loss of generality that f^=f1;⋯;fn and g^=g1;⋯;gn, and for all i, fi:[ci]→[di] and gi:[di]→[ei], where ci,di,ei∈{0,1}. Then gi∘fi:[ci]→[ei] and (g1∘f1);⋯;(gn∘fn) is a decomposition of g∘f:
i⨂(gi∘fi)=(i⨂gi)∘(i⨂fi)=g∘f.
We have shown that every morphism has a decomposition. Now we show how to reduce it to the form described in the statement of the lemma. Null identities 1[0]:[0]→[0] can be deleted. Any factor [1]→[0] must be σ. Any factor [0]→[1] must be some δt. The remaining factors [1]→[1] can be reduced using Lemma B.2. Any factor δt∘σ can be replaced with σ; δt:[1];[0]→[0];[1], and any adjacent pair δt;σ:[0];[1]→[1];[0] can be replaced with σ; δt:[1];[0]→[0];[1]. These steps are justified by Lemma C.1.
The following theorem shows that decompositions are unique up to the equations of Lemma C.1 and the addition/deletion of null identities 1[0].
Theorem C.4. Let f,g:[n]→[m]. The following are equivalent:
(i) f=g
(ii) for all h:[0]→[n], f∘h=g∘h
(iii) for all t1,…,tn∈A, f∘(δt1⊗⋯⊗δtn)=g∘(δt1⊗⋯⊗δtn)
(iv) the decompositions of f and g in the reduced form described in Lemma C.3 are identical.
Proof. The implications (i) ⇒ (ii), (ii) ⇒ (iii), and (iv) ⇒ (i) are obvious. For (iii) ⇒ (iv), the proof is by induction. Let f^ and g^ be decompositions of f and g, respectively, of the reduced form described in Lemma C.3.
First we show that if f∘(δt1⊗⋯⊗δtn)=g∘(δt1⊗⋯⊗δtn) for all t1,…,tn∈A, then the leftmost decomposition factors of f^ and g^ must be of the same type.
Suppose f^=δt; f′ and g^=σ; g′. Since m≥1, there must be a leftmost factor of g^ with codomain 1, say U, which cannot be any δs because the pattern σ; δs is disallowed. Then U must be of type [1]→[1], but not δs∘σ for any s, as that is also disallowed. By Theorem B.3, there must exist u,v∈A such that U∘δu=δv=δt. Post-composing and precomposing f with 1[1]⊗σ⊗(m−1) and δu⊗n, respectively, yields δt. Doing the same with g yields δv. As δt=δv, we have f∘δu⊗n=g∘δu⊗n.
Similarly, suppose f^=δt; f′ and g^=U; g′, where U:[1]→[1] is a reduced term of Lemma B.2, but not δs∘σ for any s. As before, there must exist u,v∈A such that U∘δu=δv=δt. Post-composing and precomposing f and g with 1[1]⊗σ⊗(m−1) and δu⊗n yields δt=δv, therefore f∘δu⊗n=g∘δu⊗n.
Suppose f^=σ; f′ and g^=U; g′, where U:[1]→[1] is a reduced term of Lemma B.2, but not δs∘σ for any s. Post-composing and precomposing f and g with 1[1]⊗σ⊗(m−1) and 1[1]⊗δ0⊗(n−1) yields some σ⊗δt for some t and U. As before, there must exist u,v∈A such that U∘δu=δv=δt. Now post-composing and precomposing f and g with 1[1]⊗σ⊗(m−1) and δu⊗δ0⊗(n−1) yields δt=δv, therefore f∘(δu⊗δ0⊗(n−1))=g∘(δu⊗δ0⊗(n−1)).
We have shown that if f∘(δt1⊗⋯⊗δtn)=g∘(δt1⊗⋯⊗δtn) for all t1,…,tn∈A, then the leftmost decomposition factors of f^ and g^ must be of the same type. If one of f,g contains only one decomposition factor, then so does the other. In that case the decompositions are identical by Theorem B.3. Otherwise, if f^=f1; f′ and g^=g1; g′, then ⊗f′ and ⊗g′ also have the same type. By Lemma C.2, f1=g1 and ⊗f′=⊗g′, therefore f′ and g′ also satisfy (iii). By the induction hypothesis, f′=g′, therefore f^=g^. □
It follows that closure under composition and tensor product do not add any new morphisms to □1 than already existed from closure of δt, σ, L, and R under ∘ and ⋄.
D Higher Identity Types as Cells and Iterated Path Spaces
In traditional HoTT, equations at a type A are witnessed by paths, where A is a topological space and a path is a continuous functions I→A. The higher identity types over a base type X are generated inductively as spaces of paths:
• Level 0: points in X,
• Level 1: IdX(a,b)={paths p:I→X such that p(0)=a and p(1)=b},
• Level 2: IdIdX(a,b)(p,q)={paths α:I→IdX(a,b) such that α(0)=p and α(1)=q},
• Level 3: IdIdX(a,b)(p,q)(α,β)
={paths ϕ:I→IdIdX(a,b)(p,q) such that ϕ(0)=α and ϕ(1)=β},
etc. These “path spaces” are themselves topological spaces when equipped with the compact-open topology, defined as follows. For X and K topological spaces with K compact and Hausdorff (I in our example), let XK denote the set of continuous functions K→X. A subbasic open set of the compact-open topology on XK is a set of the form UC={f∈XK∣C⊆f−1(U)} for C⊆K closed (thus compact) and U⊆X open.
Although the category Top of topological spaces and continuous functions is famously not cartesian closed, it is cartesian (has finite products), and if K is compact and Hausdorff, then the functor (−)K:Top→Top is right adjoint to (−)×K. For an object A of Top, the space AK with the compact-open topology is the internal hom corresponding to the hom-set K→A. The action of (−)K on morphisms g:A→B post-composes with g; that is, gK=g∘−:AK→BK. One must verify that gK is continuous with respect to the compact-open topology on AK and BK, but this is easy to check: for a subbasic open set UC of BK where C⊆K is compact and U⊆B is open,
That (−)×K is left adjoint to (−)K is a consequence of the following lemma.
Lemma D.1. Let A,B, and K be topological spaces with K compact and Hausdorff. Let h:A×K→B be a function and let h′:A→K→B be its curried form h′(a)(x)=h(a,x). The following are equivalent:
(i) h is continuous with respect to the product topology on A×K;
(ii) for all a∈A, h′(a):K→B is continuous (that is, h′:A→BK) and h′ is continuous with respect to the compact-open topology on BK.
Proof. (i) ⇒ (ii). Suppose h:A×K→B is continuous. We first show that for all a∈A, h′(a):K→B is continuous. For any open set U⊆B, by elementary set theory, h′(a)−1(U)={x∈K∣(a,x)∈h−1(U)}. This is a section of an open set in a product space, therefore is open.
To show h′:A→BK is continuous, let UC be a subbasic open set in BK. By elementary set theory, a∈h′−1(UC) iff {a}×C⊆h−1(U). Since h−1(U) is open in A×K, for all x∈C there exist basic open sets Ux×Vx⊆h−1(U) such that a∈Ux and x∈Vx. By compactness, there is a finite set F⊆C such that C⊆⋃x∈FVx and a∈⋂y∈FUx, thus
{a}×C⊆y∈F⋂Uy×x∈F⋃Vx=x∈F⋃y∈F⋂Uy×Vx⊆h−1(U).
Again by elementary set theory, a∈⋂y∈FUy⊆h′−1(UC).
(ii) ⇒ (i). Suppose h′:A→BK is continuous. Let εB:BK×K→B be the application function εB(f,x)=f(x). We first show that εB is continuous. For any U⊆B open, εB−1(U)={(f,x)∣f(x)∈U}. If (f,x)∈εB−1(U), then f:K→B is continuous, so f−1(U) is open and x∈f−1(U). Since K is regular, there exists an open set V with closure C such that x∈V⊆C⊆f−1(U). Then f∈UC since C⊆f−1(U), so (f,x)∈UC×V⊆UC×C⊆εB−1(U), and UC×V is open, therefore εB is continuous.
Now for all (a,x)∈A×K,
(εB∘(h′×1K))(a,x)=εB(h′(a),x)=h′(a)(x)=h(a,x),
so h=εB∘(h′×1K). This is a composition of continuous functions, so h is continuous.
The adjunction says that there is a bijection curryABK, natural in A and B, that takes a continuous map h:A×K→B to its curried form curryABK(h):A→BK. The inverse of curryABK is denoted uncurryABK. The unit and count are ηAK(a)(x)=(a,x) and εBK(f,x)=f(x), respectively.
But one can say more. In case A is also compact and Hausdorff, say A=K1 and K=K2, then K1×K2 is compact and Hausdorff, therefore K1×K2→B and K1→BK2 with the compact-open topology become BK1×K2 and (BK2)K1, and we might ask whether the bijection curryK1BK2 is a homeomorphism BK1×K2→(BK2)K1. It turns out that it is:
Lemma D.2. Let K1,K2 be compact and Hausdorff and B an arbitrary space. Then curryK1BK2:BK1×K2→(BK2)K1 is a homeomorphism.
Proof. We already know that curryK1BK2 is bijective on the hom-sets with inverse uncurryK1BK2, so we need only show that both maps are continuous with respect to the compact-open topology. This follows from the observation that
and the fact that curry and uncurry map continuous functions to continuous functions.
The adjunction leads to a homeomorphism between the iterated path and cubical views of higher identity types. Given any topological space B and a,b∈B, we have defined IdB(a,b) to be the space of continuous paths p:I→B with p(0)=a and p(1)=b with the compact-open topology. The family of all HoTT path spaces representing higher identity types relative to an ambient space A is defined inductively. The identity types at level n will be denoted Pn.
• P0={A}.
• If B∈Pn and α,β∈B, then IdB(α,β)∈Pn+1.
Note that the elements of Pn are pairwise disjoint: For ldB(a,b) and ldB′(a′,b′), if B=B′ then B∩B′=∅ inductively, therefore ldB(a,b)∩ldB′(a′,b′)=∅, and if B=B′ but (a,b)=(a′,b′), then ldB(a,b)∩ldB(a′,b′)=∅ as well.
Each element of Pn is a subspace of a larger space Vn, also defined inductively:
• V0=A
• Vn+1={continuouspathsI→Vn} with the compact-open topology.
Thus Vn=nI→I→⋯→I→A. A continuous path in the space Vn is a point in the space Vn+1.
Now we claim that each element of Pn is a subspace of Vn. This is shown by induction. The only space in P0 is A=V0, and A is a subspace of itself. An element of Pn+1 is a space of the form ldB(p,q) consisting of certain paths α:I→B, where B∈Pn, and these α are continuous in the topology on B. By the induction hypothesis, B is a subspace of Vn, therefore the open sets of B are exactly the open sets of Vn intersected with B. It follows that α:I→Vn and is also continuous in the topology on Vn, thus α∈Vn+1.
We have shown that ldB(p,q)⊆Vn+1, but to show that it is a subspace, we need to argue that the open sets of ldB(p,q) are exactly the open sets of Vn+1 intersected with ldB(p,q). By naive set theory, it suffices to show this for subbasic open sets of ldB(p,q) and Vn+1. A subbasic open set of ldB(p,q) is of the form UC={f∈ldB(p,q)∣C⊆f−1(U)}, where U⊆B is open and C⊆I is compact. Since B is a subspace of Vn, U=B∩W for some open W⊆Vn. Since elements of ldB(p,q) only take values in B,
Thus the subbasic open sets of ldB(p,q) are exactly the subbasic open set of Vn+1 intersected with ldB(p,q). Let Cn be the set of n-cells in our sense over the ambient space A. The formal definition is
• C0=A
• C1 is the set of continuous functions I→A
• For n≥2, Cn consists of all continuous functions α:In→A such that
for all all t∈I, α(1)(t)∈Cn−1; and
α(2)(0)=idsrc2α and α(2)(1)=idtgt2α.
Let H0=A and for n≥1, let Hn=AIn, the space of all continuous functions In→A with the compact-open topology. Each Cn is a subset of Hn, and we topologize it with the relative topology.
Lemma D.3. For all n≥0, Hn and Vn are homeomorphic.
Proof. We define homeomorphisms hn:Hn→Vn at each level.
• h0:H0→V0 is the identity function on A.
• For n≥1, hn=hn−1I∘curryI,AIn−1=λα.hn−1∘α(1):Hn→Vn.
Let us check the inductive case. For n≥1, any function α∈Hn is of type In→A, which is the same as I×In−1→A. Currying on the first argument, we get curryI,AIn−1(α)=α(1):I→In−1→A. By Lemma D.2, curry is a homeomorphism
curryI,AIn−1:AIn→(AIn−1)I=Hn→Hn−1I.
By the induction hypothesis, hn−1:Hn−1→Vn−1 is a homeomorphism, therefore so is hn−1I:Hn−1I→Vn−1I. But Vn−1I is just Vn. Composing these, we get a homeomorphism
hn−1I∘curryI,AIn−1:Hn→Vn.
Let us call α,β∈Cn boundary equivalent and write α∼nβ if α(i)(b)=β(i)(b) for all 1≤i≤n and b∈{0,1}. Let [α] denote the ∼n-equivalence class of α. Let Pninh denote the set of inhabited identity types of Pn.
Theorem D.4. The equivalence classes of ∼n correspond bijectively to Pninh. Concretely, there is a bijection gn:Cn/∼n→Pninh such that for every α∈Cn, the map hn↾[α]:[α]⟶gn([α]) is a homeomorphism. In particular, the image of Cn under hn is ⋃Pn, and hn maps each boundary equivalence class homeomorphically to its corresponding identity type.
Proof. The maps gn are defined inductively. For n=0, all elements of A are vacuously equivalent under ∼0, so A is the unique equivalence class of ∼0, and there is only one identity type A at level 0, thus we define g0(A)=A.
Now given α∈Cn, we have by results of our paper that α(k)(0)=idk−1srckα and α(k)(1)=idk−1tgtkα. For k≥2, these are identities. Thus for all 1≤i≤n−1 and t∈I,
Now we show by induction that hn maps [α] as a subspace of Hn homeomorphically to gn([α]) as a subspace of Vn. For n=0, for all a∈A, h0(a)=a∈A=g0(A). For n≥1, by definition, hn(α)=hn−1∘α(1), thus for all t∈I,
It remains to show that gn:Cn/∼n→Pninh and each hn↾[α]:[α]→gn([α]) are surjective. We need only show that the inverse image α=hn−1(p) of any element p of a HoTT identity type B in Pninh is a cell in Cn, as then hn(α)=p∈B and gn([α])=B by (D.2). Since B and p were arbitrary, hn↾[α] and gn are surjective.
We proceed by induction. The claim is immediate for n=0. Now for any inhabited type IdB(q,r) at level n≥1 and any p∈IdB(q,r), let α=hn−1(p)∈Hn. To show that α∈Cn, by our definition, we need to show two things:
(i) for all t∈I, α(1)(t)∈Cn−1,
(ii) if n≥2, then for all t∈I and b∈{0,1}, α(2)(b)(1) is an identity, that is, the value of α(2)(b)(1)(t) is independent of t.
For (i), since hn(α)=hn−1∘α(1), we have
hn−1(α(1)(t))=hn(α)(t)=p(t)∈B.
By the inductive hypothesis, α(1)(t)∈Cn−1.
For (ii), since hn−1(α(1)(t))=hn−2∘α(1)(t)(1), we have
thus α(2)(0)(1)(t)=hn−2−1(q) and α(2)(1)(1)(t)=hn−2−1(r), which are independent of t.
Since hn is injective and the classes [α] partition Cn, the images gn([α]) are pairwise distinct. Hence gn:Cn/∼n→Pninh is bijective. Because hn is a homeomorphism, each restriction hn↾[α]:[α]→gn([α]) is a homeomorphism.