exercise 98.1.
Induct on the type or parameter-term constructor. State types map to 𝟏, which is fixed by shape; parameter types are fixed. For functions and tensors, apply the induction hypotheses to the domain and codomain. For abstraction, application, pairs, and force, rebuild the corresponding parameter constructor after applying the hypotheses to its subterms. Lift is fixed by its shape clause. Hence applying shape twice changes no constructor. This is an equation between results of a meta-operation. A state term and its shape inhabit different syntactic classes and generally different types, so no term-equality judgment between them is asserted.
exercise 98.2.
The first premise uses Γ1 =(𝑢 :1𝐴,𝑣 :0𝐷) and the second uses Γ2 =(𝑢 :0𝐴,𝑣 :1𝐷). Rule LD-Pair concludes in Γ1+Γ2=(𝑢:1𝐴,𝑣:1𝐷). Changing the second occurrence of 𝑢 to index 1 makes its sum 1 +1 =𝜔. Context formation permits index 𝜔 only for a parameter type. If 𝐴 is a state type, the summed context is therefore ill formed; the failure occurs before pair introduction can be applied.
exercise 98.3.
Split the occurrence of 𝑥 :𝑘𝐴 between the premises as 𝑘 =𝑘1 +𝑘2. The induction hypotheses give Δ1+𝑘1Γ2⊢𝑀[𝑉/𝑥]:𝐶[Sh(𝑉)/𝑥] and Δ2+𝑘2Γ2⊢𝑁[𝑉/𝑥]:𝐷[Sh(𝑀[𝑉/𝑥])/𝑦,Sh(𝑉)/𝑥]. The second classifier is licensed by parameter substitution and Sh(𝑀[𝑉/𝑥])=Sh(𝑀)[Sh(𝑉)/𝑥]. Rebuilding LD-Pair uses (Δ1+𝑘1Γ2)+(Δ2+𝑘2Γ2)=Δ1+Δ2+(𝑘1+𝑘2)Γ2=Δ1+Δ2+𝑘Γ2. This is the context and classifier in substitution clause (3).
exercise 98.4.
Let 𝐹 =[[𝜆𝑥.𝑀0]] and let 𝑣 =[[𝑉]] :[[Γ2]] →[[𝐵]]. The square has upper-left [[Γ1]] ⊗[[Γ2]], upper-right [[Γ1]] ⊗[[𝐵]], lower-left (Π𝐵[[𝐴]]) ⊗[[𝐵]], and lower-right [[𝐴]]. The top arrow is id ⊗𝑣; the left arrow is 𝐹 ⊗id; the bottom arrow is the dependent counit 𝜖; the right-hand composite is the map induced by semantic value substitution. Naturality of the counit states 𝜖∘(𝐹⊗id)∘(id⊗𝑣)=[[𝑀0]]∘(id⊗𝑣)=[[𝑀0[𝑉/𝑥]]]. Together with the three evaluation induction hypotheses, this gives [[𝐹𝑁]]=[[𝑊]].
exercise 98.5.
Type the first read at register context 𝑟 :1𝖢𝖾𝗅𝗅, obtaining a tensor (𝑏,𝑟′). In its eliminator, give the bit index zero if unused and give 𝑟′ :1𝖢𝖾𝗅𝗅 to the second read. Thus the original 𝑟 occurs once, in the scrutinee derivation, and the bound returned register occurs once, in the body derivation. Attempting two reads of 𝑟 instead forms (𝑟:1𝖢𝖾𝗅𝗅)+(𝑟:1𝖢𝖾𝗅𝗅)=𝑟:𝜔𝖢𝖾𝗅𝗅. Because 𝖢𝖾𝗅𝗅 is a state type, the 𝜔 declaration is not a well-formed context. Threading succeeds because the second read consumes a freshly bound component rather than adding a second use of the original.
exercise 98.6.
For parameter substitution into (𝑀,𝑁), clause (1) substitutes the parameter in the second component’s type; clause (2) substitutes it in both component terms, after which LD-Pair rebuilds the result. For value substitution, split the value’s usage as 𝑘1 +𝑘2, use clause (3) for 𝑀 and 𝑁, and use clause (1) on the shaped value to align 𝐵[Sh(𝑀[𝑉/𝑥])]. The context and shape equations are those in the solution of exercise 98.3. Replacing Sh(𝑉) by 𝑉 makes the dependent suffix a kinding context containing a state term, so clause (1) is inapplicable and the reconstruction stops.
exercise 98.7.
Take B =𝖥𝗂𝗇𝖲𝖾𝗍. Over a parameter set 𝑋, let a state object be a finite family of state sets and a morphism be an 𝑋-indexed finite transition; tensor is product of state spaces. For the two-state cell 𝐶 ={0,1} and a family 𝐷(𝑐), the dependent function object contains tables 𝑓 with 𝑓(𝑐) ∈𝐷(𝑐). The counit is evaluation 𝜖(𝑓,𝑐) =𝑓(𝑐). For a transition 𝑣 :𝑋 →𝐶, both routes around the substitution square send (𝑓,𝑥) to 𝑓(𝑣(𝑥)); hence 𝜖 ∘(id ×𝑣) is the reindexing of evaluation along 𝑣. Dependent pairs require stable fiberwise dependent tensors and their Beck–Chevalley comparison. The type !𝐴 additionally requires the linear–nonlinear adjunction/comonad and its compatible reindexing.