Lectures onType Theory
Chapter 195
Chapter 195Core route

Truncation Levels, Propositions, and Logic

Recall from definition 189.43 that a type is a mere proposition when any two of its elements are equal, and a set when each identity type is a mere proposition. Iterating this condition gives the truncation levels. Unit lies at the bottom, 2 is a set but not a proposition, and a univalent universe is not a set.

The hierarchy of truncation levels

The hierarchy is generated from contractibility by iterating the passage to identity types.

Recall from definition 62.19 that isContr(A):=a:Ax:Aa=Ax; its two components are the centre and the contraction. We keep this notation fixed throughout the truncation hierarchy.

For 1, the pair (,λx.refl) is a contraction because Unit-η makes every x judgmentally . By contrast 2 is not contractible: a contraction would identify tt and ff, contradicting theorem 29.14.

Definition 66.2 — Truncation levels

For each integer n2 the predicate is-n-type:UU is defined by recursion on n: is-(2)-type(X):=isContr(X),is-(n+1)-type(X):=x,y:Xis-n-type(x=Xy). A type X with is-n-type(X) inhabited is a n-type, also called an n-truncated type.

Unfolding once gives is-1-type(X)=x,y:XisContr(x=Xy),is-0-type(X)=x,y:Xis-1-type(x=Xy). We call (1)-types propositions and 0-types sets.

Remark 66.3 — Indexing

The index n in definition 66.2 is a numeral of the metatheory, so is-n-type is a family of definitions, one per level, and statements “for all n” are proved by metatheoretic induction with base case 2. Equivalently, an internal treatment indexes levels by k:N via n=k2.

Definition 66.4 — Propositions and sets

For a type A put isProp(A):=x:Ay:Ax=Ay,isSet(A):=x:Ay:AisProp(x=Ay). A type with isProp(A) inhabited is a mere proposition, meaning that every two elements are equal. A type with isSet(A) inhabited is a set, meaning that each identity type is a mere proposition. Theorem 66.9 identifies propositions with (1)-types and sets with 0-types.

Convention 195.4 — Theory signatures

The hierarchy through closure under Σ-types is developed in the intensional base of chapter 26chapter 30. Write HoTT0 for that base plus the univalence axiom of definition 65.6; this is the signature used whenever function extensionality or paths in a universe enter. Each theorem below is read in the weaker base unless its statement, proof, or nearest signature marker uses HoTT0.

The proof that propositions are sets uses transport in the based path family, transportp(q)=qp. We record it with the three path-induction laws used alongside it.

Lemma 66.5 — Path algebra recollections

Let A be a type, a,y,z:A, and p:y=Az.

  1. For q:a=Ay, transport in the family of based paths is concatenation: trpza=Az(q)=qp.

  2. ap is functorial: apgf(p)=apg(apf(p)), apid(p)=p, and apf(pp)=apf(p)apf(p).

  3. For families B,C over A and b:B(y), trpxB(x)+C(x)(inl(b))=inl(trpB(b)), and dually for inr.

  4. The based path space x:Aa=Ax is contractible, with center (a,refl).

Proof of Lemma 66.5 — Path algebra recollections

Proof. (1)–(3): path induction on p; after p:=refl both sides are equal by the computation rules of tr and ap (chapter 30) and the unit laws of theorem 30.20. (4): the center is (a,refl); given (x,q), path induction on q reduces the required path (a,refl)=(x,q) to refl. ◻

Lemma 66.6 — Contractibility propagates to paths

If A is contractible, then x=Ay is contractible for all x,y:A.

Proof of Lemma 66.6 — Contractibility propagates to paths

Proof. Let a be the center with contraction C. Take C(x)1C(y) as center of x=Ay. For p:x=Ay, path induction reduces the goal C(x)1C(x)=p to the case p:=refl, which is the inverse law of theorem 30.20. ◻

Lemma 66.7 — Pointed propositions

  1. If A is a proposition and a:A, then A is contractible; conversely every contractible type is an inhabited proposition.

  2. If P and Q are propositions and there are maps f:PQ and g:QP, then PQ.

  3. An inhabited proposition is equivalent to 1.

Proof of Lemma 66.7 — Pointed propositions

Proof. (1) With h:isProp(A), the pair (a,h(a)) contracts A; conversely a contraction C yields h(x,y):=C(x)1C(y). (2) The composite gf is homotopic to idP because P is a proposition, and likewise fgidQ; theorem 62.27 turns this quasi-inverse into an equivalence. (3) By (2) with Q:=1: the maps are λx. and the constant at the given point, and 1 is a proposition since any two of its elements are equal to by the η-rule (chapter 27). ◻

Lemma 66.8 — Propositions are sets

If A is a proposition, then A is a set.

Proof of Lemma 66.8 — Propositions are sets

Proof. Let h:isProp(A); fix x:A and put g:=h(x):y:Ax=Ay. For y,z:A and p:y=Az, dependent application (chapter 62) gives apdg(p):trpzx=Az(g(y))=g(z), and by lemma 66.5(1) the left-hand side is g(y)p. Hence g(y)p=g(z), so p=g(y)1g(z) by the groupoid laws (theorem 30.20). The right-hand side does not depend on p: any two p,q:y=Az are both equal to g(y)1g(z), hence equal. ◻

Theorem 66.9 — The bottom levels

A type A is a (1)-type if and only if it is a proposition, and a 0-type if and only if it is a set.

Proof of Theorem 66.9 — The bottom levels

Proof. If is-(1)-type(A), each x=Ay is contractible, and its center provides isProp(A). Conversely let h:isProp(A); each x=Ay is inhabited by h(x,y) and is a proposition by lemma 66.8, hence contractible by lemma 66.7(1). The second claim follows by applying the first to each x=Ay. ◻

Theorem 66.10 — Cumulativity

For every n2: if A is an n-type, then A is an (n+1)-type.

Proof of Theorem 66.10 — Cumulativity

