exercise 29.3.
The exercise states the claim for universe-element derivations in an arbitrary well-formed context; this supplies the induction hypothesis beneath binders. For a base universe element 𝟎,𝟏,𝟐,ℕ, replay the same rule at level 𝑖 +1 and take 𝐴′ =𝐴. The U-Hier case is the same, since 𝑗 <𝑖 implies 𝑗 <𝑖 +1.
For illustration, suppose the last rule is U-Pi. Applying the induction hypotheses to its premises, with context conversion where needed, gives Γ⊢𝐴′:U𝑖+1,Γ⊢𝐴′≡𝐴 𝗍𝗒𝗉𝖾,Γ,𝑥:𝐴′⊢𝐵′:U𝑖+1,Γ,𝑥:𝐴′⊢𝐵′≡𝐵 𝗍𝗒𝗉𝖾. In the last judgment, 𝐵 denotes the original body transported from Γ,𝑥 :𝐴 to Γ,𝑥 :𝐴′ along the symmetric domain equality. Rule U-Pi at level 𝑖 +1 constructs ∏𝑥:𝐴′𝐵′ :U𝑖+1, and dependent-product congruence gives Γ⊢∏𝑥:𝐴′𝐵′≡∏𝑥:𝐴𝐵 𝗍𝗒𝗉𝖾. For Σ and 𝖶, instantiate the same argument with U-Sig/Lift-Sig and U-W/Lift-W, respectively; the dependent context conversion is unchanged (four lines each). For a coproduct, use the two component induction hypotheses followed by U-Sum and Lift-Sum (two lines). These are all constructors allowed by the exercise, so the induction is complete.
exercise 29.9.
Define externally 𝖫𝗂𝖿𝗍𝑖→𝑖𝐴:=𝐴,𝖫𝗂𝖿𝗍𝑖→(𝑗+1)𝐴:=𝖫𝗂𝖿𝗍𝑗(𝖫𝗂𝖿𝗍𝑖→𝑗𝐴). Induction on 𝑗 −𝑖 first gives 𝖫𝗂𝖿𝗍𝑖→𝑗𝐴 :U𝑗. Using Lift-El at each successor step and transitivity then gives 𝖫𝗂𝖿𝗍𝑖→𝑗𝐴 ≡𝐴 as types. The same induction proves the universe equality for products. Whenever 𝖫𝗂𝖿𝗍𝑖→𝑗𝐵 occurs in the lifted binder context, it denotes the universe element first formed in Γ,𝑥 :𝐴 and then transported to Γ,𝑥 :𝖫𝗂𝖿𝗍𝑖→𝑗𝐴 along the accumulated type equality. With that convention, the successor step is 𝖫𝗂𝖿𝗍𝑖→(𝑗+1)(∏𝑥:𝐴𝐵)≡𝖫𝗂𝖿𝗍𝑗(∏𝑥:𝖫𝗂𝖿𝗍𝑖→𝑗𝐴𝖫𝗂𝖿𝗍𝑖→𝑗𝐵)≡∏𝑥:𝖫𝗂𝖿𝗍𝑖→(𝑗+1)𝐴𝖫𝗂𝖿𝗍𝑖→(𝑗+1)𝐵, where the first line uses the induction hypothesis under Lift-Cong and the second uses Lift-Pi. Both sides of this successor step inhabit U𝑗+1. Renaming the successor target 𝑗 +1 to the exercise’s target level proves the displayed judgment; the base target 𝑖 is reflexivity.
exercise 74.16.
For ∑𝑥:∏𝑎:𝐴𝑖𝐵𝑗(𝑎)∏𝑐:𝐶𝑘(𝑥)𝐷𝑙(𝑥,𝑐) the cumulative rule U-Cumul raises every smaller premise to the chosen classifier. The two products therefore live at max(𝑖,𝑗) and max(𝑘,𝑙), and the outer sum at 𝑚 =max(𝑖,𝑗,𝑘,𝑙). Thus the least solution is obtained by assigning each fresh result variable the indicated maximum; a strict lift from level 𝑟 adds the constraint 𝑟 +1 ≤𝑠. Adding U𝑖 :U𝑖 adds the strict formation edge 𝑖 +1 ≤𝑖. Summing edge weights around this one-edge cycle gives 1 ≤0, so no level assignment exists.
Exercise 29.1.
The final rule is U-Pi at level 1. Its domain and codomain are both the lower universe viewed as an element of U1: 𝑋⋅ 𝖼𝗍𝗑Ctx−Emp0<1⋅⊢U0:U1U−Hier0<1𝑋:U0 𝖼𝗍𝗑0<1𝑋:U0⊢U0:U1U−Hier0<1⋅⊢∏𝑋:U0U0:U1U−Pi1. For completeness, the context in the second premise is formed by ⋅ 𝖼𝗍𝗑⋅ 𝖼𝗍𝗑⋅⊢U0 𝗍𝗒𝗉𝖾U−Form0𝑋:U0 𝖼𝗍𝗑Ctx−Ext. Equivalently, U-El applied to the first U-Hier premise also recovers ⋅ ⊢U0 𝗍𝗒𝗉𝖾. Thus the universe-specific rules are U-Form at level 0, U-Hier from level 0 to level 1 twice, and U-Pi at level 1.
Exercise 29.2.
Take comp:=𝜆𝑋.𝜆𝑌.𝜆𝑍.𝜆𝑔.𝜆𝑓.𝜆𝑥.𝑔(𝑓(𝑥)). After introducing 𝑋,𝑌,𝑍 :U0, rule U-El turns each of those universe elements into a type. In the further context 𝑔:𝑌→𝑍,𝑓:𝑋→𝑌,𝑥:𝑋, two uses of Π-elim give 𝑓(𝑥) :𝑌 and then 𝑔(𝑓(𝑥)) :𝑍. Three inner uses of Π-intro abstract 𝑥,𝑓,𝑔; three outer uses abstract 𝑍,𝑌,𝑋. The formation premises for ordinary arrows use Π-form; the domains 𝑋,𝑌,𝑍 are available as types by U-El, and U0 itself is a type by U-Form. Consequently ⋅⊢comp:∏𝑋:U0∏𝑌:U0∏𝑍:U0(𝑌→𝑍)→(𝑋→𝑌)→(𝑋→𝑍). No universe eliminator is used; universes have none. Only U-El is needed to let the quantified universe elements serve as ordinary types.
Exercise 29.4.
Assume the first premise of U-Pi, Γ ⊢𝐴 :U𝑖. Its own presuppositions include Γ 𝖼𝗍𝗑 and Γ ⊢U𝑖 𝗍𝗒𝗉𝖾; the latter is also an instance of U-Form. Applying U-El gives the missing domain formation judgment: Γ⊢𝐴:U𝑖Γ⊢𝐴 𝗍𝗒𝗉𝖾U−El. Context extension then gives Γ 𝖼𝗍𝗑Γ⊢𝐴 𝗍𝗒𝗉𝖾Γ,𝑥:𝐴 𝖼𝗍𝗑Ctx−Ext. This is exactly the context required to state the second premise Γ,𝑥 :𝐴 ⊢𝐵 :U𝑖. From that premise, U-El also supplies Γ,𝑥 :𝐴 ⊢𝐵 𝗍𝗒𝗉𝖾, so the raw product in the conclusion is well-formed by ordinary Π-formation. Nothing beyond the two displayed universe-element premises and their standard presuppositions is needed.
Exercise 29.8.
Assume Γ⊢𝐴:U𝑖,Γ,𝑥:𝐴⊢𝐵:U𝑖. For the left side, U-Pi at level 𝑖 gives ∏𝑥:𝐴𝐵 :U𝑖, and Lift-U then gives 𝖫𝗂𝖿𝗍𝑖(∏𝑥:𝐴𝐵):U𝑖+1. For the right side, Lift-U first gives 𝖫𝗂𝖿𝗍𝑖𝐴:U𝑖+1in Γ,𝖫𝗂𝖿𝗍𝑖𝐵:U𝑖+1in Γ,𝑥:𝐴. Rule Lift-El yields 𝖫𝗂𝖿𝗍𝑖𝐴 ≡𝐴 𝗍𝗒𝗉𝖾. Symmetry followed by context conversion transports the second judgment to Γ,𝑥:𝖫𝗂𝖿𝗍𝑖𝐴⊢𝖫𝗂𝖿𝗍𝑖𝐵:U𝑖+1. Now U-Pi at level 𝑖 +1 gives ∏𝑥:𝖫𝗂𝖿𝗍𝑖𝐴𝖫𝗂𝖿𝗍𝑖𝐵:U𝑖+1. Thus both terms compared by Lift-Pi inhabit the stated classifier in the same context. The context conversion justified by Lift-El is the only nonliteral bookkeeping step.
Exercise 29.10.
In context 𝑋 :U0, the variable judgment 𝑋 :U0, used twice with U-Pi at level 0, gives ∏𝑥:𝑋𝑋:U0. Rule Lift-U therefore gives 𝑋:U0⊢𝖫𝗂𝖿𝗍0(∏𝑥:𝑋𝑋):U1. The outer domain satisfies U0 :U1 by U-Hier, so U-Pi at level 1 yields ⋅⊢∏𝑋:U0𝖫𝗂𝖿𝗍0(∏𝑥:𝑋𝑋):U1. In context 𝑋 :U0, Lift-El gives 𝖫𝗂𝖿𝗍0(∏𝑥:𝑋𝑋)≡∏𝑥:𝑋𝑋 𝗍𝗒𝗉𝖾. Dependent-product congruence with the reflexive equality on the outer domain therefore gives ⋅⊢∏𝑋:U0𝖫𝗂𝖿𝗍0(∏𝑥:𝑋𝑋)≡∏𝑋:U0∏𝑥:𝑋𝑋 𝗍𝗒𝗉𝖾. The left-hand type is an element of U1 and is judgmentally equal as a type to the polymorphic-identity type. By convention 29.3, the latter is therefore U1-small.
Exercise 29.11.
To avoid capture, call the predecessor 𝑘 and the recursively computed universe element 𝑅. Define 𝖢𝖺𝗌𝖾𝗌𝑖(𝐴𝑧,𝑥.𝐴𝑠,𝑛):=𝗋𝖾𝖼ℕ(𝐴𝑧,𝜆𝑘.𝜆𝑅.𝐴𝑠[𝑘/𝑥],𝑛):U𝑖. In the step context 𝑘 :ℕ,𝑅 :U𝑖, the term 𝐴𝑠[𝑘/𝑥] :U𝑖 is obtained by substitution from the supplied successor branch and then weakened by 𝑅. The recursive result is deliberately discarded. Natural-number computation gives equalities at type U𝑖: 𝖢𝖺𝗌𝖾𝗌𝑖(𝐴𝑧,𝑥.𝐴𝑠,𝟢)≡𝐴𝑧,𝖢𝖺𝗌𝖾𝗌𝑖(𝐴𝑧,𝑥.𝐴𝑠,𝗌𝗎𝖼(𝑚))≡(𝜆𝑘.𝜆𝑅.𝐴𝑠[𝑘/𝑥])(𝑚,𝖢𝖺𝗌𝖾𝗌𝑖(𝐴𝑧,𝑥.𝐴𝑠,𝑚))≡𝐴𝑠[𝑚/𝑥]. Applying U-El-Eq to these two term equalities gives exactly 𝖢𝖺𝗌𝖾𝗌𝑖(𝐴𝑧,𝑥.𝐴𝑠,𝟢)≡𝐴𝑧 𝗍𝗒𝗉𝖾,𝖢𝖺𝗌𝖾𝗌𝑖(𝐴𝑧,𝑥.𝐴𝑠,𝗌𝗎𝖼(𝑚))≡𝐴𝑠[𝑚/𝑥] 𝗍𝗒𝗉𝖾. This is case analysis rather than recursive large elimination because the step branch does not use 𝑅.
Exercise 29.12.
Define a universe-valued discriminator 𝑃:=[𝜆𝑥:𝐴.𝟏,𝜆𝑦:𝐵.𝟎]:𝐴+𝐵→U0, using U-Unit and U-Void for the two branch terms. Its constructor computations are 𝑃(𝗂𝗇𝗅(𝑎))≡𝟏,𝑃(𝗂𝗇𝗋(𝑏))≡𝟎:U0. Suppose ℎ :𝗂𝗇𝗅(𝑎) ≡𝗂𝗇𝗋(𝑏) :𝐴 +𝐵 is a derivable judgmental equality. Application congruence gives 𝑃(𝗂𝗇𝗅(𝑎))≡𝑃(𝗂𝗇𝗋(𝑏)):U0. Composing with the two constructor computations yields 𝟏 ≡𝟎 :U0. Rule U-El-Eq turns this into 𝟏 ≡𝟎 𝗍𝗒𝗉𝖾. Since ⋆ :𝟏, conversion gives the closed term ⋅⊢⋆:𝟎. Thus a judgmental equality between opposite coproduct injections entails syntactic inconsistency, exactly as Boolean disjointness does.
Exercise 29.13.
Use recursion into U0, with the recursive result itself serving as the tail universe element: 𝖵𝖾𝖼:=𝜆𝐴.𝜆𝑛.𝗋𝖾𝖼ℕ(𝟏,𝜆𝑘.𝜆𝑅.𝐴×𝑅,𝑛):U0→ℕ→U0. In the step context 𝐴 :U0,𝑘 :ℕ,𝑅 :U0, the nondependent product 𝐴 ×𝑅 is an element of U0 by U-Sig at level 0. The two natural-number computation rules and Pi-beta give 𝖵𝖾𝖼(𝐴,𝟢)≡𝟏:U0,𝖵𝖾𝖼(𝐴,𝗌𝗎𝖼(𝑛))≡(𝜆𝑘.𝜆𝑅.𝐴×𝑅)(𝑛,𝖵𝖾𝖼(𝐴,𝑛))≡𝐴×𝖵𝖾𝖼(𝐴,𝑛):U0. By U-El-Eq, the same equations hold as equalities of types.
Exercise 29.14.
Use the dependent motive 𝐶(𝑛):=𝖤𝗊𝖭(𝑛,𝑛). At zero, the characteristic equation 𝐶(𝟢) ≡𝟏 allows ⋆ :𝟏 to be converted to a term 𝑐0 :𝐶(𝟢). For the step, in context 𝑘 :ℕ,𝑒 :𝐶(𝑘), the equation 𝐶(𝗌𝗎𝖼(𝑘))=𝖤𝗊𝖭(𝗌𝗎𝖼(𝑘),𝗌𝗎𝖼(𝑘))≡𝖤𝗊𝖭(𝑘,𝑘)=𝐶(𝑘) allows the unchanged raw term 𝑒 to be converted to type 𝐶(𝗌𝗎𝖼(𝑘)). Let ¯𝑒𝑘 denote that converted occurrence and set 𝑟:=𝜆𝑛.𝗂𝗇𝖽ℕ(𝑘.𝐶(𝑘);𝑐0,𝜆𝑘.𝜆𝑒.¯𝑒𝑘;𝑛):∏𝑛:ℕ𝖤𝗊𝖭(𝑛,𝑛). At zero, Pi-beta and natural-number computation give 𝑟(𝟢)≡𝑐0≡⋆:𝐶(𝟢). Converting the classifier along 𝐶(𝟢) ≡𝟏 yields the requested judgment ⋅⊢𝑟(𝟢)≡⋆:𝟏. At successors the same construction also gives 𝑟(𝗌𝗎𝖼(𝑘)) ≡𝑟(𝑘), with the right-hand term silently converted from 𝐶(𝑘) to 𝐶(𝗌𝗎𝖼(𝑘)).
Exercise 29.15.
Assume ℎ:𝗌𝗎𝖼(𝑚)≡𝗌𝗎𝖼(𝑛):ℕ. By the preceding exercise, 𝑟(𝑚) :𝖤𝗊𝖭(𝑚,𝑚). The successor computation for 𝖤𝗊𝖭, used symmetrically, gives 𝖤𝗊𝖭(𝑚,𝑚)≡𝖤𝗊𝖭(𝗌𝗎𝖼(𝑚),𝗌𝗎𝖼(𝑚))𝗍𝗒𝗉𝖾. Apply congruence to the type-valued function 𝜆𝑧. 𝖤𝗊𝖭(𝗌𝗎𝖼(𝑚),𝑧) and the equality ℎ. This gives 𝖤𝗊𝖭(𝗌𝗎𝖼(𝑚),𝗌𝗎𝖼(𝑚))≡𝖤𝗊𝖭(𝗌𝗎𝖼(𝑚),𝗌𝗎𝖼(𝑛))𝗍𝗒𝗉𝖾. A final characteristic computation gives 𝖤𝗊𝖭(𝗌𝗎𝖼(𝑚),𝗌𝗎𝖼(𝑛))≡𝖤𝗊𝖭(𝑚,𝑛)𝗍𝗒𝗉𝖾. By transitivity, 𝖤𝗊𝖭(𝑚,𝑚) ≡𝖤𝗊𝖭(𝑚,𝑛) as types. Converting the closed term 𝑟(𝑚) along this equality produces 𝑒:=𝑟(𝑚):𝖤𝗊𝖭(𝑚,𝑛), where the displayed definition keeps the raw term and changes only its typing derivation.
Exercise 74.13.
Define 𝐺:=𝜆𝑛.𝗋𝖾𝖼ℕ(ℕ,𝜆𝑘.𝜆𝑅.𝑅→ℕ,𝑛):ℕ→U0. The step is well-typed because 𝑅 :U0 and ℕ :U0, so U-Pi at level 0 gives 𝑅 →ℕ :U0. Computation gives 𝐺(𝟢)≡ℕ,𝐺(𝗌𝗎𝖼(𝑛))≡(𝜆𝑘.𝜆𝑅.𝑅→ℕ)(𝑛,𝐺(𝑛))≡𝐺(𝑛)→ℕ. Now ℕ :U0, and in context 𝑛 :ℕ application gives 𝐺(𝑛) :U0. Hence U-Sig at level 0 yields ⋅⊢∑𝑛:ℕ𝐺(𝑛):U0. Thus the dependent sum is not merely equal to a small type; it is itself a element of U0, and so is U0-small by reflexivity.
Exercise 74.14.
The constraint 𝑣 ≤𝑢 +1 belongs to 𝑃: it restricts the external parameters but does not add a lower bound on the unknown 𝑚. Splitting the other maximum gives 𝑣 +2 ≤𝑚 and 𝑢 ≤𝑚; the latter is dominated by 𝑢 +1 ≤𝑚. Hence the least symbolic choice is 𝑚=max(𝑢+1,𝑣+2). For every parameter assignment satisfying 𝑃, any solution must dominate both surviving lower bounds, so this solution is principal. The hypothesis of proposition 74.10 used here is precisely the separation between parameter-only constraints in 𝑃 and constraints with the unknown on their right-hand side.