The structural rules can substitute an element into a family, but they cannot yet package a family of elements into one object. Suppose Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾andΓ,𝑥:𝐴⊢𝑏:𝐵. We want a type whose elements are such dependent assignments 𝑥↦𝑏, and a second type whose elements contain 𝑎:𝐴 together with 𝑏:𝐵[𝑎/𝑥]. Dependent products and sums provide these two objects. A one-element type serves when no data is to be packaged.
Dependent products
The dependent product∏𝑥:𝐴𝐵 is the type of dependent functions: an element assigns to every 𝑎:𝐴 an element of the instance 𝐵[𝑎/𝑥].
Extend the raw syntax of definition 26.1 by ∏𝑥:𝐴𝐵, 𝜆(𝑥:𝐴).𝑏, and 𝑓𝑎. The product former and dependent abstraction have arity (0,1) and bind 𝑥 in their second argument; application has arity (0,0). The domain 𝐴 in 𝜆(𝑥:𝐴).𝑏 is a raw argument, so changing it changes the raw term. Alpha-equivalence and capture-avoiding substitution for these expressions are therefore the operations already defined in convention 26.8, definition 26.10.
A type former is specified by displayed rules in the following fixed order:
formation: how the new type is formed from given data;
introduction: how elements of the new type are constructed;
elimination: how elements of the new type are used;
computation: the 𝛽-rules, stating how elimination acts on introduced elements, followed — when present — by a uniqueness (𝜂-) rule, stating that every element is determined by its behavior under elimination.
Each rule presupposes the formation judgments needed to type its premises, as specified by convention 26.14. Every constructor is congruent in its arguments; when an argument is dependent, the congruence rule includes the required context and type conversions. The dependent instances below make these conversions explicit.
A 𝛽-rule evaluates an elimination applied to an introduction. An 𝜂-rule applies where no 𝛽-rule can: it rebuilds an arbitrary element from its observable parts. The calculations after each rule display show both roles.
The dependent-product former is given by the following rules, in the order of convention 27.1.
Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾
Γ⊢∏𝑥:𝐴𝐵𝗍𝗒𝗉𝖾
Π-form
Γ,𝑥:𝐴⊢𝑏:𝐵
Γ⊢𝜆(𝑥:𝐴).𝑏:∏𝑥:𝐴𝐵
Π-intro
Γ⊢𝑓:∏𝑥:𝐴𝐵Γ⊢𝑎:𝐴
Γ⊢𝑓𝑎:𝐵[𝑎/𝑥]
Π-elim
Γ,𝑥:𝐴⊢𝑏:𝐵Γ⊢𝑎:𝐴
Γ⊢(𝜆(𝑥:𝐴).𝑏)𝑎≡𝑏[𝑎/𝑥]:𝐵[𝑎/𝑥]
Π-β
Γ⊢𝑓:∏𝑥:𝐴𝐵
Γ⊢𝑓≡𝜆(𝑥:𝐴).𝑓𝑥:∏𝑥:𝐴𝐵
Π-η
In Π-form and Π-intro the variable 𝑥 becomes bound in 𝐵 and in 𝑏. In Π-𝜂, choose the displayed binder 𝑥 to occur nowhere in 𝑓; this is possible by lemma 26.9. The premise Γ⊢𝐴𝗍𝗒𝗉𝖾 is presupposed throughout (convention 26.14).
Here are the two basic calculations. If Γ,𝑥:𝐴⊢𝑏:𝐵 and Γ⊢𝑎:𝐴, then Γ⊢𝜆(𝑥:𝐴).𝑏:∏𝑥:𝐴𝐵,(𝜆(𝑥:𝐴).𝑏)𝑎≡𝑏[𝑎/𝑥]:𝐵[𝑎/𝑥]. The first expression introduces a dependent function; the second applies it and computes by 𝛽. Conversely, if Γ⊢𝑓:∏𝑥:𝐴𝐵, then 𝑓≡𝜆(𝑥:𝐴).𝑓𝑥:∏𝑥:𝐴𝐵. This is 𝜂: even when 𝑓 is a variable and no 𝛽-step is possible, its values determine it judgmentally.
Family instances retain their binding information: if Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾, the instance at 𝑎 is always 𝐵[𝑎/𝑥]. Functions of several arguments are iterated products ∏𝑥:𝐴∏𝑦:𝐵𝐶, abbreviated ∏𝑥,𝑦:𝐴𝐶 when both binders range over the same type; iterated application is 𝑓𝑎𝑏. Application associates to the left and binds more tightly than 𝜆-abstraction.
Each operator of definition 27.2 has a congruence rule. For the type former, abstraction, and application they read:
Γ⊢𝐴≡𝐴′𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝐵≡𝐵′𝗍𝗒𝗉𝖾
Γ⊢∏𝑥:𝐴𝐵≡∏𝑥:𝐴′𝐵′𝗍𝗒𝗉𝖾
Π-form-eq
Γ⊢𝐴≡𝐴′𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝐵≡𝐵′𝗍𝗒𝗉𝖾Γ,𝑥:𝐴⊢𝑏≡𝑏′:𝐵
Γ⊢𝜆(𝑥:𝐴).𝑏≡𝜆(𝑥:𝐴′).𝑏′:∏𝑥:𝐴𝐵
λ-eq
Γ⊢𝑓≡𝑓′:∏𝑥:𝐴𝐵Γ⊢𝑎≡𝑎′:𝐴
Γ⊢𝑓𝑎≡𝑓′𝑎′:𝐵[𝑎/𝑥]
app-eq
In Π-form-eq, context conversion first types 𝐵′ in Γ,𝑥:𝐴′. For 𝜆-eq, context and type conversion give Γ,𝑥:𝐴′⊢𝑏′:𝐵′,Γ⊢𝜆(𝑥:𝐴′).𝑏′:∏𝑥:𝐴′𝐵′,∏𝑥:𝐴′𝐵′symmetryofΠ-form-eq≡∏𝑥:𝐴𝐵. Rule Conv therefore places the right abstraction in the conclusion’s type. For application, equal substitution and conversion give the local chain 𝑓′𝑎′:𝐵[𝑎′/𝑥],𝐵[𝑎′/𝑥]𝑆𝑢𝑏𝑠𝑡−𝐸𝑞−𝑇𝑦≡𝐵[𝑎/𝑥],𝑓′𝑎′:𝐵[𝑎/𝑥]byConv. Thus every conclusion compares terms in one context and one type.
★★☆ In chapter 2 the clause 𝐴,𝐵↦𝐴→𝐵 belongs to the grammar of simple types, while abstraction and application are typing rules. Place these three clauses in the formation, introduction, and elimination positions of convention 27.1. Add the usual 𝛽- and 𝜂-equations as a hypothetical fourth group, noting that chapter 2 itself has no judgmental equality and that 𝜆𝑥.𝑓𝑥=𝑓 requires 𝑥∉FV(𝑓). Compare the result with definition 27.2: which codomains and premises acquire a dependence on the argument?
Let Γ⊢𝐴𝗍𝗒𝗉𝖾 and Γ⊢𝐵𝗍𝗒𝗉𝖾. Weakening 𝐵 by 𝐴 (definition 26.21) and applying Π-form forms a constant dependent product. Choose 𝑥∉dom(Γ) occurring nowhere in 𝐵, and define the function type by 𝐴→𝐵:=∏𝑥:𝐴𝐵. This notation associates to the right. The identity function is id𝐴:=𝜆(𝑥:𝐴).𝑥:𝐴→𝐴. For Γ⊢𝑓:𝐴→𝐵 and Γ⊢𝑔:𝐵→𝐶, define 𝑔∘𝑓:=𝜆(𝑥:𝐴).𝑔(𝑓𝑥):𝐴→𝐶.
Let Γ⊢𝐴𝗍𝗒𝗉𝖾 and Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾. Form the context Γ,𝑓:∏𝑥:𝐴𝐵,𝑎:𝐴. The last occurrence of 𝐴 is obtained by weakening it past 𝑓. Context formation and the general variable rule lemma 26.34 give 𝑓:∏𝑥:𝐴𝐵 and 𝑎:𝐴 in this context; Π-elim then gives the genuinely dependent evaluation 𝑓𝑎:𝐵[𝑎/𝑥].
Γ,𝑓:∏𝑥:𝐴𝐵,𝑎:𝐴𝖼𝗍𝗑(𝑓:∏𝑥:𝐴𝐵)∈(Γ,𝑓:∏𝑥:𝐴𝐵,𝑎:𝐴)
Γ,𝑓:∏𝑥:𝐴𝐵,𝑎:𝐴⊢𝑓:∏𝑥:𝐴𝐵
Assum
Γ,𝑓:∏𝑥:𝐴𝐵,𝑎:𝐴𝖼𝗍𝗑(𝑎:𝐴)∈(Γ,𝑓:∏𝑥:𝐴𝐵,𝑎:𝐴)
Γ,𝑓:∏𝑥:𝐴𝐵,𝑎:𝐴⊢𝑎:𝐴
Assum
Γ,𝑓:∏𝑥:𝐴𝐵,𝑎:𝐴⊢𝑓𝑎:𝐵[𝑎/𝑥]
Π-elim
If 𝑓 is a variable, this application is neutral: no 𝛽-rule applies. The 𝜂-rule nevertheless gives 𝑓≡𝜆(𝑥:𝐴).𝑓𝑥.
Proof. Associativity. Rule Π-𝛽 for the abstraction ℎ∘𝑔 gives (ℎ∘𝑔)(𝑓𝑥)≡ℎ(𝑔(𝑓𝑥)) in context Γ,𝑥:𝐴, so (ℎ∘𝑔)∘𝑓𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛27.5=𝜆(𝑥:𝐴).(ℎ∘𝑔)(𝑓𝑥)𝜆−𝑒𝑞≡𝜆(𝑥:𝐴).ℎ(𝑔(𝑓𝑥)). Expanding the outer composite on the other side gives ℎ∘(𝑔∘𝑓)𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛27.5=𝜆(𝑥:𝐴).ℎ((𝑔∘𝑓)𝑥)Π−𝛽,𝑎𝑝𝑝−𝑒𝑞,𝜆−𝑒𝑞≡𝜆(𝑥:𝐴).ℎ(𝑔(𝑓𝑥)). Let 𝑛:=𝜆(𝑥:𝐴).ℎ(𝑔(𝑓𝑥)). The first chain derives ((ℎ∘𝑔)∘𝑓)≡𝑛, and the second derives (ℎ∘(𝑔∘𝑓))≡𝑛. Apply symmetry to the second derivation to obtain 𝑛≡ℎ∘(𝑔∘𝑓), then compose the two derivations by transitivity (definition 26.16).
Left unit: id𝐵∘𝑓𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛27.5=𝜆(𝑥:𝐴).id𝐵(𝑓𝑥)Π−𝛽,𝜆−𝑒𝑞≡𝜆(𝑥:𝐴).𝑓𝑥Π−𝜂≡𝑓. Right unit: 𝑓∘id𝐴𝑑𝑒𝑓𝑖𝑛𝑖𝑡𝑖𝑜𝑛27.5=𝜆(𝑥:𝐴).𝑓(id𝐴𝑥)Π−𝛽,𝑎𝑝𝑝−𝑒𝑞,𝜆−𝑒𝑞≡𝜆(𝑥:𝐴).𝑓𝑥Π−𝜂≡𝑓, using Π-𝛽, app-eq, 𝜆-eq, and finally Π-𝜂. Thus the unit laws, unlike associativity, genuinely use the 𝜂-rule. ◻
Proof of Proposition 27.8 — Evaluation-style elimination
Proof. Given Π-elim, derive Π-ev exactly as in example 27.6: weaken 𝑓 to Γ,𝑧:𝐴, obtain Γ,𝑧:𝐴⊢𝑧:𝐴 by Var, and apply. Conversely, given Π-ev and a term Γ⊢𝑎:𝐴, the substitution rule of definition 26.20 applied to Γ,𝑧:𝐴⊢𝑓𝑧:𝐵[𝑧/𝑥] yields the required term at 𝐵[𝑎/𝑥]. Since 𝑧 was chosen fresh for 𝑓, the defining clauses of definition 26.10 give (𝑓𝑧)[𝑎/𝑧]=𝑓𝑎. The corresponding translation of the computation rule substitutes 𝑎 for the fresh generic variable in the generic 𝛽 equation. Freshness gives ((𝜆(𝑥:𝐴).𝑏)𝑧)[𝑎/𝑧]=(𝜆(𝑥:𝐴).𝑏)𝑎, 𝑏[𝑧/𝑥][𝑎/𝑧]=𝑏[𝑎/𝑥], and 𝐵[𝑧/𝑥][𝑎/𝑧]=𝐵[𝑎/𝑥]. Thus both terms have the required type 𝐵[𝑎/𝑥], so Subst-Eq-Tm yields the ordinary Π-𝛽 rule. ◻
★★☆ (𝜂 as judgmental extensionality.) Show that, given the other rules of definition 27.2, the rule Π-𝜂 is equivalent to the extensionality rule: from Γ⊢𝑓:∏𝑥:𝐴𝐵, Γ⊢𝑔:∏𝑥:𝐴𝐵, and Γ,𝑥:𝐴⊢𝑓𝑥≡𝑔𝑥:𝐵, infer Γ⊢𝑓≡𝑔:∏𝑥:𝐴𝐵. (For the forward direction, rebuild 𝑓 and 𝑔 by 𝜂; for the converse, instantiate 𝑔:=𝜆(𝑥:𝐴).𝑓𝑥 and compute with Π-𝛽.)
★☆☆ Rewrite the right-unit calculation in lemma 27.7 as a derivation of Γ⊢𝑓∘id𝐴≡𝑓:𝐴→𝐵, displaying the uses of application congruence, abstraction congruence, and 𝜂.
★★☆ Complete proposition 27.8: show that in the presence of the structural rules, the rule Π-𝛽 is interderivable with its generic instance Γ,𝑥:𝐴⊢(𝜆(𝑦:𝐴).𝑏[𝑦/𝑥])𝑥≡𝑏:𝐵, where 𝑦 occurs nowhere in 𝑏,𝐵,Γ,𝐴 and is distinct from 𝑥. In the reverse direction substitute an arbitrary Γ⊢𝑎:𝐴 for 𝑥 and use the substitution-composition equation of proposition 26.11.
★☆☆ Let Γ⊢𝐴𝗍𝗒𝗉𝖾, Γ⊢𝐵𝗍𝗒𝗉𝖾, and Γ⊢𝐶𝗍𝗒𝗉𝖾. In context Γ,𝑦:𝐵, define const𝐴→𝐵𝑦:=𝜆(𝑥:𝐴).𝑦:𝐴→𝐵; the superscript records the domain and codomain of the constant map. If Γ⊢𝑓:𝐴→𝐵, prove in context Γ,𝑧:𝐶 that const𝐵→𝐶𝑧∘𝑓≡const𝐴→𝐶𝑧:𝐴→𝐶. If Γ⊢𝑔:𝐵→𝐶, prove in context Γ,𝑦:𝐵 that 𝑔∘const𝐴→𝐵𝑦≡const𝐴→𝐶𝑔𝑦:𝐴→𝐶.
★★☆ Let Γ⊢𝐴𝗍𝗒𝗉𝖾, Γ⊢𝐵𝗍𝗒𝗉𝖾, and Γ,𝑥:𝐴,𝑦:𝐵⊢𝐶𝗍𝗒𝗉𝖾. Construct a term 𝜎:(∏𝑥:𝐴∏𝑦:𝐵𝐶)→(∏𝑦:𝐵∏𝑥:𝐴𝐶) swapping the arguments, and show 𝜎′∘𝜎≡id, where 𝜎′ is the swap in the other direction. Begin with 𝜆(𝑓:∏𝑥:𝐴∏𝑦:𝐵𝐶).𝜆(𝑦:𝐵).𝜆(𝑥:𝐴).𝑓𝑥𝑦; use lemma 26.33 to form 𝐶 in the swapped context, and use 𝜂 twice in the round trip.
The dependent sum∑𝑥:𝐴𝐵 is the type of dependent pairs: an element consists of an 𝑎:𝐴 together with an element of the instance 𝐵[𝑎/𝑥]. We present Σ negatively, with projections and an 𝜂-rule.
Extend the raw syntax by ∑𝑥:𝐴𝐵, (𝑎,𝑏), 𝗉𝗋1(𝑝), and 𝗉𝗋2(𝑝). The sum former has arity (0,1) and binds 𝑥 in its second argument; pairing has arity (0,0) and each projection has arity (0).
The dependent-sum former is given by the following rules; congruence rules are tacit (convention 27.1).
Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾
Γ⊢∑𝑥:𝐴𝐵𝗍𝗒𝗉𝖾
Σ-form
Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾Γ⊢𝑎:𝐴Γ⊢𝑏:𝐵[𝑎/𝑥]
Γ⊢(𝑎,𝑏):∑𝑥:𝐴𝐵
Σ-intro
Γ⊢𝑝:∑𝑥:𝐴𝐵
Γ⊢𝗉𝗋1(𝑝):𝐴
Σ-elim_1
Γ⊢𝑝:∑𝑥:𝐴𝐵
Γ⊢𝗉𝗋2(𝑝):𝐵[𝗉𝗋1(𝑝)/𝑥]
Σ-elim_2
Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾Γ⊢𝑎:𝐴Γ⊢𝑏:𝐵[𝑎/𝑥]
Γ⊢𝗉𝗋1((𝑎,𝑏))≡𝑎:𝐴
Σ-β_1
Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾Γ⊢𝑎:𝐴Γ⊢𝑏:𝐵[𝑎/𝑥]
Γ⊢𝗉𝗋2((𝑎,𝑏))≡𝑏:𝐵[𝑎/𝑥]
Σ-β_2
Γ⊢𝑝:∑𝑥:𝐴𝐵
Γ⊢𝑝≡(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)):∑𝑥:𝐴𝐵
Σ-η
The premise Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾 in Σ-intro and in both 𝛽-rules is not recoverable from the other premises (the family 𝐵 is not determined by its instance 𝐵[𝑎/𝑥]) and is therefore displayed.
For Γ⊢𝑎:𝐴 and Γ⊢𝑏:𝐵[𝑎/𝑥], the rules give Γ⊢(𝑎,𝑏):∑𝑥:𝐴𝐵,𝗉𝗋1((𝑎,𝑏))≡𝑎:𝐴,𝗉𝗋2((𝑎,𝑏))≡𝑏:𝐵[𝑎/𝑥]. If 𝑝:∑𝑥:𝐴𝐵 is a variable, neither projection computes by a 𝛽-rule. The uniqueness rule instead reconstructs the whole pair: 𝑝≡(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)):∑𝑥:𝐴𝐵.
The type-former congruence has the same shape as Π-form-eq. The remaining congruence rules are
Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾Γ⊢𝑎≡𝑎′:𝐴Γ⊢𝑏≡𝑏′:𝐵[𝑎/𝑥]
Γ⊢(𝑎,𝑏)≡(𝑎′,𝑏′):∑𝑥:𝐴𝐵
pair-eq
Γ⊢𝑝≡𝑝′:∑𝑥:𝐴𝐵
Γ⊢𝗉𝗋1(𝑝)≡𝗉𝗋1(𝑝′):𝐴
1-eq
Γ⊢𝑝≡𝑝′:∑𝑥:𝐴𝐵
Γ⊢𝗉𝗋2(𝑝)≡𝗉𝗋2(𝑝′):𝐵[𝗉𝗋1(𝑝)/𝑥]
2-eq
For pair-eq, equal substitution gives 𝐵[𝑎/𝑥]≡𝐵[𝑎′/𝑥]; conversion along this equality moves 𝑏′ from the displayed common fiber 𝐵[𝑎/𝑥] to 𝐵[𝑎′/𝑥], so the right-hand pair is well typed. For 𝗉𝗋2-eq, rule 𝗉𝗋1-eq gives Γ⊢𝗉𝗋1(𝑝)≡𝗉𝗋1(𝑝′):𝐴, whence 𝐵[𝗉𝗋1(𝑝)/𝑥]𝑆𝑢𝑏𝑠𝑡−𝐸𝑞−𝑇𝑦≡𝐵[𝗉𝗋1(𝑝′)/𝑥]. After symmetry, this converts the second projection of 𝑝′ to the common type shown in the conclusion.
★★☆ Restore every premise suppressed by convention 26.14 in the three rules of remark 27.10. For 𝗉𝗋2-eq, display the Subst-Eq-Ty, Ty-Sym, and Conv steps that type the right-hand projection in the common fiber.
For Γ⊢𝐴𝗍𝗒𝗉𝖾 and Γ⊢𝐵𝗍𝗒𝗉𝖾 we define the product type𝐴×𝐵:=∑𝑥:𝐴𝐵 after choosing 𝑥∉dom(Γ) occurring nowhere in 𝐵. Its elements are ordinary pairs. Specializing the motive of Σ elimination to a constant type gives the binary-product recursor; the two projection computations and pair eta are the corresponding specializations of definition 27.9.
★★☆ Let Γ⊢𝐴𝗍𝗒𝗉𝖾, Γ⊢𝐵𝗍𝗒𝗉𝖾, and Γ⊢𝐶𝗍𝗒𝗉𝖾. Specialize definition 27.9 to 𝐴×𝐵 (remark 27.11): display the resulting rules, define the non-dependent recursor 𝗋𝖾𝖼×(𝑓;𝑝):=𝑓(𝗉𝗋1(𝑝))(𝗉𝗋2(𝑝)) for 𝑓:𝐴→(𝐵→𝐶), and verify its computation rule on pairs.
Let Γ,𝑧:∑𝑥:𝐴𝐵⊢𝐶𝗍𝗒𝗉𝖾 and Γ,𝑥:𝐴,𝑦:𝐵⊢𝑑:𝐶[(𝑥,𝑦)/𝑧]. For Γ⊢𝑝:∑𝑥:𝐴𝐵, define 𝗂𝗇𝖽Σ(𝑑;𝑝):=𝑑[𝗉𝗋1(𝑝)/𝑥,𝗉𝗋2(𝑝)/𝑦]. Then Γ⊢𝗂𝗇𝖽Σ(𝑑;𝑝):𝐶[𝑝/𝑧], and on pairs the eliminator computes judgmentally: Γ⊢𝗂𝗇𝖽Σ(𝑑;(𝑎,𝑏))≡𝑑[𝑎/𝑥,𝑏/𝑦]:𝐶[(𝑎,𝑏)/𝑧], for Γ⊢𝑎:𝐴 and Γ⊢𝑏:𝐵[𝑎/𝑥].
Proof. By lemma 26.30, rename the two displayed context variables if necessary so that 𝑥 and 𝑦 occur nowhere in Γ, 𝑝, or 𝐶. This is possible because the variables are locally declared and distinct from the domain of Γ. The two projection rules give Γ⊢𝗉𝗋1(𝑝):𝐴,Γ⊢𝗉𝗋2(𝑝):𝐵[𝗉𝗋1(𝑝)/𝑥]. Thus (𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)) is a context substitution Γ⇒(𝑥:𝐴,𝑦:𝐵) in the sense of definition 26.45. Applying proposition 26.46 to the derivation of 𝑑 gives Γ⊢𝑑[𝗉𝗋1(𝑝)/𝑥,𝗉𝗋2(𝑝)/𝑦]:𝐶[(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝))/𝑧]. The displayed type is obtained by the defining clauses of simultaneous substitution in definition 26.10. Moreover, the simultaneous substitution agrees with two successive applications of the structural substitution rule. This follows directly by induction on 𝑑: neither 𝑥 nor 𝑦 occurs in either projection of 𝑝, so the two single substitutions commute at variables and the binder cases use the same fresh openings. Now symmetry of Σ-𝜂 gives (𝗉𝗋1(𝑝),𝗉𝗋2(𝑝))≡𝑝:∑𝑥:𝐴𝐵. Apply Subst-Eq-Ty to the family 𝐶, and then Conv; this changes the last displayed type to 𝐶[𝑝/𝑧]. Explicitly, the classifier assembly is 𝐶[(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝))/𝑧]𝑝𝑎𝑖𝑟−𝑒𝑞,𝑆𝑢𝑏𝑠𝑡−𝐸𝑞−𝑇𝑦≡𝐶[𝑝/𝑧],𝑑[𝗉𝗋1(𝑝)/𝑥,𝗉𝗋2(𝑝)/𝑦]:𝐶[(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝))/𝑧]𝐶𝑜𝑛𝑣←←←←←←←←←→𝐶[𝑝/𝑧].
For the computation equation, put 𝑞1:=𝗉𝗋1((𝑎,𝑏)),𝑞2:=𝗉𝗋2((𝑎,𝑏)). The two beta rules give 𝑞1≡𝑎:𝐴 and 𝑞2≡𝑏:𝐵[𝑎/𝑥]; equal substitution along the first equality converts the original type 𝐵[𝑞1/𝑥] of 𝑞2 to 𝐵[𝑎/𝑥]. Apply Subst-Eq-Tm at 𝑥:𝐴 and then substitute 𝑞2 for 𝑦. Its common context is the one based on 𝑞1, and it gives 𝑑[𝑞1/𝑥,𝑞2/𝑦]≡𝑑[𝑎/𝑥,𝑞2/𝑦]:𝐶[(𝑞1,𝑞2)/𝑧]. Separately, apply Subst-Eq-Tm at 𝑦:𝐵[𝑎/𝑥] to the already substituted term 𝑑[𝑎/𝑥]: 𝑑[𝑎/𝑥,𝑞2/𝑦]≡𝑑[𝑎/𝑥,𝑏/𝑦]:𝐶[(𝑎,𝑞2)/𝑧]. Rule pair-eq gives (𝑞1,𝑞2)≡(𝑎,𝑞2), using reflexivity for 𝑞2 in the common fiber. Equal substitution in 𝐶 and Conv-Eq therefore type the two steps in one fiber: 𝑑[𝑞1/𝑥,𝑞2/𝑦]𝑆𝑢𝑏𝑠𝑡−𝐸𝑞−𝑇𝑚,𝐶𝑜𝑛𝑣−𝐸𝑞=𝑑[𝑎/𝑥,𝑞2/𝑦]𝑆𝑢𝑏𝑠𝑡−𝐸𝑞−𝑇𝑚=𝑑[𝑎/𝑥,𝑏/𝑦]:𝐶[(𝑎,𝑞2)/𝑧]. A second use of pair-eq, this time with 𝑞2≡𝑏, gives (𝑎,𝑞2)≡(𝑎,𝑏). Equal substitution in 𝐶 and Conv-Eq place the chain in 𝐶[(𝑎,𝑏)/𝑧], as required. ◻
The negative presentation of definition 27.9 derives the positive eliminator and computation rule of proposition 27.12. Conversely, the positive presentation consisting of formation, pairing, the primitive eliminator 𝗂𝗇𝖽Σ of arity (2,0), and its pair computation derives both projections and their beta rules. If Sigma eta is added to the positive presentation, the two presentations are interderivable.
Proof of Proposition 27.13 — The positive presentation
Proof. The negative-to-positive direction is proposition 27.12. For the converse, the first projection is the constant-motive instance 𝗉𝗋1(𝑝):=𝗂𝗇𝖽Σ(𝑥;𝑝),𝐶:=𝐴incontext𝑧:∑𝑥:𝐴𝐵. After this definition, take the motive 𝐶:=𝐵[𝗉𝗋1(𝑧)/𝑥] and the branch 𝑦. The branch has the required type because the first projection computes on (𝑥,𝑦). Equal substitution gives 𝐵[𝗉𝗋1((𝑥,𝑦))/𝑥]≡𝐵. After symmetry, conversion types 𝑦:𝐵 in the left-hand type. This defines 𝗉𝗋2(𝑝), and the primitive computation rule gives both projection beta rules.
Adding Sigma eta supplies the only remaining rule of the negative presentation. Thus every rule of either presentation is admissible in the other, although their primitive raw operators remain different. ◻
If 𝑝 is a variable, 𝗂𝗇𝖽Σ(−;𝑝) has no computation step. Therefore the positive computation rule alone does not derive 𝑝≡(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)); this is exactly the additional eta equation assumed in the final clause of remark 27.13.
The terminology collides across the simple/dependent divide: Π-types generalize function types yet are called dependent products, while Σ-types generalize product types yet are called dependent sums. The set-theoretic reading resolves the puzzle: ∏𝑎∈𝐴𝐵𝑎 is an 𝐴-indexed product of sets whose elements are (choice) functions, and ∐𝑎∈𝐴𝐵𝑎 is an 𝐴-indexed sum (disjoint union) whose elements are pairs of an index with an inhabitant. Both specialize to the binary product: 𝐵1×𝐵2 is the product indexed by {1,2} and also the sum of the constant family 𝐵2 indexed by 𝐵1.
★★★ In the positive presentation of remark 27.13, write the complete derivation of the second projection. In context 𝑧:∑𝑥:𝐴𝐵, use the motive 𝐶:=𝐵[𝗉𝗋1(𝑧)/𝑥]; display the conversion that types the branch 𝑦, and verify the beta rule. Finally explain why the primitive computation rule has no computation step when the scrutinee is an arbitrary variable 𝑝, and hence does not derive 𝑝≡(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)).
The unit type is the nullary product. Its constructor ⋆ contains no components, and its 𝜂-rule gives 𝑎≡⋆:𝟏 for every 𝑎:𝟏. Consequently a function 𝑓:𝟏→𝐵 is determined by 𝑓⋆: for any 𝑎:𝟏, congruence sends 𝑎≡⋆ to 𝑓𝑎≡𝑓⋆. Both 𝟏 and ⋆ are nullary raw operators.
For every expression judgment Γ⊢J derivable after adding the Π-, Σ-, and 𝟏-rules, every free variable displayed in J belongs to dom(Γ). In a derivable context, the free variables of each declaration type belong to the preceding prefix.
Proof of Lemma 27.15 — Scoping in the extended theory
Proof. Proceed simultaneously over derivations of contexts and of the four expression judgments. In the structural cases, Var selects a declared name; Wk only enlarges the domain; and Subst replaces 𝑥 by the substituend, whose free variables already lie in the prefix Γ. Context conversion and the equality rules change no free variables. For a representative new binder case, the premise of Π-introduction has FV(𝑏)⊆dom(Γ)∪{𝑥}; abstraction binds 𝑥, so FV(𝜆(𝑥:𝐴).𝑏)⊆dom(Γ), using also FV(𝐴)⊆dom(Γ). The formation rules for Π and Σ have the same binder calculation. For application, the representative non-binder equation is FV(𝑓𝑎)=FV(𝑓)∪FV(𝑎)⊆dom(Γ). Pairing and projection take the same union of the free-variable sets of their premises, while the nullary 𝟏 and ⋆ retain none. Computation, uniqueness, and congruence compare expressions satisfying these same inclusions. ◻
By 𝟏-intro, in every well-formed context the judgment Γ⊢⋆:𝟏 is derivable. If a context also contains a variable 𝑢:𝟏, no reduction rule acts on 𝑢, but uniqueness gives the immediate calculation Γ,𝑢:𝟏⊢𝑢≡⋆:𝟏.
Definition 27.14 contains no elimination rule and no 𝛽-rule. None is needed: every 𝑎:𝟏 is judgmentally ⋆. Conversion along 𝑎≡⋆ therefore derives the dependent eliminator in proposition 27.17.
Proof of Proposition 27.17 — The dependent eliminator for
Proof. By 𝟏-𝜂, 𝑎≡⋆:𝟏. Apply Tm-Sym first, so ⋆≡𝑎:𝟏. Then Subst-Eq-Ty for the family 𝐶 gives 𝐶[⋆/𝑧]≡𝐶[𝑎/𝑧]𝗍𝗒𝗉𝖾. Rule Conv converts 𝑐:𝐶[⋆/𝑧] to 𝑐:𝐶[𝑎/𝑧], which is the typing claim. The computation equation is reflexivity. ◻
In the calculus of definition 27.2, definition 27.9, definition 27.14, the three 𝜂-equations are primitive judgmental equalities. They do not follow from the corresponding 𝛽-rules. Unit eta converts the constant branch into the fiber over an arbitrary unit term in proposition 27.17. Sigma eta types the dependent uncurrying map and supplies the reassociation conversions. Pi eta closes the function round trips for currying and the categorical unit laws.
The introduction and elimination rules move in opposite directions. The eta rules say that, after quotienting by judgmental equality, these moves are inverse.
Let Γ𝖼𝗍𝗑 and Γ⊢𝐴𝗍𝗒𝗉𝖾. Define Tm(Γ,𝐴):={𝑎∣Γ⊢𝑎:𝐴derivable}/≡ to be the set of terms of 𝐴 in context Γ, taken modulo judgmental equality. If 𝐴≡𝐴′ as types, Conv in both directions gives the same term representatives, and Conv-Eq in both directions gives the same equivalence relation. We therefore identify Tm(Γ,𝐴) with Tm(Γ,𝐴′).
Here “set” has its metatheoretic meaning from convention 71.1. The raw expressions form a set, the displayed collection is a subset, and quotienting by derivable judgmental equality therefore produces a set. The symbol ∑ below denotes the corresponding metatheoretic disjoint union, not an object-language Σ-type.
Let Γ⊢𝐴𝗍𝗒𝗉𝖾 and Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾. Define Λ(𝑏):=𝜆(𝑥:𝐴).𝑏and𝐸(𝑓):=𝑓𝑥, where 𝐸 first weakens 𝑓 to Γ,𝑥:𝐴 (definition 26.21) and applies it to the variable 𝑥. Then:
Λ and 𝐸 preserve judgmental equality, and induce mutually inverse bijections Tm((Γ,𝑥:𝐴),𝐵)≅Tm(Γ,∏𝑥:𝐴𝐵);
both maps commute with substitution. More precisely, if Γ=Γ0,𝑦:𝐶,Γ1, if Γ0⊢𝑐:𝐶, and if Γ[𝑐/𝑦] abbreviates Γ0,Γ1[𝑐/𝑦], then Λ(𝑏)[𝑐/𝑦]=Λ(𝑏[𝑐/𝑦]),𝐸(𝑓)[𝑐/𝑦]=𝐸(𝑓[𝑐/𝑦]) as equalities of expression classes. The first lies in Tm(Γ[𝑐/𝑦],∏𝑥:𝐴[𝑐/𝑦]𝐵[𝑐/𝑦]), and the second is an equality of terms of 𝐵[𝑐/𝑦] in the context Γ[𝑐/𝑦],𝑥:𝐴[𝑐/𝑦].
Proof of Theorem 27.21 — Π internalizes the hypothetical judgment
Proof. (1) Preservation of ≡ is 𝜆-eq and app-eq. For the round trips, let Γ,𝑥:𝐴⊢𝑏:𝐵 and choose 𝑥′≠𝑥 occurring nowhere in Γ,𝐴,𝐵,𝑏. Choose the alpha-equivalent representative with binder 𝑥′. Then, in Γ,𝑥:𝐴, 𝐸(Λ(𝑏))=(𝜆(𝑥′:𝐴).𝑏[𝑥′/𝑥])𝑥≡𝑏[𝑥′/𝑥][𝑥/𝑥′]=𝑏. The beta rule gives the judgmental step. The final raw equality follows by structural induction on that representative of 𝑏: the second substitution reverses precisely the occurrences changed by the first. Conversely, for Γ⊢𝑓:∏𝑥:𝐴𝐵, Λ(𝐸(𝑓))=𝜆(𝑥:𝐴).𝑓𝑥≡𝑓 by Π-𝜂. Hence the induced maps on ≡-classes are mutually inverse.
(2) The context formation makes 𝑥≠𝑦. By lemma 27.15, FV(𝑐)⊆dom(Γ0), hence 𝑥∉FV(𝑐). Choose representatives whose other bound names avoid 𝑦 and FV(𝑐). The operator clauses of definition 26.10 then give (𝜆(𝑥:𝐴).𝑏)[𝑐/𝑦]=𝜆(𝑥:𝐴[𝑐/𝑦]).𝑏[𝑐/𝑦],(𝑓𝑥)[𝑐/𝑦]=𝑓[𝑐/𝑦]𝑥. Weakening does not change the raw representative of 𝑓, so these are the two asserted equations in the substituted contexts. ◻
Let Γ⊢𝐴𝗍𝗒𝗉𝖾 and Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾. There is a bijection Tm(Γ,∑𝑥:𝐴𝐵)≅∑𝑎∈Tm(Γ,𝐴)Tm(Γ,𝐵[𝑎/𝑥]), given on representatives by 𝐹(𝑝)=(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)),𝐺(𝑎,𝑏)=(𝑎,𝑏). The fiber on the right is independent of the representative of 𝑎 via the identification in definition 27.19. The two maps also commute with substitution in the sense of theorem 27.21(2): under the hypotheses there, substitution acts componentwise and 𝐹([𝑝])[𝑐/𝑦]=𝐹([𝑝[𝑐/𝑦]]),𝐺([𝑎],[𝑏])[𝑐/𝑦]=𝐺([𝑎[𝑐/𝑦]],[𝑏[𝑐/𝑦]]).
Proof of Theorem 27.22 — Σ internalizes pairs of judgments
Proof. We first make the dependent quotient precise. If 𝑎≡𝑎′:𝐴, then Subst-Eq-Ty gives 𝐵[𝑎/𝑥]≡𝐵[𝑎′/𝑥]𝗍𝗒𝗉𝖾. By Conv, the two fibers have the same term representatives; by Conv-Eq, they have the same equality classes. Hence the fiber Tm(Γ,𝐵[𝑎/𝑥]) depends only on [𝑎].
The forward map lands in this fiber because 𝗉𝗋1(𝑝):𝐴,𝗉𝗋2(𝑝):𝐵[𝗉𝗋1(𝑝)/𝑥]. If 𝑝≡𝑝′, the rules 𝗉𝗋1-eq and 𝗉𝗋2-eq show that both resulting classes agree, with the second equality taken in the common fiber over [𝗉𝗋1(𝑝)]. Thus 𝐹 is well defined.
For 𝐺, suppose 𝑎≡𝑎′:𝐴 and that 𝑏 and 𝑏′ determine the same class after identifying 𝐵[𝑎/𝑥] with 𝐵[𝑎′/𝑥]. In the common fiber we have 𝑏≡𝑏′:𝐵[𝑎/𝑥], so pair-eq gives (𝑎,𝑏)≡(𝑎′,𝑏′):∑𝑥:𝐴𝐵. Thus 𝐺 too is independent of representatives.
The two beta rules give 𝐹(𝐺([𝑎],[𝑏]))=([𝑎],[𝑏]), and symmetry of Σ-𝜂 gives 𝐺(𝐹([𝑝]))=[(𝗉𝗋1(𝑝),𝗉𝗋2(𝑝))]=[𝑝]. The maps are therefore inverse.
Finally, under the context-substitution hypotheses of theorem 27.21(2), the operator clauses of definition 26.10 give 𝗉𝗋𝑖(𝑝)[𝑐/𝑦]=𝗉𝗋𝑖(𝑝[𝑐/𝑦])(𝑖=1,2),(𝑎,𝑏)[𝑐/𝑦]=(𝑎[𝑐/𝑦],𝑏[𝑐/𝑦]). These are exactly the two naturality equations. For the dependent second component, the identification of the substituted fibers is the calculation (𝐵[𝑎/𝑥])[𝑐/𝑦]=𝐵[𝑐/𝑦][𝑎[𝑐/𝑦]/𝑥], which follows from 𝑥≠𝑦, 𝑥∉FV(𝑐), and proposition 26.11.4. Thus both sides really do lie in the same displayed fiber. ◻
These three results have one form: each type packages structure already expressible with judgments. Tm(Γ,∏𝑥:𝐴𝐵)≅Tm(Γ,𝑥:𝐴;𝐵),Tm(Γ,∑𝑥:𝐴𝐵)≅∑[𝑎]∈Tm(Γ,𝐴)Tm(Γ,𝐵[𝑎/𝑥]),Tm(Γ,𝟏)≅{∗}. Here Tm(Γ,𝑥:𝐴;𝐵) abbreviates the term classes of 𝐵 in the extended context; the semicolon prevents it from being mistaken for a two-argument term-set notation.
★☆☆ Specialize theorem 27.22 to a constant family and obtain a bijection Tm(Γ,𝐴×𝐵)≅Tm(Γ,𝐴)×Tm(Γ,𝐵). Write the two maps and both round trips explicitly.
★☆☆ Verify theorem 27.21(2) directly from the defining clauses of substitution in definition 26.10, indicating exactly where the freshness of 𝑥 for 𝑦 and 𝑐 is used.
★☆☆ Formulate and prove the analogue of theorem 27.21(2) for the unit type: the bijection of proposition 27.20 commutes with substitution. What do the two composite maps look like concretely?
★★★ (Internalization reconstructs the term rules.) Fix Γ⊢𝐴𝗍𝗒𝗉𝖾 and Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾, and suppose Γ⊢𝑃𝗍𝗒𝗉𝖾 is a type equipped with alpha-respecting raw-term operations Λ′ and 𝐸′. They are accompanied by derivation transformations sending each derivation of Γ,𝑥:𝐴⊢𝑏:𝐵 to one of Γ⊢Λ′(𝑏):𝑃 and each derivation of Γ⊢𝑓:𝑃 to one of Γ,𝑥:𝐴⊢𝐸′(𝑓):𝐵. Assume that the raw operations commute with substitution, their transformations send equality derivations to equality derivations, and they come with derivations 𝐸′(Λ′(𝑏))≡𝑏:𝐵,Λ′(𝐸′(𝑓))≡𝑓:𝑃. Use Λ′ as introduction and define elimination by 𝑓𝑎:=𝐸′(𝑓)[𝑎/𝑥]. Derive the beta rule by substituting 𝑎 into the first displayed equality, derive eta from the second, and derive the two congruence rules from equality preservation and Subst-Eq-Tm. The formation rule is the assumed judgment Γ⊢𝑃𝗍𝗒𝗉𝖾.
Two types can be carried into each other by maps whose round trips are judgmentally the identity. The 𝜂-rules make such round trips collapse; currying and the associativity of Σ are the two cases needed below.
Let Γ⊢𝐴𝗍𝗒𝗉𝖾 and Γ⊢𝐵𝗍𝗒𝗉𝖾. A definitional isomorphism𝐴≅𝐵 consists of terms Γ⊢𝑓:𝐴→𝐵 and Γ⊢𝑔:𝐵→𝐴 such that {𝑥,𝑦}∩dom(Γ)=∅ and 𝑥≠𝑦, and Γ,𝑥:𝐴⊢𝑔(𝑓𝑥)≡𝑥:𝐴andΓ,𝑦:𝐵⊢𝑓(𝑔𝑦)≡𝑦:𝐵. Equivalently, 𝑔∘𝑓≡id𝐴 and 𝑓∘𝑔≡id𝐵. Indeed, abstraction congruence turns the two displayed equations into these equations of functions. Conversely, apply the first functional equation to 𝑥 and the second to 𝑦, use app-eq, and reduce both sides by 𝛽. Here ≅ relates two object-language types and requires judgmental round trips. The same printed glyph in theorem 27.21 relates metatheoretic sets of term classes by an ordinary bijection.
Let Γ⊢𝐴𝗍𝗒𝗉𝖾, Γ,𝑥:𝐴⊢𝐵𝗍𝗒𝗉𝖾, and Γ,𝑝:∑𝑥:𝐴𝐵⊢𝐶𝗍𝗒𝗉𝖾. Choose the displayed binders 𝑥,𝑝,𝑦,𝑓,𝑔,𝑤 pairwise fresh, disjoint from dom(Γ), and put 𝑃:=∏𝑝:∑𝑥:𝐴𝐵𝐶,𝑄:=∏𝑥:𝐴∏𝑦:𝐵𝐶[(𝑥,𝑦)/𝑝]. There is a definitional isomorphism 𝑃≅𝑄 given by Φ:=𝜆(𝑓:𝑃).𝜆(𝑥:𝐴).𝜆(𝑦:𝐵).𝑓((𝑥,𝑦)),Ψ:=𝜆(𝑔:𝑄).𝜆(𝑤:∑𝑥:𝐴𝐵).𝑔(𝗉𝗋1(𝑤))(𝗉𝗋2(𝑤)).
Proof. First check the typing. For Φ, given 𝑓:𝑃, 𝑥:𝐴, and 𝑦:𝐵, rule Σ-intro gives (𝑥,𝑦):∑𝑥:𝐴𝐵. Hence 𝑓((𝑥,𝑦)):𝐶[(𝑥,𝑦)/𝑝], and three abstractions finish.
For Ψ, let 𝑔:𝑄 and 𝑤:∑𝑥:𝐴𝐵. Substitution in the product type gives 𝑔(𝗉𝗋1(𝑤)):∏𝑦:𝐵[𝗉𝗋1(𝑤)/𝑥]𝐶[(𝗉𝗋1(𝑤),𝑦)/𝑝], by definition 26.10. Applying this term to 𝗉𝗋2(𝑤) gives 𝑔(𝗉𝗋1(𝑤))(𝗉𝗋2(𝑤)):𝐶[(𝗉𝗋1(𝑤),𝗉𝗋2(𝑤))/𝑝]. Symmetry of Σ-𝜂 gives (𝗉𝗋1(𝑤),𝗉𝗋2(𝑤))≡𝑤, whence 𝐶[(𝗉𝗋1(𝑤),𝗉𝗋2(𝑤))/𝑝]𝑆𝑢𝑏𝑠𝑡−𝐸𝑞−𝑇𝑦≡𝐶[𝑤/𝑝]. Rule Conv therefore gives the body the required type 𝐶[𝑤/𝑝] in the context Γ,𝑤:∑𝑥:𝐴𝐵.
Round trip on 𝑓: in context Γ,𝑓:𝑃, Ψ(Φ𝑓)Π−𝛽≡𝜆(𝑝:∑𝑥:𝐴𝐵).Φ𝑓(𝗉𝗋1(𝑝))(𝗉𝗋2(𝑝))Π−𝛽,𝜆−𝑒𝑞≡𝜆(𝑝:∑𝑥:𝐴𝐵).𝑓((𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)))Σ−𝜂,𝑎𝑝𝑝−𝑒𝑞,𝜆−𝑒𝑞≡𝜆(𝑝:∑𝑥:𝐴𝐵).𝑓𝑝Π−𝜂≡𝑓. Round trip on 𝑔: in the corresponding context, Φ(Ψ𝑔)Π−𝛽≡𝜆(𝑥:𝐴).𝜆(𝑦:𝐵).Ψ𝑔((𝑥,𝑦))Π−𝛽,𝜆−𝑒𝑞≡𝜆(𝑥:𝐴).𝜆(𝑦:𝐵).𝑔(𝗉𝗋1((𝑥,𝑦)))(𝗉𝗋2((𝑥,𝑦)))Σ−𝛽,𝑎𝑝𝑝−𝑒𝑞,𝜆−𝑒𝑞≡𝜆(𝑥:𝐴).𝜆(𝑦:𝐵).𝑔𝑥𝑦Π−𝜂,𝜆−𝑒𝑞≡𝑔. The last step uses Π-𝜂 first under the inner abstraction and then under the outer one, both in the symmetric direction; 𝜆-eq carries the inner equality through the outer binder. ◻
Proof. Take the comparison maps Θ:=𝜆(𝑞:∑𝑝:∑𝑥:𝐴𝐵𝐶).(𝗉𝗋1(𝗉𝗋1(𝑞)),(𝗉𝗋2(𝗉𝗋1(𝑞)),𝗉𝗋2(𝑞))),Ξ:=𝜆(𝑟:∑𝑥:𝐴∑𝑦:𝐵𝐶[(𝑥,𝑦)/𝑝]).((𝗉𝗋1(𝑟),𝗉𝗋1(𝗉𝗋2(𝑟))),𝗉𝗋2(𝗉𝗋2(𝑟))). For the typing of Θ: given 𝑞 in the left-hand type, 𝗉𝗋2(𝑞):𝐶[𝗉𝗋1(𝑞)/𝑝]. Put 𝑠:=𝗉𝗋1(𝑞). Equal substitution applied to 𝑠≡(𝗉𝗋1(𝑠),𝗉𝗋2(𝑠)) gives the short conversion 𝐶[𝑠/𝑝]≡𝐶[(𝗉𝗋1(𝑠),𝗉𝗋2(𝑠))/𝑝]. This places 𝗉𝗋2(𝑞) in the type required for the inner pair; record the converted judgment as Γ,𝑞:∑𝑝:∑𝑥:𝐴𝐵𝐶⊢𝗉𝗋2(𝑞):𝐶[(𝗉𝗋1(𝑠),𝗉𝗋2(𝑠))/𝑝]. The typing of Ξ needs no conversion.
For the first round trip, beta-reduce the two maps and their projections: Ξ(Θ𝑞)Π−𝛽,Σ−𝛽≡((𝗉𝗋1(𝑠),𝗉𝗋2(𝑠)),𝗉𝗋2(𝑞))(72.1),𝑝𝑎𝑖𝑟−𝑒𝑞≡(𝑠,𝗉𝗋2(𝑞))Σ−𝜂≡𝑞. For the other, put 𝑡:=𝗉𝗋2(𝑟). Then Θ(Ξ𝑟)Π−𝛽,Σ−𝛽≡(𝗉𝗋1(𝑟),(𝗉𝗋1(𝑡),𝗉𝗋2(𝑡)))Σ−𝜂,𝑝𝑎𝑖𝑟−𝑒𝑞≡(𝗉𝗋1(𝑟),𝑡)Σ−𝜂≡𝑟. No corresponding fiber conversion is needed in this second chain: the two outer pairs have the identical first component 𝗉𝗋1(𝑟). Thus Θ and Ξ satisfy definition 27.24. ◻
Judgmental equality of types is sufficient for a definitional isomorphism: if 𝐴≡𝐵, conversion types the identity abstraction in both directions. The converse fails, however: inverse comparison maps and their equations do not constitute a judgmental equality of the two type expressions. The eta rules play different roles. Without Σ-eta, the uncurrying map Ψ of example 27.25 and the eliminator of proposition 27.12 are not well typed: their bodies lie over (𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)) and must be converted to the fiber over 𝑝. Σ-eta is used again in both associativity round trips and in the third step of the currying round trip on 𝑓. By contrast, Π-eta is used in the round trips: at the final step of each currying composite and in the unit laws of lemma 27.7.
The identity maps give 𝐴≅𝐴; reversing the two maps gives an inverse isomorphism; and definitional isomorphisms compose. Composition is associative and has the identity isomorphisms as units, up to judgmental equality of the comparison maps.
Proof of Lemma 27.28 — Calculus of definitional isomorphisms
Proof. Only composition needs calculation. Let 𝑓:𝐴→𝐵 and 𝑔:𝐵→𝐴 be one inverse pair, and let 𝑓′:𝐵→𝐶 and 𝑔′:𝐶→𝐵 be another. The composite pair is 𝑓′∘𝑓:𝐴→𝐶 and 𝑔∘𝑔′:𝐶→𝐴. For 𝑥:𝐴, beta unfolds the two composites. Name the pointwise inverse equations 𝑔(𝑓𝑥)≡𝑥,𝑓(𝑔𝑦)≡𝑦,𝑔′(𝑓′𝑦)≡𝑦,𝑓′(𝑔′𝑧)≡𝑧.(𝐼𝐴)(𝐼𝐵)(𝐼′𝐵)(𝐼𝐶) Then (𝑔∘𝑔′)((𝑓′∘𝑓)𝑥)Π−𝛽≡𝑔(𝑔′(𝑓′(𝑓𝑥)))(𝐼′𝐵),𝑎𝑝𝑝−𝑒𝑞≡𝑔(𝑓𝑥)(𝐼𝐴)≡𝑥. The middle step substitutes 𝑓𝑥 for 𝑦 in the inverse hypothesis 𝑔′(𝑓′𝑦)≡𝑦 and then uses app-eq under 𝑔; the last step is the other inverse hypothesis 𝑔(𝑓𝑥)≡𝑥. The calculation at 𝑧:𝐶 is the same in the other order: (𝑓′∘𝑓)((𝑔∘𝑔′)𝑧)Π−𝛽,(𝐼𝐵)≡𝑓′(𝑔′𝑧)(𝐼𝐶)≡𝑧. The identity and inverse pairs are immediate from definition 27.24; the associative and unit equations for their comparison maps are precisely lemma 27.7. ◻
★★★ Assume Γ⊢𝐴𝗍𝗒𝗉𝖾, and construct definitional isomorphisms ∑𝑥:𝐴𝟏≅𝐴and∏𝑥:𝟏𝐵≅𝐵[⋆/𝑥], the latter for any family Γ,𝑥:𝟏⊢𝐵𝗍𝗒𝗉𝖾. For the second map, use 𝑥≡⋆ to convert an element of 𝐵[⋆/𝑥] to an element of 𝐵, then abstract over 𝑥. Identify precisely which eta rules the two round trips use.
★☆☆ Specialize example 27.25 to constant families to obtain the definitional isomorphism (𝐴×𝐵)→𝐶≅𝐴→(𝐵→𝐶), and check that the specialized maps agree with the classical 𝜆→ combinators 𝖼𝗎𝗋𝗋𝗒:=𝜆(𝑓:(𝐴×𝐵)→𝐶).𝜆(𝑥:𝐴).𝜆(𝑦:𝐵).𝑓((𝑥,𝑦)),𝗎𝗇𝖼𝗎𝗋𝗋𝗒:=𝜆(𝑔:𝐴→(𝐵→𝐶)).𝜆(𝑝:𝐴×𝐵).𝑔(𝗉𝗋1(𝑝))(𝗉𝗋2(𝑝)).
★★☆ Starting only from the positive Σ-eliminator and its computation rule, derive both projections and their two computation equations. Conversely, starting from projections, their computation equations, and judgmental Σ-eta, reconstruct the positive eliminator. Mark the exact step in the second direction at which Σ-eta is used.
★★☆ Reconstruct the two maps of dependent currying and annotate every step of both round trips by the Π- or Σ-computation and uniqueness rule used. Give one family for which replacing judgmental Σ-eta by a propositional equality would weaken the conclusion.
★★☆ Work in the freely generated Π-Σ theory with the beta rules but without judgmental Σ-eta. For a neutral variable 𝑝:∑𝑥:𝐴𝐵, compare the beta-normal forms of 𝑝 and (𝗉𝗋1(𝑝),𝗉𝗋2(𝑝)). Use this comparison to locate the stalled step in the uncurry–curry round trip. What conclusion remains if one adds only a propositional Σ-eta witness?
★★★Practical project.pisigma-rule-checker Implement in Agda or Kappa a checker for the Π, Σ, and 𝟏 rules on explicitly annotated terms. Preserve the invariant that every returned type is well formed in the input context. It must accept the dependent curry/uncurry maps and reject a second projection whose family is indexed by a different first component; print the inferred type or the first failed premise. Before implementing the checker, run the same two tests as derivation trees: derive the type of dependent curry and mark the first ill-typed premise of the mismatched projection. These trees specify the checker’s accepted and rejected results.
Sources. Dependent products and sums, the fourfold rule order, and their meaning explanations are developed in [ML98, ML75, ML84, ML96]; textbook accounts include [NPS90, NPS00, Tho91]. Internalization is emphasized in [AG26, Hof97] and has the categorical form described in [Jac99, Dyb96]. The HoTT Book gives positive Σ-elimination without judgmental Σ-eta [Uni13].