Proof. Induction on n. Base case: a contractible type has contractible path types, i.e. is a (1)-type (lemma 66.6). Inductive step: if A is an (n+1)-type, each x=Ay is an n-type, hence an (n+1)-type by the inductive hypothesis, so A is an (n+2)-type. ◻

Corollary 66.11

A proposition is an n-type for every n1; a set is an n-type for every n0; and if A is an n-type, then x=Ay is an n-type for all x,y:A.

Proof of Corollary 66.11

Proof. Iterate theorem 66.10 from theorem 66.9. For the last claim: A is an (n+1)-type, and unfold definition 66.2. ◻

Example 195.12 — First rungs

1 is contractible, with center and contraction given by 1-induction into x(=x). The type 0 is a proposition by empty elimination but is not contractible, since a center would inhabit it. The type 2 is a set (lemma 65.21) but not a proposition, because tt=ff is empty. The path-space calculation of proposition 189.44 makes N a set, and 0suc(0) shows it is not a proposition. Finally, univalence in HoTT0 makes U not a set (theorem 65.22). These examples do not imply that every type is n-truncated for some finite n; no such bound is assumed.

Exercise 66.1

★☆☆ Write out the path-induction proofs of lemma 66.5(1)–(3), naming at each step the computation rule of tr or ap (chapter 30) being used.

Exercise 66.2

★★☆ Show that the following are equivalent for a type A: (i) A is contractible; (ii) A1; (iii) A is an inhabited proposition.

Exercise 66.3

★☆☆ A retraction is a map r:XY with a section s:YX and a homotopy rsidY. Show that a retract of a contractible type is contractible.

Exercise 66.4

★☆☆ Show that is-(2)-type cannot be weakened: exhibit a type all of whose identity types are contractible that is not itself contractible, and explain why the hierarchy is nevertheless not extended downward.

Closure properties

If r:XY has a section s, then paths in Y are retracts of paths in X. Hence the truncation level of X descends to Y.

Theorem 66.13 — Closure under retracts

Let r:XY have a section s:YX with ϵ:rsidY. If X is an n-type (n2), then so is Y.

Proof of Theorem 66.13 — Closure under retracts

Proof. Induction on n. Base case (n=2): let x0 be the center of X with contraction C; then r(x0) is a center for Y, since for y:Y we have apr(C(s(y)))ϵ(y):r(x0)=Yy.

Inductive step: assume the claim for n, let X be an (n+1)-type and y,y:Y; we show y=Yy is an n-type by exhibiting it as a retract of the n-type s(y)=Xs(y). The section is aps; the retraction is t(q):=ϵ(y)1apr(q)ϵ(y). For p:y=Yy, naturality of ϵ (theorem 62.13) at p gives ϵ(y)p=aprs(p)ϵ(y), and aprs(p)=apr(aps(p)) by lemma 66.5(2); whiskering by ϵ(y)1 and the groupoid laws (theorem 30.20) then yield t(aps(p))=p. Conclude by the inductive hypothesis. ◻

Corollary 66.14 — Invariance under equivalence

If XY and X is an n-type, then Y is an n-type.

Proof of Corollary 66.14 — Invariance under equivalence

Proof. By proposition 62.24, an equivalence f:XY has a quasi-inverse g:YX with fgidY; thus Y is a retract of X. Apply theorem 66.13. ◻

Theorem 66.15 — Closure under Σ

Let n2, let A be an n-type, and let B be a family over A with each B(a) an n-type. Then x:AB(x) is an n-type.

Proof of Theorem 66.15 — Closure under Σ

Proof. Induction on n. Base case: let a0 center A and b0 center B(a0); given (a,b), the contraction of A gives p:a0=Aa, and trpB(b0)=b holds because any two elements of the contractible type B(a) are equal (lemma 66.7(1)); by theorem 62.30 these two data assemble to (a0,b0)=(a,b), so (a0,b0) is a center.

Inductive step: for (a1,b1),(a2,b2), theorem 62.30 gives ((a1,b1)=(a2,b2))p:a1=Aa2trpB(b1)=B(a2)b2, and the right-hand side is an n-type by the inductive hypothesis (base a1=Aa2 and fibers both n-types); conclude by corollary 66.14. ◻

From this point to the propositional-truncation signature marker, the ambient theory is HoTT0. The first additional consequence used is function extensionality, derived from univalence in theorem 65.18.

Theorem 66.16 — Closure under Π

Let n2 and let B be a family over A with each B(a) an n-type. Then x:AB(x) is an n-type. In particular AB is an n-type whenever B is.

Proof of Theorem 66.16 — Closure under Π

Proof. Induction on n. Base case: f0:=λx.c(x), where c(x) is the center of B(x), is a center: for g, function extensionality (theorem 65.18) turns the pointwise contraction paths c(x)=g(x) into f0=g. Inductive step: for f,g:x:AB(x), by theorem 65.18 the map happly is an equivalence (f=g)x:Af(x)=B(x)g(x); the right-hand side is an n-type by the inductive hypothesis, so conclude by corollary 66.14. ◻

Definition 66.17 — Embedding

A map f:AB is an embedding if apf:(x=Ax)(f(x)=Bf(x)) is an equivalence for all x,x:A.

Proposition 66.18 — Descent along embeddings

If f:AB is an embedding and B is an n-type with n1, then A is an n-type.

Proof of Proposition 66.18 — Descent along embeddings

Proof. For x,x:A the type x=Ax is equivalent to f(x)=Bf(x), which is an (n1)-type by definition 66.2; apply corollary 66.14. (The claim fails at n=2: 01 is an embedding.) ◻

Lemma 66.19 — Contractible fibers project away

If C is a family over A with each C(a) contractible, then pr1:x:AC(x)A is an equivalence.

Proof of Lemma 66.19 — Contractible fibers project away

