Both operations ignore their proof arguments: 𝗌𝗒𝗆:=𝜆𝑝.𝗋𝖾𝖿𝗅,𝗍𝗋𝖺𝗇𝗌:=𝜆𝑝.𝜆𝑞.𝗋𝖾𝖿𝗅. In the first context, Eq-Reflect applied to 𝑝 gives 𝑎≡𝑏:𝐴, so 𝗋𝖾𝖿𝗅:𝖤𝗊𝐴(𝑎,𝑎) converts to an element of 𝖤𝗊𝐴(𝑏,𝑎). In the second, reflection applied to 𝑝,𝑞 and transitivity give 𝑎≡𝑐:𝐴, so 𝗋𝖾𝖿𝗅 converts to the required type. Every application 𝛽-reduces judgmentally to 𝗋𝖾𝖿𝗅; the rule Eq-Uniq gives the same conclusion for any extensionally equal implementation.
Define 𝗁𝖺𝗉𝗉𝗅𝗒:=𝜆𝑝.𝜆𝑥.𝗋𝖾𝖿𝗅. Reflection sends 𝑝:𝖤𝗊∏𝑥:𝐴𝐵(𝑓,𝑔) to 𝑓≡𝑔; application congruence then gives 𝑓(𝑥)≡𝑔(𝑥), so the displayed 𝗋𝖾𝖿𝗅 converts to the required pointwise equality.
Now 𝖿𝗎𝗇𝖾𝗑𝗍(ℎ):=𝗋𝖾𝖿𝗅. Hence 𝗁𝖺𝗉𝗉𝗅𝗒(𝖿𝗎𝗇𝖾𝗑𝗍(ℎ))≡𝜆𝑥.𝗋𝖾𝖿𝗅, while Eq-Uniq gives ℎ(𝑥)≡𝗋𝖾𝖿𝗅 for every 𝑥. Congruence and Π-𝜂 yield ℎ≡𝜆𝑥.𝗋𝖾𝖿𝗅. Conversely, 𝖿𝗎𝗇𝖾𝗑𝗍(𝗁𝖺𝗉𝗉𝗅𝗒(𝑝))≡𝗋𝖾𝖿𝗅≡𝑝, the last equality again being Eq-Uniq. Abstracting these equations shows that both composites are judgmentally the corresponding identity functions.
For the 𝐾 step, the typed encoding supplies an extensional equality term 𝑒𝐾⌜𝑥⌝⌜𝑦⌝:𝖤𝗊𝑋(⌜𝖪𝑥𝑦⌝,⌜𝑥⌝) in Γ𝖲𝖪. The two applications of 𝑒𝐾 check the endpoints at 𝑋; Eq-Reflect then concludes ⌜𝖪𝑥𝑦⌝≡⌜𝑥⌝. Thus the derivation has two separable stages: construct and check the extensional equality evidence, then reflect it. Erasing that evidence leaves no procedure for finding a witness among arbitrary conversion goals; equality reflection checks supplied evidence but does not decide its existence.
Let Θ:=(𝐴𝗍𝗒𝗉𝖾;𝑎:𝐴;𝑏:𝐴) be the parameter telescope of the raw former 𝖤𝗊(𝐴,𝑎,𝑏). Two substitutions from Γ into Θ are precisely triples 𝜎=(𝐴,𝑎,𝑏),𝜎′=(𝐴′,𝑎′,𝑏′), and an equality 𝜎≡𝜎′:Θ consists, from left to right, of Γ⊢𝐴≡𝐴′𝗍𝗒𝗉𝖾,Γ⊢𝑎≡𝑎′:𝐴,Γ⊢𝑏≡𝑏′:𝐴. The classified congruence scheme for the type-valued operator Θ⊢𝖤𝗊𝐴(𝑎,𝑏)𝗍𝗒𝗉𝖾 therefore has the instance Γ⊢𝐴≡𝐴′𝗍𝗒𝗉𝖾Γ⊢𝑎≡𝑎′:𝐴Γ⊢𝑏≡𝑏′:𝐴Γ⊢𝖤𝗊𝐴(𝑎,𝑏)≡𝖤𝗊𝐴′(𝑎′,𝑏′)𝗍𝗒𝗉𝖾Eq−F−eq. The fact that the third component is compared in the fiber over the unprimed 𝐴 is exactly the left-to-right convention for equality of classified substitutions; context conversion places the primed component in that same fiber.
Now suppose Γ⊢𝑎≡𝑏:𝐴. Rule Eq-I gives Γ⊢𝗋𝖾𝖿𝗅:𝖤𝗊𝐴(𝑎,𝑎). Apply the displayed congruence rule to 𝐴≡𝐴, 𝑎≡𝑎, and 𝑎≡𝑏. It yields Γ⊢𝖤𝗊𝐴(𝑎,𝑎)≡𝖤𝗊𝐴(𝑎,𝑏)𝗍𝗒𝗉𝖾, so Conv concludes Γ⊢𝗋𝖾𝖿𝗅:𝖤𝗊𝐴(𝑎,𝑏).
and its computation rule is 𝖩(𝑥.𝑦.𝑞.𝐶;𝑧.𝑐;𝗋𝖾𝖿𝗅𝑎)≡𝑐[𝑎/𝑧]:𝐶[𝑎/𝑥,𝑎/𝑦,𝗋𝖾𝖿𝗅𝑎/𝑞]. No uniqueness rule is assumed.
In the generic eliminator context, reflection applied to the variable 𝑞:𝖤𝗊𝐴(𝑥,𝑦) gives 𝑥≡𝑦:𝐴. Hence 𝗋𝖾𝖿𝗅𝑥:𝖤𝗊𝐴(𝑥,𝑥) converts to an element of 𝖤𝗊𝐴(𝑥,𝑦), and the family 𝐶(𝑥,𝑦,𝑞):=𝖤𝗊𝖤𝗊𝐴(𝑥,𝑦)(𝑞,𝗋𝖾𝖿𝗅𝑥) is well formed. Its diagonal fiber is 𝐶(𝑧,𝑧,𝗋𝖾𝖿𝗅𝑧)≡𝖤𝗊𝖤𝗊𝐴(𝑧,𝑧)(𝗋𝖾𝖿𝗅𝑧,𝗋𝖾𝖿𝗅𝑧), which has the branch 𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑧. Thus Eq-J constructs 𝑟(𝑝):=𝖩(𝑥.𝑦.𝑞.𝖤𝗊𝖤𝗊𝐴(𝑥,𝑦)(𝑞,𝗋𝖾𝖿𝗅𝑥);𝑧.𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑧;𝑝):𝖤𝗊𝖤𝗊𝐴(𝑎,𝑏)(𝑝,𝗋𝖾𝖿𝗅𝑎). Finally apply Eq-Reflect to 𝑟(𝑝). Its conclusion is exactly Γ⊢𝑝≡𝗋𝖾𝖿𝗅𝑎:𝖤𝗊𝐴(𝑎,𝑏), where the classifier of 𝗋𝖾𝖿𝗅𝑎 has already been converted along the endpoint equality reflected from 𝑝. This is Eq-Uniq. The argument used only formation, introduction, reflection, and the stated 𝐽-eliminator.
Work in the extended context Γ,𝑢:𝐵[𝑎/𝑥]. Weakening preserves 𝑝:𝖤𝗊𝐴(𝑎,𝑏), so reflection gives 𝑎≡𝑏:𝐴 there. Equal substitution into the family 𝐵 gives Γ,𝑢:𝐵[𝑎/𝑥]⊢𝐵[𝑎/𝑥]≡𝐵[𝑏/𝑥]𝗍𝗒𝗉𝖾. Consequently the variable 𝑢:𝐵[𝑎/𝑥] converts to an element of 𝐵[𝑏/𝑥], and Π-introduction discharges it:
Γ,𝑢:𝐵[𝑎/𝑥]⊢𝑢:𝐵[𝑎/𝑥]
Var
Γ,𝑢:𝐵[𝑎/𝑥]⊢𝑝:𝖤𝗊𝐴(𝑎,𝑏)
Γ,𝑢:𝐵[𝑎/𝑥]⊢𝑎≡𝑏:𝐴
Eq-Reflect
Γ,𝑢:𝐵[𝑎/𝑥],𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾
Γ,𝑢:𝐵[𝑎/𝑥]⊢𝐵[𝑎/𝑥]≡𝐵[𝑏/𝑥]𝗍𝗒𝗉𝖾
Subst-Eq-Ty
Γ,𝑢:𝐵[𝑎/𝑥]⊢𝑢:𝐵[𝑏/𝑥]
Conv
Γ⊢𝜆𝑢.𝑢:𝐵[𝑎/𝑥]→𝐵[𝑏/𝑥]
Π-I
The occurrences of the family and of 𝑝 in the tree are obtained by weakening and exchange; these structural steps are suppressed exactly as in the book’s compressed rule convention.
Fix 𝑎:𝐴 and 𝑝:𝖤𝗊𝐴(𝑎,𝑎), and put 𝐷(𝑥,𝑞):=𝖤𝗊𝖤𝗊𝐴(𝑥,𝑥)(𝑞,𝗋𝖾𝖿𝗅𝑥). At reflexivity the diagonal fiber is 𝐷(𝑥,𝗋𝖾𝖿𝗅𝑥)=𝖤𝗊𝖤𝗊𝐴(𝑥,𝑥)(𝗋𝖾𝖿𝗅𝑥,𝗋𝖾𝖿𝗅𝑥), with canonical inhabitant 𝑑(𝑥):=𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑥. The derived 𝐾-operator of theorem 35.9(3) therefore gives 𝑘𝑝:=𝖪(𝑥.𝑞.𝐷;𝑥.𝑑;𝑎,𝑝):𝐷(𝑎,𝑝)=𝖤𝗊𝖤𝗊𝐴(𝑎,𝑎)(𝑝,𝗋𝖾𝖿𝗅𝑎). By its definition in that theorem, 𝑘𝑝≡𝑑(𝑎)≡𝗋𝖾𝖿𝗅𝗋𝖾𝖿𝗅𝑎; the classifier is changed from 𝐷(𝑎,𝗋𝖾𝖿𝗅𝑎) to 𝐷(𝑎,𝑝) using Eq-Uniq on 𝑝.
There is also the direct construction. Rule Eq-Uniq gives 𝑝≡𝗋𝖾𝖿𝗅𝑎:𝖤𝗊𝐴(𝑎,𝑎); hence Eq-I followed by conversion gives 𝑑𝑝:=𝗋𝖾𝖿𝗅𝑝:𝖤𝗊𝖤𝗊𝐴(𝑎,𝑎)(𝑝,𝗋𝖾𝖿𝗅𝑎)=𝐷(𝑎,𝑝). The annotation on the printed reflexivity term is immaterial after the conversion: both 𝑘𝑝 and 𝑑𝑝 are judgmentally equal to the unique reflexivity inhabitant of 𝐷(𝑎,𝑝). Thus Γ⊢𝑘𝑝≡𝑑𝑝:𝐷(𝑎,𝑝). Applying theorem 35.7(1) at the ambient type 𝐷(𝑎,𝑝) internalizes this comparison: Γ⊢𝗋𝖾𝖿𝗅:𝖤𝗊𝐷(𝑎,𝑝)(𝑘𝑝,𝑑𝑝). So the 𝐾-construction and the direct uniqueness construction agree both judgmentally and internally.
Let 𝑝:𝖨𝖽𝐴(𝑎,𝑏), 𝑞:𝖨𝖽𝐴(𝑏,𝑐), and 𝑢:𝐵(𝑎). By proposition 35.10, after the corresponding endpoint conversions, 𝑝≡𝗋𝖾𝖿𝗅𝑎,𝑞≡𝗋𝖾𝖿𝗅𝑎. Congruence therefore reduces the left-hand side of the transport law as follows: 𝗍𝗋𝐵𝑝⋅𝑞(𝑢)≡𝗍𝗋𝐵𝗋𝖾𝖿𝗅⋅𝗋𝖾𝖿𝗅(𝑢)≡𝗍𝗋𝐵𝗋𝖾𝖿𝗅(𝑢)bythe𝐽-computationruledefiningcomposition≡𝑢bythe𝐽-computationruledefiningtransport. The right-hand side has the parallel calculation 𝗍𝗋𝐵𝑞(𝗍𝗋𝐵𝑝(𝑢))≡𝗍𝗋𝐵𝗋𝖾𝖿𝗅(𝗍𝗋𝐵𝗋𝖾𝖿𝗅(𝑢))≡𝗍𝗋𝐵𝗋𝖾𝖿𝗅(𝑢)≡𝑢, where the last two lines are the inner and outer instances of the transport computation rule. Transitivity gives the displayed law.
For inverse and composition, the same replacement gives (𝑝⋅𝑞)−1≡(𝗋𝖾𝖿𝗅⋅𝗋𝖾𝖿𝗅)−1≡𝗋𝖾𝖿𝗅−1≡𝗋𝖾𝖿𝗅,𝑞−1⋅𝑝−1≡𝗋𝖾𝖿𝗅−1⋅𝗋𝖾𝖿𝗅−1≡𝗋𝖾𝖿𝗅⋅𝗋𝖾𝖿𝗅≡𝗋𝖾𝖿𝗅. Here 𝗋𝖾𝖿𝗅⋅𝗋𝖾𝖿𝗅≡𝗋𝖾𝖿𝗅 is the computation rule for path composition and 𝗋𝖾𝖿𝗅−1≡𝗋𝖾𝖿𝗅 is the computation rule for inverse. Both sides are consequently judgmentally the same reflexivity term.
Suppose first that 𝐴 is a proposition. Every fiber 𝐵(𝑥) is a proposition by hypothesis, so ∑𝑥:𝐴𝐵 is a proposition by lemma 35.15(4).
Conversely, assume 𝑆:=∑𝑥:𝐴𝐵 is a proposition. In the generic context Γ,𝑥:𝐴,𝑦:𝐴, the section gives (𝑥,𝑠(𝑥)):𝑆,(𝑦,𝑠(𝑦)):𝑆. Proposition-hood of 𝑆 yields (𝑥,𝑠(𝑥))≡(𝑦,𝑠(𝑦)):𝑆. Apply congruence of the first projection and then the two Σ-beta rules: 𝑥≡𝗉𝗋1((𝑥,𝑠(𝑥)))≡𝗉𝗋1((𝑦,𝑠(𝑦)))≡𝑦:𝐴. This is precisely the generic judgment asserting that 𝐴 is a proposition. The section is essential for this direction: it embeds every 𝑥:𝐴 into the dependent sum.
If ℕ were a proposition, substitution into its generic equality would give ⋅⊢𝟢≡𝗌𝗎𝖼(𝟢):ℕ. In the set interpretation of proposition 35.4, these terms denote 0 and 1, respectively. Soundness would force 0=1, a contradiction. Hence ℕ is not a proposition.
More generally, let 𝐴 be closed and let 𝑎:𝐴 be closed. If 𝐴+𝐴 were a proposition, then its two closed inhabitants would be judgmentally equal: ⋅⊢𝗂𝗇𝗅(𝑎)≡𝗂𝗇𝗋(𝑎):𝐴+𝐴. The set interpretation of a coproduct is a tagged disjoint union. The first term denotes the left-tagged element (0,[[𝑎]]), while the second denotes the right-tagged element (1,[[𝑎]]); these are unequal regardless of the value of [[𝑎]]. Soundness rules out the displayed judgment, so 𝐴+𝐴 is not a proposition.
Write 𝜂𝐴:=𝜆𝑎.|𝑎|:𝐴⟶‖𝐴‖. Assume first that 𝐴 is a proposition. Since Tr-E permits elimination into propositions, define 𝑟𝐴:=𝜆𝑡.𝗋𝖾𝖼‖𝐴‖(𝑎.𝑎,𝑡):‖𝐴‖⟶𝐴. For every 𝑎:𝐴, both 𝑟𝐴(𝜂𝐴(𝑎)) and 𝑎 inhabit the proposition 𝐴, hence 𝑟𝐴(𝜂𝐴(𝑎))≡𝑎. Lambda congruence and Π-eta give 𝑟𝐴∘𝜂𝐴≡𝜆𝑎.𝑎. Likewise, for every 𝑡:‖𝐴‖, the terms 𝜂𝐴(𝑟𝐴(𝑡)) and 𝑡 inhabit the proposition ‖𝐴‖, so 𝜂𝐴∘𝑟𝐴≡𝜆𝑡.𝑡. Thus the retraction is automatically a judgmental two-sided inverse; no computation rule for truncation is needed.
Conversely, suppose there is 𝑟:‖𝐴‖→𝐴 with 𝑟∘𝜂𝐴≡𝜆𝑎.𝑎. In context 𝑥:𝐴,𝑦:𝐴, rule Tr-Uniq gives 𝜂𝐴(𝑥)≡𝜂𝐴(𝑦). Application congruence and the retraction equation then give 𝑥≡𝑟(𝜂𝐴(𝑥))≡𝑟(𝜂𝐴(𝑦))≡𝑦:𝐴. Therefore 𝐴 is a proposition.
Finally ‖𝐴‖ is always a proposition. Applying the first part to it gives the judgmental isomorphism 𝜂‖𝐴‖:‖𝐴‖⟶‖‖𝐴‖‖,𝜇𝐴:=𝜆𝑇.𝗋𝖾𝖼‖‖𝐴‖‖(𝑡.𝑡,𝑇):‖‖𝐴‖‖⟶‖𝐴‖, with both composites judgmentally equal to the corresponding identity functions.
For 𝑓:𝐴→𝐵, define ‖𝑓‖:=𝜆𝑡.𝗋𝖾𝖼‖𝐴‖(𝑥.|𝑓(𝑥)|,𝑡):‖𝐴‖⟶‖𝐵‖. The branch has type ‖𝐵‖, and this target is a proposition by Tr-Uniq, so Tr-E applies.
For every 𝑡:‖𝐴‖, the terms (‖𝜆𝑥.𝑥‖)(𝑡) and 𝑡 are two inhabitants of ‖𝐴‖. Proposition-hood gives their judgmental equality; lambda congruence followed by eta therefore gives ‖𝜆𝑥.𝑥‖≡𝜆𝑡.𝑡. Now let 𝑓:𝐴→𝐵 and 𝑔:𝐵→𝐶. For each 𝑡:‖𝐴‖, both (‖𝑔∘𝑓‖)(𝑡)and(‖𝑔‖)((‖𝑓‖)(𝑡)) inhabit the proposition ‖𝐶‖. Hence they are judgmentally equal, and extensional congruence for lambdas plus eta yields ‖𝑔∘𝑓‖≡(‖𝑔‖)∘(‖𝑓‖). These functor laws use only uniqueness of inhabitants of the codomain truncations, not a primitive beta rule for Tr-E.
Recall 𝐴∨𝐵:=‖𝐴+𝐵‖. Define the symmetry map by 𝗌𝗐𝖺𝗉𝐴,𝐵(𝑡):=𝗋𝖾𝖼‖𝐴+𝐵‖(𝑧.𝗂𝗇𝖽+(𝑎.|𝗂𝗇𝗋(𝑎)|,𝑏.|𝗂𝗇𝗅(𝑏)|,𝑧),𝑡). Its codomain is 𝐵∨𝐴=‖𝐵+𝐴‖, hence a proposition, so the truncation elimination is valid. The reverse is 𝗌𝗐𝖺𝗉𝐵,𝐴. Both composites are endomaps of a proposition; therefore, pointwise by Tr-Uniq and then by lambda congruence and eta, 𝗌𝗐𝖺𝗉𝐵,𝐴∘𝗌𝗐𝖺𝗉𝐴,𝐵≡𝗂𝖽𝐴∨𝐵,𝗌𝗐𝖺𝗉𝐴,𝐵∘𝗌𝗐𝖺𝗉𝐵,𝐴≡𝗂𝖽𝐵∨𝐴.
For associativity abbreviate 𝐿:=(𝐴∨𝐵)∨𝐶=‖‖𝐴+𝐵‖+𝐶‖,𝑅:=𝐴∨(𝐵∨𝐶)=‖𝐴+‖𝐵+𝐶‖‖. First define a helper ℎ:‖𝐴+𝐵‖→𝑅 by ℎ(𝑤):=𝗋𝖾𝖼‖𝐴+𝐵‖(𝑧.𝗂𝗇𝖽+(𝑎.|𝗂𝗇𝗅(𝑎)|,𝑏.|𝗂𝗇𝗋(|𝗂𝗇𝗅(𝑏)|)|,𝑧),𝑤). Then set 𝛼(𝑡):=𝗋𝖾𝖼‖‖𝐴+𝐵‖+𝐶‖(𝑧.𝗂𝗇𝖽+(𝑤.ℎ(𝑤),𝑐.|𝗂𝗇𝗋(|𝗂𝗇𝗋(𝑐)|)|,𝑧),𝑡):𝑅. All recursors eliminate into the proposition 𝑅.
For the reverse map define 𝑘:‖𝐵+𝐶‖→𝐿 by 𝑘(𝑤):=𝗋𝖾𝖼‖𝐵+𝐶‖(𝑧.𝗂𝗇𝖽+(𝑏.|𝗂𝗇𝗅(|𝗂𝗇𝗋(𝑏)|)|,𝑐.|𝗂𝗇𝗋(𝑐)|,𝑧),𝑤), and put 𝛽(𝑡):=𝗋𝖾𝖼‖𝐴+‖𝐵+𝐶‖‖(𝑧.𝗂𝗇𝖽+(𝑎.|𝗂𝗇𝗅(|𝗂𝗇𝗅(𝑎)|)|,𝑤.𝑘(𝑤),𝑧),𝑡):𝐿. Again every truncation elimination has propositional target. Since both 𝐿 and 𝑅 are propositions, for every input the corresponding composite and identity value are judgmentally equal. Function congruence and eta therefore give 𝛽∘𝛼≡𝗂𝖽𝐿,𝛼∘𝛽≡𝗂𝖽𝑅. No nested computation calculation is required: truncation uniqueness makes all maps between the same proposition-valued source and target agree pointwise.
An element of 𝖯𝗋𝗈𝗉0=∑𝑋:U0𝗂𝗌𝖯𝗋𝗈𝗉(𝑋) is a small type together with a term witnessing that any two of its elements are extensionally equal. Put 𝑞𝟏:=𝜆𝑥.𝜆𝑦.𝗋𝖾𝖿𝗅,𝑞𝟎:=𝜆𝑥.𝜆𝑦.𝖺𝖻𝗈𝗋𝗍𝖤𝗊𝟎(𝑥,𝑦)(𝑥). For 𝑞𝟏, unit eta gives 𝑥≡𝑦, so the printed reflexivity term converts to the required equality type. Hence the codes for truth and falsehood are ⊤0:=(𝟏,𝑞𝟏),⊥0:=(𝟎,𝑞𝟎).
Let 𝜑,𝜓:𝖯𝗋𝗈𝗉0, and abbreviate 𝑃:=𝜑∘,𝑄:=𝜓∘,𝑞𝑃:=𝗉𝗋2(𝜑),𝑞𝑄:=𝗉𝗋2(𝜓). For generic 𝑢,𝑣:𝑃×𝑄, reflection applies to 𝑞𝑃(𝗉𝗋1𝑢)(𝗉𝗋1𝑣)and𝑞𝑄(𝗉𝗋2𝑢)(𝗉𝗋2𝑣). Pair congruence and Σ-eta then give 𝑢≡𝑣. Thus 𝑞𝑃∧𝑄:=𝜆𝑢.𝜆𝑣.𝗋𝖾𝖿𝗅:𝗂𝗌𝖯𝗋𝗈𝗉(𝑃×𝑄). For generic 𝑓,𝑔:𝑃→𝑄, reflection applied to 𝑞𝑄(𝑓(𝑥))(𝑔(𝑥)) gives 𝑓(𝑥)≡𝑔(𝑥); lambda congruence and Π-eta give 𝑓≡𝑔. Hence 𝑞𝑃⇒𝑄:=𝜆𝑓.𝜆𝑔.𝗋𝖾𝖿𝗅:𝗂𝗌𝖯𝗋𝗈𝗉(𝑃→𝑄). The required elements are therefore 𝜑∧0𝜓:=(𝑃×𝑄,𝑞𝑃∧𝑄),𝜑⇒0𝜓:=(𝑃→𝑄,𝑞𝑃⇒𝑄). Universe closure under Σ and Π places both first components in U0.
More generally, suppose 𝐴:U0, 𝑥:𝐴⊢𝐵:U0, and 𝑞:∏𝑥:𝐴𝗂𝗌𝖯𝗋𝗈𝗉(𝐵). Rule U-Pi gives ∏𝑥:𝐴𝐵:U0. Define 𝑞Π:=𝜆𝑓.𝜆𝑔.𝗋𝖾𝖿𝗅. Indeed, in context 𝑥:𝐴, reflection applied to 𝑞(𝑥)(𝑓(𝑥))(𝑔(𝑥)) gives 𝑓(𝑥)≡𝑔(𝑥):𝐵; lambda congruence and eta give 𝑓≡𝑔. Thus (∏𝑥:𝐴𝐵,𝑞Π):𝖯𝗋𝗈𝗉0 has the requested underlying type.
Now let 𝐴:U0 and 𝑎,𝑏:𝐴. Rule Eq-Form-U gives Γ⊢𝖤𝗊𝐴(𝑎,𝑏):U0. For generic 𝑝,𝑟:𝖤𝗊𝐴(𝑎,𝑏), two applications of Eq-Uniq give 𝑝≡𝗋𝖾𝖿𝗅≡𝑟. Consequently 𝑞=:=𝜆𝑝.𝜆𝑟.𝗋𝖾𝖿𝗅:𝗂𝗌𝖯𝗋𝗈𝗉(𝖤𝗊𝐴(𝑎,𝑏)), and the desired equality proposition is represented by (𝖤𝗊𝐴(𝑎,𝑏),𝑞=):𝖯𝗋𝗈𝗉0.
Finally assume a small truncation code, so that 𝑇:U0 implies ‖𝑇‖:U0 with the stated decoding equation. Universe closure first gives ∑𝑥:𝐴𝐵:U0 and 𝑃+𝑄:U0. Rule Tr-Uniq makes each truncation a proposition; explicit witnesses are 𝑞∃:=𝜆𝑢.𝜆𝑣.𝗋𝖾𝖿𝗅,𝑞∨:=𝜆𝑢.𝜆𝑣.𝗋𝖾𝖿𝗅, where the displayed reflexivity terms typecheck after the corresponding Tr-Uniq judgment 𝑢≡𝑣. Hence (‖∑𝑥:𝐴𝐵‖,𝑞∃),(‖𝑃+𝑄‖,𝑞∨):𝖯𝗋𝗈𝗉0 are the universe-coded existential and disjunction.
In 𝑇𝐼, define the motive 𝑀(𝑥,𝑦,𝑞):=∏𝑟:𝖨𝖽𝐴(𝑥,𝑦)𝖨𝖽𝖨𝖽𝐴(𝑥,𝑦)(𝑟,𝑞). At the diagonal it becomes 𝑀(𝑧,𝑧,𝗋𝖾𝖿𝗅𝑧)=∏𝑟:𝖨𝖽𝐴(𝑧,𝑧)𝖨𝖽𝖨𝖽𝐴(𝑧,𝑧)(𝑟,𝗋𝖾𝖿𝗅𝑧), so the required branch is exactly 𝑧.𝜆𝑟.𝗎𝗂𝗉(𝑟). The full primitive two-endpoint 𝐽-term is therefore 𝑈(𝑞):=𝖩(𝑥.𝑦.𝑞.∏𝑟:𝖨𝖽𝐴(𝑥,𝑦)𝖨𝖽𝖨𝖽𝐴(𝑥,𝑦)(𝑟,𝑞);𝑧.𝜆𝑟.𝗎𝗂𝗉(𝑟);𝑞). For arbitrary 𝑎,𝑏:𝐴 and 𝑞:𝖨𝖽𝐴(𝑎,𝑏), rule Id-elim gives 𝑈(𝑞):∏𝑟:𝖨𝖽𝐴(𝑎,𝑏)𝖨𝖽𝖨𝖽𝐴(𝑎,𝑏)(𝑟,𝑞). Consequently, for 𝑝,𝑞:𝖨𝖽𝐴(𝑎,𝑏), 𝑈(𝑞)(𝑝):𝖨𝖽𝖨𝖽𝐴(𝑎,𝑏)(𝑝,𝑞), which is the required general UIP inhabitant. At 𝑞=𝗋𝖾𝖿𝗅𝑎, the primitive computation rule verifies 𝑈(𝗋𝖾𝖿𝗅𝑎)≡𝜆𝑟.𝗎𝗂𝗉(𝑟):𝑀(𝑎,𝑎,𝗋𝖾𝖿𝗅𝑎), so the diagonal clause and the arbitrary-endpoint classifier both agree literally with the statement of the exercise.
For Conv, suppose the final source rule is Γ⊢𝑎:𝐴Γ⊢𝐴≡𝐴′𝗍𝗒𝗉𝖾Γ⊢𝑎:𝐴′Conv. The induction hypotheses give strip(Γ)⊢strip(𝑎):strip(𝐴),strip(Γ)⊢strip(𝐴)≡strip(𝐴′)𝗍𝗒𝗉𝖾. Applying Conv in 𝑇𝐸 gives strip(Γ)⊢strip(𝑎):strip(𝐴′), which is exactly the stripping of the source conclusion. No special equation about the two new constants is needed in this case.
For Subst-Eq-Ty, suppose the source derivation ends in Γ⊢𝑎≡𝑎′:𝐴Γ,𝑥:𝐴,Δ⊢𝐵𝗍𝗒𝗉𝖾Γ,Δ[𝑎/𝑥]⊢𝐵[𝑎/𝑥]≡𝐵[𝑎′/𝑥]𝗍𝗒𝗉𝖾Subst−Eq−Ty. For compactness in this case put 𝐺:=strip(Γ),𝐷:=strip(Δ),𝐴s:=strip(𝐴),𝑎s:=strip(𝑎),𝑎′s:=strip(𝑎′),𝐵s:=strip(𝐵). The induction hypotheses are 𝐺⊢𝑎s≡𝑎′s:𝐴s,𝐺,𝑥:𝐴s,𝐷⊢𝐵s𝗍𝗒𝗉𝖾. Apply Subst-Eq-Ty in 𝑇𝐸: 𝐺,𝐷[𝑎s/𝑥]⊢𝐵s[𝑎s/𝑥]≡𝐵s[𝑎′s/𝑥]𝗍𝗒𝗉𝖾. By lemma 35.28, componentwise also for telescopes, strip(Δ[𝑎/𝑥])=𝐷[𝑎s/𝑥],strip(𝐵[𝑎/𝑥])=𝐵s[𝑎s/𝑥],strip(𝐵[𝑎′/𝑥])=𝐵s[𝑎′s/𝑥]. Substituting these literal equalities into the last judgment gives the componentwise stripping of the source conclusion: its context is strip(Γ,Δ[𝑎/𝑥]), and its two types are strip(𝐵[𝑎/𝑥]) and strip(𝐵[𝑎′/𝑥]). This is the point at which commutation of stripping with capture-avoiding substitution is load-bearing rather than cosmetic.
Define the iterate 𝑖:ℕ→ℕ by primitive recursion: 𝑖(𝟢)≡𝟢,𝑖(𝗌𝗎𝖼𝑛)≡𝗌𝗎𝖼(𝑖(𝑛)). This is the term denoted 𝗌𝗎𝖼𝑥(𝟢) when evaluated at 𝑥. Use the motive 𝐶(𝑥):=𝖨𝖽ℕ(𝑥,𝑖(𝑥)). The base case is 𝑐0:=𝗋𝖾𝖿𝗅𝟢:𝐶(𝟢), since 𝑖(𝟢)≡𝟢. For the step, assume 𝑛:ℕ and 𝑝:𝐶(𝑛). Congruence of successor gives 𝖺𝗉𝗌𝗎𝖼(𝑝):𝖨𝖽ℕ(𝗌𝗎𝖼𝑛,𝗌𝗎𝖼(𝑖(𝑛))). Because 𝑖(𝗌𝗎𝖼𝑛)≡𝗌𝗎𝖼(𝑖(𝑛)), conversion gives 𝖺𝗉𝗌𝗎𝖼(𝑝):𝐶(𝗌𝗎𝖼𝑛). Hence Nat elimination constructs 𝑃:=𝜆𝑥.𝗂𝗇𝖽ℕ(𝑥.𝐶(𝑥);𝑐0,𝑛.𝑝.𝖺𝗉𝗌𝗎𝖼(𝑝);𝑥):∏𝑥:ℕ𝖨𝖽ℕ(𝑥,𝑖(𝑥)). In particular, in context 𝑥:ℕ, 𝑥:ℕ⊢𝑃(𝑥):𝖨𝖽ℕ(𝑥,𝗌𝗎𝖼𝑥(𝟢)). Applying Id-Reflect in 𝑇𝐸 yields 𝑥:ℕ⊢𝑥≡𝗌𝗎𝖼𝑥(𝟢):ℕ. This is only a derivability claim in the extensional theory. The construction supplies no converse theorem asserting that the displayed judgmental equation is underivable in 𝑇𝐼.
Every code ⌜𝑡⌝ has type 𝑋 in Γ𝖲𝖪. The closure cases in the induction proving lemma 35.46 are therefore as follows.
For encoded reflexivity, term reflexivity gives Γ𝖲𝖪⊢⌜𝑡⌝:𝑋Γ𝖲𝖪⊢⌜𝑡⌝≡⌜𝑡⌝:𝑋Tm−Refl. If the induction hypothesis for 𝑡∼𝑢 is ⌜𝑡⌝≡⌜𝑢⌝:𝑋, term symmetry gives ⌜𝑢⌝≡⌜𝑡⌝:𝑋. If the hypotheses for 𝑡∼𝑢 and 𝑢∼𝑣 give ⌜𝑡⌝≡⌜𝑢⌝:𝑋,⌜𝑢⌝≡⌜𝑣⌝:𝑋, term transitivity gives ⌜𝑡⌝≡⌜𝑣⌝:𝑋.
For SK-App, suppose ⌜𝑡⌝≡⌜𝑡′⌝:𝑋,⌜𝑢⌝≡⌜𝑢′⌝:𝑋. Since 𝑎𝑝𝑝:∏𝑥:𝑋∏𝑦:𝑋𝑋, application congruence first gives 𝑎𝑝𝑝⌜𝑡⌝≡𝑎𝑝𝑝⌜𝑡′⌝:∏𝑦:𝑋𝑋, and a second application-congruence step gives 𝑎𝑝𝑝⌜𝑡⌝⌜𝑢⌝≡𝑎𝑝𝑝⌜𝑡′⌝⌜𝑢′⌝:𝑋. By the recursive definition of coding, this is ⌜𝑡𝑢⌝≡⌜𝑡′𝑢′⌝:𝑋.
The two generating conversion cases are the only places where an equation hypothesis from the context is consumed. Specifically, 𝑒𝐾⌜𝑡⌝⌜𝑢⌝:𝖤𝗊𝑋(⌜𝖪𝑡𝑢⌝,⌜𝑡⌝) and 𝑒𝑆⌜𝑡⌝⌜𝑢⌝⌜𝑣⌝:𝖤𝗊𝑋(⌜𝖲𝑡𝑢𝑣⌝,⌜(𝑡𝑣)(𝑢𝑣)⌝) are reflected by Eq-Reflect. All remaining steps are typing, structural rules, or the reflexive, symmetric, transitive, and congruence closure of judgmental equality. Thus 𝑒𝐾 and 𝑒𝑆 are exactly the nonstructural equation families used by the soundness proof.
Let Γ:=𝑋:U0,𝑝:𝖤𝗊U0(𝑋,𝑋→𝑋). First, Var gives 𝑋:U0. Weakening this judgment to Γ,𝑥:𝑋, followed by U-Pi, gives Γ⊢𝑋→𝑋:U0. Consequently Eq-F forms the declared type of 𝑝, and Var gives Γ⊢𝑝:𝖤𝗊U0(𝑋,𝑋→𝑋). There is exactly one use of equality reflection in the derivation: Γ⊢𝑝:𝖤𝗊U0(𝑋,𝑋→𝑋)Γ⊢𝑋≡𝑋→𝑋:U0Eq−Reflect. Rule U-El-Eq converts this equality between universe elements into an equality of types: 𝐸:Γ⊢𝑋≡𝑋→𝑋𝗍𝗒𝗉𝖾. Every later use of the identification is an ordinary conversion along 𝐸 or its weakening, not another use of Eq-Reflect.
In context Γ,𝑥:𝑋, variable formation gives 𝑥:𝑋. Converting that same variable along 𝐸 gives 𝑥:𝑋→𝑋. Hence Π-elimination derives Γ,𝑥:𝑋⊢𝑥:𝑋Γ,𝑥:𝑋⊢𝑋≡𝑋→𝑋𝗍𝗒𝗉𝖾Γ,𝑥:𝑋⊢𝑥:𝑋→𝑋ConvΓ,𝑥:𝑋⊢𝑥:𝑋Γ,𝑥:𝑋⊢𝑥𝑥:𝑋Π−E. Discharging 𝑥 gives 𝜔:=𝜆𝑥.𝑥𝑥:𝑋→𝑋. Symmetry of 𝐸 and Conv also give 𝜔:𝑋. The final application therefore has the complete typing step Γ⊢𝜔:𝑋→𝑋Γ⊢𝜔:𝑋→𝑋Γ⊢𝑋→𝑋≡𝑋𝗍𝗒𝗉𝖾Γ⊢𝜔:𝑋ConvΓ⊢𝜔𝜔:𝑋Π−E. Thus Ω:=𝜔𝜔:𝑋, and ordinary beta reduction gives Ω⟶𝛽(𝜆𝑥.𝑥𝑥)(𝜆𝑥.𝑥𝑥)=Ω. The sole reflection step is the one displayed above; its consequence is reused structurally throughout the derivation.