Commit c8e1f2f
## Summary
Phase D slice 4 Phase 3b — design-gap finding (#235) **+ 4-stage staged
resolution plan** owner-approved 2026-05-30 PM. Stages tracked at #239 /
#240 / #241 / #242.
No `formal/*.v` changes. No CI changes (the parallel-session PR #236
owns the Coq EACCES fix).
## 4-stage staged resolution plan
The original three-option framing in #235 is **superseded** by a staged
plan that captures all three "Interesting" values without committing to
any single option's downsides.
| Stage | Issue | Scope | Captures value of |
|---|---|---|---|
| **Stage 1 — IMMEDIATE** | #239 | Leaf-only Phase 3b via
`tfuneff_lambda_free` + `Counterexample_L2_nested.v` + 2-condition
`preservation_l2`. | Option (3) — principled deferral, honest
2-condition statement. |
| **Stage 2 — parallel L4 track** | #240 | `ELam T_param R_in R_out
body` annotation extension. AST + typing rule + cascading. | Option (1)
— L4 "type-level → program-level commitments". |
| **Stage 3 — post-Stage-2** | #241 | Relaxed Phase 3b via
`declared_lambda_r_ins ⊆ R_in_v` + CPS v-typing argument.
Nested-condition collapses. | Option (2) — higher-order proof style
enters codebase. |
| **Stage 4 — Phase 5** | #242 | Compound non-linear +
region-substitution machinery + **unconditional** `preservation_l2`. |
The final destination. |
### Why staging beats single-option commitments
- **(1) alone**: forces AST migration before unblocking preservation_l2.
- **(2) alone**: introduces inductive-over-derivations predicate with no
other use in the codebase.
- **(3) alone**: ends with conditional preservation_l2 forever (no path
to unconditional).
The staged plan: (3) ships today's value at Stage 1, (1) lands L4's
value at L4's timeline (Stage 2), (2)'s value is harvested at exactly
the point CPS is necessary not over-engineered (Stage 3), (4) reaches
unconditional preservation_l2 as the natural sum.
### Stage 1's correctness is delivered, not provisional
Each of the 2 conditions on Stage 1's `preservation_l2` has a
**mechanised counterexample**:
- `Counterexample_L2.v` (already on main, PR #234) — fresh-region gap.
- `Counterexample_L2_nested.v` (new in Stage 1) — nested-lambda gap.
Programs outside the conditional form a precisely-documented soundness
class.
### Sequencing
- Stage 1 green-lit (#239). Implementation ships next session.
- Stages 2-4 tracked but NOT actioned this session.
- Stage 3 blocked on Stage 2; Stage 4 blocked on Stage 3; Stage 2
independent of Stage 1.
## Changes
- `formal/SUBST-LEMMA-GENERALIZATION-DESIGN.md` — Phase 3b addendum (gap
finding + 3-options framing) **+ Phase 3b resolution addendum (4-stage
staged plan)**.
- `.machine_readable/6a2/STATE.a2ml` — phase = `implementation`;
next_action = Stage 1 (#239) implementation.
No `formal/*.v` changes; Coqc 8.18.0 unaffected.
## Predecessor PRs
- Phase 4a (#228) MERGED — `preservation_l2_app_eff_beta_linear`.
- Phase 4b (#233) MERGED —
`preservation_l2_app_eff_beta_ground_nonlinear_l1`.
- Phase 4c (#234) MERGED — `Counterexample_L2.v` 3-Qed soundness-gap
witness.
## Owner-directive compliance (across all 4 stages)
- ✅ No `Semantics.v` / `Typing.v` / `Counterexample.v` (legacy) touch.
- ✅ No new `Axiom` / `Admitted` markers.
- ✅ No closure of residual `Semantics_L1.v` admits — strictly NEW
infrastructure under the four-layer redesign.
- ✅ Per-layer derivation: preservation_l2 closes via L2 infra; legacy
preservation remains Admitted (PROVABLY FALSE) per 2026-05-27 directive.
## Test plan
- [ ] CI green (no code changes; Coq oracle should pass unchanged —
pending PR #236's EACCES fix landing).
- [ ] Issues #235 / #239 / #240 / #241 / #242 cross-referenced.
Refs: #225 (Phase 3b parking lot), #230 (`regions_introduced_by`), #233
(Phase 4b), #234 (Phase 4c), #235 (parent finding), #236 (parallel Coq
EACCES fix), #239 (Stage 1), #240 (Stage 2), #241 (Stage 3), #242 (Stage
4).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 7068cc3 commit c8e1f2f
2 files changed
Lines changed: 58 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
145 | 201 | | |
146 | 202 | | |
147 | 203 | | |
| |||
0 commit comments