Exercise 33.1.
Replacement gives [{𝗐𝗋𝗂𝗍𝖾}](𝐹) ={𝗐𝗋𝗂𝗍𝖾}. Extension gives ⟨𝗐𝗋𝗂𝗍𝖾⟩(𝐹) ={𝗐𝗋𝗂𝗍𝖾,𝗋𝖾𝖺𝖽}. Composition is left to right, so ([{𝗐𝗋𝗂𝗍𝖾}] ∘⟨𝗋𝖾𝖺𝖽⟩)(𝐹) ={𝗋𝖾𝖺𝖽,𝗐𝗋𝗂𝗍𝖾}. The latter two retain 𝗋𝖾𝖺𝖽; absolute replacement alone does not.
Exercise 33.2.
Progress may classify 𝐾[𝖽𝗈 ℓ 𝑈] as normal at ∅, because its definition asks only for ℓ ⪯𝖾∅. The usual empty-effect corollary can no longer remove that alternative, so the term can be stuck on an unhandled request. This countermodel attacks the corollary from progress; it does not contradict the separately stated preservation conclusion.
Exercise 33.3.
Left-to-right composition gives [𝐸] ∘⟨ℓ⟩ =[ℓ,𝐸]. The return variable has type ◻[ℓ,𝐸]𝐴; the resumption has type ◻[𝐸](𝐵′ →𝐵). The handler rule additionally requires [𝐸] ⇒𝗂𝖽@𝐹 and [𝐸] ⇒([𝐸] ∘[𝐸])@𝐹. Since [𝐸] ∘[𝐸] =[𝐸], both obligations reduce to the absolute-modality transformation premises at 𝐹.
Exercise 33.4.
The source function translates to 𝗆𝗈𝖽[ℓ,𝐸](𝜆𝑥⟨⟨𝐴⟩⟩𝗋.𝖽𝗈ℓ𝑥):◻[ℓ,𝐸](⟨⟨𝐴⟩⟩𝗋→⟨⟨𝐵⟩⟩𝗋). Its application to 𝑉 is 𝗅𝖾𝗍𝗆𝗈𝖽[ℓ,𝐸]𝑓=⟨⟨𝜆ℓ,𝐸𝑥.𝑀⟩⟩𝗋𝗂𝗇𝑓⟨⟨𝑉⟩⟩𝗋. The absolute box runs the body at exactly ℓ,𝐸. Replacing it by ⟨ℓ⟩ would retain every ambient effect, so it would not encode the source arrow’s exact row.
Exercise 33.5.
Writing 𝑇 =1 ⇒1, the translated block begins Λ̂𝑓.𝗆𝗈𝖽⟨̂𝑓⟩(𝜆𝑥1.𝜆𝑓◻[̂𝑓]⟨⟨𝑇⟩⟩𝖼.𝗅𝖾𝗍𝗆𝗈𝖽[̂𝑓]̃𝑓=𝑓𝗂𝗇̃𝑓𝑥). Thus the formal capability becomes an effect variable, the block body is boxed by an extension modality, its block argument is boxed absolutely at that effect variable, and elimination records the same absolute modality on the hatted callable variable.
Exercise 33.6.
Typing uses the binding freshness convention when M-Local extends the local signature: ℓ𝑓 must avoid the translated context so that substituting it for ̂𝑓 captures no pre-existing label. This is alpha-freshness of the local binder, not an extra side condition on the rule. Operational preservation uses freshness when the generated runtime instance context extends with one new label and when substitution identifies the tracked effect variable with that unique label. Reusing an active label aliases two dynamic instances; the instance-context extension and local-label case would then lose their inversion premise even if the signatures agree.
Exercise 33.7.
Write 𝐻r =𝗁𝖺𝗇𝖽𝗅𝖾𝗋{𝖺𝗌𝗄 𝑝 𝑟 ↦𝗋𝖾𝗍𝗎𝗋𝗇 𝑝}. Its row translation is ⟨⟨𝐻r⟩⟩𝗋=𝗆𝗈𝖽[∅](𝜆𝑡.𝗁𝖺𝗇𝖽𝗅𝖾[∅](𝗅𝖾𝗍𝗆𝗈𝖽[𝖺𝗌𝗄]𝑡′=𝑡𝗂𝗇𝑡′())𝗐𝗂𝗍𝗁{𝗋𝖾𝗍𝗎𝗋𝗇𝑥↦𝗅𝖾𝗍𝗆𝗈𝖽[𝖺𝗌𝗄]𝑥′=𝑥𝗂𝗇𝑥′,𝖺𝗌𝗄𝑝𝑟↦𝑝}). The handled thunk has type ◻[𝖺𝗌𝗄](1 →1); its absolute box is the source row. The row proof uses that Rsc retains duplicate labels while commuting adjacent distinct labels, so the handler case removes the selected occurrence without contracting the residual row.
For the System-𝐶 term, let 𝐺 translate the body after abstracting the tracked block: 𝐺=Λ̂𝑓.𝗆𝗈𝖽⟨̂𝑓⟩(𝜆𝑓◻[̂𝑓]◻⟨⟩(1→1).𝗅𝖾𝗍𝗆𝗈𝖽[̂𝑓]̃𝑓=𝑓𝗂𝗇𝗅𝖾𝗍𝗆𝗈𝖽⟨⟩𝑘=̃𝑓𝗂𝗇𝑘()). Its handler translation has the modal skeleton 𝗅𝗈𝖼𝖺𝗅ℓ𝑓:1⇝1𝗂𝗇𝗅𝖾𝗍𝗆𝗈𝖽⟨ℓ𝑓⟩𝑔=𝐺ℓ𝑓𝗂𝗇𝗁𝖺𝗇𝖽𝗅𝖾[∅](𝑔(𝗆𝗈𝖽[ℓ𝑓](𝗆𝗈𝖽⟨⟩(𝜆𝑥1.𝖽𝗈ℓ𝑓𝑥))))𝗐𝗂𝗍𝗁{𝗋𝖾𝗍𝗎𝗋𝗇𝑥↦𝗅𝖾𝗍𝗆𝗈𝖽[ℓ𝑓]𝑥′=𝑥𝗂𝗇𝑥′,ℓ𝑓𝑝𝑟↦𝑝}. Here ̂𝑓, ⟨̂𝑓⟩, [ℓ𝑓], and ℓ𝑓 are respectively the quantified effect variable, extension modality, absolute box on the operation implementation, and fresh runtime label. The capability proof uses freshness of ℓ𝑓 and simultaneous preservation for blocks and computations; neither premise is supplied by the row proof. Both source terms return unit after one handled request, but their target terms are related only by this chosen observation, not by a proved source equivalence.
Exercise 33.8.
The proved span is 𝐹𝜀⟶𝖬𝖾𝗍[Rsc],𝐶⟶𝖬𝖾𝗍[S]. The first domain has duplicate-preserving rows and first-class functions; the second has sets and second-class blocks. Their steps also use different runtime configurations. A source-to-source compiler would require an explicit term and type translation plus a relation between observations and a forward simulation (or another operational-correctness argument). Neither target translation supplies an inverse with which to manufacture these data.
Exercise 33.9.
Introduction checks the identity function under 𝗅𝗈𝖼𝗄([𝐸]𝐹) at 𝐸, yielding 𝗆𝗈𝖽[𝐸](𝜆𝑥.𝑥) :◻[𝐸](𝐴 →𝐴)@𝐹. Elimination with outer modality 𝗂𝖽 binds ℎ :[𝐸]𝐹(𝐴 →𝐴). Using ℎ after no further lock requires [𝐸] ⇒𝗂𝖽@𝐹. If ℎ instead has a type of pure kind, M-Aux-Abs discharges the auxiliary premise of M-Var without a modality transformation.
Exercise 33.10.
For application, the induction hypotheses type the function at ◻[𝐸](𝐴 →𝐵) and the argument at 𝐴. Rule M-LetMod eliminates the box, after which ordinary application yields 𝐵@𝐸.
For the handler, the translated thunk has ◻[ℓ,𝐸](1 →𝐴), its returned value has ◻[ℓ,𝐸]𝐴, and its resumption has ◻[𝐸](𝐵′ →𝐴), matching the translation of the source continuation arrow. A source handled-request step substitutes the parameter and rehandled continuation. The target first performs modal beta, then the Met operation step, and finally modal beta in the translated clause; the resulting term is the translation of the source reduct. This is a nonempty finite sequence, as required by the ⟶∗ conclusion.
Exercise 33.11.
The simultaneous hypotheses translate values, blocks, and computations. In the block case, introduce one effect variable ̂𝑓𝑗 per formal block, box the function under ⟨¯̂𝑓⟩, and eliminate each formal’s [̂𝑓𝑗] box before applying the computation hypothesis. In the call case, if actual 𝑄𝑗 has capability set 𝐶𝑗, instantiate ̂𝑓𝑗 :=⟨⟨𝐶𝑗⟩⟩𝖼. The target result type is then ⟨⟨𝐵⟩⟩𝖼[⟨⟨𝐶𝑗⟩⟩𝖼/̂𝑓𝑗], equal by the translation-substitution lemma to ⟨⟨𝐵[𝐶𝑗/𝑓𝑗]⟩⟩𝖼. Eliminating the relative box places the call at the union of the callee and actual capability effects.
Exercise 33.12.
Theorem 33.2 plus the first validity condition proves the claim.
No theorem proves it. The two translations form a span, and neither has a proved inverse.
The claim fails because the METL artifact implements neither source translation; an implementation may pass its own examples while a proposed System-𝐶 encoder mishandles a block call.
The claim fails because effect safety constrains stuck requests. Ownership noninterference constrains observations. Two safe programs may write different public values.