Lectures onType Theory
Chapter 151
Chapter 151Core route

Set and CwF Models of Type Theory

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 e:0. Nothing proved so far excludes a derivation of it. Initiality would send such a derivation to an element of [[0]] 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.

Convention 151.1 — The signature T_ S

TS consists of the structural rules of definition 54.2, the formers Π, Σ, 1, 0, 2, N, W and Id with their formation, introduction, elimination and computation rules as printed in chapter 27chapter 30, and a countable cumulative Russell-style hierarchy U0,U1, closed under those formers. Nothing else is assumed: in particular TS contains neither equality reflection nor the eliminator K. Both are added explicitly where they are discussed.

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 1, sets Ty(Γ) and Tm(Γ,A), reindexing operations [γ] that are strictly functorial in γ, and for each ATy(Γ) a comprehension Γ.A with projection pA and generic term qA satisfying the universal property pAγ,a=γ,qA[γ,a]=a, uniquely in γ,a. 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.

Convention 151.2 — Ambient metatheory and its two uses

Work in ZFC. Fix a strictly increasing sequence κ0<κ1< of strongly inaccessible cardinals and write Vi:=Vκi for the corresponding cumulative stages; write Vω:=Vκω where κω:=supiκi. The inaccessibility of κi is used in exactly one place, proposition 151.16: it is what makes Vi closed under the semantic Π, Σ and W operations. The existence of Vω is used only to collect the whole hierarchy into one ambient set, so that Ty(Γ) below is a set rather than a proper class. No other clause of this chapter needs a large cardinal, and the underivability results of section 151.5 are therefore relative to these two assumptions and to the consistency of ZFC.

The set model

Definition 151.3 — The set model S

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 idΓ is the identity function; the terminal object is a chosen singleton 1:={};

  • Ty(Γ):={AA:ΓVω}, and for γ:ΔΓ, A[γ]:=Aγ;

  • Tm(Γ,A):={aa is a function on Γ with a(g)A(g) for all gΓ}, and a[γ]:=aγ;

  • Γ.A:={(g,x)gΓ, xA(g)}, with pA(g,x):=g and qA(g,x):=x; for γ:ΔΓ and aTm(Δ,A[γ]), γ,a(d):=(γ(d),a(d)).

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.

Lemma 151.4 — The data are sets

For every ΓVω and ATy(Γ) the collections Ty(Γ), Tm(Γ,A) and Γ.A are elements of Vω.

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 A:ΓVω is a subset of Γ×Vω whose domain is ΓVω; since Γ has rank below κω and κω is regular, the image of A is bounded, so AVω and Ty(Γ)Vω is again an element of Vω. The set Γ.A is a subset of Γ×gA(g), and Tm(Γ,A) is a subset of the function set ΓgA(g); both are formed by operations under which Vω is closed. ◻

Lemma 151.5 — Strict functoriality

For all ATy(Γ), aTm(Γ,A), γ:ΔΓ and δ:ΘΔ, A[id]=A,A[γδ]=A[γ][δ],a[id]=a,a[γδ]=a[γ][δ].

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 tΘ to A(γ(δ(t))), 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 A: a[γ] has values a(γ(d))A(γ(d))=A[γ](d), so a[γ]Tm(Δ,A[γ]), and both sides of the equation are ta(γ(δ(t))). ◻

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.

Lemma 151.6 — Comprehension

Let ΓS, ATy(Γ), γ:ΔΓ and aTm(Δ,A[γ]). Then γ,a is the unique function ΔΓ.A with pAγ,a=γ and qA[γ,a]=a.

Proof of Lemma 151.6 — Comprehension

Proof. Well-definedness: a(d)A[γ](d)=A(γ(d)), so (γ(d),a(d))Γ.A. The two equations are computed pointwise: (pAγ,a)(d)=pA(γ(d),a(d))=γ(d),qA[γ,a](d)=qA(γ(d),a(d))=a(d). Uniqueness: suppose h:ΔΓ.A satisfies both equations. Every element of Γ.A is a pair, so h(d)=(pA(h(d)),qA(h(d)))=(γ(d),a(d))=γ,a(d). ◻

