exercise 79.1.
The unique introduction of ⊤ gives ⊤ →(⊥ →⊥) by the identity function on an assumed contradiction, and any function ⊥ →⊥ maps to the unique proof of ⊤. For 𝑓,𝑔 :⊥ →⊥, function eta reduces equality to equality of 𝑓(𝑥) and 𝑔(𝑥) under 𝑥 :⊥; Irr identifies these proofs judgmentally. Thus ⊥ →⊥ has the same introduction, elimination, and irrelevance rules as ⊤.
exercise 79.2.
Given 𝑧 :∃(𝑥 :𝑃).𝑄(𝑥) and a motive 𝐶(𝑧) :𝖲𝖯𝗋𝗈𝗉, with branch 𝑑 :Π𝑥:𝑃Π𝑦:𝑄(𝑥)𝐶(⟨𝑥,𝑦⟩), define the eliminator by first using Ex-E1 to obtain a witness 𝑥 and then Ex-E2 to obtain the corresponding 𝑦. The produced proof has type 𝐶(⟨𝑥,𝑦⟩); Irr converts it to 𝐶(𝑧) because all inhabitants of the existential proposition, and hence their motive fibers, are proof irrelevant. The constructor computation follows by both elimination computations and Irr.
exercise 79.3.
A closed derivation of ⊥ already makes the theory inconsistent, so a metarule using only such a derivation to produce a closed inhabitant adds no new behavior in a consistent theory. By contrast, a variable ℎ :𝟎 is a neutral relevant term; large elimination turns it into a neutral term of every data type. Declaring those proofs irrelevant can identify eliminations that compute through different relevant structures, so compatibility with reduction and confluence—hence decidable conversion and kernel rechecking—must be proved. The at-risk demand is normalization/ decidable judgmental equality, not merely logical consistency.
exercise 79.4.
Reflexivity has motive 𝜆𝑥.𝑥 ≈𝐴𝑥 in 𝖲𝖯𝗋𝗈𝗉. Symmetry transports a proof along the swapped endpoint family, and transitivity transports along the second equality; all proof-dependent choices are repaired by Irr. For dependent 𝑓, take 𝑒 :𝐴(𝑡,𝑢) to obtain the type equality 𝖺𝗉𝐵(𝑒) :𝐵(𝑡) =𝐵(𝑢). Cast 𝑓𝑡 along it, then use observational congruence of application and the transport rule for 𝑓 to produce 𝖼𝖺𝗌𝗍(𝐵(𝑡),𝐵(𝑢),𝖺𝗉𝐵(𝑒),𝑓𝑡) ≈𝐵(𝑢)𝑓𝑢. The motive is proposition-valued, so proof irrelevance closes the coherence.
exercise 79.5.
For 𝑛 +0 =𝑛, eliminate 𝑛 with motive 𝐶(𝑛) =𝑛 +0 ≈ℕ𝑛. The zero branch is reflexivity; the successor branch maps the induction proof through the successor clause of observational equality. For 0 +𝑛 =𝑛, recurse in the argument on which addition is defined: the zero case is reflexivity and the successor case is again successor congruence. With the recursion orientation 𝑚 +0 =𝑚 and 𝑚 +𝗌𝗎𝖼𝑛 =𝗌𝗎𝖼(𝑚 +𝑛), the second construction is immediate by induction on 𝑛, whereas the first uses induction on 𝑛 to expose the left argument.
exercise 79.6.
Universe equality of W-types consists of 𝑒𝐴 :𝐴 ≈U𝐴′ and, after contravariantly casting an 𝑎′ :𝐴′ back to 𝐴, equality of arities 𝐵(𝑎) ≈U𝐵′(𝑎′). Equality of 𝗌𝗎𝗉(𝑎,𝑓) and 𝗌𝗎𝗉(𝑎′,𝑓′) consists of a root equality 𝑟 :𝑎 ∼𝑎′ and pointwise equality of child functions after casting indices and subtree types along the arity equality. In the numeral encoding, distinct raw child functions have empty domains at zero and propositionally corresponding domains at successors; function observational equality therefore identifies them whenever they encode the same recursive children.
exercise 79.7.
In the full rule the motive may mention the equality proof 𝑒. Replace it by the nondependent family obtained by fixing one proof 𝑒0. For any other 𝑒, Irr gives 𝑒 ≡𝑒0, and context conversion changes the fixed-family result to the desired fiber at 𝑒. Thus nondependent transport followed by proof-irrelevance conversion derives the proof-dependent rule.
exercise 79.8.
For 𝑒 :Π𝑥:𝐴𝐵(𝑥) ≈UΠ𝑥′:𝐴′𝐵′(𝑥′), 𝗉𝗋1𝑒 equates 𝐴 with 𝐴′. Given 𝑎′ :𝐴′, cast it contravariantly to 𝑎 :𝐴. The second component supplies 𝐵(𝑎) ≈U𝐵′(𝑎′) at this pair of related arguments. Hence 𝑓(𝑎) :𝐵(𝑎) may be cast along that equality to 𝐵′(𝑎′). Abstracting over 𝑎′ gives a term of Π𝑎′:𝐴′𝐵′(𝑎′), as required.
exercise 79.9.
If a neutral 𝑛 :ℕ were reduced by a general same-type cast rule, later substitution 𝑛 :=0 would overlap Cast-Nat-Z, while 𝑛 :=𝗌𝗎𝖼𝑚 would overlap Cast-Nat-S; without knowing the equality proof is reflexive, the two reduct schemes need not join. For a type variable 𝑋 there is no head constructor selecting a structural cast clause at all. Thus only Cast-Refl removes the cast when its equality evidence computes to reflexivity; otherwise the cast must remain neutral.
exercise 79.10.
By definition 𝗌𝗎𝖻𝗌𝗍𝐵(𝑒,𝑝) is cast from 𝐵(𝑡) to 𝐵(𝑢) along 𝖺𝗉𝐵(𝑒). For 𝑒 =𝗋𝖾𝖿𝗅(𝑡), the groupoid computation gives 𝖺𝗉𝐵(𝑒) =𝗋𝖾𝖿𝗅(𝐵(𝑡)). Cast-Refl reduces the cast to 𝑝, and observational reflexivity yields 𝗌𝗎𝖻𝗌𝗍𝐵(𝗋𝖾𝖿𝗅(𝑡),𝑝) ≈𝐵(𝑡)𝑝.
exercise 79.11.
Reflexivity of 𝑅 is commutativity of addition; symmetry swaps the two sides; transitivity cancels the common middle summands after associating and commuting. These equalities are observational proofs in ℕ. For the displayed representatives the quotient rule reduces their equality to 𝗌𝗎𝖼0+𝗌𝗎𝖼0≈ℕ𝗌𝗎𝖼(𝗌𝗎𝖼0)+0, then addition computation reduces both sides to 𝗌𝗎𝖼(𝗌𝗎𝖼0). The natural observational-equality clause reduces this through two successor steps and the zero clause to ⊤.
exercise 79.12.
Precomposition sends 𝑔 :𝐴/𝑅 →𝐶 to 𝑓 =𝑔𝜋; congruence of 𝑔 applied to the quotient path constructor supplies preservation of 𝑅. Conversely the quotient eliminator extends an 𝑅-respecting 𝑓 to ¯𝑓 with ¯𝑓(𝜋𝑎) ≡𝑓(𝑎). One composite is the computation rule. Quotient induction proves the other pointwise on 𝜋𝑎, and function observational equality promotes it to equality of maps. Thus the two constructions are a bijection up to ≈.
exercise 79.13.
For heterogeneous evidence (𝑒,𝑞), coercion is 𝖼𝖺𝗌𝗍(𝑆,𝑇,𝑒,𝑠) and coherence is 𝑞; symmetry uses inverse type equality and inverse cast coherence, while transitivity composes the type equalities and uses cast composition. When 𝑆 ≡𝑇, map ordinary observational equality 𝑞 :𝑠 ∼𝑡 to (𝗋𝖾𝖿𝗅𝑆,𝑞′), where Cast-Refl identifies 𝖼𝖺𝗌𝗍(𝑆,𝑆,𝗋𝖾𝖿𝗅,𝑠) with 𝑠. Conversely eliminate the existential and use proof irrelevance to replace 𝑒 by reflexivity before applying 𝑞. Without Cast-Refl, the forward pair would relate a stuck cast rather than 𝑠 itself.
exercise 79.14.
In context ℎ :⊥, use proof elimination to form 𝖺𝖻𝗈𝗋𝗍ℕ(ℎ) :ℕ. Its scrutinee is a neutral variable, so the term is a weak-head normal form, but its head is neither 𝟢 nor 𝗌𝗎𝖼. Consistency excludes such a closed ℎ and is therefore necessary for closed numeral canonicity. In the intensional base, normalization first gives canonical closed forms and then implies consistency by observing that 𝟎 has none; here the metatheorem uses consistency to rule out neutral proof eliminations.
exercise 79.15.
Irr makes any two proofs of 𝟐 ≈U𝟐 judgmentally equal, and reflexivity inhabits the type. In the univalent base, encode–decode identifies universe loops at 𝟐 with Boolean automorphisms, of which identity and swap are the two possibilities. Observational universe equality records only a proof-irrelevant structural comparison; its eliminator cannot recover the chosen automorphism, so the decode map distinguishing identity from swap is unavailable.
exercise 79.16.
If 𝑝,𝑞 :𝑡 ≈𝐴𝑢, Irr directly gives 𝑝 ≡𝑞; no case split on the existence of equality is involved. For 𝑃 :𝖲𝖯𝗋𝗈𝗉, Obs-Prop identifies 𝑃 ≈𝖲𝖯𝗋𝗈𝗉⊤ with logical equivalence 𝑃 ↔⊤, hence with 𝑃. A uniform decision procedure for that observational equality would therefore decide every proposition 𝑃. Proof irrelevance supplies uniqueness of evidence, not existence or decidability of evidence.
exercise 215.17.
For 𝑝 :𝐴 ≈𝐴′ and 𝑞 :Π𝑥 :𝐴. 𝐵(𝑥) ≈𝐵′(𝖼𝖺𝗌𝗍(𝑝,𝑥)), casting 𝑓 :Π𝑥 :𝐴.𝐵(𝑥) forward is 𝖼𝖺𝗌𝗍Π(𝑝,𝑞,𝑓):=𝜆𝑥′:𝐴′.𝖼𝖺𝗌𝗍(𝑞(𝖼𝖺𝗌𝗍(𝑝−1,𝑥′)))(𝑓(𝖼𝖺𝗌𝗍(𝑝−1,𝑥′))). The domain coercion is contravariant because 𝑓 consumes an 𝐴, while the result coercion is indexed by that coerced argument. For constant 𝐵,𝐵′ the formula becomes 𝜆𝑥′.𝖼𝖺𝗌𝗍(𝑞,𝑓(𝖼𝖺𝗌𝗍(𝑝−1,𝑥′))). If both equality codes are reflexive, both casts compute away and Π-eta returns 𝑓; if only the codomain code is reflexive, the remaining operation is precomposition by the inverse domain cast.