Proof. A quasi-inverse is a(a,c(a)) with c(a) the center of C(a). One composite is pr1(a,c(a))a; for the other, (x,u) and (x,c(x)) are identified by theorem 62.30 via refl and the contraction of C(x). Conclude by theorem 62.27. ◻

Lemma 66.20 — Paths in subtypes

Let P be a family of propositions over A and u,v:x:AP(x). Then appr1 is an equivalence (u=v)(pr1(u)=Apr1(v)); in particular pr1 is an embedding.

Proof of Lemma 66.20 — Paths in subtypes

Proof. By theorem 62.30, (u=v)p:pr1u=Apr1vtrpP(pr2u)=P(pr1v)pr2v. Each fiber is a path type in the proposition P(pr1v), hence an inhabited proposition (lemma 66.8), hence contractible (lemma 66.7(1)); apply lemma 66.19. That the composite equivalence is appr1 is a path induction. ◻

Lemma 66.21

isContr(A) is a proposition, for every type A.

Proof of Lemma 66.21

Proof. Let (a,C),(a,C):isContr(A). By theorem 62.30 it suffices to give p:=C(a):a=Aa and a path trp(C)=C in x:Aa=Ax. Since A is contractible, each a=Ax is contractible (lemma 66.6), hence a proposition; by theorem 66.16 (level 1) the Π-type is a proposition, so any two of its elements are equal. ◻

Theorem 66.22 — Being truncated is a proposition

For every n2 and every type X, the type is-n-type(X) is a proposition. In particular isProp(X) and isSet(X) are propositions.

Proof of Theorem 66.22 — Being truncated is a proposition

Proof. Induction on n; the base case is lemma 66.21, and the inductive step is theorem 66.16 at level 1 applied twice to x:Xy:Xis-n-type(x=Xy).

For the named bottom levels, let h,g:isProp(X). Since a proposition is a set (lemma 66.8), h(x,y)=g(x,y); function extensionality in x and y gives h=g. For isSet(X), apply this pointwise equality one dimension higher to its two path-family witnesses and then use function extensionality twice. Thus isSet(X) is a proposition. The mutual implications of theorem 66.9 are therefore equivalences by lemma 66.7(2). ◻

Corollary 66.23 — Being an equivalence is a proposition

For every f:AB, the type isEquiv(f)b:BisContr(fibf(b)) of definition 62.21 is a proposition. Consequently ABf:ABisEquiv(f) has the level of its function part: two equivalences are equal as soon as their underlying functions are.

Proof of Corollary 66.23 — Being an equivalence is a proposition

Proof. Theorem 66.16 at level 1 with lemma 66.21; the final claim is lemma 66.20. ◻

Definition 66.24

For n2 put n-TypeU:=X:Uis-n-type(X), with PropU:=(1)-TypeU and SetU:=0-TypeU.

Proof of Theorem 66.25 — The type of n-types

Proof. Let (X,p),(X,p):n-TypeU. The family is-n-type consists of propositions (theorem 66.22), hence ((X,p)=(X,p))lemma66.20(X=UX)definition65.6(XX), so it suffices that XX is an n-type. For n1: XX is an n-type (theorem 66.16) and each isEquiv(f) is a proposition (corollary 66.23), hence an n-type (corollary 66.11); apply theorem 66.15. For n=2: both types are contractible, so XX is contractible and XX is an inhabited proposition (inhabited via X1X, lemma 66.7(3)), hence contractible. ◻

Lemma 195.26 — Dependent sum over a contractible base

If A is contractible with center a0 and D:AU, then x:AD(x)D(a0).

Proof of Lemma 195.26 — Dependent sum over a contractible base

Proof. Let c:x:Aa0=Ax be the contraction. Put Φ(x,d):=trc(x)1D(d),Ψ(d):=(a0,d). The type a0=Aa0 is contractible by lemma 66.6, so c(a0)=refla0. Functoriality of transport then gives Φ(Ψ(d))=d. For the other composite, the base component of a path from Ψ(Φ(x,d)) to (x,d) is c(x). Its fiber component is trc(x)D(trc(x)1D(d))=lemma62.7(i)trc(x)1c(x)D(d)=proposition62.2(ii)d. By theorem 62.30, the pair consisting of the base path c(x) and this fiber path gives Ψ(Φ(x,d))=(x,d). Theorem 62.27 turns these two homotopies into the displayed equivalence. ◻

Exercise 66.5

★★☆ Reconstruct lemma 195.26. Show explicitly why the fiber component of the second round trip must transport first along c(x)1 and then along c(x).

Exercise 66.6

★★☆ Deduce from theorem 66.15 that A×B is an n-type when A and B are, and give a direct proof for n=0 using theorem 62.30.

Exercise 66.7

★★☆ Using the characterization of paths in coproducts (theorem 62.35), show that A+B is an n-type whenever A and B are and n0. Show that the claim fails at n=1.

Exercise 66.8

★☆☆ Show directly (without theorem 66.13) that a retract of a proposition is a proposition.

Exercise 66.9

★★☆ Show that if A and B are sets, then AB is a set.

Sets, axiom K, and Hedberg’s theorem

Sets are the types for which identity proofs are unique; this section characterizes them by Streicher’s axiom K and proves Hedberg’s theorem: decidable equality forces a type to be a set.

Theorem 66.26 — UIP and K

A type X is a set if and only if it satisfies axiom K: x:Xp:x=Xxp=refl.

Proof of Theorem 66.26 — UIP and K

Proof. K is the instance q:=refl of isSet. Conversely, given K and p,q:x=Xy, path induction on q reduces the goal p=q to p=refl for p:x=Xx, which is K. In the exact groupoid-model fragment of corollary 54.36, neither principle is derivable for general X. ◻

The tempting direct proof of path uniqueness case-splits on a decision d(x,y). Its positive branch gives a path r:x=y, but not the required identifications of arbitrary p,q:x=y with r: p,q:x=y,d(x,y)inl(r)p=q. The negative branch is impossible when a path is given, but that does not repair the positive branch. The collapse lemma turns the decision into a weakly constant family by sending every input path to the same chosen r.

