exercise 50.1.
Choose outer 𝜌0 and fresh local 𝜌, and annotate 𝗅𝖾𝗍𝗋𝖾𝗀𝗂𝗈𝗇 𝜌 𝗂𝗇 𝗅𝖾𝗍 𝑥=1 𝖺𝗍 𝜌 𝗂𝗇 2 𝖺𝗍 𝜌0 𝖾𝗇𝖽 𝖾𝗇𝖽. The body effect is {𝗉𝗎𝗍(𝜌),𝗉𝗎𝗍(𝜌0)}. The result is an integer at 𝜌0, and the empty initial TE does not mention 𝜌. Those are RI-Letregion’s freshness facts. The rule removes the local put effect, leaving {𝗉𝗎𝗍(𝜌0)}; it has no continuation-effect premise.
exercise 50.3.
Deleting the outer 𝜋0 from 𝑒𝗉𝖺𝗂𝗋𝖥𝗂𝗋𝗌𝗍 returns the allocated pair, whose result type is ⟨𝗂𝗇𝗍,𝗂𝗇𝗍⟩ 𝖺𝗍 𝜌. Hence 𝜌 ∈ftv(𝜏), violating R-Letregion. Without that premise, evaluation could remove 𝜌 and return an address into it.
exercise 50.2.
Initially 𝑀 =Ψ ={} and 𝐶 =∅. A fresh-region step chooses 𝜈, yielding 𝑀(𝜈) ={}, Ψ(𝜈) ={}, and 𝐶 ={𝜈1}. Pair allocation adds a fresh label ℓ with tuple type to Ψ(𝜈), but retains the unique capability. Projection uses the tuple entry and authority for 𝜈. Deallocation consumes {𝜈1} and removes 𝜈 from 𝑀 and Ψ, returning 𝐶 to empty. A later projection cannot establish either the location typing 𝜈.ℓ :𝜏 or capability satisfiability for 𝜈.
exercise 50.4.
Take a well-typed terminating run and its terminal state. Preservation keeps the terminal state well typed. Progress says a terminal expression is 𝗁𝖺𝗅𝗍 𝑣 for a word value 𝑣 :𝗂𝗇𝗍. Cap-Halt requires its current capability equal to ∅. Capability cardinality preservation ensures that equality cannot erase a unique occurrence of a live region. Satisfiability then implies that the memory typing has no live region names. Canonical memory typing says a concrete memory realizing the empty memory typing is itself empty. Hence the terminal state is ({},𝗁𝖺𝗅𝗍 𝑣).
exercise 50.5.
Write the body of 𝑒𝗉𝖺𝗂𝗋𝖥𝗂𝗋𝗌𝗍 as 𝑒, the outer meta-level continuation as 𝑘 =⟨𝑥𝑘;𝑒𝑘⟩, and the body’s result parameter as 𝑥′. The essential target shape is 𝗅𝖾𝗍 𝗇𝖾𝗐𝗋𝗀𝗇 𝜌,𝑥𝜌 𝗂𝗇 𝖢𝖯𝖲(𝑒;⟨𝑥′;𝗅𝖾𝗍 𝖿𝗋𝖾𝖾𝗋𝗀𝗇 𝑥𝜌 𝗂𝗇 𝖺𝗉𝗉𝗅𝗒(𝑘,𝑥′)⟩). Immediately after 𝗇𝖾𝗐𝗋𝗀𝗇, the translation environment’s current capability and bound contain {𝜌1}. The body effect translates to an absorbable capability under that bound. The continuation receives the body’s value while unique 𝜌 is still available, consumes it at 𝖿𝗋𝖾𝖾𝗋𝗀𝗇, and invokes 𝑘 under the old bound. The displayed equation with 𝖢𝖺𝗉𝖮𝖿(𝜓) remains true after deleting the discharged singleton; the fresh-region premise prevents 𝑘’s type or capability from mentioning 𝜌.
exercise 50.6.
L3 allocation returns an existential package containing 𝖢𝖺𝗉 𝜌 𝗂𝗇𝗍 and a duplicable pointer. Its swap step replaces that capability by 𝖢𝖺𝗉 𝜌 (𝗂𝗇𝗍 ×𝗂𝗇𝗍) and returns the old integer; free consumes the repackaged capability and pointer. This is the card that owns strong update. Linear-region allocation extends 𝜓 and returns a linear capability plus unrestricted handle; accesses thread the capability and 𝖿𝗋𝖾𝖾𝗋𝗀𝗇 consumes it, as covered by target safety. Monadic 𝗋𝗎𝗇𝖱𝖦𝖭 pushes an empty region stack, allocates and reads within it, discards it, and returns 7. Its rank-2 result type cannot mention the fresh region, so this card owns lifetime hiding. None of the latter two claims imports L3’s strong-update theorem.