Lemma 151.7 — Comprehension squares are pullbacks

For γ:ΔΓ and ATy(Γ) the square with vertices Δ.A[γ], Γ.A, Δ, Γ, top edge γ+ and vertical edges the projections, is a pullback of sets.

Proof of Lemma 151.7 — Comprehension squares are pullbacks

Proof. Unfolding definition 54.19, γ+(d,x)=(γ(d),x), which is well typed because xA[γ](d)=A(γ(d)). The square commutes. Given u:ΘΔ and v:ΘΓ.A with pAv=γu, write v(t)=(γ(u(t)),xt) with xtA(γ(u(t)))=A[γ](u(t)) and put w(t):=(u(t),xt). Then w is the unique map with pA[γ]w=u and γ+w=v, since these two equations determine both components of w(t). ◻

Proposition 151.8 — S is a CwF

The data of definition 151.3 satisfy every clause of definition 54.16.

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.

Example 151.9 — A family of bit vectors

Take Γ0:=N and let V:NV0,V(n):={ff:{0,,n1}{0,1}}, so V(0)={} is a singleton (the empty function) and V(n) has 2n elements. Then VTy(Γ0). Its comprehension is the set of pairs Γ0.V={(n,f)nN, f:{0,,n1}{0,1}}, the set of finite bit strings tagged by their length, with pV(n,f)=n and qV(n,f)=f. The section zTm(Γ0,V),z(n):=(i0) picks the all-zero string of each length.

Example 151.10 — A substitution square, computed