Lemma 66.27 — Collapse lemma

Suppose X carries a family of weakly constant endomaps of its path types: maps fx,y:(x=Xy)(x=Xy) together with κx,y:p:x=Xyq:x=Xyfx,y(p)=fx,y(q) for all x,y:X. Then X is a set.

Proof of Lemma 66.27 — Collapse lemma

Proof. First, every p:x=Xy satisfies p=fx,x(refl)1fx,y(p). Indeed, by path induction on p it suffices to check refl=fx,x(refl)1fx,x(refl), which is the inverse law of theorem 30.20. Now for p,q:x=Xy, (66.1) and ap of rfx,x(refl)1r applied to κx,y(p,q) give p=(66.1)fx,x(refl)1fx,y(p)=apappliedtoκx,y(p,q)fx,x(refl)1fx,y(q)=(66.1),backwardsq. ◻

Definition 66.28 — Decidable equality

A type X has decidable equality if x:Xy:X(x=Xy)+¬(x=Xy) is inhabited, where ¬A:=A0.

Proof of Theorem 66.29 — Hedberg

Proof. Let d decide equality. Fix x,y:X and define Ex,y:=x=Xy. By coproduct recursion, define g:(Ex,y+¬Ex,y)Ex,yEx,y,g(inl(r)):=λp.r,g(inr(w)):=λp.rec0(w(p)). Put fx,y:=g(d(x,y)). Each g(c) is weakly constant, by coproduct induction on c: in the case inl(r) both values are r, so refl suffices; in the case inr(w), for given p,q the element w(p):0 yields rec0(w(p)):g(c)(p)=g(c)(q). Hence fx,y is weakly constant for all x,y, and lemma 66.27 applies. ◻

Corollary 66.30

N and 2 are sets.

Proof of Corollary 66.30

Proof. Both have decidable equality: for 2 by a four-way case analysis using theorem 29.14; for N by double induction, using that 0suc(n) and that suc is injective — both consequences of the path-space computation for N (theorem 62.39). Its code family is 1 when both numerals are zero, 0 when exactly one is zero, and the code for (m,n) at (suc(m),suc(n)); induction decides whether the code is inhabited. Transporting that decision across theorem 62.39 decides each path type. Apply theorem 66.29. ◻

Proposition 66.31 — Separated types are sets

If ¬¬(x=Xy)(x=Xy) for all x,y:X, then X is a set.

Proof of Proposition 66.31 — Separated types are sets

Proof. Let s witness the hypothesis. Since 0 is a proposition, each ¬¬(x=Xy) is a proposition by theorem 66.16 (level 1; here funext is used). Put fx,y(p):=s(x,y,λk.k(p)). For p,q, the arguments λk.k(p) and λk.k(q) are equal in the proposition ¬¬(x=Xy), so ap of s(x,y) makes fx,y weakly constant. Apply lemma 66.27. ◻

Exercise 66.10

★★☆ Construct the decision procedure d:m:Nn:N(m=Nn)+¬(m=Nn) by double induction, deriving 0suc(n) and injectivity of suc from theorem 62.39.

Exercise 66.11

★☆☆ Write out the path induction in the proof of theorem 66.26 as an application of J (definition 30.1), displaying the motive.

Propositional truncation

A is a proposition receiving a map AA, and every map from A to a proposition factors through it.

Definition 66.33 — Propositional truncation

The theory is extended by the type former A with the rules below (premises compressed per convention 26.14; congruence and substitution rules as in definition 26.22).

ΓA type
ΓA type
Trunc-F
Γa:A
Γ|a|:A
Trunc-I
Γu:AΓv:A
Γsq(u,v):u=Av
Trunc-Sq
Γ,t:AC typeΓw:t:AisProp(C)Γ,x:Ac:C[|x|/t]Γu:A
ΓindA(w,x.c,u):C[u/t]
Trunc-E
Γa:A
ΓindA(w,x.c,|a|)c[a/x]:C[|a|/t]
Trunc-C

In Trunc-E, C is a family over A and w(t):isProp(C(t)) proves that each target fiber is a proposition. (Trunc-C carries the premises of Trunc-E.) The resulting signature is denoted HoTT0+: it contains exactly HoTT0 and these five truncation rules.

Remark 66.34 — A higher inductive type

sq(u,v):u=v is a path constructor. To eliminate into a family of propositions, it is enough to specify the point case: any two candidate images of sq(u,v) are equal because the target fiber is a proposition. Extensional truncation (definition 35.18) instead makes proof irrelevance judgmental; the present path is propositional.

Lemma 66.35

A is a proposition, and if A is a proposition, then ||:AA is an equivalence.

Proof of Lemma 66.35

Proof. λu.λv.sq(u,v):isProp(A). If A is a proposition, define r:AA by r(|a|):=a using Trunc-E with the constant family C:=A; the rule applies because A is a proposition. Conclude by lemma 66.7(2). ◻

Convention 66.36 — Untruncation

When the goal of a proof is a proposition and a hypothesis u:A is available, we permit ourselves to say “we may assume a:A”: formally, the goal is obtained by Trunc-E applied to u, the propositionhood witness of the goal, and the proof carried out under the assumption a:A. Each use cites this convention.

Theorem 66.37 — Universal property

For every proposition B, precomposition with || is an equivalence (AB)(AB).

Proof of Theorem 66.37 — Universal property

Proof. Both sides are propositions (theorem 66.16 at level 1), and maps exist in both directions: precomposition, and grecA(g) by Trunc-E with constant family B. Apply lemma 66.7(2). ◻

Example 195.38 — Truncation forgets, irreversibly

2 is contractible (|tt| inhabits it; apply lemma 66.7(1)). There is no g:22 with x:2g(|x|)=2x: from such a g, tt=secttg(|tt|)=apg(sq(|tt|,|ff|))g(|ff|)=secffff contradicting theorem 29.14. The data discarded by || cannot be recovered by any function, even though 2 is “true”.

