Exercise 126.1.
Rule Rel-Var gives Γ ⊢𝑦 𝗋𝗎𝗇𝗍𝗂𝗆𝖾. In Γ,𝑧𝗋𝗎𝗇𝗍𝗂𝗆𝖾 :𝟐, a second instance gives 𝑧 𝗋𝗎𝗇𝗍𝗂𝗆𝖾; hence Rel-Lam-R derives runtime relevance of the displayed abstraction. Rule Rel-App-R applied to those two premises derives runtime relevance of the application.
Suppose the Boolean eliminator had a runtime-relevance derivation. Inversion leaves only Rel-Bool-Elim, whose scrutinee premise is Γ ⊢𝑥 𝗋𝗎𝗇𝗍𝗂𝗆𝖾. Inversion of a runtime judgment for a variable leaves Rel-Var, but Γ contains 𝑥𝖾𝗋𝖺𝗌𝖾𝖽 :𝟐, not a runtime-marked binding. Thus the scrutinee premise is missing. Rule Rel-Erased cannot repair it because its conclusion is the erased judgment.
Exercise 126.2.
The runtime-field list is 𝗋𝗎𝗇(𝗉𝖺𝖼𝗄) =(2), so |𝗉𝖺𝖼𝗄(𝗌𝗎𝖼𝟢,𝗍𝗍)|=𝐶𝗉𝖺𝖼𝗄(𝐶𝗍𝗍). The source branch erases to 𝐶𝗉𝖺𝖼𝗄(𝑏)⇒𝐶𝟢. The erased index binder 𝑖 has no target position. The Boolean field is a retained constructor field, so it contributes the binder 𝑏 even though the independent branch-use mark is erased and 𝑏 does not occur in the body. Deleting that binder would give the branch arity zero while the tag has arity one, violating representation well-formedness and preventing E-Case from installing the constructor payload.
Exercise 126.3.
Source substitution gives 𝑒[𝗍𝗍/𝑥] =(𝗍𝗍,𝗋𝖾𝖿𝗅𝗍𝗍), and therefore |𝑒[𝗍𝗍/𝑥]|=𝐶𝗉𝖺𝗂𝗋(𝐶𝗍𝗍,𝐶𝗋𝖾𝖿𝗅). On the other side, |𝑒|[|𝗍𝗍|/𝑥]=𝐶𝗉𝖺𝗂𝗋(𝑥,𝐶𝗋𝖾𝖿𝗅)[𝐶𝗍𝗍/𝑥]=𝐶𝗉𝖺𝗂𝗋(𝐶𝗍𝗍,𝐶𝗋𝖾𝖿𝗅). The reflexivity clause emits the nullary tag 𝐶𝗋𝖾𝖿𝗅; its endpoint is a source annotation and contributes no target variable.
Exercise 126.4.
Erasing the element type, both lengths, and predecessor indices leaves the closure |𝖺𝗉𝗉𝖾𝗇𝖽| =𝖼𝗅𝗈𝗌(𝖺𝗉𝗉𝖾𝗇𝖽, ⋅) and the two runtime arguments. Abbreviate 𝑝 =𝐶𝗏𝖼𝗈𝗇𝗌(𝑎,𝐶𝗏𝗇𝗂𝗅) and 𝑞 =𝐶𝗏𝖼𝗈𝗇𝗌(𝑏,𝐶𝗏𝗇𝗂𝗅). First derive D0:𝖼𝖺𝗅𝗅(|𝖺𝗉𝗉𝖾𝗇𝖽|,𝐶𝗏𝗇𝗂𝗅,𝑞)⇓𝑞. Its outer rule is E-Call: E-Val supplies the closure and both arguments, while its body premise is an E-Case derivation whose scrutinee and selected 𝐶𝗏𝗇𝗂𝗅 branch both use E-Val. The complete call is the derivation 𝖼𝖺𝗅𝗅(|𝖺𝗉𝗉𝖾𝗇𝖽|,𝑝,𝑞)⇓𝐶𝗏𝖼𝗈𝗇𝗌(𝑎,𝑞). Its outer E-Call again evaluates the closure and arguments by E-Val. The body premise uses E-Case to select the 𝐶𝗏𝖼𝗈𝗇𝗌 branch. That branch uses E-Con, with E-Val for 𝑎 and D0 for the recursive field. Hence the target constructor tree is 𝐶𝗏𝖼𝗈𝗇𝗌(𝑎,𝐶𝗏𝖼𝗈𝗇𝗌(𝑏,𝐶𝗏𝗇𝗂𝗅)), and both case selections inspect only retained vector tags.
Exercise 126.5.
Put 𝑞0=𝐶𝗌𝗍𝗋𝖾𝖺𝗆(𝖼𝗅𝗈𝗌(ℎ∗,𝐶𝟢),𝖼𝗅𝗈𝗌(𝑡∗,𝐶𝟢)). For the head word, Obs-Head forces 𝖼𝗅𝗈𝗌(ℎ∗,𝐶𝟢); its E-Call body evaluates to 𝐶𝟢. Thus 𝖮𝖻𝗌(𝑞0,𝗁𝖾𝖺𝖽,𝐶𝟢). For the tail word, Obs-Tail first forces 𝖼𝗅𝗈𝗌(𝑡∗,𝐶𝟢). Its E-Call derivation evaluates the transition once and returns 𝑞1=𝐶𝗌𝗍𝗋𝖾𝖺𝗆(𝖼𝗅𝗈𝗌(ℎ∗,𝐶𝗌𝗎𝖼(𝐶𝟢)),𝖼𝗅𝗈𝗌(𝑡∗,𝐶𝗌𝗎𝖼(𝐶𝟢))). The remaining Obs-Head premise forces the head closure of 𝑞1, whose E-Call result is 𝐶𝗌𝗎𝖼(𝐶𝟢). These premises derive the second requested observation.
Exercise 126.6.
The four index-erasure clauses give (∀𝑖ℕ.𝖵𝖾𝖼𝐴{𝑖}→ℕ)∘=𝖫𝗂𝗌𝗍𝐴→ℕ. The outer index-polymorphic binder disappears, and the index abstraction and application inside 𝖵𝖾𝖼 𝐴{𝑖} disappear. The Curry term inhabiting the type is unchanged.
Exercise 126.7.
The constructor clauses are 𝗏𝗇𝗂𝗅R𝐶𝗏𝗇𝗂𝗅,𝑎R𝑎′𝑥𝑠R𝑥𝑠′𝗏𝖼𝗈𝗇𝗌(𝑛,𝑎,𝑥𝑠)R𝐶𝗏𝖼𝗈𝗇𝗌(𝑎′,𝑥𝑠′). For a source constructor evaluation, apply the induction hypothesis to every runtime field. The erased index 𝑛 produces no target field, so the target forms the declared arity-two block and the second displayed relation applies. For a recursive branch body 𝑒, retained bindings satisfy |𝑒[𝑎/𝑥,𝑥𝑠/𝑦]| =|𝑒|[𝑎′/𝑥,𝑥𝑠′/𝑦] by two instances of lemma 126.11; substitution for the erased predecessor index disappears by its erased clause. The target therefore selects the matching constructor branch and preserves R.
Exercise 126.8.
Let 𝑏 =𝜆𝖾𝗋𝖺𝗌𝖾𝖽𝑥 :𝟐.𝗂𝖿 𝑥 𝗍𝗁𝖾𝗇 0 𝖾𝗅𝗌𝖾 1. Then 𝑏 𝗍𝗍 ⇓0 and 𝑏 𝖿𝖿 ⇓1. Under the unsafe erasure clauses, both applications erase their argument and abstraction, so both yield the same phrase |𝗂𝖿 𝑥 𝗍𝗁𝖾𝗇 0 𝖾𝗅𝗌𝖾 1|. The phrase is open because the erased binder supplies no target 𝑥, already violating target well-formedness. Any deterministic repair that closes the phrase has one outcome, and therefore cannot relate simultaneously to the distinct canonical source values zero and one. Runtime relevance rejects 𝑏 before this contradiction arises.