Lectures onType Theory
ch:tarski-universes: ch:tarski-universes
appendix sectionsolutions

ch:tarski-universes: ch:tarski-universes

Exercise 29.5.

The nullary rules first give N:U0,1:U0. Rule TU-Sum therefore gives c:=+(N,1):U0. Weakening c to the context x:El(N), followed by TU-Pi, constructs d:=Π(N,x.c):U0. Decode from the outside inward. Rule TU-Pi-El gives El(d)x:El(N)El(c)type. Next TU-Sum-El and the two base decoding equations give El(c)El(N)+El(1)N+1. Also El(N)N by TU-Nat-El. Dependent-product congruence, with context conversion for the codomain after changing the domain, now produces El(d)N(N+1) type. The codomain is constant in x, so the context conversion has no effect on its raw expression.

More generally, suppose in x:El(N) that x:El(N)cc:U0. The TU-Cong scheme gives Π(N,x.c)Π(N,x.c):U0. Thus judgmentally equal codomain codes produce judgmentally equal product codes, as required.

Exercise 29.6.

For a representative TU-Sig instance, Γa:UiΓ,x:El(a)b:UiΓΣ(a,x.b):Ui, erasure gives |Γ||a|:Ui|Γ|,x:|a||b|:Ui|Γ|x:|a||b|:Ui, which is exactly U-Sig. A TU-W-El conclusion erases as |El(W(a,x.b))|=Wx:|a||b||Wx:El(a)El(b)|=Wx:|a||b|, so it becomes type reflexivity. Likewise TU-Sum-El erases to |a|+|b||a|+|b| type.

Here is the binder calculation needed in the dependent cases. Choose the bound name y fresh for the substituting term c and distinct from x. Then |Σ(a,y.b)[c/x]|=|Σ(a[c/x],y.b[c/x])|=y:|a[c/x]||b[c/x]|=y:|a|[|c|/x]|b|[|c|/x]=(y:|a||b|)[|c|/x]=|Σ(a,y.b)|[|c|/x]. The third line is the induction hypothesis on the two immediate subexpressions. For W, instantiate each of the five lines with W and W: in place of Σ and : (five lines). This directly verifies |e[c/x]|=|e|[|c|/x] for the two displayed dependent constructors.

Exercise 29.7.

Write L:=El(Π(a,x.b)),R:=x:El(a)El(b), and let the chosen definitional isomorphism consist of F:LR,G:RL,G(F(u))u,F(G(v))v. For p:L and s:El(a), define weak application by appϕ(p,s):=F(p)(s):El(b[s/x]). For a term t:El(b) in context x:El(a), define weak abstraction by lamϕ(x.t):=G(λx.t):L. The beta calculation uses exactly one round-trip law and ordinary product beta: appϕ(lamϕ(x.t),s)=F(G(λx.t))(s)(λx.t)(s)t[s/x]. The first judgmental step is FGidR; the second is Π-beta. For p:L, the other calculation is explicit: lamϕ(x.appϕ(p,x))=G(λx.F(p)x)ΠηG(F(p))inverse lawp.

This local argument proves only the beta behavior of this one chosen isomorphism. It says nothing about compatibility of separately chosen isomorphisms with substitution, congruence, nested Π-, Σ-, or W-codes, composition of decodings, or two different paths through a chain of weak decoding laws. Those are commuting-diagram conditions on a whole family of choices. They require a separate coherence theorem and do not follow from the two round-trip equations for one ϕ.

Exercise 75.4.

Erasure sends the open code variable a:U0 to the same Russell term. If decoration follows the resulting U-El derivation, it returns the Tarski type El(a), and code mode returns a by the variable rule. Thus the fixed syntax-directed round trip is reflexive. If a second Russell derivation forms the same erased type directly, its decoration need not end in TU-El. Equating that output with El(a) is exactly the missing mixed coherence equation. It must be stable under every substitution into the context. At the semantic signature cited in the chapter, this stability is supplied by natural inverse operations Code and El, together with the Russell identification El(t)=t. None of those equations is supplied by structural recursion on the raw terms of definition 75.1.

Exercise 75.5.

Each Ci=Vκi×{0,1} is a set. If j<i, then rank(Cj)<κi, so (Cj,0)Ci; decoding this pair returns Cj, which proves TU-Hier and TU-Hier-El.

For the dependent-product case, write a=(A,ϵ) and suppose the body assigns bx=(Bx,ϵx)Ci to every xA. Strong inaccessibility gives P:=xABxVκi. Interpret the product constructor by (P,0)Ci. Its decoding is Eli(P,0)=P, exactly the dependent product of the decoded domain and fibres. This proves TU-Pi and TU-Pi-El; the other constructors use the corresponding closure operation.

Let 1 be the singleton interpretation of 1. The codes (1,0) and (1,1) are distinct elements of Ci, but Eli(1,0)=1=Eli(1,1). Thus decoding is not injective in this model. The comparison theorem uses only formation, congruence, substitution, and the named decoding equalities; it never reflects equality of decoded types back to equality of codes. Consequently the collision does not refute theorem 75.6.

Search the book

Type to search the local edition.