Exercise 66.13

★★☆ Construct f:AB from f:AB, show functoriality up to identity, and show A×BA×B.

Exercise 66.14

★☆☆ Show AA and 11.

Exercise 66.15

★★☆ State and prove the dependent universal property: for a family of propositions Q over A, precomposition (t:AQ(t))(a:AQ(|a|)) is an equivalence.

Exercise 66.12

★★☆ Show that if X merely has decidable equality, i.e. x,y:X(x=Xy)+¬(x=Xy), then X is still a set. Hint: weak constancy is a proposition, so convention 66.36 applies before lemma 66.27.

The logic of mere propositions

A logical connective must return a proposition. Products and function types preserve propositionhood, but P+Q and xP(x) need not; we therefore define disjunction and existence by truncating those two types.

Definition 66.39 — Logical translation

For propositions P,Q and a family of propositions P(x) over A (A arbitrary), define:

formula translation truncated?
1 no
0 no
PQ P×Q no
PQ PQ no
PQ (PQ)×(QP) no
¬P P0 no
x:A.P(x) x:AP(x) no
x:A.P(x) x:AP(x) yes
PQ P+Q yes

Each right-hand side is a proposition: the untruncated rows by theorem 66.16, theorem 66.15 at level 1 and example 195.12, the last two by lemma 66.35.

Remark 66.40 — Σ versus

The untruncated Σ and the truncated answer different questions and must be kept apart:

x:AP(x) x:A.P(x)
kind structure property
witness extracted by pr1 available only via convention 66.36
eliminates into arbitrary types propositions only
“choice” a theorem (example 195.41) an axiom (definition 66.46)
proof relevance inhabitants may differ any two inhabitants equal

Case analysis on or is available exactly when the goal is a proposition (convention 66.36); this is the formal content of the informal phrase “there exists, but no particular witness is given”.

Example 195.41 — Untruncated ``choice'' is a theorem

For families A over X and P over x:XA(x), put G:=x:XA(x), and for an input F put gF:=λx.pr1(Fx) and pF:=λx.pr2(Fx). The term λF.(gF,pF):(x:Xa:A(x)P(x,a))g:Gx:XP(x,gx) re-associates data; nothing is chosen (cf. the discussion in chapter 35). The axiom of choice proper concerns the truncated existential.

Definition 66.42 — Excluded middle

Relative to a universe U: LEM:=A:U(isProp(A)A+¬A),LEM:=A:UA+¬A.

Theorem 66.43 — Univalence refutes untruncated excluded middle

Already in HoTT0, ¬LEM.

Proof of Theorem 66.43 — Univalence refutes untruncated excluded middle

Proof. Suppose f:A:UA+¬A. Let e:22 be the swap equivalence, e(tt):=ff, e(ff):=tt (its own quasi-inverse by 2-induction, hence an equivalence by theorem 62.27), and p:=ua(e):2=U2. Dependent application gives apdf(p):trpAA+¬A(f(2))=f(2). We refute both cases of c:=f(2):2+¬2 by coproduct induction, with motive c(trp(c)=c)0. Case inr(w): already w(tt):0. Case inl(x): by lemma 66.5(3) and the computation of transport along ua (theorem 65.9), trp(inl(x))=inl(trpAA(x))=inl(e(x)), so the hypothesis yields inl(e(x))=inl(x), whence e(x)=x by the path characterization of coproducts (theorem 62.37). But e has no fixed point: 2-induction on x reduces this to fftt and ttff (theorem 29.14). ◻

Remark 66.32

The global law LEM would decide every path type and hence, by theorem 66.29, make every type a set. Univalence refutes that law by theorem 66.43. The proposition-restricted law LEM gives only merely decidable equality for an arbitrary type and therefore does not provide the weakly constant endomap required by lemma 66.27.

Exercise 66.16

★★☆ Show ¬A:U(AA). Apply a hypothetical function at 2 and transport it along the universe loop ua(eswap), where eswap exchanges tt and ff, using the naturality calculation in theorem 66.43 to obtain a fixed point of Boolean swap.

Corollary 66.44 — No global double negation

¬A:U(¬¬AA).

Proof of Corollary 66.44 — No global double negation

Proof. Given h of the displayed type, λA.h(A+¬A)(kA) inhabits LEM, where kA:=λn.n(inr(λa.n(inl(a)))):¬¬(A+¬A); contradict theorem 66.43. ◻

Remark 66.45 — Consistency status

The simplicial-set model validates univalence together with the proposition-restricted LEM of definition 66.42, while other models refute that axiom. Thus it is consistent relative to the model assumptions and is not derivable from the preceding rules [Uni13][AG26].

Definition 66.46 — Axiom of choice

Let X be a set, A a family over X with each A(x) a set, and P a family of propositions over pairs x:X, a:A(x). The axiom of choice AC asserts, for all such data: (x:Xa:A(x)P(x,a))g:x:XA(x)x:XP(x,gx).

Lemma 66.47 — Equivalent family form

AC is equivalent to: for every set X and family Y of sets over X, (x:XY(x))x:XY(x).

Proof of Lemma 66.47 — Equivalent family form

Proof. Both statements are propositions, so logical equivalence suffices (lemma 66.7(2)). The family form is the instance P:=λx.λa.1 of AC up to the equivalence a:A(x)1A(x). Conversely put Y(x):=a:A(x)P(x,a). This is a set by theorem 66.15, so the family form gives x:XY(x). Propositional-truncation elimination into the desired truncated conclusion applies; a section s:x:XY(x) is sent to |(λx.pr1(s(x)),λx.pr2(s(x)))|. These maps prove both implications and hence the equivalence. ◻

Remark 66.48

The simplicial-set model validates univalence together with AC, while other models refute choice; hence AC is relatively consistent and is not derivable [Uni13]. The hypothesis that X be a set is essential by theorem 66.50.

