Initiality (theorem 54.27) says that the syntax maps uniquely into every model of its signature. Read carefully, it asserts nothing about the syntax: if no model exists, the statement is vacuous, and the interpretation of theorem 54.28 carries no information. Consider the judgment ⋅⊢𝑒:𝟎. Nothing proved so far excludes a derivation of it. Initiality would send such a derivation to an element of [[𝟎]] in every model; but until one model is built in which that collection is empty, the conclusion is empty too.
So the first task of semantics is not a comparison of formalisms. It is to exhibit one model, calculate in it, and read off the first underivability results. The model of this chapter is the one whose arithmetic the reader already knows: contexts are sets, types are set-valued families, terms are sections, and substitution is composition of functions.
The interface to be modelled
Fix once and for all the signature interpreted below.
T𝖲 consists of the structural rules of definition 54.2, the formers Π, Σ, 𝟏, 𝟎, 𝟐, ℕ, 𝖶 and 𝖨𝖽 with their formation, introduction, elimination and computation rules as printed in chapter 27–chapter 30, and a countable cumulative Russell-style hierarchy U0,U1,… closed under those formers. Nothing else is assumed: in particular T𝖲 contains neither equality reflection nor the eliminator 𝖪. Both are added explicitly where they are discussed.
Referenced from 3 locations
The semantic interface is the one built in chapter 54, and the present chapter uses exactly its data. It is worth restating in the compact form used below. A category with families (definition 54.16) is a category C with terminal object 𝟏, sets Ty(Γ) and Tm(Γ,𝐴), reindexing operations −[𝛾] that are strictly functorial in 𝛾, and for each 𝐴 ∈Ty(Γ) a comprehension Γ.𝐴 with projection 𝐩𝐴 and generic term 𝐪𝐴 satisfying the universal property 𝐩𝐴∘⟨𝛾,𝑎⟩=𝛾,𝐪𝐴[⟨𝛾,𝑎⟩]=𝑎, uniquely in ⟨𝛾,𝑎⟩. Every equation here is an equation of elements, not an isomorphism; section 151.8 shows what that strictness costs, and names the strictification problem that a later coherence construction must solve.
Two set-theoretic assumptions are used, and it matters where.
The set model
Work in convention 151.2. The category with families S has:
contexts the elements of V𝜔 and substitutions the functions between them; composition is composition of functions and 𝗂𝖽Γ is the identity function; the terminal object is a chosen singleton 𝟏:={ ⋆};
Ty(Γ):={𝐴 ∣𝐴 :Γ →V𝜔}, and for 𝛾 :Δ →Γ, 𝐴[𝛾]:=𝐴∘𝛾;
Tm(Γ,𝐴):={𝑎 ∣𝑎 is a function on Γ with 𝑎(𝑔) ∈𝐴(𝑔) for all 𝑔 ∈Γ}, and 𝑎[𝛾]:=𝑎 ∘𝛾;
Γ.𝐴:={(𝑔,𝑥) ∣𝑔 ∈Γ, 𝑥 ∈𝐴(𝑔)}, with 𝐩𝐴(𝑔,𝑥):=𝑔 and 𝐪𝐴(𝑔,𝑥):=𝑥; for 𝛾 :Δ →Γ and 𝑎 ∈Tm(Δ,𝐴[𝛾]), ⟨𝛾,𝑎⟩(𝑑):=(𝛾(𝑑),𝑎(𝑑)).
Referenced from 7 locations
Three facts must be checked before anything is interpreted: that the data are where they are claimed to be, that reindexing is functorial on the nose, and that comprehension has the stated universal property.
For every Γ ∈V𝜔 and 𝐴 ∈Ty(Γ) the collections Ty(Γ), Tm(Γ,𝐴) and Γ.𝐴 are elements of V𝜔.
Referenced from 4 locations
Proof of Lemma 151.4 — The data are sets
Proof. 𝜅𝜔 is a limit of inaccessibles, hence itself a limit cardinal closed under power set and replacement, so V𝜔 is a model of ZFC minus replacement in the ambient universe and is closed under pairing, power set, union and functions between its elements. A family 𝐴 :Γ →V𝜔 is a subset of Γ ×V𝜔 whose domain is Γ ∈V𝜔; since Γ has rank below 𝜅𝜔 and 𝜅𝜔 is regular, the image of 𝐴 is bounded, so 𝐴 ∈V𝜔 and Ty(Γ) ⊆V𝜔 is again an element of V𝜔. The set Γ.𝐴 is a subset of Γ ×⋃𝑔𝐴(𝑔), and Tm(Γ,𝐴) is a subset of the function set Γ →⋃𝑔𝐴(𝑔); both are formed by operations under which V𝜔 is closed. ◻
For all 𝐴 ∈Ty(Γ), 𝑎 ∈Tm(Γ,𝐴), 𝛾 :Δ →Γ and 𝛿 :Θ →Δ, 𝐴[𝗂𝖽]=𝐴,𝐴[𝛾∘𝛿]=𝐴[𝛾][𝛿],𝑎[𝗂𝖽]=𝑎,𝑎[𝛾∘𝛿]=𝑎[𝛾][𝛿].
Referenced from 6 locations
Proof of Lemma 151.5 — Strict functoriality
Proof. All four are the associativity and unit laws for composition of functions, which hold as equalities of sets of pairs. For the second, both sides are the function sending 𝑡 ∈Θ to 𝐴(𝛾(𝛿(𝑡))), and two functions with the same domain and the same values are equal. The typing of the fourth clause is the third clause applied to 𝐴: 𝑎[𝛾] has values 𝑎(𝛾(𝑑)) ∈𝐴(𝛾(𝑑)) =𝐴[𝛾](𝑑), so 𝑎[𝛾] ∈Tm(Δ,𝐴[𝛾]), and both sides of the equation are 𝑡 ↦𝑎(𝛾(𝛿(𝑡))). ◻
The point of lemma 151.5 is worth isolating, because it is the reason the set model is the first model and not the fifth: substitution in S is composition, and composition of functions is strictly associative. Nothing has to be chosen, so nothing has to be coherently rechosen.
Let Γ ∈S, 𝐴 ∈Ty(Γ), 𝛾 :Δ →Γ and 𝑎 ∈Tm(Δ,𝐴[𝛾]). Then ⟨𝛾,𝑎⟩ is the unique function Δ →Γ.𝐴 with 𝐩𝐴 ∘⟨𝛾,𝑎⟩ =𝛾 and 𝐪𝐴[⟨𝛾,𝑎⟩] =𝑎.
Referenced from 6 locations
Proof of Lemma 151.6 — Comprehension
Proof. Well-definedness: 𝑎(𝑑) ∈𝐴[𝛾](𝑑) =𝐴(𝛾(𝑑)), so (𝛾(𝑑),𝑎(𝑑)) ∈Γ.𝐴. The two equations are computed pointwise: (𝐩𝐴∘⟨𝛾,𝑎⟩)(𝑑)=𝐩𝐴(𝛾(𝑑),𝑎(𝑑))=𝛾(𝑑),𝐪𝐴[⟨𝛾,𝑎⟩](𝑑)=𝐪𝐴(𝛾(𝑑),𝑎(𝑑))=𝑎(𝑑). Uniqueness: suppose ℎ :Δ →Γ.𝐴 satisfies both equations. Every element of Γ.𝐴 is a pair, so ℎ(𝑑) =(𝐩𝐴(ℎ(𝑑)),𝐪𝐴(ℎ(𝑑))) =(𝛾(𝑑),𝑎(𝑑)) =⟨𝛾,𝑎⟩(𝑑). ◻
For 𝛾 :Δ →Γ and 𝐴 ∈Ty(Γ) the square with vertices Δ.𝐴[𝛾], Γ.𝐴, Δ, Γ, top edge 𝛾+ and vertical edges the projections, is a pullback of sets.
Referenced from 4 locations
Proof of Lemma 151.7 — Comprehension squares are pullbacks
Proof. Unfolding definition 54.19, 𝛾+(𝑑,𝑥) =(𝛾(𝑑),𝑥), which is well typed because 𝑥 ∈𝐴[𝛾](𝑑) =𝐴(𝛾(𝑑)). The square commutes. Given 𝑢 :Θ →Δ and 𝑣 :Θ →Γ.𝐴 with 𝐩𝐴 ∘𝑣 =𝛾 ∘𝑢, write 𝑣(𝑡) =(𝛾(𝑢(𝑡)),𝑥𝑡) with 𝑥𝑡 ∈𝐴(𝛾(𝑢(𝑡))) =𝐴[𝛾](𝑢(𝑡)) and put 𝑤(𝑡):=(𝑢(𝑡),𝑥𝑡). Then 𝑤 is the unique map with 𝐩𝐴[𝛾] ∘𝑤 =𝑢 and 𝛾+ ∘𝑤 =𝑣, since these two equations determine both components of 𝑤(𝑡). ◻
Proof of Proposition 151.8 — S is a CwF
Proof. Functions and their composition form a category with the singleton as terminal object; lemma 151.4 places all data in V𝜔; lemma 151.5 gives the four functoriality equations; and lemma 151.6 gives comprehension with its universal property. ◻
Reindexing and comprehension on one family
Abstract equations between reindexings are checked once and then used silently. It is worth performing them once on a family that is not a mere letter.
Take Γ0:=ℕ and let 𝑉:ℕ→V0,𝑉(𝑛):={𝑓∣𝑓:{0,…,𝑛−1}→{0,1}}, so 𝑉(0) ={∅} is a singleton (the empty function) and 𝑉(𝑛) has 2𝑛 elements. Then 𝑉 ∈Ty(Γ0). Its comprehension is the set of pairs Γ0.𝑉={(𝑛,𝑓)∣𝑛∈ℕ, 𝑓:{0,…,𝑛−1}→{0,1}}, the set of finite bit strings tagged by their length, with 𝐩𝑉(𝑛,𝑓) =𝑛 and 𝐪𝑉(𝑛,𝑓) =𝑓. The section 𝑧∈Tm(Γ0,𝑉),𝑧(𝑛):=(𝑖↦0) picks the all-zero string of each length.
Referenced from 4 locations
Continue example 151.9. Let 𝛾:ℕ→ℕ, 𝛾(𝑚):=𝑚+1,𝛿:𝟏→ℕ, 𝛿(⋆):=2. Reindexing computes to 𝑉[𝛾](𝑚)=𝑉(𝑚+1)={0,1}𝑚+1,𝑉[𝛾][𝛿](⋆)=𝑉(3)={0,1}3, while 𝛾 ∘𝛿 is the function ⋆ ↦3 and therefore 𝑉[𝛾 ∘𝛿]( ⋆) =𝑉(3). The two families are the same set of pairs, not merely isomorphic sets: both are the one-element function {( ⋆,𝑉(3))}. This is the content of lemma 151.5 in a case where the two sides are visibly built by different routes.
The pullback of lemma 151.7 is equally concrete. With 𝛾+(𝑚,𝑓) =(𝑚 +1,𝑓) the square
Diagram identifies the left-hand vertex with the set of bit strings of positive length, displayed by their length minus one. A cone (𝑢,𝑣) over the square with apex Θ is a length 𝑢(𝑡) together with a string 𝑣(𝑡) of length 𝑢(𝑡) +1, which is exactly one element of the left-hand vertex; the mediating map is forced.
Referenced from 2 locations
★☆☆ Continue example 151.9. Compute 𝑧[𝛾] ∈Tm(ℕ,𝑉[𝛾]) and ⟨𝛾,𝑧[𝛾]⟩ :ℕ →ℕ.𝑉 explicitly as sets of pairs, and check the two comprehension equations of lemma 151.6 on the argument 𝑚 =2.
Referenced from 2 locations
★★☆ Give Γ, 𝐴 ∈Ty(Γ) and two distinct substitutions 𝛾,𝛾′ :Δ →Γ with 𝐴[𝛾] =𝐴[𝛾′]. Conclude that reindexing is not faithful, and explain why this does not threaten lemma 151.6, whose uniqueness clause concerns ⟨ −, −⟩ rather than 𝐴[ −].
Referenced from 2 locations
Each former is an operation on the data of definition 151.3 together with the equations of section 54.4. The equations are literal equalities of functions, so each verification is a pointwise calculation.
For 𝐴 ∈Ty(Γ) and 𝐵 ∈Ty(Γ.𝐴) put Π(𝐴,𝐵)(𝑔):={ℎ∣ℎ a function on 𝐴(𝑔) with ℎ(𝑥)∈𝐵(𝑔,𝑥)},Σ(𝐴,𝐵)(𝑔):={(𝑥,𝑦)∣𝑥∈𝐴(𝑔), 𝑦∈𝐵(𝑔,𝑥)}, with 𝜆(𝑏)(𝑔):=(𝑥 ↦𝑏(𝑔,𝑥)), 𝖺𝗉𝗉(𝑓,𝑎)(𝑔):=𝑓(𝑔)(𝑎(𝑔)), 𝗉𝖺𝗂𝗋(𝑎,𝑏)(𝑔):=(𝑎(𝑔),𝑏(𝑔)) and the two projections. These operations satisfy the Π-structure of definition 54.21 and the Σ-structure of definition 54.22, including the 𝛽- and 𝜂-equations and strict stability under reindexing.
Referenced from 8 locations
Proof of Proposition 151.11 — Π - and Σ -structure
Proof. Typing: if 𝑏 ∈Tm(Γ.𝐴,𝐵) then 𝑏(𝑔,𝑥) ∈𝐵(𝑔,𝑥), so 𝜆(𝑏)(𝑔) ∈Π(𝐴,𝐵)(𝑔). 𝛽: for 𝑎 ∈Tm(Γ,𝐴), 𝖺𝗉𝗉(𝜆(𝑏),𝑎)(𝑔)=𝜆(𝑏)(𝑔)(𝑎(𝑔))=𝑏(𝑔,𝑎(𝑔))=𝑏[⟨𝗂𝖽,𝑎⟩](𝑔), using lemma 151.6 for the last step. 𝜂: for 𝑓 ∈Tm(Γ,Π(𝐴,𝐵)) the function 𝜆(𝖺𝗉𝗉(𝑓[𝐩𝐴],𝐪𝐴))(𝑔) sends 𝑥 to 𝑓(𝑔)(𝑥), and a function is determined by its values, so this is 𝑓(𝑔). Stability: for 𝛾 :Δ →Γ, Π(𝐴,𝐵)[𝛾](𝑑)=Π(𝐴,𝐵)(𝛾(𝑑))=Π(𝐴[𝛾],𝐵[𝛾+])(𝑑), because 𝐵[𝛾+](𝑑,𝑥) =𝐵(𝛾(𝑑),𝑥) by the formula for 𝛾+ in lemma 151.7; both sides are literally the same set of functions. The Σ-clauses are the same calculation with pairs, and the surjective-pairing equation holds because every element of Σ(𝐴,𝐵)(𝑔) is a pair. ◻
Put [[𝟏]](𝑔):={ ⋆}, [[𝟎]](𝑔):=∅, [[𝟐]](𝑔):={𝗍𝗍,𝖿𝖿} and [[ℕ]](𝑔):=ℕ, each constant in 𝑔. These carry the introduction and elimination structure of chapter 28, with 𝗂𝗇𝖽ℕ(𝐶,𝑐0,𝑐𝑠)(𝑔,𝑛):={𝑐0(𝑔)𝑛=0,𝑐𝑠(𝑔,𝑛−1,𝗂𝗇𝖽ℕ(𝐶,𝑐0,𝑐𝑠)(𝑔,𝑛−1))𝑛>0, with 𝗂𝗇𝖽𝟎(𝐶) the empty function, and the computation rules hold as equalities of functions.
Referenced from 6 locations
Proof of Proposition 151.12 — , , ,
Proof. 𝟎: a term of Tm(Γ.[[𝟎]],𝐶) is a function on the empty set Γ.[[𝟎]] =∅, and the empty function is the unique such, so the eliminator exists and its uniqueness equation is vacuous. ℕ: the displayed clauses define a function on ℕ by ordinary recursion in the metatheory; its two computation equations are the two clauses read at 𝑛 =0 and 𝑛 =𝑚 +1. Stability is immediate because the interpreting families are constant in 𝑔 and reindexing is precomposition. 𝟐 and 𝟏 are the finite cases of the same argument. ◻
For 𝐴 ∈Ty(Γ) and 𝐵 ∈Ty(Γ.𝐴) let 𝖶(𝐴,𝐵)(𝑔) be the set of well-founded trees generated by the single clause: if 𝑥 ∈𝐴(𝑔) and 𝑡 :𝐵(𝑔,𝑥) →𝖶(𝐴,𝐵)(𝑔), then 𝗌𝗎𝗉(𝑥,𝑡) ∈𝖶(𝐴,𝐵)(𝑔). With 𝗌𝗎𝗉 as constructor, and with the eliminator defined by recursion on that generation, the model S has 𝖶-structure and its computation rule holds strictly.
Referenced from 6 locations
Proof of Proposition 151.13 — W-types
Proof. Existence of the set: let 𝑇0:=∅ and 𝑇𝛼+1:={(𝑥,𝑡) ∣𝑥 ∈𝐴(𝑔) and 𝑡 :𝐵(𝑔,𝑥) →𝑇𝛼}, taking unions at limits. The sequence is increasing, and by replacement it stabilises at some ordinal below the cardinality of the ambient stage; put 𝖶(𝐴,𝐵)(𝑔):=⋃𝛼𝑇𝛼. It is an element of V𝜔 by lemma 151.4 applied to each stage. The eliminator: given 𝑐 ∈Tm(Γ′,𝐶′) interpreting the step, define 𝑒(𝗌𝗎𝗉(𝑥,𝑡)):=𝑐(𝑥,𝑡,𝜆𝑦. 𝑒(𝑡(𝑦))) by recursion on the least 𝛼 with 𝗌𝗎𝗉(𝑥,𝑡) ∈𝑇𝛼; this is well founded because 𝑡(𝑦) ∈𝑇𝛽 for some 𝛽 <𝛼. The computation rule is the defining clause read backwards. ◻
For 𝐴 ∈Ty(Γ) write Γ𝐴 for Γ.𝐴.𝐴[𝐩𝐴] and define 𝖨𝖽𝐴 ∈Ty(Γ𝐴) by 𝖨𝖽𝐴(𝑔,𝑥,𝑦):={⋆∣𝑥=𝑦}, a subsingleton, with 𝗋𝖾𝖿𝗅 the section (𝑔,𝑥) ↦ ⋆. Then S has 𝖨𝖽-structure in the sense of definition 54.23: the eliminator 𝖩 exists and satisfies its computation rule strictly. Moreover S validates the equality-reflection and equality-uniqueness rules of definition 35.1.
Referenced from 11 locations
Proof of Proposition 151.14 — Identity types
Proof. 𝖩: let 𝐶 ∈Ty(Γ𝐴.𝖨𝖽𝐴) and let 𝑑 be a section of 𝐶 over the diagonal. An element of the domain of 𝖩 is a tuple (𝑔,𝑥,𝑦,𝑝) with 𝑝 ∈𝖨𝖽𝐴(𝑔,𝑥,𝑦); the fibre is nonempty only when 𝑥 =𝑦, in which case 𝑝 = ⋆ and the tuple is literally (𝑔,𝑥,𝑥, ⋆). Put 𝖩(𝐶,𝑑)(𝑔,𝑥,𝑦,𝑝):=𝑑(𝑔,𝑥). This is well typed because the tuple equals the diagonal tuple, and its computation rule 𝖩(𝐶,𝑑)[𝑟𝐴] =𝑑 holds because the two sides have the same values. Reflection: if Tm(Γ,𝖨𝖽𝐴(𝑎,𝑏)) is nonempty then 𝑎(𝑔) =𝑏(𝑔) for every 𝑔, hence 𝑎 =𝑏 as functions, which is exactly the semantic content of Γ ⊢𝑎 ≡𝑏 :𝐴. Uniqueness: every element of a nonempty fibre is ⋆, so any two terms of an identity type are equal. ◻
Put U𝑖(𝑔):=V𝑖, constant in 𝑔, and 𝖤𝗅(𝑐)(𝑔):=𝑐(𝑔) for 𝑐 ∈Tm(Γ,U𝑖). Then U𝑖 ∈Ty(Γ) for every Γ, the decoding 𝖤𝗅( −) is strictly stable, V𝑖 ∈V𝑖+1 gives the cumulative hierarchy, and U𝑖 is closed under the operations of proposition 151.11, proposition 151.12, proposition 151.13, proposition 151.14. Closure under Π uses inaccessibility of 𝜅𝑖 and fails for a merely limit 𝜅𝑖.
Referenced from 8 locations
Proof of Proposition 151.16 — Universes and the exact use of inaccessibility
Proof. Stability holds because U𝑖 is constant and 𝖤𝗅( −) is evaluation. For closure under Π, let 𝑋 ∈V𝑖 and 𝑌 :𝑋 →V𝑖; the set ∏𝑥∈𝑋𝑌(𝑥) is a subset of the function set 𝑋 →⋃𝑥𝑌(𝑥). Regularity of 𝜅𝑖 makes ⋃𝑥𝑌(𝑥) an element of V𝑖, since it is a union of fewer than 𝜅𝑖 sets each of rank below 𝜅𝑖; and the strong limit property makes the function set an element of V𝑖, since |𝑋 →𝑍| =|𝑍||𝑋| <𝜅𝑖 whenever |𝑋|,|𝑍| <𝜅𝑖. Both properties are exactly strong inaccessibility. If 𝜅𝑖 were a strong limit but singular — ℶ𝜔, say — the union step fails: choose 𝑋 =𝜔 and 𝑌(𝑛) of rank cofinal in 𝜅𝑖. Closure under Σ and 𝖶 uses the same two properties, and closure under 𝖨𝖽 is trivial since its values are subsingletons. ◻
★☆☆ Verify the 𝜂-rule for Σ in S: for 𝑐 ∈Tm(Γ,Σ(𝐴,𝐵)) show 𝗉𝖺𝗂𝗋(𝗉𝗋1(𝑐),𝗉𝗋2(𝑐)) =𝑐, and identify the exact property of the metatheoretic pairing that is used.
Referenced from 2 locations
★★☆ Let 𝐴:=[[𝟐]] and let 𝐵(𝑔,𝗍𝗍):=∅, 𝐵(𝑔,𝖿𝖿):={ ⋆}. Compute 𝖶(𝐴,𝐵)(𝑔) of proposition 151.13 explicitly and exhibit a bijection with ℕ. Then show that this bijection is not an equality of sets, and say which clause of definition 54.16 would have to be weakened for that to matter.
Referenced from 2 locations
★★☆ Suppose 𝜆 is a strong limit cardinal of cofinality 𝜔. Exhibit 𝑋 ∈𝑉𝜆 and 𝑌 :𝑋 →𝑉𝜆 with ∏𝑥∈𝑋𝑌(𝑥) ∉𝑉𝜆, and locate the step of the proof of proposition 151.16 that fails.
Referenced from 2 locations
Soundness, consistency, and what is separated
The interpretation is now available for free. The term model T of theorem 54.27 is the initial model of the signature, so there is exactly one strict CwF-morphism into any other model of the same signature.
There is a unique strict CwF-morphism [[ −]] :T →S preserving the structure of convention 151.1 on the nose. Consequently, for every derivation:
if Γ 𝖼𝗍𝗑 then [[Γ]] ∈V𝜔;
if Γ ⊢𝐴 𝗍𝗒𝗉𝖾 then [[𝐴]] ∈Ty([[Γ]]);
if Γ ⊢𝑎 :𝐴 then [[𝑎]] ∈Tm([[Γ]],[[𝐴]]);
if Γ ⊢𝑎 ≡𝑏 :𝐴 then [[𝑎]] =[[𝑏]], and likewise for the other three equality judgments.
Referenced from 8 locations
Proof of Theorem 151.17 — Soundness of the set interpretation
Proof. S is a CwF by proposition 151.8 and carries every former of T𝖲 by proposition 151.11, proposition 151.12, proposition 151.13, proposition 151.14, proposition 151.16, with all equations strict. It is therefore a model of the signature in the sense of definition 116.28, and theorem 54.27 supplies the unique morphism. Clauses (1)–(4) are the definition of a strict CwF-morphism (definition 54.26) together with theorem 54.28: judgmental equality in T is equality of elements, and a function preserves equality. ◻
There is no derivation of ⋅ ⊢𝑒 :𝟎.
Referenced from 7 locations
Proof of Corollary 151.18 — Consistency
Proof. Such a derivation would give [[𝑒]] ∈Tm(𝟏,[[𝟎]]) by theorem 151.17. By proposition 151.12 that set consists of the functions ℎ on the singleton 𝟏 with ℎ( ⋆) ∈∅, and there are none. ◻
There is no derivation of ⋅ ⊢𝑝 :𝖨𝖽𝟐(𝗍𝗍,𝖿𝖿), and none of ⋅ ⊢𝗍𝗍 ≡𝖿𝖿 :𝟐.
Referenced from 4 locations
Proof of Corollary 151.19 — The two booleans are not identified
Proof. For the first, proposition 151.14 gives [[𝖨𝖽𝟐(𝗍𝗍,𝖿𝖿)]]( ⋆) ={ ⋆ ∣𝗍𝗍 =𝖿𝖿} =∅ because 𝗍𝗍 and 𝖿𝖿 are distinct elements of the interpreting set; argue as in corollary 151.18. For the second, clause (4) of theorem 151.17 would force [[𝗍𝗍]] =[[𝖿𝖿]], that is 𝗍𝗍 =𝖿𝖿. ◻
Let T=𝖲 extend T𝖲 by the equality-reflection and equality-uniqueness rules. Then T=𝖲 has no closed term of 𝟎, under the assumptions of convention 151.2.
Referenced from 4 locations
Proof of Corollary 151.20 — Extensional type theory is consistent relative to the metatheory
Proof. By the last sentence of proposition 151.14, S models the extended signature; repeat the argument of corollary 151.18 with the term model of T=𝖲 in place of T. ◻
The next statement is the exact limitation of the chapter, and it is proved, not conceded.
In S every identity fibre is a subsingleton. Consequently the interpretation of the type 𝖴𝖨𝖯:=∏𝑋:U0∏𝑥,𝑦:𝖤𝗅(𝑋)∏𝑝,𝑞:𝖨𝖽𝖤𝗅(𝑋)(𝑥,𝑦)𝖨𝖽𝖨𝖽𝖤𝗅(𝑋)(𝑥,𝑦)(𝑝,𝑞) is inhabited in S. Hence no argument based on S alone can show that 𝖴𝖨𝖯 is underivable in T𝖲.
Referenced from 4 locations
Proof of Proposition 151.21 — The set model cannot separate from uniqueness
Proof. By proposition 151.14, 𝖨𝖽𝐴(𝑔,𝑥,𝑦) is { ⋆} or ∅. A term of 𝖴𝖨𝖯 must, for every 𝑋 ∈V0, every 𝑥,𝑦 ∈𝑋 and every 𝑝,𝑞 in a fibre, produce an element of { ⋆ ∣𝑝 =𝑞}; and if the fibre containing 𝑝 and 𝑞 is nonempty then 𝑝 =𝑞 = ⋆, so the required element is ⋆. The constant function with value ⋆ is therefore a section, and it is stable under reindexing because it is constant. A model in which a type is inhabited proves nothing about the underivability of that type. ◻
★★☆ Using theorem 151.17 only, prove that ⋅ ⊢𝑝 :𝖨𝖽ℕ(𝟢,𝗌𝗎𝖼 𝟢) has no derivation, and that for each numeral 𝑛 the closed terms of 𝖨𝖽ℕ(𝑛,𝑛) all receive the same interpretation. State which of the two conclusions is a statement about the syntax and which about the model.
Referenced from 2 locations
★★☆ Show that S validates function extensionality: exhibit a section of the interpretation of ∏𝑓,𝑔:Π(𝐴,𝐵)(∏𝑥:𝐴𝖨𝖽𝐵(𝑓 𝑥,𝑔 𝑥)) →𝖨𝖽Π(𝐴,𝐵)(𝑓,𝑔). Which metatheoretic principle about functions is used, and where?
Referenced from 2 locations
One closed term, computed to the end
Soundness is an induction over derivations; the value it produces is a concrete set-theoretic object, and it is worth extracting one.
Let 𝑡:=𝜆𝑓.𝜆𝑥.𝑓(𝑓𝑥) : (𝟐→𝟐)→𝟐→𝟐 in the empty context, where 𝟐 →𝟐 abbreviates the non-dependent Π. Unfolding proposition 151.11, its interpretation is the element of Tm(𝟏, Π([[𝟐→𝟐]],[[𝟐→𝟐]])) given by [[𝑡]]( ⋆)(ℎ)(𝑏) =ℎ(ℎ(𝑏)) for ℎ :{𝗍𝗍,𝖿𝖿} →{𝗍𝗍,𝖿𝖿} and 𝑏 ∈{𝗍𝗍,𝖿𝖿}. There are four such ℎ; the value of [[𝑡]]( ⋆) is the function table id↦id,not↦id,const𝗍𝗍↦const𝗍𝗍,const𝖿𝖿↦const𝖿𝖿. Two consequences are immediate and neither is a tautology. First, ⋅ ⊢𝑡 not ≡𝜆𝑥. 𝑥 :𝟐 →𝟐 is consistent with the model, since both sides receive the value id; the model cannot refute it. Second, ⋅ ⊢𝑡 ≡𝜆𝑓. 𝜆𝑥. 𝑥 :(𝟐 →𝟐) →𝟐 →𝟐 is refuted, since the second term interprets as the constant function with value id, and the table above is not constant: it takes const𝗍𝗍 to const𝗍𝗍.
Referenced from 3 locations
If D and D′ are derivations of the same judgment, their interpretations in S agree.
Referenced from 2 locations
Proof of Corollary 151.23 — Interpretation of derivations is derivation-independent
Proof. By lemma 116.32 the interpretation factors through the quotient by judgmental equality, so it is a function of the judgment; uniqueness of the morphism in theorem 151.17 then leaves no room for a second value. ◻
From the semantic operations to slices
The operations of proposition 151.11 were defined elementwise. They can also be recognised as adjoints, and the recognition is a calculation rather than a slogan: it is derived from the formulas already verified, and it comes with an exact boundary.
Write S/Γ for the category whose objects are functions 𝑢 :𝑋 →Γ and whose arrows 𝑢 →𝑣 are functions 𝑘 over Γ.
The assignment 𝐴 ↦𝐩𝐴 :Γ.𝐴 →Γ extends to a functor Ty(Γ) →S/Γ that is full, faithful and essentially surjective, where Ty(Γ) is regarded as a discrete category on the set of families. Its essential inverse sends 𝑢 :𝑋 →Γ to the family 𝑔 ↦𝑢−1(𝑔).
Referenced from 5 locations
Proof of Lemma 151.24 — Families are slices
Proof. The two assignments are mutually inverse up to isomorphism over Γ: for a family 𝐴, the fibre of 𝐩𝐴 over 𝑔 is {𝑔} ×𝐴(𝑔), and (𝑔,𝑥) ↦𝑥 is a bijection onto 𝐴(𝑔) natural in 𝑔; for 𝑢 :𝑋 →Γ, the map 𝑥 ↦(𝑢(𝑥),𝑥) is a bijection over Γ from 𝑋 to Γ.(𝑔 ↦𝑢−1(𝑔)). The composite comparisons are identities on the nose in one direction and the displayed bijections in the other. ◻
Let 𝛾 :Δ →Γ and write 𝛾∗ :S/Γ →S/Δ for pullback along 𝛾. Then 𝛾∗ has a left adjoint Σ𝛾 given by postcomposition with 𝛾 and a right adjoint Π𝛾 given by Π𝛾(𝑣):={(𝑔,𝑠) ∣ 𝑔∈Γ, 𝑠:𝛾−1(𝑔)→𝑌, 𝑣∘𝑠=𝗂𝖽} → Γ, for 𝑣 :𝑌 →Δ, with the evident first projection. Under the correspondence of lemma 151.24 these are exactly the operations Σ(𝐴,𝐵) and Π(𝐴,𝐵) of proposition 151.11 in the case 𝛾 =𝐩𝐴.
Referenced from 10 locations
Proof of Proposition 151.25 — Σ and Π are the slice adjoints
Proof. Adjointness of Σ𝛾: an arrow 𝛾 ∘𝑢 →𝑤 over Γ is a function commuting with the structure maps, and this is literally an arrow 𝑢 →𝛾∗𝑤 over Δ. Adjointness of Π𝛾: an arrow 𝛾∗𝑤 →𝑣 over Δ assigns to each 𝑑 ∈Δ and each element of the fibre 𝑤−1(𝛾(𝑑)) an element of 𝑣−1(𝑑); currying over the fibres of 𝛾 turns this into an arrow 𝑤 →Π𝛾(𝑣) over Γ, and uncurrying inverts it. Both bijections are natural because they are defined pointwise. For the last claim, take 𝛾 =𝐩𝐴 and 𝑣 =𝐩𝐵: the fibre of 𝐩𝐴 over 𝑔 is {𝑔} ×𝐴(𝑔), so a section over that fibre is a function 𝑥 ↦𝑦 with 𝑦 ∈𝐵(𝑔,𝑥), which is an element of Π(𝐴,𝐵)(𝑔). The identification of Σ𝐩𝐴 with Σ(𝐴,𝐵) is the same unfolding. ◻
Every slice of S is cartesian closed and every pullback functor between slices has both adjoints; that is, S is locally cartesian closed.
Referenced from 3 locations
Proof of Corollary 151.26
Proof. Take Γ terminal in proposition 151.25 for the second claim, and 𝛾 a product projection in the slice for the first; exponentials in S/Γ are the special case of Π𝛾 where the domain is a pullback projection. ◻
Where the slogan stops: strict stability
It is tempting to summarise corollary 151.26 as “locally cartesian closed categories interpret dependent type theory”. The set model is exactly the case in which the slogan is harmless, and seeing why isolates the general problem.
In S the reindexing of a family is composition of functions, so it is strictly functorial by lemma 151.5. In the slice picture of lemma 151.24, reindexing is instead pullback, and a pullback is determined only up to isomorphism: it is a choice.
Fix the standard choice of pullback in S, 𝑋×Γ𝑌:={(𝑥,𝑦)∈𝑋×𝑌∣𝑢(𝑥)=𝑤(𝑦)}. There are 𝛾 :Δ →Γ, 𝛿 :Θ →Δ and 𝑤 :𝑋 →Γ such that 𝛿∗(𝛾∗𝑤) and (𝛾 ∘𝛿)∗𝑤 are distinct objects of S/Θ, canonically isomorphic but not equal.
Referenced from 8 locations
Proof of Proposition 151.27 — Chosen pullbacks are not strictly functorial
Proof. Take Θ =Δ =Γ =𝑋 ={0} with all maps the identity. Then (𝛾 ∘𝛿)∗𝑤 has underlying set {(0,0)}, whereas 𝛿∗(𝛾∗𝑤) has underlying set {(0,(0,0))}: the pair (0,(0,0)) is not the pair (0,0), since in the Kuratowski encoding their transitive closures differ. The canonical comparison (0,(0,0)) ↦(0,0) is a bijection over Θ, so the two objects are isomorphic in S/Θ, and not equal. ◻
★★☆ Prove the triangle identities for the adjunction Σ𝛾 ⊣𝛾∗ of proposition 151.25 by displaying unit and counit explicitly, and show that the unit is an isomorphism exactly when 𝛾 is injective.
Referenced from 2 locations
★★☆ State the Beck–Chevalley condition for the adjunctions of proposition 151.25 across a pullback square in S, prove it, and then exhibit, as in proposition 151.27, two chosen composites that the condition relates by an isomorphism and not by an equality.
Referenced from 3 locations
Optional route.
Chapter 54 supplies the syntactic CwF and initiality; nothing later in the core depends on this development.
Gluing a displayed model⋆
Corollary 151.18 used the interpretation of one type. A single model can be made to yield much more if the interpretation is made to carry a predicate alongside each semantic object, and if the predicate is chosen so that initiality forces it to hold everywhere. The construction is uniform: a displayed model over a model, its total model, and the section that initiality produces.
Let M be a CwF. A displayed CwF P over M consists of:
for each Γ ∈M a set P(Γ) of displayed contexts, and for each 𝛾 :Δ →Γ, each Δ∙ ∈P(Δ) and each Γ∙ ∈P(Γ) a set P(𝛾;Δ∙,Γ∙) of displayed substitutions, closed under identities and composition and satisfying the category laws;
for each Γ∙ and 𝐴 ∈Ty(Γ) a set Ty∙(Γ∙,𝐴), and for each 𝑎 ∈Tm(Γ,𝐴) and 𝐴∙ ∈Ty∙(Γ∙,𝐴) a set Tm∙(Γ∙,𝐴∙,𝑎), both with reindexing along displayed substitutions, strictly functorial;
displayed comprehension: for each 𝐴∙ a displayed context Γ∙.𝐴∙ over Γ.𝐴 with displayed projection and generic term satisfying the universal property of definition 54.16 fibrewise.
A displayed CwF supports a former when it carries operations over the operations of M satisfying the same equations.
Referenced from 4 locations
The displayed models used below are predicates: every displayed set is a subsingleton, and the equations of definition 151.29 then hold automatically once the closure conditions do.
Let T be the term model of T𝖲 restricted to Π, 𝟐 and ℕ, and let 𝐺 :T →S send Γ to the set homT(𝟏,Γ) of closing substitutions, a type 𝐴 over Γ to the family 𝜌 ↦Tm(𝟏,𝐴[𝜌]), and a term to its action on closing substitutions. Define a displayed CwF C over T by C(Γ):={𝑅∣𝑅⊆𝐺Γ},Ty∙(𝑅,𝐴):={𝑆∣𝑆(𝜌,𝑡) a subsingleton for 𝜌∈𝑅, 𝑡∈Tm(𝟏,𝐴[𝜌])},Tm∙(𝑅,𝑆,𝑎):={⋆∣𝑆(𝜌,𝑎[𝜌]) holds for all 𝜌∈𝑅}, with the clauses 𝑆𝟐(𝜌,𝑡) iff ⋅⊢𝑡≡𝗍𝗍:𝟐 or ⋅⊢𝑡≡𝖿𝖿:𝟐,𝑆ℕ(𝜌,𝑡) iff ⋅⊢𝑡≡𝗌𝗎𝖼𝑛𝟢:ℕ for some 𝑛∈ℕ,𝑆Π(𝐴,𝐵)(𝜌,𝑡) iff for all 𝑢 with 𝑆𝐴(𝜌,𝑢) we have 𝑆𝐵((𝜌,𝑢),𝑡𝑢).
Referenced from 8 locations
Let C be as in construction 151.30. The total model ∫C has as contexts the pairs (Γ,𝑅), as types the pairs (𝐴,𝑆), and as terms the terms 𝑎 of T for which the displayed set Tm∙(𝑅,𝑆,𝑎) is inhabited. Then ∫C is a CwF supporting Π, 𝟐 and ℕ, and the first projection 𝜋 :∫C →T is a strict CwF-morphism.
Referenced from 6 locations
Proof of Lemma 151.31 — The glued total model
Proof. Each component is a pair of a component of T and a displayed component, and each equation is the pair of the corresponding equations; since the displayed sets are subsingletons, the displayed halves of the equations are automatic. For Π one must check that the clause for 𝑆Π(𝐴,𝐵) is closed under the CwF operations: application of a term satisfying the clause to an argument satisfying 𝑆𝐴 satisfies 𝑆𝐵 by definition, and abstraction of a term satisfying 𝑆𝐵 over a fresh variable satisfies the clause because 𝛽 converts the application back. For 𝟐 the two constructors satisfy 𝑆𝟐 by reflexivity of judgmental equality, and the eliminator preserves the predicate by case analysis on which disjunct holds, using the two computation rules. ℕ is the same argument with an induction on 𝑛. Strictness of 𝜋 is immediate: it forgets the second component and every operation was defined componentwise. ◻
There is a unique strict CwF-morphism 𝜎 :T →∫C with 𝜋 ∘𝜎 =𝗂𝖽.
Referenced from 5 locations
Proof of Theorem 151.32 — Initiality supplies a section
Proof. ∫C is a model of the signature by lemma 151.31, so theorem 54.27 gives a unique morphism 𝜎; the composite 𝜋 ∘𝜎 is a strict endomorphism of the initial model, hence the identity, again by uniqueness. ◻
The section is computed by unfolding, and the three computations demanded by the construction are these.
Variables. For Γ =Δ.𝐴 the section sends 𝐪𝐴 to the pair (𝐪𝐴, ⋆), and the displayed component is the observation that for 𝜌 ∈𝑅Δ.𝐴 the closing substitution 𝜌 already contains a witness of 𝑆𝐴; this is exactly the definition of displayed comprehension in construction 151.30.
Π. For 𝑡 of type Π(𝐴,𝐵) the section produces a witness of 𝑆Π(𝐴,𝐵)(𝜌,𝑡[𝜌]), that is a function taking a witness of 𝑆𝐴(𝜌,𝑢) to a witness of 𝑆𝐵((𝜌,𝑢),𝑡[𝜌] 𝑢). Since the displayed sets are subsingletons this is a genuine implication and not extra data.
A closed boolean. Let ⋅ ⊢𝑡 :𝟐. Instantiating theorem 151.32 at the empty context and the identity closing substitution gives a witness of 𝑆𝟐(𝗂𝖽,𝑡), that is ⋅⊢𝑡≡𝗍𝗍:𝟐or⋅⊢𝑡≡𝖿𝖿:𝟐.
Referenced from 3 locations
In the fragment of T𝖲 with Π, 𝟐 and ℕ, every closed term of 𝟐 is judgmentally equal to 𝗍𝗍 or to 𝖿𝖿, and every closed term of ℕ is judgmentally equal to a numeral.
Referenced from 4 locations
Proof of Corollary 151.34 — Canonicity for the frozen fragment
Proof. The last paragraph of example 151.33 for 𝟐; the same instantiation with 𝑆ℕ for ℕ. ◻
★★☆ Complete the 𝟐 case of lemma 151.31: given 𝑆𝟐(𝜌,𝑡) and displayed witnesses for the two branches, produce a displayed witness for 𝗂𝗇𝖽𝟐(𝐶,𝑐𝗍𝗍,𝑐𝖿𝖿) 𝑡. Say exactly which computation rule is used in each disjunct.
Referenced from 2 locations
★★★ Show that the displayed structure of construction 151.30 fails to extend to a universe former if one attempts the naive clause “𝑆U(𝜌,𝑐) iff 𝑐 is judgmentally equal to a code”. Exhibit the circularity precisely, and explain why an inductive-recursive metatheoretic definition removes it.
Referenced from 2 locations
Limits of the set model
The results above are exactly three: a model, four underivability statements read off from it, and a slice presentation of its two dependent operations. Each has a sharp edge.
The underivability results of corollary 151.18, corollary 151.19, corollary 151.20 are relative. They assume ZFC together with the inaccessible hierarchy of convention 151.2, and by proposition 151.16 that assumption is used, not decorative: the universes of T𝖲 are interpreted by stages that must be closed under the semantic Π. A proof of consistency from weaker assumptions is a different theorem.
The model validates too much to be the last one. By proposition 151.14 it validates equality reflection, and by proposition 151.21 it validates uniqueness of identity proofs; so it cannot show that either principle is underivable, and it cannot distinguish intensional from extensional identity. A model that separates them must give identity fibres genuine structure while still validating 𝖩.
The slice presentation of section 151.7 is a theorem about S and not a general interpretation. Proposition 151.27 shows that chosen pullbacks are functorial only up to canonical isomorphism, so a locally cartesian closed category supplies weakly stable structure where the syntax demands strict equations. Turning the former into the latter is a separate construction with its own hypotheses.
The sources are separable. The CwF interface and the set interpretation are Hofmann’s [Hof97]; the precise comparison between categories with families and the other algebraic presentations, including the split structure used silently above, is Castellan, Clairambault and Dybjer’s [CCD21]; the fibrational reading of section 151.7 and the Beck–Chevalley formulation of exercise 151.9 follow Jacobs [Jac99]; and the representability presentation, used here only as a check on lemma 151.24, is Awodey’s [Awo18].
Optional route.
The gluing construction of section 151.9 is the pseudomorphism-based gluing of Kaposi, Huber and Sattler; its canonicity instance is gluing along the global-sections functor, and remark 151.35 states the three hypotheses that presentation requires. None of these sources is cited for a statement stronger than the one proved above.
Finally, the gluing development of section 151.9 is deliberately frozen: corollary 151.34 covers Π, 𝟐 and ℕ, and remark 151.35 records why universes need an inductive-recursive predicate rather than the naive clause. Canonicity for the fragment is not normalization, and it is not decidability of conversion.
[4]
Suggested first pass.
Begin with exercise 151.12, then exercise 151.13, and finish with exercise 151.16.
★★★ Let C be the category of sets and injections. Show that pullbacks along injections exist, that the analogue of Σ𝛾 from proposition 151.25 exists, and that the analogue of Π𝛾 does not. Identify the exact step of the proof of proposition 151.25 that fails, and conclude that the slice adjunctions are a property of S and not of any category with pullbacks.
Referenced from 3 locations
★★★ Corollary 151.20 shows that adding equality reflection keeps the theory consistent. Show, by exhibiting a context and a type, that in the presence of reflection the judgment Γ ⊢𝐴 ≡𝐵 𝗍𝗒𝗉𝖾 can depend on the inhabitation of an identity type, and explain in one paragraph why this makes type checking of the extended theory undecidable while leaving theorem 151.17 untouched. Do not use any result about normalization.
Referenced from 2 locations
Optional route.
★★★ Replace the predicate clauses of construction 151.30 by binary relations: C(Γ) becomes a set of relations on 𝐺Γ ×𝐺Γ, and 𝑆Π(𝐴,𝐵) relates 𝑡,𝑡′ when related arguments give related results. Redo lemma 151.31, theorem 151.32 for this displayed model and state the resulting theorem for a closed term of type ∏𝑋:U0𝖤𝗅(𝑋) →𝖤𝗅(𝑋) in the fragment without universes in which the statement still makes sense. Say which hypothesis of remark 151.35 the change stresses.
Referenced from 2 locations
★★★ Practical project.set-model-evaluator Implement the interpretation of theorem 151.17 for the closed fragment of T𝖲 with 𝟐, ℕ, non-dependent Π over finite types, and 𝖨𝖽 at 𝟐. Represent a context as a finite list of finite sets, a type as a function from context elements to finite sets, and a term as a section, exactly as in definition 151.3; the invariant the program must maintain is that every constructed section is total on its context and lands in the fibre. The program must print, for each named input: the interpreted set of a type, the tabulated section of a term, and an accept or reject decision for a proposed judgmental equality, deciding it by comparing tabulated sections. The acceptance test is that the interpretation of the term 𝑡 of example 151.22 tabulates to the four-entry table printed there; that the proposed equality ⋅ ⊢𝑡 ≡𝜆𝑓. 𝜆𝑥. 𝑥 :(𝟐 →𝟐) →𝟐 →𝟐 is rejected with the separating argument const𝗍𝗍; that the interpretation of 𝖨𝖽𝟐(𝗍𝗍,𝖿𝖿) is the empty set; and that a proposed closed term of 𝟎 is rejected. Tabulating sections decides equality only for the finite fragment implemented here; the program is evidence for corollary 151.19 on named inputs and proves no theorem of this chapter.
Referenced from 3 locations