exercise 37.1.
Name reduction may contract the outer redex first: (𝜆𝑥.𝑓𝑥𝑥)𝑅⟼𝑓𝑅𝑅⟼𝑓𝑎𝑅⟼𝑓𝑎𝑎. The first arrow creates the two copies of the unreduced argument. Value reduction must first use 𝑅=(𝜆𝑢.𝑢)𝑎⟼𝑎. Compatibility then gives (𝜆𝑥.𝑓𝑥𝑥)𝑅⟼(𝜆𝑥.𝑓𝑥𝑥)𝑎⟼𝑓𝑎𝑎. Only the second arrow substitutes twice, and it copies the value 𝑎, not the redex 𝑅.
exercise 37.2.
Put 𝐹 =𝜆𝑥.𝑓 𝑥 𝑥. The application clause gives (𝐹𝑅)𝗇=(𝜆𝑦.𝗅𝖾𝗍 !𝑥=𝑦 𝗂𝗇 𝑓𝗇𝑥𝑥)!𝑅𝗇. The principal trace is ⟶Lin−Beta𝗅𝖾𝗍 !𝑥=!𝑅𝗇 𝗂𝗇 𝑓𝗇𝑥𝑥⟶Lin−Bang𝑓𝗇𝑅𝗇𝑅𝗇. The single promotion !𝑅𝗇 licenses exponential elimination; the resulting exponential assumption for 𝑥 licenses both occurrences. No other box is introduced around the argument.
exercise 37.3.
Expansion and the first two administrative target contractions give ((𝜆𝑥.𝑀)𝑁)𝗏⟼∗𝗅𝗂𝗇𝗅𝖾𝗍 !𝑥=𝑁𝗏 𝗂𝗇𝑀𝗏. For an arbitrary 𝑁, the right-hand side need not expose a bang, so Lin-Bang need not apply. If 𝑁 =𝑉, then 𝑉𝗏 =!𝑉+, and the trace continues to 𝑀𝗏[𝑥 :=𝑉+]. Replacing the application argument by !𝑁𝗏 would expose a bang even when 𝑁 is an application; the target could then enter the body before the source value-beta premise was satisfied.
exercise 37.4.
The translation is 𝗅𝖾𝗍 !𝑥=𝑅𝗏 𝗂𝗇 !𝑎. Because 𝑥 is absent from the body, Aff-Weak reduces it to !𝑎. Suppose 𝑅𝗏 uses a linear assumption 𝑟 :𝐶. The redex is typed in context 𝑟 :𝐶, but the reduct !𝑎 uses no 𝑟. The linear target has no weakening rule for 𝑟 :𝐶, so the same-context subject-reduction conclusion is unavailable. Affine weakening derives it, which is why the call-by-need target is not 𝗅𝗂𝗇.
exercise 37.5.
For name erasure, a Lin-Beta/Lin-Bang principal pair maps to one source beta step. A Lin-App or Lin-Assoc step maps to zero source steps: erasure performs the same substitution on both sides. Under call-by-let erasure, Lin-Beta, Lin-Bang, Lin-App, and Lin-Assoc correspond respectively to the source families Let-I, Let-V, Let-C, and Let-A, allowing a short nonempty sequence when the target exposes two principal rules at once. The last two source rules are required because the target can commute an exponential let through application or another let before a value is exposed.
exercise 37.6.
Use the grammar in the proof of theorem 37.6. Variables have themselves as erasure; translated abstractions erase to source abstractions; (𝑆 !𝑇)♭ =𝑆♭𝑇♭; and (𝗅𝖾𝗍 !𝑥=!𝑆 𝗂𝗇𝑇)♭=𝑇♭[𝑥:=𝑆♭]. Structural induction proves (𝑀𝗇)♭ =𝑀. For closure, Lin-Beta creates the fourth grammar form, Lin-Bang removes it, and the two commuting rules only reassociate the third and fourth forms. Case analysis gives one source beta step for the principal pair and reflexivity for each commuting image. Induction on target sequence length yields reflection.
exercise 37.7.
Rule Let-I exposes the operator box with Lin-Bang, contracts the linear application with Lin-Beta, and leaves the translated source let. Rule Let-V is Lin-Bang. Rule Let-C is Lin-Assoc followed by Lin-App; Let-A is Lin-Assoc. Fresh binders are chosen before every trace.
The reachable-value erasure maps a boxed value image to a source value, the administrative operator let to its source application, and a general exponential let to source let. Thus each target rule maps to zero or more call-by-let steps and the erasure is a right inverse. This proves exactness for 𝗅𝖾𝗍. Proposition 5.4 of [MOTW99] is used only after both endpoints are let-free; it converts that call-by-let reduction to call-by-value reduction.