Lectures onType Theory
ch:univalence: ch:univalence
appendix sectionsolutions

ch:univalence: ch:univalence

exercise 65.1.

Use identity induction with motive BA=BAB and reflexive branch the identity map together with its contractible-fiber witness. Call the result j. To compare j(p) with idtoeqv(p), path-induct on p. Both underlying functions then compute to idA, and the type isEquiv(idA) is a proposition, so the witnesses agree. The Σ-path theorem gives j(p)=idtoeqv(p).

exercise 65.2.

For c:C, let Ec=Σ(b,q):fibg(c)fibf(b). It is contractible: the base fibg(c) is contractible and each fiber fibf(b) is contractible. Map Ec to fibgf(c) by ((b,q),(a,p))(a,apg(p)q). Choosing the intermediate point fa defines a section, and path induction gives a retraction. A retract of a contractible type is contractible, so every fiber of gf is contractible.

exercise 65.4.

Equivalence induction defines ua(X,e):A=X with ua(A,id)=reflA. The equality idtoeqv(ua(e))=e follows by the same induction; the other composite ua(idtoeqv(p))=p follows by identity induction on p. Hence for fixed A, the total types ΣX(AX) and ΣX(A=X) are retracts of one another. The latter is a singleton and therefore contractible, so the former is contractible. The total-space criterion for the fibers of idtoeqv now proves univalence.

exercise 65.3.

For p=reflA, the section law of the univalence inverse gives ηreflA:ua(idtoeqv(reflA))=reflA. The underlying map of idtoeqv(reflA) computes to idA, and its equivalence witness equals the chosen identity witness because isEquiv(idA) is a proposition. Congruence of ua along that equality, followed by ηreflA1, yields reflA=ua(idA).

exercise 65.5.

The assumed computation path identifies the underlying function of idtoeqv(u(e)) with that of e. Since isEquiv(f) is a proposition, it upgrades uniquely to an equality idtoeqv(u(e))=e. Thus u is a right inverse of idtoeqv. The induced map on total spaces retracts ΣX(AX) onto the singleton ΣX(A=X) exactly as in the retract proof of univalence; its fibers are consequently contractible. Therefore idtoeqv is an equivalence.

exercise 65.6.

Function extensionality states that happly:(f=g)(fg) is an equivalence; define funext by its inverse. The two displayed laws are the inverse and section homotopies of that equivalence. For the final law, happly(reflf) computes to λx.reflfx, so applying the second inverse law at reflf gives funext(λx.reflfx)=reflf.

exercise 65.7.

For b:B, let (gb,ϵb) be the center of the contractible fiber fibe(b). Then ϵ:e(gb)=b is the right-inverse homotopy. At e(a), both (g(ea),ϵea) and (a,refl) lie in the same contractible fiber; projecting their unique path gives g(ea)=a, the left-inverse homotopy. These homotopies make g an equivalence, so e1=(g,isEquiv(g)) has the required two laws.

exercise 65.8.

Functoriality gives ua(e)ua(e1)=ua(e1e)=ua(id)=refl. Thus ua(e1) is a right inverse of ua(e). Inverses of a path are unique, so ua(e1)=ua(e)1. Equivalently, applying idtoeqv identifies both sides with e1; univalence makes idtoeqv injective.

exercise 65.9.

Double Boolean induction on b,b reduces the code to 1 in the equal cases and 0 in the mixed cases. In an equal case, u:1 equals , so encode after decode is reflexivity; a mixed case has no u. Together with the previously proved decode-after-encode identity, these homotopies exhibit encode and decode as inverse equivalences (b=b)code(b,b).

exercise 65.10.

Assume q:ua(enot)=refl2. Apply congruence to the function ptrpXX(tt). The left side is enot(tt)=ff by the univalence transport law; the right side is tt. Boolean encode–decode sends the resulting path ff=tt to an element of 0.

exercise 65.11.

Evaluate an automorphism at tt. If the value is tt, injectivity forces the other value to be ff, and function extensionality identifies the map with identity. If it is ff, the other value must be tt, and the map is Boolean negation. These cases define an inverse to ee(tt), proving (22)2. Compose this equivalence with univalence (2=2)(22).

exercise 65.12.

When A and B are propositions, each function type AB and BA is a proposition by function extensionality; hence their product AB is a proposition. For any pair of implications, the round trips are pointwise equal to the identities because the codomains are propositions. Thus it determines an equivalence. Forgetting the equivalence witness and adding these forced homotopies are inverse maps; isEquiv is a proposition, so the inverse law on equivalences is automatic.

exercise 65.13.

Let (A,hA),(B,hB):Uiprop and suppose maps both ways. Propositional univalence gives p:A=B. By the Σ-path theorem it remains to compare the transported witness hA with hB. The type isProp(B) is itself a proposition, so those two witnesses are equal. The pair (p,) is therefore a path in the subuniverse, not merely a path between its first projections.

exercise 65.14.

By definition ω=trua(enot)XX(tt). The section supplied by construction 65.8 identifies idtoeqv(ua(enot)) with enot. Theorem 65.9(i) projects that equality to ω=enot(tt). Boolean computation reduces the latter to ff, and concatenating the two paths gives the required closed term.

exercise 65.15.

Functoriality sends an n-fold concatenation of ua(enot) to ua(enotn). Transport along it is therefore the underlying function enotn. Induction on n alternates the two Boolean constructors: the zero iterate is identity and each successor applies negation. Hence the value at tt is tt for even n and ff for odd n.

exercise 193.16.

Let s:22 exchange the constructors and put p:=ua(s):2=2. The univalence transport law gives trpXX(tt)=ff and trpXX(ff)=tt. If UIP held in the universe, then p=refl2. Applying transport to this equality would identify the swap action with identity transport, hence ff=tt, contradicting Boolean separation.

Search the book

Type to search the local edition.