Exercise 123.1.
In the first call, 𝑚 <𝗌𝗎𝖼𝑚, so coordinate one is the decisive strict coordinate; the later increase is irrelevant and the call passes. In the second call, coordinate one is equal. If 𝑛 =0, coordinate two is also equal and the call fails because no coordinate is strict. If 𝑛 =𝗌𝗎𝖼𝑘, then 0 <𝗌𝗎𝖼𝑘, so coordinate two is decisive and the call passes. In the third call the proposed first coordinate 𝗌𝗎𝖼(𝗌𝗎𝖼𝑚) is not smaller than the source coordinate 𝗌𝗎𝖼𝑚; the lexicographic premise fails before the second coordinate is inspected.
Exercise 123.2.
The selected successor row gives 𝖾𝗏𝖾𝗇(𝗌𝗎𝖼𝑛)𝑅−𝐶𝑎𝑙𝑙⇝0𝗈𝖽𝖽(𝑛). Write 𝐹𝑆 for the compiled well-founded definition on 𝖲𝗍𝖺𝗍𝖾𝑆. At program granularity the corresponding target contraction is 𝐹𝑆(𝗂𝗇𝖾𝗏𝖾𝗇(𝗌𝗎𝖼𝑛))𝐶−𝐶𝑎𝑙𝑙⇝0𝐹𝑆(𝗂𝗇𝗈𝖽𝖽(𝑛)). To expose the raw proof arguments, write 𝑊𝑆[𝑥;𝑝] for the internal accessibility worker at 𝑝 :𝖠𝖼𝖼𝑅𝑆(𝑥). The accepted proof at the source state has the form 𝖺𝖼𝖼(𝛼𝖾𝗏𝖾𝗇,𝗌𝗎𝖼𝑛), where 𝛼𝖾𝗏𝖾𝗇,𝗌𝗎𝖼𝑛(𝑦,𝑝) is the stored accessibility proof for the predecessor 𝑝 :𝑦𝑅𝑆𝗂𝗇𝖾𝗏𝖾𝗇(𝗌𝗎𝖼𝑛). Let 𝖤𝑆 denote the generated state eliminator, and abbreviate 𝑝𝗌𝗎𝖼:=𝖼𝗁𝗂𝗅𝖽𝗌𝗎𝖼(𝑛,𝗌𝗎𝖼𝑛),𝑘𝛼:=𝜆𝑦.𝜆𝑝.𝑊𝑆[𝑦;𝛼𝖾𝗏𝖾𝗇,𝗌𝗎𝖼𝑛(𝑦,𝑝)]. The complete administrative prefix is 𝐹𝑆(𝗂𝗇𝖾𝗏𝖾𝗇(𝗌𝗎𝖼𝑛))𝑜𝑢𝑡𝑒𝑟−𝛽+⇝0𝖤𝑆(𝗂𝗇𝖾𝗏𝖾𝗇(𝗌𝗎𝖼𝑛);⃗𝑏)𝐵𝑙𝑜𝑐𝑘−𝑐𝑜𝑚𝑝⇝0𝑊𝑆[𝗂𝗇𝖾𝗏𝖾𝗇(𝗌𝗎𝖼𝑛);𝖺𝖼𝖼(𝛼𝖾𝗏𝖾𝗇,𝗌𝗎𝖼𝑛)]𝑊𝐹−𝛽⇝0(𝜆𝑘.𝑘(𝗂𝗇𝗈𝖽𝖽(𝑛),𝑝𝗌𝗎𝖼))𝑘𝛼𝑎𝑑𝑚𝑖𝑛−𝛽+⇝0𝑊𝑆[𝗂𝗇𝗈𝖽𝖽(𝑛);𝛼𝖾𝗏𝖾𝗇,𝗌𝗎𝖼𝑛(𝗂𝗇𝗈𝖽𝖽(𝑛),𝑝𝗌𝗎𝖼)]=𝖼𝗈𝗆𝗉𝗂𝗅𝖾G(𝗈𝖽𝖽(𝑛)). Here ⃗𝑏 is the finite tuple of generated state branches, and its even-successor component is the displayed worker. The final line is what the program-level notation 𝐹𝑆(𝗂𝗇𝗈𝖽𝖽(𝑛)) denotes inside this selected branch; its accessibility argument is frozen evidence. The named 𝖣𝖢𝗁𝗂𝗅𝖽ℕ proof is exactly 𝖼𝗁𝗂𝗅𝖽𝗌𝗎𝖼(𝑛,𝗌𝗎𝖼𝑛). Thus the displayed sequence contains the outer beta contractions, generated state-block equation, accessibility recursor redex, WF-𝛽, and all administrative beta contractions licensed by C-Call.
Exercise 123.3.
Use 𝖲𝗍𝖺𝗍𝖾𝑆 with constructors 𝗂𝗇𝖾𝗏𝖾𝗇(𝑛) and 𝗂𝗇𝗈𝖽𝖽(𝑛). Its relation has the two predecessor families 𝗂𝗇𝗈𝖽𝖽(𝑛)𝑅𝑆𝗂𝗇𝖾𝗏𝖾𝗇(𝗌𝗎𝖼𝑛),𝗂𝗇𝖾𝗏𝖾𝗇(𝑛)𝑅𝑆𝗂𝗇𝗈𝖽𝖽(𝗌𝗎𝖼𝑛). Both are witnessed by 𝖼𝗁𝗂𝗅𝖽𝗌𝗎𝖼(𝑛,𝗌𝗎𝖼𝑛). With 𝑘 the recursive hypothesis, the four step bodies are 𝗍𝗍,𝑘(𝗂𝗇𝗈𝖽𝖽(𝑛),𝖼𝗁𝗂𝗅𝖽𝗌𝗎𝖼),𝖿𝖿,𝑘(𝗂𝗇𝖾𝗏𝖾𝗇(𝑛),𝖼𝗁𝗂𝗅𝖽𝗌𝗎𝖼), in the order even-zero, even-successor, odd-zero, odd-successor. Writing 𝐹𝑆 for the compiled recursor, its calculation is 𝐹𝑆(𝗂𝗇𝖾𝗏𝖾𝗇(𝗌𝗎𝖼(𝗌𝗎𝖼0)))𝑊𝐹−𝛽⇝0𝐹𝑆(𝗂𝗇𝗈𝖽𝖽(𝗌𝗎𝖼0))𝑊𝐹−𝛽⇝0𝐹𝑆(𝗂𝗇𝖾𝗏𝖾𝗇(0))𝑊𝐹−𝛽⇝0𝗍𝗍. The first two steps consume the two displayed 𝑅𝑆-predecessor proofs; the last selects the even-zero body.
Exercise 123.4.
The changed clause emits the self-edge 𝗂𝗇𝗈𝖽𝖽(𝗌𝗎𝖼𝑛)⟶𝗂𝗇𝗈𝖽𝖽(𝗌𝗎𝖼𝑛). The call supplies 𝗌𝗎𝖼𝑛 again at the named position. By definition 123.3, that term is not a direct constructor child of itself, so no predecessor certificate exists. At 𝑛 =0, source evaluation repeats 𝗈𝖽𝖽(𝗌𝗎𝖼0)⇝0𝗈𝖽𝖽(𝗌𝗎𝖼0)⇝0𝗈𝖽𝖽(𝗌𝗎𝖼0)⇝0⋯. The failed certificate and the infinite trace expose the same unguarded self-edge.