Addition on the natural numbers (construction 28.23) already poses the problem. Its defining equations make 𝑛+𝟢≡𝑛, but for a variable 𝑛 no computation rule turns 𝟢+𝑛 into 𝑛. Nevertheless induction proves that the two terms agree. To state that proof inside the theory we need a type whose elements are evidence that two terms are equal.
Judgmental equality is a judgment, not a type: it licenses conversion, but there is no context declaration 𝑝:𝑎≡𝑏 and no eliminator for such a declaration inside the theory. The intensional identity type𝖨𝖽𝐴(𝑎,𝑏) internalizes equality as such a type. Its sole constructor is reflexivity. The target 𝖨𝖽ℕ(𝟢+𝑛,𝑛) is inhabited by natural-number induction; the successor case must turn evidence for 𝟢+𝑛=𝑛 into evidence after applying successor to both endpoints.
The rules of the identity type
The identity family is the family (𝖨𝖽𝐴(𝑎,𝑏))𝑎,𝑏:𝐴 generated over the diagonal by the single constructor reflexivity; its eliminator 𝖩 is induction over that family.
An identification of 𝑎 with 𝑏 is an element of 𝖨𝖽𝐴(𝑎,𝑏). Reflexivity introduces an identification, and 𝖩 eliminates one by proving the reflexivity case of a family over both endpoints and the identification. Premises recoverable by convention 26.14 are omitted.
The closure rule Id-form-U is available only with the universe hierarchy of definition 29.1; Id-form, Id-intro, Id-elim, and Id-comp do not presuppose universes. There is no uniqueness (𝜂) rule; cf. remark 30.8. As required by convention 27.1, each operator also respects judgmental equality in all its classified arguments. The dependent instance for 𝖩 is stated explicitly in remark 30.2.
In the raw binding signature, 𝖨𝖽𝐴(𝑎,𝑏) has arity (0,0,0), 𝗋𝖾𝖿𝗅𝑎 has arity (0), and the fully annotated eliminator is 𝖩𝐴;𝑎;𝑏(𝑥.𝑦.𝑝.𝐶;𝑧.𝑐;𝑞). It has arity (0,0,0,3,1,0): the first three arguments record 𝐴,𝑎,𝑏; it binds 𝑥,𝑦,𝑝 in 𝐶 and 𝑧 in 𝑐. The notation in definition 30.1 suppresses 𝐴,𝑎,𝑏 when its typing judgment determines them.
When the optional lifting package of definition 29.10 is present, extend its strict code equations by
Γ⊢𝐴:U𝑖Γ⊢𝑎:𝐴Γ⊢𝑏:𝐴
Γ⊢𝖫𝗂𝖿𝗍𝑖(𝖨𝖽𝐴(𝑎,𝑏))≡𝖨𝖽𝖫𝗂𝖿𝗍𝑖𝐴(𝑎,𝑏):U𝑖+1
Lift-Id
The endpoints on the right are well typed by conversion along Lift-El.
In the conclusion, the left printed term abbreviates the raw constructor 𝖩𝐴;𝑎;𝑏 and the right one abbreviates 𝖩𝐴′;𝑎′;𝑏′. Thus the first premise and the two endpoint premises also compare the three newly explicit raw annotations; they are not discarded by the notation. Applying Id-elim-eq to the six displayed equality premises first gives the right-hand eliminator at its naturally formed classifier 𝐶′[𝑎′/𝑥,𝑏′/𝑦,𝑞′/𝑝]. Use the following two local equations:
symmetry of equal substitution in 𝑎,𝑏,𝑞;
symmetry of the substituted motive equality.
They give the classifier chain 𝐶′[𝑎′/𝑥,𝑏′/𝑦,𝑞′/𝑝](1)≡𝐶′[𝑎/𝑥,𝑏/𝑦,𝑞/𝑝](2)≡𝐶[𝑎/𝑥,𝑏/𝑦,𝑞/𝑝]. Conversion along this chain places the right-hand 𝖩 term at the result type used in the conclusion. The congruence rule for 𝗋𝖾𝖿𝗅 is the unary special case. These are the exact instances used below.
Elements of 𝖨𝖽𝐴(𝑎,𝑏) are called identifications of 𝑎 with 𝑏. We suppress annotations that are determined by the judgment: in particular, the printed term 𝖩(𝑥.𝑦.𝑝.𝐶;𝑧.𝑐;𝑞) abbreviates the raw term 𝖩𝐴;𝑎;𝑏(𝑥.𝑦.𝑝.𝐶;𝑧.𝑐;𝑞) when 𝑞:𝖨𝖽𝐴(𝑎,𝑏). We also write 𝗋𝖾𝖿𝗅 for 𝗋𝖾𝖿𝗅𝑎, and 𝖩(𝑧.𝑐;𝑞) when the expected type determines the motive. Throughout this part we retain the fully typed notation 𝖨𝖽𝐴(𝑎,𝑏).
Proof of Lemma 30.4 — Judgmental equality yields identifications
Proof. By Id-intro, Γ⊢𝗋𝖾𝖿𝗅𝑎:𝖨𝖽𝐴(𝑎,𝑎). From Γ⊢𝑎≡𝑏:𝐴 the congruence rule 𝐼𝑑−𝑓𝑜𝑟𝑚−𝑒𝑞 of remark 30.2 gives Γ⊢𝖨𝖽𝐴(𝑎,𝑎)≡𝖨𝖽𝐴(𝑎,𝑏)𝗍𝗒𝗉𝖾, and the conversion rule concludes Γ⊢𝗋𝖾𝖿𝗅𝑎:𝖨𝖽𝐴(𝑎,𝑏). ◻
The converse of lemma 30.4 — from Γ⊢𝑞:𝖨𝖽𝐴(𝑎,𝑏) conclude Γ⊢𝑎≡𝑏:𝐴 — is the equality reflection rule. It is not a rule of this theory; adding it changes an identification hypothesis into a judgmental equality. Here an identification may be used only through 𝖩; it does not silently become a conversion.
The path-induction pattern is the admissible use of 𝖩 specified by the genericity and computation obligations below. Suppose the context has three pairwise distinct variables 𝑎:𝐴, 𝑏:𝐴, and 𝑞:𝖨𝖽𝐴(𝑎,𝑏). Move any independent later hypotheses to the left by exchange, and abstract into Π-types every remaining later hypothesis. The resulting goal must be an instance 𝐶[𝑎/𝑥,𝑏/𝑦,𝑞/𝑝] of a well-formed motive Γ,𝑥:𝐴,𝑦:𝐴,𝑝:𝖨𝖽𝐴(𝑥,𝑦)⊢𝐶𝗍𝗒𝗉𝖾, where 𝑥,𝑦,𝑝 are pairwise distinct and {𝑥,𝑦,𝑝}∩dom(Γ)=∅. Thus the endpoint variables 𝑥,𝑦 and identification variable 𝑝 must all be generic in the displayed motive. Under these conditions, Id-elim reduces the construction to an element of 𝐶[𝑧/𝑥,𝑧/𝑦,𝗋𝖾𝖿𝗅𝑧/𝑝] for 𝑧∉dom(Γ)∪{𝑥,𝑦,𝑝}. We abbreviate this step by the phrase
“by identity induction on 𝑞, we may assume 𝑏 is 𝑎 and 𝑞 is 𝗋𝖾𝖿𝗅𝑎.”
Using the phrase carries two obligations. (i) Genericity. The displayed motive is the test: if it is not well formed, the phrase cannot be used. One must first generalize the fixed hypotheses that obstruct it. In particular, from 𝑥:𝐴,𝑝:𝖨𝖽𝐴(𝑥,𝑥) one cannot manufacture two independent endpoint variables merely by calling both of them 𝑥; doing so would falsely derive that every loop is reflexivity. More precisely, that apparent conclusion comes from an ill-formed motive, not from an instance of Id-elim. When only the left or only the right endpoint can be generalized, the corresponding based induction orientation applies. If neither a left-based nor a right-based motive is well formed, identity induction is unavailable. (ii) Computation. The term so constructed computes by Id-comp when 𝑞 is 𝗋𝖾𝖿𝗅; we record this judgmental equality with each construction, since later well-typedness frequently depends on it. Inferring 𝐶 from a concrete goal is a higher-order matching problem, not a primitive kernel operation. Tactics named induction, destruct, or cases automate that search; a motive is not type correct failure usually means that the genericity obligation in (i) was not met and more hypotheses must be generalized.
The rule Id-elim does not make every identification a reflexivity. It says instead that the family (𝖨𝖽𝐴(𝑥,𝑦))𝑥,𝑦:𝐴, considered over the whole context 𝑥:𝐴,𝑦:𝐴, is generated by the diagonal elements 𝗋𝖾𝖿𝗅𝑥. A map out of the total family is determined by its values on the diagonal; about a single fiber 𝖨𝖽𝐴(𝑎,𝑏) with fixed endpoints, the rule says nothing. The laws relating identifications are themselves inhabited identity types, not additional judgmental equations.
For Σ-types the uniqueness rule is 𝑢≡(𝗉𝗋1(𝑢),𝗉𝗋2(𝑢)), so every element is judgmentally a pair (definition 27.9). There is no uniformly well-typed expression of the form 𝑞≡𝗋𝖾𝖿𝗅: when 𝑞:𝖨𝖽𝐴(𝑎,𝑏), the term 𝗋𝖾𝖿𝗅𝑎 naturally has type 𝖨𝖽𝐴(𝑎,𝑎), and the two types need not be judgmentally equal. The intensional identity type therefore has a mapping-out principle but no judgmental uniqueness principle.
★☆☆ Using definition 26.22 and Id-intro, write the full derivation tree of the judgment 𝑥:𝐴⊢𝗋𝖾𝖿𝗅𝑥:𝖨𝖽𝐴(𝑥,𝑥) from the premise ⋅⊢𝐴𝗍𝗒𝗉𝖾, displaying every application of the variable and context-formation rules.
Formulate the based variant of the formation rule: from Γ⊢𝑎:𝐴 conclude Γ,𝑦:𝐴⊢𝖨𝖽𝐴(𝑎,𝑦)𝗍𝗒𝗉𝖾. Show that in the presence of the structural rules (definition 26.22) it follows from Id-form, and recover Id-form from it by substituting an arbitrary 𝑏:𝐴 for 𝑦. Finally explain why reflexivity already has the single based rule Γ⊢𝑎:𝐴Γ⊢𝗋𝖾𝖿𝗅𝑎:𝖨𝖽𝐴(𝑎,𝑎), so there is no second introduction variant to compare.
For 𝑞:𝖨𝖽𝐴(𝑎,𝑏) and 𝑢:𝐵[𝑎/𝑥], transport carries 𝑢 along 𝑞, giving 𝗍𝗋𝑥.𝐵𝑞(𝑢):𝐵[𝑏/𝑥]. Inverse, concatenation, and congruence are likewise defined by identity induction, and each computes at reflexivity.
Let Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾 and Γ⊢𝑞:𝖨𝖽𝐴(𝑎,𝑏). There is a term Γ⊢𝗍𝗋𝑥.𝐵𝑞:𝐵[𝑎/𝑥]→𝐵[𝑏/𝑥]withΓ⊢𝗍𝗋𝑥.𝐵𝗋𝖾𝖿𝗅𝑎(𝑢)≡𝑢:𝐵[𝑎/𝑥] for every Γ⊢𝑢:𝐵[𝑎/𝑥]. We omit the binder and write 𝗍𝗋𝐵𝑞 when 𝐵 has exactly one displayed free variable to abstract.
Construction. Apply Id-elim with the motive Γ,𝑥:𝐴,𝑦:𝐴,𝑝:𝖨𝖽𝐴(𝑥,𝑦)⊢𝐵→𝐵[𝑦/𝑥]𝗍𝗒𝗉𝖾 (the motive does not mention 𝑝) and the reflexivity clause 𝑧.𝜆𝑢.𝑢, whose required type is (𝐵→𝐵[𝑦/𝑥])[𝑧/𝑥,𝑧/𝑦,𝗋𝖾𝖿𝗅𝑧/𝑝]≡𝐵[𝑧/𝑥]→𝐵[𝑧/𝑥]. Set 𝗍𝗋𝑥.𝐵𝑞:=𝖩(𝑥.𝑦.𝑝.𝐵→𝐵[𝑦/𝑥];𝑧.𝜆𝑢.𝑢;𝑞). Formation of 𝐵[𝑦/𝑥] while retaining the declaration 𝑥:𝐴 first uses lemma 26.30 to rename the family binder from 𝑥 to the fresh 𝑦. Two applications of weakening then insert the original declaration 𝑥:𝐴 before 𝑦 and the path declaration 𝑝 after it. No capture-prone raw replacement or ill-ordered substitution is implicit. The computation rule is an instance of Id-comp followed by 𝛽-reduction (definition 27.2). ◻
Given 𝑥:ℕ⊢𝐵𝗍𝗒𝗉𝖾, work in the context 𝑛:ℕ,𝑚:ℕ,𝑝:𝖨𝖽ℕ(𝑛+𝑚,𝑚+𝑛),𝑢:𝐵[𝑛+𝑚/𝑥]. The term 𝗍𝗋𝐵𝑝(𝑢) is well typed in 𝐵[𝑚+𝑛/𝑥], but its defining computation does not fire: the identification is the variable 𝑝, not a displayed reflexivity. This is why calculations with transport require proofs of the groupoid laws.
For every family Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾 and elements Γ⊢𝑎:𝐴, Γ⊢𝑏:𝐴, the type 𝖨𝖽𝐴(𝑎,𝑏)→𝐵[𝑎/𝑥]→𝐵[𝑏/𝑥] is inhabited, namely by 𝜆𝑞.𝗍𝗋𝑥.𝐵𝑞. Under propositions-as-types this is Leibniz’s principle: identified elements are indiscernible by every property expressible in the theory.
Proof of Proposition 30.11 — Indiscernibility of identicals
Proof. For 𝑞:𝖨𝖽𝐴(𝑎,𝑏), construction 30.9 gives 𝗍𝗋𝑥.𝐵𝑞:𝐵[𝑎/𝑥]→𝐵[𝑏/𝑥]. Therefore 𝜆𝑞.𝗍𝗋𝑥.𝐵𝑞 inhabits the displayed dependent function type; at 𝑞=𝗋𝖾𝖿𝗅𝑎, its application to 𝑢 is judgmentally 𝑢 by the transport computation rule. ◻
Assume the universe and large Boolean elimination of construction 29.12. Put 𝑃:=𝜆𝑏.𝖨𝖿0(𝟏,𝟎,𝑏):𝟐→U0. The two computation rules give 𝑃𝗍𝗍≡𝟏 and 𝑃𝖿𝖿≡𝟎. Hence, for 𝑞:𝖨𝖽𝟐(𝗍𝗍,𝖿𝖿), transport gives 𝗍𝗋𝑏.𝑃𝑏𝑞(⋆):𝑃𝖿𝖿, which converts to a term of 𝟎. Thus 𝜆𝑞.𝗍𝗋𝑏.𝑃𝑏𝑞(⋆):𝖨𝖽𝟐(𝗍𝗍,𝖿𝖿)→𝟎. Unlike the metatheoretic separation in theorem 29.14, this is an internal negation: an assumed identification itself transports the unit element into the empty type.
Let Γ,𝑥:𝐴,𝑦:𝐴⊢𝑅𝗍𝗒𝗉𝖾 be a binary family equipped with a proof of reflexivity, Γ⊢𝜌:∏𝑧:𝐴𝑅[𝑧/𝑥,𝑧/𝑦]. Then there is a term Γ⊢𝑒:∏𝑥:𝐴∏𝑦:𝐴𝖨𝖽𝐴(𝑥,𝑦)→𝑅 and, in context Γ,𝑧:𝐴, its reflexivity computation is Γ,𝑧:𝐴⊢𝑒𝑧𝑧𝗋𝖾𝖿𝗅𝑧≡𝜌𝑧:𝑅[𝑧/𝑥,𝑧/𝑦]. Thus 𝖨𝖽𝐴(−,−) maps into every reflexive relation on 𝐴: it is the least reflexive relation, which was Martin-Löf’s original specification of the identity type [ML98, ML84].
Proof of Proposition 30.13 — Least reflexive relation
Proof. Apply Id-elim with the 𝑝-independent motive 𝑅 (weakened to the context Γ,𝑥:𝐴,𝑦:𝐴,𝑝:𝖨𝖽𝐴(𝑥,𝑦)) and clause 𝑧.𝜌𝑧; the computation rule is Id-comp. ◻
For Γ⊢𝑝:𝖨𝖽𝐴(𝑎,𝑏) and Γ⊢𝑞:𝖨𝖽𝐴(𝑏,𝑐) there is a term Γ⊢𝑝⋅𝑞:𝖨𝖽𝐴(𝑎,𝑐) with Γ⊢𝑝⋅𝗋𝖾𝖿𝗅𝑏≡𝑝:𝖨𝖽𝐴(𝑎,𝑏): transport 𝑝 in the family of identifications out of 𝑎, 𝑝⋅𝑞:=𝗍𝗋𝑤.𝖨𝖽𝐴(𝑎,𝑤)𝑞(𝑝). The computation rule is that of construction 30.9.
Construction 30.15 proceeds by induction on the second argument, so the right unit law 𝑝⋅𝗋𝖾𝖿𝗅𝑏≡𝑝 is judgmental while the left unit law holds only up to an identification (theorem 30.20(i)). Inducting on the first argument instead yields an operation with 𝗋𝖾𝖿𝗅𝑎⋅′𝑞≡𝑞; inducting on both (as in the HoTT Book [Uni13]) yields one computing only on 𝗋𝖾𝖿𝗅⋅″𝗋𝖾𝖿𝗅. All three agree up to identifications. Indeed, compare either alternative with ⋅ by identity induction on both inputs: after they have reduced to reflexivity, both concatenations compute to reflexivity, so reflexivity inhabits the comparison type. Exercise 30.4 asks for one such comparison with every motive made explicit. Such choices are harmless when one asks only for an identification, but differ when one tracks which unit equation is judgmental.
For Γ⊢𝑓:𝐴→𝐵 and Γ⊢𝑞:𝖨𝖽𝐴(𝑎,𝑏) there is a term Γ⊢𝖺𝗉𝑓(𝑞):𝖨𝖽𝐵(𝑓𝑎,𝑓𝑏) with Γ⊢𝖺𝗉𝑓(𝗋𝖾𝖿𝗅𝑎)≡𝗋𝖾𝖿𝗅𝑓𝑎:𝖨𝖽𝐵(𝑓𝑎,𝑓𝑎): set 𝖺𝗉𝑓(𝑞):=𝖩(𝑥.𝑦.𝑝.𝖨𝖽𝐵(𝑓𝑥,𝑓𝑦);𝑧.𝗋𝖾𝖿𝗅𝑓𝑧;𝑞). Thus every function preserves identifications: no operation of the theory can distinguish identified elements.
For Γ⊢𝑓:∏𝑥:𝐴𝐵 and Γ⊢𝑞:𝖨𝖽𝐴(𝑎,𝑏) there is a term Γ⊢𝖺𝗉𝖽𝑓(𝑞):𝖨𝖽𝐵[𝑏/𝑥](𝗍𝗋𝑥.𝐵𝑞(𝑓𝑎),𝑓𝑏)withΓ⊢𝖺𝗉𝖽𝑓(𝗋𝖾𝖿𝗅𝑎)≡𝗋𝖾𝖿𝗅𝑓𝑎:𝖨𝖽𝐵[𝑎/𝑥](𝑓𝑎,𝑓𝑎), namely 𝖺𝗉𝖽𝑓(𝑞):=𝖩(𝑥.𝑦.𝑝.𝖨𝖽𝐵[𝑦/𝑥](𝗍𝗋𝑥.𝐵𝑝(𝑓𝑥),𝑓𝑦);𝑧.𝗋𝖾𝖿𝗅𝑓𝑧;𝑞). Note that the clause 𝑧.𝗋𝖾𝖿𝗅𝑓𝑧 has the required type 𝖨𝖽𝐵[𝑧/𝑥](𝗍𝗋𝑥.𝐵𝗋𝖾𝖿𝗅𝑧(𝑓𝑧),𝑓𝑧) only via the computation rule 𝗍𝗋𝗋𝖾𝖿𝗅𝑧(𝑓𝑧)≡𝑓𝑧 and the conversion rule: the well-typedness of the eliminand depends on Id-comp for transport, as announced in convention 30.6(ii).
Use the addition of construction 28.23, which recurs on the second argument. Thus 𝑚+𝟢≡𝑚 and 𝑚+𝗌𝗎𝖼(𝑛)≡𝗌𝗎𝖼(𝑚+𝑛). Then:
𝗋𝖾𝖿𝗅𝑛+𝟢:𝖨𝖽ℕ(𝑛+𝟢,𝑛), by lemma 30.4: the equation holds judgmentally.
For a variable 𝑛, no defining equation applies to 𝟢+𝑛: the recursor inspects its second argument and that argument is a variable. Reflexivity has type 𝗋𝖾𝖿𝗅𝟢+𝑛:𝖨𝖽ℕ(𝟢+𝑛,𝟢+𝑛), not the required type 𝖨𝖽ℕ(𝟢+𝑛,𝑛), because the endpoints 𝟢+𝑛 and 𝑛 are not judgmentally equal. Induction instead gives an inhabitant 𝛼:=𝗂𝗇𝖽ℕ(𝑚.𝖨𝖽ℕ(𝟢+𝑚,𝑚);𝗋𝖾𝖿𝗅𝟢,𝜆𝑚.𝜆ℎ.𝖺𝗉𝗌𝗎𝖼(ℎ);𝑛), where the step clause is well-typed because 𝟢+𝗌𝗎𝖼(𝑚)≡𝗌𝗎𝖼(𝟢+𝑚), so that 𝖺𝗉𝗌𝗎𝖼(ℎ):𝖨𝖽ℕ(𝗌𝗎𝖼(𝟢+𝑚),𝗌𝗎𝖼(𝑚)) converts to the required type.
Here the defining equations prove the right-unit law, whereas induction proves the left-unit identification. Identifications can therefore express equations not supplied by the defining computations; they are terms that must themselves be transported, inverted, and compared. Groupoid laws perform those comparisons.
★☆☆ Let 𝐵 be a type not depending on 𝑥:𝐴 and 𝑞:𝖨𝖽𝐴(𝑎,𝑏). Construct a term of type 𝖨𝖽𝐵(𝗍𝗋𝑥.𝐵𝑞(𝑢),𝑢) for each 𝑢:𝐵. Explain why this identification is in general not a judgmental equality, although 𝗍𝗋𝑥.𝐵𝗋𝖾𝖿𝗅𝑎(𝑢)≡𝑢.
★★★ Define 𝑝⋅′𝑞 by identity induction on 𝑝, so that 𝗋𝖾𝖿𝗅𝑎⋅′𝑞≡𝑞, and construct a term of type 𝖨𝖽𝖨𝖽𝐴(𝑎,𝑐)(𝑝⋅𝑞,𝑝⋅′𝑞) for all 𝑝:𝖨𝖽𝐴(𝑎,𝑏), 𝑞:𝖨𝖽𝐴(𝑏,𝑐). First induct on 𝑝 to compare 𝑝⋅′𝗋𝖾𝖿𝗅𝑏 with 𝑝; then induct on 𝑞 with 𝑝 generalized into the motive, using the inverse of that comparison in the reflexivity case.
★★☆ Construct identifications 𝖨𝖽𝖨𝖽𝐴(𝑎,𝑏)(𝖺𝗉𝜆𝑥.𝑥(𝑞),𝑞)and𝖨𝖽𝖨𝖽𝐵(𝑏0,𝑏0)(𝖺𝗉𝜆𝑥.𝑏0(𝑞),𝗋𝖾𝖿𝗅𝑏0) for 𝑞:𝖨𝖽𝐴(𝑎,𝑏) and 𝑏0:𝐵. Which of the two, if either, holds judgmentally for a general path variable 𝑞, and why?
★★☆ Fix a universe U𝑖 with 𝐴:U𝑖, and define the Leibniz relation 𝐿(𝑎,𝑏):=∏𝐵:𝐴→U𝑖𝐵𝑎→𝐵𝑏. Construct maps 𝖨𝖽𝐴(𝑎,𝑏)→𝐿(𝑎,𝑏) and 𝐿(𝑎,𝑏)→𝖨𝖽𝐴(𝑎,𝑏). (For the second, instantiate 𝐵 at the based family 𝜆𝑤.𝖨𝖽𝐴(𝑎,𝑤).) Thus identity of indiscernibles is derivable, given a universe.
★★☆ Let ⋅⊢𝐴𝗍𝗒𝗉𝖾 and assume, in addition to definition 30.1, equality reflection: from Γ⊢𝑞:𝖨𝖽𝐴(𝑎,𝑏) conclude Γ⊢𝑎≡𝑏:𝐴. Construct a closed term of type ∏𝑥:𝐴∏𝑝:𝖨𝖽𝐴(𝑥,𝑥)𝖨𝖽𝖨𝖽𝐴(𝑥,𝑥)(𝑝,𝗋𝖾𝖿𝗅𝑥). Hint: in the generic context 𝑥,𝑦:𝐴,𝑝:𝖨𝖽𝐴(𝑥,𝑦), reflection lets 𝗋𝖾𝖿𝗅𝑥 convert to the type 𝖨𝖽𝐴(𝑥,𝑦); use this converted term in the motive of 𝖩.
The operations 𝗋𝖾𝖿𝗅, (−)−1, ⋅ obey the groupoid laws—but only up to further identifications. Each law is an identity type between identifications, and what we construct is an inhabitant of it.
Proof. (i) The judgmental half is the computation rule for concatenation. For the other half, the endpoints 𝑎,𝑏 of 𝑝 are generic, so identity induction applies (convention 30.6). In context 𝑥,𝑦:𝐴,𝜌:𝖨𝖽𝐴(𝑥,𝑦), take the motive 𝖨𝖽𝖨𝖽𝐴(𝑥,𝑦)(𝗋𝖾𝖿𝗅𝑥⋅𝜌,𝜌). For the clause, note that 𝗋𝖾𝖿𝗅𝑧⋅𝗋𝖾𝖿𝗅𝑧≡𝗋𝖾𝖿𝗅𝑧 by the computation rule of ⋅, so that 𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑧 inhabits the instance 𝖨𝖽𝖨𝖽𝐴(𝑧,𝑧)(𝗋𝖾𝖿𝗅𝑧⋅𝗋𝖾𝖿𝗅𝑧,𝗋𝖾𝖿𝗅𝑧) after conversion. Then 𝖩(𝑧.𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑧;𝑝) inhabits 𝖨𝖽𝖨𝖽𝐴(𝑎,𝑏)(𝗋𝖾𝖿𝗅𝑎⋅𝑝,𝑝).
(ii) Induct on 𝑝, once for each inverse law. The two motives are 𝑥,𝑦:𝐴,𝜌:𝖨𝖽𝐴(𝑥,𝑦)⊢𝖨𝖽𝖨𝖽𝐴(𝑥,𝑥)(𝜌⋅𝜌−1,𝗋𝖾𝖿𝗅𝑥)𝗍𝗒𝗉𝖾,𝑥,𝑦:𝐴,𝜌:𝖨𝖽𝐴(𝑥,𝑦)⊢𝖨𝖽𝖨𝖽𝐴(𝑦,𝑦)(𝜌−1⋅𝜌,𝗋𝖾𝖿𝗅𝑦)𝗍𝗒𝗉𝖾. At 𝑥=𝑦=𝑧 and 𝜌=𝗋𝖾𝖿𝗅𝑧, inverse computes to 𝗋𝖾𝖿𝗅𝑧. In the first motive the resulting concatenation computes because its second argument is 𝗋𝖾𝖿𝗅𝑧; in the second the defining equation of ⋅ applies because the right argument is again 𝗋𝖾𝖿𝗅𝑧. Both instances are therefore judgmentally 𝖨𝖽𝖨𝖽𝐴(𝑧,𝑧)(𝗋𝖾𝖿𝗅𝑧,𝗋𝖾𝖿𝗅𝑧), with clause 𝑧.𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑧.
(iii) Use the motive 𝑥,𝑦:𝐴,𝜌:𝖨𝖽𝐴(𝑥,𝑦)⊢𝖨𝖽𝖨𝖽𝐴(𝑥,𝑦)((𝜌−1)−1,𝜌)𝗍𝗒𝗉𝖾. At reflexivity, the two applications of inverse both compute, so the clause is again 𝑧.𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑧.
(iv) Concatenation computes on its second argument, so eliminate 𝑟. The fixed path 𝑞:𝖨𝖽𝐴(𝑏,𝑐) contains the left endpoint 𝑐 of 𝑟 in its type, and therefore cannot remain fixed while that endpoint is made generic. Generalize both 𝑝 and 𝑞 into the motive. Work in context 𝑥,𝑦:𝐴,𝜌:𝖨𝖽𝐴(𝑥,𝑦) and quantify over 𝑎′,𝑏′:𝐴, 𝑝′:𝖨𝖽𝐴(𝑎′,𝑏′), and 𝑞′:𝖨𝖽𝐴(𝑏′,𝑥). The fiber of the resulting iterated product is 𝖨𝖽𝖨𝖽𝐴(𝑎′,𝑦)((𝑝′⋅𝑞′)⋅𝜌,𝑝′⋅(𝑞′⋅𝜌)). This is well formed because 𝑥 is a variable of the motive’s context. For the clause at 𝑧, both sides compute: (𝑝′⋅𝑞′)⋅𝗋𝖾𝖿𝗅𝑧≡𝑝′⋅𝑞′ and 𝑝′⋅(𝑞′⋅𝗋𝖾𝖿𝗅𝑧)≡𝑝′⋅𝑞′, so 𝜆𝑎′.𝜆𝑏′.𝜆𝑝′.𝜆𝑞′.𝗋𝖾𝖿𝗅𝑝′⋅𝑞′ has the required type after conversion. Applying 𝖩 to 𝑟 and instantiating the resulting Π-term at 𝑎,𝑏,𝑝,𝑞 yields the associator 𝛼𝑝,𝑞,𝑟:=𝖩(𝑧.𝜆𝑎′.𝜆𝑏′.𝜆𝑝′.𝜆𝑞′.𝗋𝖾𝖿𝗅𝑝′⋅𝑞′;𝑟)𝑎𝑏𝑝𝑞,𝛼𝑝,𝑞,𝑟:𝖨𝖽𝖨𝖽𝐴(𝑎,𝑑)((𝑝⋅𝑞)⋅𝑟,𝑝⋅(𝑞⋅𝑟)). ◻
Proof. (i) Induct on 𝑞 and generalize 𝑎 and 𝑝 into the motive. For generic 𝑥,𝑦:𝐴 and 𝜌:𝖨𝖽𝐴(𝑥,𝑦) take ∏𝑎′:𝐴∏𝑝′:𝖨𝖽𝐴(𝑎′,𝑥)𝖨𝖽𝖨𝖽𝐵(𝑓(𝑎′),𝑓(𝑦))(𝖺𝗉𝑓(𝑝′⋅𝜌),𝖺𝗉𝑓(𝑝′)⋅𝖺𝗉𝑓(𝜌)). At 𝜌=𝗋𝖾𝖿𝗅𝑥, the concatenation 𝑝′⋅𝗋𝖾𝖿𝗅𝑥, the action 𝖺𝗉𝑓(𝗋𝖾𝖿𝗅𝑥), and the right-hand concatenation all compute. Both sides are 𝖺𝗉𝑓(𝑝′), so the clause is 𝜆𝑎′.𝜆𝑝′.𝗋𝖾𝖿𝗅𝖺𝗉𝑓(𝑝′). Instantiate the result at 𝑎,𝑝.
(ii) For generic 𝑥,𝑦:𝐴 and 𝜌:𝖨𝖽𝐴(𝑥,𝑦), take the motive 𝖨𝖽𝖨𝖽𝐵(𝑓(𝑦),𝑓(𝑥))(𝖺𝗉𝑓(𝜌−1),(𝖺𝗉𝑓(𝜌))−1). At 𝑥=𝑦=𝑧 and 𝜌=𝗋𝖾𝖿𝗅𝑧, inverse and 𝖺𝗉 both compute. The reflexivity clause is 𝑧.𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑓(𝑧). Instantiating at 𝑎,𝑏,𝑝 gives the required path.
(iii) For generic 𝑥,𝑦:𝐴 and 𝜌:𝖨𝖽𝐴(𝑥,𝑦), take the motive 𝖨𝖽𝖨𝖽𝐶(𝑔(𝑓(𝑥)),𝑔(𝑓(𝑦)))(𝖺𝗉𝜆𝑤.𝑔(𝑓(𝑤))(𝜌),𝖺𝗉𝑔(𝖺𝗉𝑓(𝜌))). At 𝑥=𝑦=𝑧 and 𝜌=𝗋𝖾𝖿𝗅𝑧, both endpoints compute to 𝗋𝖾𝖿𝗅𝑔(𝑓(𝑧)). The clause is 𝑧.𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑔(𝑓(𝑧)); instantiate at 𝑎,𝑏,𝑝. ◻
Proof of Proposition 30.22 — Transport is functorial
Proof. (i) Induct on 𝑞 while generalizing 𝑎, 𝑝, and 𝑢 into the motive. For generic 𝑥,𝑦:𝐴 and 𝜌:𝖨𝖽𝐴(𝑥,𝑦) take ∏𝑎′:𝐴∏𝑝′:𝖨𝖽𝐴(𝑎′,𝑥)∏𝑢′:𝐵[𝑎′/𝑥]𝖨𝖽𝐵[𝑦/𝑥](𝗍𝗋𝐵𝑝′⋅𝜌(𝑢′),𝗍𝗋𝐵𝜌(𝗍𝗋𝐵𝑝′(𝑢′))). At 𝜌=𝗋𝖾𝖿𝗅𝑥, the concatenation and the outer transport compute, so both endpoints reduce to 𝗍𝗋𝐵𝑝′(𝑢′). The clause is 𝜆𝑎′.𝜆𝑝′.𝜆𝑢′.𝗋𝖾𝖿𝗅𝗍𝗋𝐵𝑝′(𝑢′); instantiate at 𝑎,𝑝,𝑢.
(ii) Generalize 𝑢 into the motive 𝑥,𝑦:𝐴,𝜌:𝖨𝖽𝐴(𝑥,𝑦)⊢∏𝑢′:𝐵𝖨𝖽𝐵(𝗍𝗋𝐵𝜌−1(𝗍𝗋𝐵𝜌(𝑢′)),𝑢′)𝗍𝗒𝗉𝖾. At 𝜌=𝗋𝖾𝖿𝗅𝑥 both transports and the inverse compute, so the clause is 𝜆𝑢′.𝗋𝖾𝖿𝗅𝑢′. Instantiate the result at 𝑢.
(iii) This time generalize 𝑣 into the motive 𝑥,𝑦:𝐴,𝜌:𝖨𝖽𝐴(𝑥,𝑦)⊢∏𝑣′:𝐵[𝑦/𝑥]𝖨𝖽𝐵[𝑦/𝑥](𝗍𝗋𝐵𝜌(𝗍𝗋𝐵𝜌−1(𝑣′)),𝑣′)𝗍𝗒𝗉𝖾. Its reflexivity clause is again 𝜆𝑣′.𝗋𝖾𝖿𝗅𝑣′ after the inverse and both transports compute. Instantiate at 𝑣. ◻
The laws of theorem 30.20 are themselves terms, so their identity types may be formed in turn. Repeated identity induction constructs many coherence identifications; for example, it compares the two composites of associators that rebracket four consecutive identifications. Thus the rules produce a hierarchy: identifications, identifications between those, and so on without end. The four groupoid laws above are only its first level. A complete coherence theorem for the whole hierarchy is a separate metatheoretic result.
★★☆ For 𝑝:𝖨𝖽𝐴(𝑎,𝑏) and 𝑞:𝖨𝖽𝐴(𝑏,𝑐), construct an identification 𝖨𝖽𝖨𝖽𝐴(𝑐,𝑎)((𝑝⋅𝑞)−1,𝑞−1⋅𝑝−1). Induct first on 𝑞 with 𝑝 generalized; in the reflexivity instance use the inverse of the left-unit identification in theorem 30.20(i).
★★☆ Given 𝑓,𝑓′:𝐴→𝐵 and a pointwise identification ℎ:∏𝑥:𝐴𝖨𝖽𝐵(𝑓(𝑥),𝑓′(𝑥)), show that for 𝑝:𝖨𝖽𝐴(𝑎,𝑏) the two boundary composites (ℎ(𝑎)−1⋅𝖺𝗉𝑓(𝑝))⋅ℎ(𝑏) and 𝖺𝗉𝑓′(𝑝) are identified. Induct on 𝑝 and use the groupoid laws in the reflexivity case. The other bracketing follows from the associativity identification of theorem 30.20(iv).
★★☆ Let 𝐵 and 𝐶 be families over 𝐴 and ℎ:∏𝑥:𝐴𝐵(𝑥)→𝐶(𝑥). For 𝑝:𝖨𝖽𝐴(𝑎,𝑏) and 𝑢:𝐵(𝑎), construct an identification 𝖨𝖽𝐶(𝑏)(𝗍𝗋𝐶𝑝(ℎ(𝑎)(𝑢)),ℎ(𝑏)(𝗍𝗋𝐵𝑝(𝑢))). State the motive and verify its reflexivity clause.
The eliminator 𝖩 requires both endpoints to be generic. This section derives the sharper principle in which one endpoint stays fixed — based path induction — from a single new construction: contractibility of singletons.
A direct use of Id-elim cannot simply insert the based motive. If 𝐶 is formed in Γ,𝑦:𝐴,𝑝:𝖨𝖽𝐴(𝑎,𝑦), the tempting assignment 𝐷(𝑥,𝑦,𝑝)?:=𝐶(𝑦,𝑝)for𝑥,𝑦:𝐴,𝑝:𝖨𝖽𝐴(𝑥,𝑦) is ill formed: inside 𝐶, the variable 𝑝 must have type 𝖨𝖽𝐴(𝑎,𝑦), whereas the generic 𝑝 supplied by Id-elim has type 𝖨𝖽𝐴(𝑥,𝑦). The construction below performs exactly the missing change of base point.
For Γ⊢𝑎:𝐴, the singleton of 𝑎 is Sing𝐴(𝑎):=∑𝑦:𝐴𝖨𝖽𝐴(𝑎,𝑦), the type of elements of 𝐴 together with an identification with 𝑎. Its distinguished element is the center(𝑎,𝗋𝖾𝖿𝗅𝑎):Sing𝐴(𝑎).
For Γ⊢𝑎:𝐴 and Γ⊢𝑢:Sing𝐴(𝑎) there is a term Γ⊢𝗎𝗇𝗂𝗊𝑎(𝑢):𝖨𝖽Sing𝐴(𝑎)((𝑎,𝗋𝖾𝖿𝗅𝑎),𝑢). At the center it computes judgmentally: Γ⊢𝗎𝗇𝗂𝗊𝑎((𝑎,𝗋𝖾𝖿𝗅𝑎))≡𝗋𝖾𝖿𝗅(𝑎,𝗋𝖾𝖿𝗅𝑎):𝖨𝖽Sing𝐴(𝑎)((𝑎,𝗋𝖾𝖿𝗅𝑎),(𝑎,𝗋𝖾𝖿𝗅𝑎)).
Proof of Construction 30.25 — Contractibility of singletons
Construction. Apply Id-elim with the motive 𝑥:𝐴,𝑦:𝐴,𝑝:𝖨𝖽𝐴(𝑥,𝑦)⊢𝖨𝖽Sing𝐴(𝑥)((𝑥,𝗋𝖾𝖿𝗅𝑥),(𝑦,𝑝))𝗍𝗒𝗉𝖾 and clause 𝑧.𝗋𝖾𝖿𝗅(𝑧,𝗋𝖾𝖿𝗅𝑧), obtaining 𝑒(𝑥,𝑦,𝑝):𝖨𝖽Sing𝐴(𝑥)((𝑥,𝗋𝖾𝖿𝗅𝑥),(𝑦,𝑝)). Set 𝗎𝗇𝗂𝗊𝑎(𝑢):=𝑒(𝑎,𝗉𝗋1(𝑢),𝗉𝗋2(𝑢)); by the 𝜂-rule for Σ-types (definition 27.9) we have 𝑢≡(𝗉𝗋1(𝑢),𝗉𝗋2(𝑢)), so the type of 𝗎𝗇𝗂𝗊𝑎(𝑢) converts to the one stated. The computation rule follows from Id-comp and the 𝛽-rules for Σ (which give 𝗉𝗋1(𝑎,𝗋𝖾𝖿𝗅𝑎)≡𝑎, 𝗉𝗋2(𝑎,𝗋𝖾𝖿𝗅𝑎)≡𝗋𝖾𝖿𝗅𝑎). Note that the motive generalizes the goal: it proves the statement for every center 𝑥 at once, which is what makes the induction legitimate. ◻
Proof. Uncurry the family 𝐶 over the singleton: let Γ,𝑢:Sing𝐴(𝑎)⊢̂𝐶𝗍𝗒𝗉𝖾,̂𝐶:=𝐶[𝗉𝗋1(𝑢)/𝑦,𝗉𝗋2(𝑢)/𝑝]. Given 𝑞:𝖨𝖽𝐴(𝑎,𝑏), the contraction path at (𝑏,𝑞) is 𝗎𝗇𝗂𝗊𝑎((𝑏,𝑞)):𝖨𝖽Sing𝐴(𝑎)((𝑎,𝗋𝖾𝖿𝗅𝑎),(𝑏,𝑞)), and we transport along it: 𝖩′(𝑦.𝑝.𝐶;𝑐;𝑞):=𝗍𝗋𝑢.̂𝐶𝗎𝗇𝗂𝗊𝑎((𝑏,𝑞))(𝑐). This is well-typed: by the 𝛽-rules for Σ, ̂𝐶[(𝑎,𝗋𝖾𝖿𝗅𝑎)/𝑢]≡𝐶[𝑎/𝑦,𝗋𝖾𝖿𝗅𝑎/𝑝], the type of 𝑐, and ̂𝐶[(𝑏,𝑞)/𝑢]≡𝐶[𝑏/𝑦,𝑞/𝑝], the stated conclusion. For the computation rule, take 𝑏:=𝑎, 𝑞:=𝗋𝖾𝖿𝗅𝑎: then 𝗍𝗋̂𝐶𝗎𝗇𝗂𝗊𝑎((𝑎,𝗋𝖾𝖿𝗅𝑎))(𝑐)𝑐𝑜𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛30.25=𝗍𝗋̂𝐶𝗋𝖾𝖿𝗅(𝑎,𝗋𝖾𝖿𝗅𝑎)(𝑐)𝑐𝑜𝑛𝑠𝑡𝑟𝑢𝑐𝑡𝑖𝑜𝑛30.9=𝑐. Both steps are judgmental, so Id-comp′ holds as stated. ◻
In the presence of the Σ-rules of definition 27.9, including their judgmental 𝜂-rule, the following three presentations are interderivable with their displayed judgmental computation rules:
Proof of Proposition 30.27 — Equivalence of the presentations
Proof. The implication (i)⇒(iii) is the construction of transport and 𝗎𝗇𝗂𝗊 above, and (iii)⇒(ii) is the proof of theorem 30.26. It remains only to recover full 𝖩 from (ii), or directly from (iii).
Suppose 𝐶 is a motive over 𝑥,𝑦,𝑝 and 𝑐 is its reflexivity clause. For each 𝑥:𝐴 and 𝑢:Sing𝐴(𝑥) define ̂𝐶𝑥(𝑢):=𝐶[𝑥/𝑥,𝗉𝗋1(𝑢)/𝑦,𝗉𝗋2(𝑢)/𝑝]. Given 𝑞:𝖨𝖽𝐴(𝑎,𝑏), set 𝖩𝗍𝗋(𝑥.𝑦.𝑝.𝐶;𝑧.𝑐;𝑞):=𝗍𝗋𝑢.̂𝐶𝑎(𝑢)𝗎𝗇𝗂𝗊𝑎((𝑏,𝑞))(𝑐[𝑎/𝑧]). The source fiber reduces to 𝐶[𝑎/𝑥,𝑎/𝑦,𝗋𝖾𝖿𝗅𝑎/𝑝] and the target fiber to 𝐶[𝑎/𝑥,𝑏/𝑦,𝑞/𝑝], so the term has exactly the conclusion of Id-elim. For 𝑞=𝗋𝖾𝖿𝗅𝑎, singleton contraction computes to 𝗋𝖾𝖿𝗅(𝑎,𝗋𝖾𝖿𝗅𝑎), and transport along that reflexivity computes to 𝑐[𝑎/𝑧]. Hence Id-comp is judgmental. This proves (iii)⇒(i). From 𝖩′ at the fixed endpoint 𝑎 one obtains the same conclusion directly: 𝖩𝖻𝖺𝗌𝖾𝖽(𝑥.𝑦.𝑝.𝐶;𝑧.𝑐;𝑞):=𝖩′(𝑦.𝑝.𝐶[𝑎/𝑥];𝑐[𝑎/𝑧];𝑞). Its classifier is 𝐶[𝑎/𝑥,𝑏/𝑦,𝑞/𝑝], and its reflexivity equation is exactly Id-comp′. This proves (ii)⇒(i). ◻
★☆☆ Using only 𝖩′ and its computation rule, reconstruct inverse and concatenation. Which unit law for the resulting concatenation is judgmental? Compare with construction 30.15.
★★☆ Take only 𝗍𝗋 and 𝗎𝗇𝗂𝗊 with their computation rules as primitive. Reconstruct the dependent action 𝖺𝗉𝖽𝑓(𝑞) of construction 30.18. Use the formula for 𝖩𝗍𝗋 in proposition 30.27, and verify the reflexivity computation without appealing to primitive 𝖩.
The eliminator 𝖩 proves inverse, concatenation, congruence, and groupoid laws by acting on the identity family with both endpoints generic. None of the displayed constructions identifies every pair of identifications with fixed endpoints, or supplies function extensionality, the principle that pointwise identifications produce an identification between functions. We state these types explicitly and then separate two questions: whether adding them is consistent, and whether they are derivable from 𝖩 alone.
For a type 𝐴, define 𝖴𝖨𝖯𝐴:=∏𝑥:𝐴∏𝑦:𝐴∏𝑝:𝖨𝖽𝐴(𝑥,𝑦)∏𝑞:𝖨𝖽𝐴(𝑥,𝑦)𝖨𝖽𝖨𝖽𝐴(𝑥,𝑦)(𝑝,𝑞),𝖪𝐴:=∏𝑥:𝐴∏𝑝:𝖨𝖽𝐴(𝑥,𝑥)𝖨𝖽𝖨𝖽𝐴(𝑥,𝑥)(𝑝,𝗋𝖾𝖿𝗅𝑥).𝖴𝖨𝖯𝐴 (uniqueness of identity proofs) asserts that any two identifications of the same endpoints are identified; 𝖪𝐴 (Streicher’s axiom K) is the special case of loops at a point, compared with 𝗋𝖾𝖿𝗅[Str93].
Proof. The first map sends 𝑢:𝖴𝖨𝖯𝐴 to 𝜆𝑥.𝜆𝑝.𝑢𝑥𝑥𝑝𝗋𝖾𝖿𝗅𝑥; no symmetry is needed. For the second, fix 𝑘:𝖪𝐴 and 𝑥:𝐴; we construct all of 𝖴𝖨𝖯𝐴’s remaining arguments by based path induction on 𝑞 (theorem 30.26), with 𝑝 generalized into the motive: 𝑦:𝐴,𝑞:𝖨𝖽𝐴(𝑥,𝑦)⊢∏𝑝:𝖨𝖽𝐴(𝑥,𝑦)𝖨𝖽𝖨𝖽𝐴(𝑥,𝑦)(𝑝,𝑞)𝗍𝗒𝗉𝖾. The reflexivity clause required when 𝑦:=𝑥 and 𝑞:=𝗋𝖾𝖿𝗅𝑥 has type ∏𝑝:𝖨𝖽𝐴(𝑥,𝑥)𝖨𝖽𝖨𝖽𝐴(𝑥,𝑥)(𝑝,𝗋𝖾𝖿𝗅𝑥), and is exactly 𝑘𝑥. The remaining loop 𝑝 has both endpoints fixed at 𝑥. Thus neither Id-elim nor Id-elim′ applies directly; this residue is precisely 𝖪𝐴. ◻
For 𝑓,𝑔:∏𝑥:𝐴𝐵 there is a term 𝗁𝖺𝗉𝗉𝗅𝗒𝑓,𝑔:𝖨𝖽∏𝑥:𝐴𝐵(𝑓,𝑔)→∏𝑥:𝐴𝖨𝖽𝐵(𝑓𝑥,𝑔𝑥)with𝗁𝖺𝗉𝗉𝗅𝗒𝑓,𝑓(𝗋𝖾𝖿𝗅𝑓)≡𝜆𝑥.𝗋𝖾𝖿𝗅𝑓𝑥, by identity induction: take the motive ∏𝑥:𝐴𝖨𝖽𝐵(𝑢𝑥,𝑣𝑥) over 𝑢,𝑣,𝑝 and the clause 𝑤.𝜆𝑥.𝗋𝖾𝖿𝗅𝑤𝑥.
For an arbitrary family Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾 and functions 𝑓,𝑔:∏𝑥:𝐴𝐵, first put 𝖯𝗍(𝑓,𝑔):=∏𝑥:𝐴𝖨𝖽𝐵(𝑓𝑥,𝑔𝑥). Then define 𝖥𝗎𝗇𝖾𝗑𝗍𝐴,𝐵:=∏𝑓:∏𝑥:𝐴𝐵∏𝑔:∏𝑥:𝐴𝐵𝖯𝗍(𝑓,𝑔)→𝖨𝖽∏𝑥:𝐴𝐵(𝑓,𝑔). This is the assertion converse to construction 30.34: pointwise identified functions are identified.
In ZFC, the set interpretation of definition 73.39 extends to Id-form, Id-intro, Id-elim, and Id-comp. Under the Grothendieck-universe hypothesis of lemma 74.14, it also validates Id-form-U and Lift-Id. In either corresponding signature, the extensions by 𝖴𝖨𝖯 and 𝖥𝗎𝗇𝖾𝗑𝗍 have semantic sections.
Proof of Proposition 77.32 — The set interpretation validates UIP and function extensionality
Proof. Interpret 𝖨𝖽𝐴(𝑎,𝑏) at 𝜌 as {∗} when [[𝑎]]𝜌=[[𝑏]]𝜌 and as ∅ otherwise. Reflexivity denotes ∗. Whenever [[𝑞]]𝜌 is defined, the identity fiber is inhabited, hence [[𝑎]]𝜌=[[𝑏]]𝜌. Define [[𝖩𝐴;𝑎;𝑏(𝑥.𝑦.𝑝.𝐶;𝑧.𝑐;𝑞)]]Γ𝜌:=[[𝑐]]Γ,𝑧:𝐴(𝜌,[[𝑎]]𝜌). After replacing [[𝑏]]𝜌 by [[𝑎]]𝜌 and the unique identity element by ∗, the right side belongs to the interpreted motive at ([[𝑎]]𝜌,[[𝑏]]𝜌,[[𝑞]]𝜌). If 𝑞 is not interpreted, the partial value of the eliminator is undefined. At 𝑞=𝗋𝖾𝖿𝗅𝑎 the defining equation is literal.
The two new raw clauses commute with semantic substitution and weakening: reindexing preserves equality of endpoint values, and the displayed 𝖩 equation reduces to the substitution equation for 𝑐. Thus the structural lemma lemma 28.13 gains these two operator cases. The simultaneous derivation induction of lemma 28.14 then gains formation, introduction, elimination, computation, and congruence cases for identity types. Grothendieck-universe closure makes each equality fiber small, and strict lifting leaves that fiber unchanged, giving the two universe rules.
Every identity fiber has at most one element, which supplies the semantic 𝖴𝖨𝖯 section. Pointwise equal set-theoretic dependent functions are the same set of ordered pairs, so the identity fiber of the two functions is inhabited; this supplies 𝖥𝗎𝗇𝖾𝗑𝗍. ◻
Proposition 77.32 proves relative consistency of adding UIP and function extensionality. It validates both principles, so it cannot show either one underivable. Showing UIP underivable requires a model with nontrivial identity fibers. The groupoid model of [HS98] is such a countermodel. No independence theorem is used here.
Work in the context 𝜒:𝖥𝗎𝗇𝖾𝗑𝗍𝟐,𝟐. Let 𝑔:=𝜆𝑥.𝗂𝗇𝖽𝟐(𝑦.𝟐;𝗍𝗍,𝖿𝖿;𝑥):𝟐→𝟐, so that 𝑔𝗍𝗍≡𝗍𝗍 and 𝑔𝖿𝖿≡𝖿𝖿, while the displayed body has no computation step when its scrutinee is the variable 𝑥. Boolean induction gives ℎ:=𝜆𝑥.𝗂𝗇𝖽𝟐(𝑦.𝖨𝖽𝟐(𝑦,𝑔𝑦);𝗋𝖾𝖿𝗅𝗍𝗍,𝗋𝖾𝖿𝗅𝖿𝖿;𝑥):∏𝑥:𝟐𝖨𝖽𝟐(𝑥,𝑔𝑥).
Hence 𝑒:=𝜒(𝜆𝑥.𝑥)𝑔ℎ:𝖨𝖽𝟐→𝟐(𝜆𝑥.𝑥,𝑔). Now the term 𝑏:=𝖩(𝑢.𝑣.𝑝.𝟐;𝑧.𝗍𝗍;𝑒):𝟐 is blocked: its outer computation rule Id-comp requires the eliminand to be 𝗋𝖾𝖿𝗅, and 𝑒 — an application of the variable 𝜒 — is not displayed in that form. Thus an inhabitant of 𝖥𝗎𝗇𝖾𝗑𝗍 supplies an identification but no new computation equation for eliminating it.
Every use of path induction in this chapter can be replayed with the following three-line check: genericcontext:𝑥,𝑦:𝐴,𝑝:𝖨𝖽𝐴(𝑥,𝑦),motive:𝐶(𝑥,𝑦,𝑝):U𝑗,clause:𝑑(𝑧):𝐶(𝑧,𝑧,𝗋𝖾𝖿𝗅𝑧). For inverse functoriality, 𝐶(𝑥,𝑦,𝑝) is the equality displayed in proposition 30.21(ii), and substituting 𝑦:=𝑥, 𝑝:=𝗋𝖾𝖿𝗅𝑥 produces its clause. Based induction first generalizes the fixed endpoint, applies this same audit, and then specializes it back. By contrast, the K-shaped family 𝑝:𝖨𝖽𝐴(𝑎,𝑎)⊢𝖨𝖽𝖨𝖽𝐴(𝑎,𝑎)(𝑝,𝗋𝖾𝖿𝗅𝑎):U𝑖 has already fixed both endpoints. It cannot occupy the generic motive line, which is the exact point where the K derivation stops.
★★★ Show that 𝖴𝖨𝖯 is hereditary: from a term of 𝖴𝖨𝖯𝐴, construct a term of 𝖴𝖨𝖯𝖨𝖽𝐴(𝑎,𝑏) for any 𝑎,𝑏:𝐴. Hint: put 𝐼:=𝖨𝖽𝐴(𝑎,𝑏), fix 𝑝:𝐼, and let 𝑐(𝑞):𝖨𝖽𝐼(𝑝,𝑞) be supplied by 𝖴𝖨𝖯𝐴. By based induction on 𝑟:𝖨𝖽𝐼(𝑝,𝑞), compare 𝑟 with the canonical composite 𝑐(𝑝)−1⋅𝑐(𝑞); the reflexivity case is an inverse law. Compare any two 𝑟,𝑠 through that same composite.
★★☆ Verify in detail that the term 𝑏 of example 30.37 is well-typed in the context 𝜒:𝖥𝗎𝗇𝖾𝗑𝗍𝟐,𝟐, and check that its outer 𝖩 computation rule does not apply. List the subterms that do compute and the variable-headed eliminators that remain blocked.
★☆☆ Let 𝑠:𝖥𝗎𝗇𝖾𝗑𝗍𝐴,𝐵 and fix 𝑓,𝑔:∏𝑥:𝐴𝐵. Unfold the two displayed Π-binders and derive 𝑠𝑓𝑔:𝖯𝗍(𝑓,𝑔)⟶𝖨𝖽∏𝑥:𝐴𝐵(𝑓,𝑔). Together with 𝗁𝖺𝗉𝗉𝗅𝗒𝑓,𝑔 of construction 30.34, write down the two maps between 𝖯𝗍(𝑓,𝑔) and 𝖨𝖽∏𝑥:𝐴𝐵(𝑓,𝑔). No inverse law is asserted.
★★☆ Starting from 𝖩, derive based path induction and use it to prove the left unit, inverse, and associativity laws for path composition. In each case display the motive before applying 𝖩 and explain why direct induction on an endpoint would be ill typed.
★★★Practical project.identity-eliminator-checker Implement in Agda or Kappa a checker for the displayed 𝖩 rule. Maintain the invariant that the motive is checked in the full endpoint-and-path context before the reflexivity branch is substituted. It must accept the based-induction derivation above and reject the same branch with the second endpoint left free; report the missing substitution in the rejection. Before implementing the checker, write the accepted and rejected derivation attempts on paper and circle the motive premise. The rejected tree must fail exactly because the second endpoint remains free after the reflexivity substitution.
Sources. Identity formation, reflexivity, and elimination originate in Martin-Löf’s intensional type theory [ML98, ML75, ML84]. Axiom K and its intensionality criterion are due to Streicher [Str93]; the groupoid countermodel is due to Hofmann and Streicher [HS98]. The derived path operations, based induction, singleton contraction, and groupoid laws are also developed in [Uni13].