Continue example 151.9. Let γ:NN, γ(m):=m+1,δ:1N, δ():=2. Reindexing computes to V[γ](m)=V(m+1)={0,1}m+1,V[γ][δ]()=V(3)={0,1}3, while γδ is the function 3 and therefore V[γδ]()=V(3). The two families are the same set of pairs, not merely isomorphic sets: both are the one-element function {(,V(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 γ+(m,f)=(m+1,f) the square Mathematical diagramDiagram identifies the left-hand vertex with the set of bit strings of positive length, displayed by their length minus one. A cone (u,v) over the square with apex Θ is a length u(t) together with a string v(t) of length u(t)+1, which is exactly one element of the left-hand vertex; the mediating map is forced.

Exercise 151.1

★☆☆ Continue example 151.9. Compute z[γ]Tm(N,V[γ]) and γ,z[γ]:NN.V explicitly as sets of pairs, and check the two comprehension equations of lemma 151.6 on the argument m=2.

Exercise 151.2

★★☆ Give Γ, ATy(Γ) and two distinct substitutions γ,γ:ΔΓ with A[γ]=A[γ]. Conclude that reindexing is not faithful, and explain why this does not threaten lemma 151.6, whose uniqueness clause concerns , rather than A[].

The type formers computed

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.

Proposition 151.11 — Π - and Σ -structure

For ATy(Γ) and BTy(Γ.A) put Π(A,B)(g):={hh a function on A(g) with h(x)B(g,x)},Σ(A,B)(g):={(x,y)xA(g), yB(g,x)}, with λ(b)(g):=(xb(g,x)), app(f,a)(g):=f(g)(a(g)), pair(a,b)(g):=(a(g),b(g)) 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.

Proof of Proposition 151.11 — Π - and Σ -structure

Proof. Typing: if bTm(Γ.A,B) then b(g,x)B(g,x), so λ(b)(g)Π(A,B)(g). β: for aTm(Γ,A), app(λ(b),a)(g)=λ(b)(g)(a(g))=b(g,a(g))=b[id,a](g), using lemma 151.6 for the last step. η: for fTm(Γ,Π(A,B)) the function λ(app(f[pA],qA))(g) sends x to f(g)(x), and a function is determined by its values, so this is f(g). Stability: for γ:ΔΓ, Π(A,B)[γ](d)=Π(A,B)(γ(d))=Π(A[γ],B[γ+])(d), because B[γ+](d,x)=B(γ(d),x) 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 Σ(A,B)(g) is a pair. ◻

Proposition 151.12 — , , ,

Put [[1]](g):={}, [[0]](g):=, [[2]](g):={tt,ff} and [[N]](g):=N, each constant in g. These carry the introduction and elimination structure of chapter 28, with indN(C,c0,cs)(g,n):={c0(g)n=0,cs(g,n1,indN(C,c0,cs)(g,n1))n>0, with ind0(C) the empty function, and the computation rules hold as equalities of functions.

Proof of Proposition 151.12 — , , ,

Proof. 0: a term of Tm(Γ.[[0]],C) is a function on the empty set Γ.[[0]]=, and the empty function is the unique such, so the eliminator exists and its uniqueness equation is vacuous. N: the displayed clauses define a function on N by ordinary recursion in the metatheory; its two computation equations are the two clauses read at n=0 and n=m+1. Stability is immediate because the interpreting families are constant in g and reindexing is precomposition. 2 and 1 are the finite cases of the same argument. ◻

Proposition 151.13 — W-types

For ATy(Γ) and BTy(Γ.A) let W(A,B)(g) be the set of well-founded trees generated by the single clause: if xA(g) and t:B(g,x)W(A,B)(g), then sup(x,t)W(A,B)(g). With sup as constructor, and with the eliminator defined by recursion on that generation, the model S has W-structure and its computation rule holds strictly.

Proof of Proposition 151.13 — W-types

Proof. Existence of the set: let T0:= and Tα+1:={(x,t)xA(g) and t:B(g,x)Tα}, taking unions at limits. The sequence is increasing, and by replacement it stabilises at some ordinal below the cardinality of the ambient stage; put W(A,B)(g):=αTα. It is an element of Vω by lemma 151.4 applied to each stage. The eliminator: given cTm(Γ,C) interpreting the step, define e(sup(x,t)):=c(x,t,λy.e(t(y))) by recursion on the least α with sup(x,t)Tα; this is well founded because t(y)Tβ for some β<α. The computation rule is the defining clause read backwards. ◻

Proposition 151.14 — Identity types

For ATy(Γ) write ΓA for Γ.A.A[pA] and define IdATy(ΓA) by IdA(g,x,y):={x=y}, a subsingleton, with refl the section (g,x). Then S has Id-structure in the sense of definition 54.23: the eliminator J exists and satisfies its computation rule strictly. Moreover S validates the equality-reflection and equality-uniqueness rules of definition 35.1.

Proof of Proposition 151.14 — Identity types

Proof. J: let CTy(ΓA.IdA) and let d be a section of C over the diagonal. An element of the domain of J is a tuple (g,x,y,p) with pIdA(g,x,y); the fibre is nonempty only when x=y, in which case p= and the tuple is literally (g,x,x,). Put J(C,d)(g,x,y,p):=d(g,x). This is well typed because the tuple equals the diagonal tuple, and its computation rule J(C,d)[rA]=d holds because the two sides have the same values. Reflection: if Tm(Γ,IdA(a,b)) is nonempty then a(g)=b(g) for every g, hence a=b as functions, which is exactly the semantic content of Γab:A. Uniqueness: every element of a nonempty fibre is , so any two terms of an identity type are equal. ◻

Remark 151.15

Proposition 151.14 is the model’s most consequential clause and also its sharpest limitation. Identity fibres are subsingletons, so the model proves uniqueness of identity proofs. A model that refutes that principle must give an identity fibre more than one element while still validating J; that is a different construction and is carried out for groupoids in the next chapter.

Proposition 151.16 — Universes and the exact use of inaccessibility

Put Ui(g):=Vi, constant in g, and El(c)(g):=c(g) for cTm(Γ,Ui). Then UiTy(Γ) for every Γ, the decoding El() is strictly stable, ViVi+1 gives the cumulative hierarchy, and Ui is closed under the operations of proposition 151.11, proposition 151.12, proposition 151.13, proposition 151.14. Closure under Π uses inaccessibility of κi and fails for a merely limit κi.

Proof of Proposition 151.16 — Universes and the exact use of inaccessibility

Proof. Stability holds because Ui is constant and El() is evaluation. For closure under Π, let XVi and Y:XVi; the set xXY(x) is a subset of the function set XxY(x). Regularity of κi makes xY(x) an element of Vi, since it is a union of fewer than κi sets each of rank below κi; and the strong limit property makes the function set an element of Vi, since |XZ|=|Z||X|<κi whenever |X|,|Z|<κi. Both properties are exactly strong inaccessibility. If κi were a strong limit but singular — ω, say — the union step fails: choose X=ω and Y(n) of rank cofinal in κi. Closure under Σ and W uses the same two properties, and closure under Id is trivial since its values are subsingletons. ◻

Exercise 151.3

★☆☆ Verify the η-rule for Σ in S: for cTm(Γ,Σ(A,B)) show pair(pr1(c),pr2(c))=c, and identify the exact property of the metatheoretic pairing that is used.

Exercise 151.4

★★☆ Let A:=[[2]] and let B(g,tt):=, B(g,ff):={}. Compute W(A,B)(g) of proposition 151.13 explicitly and exhibit a bijection with N. 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.

Exercise 151.5

★★☆ Suppose λ is a strong limit cardinal of cofinality ω. Exhibit XVλ and Y:XVλ with xXY(x)Vλ, and locate the step of the proof of proposition 151.16 that fails.

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.

Theorem 151.17 — Soundness of the set interpretation

There is a unique strict CwF-morphism [[]]:TS preserving the structure of convention 151.1 on the nose. Consequently, for every derivation:

  1. if Γ ctx then [[Γ]]Vω;

  2. if ΓA type then [[A]]Ty([[Γ]]);

  3. if Γa:A then [[a]]Tm([[Γ]],[[A]]);

  4. if Γab:A then [[a]]=[[b]], and likewise for the other three equality judgments.

Proof of Theorem 151.17 — Soundness of the set interpretation

Proof. S is a CwF by proposition 151.8 and carries every former of TS 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. ◻

Corollary 151.18 — Consistency

There is no derivation of e:0.

Proof of Corollary 151.18 — Consistency

Proof. Such a derivation would give [[e]]Tm(1,[[0]]) by theorem 151.17. By proposition 151.12 that set consists of the functions h on the singleton 1 with h(), and there are none. ◻

Corollary 151.19 — The two booleans are not identified

There is no derivation of p:Id2(tt,ff), and none of ttff:2.

Proof of Corollary 151.19 — The two booleans are not identified

Proof. For the first, proposition 151.14 gives [[Id2(tt,ff)]]()={tt=ff}= because tt and ff are distinct elements of the interpreting set; argue as in corollary 151.18. For the second, clause (4) of theorem 151.17 would force [[tt]]=[[ff]], that is tt=ff. ◻

Corollary 151.20 — Extensional type theory is consistent relative to the metatheory

Let TS= extend TS by the equality-reflection and equality-uniqueness rules. Then TS= has no closed term of 0, under the assumptions of convention 151.2.

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 TS= in place of T. ◻

The next statement is the exact limitation of the chapter, and it is proved, not conceded.

Proposition 151.21 — The set model cannot separate from uniqueness

In S every identity fibre is a subsingleton. Consequently the interpretation of the type UIP:=X:U0x,y:El(X)p,q:IdEl(X)(x,y)IdIdEl(X)(x,y)(p,q) is inhabited in S. Hence no argument based on S alone can show that UIP is underivable in TS.

Proof of Proposition 151.21 — The set model cannot separate from uniqueness

Proof. By proposition 151.14, IdA(g,x,y) is {} or . A term of UIP must, for every XV0, every x,yX and every p,q in a fibre, produce an element of {p=q}; and if the fibre containing p and q is nonempty then p=q=, 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. ◻

Exercise 151.6

★★☆ Using theorem 151.17 only, prove that p:IdN(0,suc0) has no derivation, and that for each numeral n the closed terms of IdN(n,n) all receive the same interpretation. State which of the two conclusions is a statement about the syntax and which about the model.

Exercise 151.7

★★☆ Show that S validates function extensionality: exhibit a section of the interpretation of f,g:Π(A,B)(x:AIdB(fx,gx))IdΠ(A,B)(f,g). Which metatheoretic principle about functions is used, and where?

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.

Example 151.22 — A closed term and its value

Let t:=λf.λx.f(fx) : (22)22 in the empty context, where 22 abbreviates the non-dependent Π. Unfolding proposition 151.11, its interpretation is the element of Tm(1, Π([[22]],[[22]])) given by [[t]]()(h)(b)=h(h(b)) for h:{tt,ff}{tt,ff} and b{tt,ff}. There are four such h; the value of [[t]]() is the function table idid,notid,constttconsttt,constffconstff. Two consequences are immediate and neither is a tautology. First, tnotλx.x:22 is consistent with the model, since both sides receive the value id; the model cannot refute it. Second, tλf.λx.x:(22)22 is refuted, since the second term interprets as the constant function with value id, and the table above is not constant: it takes consttt to consttt.

Corollary 151.23 — Interpretation of derivations is derivation-independent

If D and D are derivations of the same judgment, their interpretations in S agree.

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 u:XΓ and whose arrows uv are functions k over Γ.

Lemma 151.24 — Families are slices

The assignment ApA:Γ.AΓ 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 u:XΓ to the family gu1(g).

Proof of Lemma 151.24 — Families are slices

Proof. The two assignments are mutually inverse up to isomorphism over Γ: for a family A, the fibre of pA over g is {g}×A(g), and (g,x)x is a bijection onto A(g) natural in g; for u:XΓ, the map x(u(x),x) is a bijection over Γ from X to Γ.(gu1(g)). The composite comparisons are identities on the nose in one direction and the displayed bijections in the other. ◻

Proposition 151.25 — Σ and Π are the slice adjoints

Let γ:ΔΓ and write γ:S/ΓS/Δ for pullback along γ. Then γ has a left adjoint Σγ given by postcomposition with γ and a right adjoint Πγ given by Πγ(v):={(g,s) | gΓ, s:γ1(g)Y, vs=id}  Γ, for v:YΔ, with the evident first projection. Under the correspondence of lemma 151.24 these are exactly the operations Σ(A,B) and Π(A,B) of proposition 151.11 in the case γ=pA.

Proof of Proposition 151.25 — Σ and Π are the slice adjoints

Proof. Adjointness of Σγ: an arrow γuw over Γ is a function commuting with the structure maps, and this is literally an arrow uγw over Δ. Adjointness of Πγ: an arrow γwv over Δ assigns to each dΔ and each element of the fibre w1(γ(d)) an element of v1(d); currying over the fibres of γ turns this into an arrow wΠγ(v) over Γ, and uncurrying inverts it. Both bijections are natural because they are defined pointwise. For the last claim, take γ=pA and v=pB: the fibre of pA over g is {g}×A(g), so a section over that fibre is a function xy with yB(g,x), which is an element of Π(A,B)(g). The identification of ΣpA with Σ(A,B) is the same unfolding. ◻

Corollary 151.26

Every slice of S is cartesian closed and every pullback functor between slices has both adjoints; that is, S is locally cartesian closed.

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.

Proposition 151.27 — Chosen pullbacks are not strictly functorial

Fix the standard choice of pullback in S, X×ΓY:={(x,y)X×Yu(x)=w(y)}. There are γ:ΔΓ, δ:ΘΔ and w:XΓ such that δ(γw) and (γδ)w are distinct objects of S/Θ, canonically isomorphic but not equal.

Proof of Proposition 151.27 — Chosen pullbacks are not strictly functorial

Proof. Take Θ=Δ=Γ=X={0} with all maps the identity. Then (γδ)w has underlying set {(0,0)}, whereas δ(γw) 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. ◻

Remark 151.28 — The obligation this creates

Proposition 151.27 does not damage anything proved above, because definition 151.3 never used chosen pullbacks: it used families and composition. The proposition does show that the slice presentation carries an extra obligation. A structure defined only up to isomorphism satisfies the substitution equations of definition 54.16 only up to isomorphism, whereas the syntax demands them on the nose. Repairing this — replacing weakly stable structure by strictly stable structure without changing what is modelled — is a separate construction with its own hypotheses, and it is the subject of a later chapter. Until it is available, “locally cartesian closed category” names a source of models, not an interpretation.

Exercise 151.8

★★☆ 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.

Exercise 151.9

★★☆ 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.

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.

Definition 151.29 — Displayed CwF

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 ATy(Γ) a set Ty(Γ,A), and for each aTm(Γ,A) and ATy(Γ,A) a set Tm(Γ,A,a), both with reindexing along displayed substitutions, strictly functorial;

  • displayed comprehension: for each A a displayed context Γ.A over Γ.A 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.

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.

Construction 151.30 — Canonicity predicate over the syntax

Let T be the term model of TS restricted to Π, 2 and N, and let G:TS send Γ to the set homT(1,Γ) of closing substitutions, a type A over Γ to the family ρTm(1,A[ρ]), and a term to its action on closing substitutions. Define a displayed CwF C over T by C(Γ):={RRGΓ},Ty(R,A):={SS(ρ,t) a subsingleton for ρR, tTm(1,A[ρ])},Tm(R,S,a):={S(ρ,a[ρ]) holds for all ρR}, with the clauses S2(ρ,t) iff ttt:2 or tff:2,SN(ρ,t) iff tsucn0:N for some nN,SΠ(A,B)(ρ,t) iff for all u with SA(ρ,u) we have SB((ρ,u),tu).

Lemma 151.31 — The glued total model

Let C be as in construction 151.30. The total model C has as contexts the pairs (Γ,R), as types the pairs (A,S), and as terms the terms a of T for which the displayed set Tm(R,S,a) is inhabited. Then C is a CwF supporting Π, 2 and N, and the first projection π:CT is a strict CwF-morphism.

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 SΠ(A,B) is closed under the CwF operations: application of a term satisfying the clause to an argument satisfying SA satisfies SB by definition, and abstraction of a term satisfying SB over a fresh variable satisfies the clause because β converts the application back. For 2 the two constructors satisfy S2 by reflexivity of judgmental equality, and the eliminator preserves the predicate by case analysis on which disjunct holds, using the two computation rules. N is the same argument with an induction on n. Strictness of π is immediate: it forgets the second component and every operation was defined componentwise. ◻

Theorem 151.32 — Initiality supplies a section

There is a unique strict CwF-morphism σ:TC with πσ=id.

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.

Example 151.33 — The section on a variable, on Π , and on a closed boolean

Variables. For Γ=Δ.A the section sends qA to the pair (qA,), and the displayed component is the observation that for ρRΔ.A the closing substitution ρ already contains a witness of SA; this is exactly the definition of displayed comprehension in construction 151.30.

Π. For t of type Π(A,B) the section produces a witness of SΠ(A,B)(ρ,t[ρ]), that is a function taking a witness of SA(ρ,u) to a witness of SB((ρ,u),t[ρ]u). Since the displayed sets are subsingletons this is a genuine implication and not extra data.

A closed boolean. Let t:2. Instantiating theorem 151.32 at the empty context and the identity closing substitution gives a witness of S2(id,t), that is ttt:2ortff:2.

Corollary 151.34 — Canonicity for the frozen fragment

In the fragment of TS with Π, 2 and N, every closed term of 2 is judgmentally equal to tt or to ff, and every closed term of N is judgmentally equal to a numeral.

Proof of Corollary 151.34 — Canonicity for the frozen fragment

Proof. The last paragraph of example 151.33 for 2; the same instantiation with SN for N. ◻

Remark 151.35 — Hypotheses that may not be dropped

Three hypotheses are load-bearing and each is used above. First, the target of the gluing must support Σ-, unit- and identity-type structure, since the displayed comprehension of definition 151.29 is a Σ-type and the predicate clauses are stated with judgmental equations; without them the total model is not a model of the signature. Second, the functor along which one glues need only be a pseudomorphism: it must preserve identities, composition and the actions on types and terms strictly, but the empty context and context extension only up to definitional isomorphism, together with the naturality condition relating the comparison isomorphism to lifting. The global-sections functor G of construction 151.30 is of exactly this kind, and is not strict. Third, universes are excluded from the frozen fragment above: a displayed predicate over a universe must be an inductive-recursive datum, since the predicate on El(c) is defined by recursion on the code c while the codes are being generated. Kovács’s canonicity theorem for a countable Russell hierarchy whose universes support indexed inductive-recursive types [Kov26] is proved in that way: indexed induction-recursion is first constructed from plain induction-recursion at the same definitional computation rules, and the canonicity predicate for each inductive-recursive type is then encoded by a metatheoretic indexed inductive-recursive type. Neither that theorem nor corollary 151.34 is a normalization theorem, and neither is a statement about the general indexed families of chapter 31.

Exercise 151.10

★★☆ Complete the 2 case of lemma 151.31: given S2(ρ,t) and displayed witnesses for the two branches, produce a displayed witness for ind2(C,ctt,cff)t. Say exactly which computation rule is used in each disjunct.

Exercise 151.11

★★★ Show that the displayed structure of construction 151.30 fails to extend to a universe former if one attempts the naive clause “SU(ρ,c) iff c is judgmentally equal to a code”. Exhibit the circularity precisely, and explain why an inductive-recursive metatheoretic definition removes it.

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 TS 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 J.

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 Π, 2 and N, 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.

Exercise 151.12

★★☆ Let S be defined exactly as S except that Ty(Γ):={AA:ΓV0} for every Γ, with the same reindexing. Prove that S is a CwF, determine which of proposition 151.11, proposition 151.12, proposition 151.13, proposition 151.14, proposition 151.16 survive, and state the largest fragment of TS that S models. Then decide whether corollary 151.18 still follows.

Exercise 151.13

★★★ 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.

Exercise 151.14

★★★ 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 ΓAB type 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.

Optional route.

Exercise 151.15

★★★ Replace the predicate clauses of construction 151.30 by binary relations: C(Γ) becomes a set of relations on GΓ×GΓ, and SΠ(A,B) relates t,t 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 X:U0El(X)El(X) in the fragment without universes in which the statement still makes sense. Say which hypothesis of remark 151.35 the change stresses.

Exercise 151.16 — Practical: a set-model evaluator

★★★ Practical project.set-model-evaluator Implement the interpretation of theorem 151.17 for the closed fragment of TS with 2, N, non-dependent Π over finite types, and Id at 2. 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 t of example 151.22 tabulates to the four-entry table printed there; that the proposed equality tλf.λx.x:(22)22 is rejected with the separating argument consttt; that the interpretation of Id2(tt,ff) is the empty set; and that a proposed closed term of 0 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.

Search the book

Type to search the local edition.