Stage 1 of the 4-stage Phase 3b resolution plan per #235. Implementation green-lit by owner 2026-05-30.
Scope
Ship Phase 3b under the leaf-only restriction: subst_typing_gen_l1_m_tfuneff proves only for ebody containing no nested TFunEff lambdas. The leaf restriction makes inner T_Lam_L1_*_Eff cases discharge via exfalso, sidestepping option (a)'s insufficiency (#235).
Deliverables:
tfuneff_lambda_free : expr -> bool — syntactic Fixpoint in formal/Syntax.v. ~10 lines.
subst_typing_gen_l1_m_tfuneff Qed — in formal/Semantics_L1.v. Direct (P1, P2) hypotheses (no CPS yet — Stage 3 introduces CPS when nested lambdas re-enter scope). Estimated ~300 lines mirroring subst_typing_gen_l1_m_ground_nonlinear (Phase 2).
preservation_l2_app_eff_beta_tfuneff_l1 + L2 wrapper Qed in formal/TypingL2.v. Conditional statement carries two soundness conditions:
tfuneff_lambda_free ebody = true, AND
forall r, In r (regions_introduced_by ebody) -> In r R_in_v.
formal/Counterexample_L2_nested.v — new file mechanising the nested-TFunEff soundness gap (parallel to Counterexample_L2.v which mechanises the fresh-region gap). 3 Qed lemmas (e_before_typed, e_step, e_after_untypable) with a nested-lambda configuration.
_CoqProject — add Counterexample_L2_nested.v after Counterexample_L2.v.
SUBST-LEMMA-GENERALIZATION-DESIGN.md — Phase 3b addendum updated: option (a) restated as Stage-1's tfuneff_lambda_free ∧ regions_introduced_by ⊆ R_in_v; original 3 options retired in favour of the staged plan.
- STATE.a2ml — phase back to
implementation; next_action points at Stage 1 implementation.
What this delivers
The conditional preservation_l2 statement is delivered correctness, not a placeholder. Each soundness condition has a mechanised counterexample (Counterexample_L2.v for fresh-region gap, Counterexample_L2_nested.v for nested-lambda gap). Programs outside the conditional form a precisely-documented soundness class.
What this does NOT deliver
- Inner
T_Lam_L1_*_Eff cases of substitution: deferred to Stage 3 (#TBD2).
- Unconditional preservation_l2: deferred to Stage 4 (#TBD3) alongside compound non-linear (Phase 5).
Owner-directive compliance
- ✅ No
Semantics.v / Typing.v / Counterexample.v (legacy) touch.
- ✅ No new
Axiom or Admitted markers.
- ✅ No closure of residual
Semantics_L1.v admits.
- ✅ Pure NEW infrastructure under
has_type_l1 / has_type_l2.
References
🤖 Generated with Claude Code
Stage 1 of the 4-stage Phase 3b resolution plan per #235. Implementation green-lit by owner 2026-05-30.
Scope
Ship Phase 3b under the leaf-only restriction:
subst_typing_gen_l1_m_tfuneffproves only forebodycontaining no nested TFunEff lambdas. The leaf restriction makes innerT_Lam_L1_*_Effcases discharge viaexfalso, sidestepping option (a)'s insufficiency (#235).Deliverables:
tfuneff_lambda_free : expr -> bool— syntactic Fixpoint informal/Syntax.v. ~10 lines.subst_typing_gen_l1_m_tfuneffQed — informal/Semantics_L1.v. Direct(P1, P2)hypotheses (no CPS yet — Stage 3 introduces CPS when nested lambdas re-enter scope). Estimated ~300 lines mirroringsubst_typing_gen_l1_m_ground_nonlinear(Phase 2).preservation_l2_app_eff_beta_tfuneff_l1+ L2 wrapper Qed informal/TypingL2.v. Conditional statement carries two soundness conditions:tfuneff_lambda_free ebody = true, ANDforall r, In r (regions_introduced_by ebody) -> In r R_in_v.formal/Counterexample_L2_nested.v— new file mechanising the nested-TFunEff soundness gap (parallel toCounterexample_L2.vwhich mechanises the fresh-region gap). 3 Qed lemmas (e_before_typed,e_step,e_after_untypable) with a nested-lambda configuration._CoqProject— addCounterexample_L2_nested.vafterCounterexample_L2.v.SUBST-LEMMA-GENERALIZATION-DESIGN.md— Phase 3b addendum updated: option (a) restated as Stage-1'stfuneff_lambda_free ∧ regions_introduced_by ⊆ R_in_v; original 3 options retired in favour of the staged plan.implementation; next_action points at Stage 1 implementation.What this delivers
The conditional preservation_l2 statement is delivered correctness, not a placeholder. Each soundness condition has a mechanised counterexample (
Counterexample_L2.vfor fresh-region gap,Counterexample_L2_nested.vfor nested-lambda gap). Programs outside the conditional form a precisely-documented soundness class.What this does NOT deliver
T_Lam_L1_*_Effcases of substitution: deferred to Stage 3 (#TBD2).Owner-directive compliance
Semantics.v/Typing.v/Counterexample.v(legacy) touch.AxiomorAdmittedmarkers.Semantics_L1.vadmits.has_type_l1/has_type_l2.References
regions_introduced_byhelper.Counterexample_L2.v) — parallel pattern forCounterexample_L2_nested.v.formal/SUBST-LEMMA-GENERALIZATION-DESIGN.mdPhase 3 + Phase 4c addenda.🤖 Generated with Claude Code