Let X:=A:U2=A, the connected type of two-element types. Its loop corresponding to Boolean swap witnesses the failure of higher choice and the non-propositionality of quasi-inverses.

Lemma 66.49 — The type of two-element types

Let X:=A:U2=UA (a type in the next universe, definition 29.1) and x0:=(2,|refl|). Then:

  1. X is connected: x:Xx0=Xx;

  2. (x0=Xx0)(22), and this equivalence sends refl to id2;

  3. each x=Xy is a set (so X is a 1-type);

  4. X is not a set.

Proof of Lemma 66.49 — The type of two-element types

Proof. (1) Given (A,u):X, the goal is a proposition, so by convention 66.36 assume p:2=UA; then lemma 66.20 (the second components live in propositions, lemma 66.35) turns p into x0=X(A,u), and || concludes.

(2) By lemma 66.20 and univalence (definition 65.6), (x0=Xx0)(2=U2)(22); the composite is ridtoeqv(appr1(r)) and sends refl to id2 by the computation rule of idtoeqv.

(3) For (A,u),(B,v):X the path type is equivalent to AB as in (2). Being a set is a proposition (theorem 66.22), so by convention 66.36 we may assume 2=A and 2=B; then A and B are sets (corollary 66.30, corollary 66.14), AB is a set (theorem 66.16), and AB is a set by theorem 66.15, since isEquiv is proposition-valued (corollary 66.23). Conclude by corollary 66.14.

(4) Let q:x0=Xx0 correspond under (2) to the swap equivalence e. If q=refl, then applying the function underlying (2) gives e=id2 as equivalences, hence e(tt)=tt by lemma 66.20 and happly; but e(tt)ff, contradicting theorem 29.14. So x0=Xx0 has two distinct elements and is not a proposition; a set has only propositions as path types. ◻

Theorem 66.50 — No choice for arbitrary types

Arbitrary indexing types do not satisfy the preceding family-choice lemma. Take X,x0 from lemma 66.49 and put Y(x):=x0=Xx,W:=x:XY(x),S:=x:XY(x). The family Y is set-valued, but ¬(WS).

Proof of Theorem 66.50 — No choice for arbitrary types

Proof. Each Y(x) is a set by lemma 66.49(3), and x:XY(x) holds by (1). Suppose the implication held; its conclusion gives x:Xx0=Xx. The goal 0 is a proposition, so assume C:x:Xx0=Xx (convention 66.36); then (x0,C) contracts X, so X is a proposition (lemma 66.7(1), theorem 66.10), hence a set — contradicting lemma 66.49(4). ◻

Corollary 66.51 — Unique choice

Let P be a family of propositions over A. Then (x:AP(x))x:AP(x), with no truncation in the conclusion and no hypothesis on A.

Proof of Corollary 66.51 — Unique choice

Proof. For each x, the map P(x)P(x) exists because P(x) is a proposition (lemma 66.35). ◻

Exercise 66.18

★☆☆ Show that LEM is equivalent to the proposition-restricted law of double negation A:U(isProp(A)¬¬AA).

Exercise 66.19

★☆☆ Show that A+¬A is a proposition whenever A is, and conclude that LEM itself is a proposition.

Exercise 66.20

★☆☆ Show that if P,Q are propositions with ¬(P×Q), then PQP+Q.

n-truncations

Truncation generalizes to every level: An is the universal n-type receiving a map from A.

Definition 66.52 — n-truncation

For each level n1 (a rule schema per remark 66.3), the theory is extended by:

ΓA type
ΓAn type
Trunc_n-F
Γa:A
Γ|a|n:An
Trunc_n-I
ΓA type
ΓhA:is-n-type(An)
Trunc_n-T
Γ,t:AnC typeΓw:t:Anis-n-type(C)Γ,x:Ac:C[|x|n/t]Γu:An
ΓindAn(w,x.c,u):C[u/t]
Trunc_n-E
Γa:A
ΓindAn(w,x.c,|a|n)c[a/x]:C[|a|n/t]
Trunc_n-C

For n=2 one puts A2:=1. We write π0(A):=A0, the set of connected components. The resulting signature is HoTT0+{n}n1; no additional HIT schema is implicit in that name.

Remark 66.53

At n=1 the schema is inter-derivable with definition 66.33: sq yields the witness of is-(1)-type by theorem 66.9, and conversely. As with , no computation rule for the truncatedness witness hA is imposed. A full higher-inductive construction uses hub-and-spoke constructors attached along Sn+1 [Uni13]. Theorem 7.3.12 of that source is instead the path-space equivalence used below.

Theorem 66.54 — Universal property

For n1 and every n-type B, precomposition with ||n is an equivalence (AnB)(AB).

Proof of Theorem 66.54 — Universal property

Proof. The candidate inverse sends g:AB to recAn(g), obtained from Truncn-E with constant family B and w:=λt.hB. One composite is g up to funext, judgmentally on points by Truncn-C. For the other, given h:AnB, the family trecAn(h||n)(t)=Bh(t) consists of n-types (corollary 66.11), so Truncn-E applies, and on points both sides compute to h(|x|n); conclude by funext (theorem 65.18). These two homotopies make the displayed precomposition map a quasi-inverse equivalence by theorem 62.27. ◻

Lemma 66.55

If n1 and A is an n-type, then ||n:AAn is an equivalence.

Proof of Lemma 66.55

Proof. Theorem 66.54 with B:=A yields r:AnA with r||nid; the composite ||nr is homotopic to the identity by Truncn-E into the path family t|r(t)|n=t, whose fibers are n-types (corollary 66.11), with refl on points. Thus r is a quasi-inverse of ||n; apply theorem 62.27. ◻

Theorem 66.56 — Path spaces of truncations

For n1 and x,y:A, x=Ayn(|x|n+1=An+1|y|n+1).

Proof of Theorem 66.56 — Path spaces of truncations

