Exercise 82.1.
Fix 𝑞 :𝑎𝑅𝑎. Define 𝐹 :𝖠𝖼𝖼𝑅(𝑎) →𝟎 by structural induction on its accessibility-certificate argument. In its sole case, 𝐹(𝖺𝖼𝖼𝑎(ℎ)):=𝐹(ℎ𝑎𝑞). The displayed recursive call is on the immediate accessibility proof ℎ 𝑎 𝑞 :𝖠𝖼𝖼𝑅(𝑎) stored by the constructor. Thus a hypothetical 𝑝 :𝖠𝖼𝖼𝑅(𝑎) gives 𝐹(𝑝) :𝟎. This is the proof-dependent eliminator of definition 82.4, with a motive over the certificate at the fixed index 𝑎. Its nondependent specialization with 𝑃(𝑥):=𝟎 would demand a step producing 𝟎 at every 𝑥 :𝐴; the single proof 𝑞 :𝑎𝑅𝑎 cannot supply those other cases. The construction does not inspect or decide 𝑅; it uses 𝑞 only at the fixed index.
Exercise 82.2.
Define 𝜌(𝑎,𝑏) =𝜇(𝑎) +𝜈(𝑏). If 𝜇(𝑎′) <𝜇(𝑎) and 𝜈(𝑏′) <𝜈(𝑏), monotonicity and transitivity of addition give 𝜌(𝑎′,𝑏′)definition=𝜇(𝑎′)+𝜈(𝑏′)monotonicity in the left summand<𝜇(𝑎)+𝜈(𝑏′)monotonicity in the right summand<𝜇(𝑎)+𝜈(𝑏)definition=𝜌(𝑎,𝑏). Hence the relation is contained in <𝜌 and is well founded by theorem 82.14: an accessibility proof for the larger measure relation restricts to one for the smaller relation. It is also contained in the lexicographic relation because its first coordinate decreases. The containment can be strict: a lexicographic predecessor may decrease 𝜇 while increasing 𝜈, whereas the relation in the exercise requires both coordinates to decrease.
Exercise 82.3.
The complete calculation is 𝗀𝖼𝖽(1071,462)1071𝗋𝖾𝗆462=147<462=𝗀𝖼𝖽(462,147)462𝗋𝖾𝗆147=21<147=𝗀𝖼𝖽(147,21)147𝗋𝖾𝗆21=0<21=𝗀𝖼𝖽(21,0)𝑡ℎ𝑒𝑜𝑟𝑒𝑚82.20=21. Thus the second-coordinate measure sequence is 462 >147 >21 >0.
Exercise 82.4.
Partitioning the tail gives |𝑙| +|𝑟| =|𝑥𝑠|. Therefore |𝑙|≤|𝑥𝑠|<𝗌𝗎𝖼(|𝑥𝑠|)=|𝑝::𝑥𝑠|,|𝑟|≤|𝑥𝑠|<|𝑝::𝑥𝑠|. These are the two certificates for the recursive calls on 𝑙 and 𝑟. If the pivot is not removed and the partition equation instead accounts for the entire input, one side may have the full input length and the other length zero. The equation then yields only a non-strict inequality for that side, so it cannot justify the corresponding recursive call.
Exercise 82.5.
For 𝑝 ≡𝖺𝖼𝖼𝑎(ℎ), the constructor field has type ℎ:∏𝑏:𝐴𝑏𝑅𝑎→𝖠𝖼𝖼𝑅(𝑏). The induction hypothesis applied to ℎ 𝑏 𝑟 gives a result in 𝑃(𝑏). After abstraction, the step receives 𝑘:=𝜆𝑏.𝜆𝑟.𝖺𝖼𝖼𝗂𝗇𝖽𝑃(𝑠,𝑏,ℎ𝑏𝑟):∏𝑏:𝐴𝑏𝑅𝑎→𝑃(𝑏). Taking 𝑃(𝑎):=ℕ gives 𝑠(𝑎,𝑘) :ℕ, and the constructor computation rule is 𝗐𝖿𝗋𝖾𝖼𝑅,𝑃(𝑠,𝑎,𝖺𝖼𝖼𝑎(ℎ))≡𝑠(𝑎,𝜆𝑏.𝜆𝑟.𝗐𝖿𝗋𝖾𝖼𝑅,𝑃(𝑠,𝑏,ℎ𝑏𝑟)). Every recursive call is therefore indexed by both a predecessor 𝑏 and its proof 𝑟 :𝑏𝑅𝑎.
Exercise 82.6.
Put (𝑎′,𝑏′,𝑐′) <(𝑎,𝑏,𝑐) when either 𝑎′𝑅𝑎, or 𝑎′ =𝑎 and 𝑏′𝑆𝑏, or 𝑎′ =𝑎, 𝑏′ =𝑏, and 𝑐′𝑇𝑐. Induct first on the 𝑅-accessibility of 𝑎, with all 𝑏,𝑐 quantified. Inside that case, induct on the 𝑆-accessibility of 𝑏, with all 𝑐 quantified; inside that case, induct on the 𝑇-accessibility of 𝑐. For a predecessor, the first disjunct uses the outer induction hypothesis and leaves 𝑏′,𝑐′ unrestricted. The second uses the middle hypothesis and leaves 𝑐′ unrestricted after transporting along 𝑎′ =𝑎. The third uses the inner hypothesis after transporting along 𝑎′ =𝑎 and 𝑏′ =𝑏. These three clauses form the predecessor function for 𝖺𝖼𝖼(𝑎,𝑏,𝑐).