Proof. The inverse cannot be defined while both endpoints are fixed at constructor images. Generalize them. Put Typen:=X:Uis-n-type(X). By theorem 66.25, Typen is an (n+1)-type. Double (n+1)-truncation elimination therefore defines P^:An+1An+1Typen, with constructor equation P^(|x|n+1,|y|n+1):=(x=yn,hx=y), where hx=y is the truncation witness. Write P(u,v):=pr1(P^(u,v)); each P(u,v) is an n-type by the second component.

Double elimination on u,v, followed at constructor endpoints by n-truncation elimination, defines decodeu,v:P(u,v)(u=v),decode|x|n+1,|y|n+1(|p|n):=ap||n+1(p). The eliminations are permitted because u=v is an n-type. A second elimination defines the reflexive code r:u:An+1P(u,u),r(|x|n+1):=|reflx|n. Transporting this code defines the other map: encodeu,v(q):=trqzP(u,z)(r(u)):P(u,v).

For q:u=v, identity induction reduces decode(encode(q))=q to decode(r(u))=reflu. This is an identity type between paths in the (n+1)-type An+1, hence an (n1)-type. Truncation elimination on u is therefore allowed, and at u|x|n+1 both sides compute to ap||n+1(reflx)refl.

For c:P(u,v), the other goal encode(decode(c))=c is an identity type in the n-type P(u,v), hence an (n1)-type. Eliminate u and v, then eliminate c:x=yn to c|p|n. Identity induction on p reduces trap||n+1(p)zP(|x|n+1,z)(|reflx|n)=|p|n to reflexivity. Thus encode and decode are quasi-inverses; theorem 62.27 gives the displayed equivalence. This is the local encode–decode proof of HoTT Book Theorem 7.3.12 [Uni13]. ◻

Example 195.58 — Connected components

π0(A) is a set, and by theorem 66.56 its equalities are the truncated path types: (|x|0=π0(A)|y|0)x=Ay. A type is connected if π0(A) is contractible; lemma 66.49(1) says exactly that the type of two-element types is connected (cf. exercise 66.23).

Exercise 66.21

★★☆ For 1mn construct an equivalence AnmAm.

Exercise 66.22

★★☆ Show that n is functorial and preserves finite products: A×BnAn×Bn.

Exercise 66.23

★☆☆ Show that A is connected if and only if A×x,y:Ax=Ay holds.

Quasi-inverses are not propositions

Contractible fibers make isEquiv(f) a proposition. By contrast, qinv(f) contains a chosen inverse and two chosen homotopies; for suitable f, those choices carry nontrivial loop data.

Recall from definition 62.23 that, for f:AB, qinv(f):=g:BA(gfidA)×(fgidB). Theorem 62.27, Proposition 62.24 provide maps qinv(f)isEquiv(f) and isEquiv(f)qinv(f); and isEquiv(f) is a proposition (corollary 66.23). Were qinv(f) also a proposition, the two notions would be equivalent for every f (lemma 66.7(2)); theorem 66.62 rules this out.

Lemma 66.59

If qinv(f) is inhabited for f:AB, then qinv(f)x:Ax=Ax.

Proof of Lemma 66.59

Proof. Step 1: reduction to the identity. Since qinv(f) is inhabited, f underlies an equivalence e:AB. The based type of equivalences B:UAB is contractible: by univalence (definition 65.6) the fiberwise map idtoeqv:(A=UB)(AB) is a fiberwise equivalence, so lemma 62.31 makes the total space equivalent to B:UA=UB, which is contractible by lemma 66.5(4). Hence (A,idA)=(B,e) in this type. Define the family P(B,e):=qinv(pr1(e))x:Ax=Ax. Transporting P(A,idA) along the displayed path reduces the claim to f:=idA.

Step 2: computation at the identity. Using funext (theorem 65.18) in both homotopy components, qinv(idA)g:AA(g=id)×(g=id)u:g:AAg=idpr1(u)=id by re-association of Σ (a definitional isomorphism, chapter 27). The inner base is contractible with center (id,refl) (lemma 66.5(4)), so by lemma 195.26 the whole is equivalent to id=id, and by funext again to x:Ax=Ax. ◻

Lemma 66.60 — Extending a central loop

Let A be a type with a:A and q:a=Aa such that

  1. a=Aa is a set;

  2. x:Aa=Ax;

  3. q is central: p:a=Aapq=qp.

Then there is f:x:Ax=Ax with f(a)=q.

Proof of Lemma 66.60 — Extending a central loop

Proof. First, every x=Ay is a set: being a set is a proposition (theorem 66.22), so by (2) and convention 66.36 we may assume p:a=Ax and p:a=Ay; then rprp1 is an equivalence (x=Ay)(a=Aa). Its quasi-inverse sends s to p1sp, and one composite is p1(prp1)p=associativity and inverse lawsr; the reverse composite is the same calculation with p,p reversed. Hence (1) concludes by corollary 66.14.

The direct construction cannot eliminate the witness supplied by (2): the tempting clause f(x)=?p1qp(p:a=Ax) is ill typed because p is truncated, while the proposed codomain x=Ax is only known to be a set, not a proposition. The repair is to retain, together with a candidate loop, the assertion that every untruncated witness gives that same loop. This strengthened target is a proposition and therefore admits truncation elimination.

For x:A define B(x):=r:x=Axs:a=Axr=s1qs. Each fiber over r is a proposition (Π over path types of the set x=Ax; theorem 66.16), so B(x) is a subtype of x=Ax and lemma 66.20 applies to its elements. B(x) is a proposition: this claim is itself a proposition (theorem 66.22), so assume p:a=Ax; given (r,h),(r,h):B(x), we have h(p)h(p)1:r=r, and lemma 66.20 lifts it to (r,h)=(r,h). B(x) is inhabited for every x: again a proposition (just shown), so assume p:a=Ax and put r:=p1qp; for s:a=Ax, whiskering by p1 and s and the groupoid laws reduce the required p1qp=s1qs to q(ps1)=(ps1)q, an instance of centrality (3) at the loop ps1.

Finally set f(x):=pr1(b(x)), where b:x:AB(x) is the section just constructed. At x:=a the second component gives f(a)=refl1qrefl=q by the unit laws. ◻

Lemma 66.61 — Automorphisms of

Every e:22 is equal to id2 or to the swap equivalence, and consequently any two elements of 22 commute under composition.

Proof of Lemma 66.61 — Automorphisms of

Proof. By corollary 66.23 it suffices to identify the underlying map with id or swap. Case on e(tt) and e(ff) (2-induction): the two “constant” cases are impossible, since an equivalence is injective and ttff (theorem 29.14); in the remaining cases funext identifies e’s map with id or swap pointwise. Commutation: for e,e{id,swap}, if either is id the composites agree judgmentally, and if both are swap the two composites send tt to tt and ff to ff; Boolean induction and funext identify each with id2. ◻

Theorem 66.62 — Quasi-inversion is not a proposition

There exist types A,B and f:AB such that qinv(f) is not a proposition.

Proof of Theorem 66.62 — Quasi-inversion is not a proposition

Proof. Take A:=B:=X, the type of two-element types of lemma 66.49, and f:=idX. The triple (idX,(λx.reflx,λx.reflx)) inhabits qinv(idX). By lemma 66.59 it suffices to show that x:Xx=Xx is not a proposition (corollary 66.14).

Apply lemma 66.60 with a:=x0 and q the loop corresponding to swap. Hypothesis (1) is lemma 66.49(3); (2) is lemma 66.49(1). For centrality (3): the equivalence h:(x0=Xx0)(22) of lemma 66.49(2) sends concatenation to composition — appr1 preserves (lemma 66.5(2)) and idtoeqv(rs)=idtoeqv(s)idtoeqv(r) by path induction — so for p:x0=Xx0, h(pq)=h(q)h(p)=h(p)h(q)=h(qp) by lemma 66.61, and injectivity of the equivalence h gives pq=qp.

We obtain f1:x:Xx=Xx with f1(x0)=q. If x:Xx=Xx were a proposition, then f1=λx.refl, and happly at x0 would give q=refl, contradicting lemma 66.49(4). ◻

Remark 66.63 — The resolution

qinv(f) contains chosen loop data and therefore need not be a proposition. In contrast, isEquiv(f):=b:BisContr(fibf(b)) is a proposition by corollary 66.23. This is why equivalences are defined by contractible fibers.

Exercise 66.24

★☆☆ Complete the case analysis in lemma 66.61, including the injectivity argument for equivalences.

Exercise 66.25

★★☆ Define bi-invertibility biinv(f):=(g:BAgfid)×(h:BAfhid). Show biinv(f)qinv(f) and qinv(f)biinv(f), and prove that biinv(f) is a proposition. Hint: when inhabited, each factor is contractible.

Exercise 66.26

★☆☆ Show qinv(f)isEquiv(f).

Suggested first pass.

None of these problems is a prerequisite for a later chapter. Begin with exercise 195.27, then complete exercise 195.28.

Exercise 195.27

★★☆ For a map f:AP with P a proposition, reconstruct its unique factor through A. Repeat for a set-valued map out of the set truncation and identify exactly which path constructor establishes well-definedness.

Exercise 195.28

★★★ Practical project.finite-truncation-auditor Implement in Agda or Kappa finite witnesses for contractible types, propositions, and sets. Preserve the invariant that every reported level includes explicit equality witnesses for the preceding level. Classify empty, singleton, Boolean, and a three-element set; reject Boolean as a proposition. Mutation test: deleting the distinct-Boolean check must fail the expected classification suite.

Bibliographic notes

The stratification of types by truncation level is due to Voevodsky, who introduced “h-levels” (numbered from 0 at contractibility; our indexing from 2, following [Uni13], aligns level n with homotopy n-types). The material of §§ 66.166.2 follows Chapters 3 and 7 of [Uni13] and Part II of [Rij25]; both sources also develop the closure properties assigned here as exercises. That propositions in the sense of definition 66.4 recover the propositions-as-types reading of Martin-Löf [ML84, ML96] at the level where proofs are unique is the perspective of [AG26], §2.7, whose treatment of squash types in extensional type theory is our definition 35.18; remark 66.34 contrasts the two. Hedberg’s theorem (theorem 66.29) appeared in his 1998 paper on coherence for Martin-Löf type theory; the collapse-lemma proof given here follows the account in [Uni13], §7.2, where the generalizations of axiom K to higher levels may also be found. Kraus, Escardó, Coquand and Altenkirch analyzed weakly constant maps and the strength of lemma 66.27 in detail. The refutation of untruncated excluded middle (theorem 66.43) is due to Coquand (cf. [Uni13], Theorem 3.2.2, of which our proof is the coproduct-transport variant); the failure of choice for non-set bases (theorem 66.50) is [Uni13], Lemma 3.8.5. The consistency of LEM and AC with univalence rests on the simplicial-set model of Kapulkin and Lumsdaine after Voevodsky; see the notes to Chapter 3 of [Uni13]. Propositional truncation descends from the squash types of NuPRL and the bracket types of Awodey and Bauer; its formulation as a higher inductive type, and the n-truncations of § 66.6, follow [Uni13], §§3.7 and 7.3, and [Rij25]. The theorem that quasi-inversion is not a proposition (theorem 66.62) is Theorem 4.1.3 of [Uni13]; the type of two-element types used in its proof is the Eilenberg–Mac Lane space K(Z/2,1), and any K(G,1) for nontrivial abelian G would serve. The well-behaved proposition-valued notions of equivalence (half-adjoint, bi-invertible, contractible fibers) are compared at length in [Uni13], Chapter 4, and [Rij25].

Search the book

Type to search the local edition.