You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
proof: Swarm A+B+C closures land — at-pre helpers Qed, 10 preservation LEFT branches closed
Brings together three pieces of the 2026-05-26 Lemma B campaign:
1. `step_preserves_type_at_pre` (Swarm A) — 5 remaining per-goal cases
closed via explicit `1: {...}` blocks (S_StringConcat_Step2,
S_App_Step2, S_Snd atomic, S_Case_Step, S_Copy). Now Qed.
2. `step_output_context_eq_at_pre` (Swarm B) — 11 remaining per-goal
cases closed. Now Qed.
3. `preservation` — Swarm C oracle splice closes the LEFT (R = R')
branch of every congruence case via `step_output_context_eq` (Qed):
`assert Gmid = Gout by (eapply step_output_context_eq; …); subst`
unifies the IH's existential output context with the sibling
typing's input. `S_StringLen_Step` closes ENTIRELY as vacuous
(`EBorrow`'s inner is `EVar` or a value — neither steps — pattern
lifted from `S_Borrow_Step`). `S_StringConcat_Step1` collapsed from
3-way `step_R_change_shape` to 2-way `step_R_eq_or_touches_region`
for consistency with the other 10 S_*_Step blocks; the MIDDLE
(push) closure is folded into the touches_region RIGHT and will be
re-distinguished by the C-lemma's structural recursion.
Net: preservation drops from 12 → 11 admits. The remaining 11 are:
- 10 touches_region RIGHT sub-cases (`HTR : touches_region` in
scope), each blocked on region-env weakening for non-values
(= Brief C, structural follow-up).
- 1 `S_Region_Step` cross-case `T_Region_Active × T_Region` at
`r = r1` ("inner step exits outer region from inside") — same
shape inside `step_preserves_type_at_pre`'s original obstacle, now
cleanly characterised in PRESERVATION-HANDOFF.md.
Verified with `coqc 8.18.0` on a clean rebuild.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: formal/PRESERVATION-HANDOFF.md
+103Lines changed: 103 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ open and what the canonical closure path is.
26
26
| 2026-05-24 (late) | Lemma B 31/35 closed | Cluster A (β-reduction, 7) **FULLY CLOSED** via `subst_preserves_typing_strong` + `output_ctx_det`. Cluster C (region/compound-value, 6) **FULLY CLOSED** via inversion + `value_context_unchanged`. Cluster B (congruence) 9 of 18 closed via R-shape dispatch. |
27
27
| 2026-05-26 |**1 + 1 + 12**| Empirical `coqc 8.18.0` re-verification: 1 admit in `step_preserves_type` (Semantics.v:4885), 1 admit in `step_output_context_eq` (Semantics.v:5963), 12 cascading goals in `preservation`. The two upstream admits are the SAME structural sub-case — S_Region_Step's `r = r1` "exited from inside" — mirrored across both lemmas. |
28
28
| 2026-05-26 (eve) |**0 + 0 + 12** (Qed × 2) |**Path 3 (at-pre helper) lands.** Both upstream lemmas are now `Qed`. Introduced two NEW helper lemmas (`step_preserves_type_at_pre` and `step_output_context_eq_at_pre`) whose typings are at the SHARED pre-step env R. The S_Region_Step cross-case `T_Region_Active × T_Region` collapses to a contradiction (In r R vs ~In r R at same env) — sidestepping the original obstacle. Plug-in via `region_env_perm_typing` + `remove_first_then_cons_membership_eq` (existing, Qed). The 12 cascading goals in `preservation` remain — they're a SEPARATE structural problem, not the shared admit. |
29
+
| 2026-05-26 (late eve) |**Qed × 4 + 11**|**Swarm A + B + C complete.**`step_preserves_type_at_pre` and `step_output_context_eq_at_pre` are now Qed (Swarm A + B per-goal closures landed). Swarm C oracle splice closes all 10 congruence LEFT branches in `preservation` via `step_output_context_eq` (Qed) — `assert Gmid = Gout by (eapply step_output_context_eq; …); subst` unifies the IH's existential output context with the sibling's Gmid. `S_StringLen_Step` closes ENTIRELY as vacuous (`EBorrow`'s inner is `EVar` or value, neither steps — pattern lifted from `S_Borrow_Step` elsewhere in this proof). 11 admits remain in `preservation`: 10 RIGHT-only sub-cases (`HTR : touches_region` in scope) + 1 `S_Region_Step` (special). All 10 RIGHT cases share the same shape and block on the same region-env weakening lemma for non-values (= Brief C, structural follow-up). |
29
30
30
31
> **Path 3 (landed 2026-05-26 eve):** The Option 2 plan (structural
31
32
> recursion deriving `expr_free_of_region`) was **blocked** by the
@@ -503,6 +504,108 @@ proves. If the inductive structure of Lemma B turns out to need
503
504
preservation as a sub-lemma, the closure path needs revision.
504
505
Watch for this when attacking the first Cluster B case.
505
506
507
+
## Open: region-env weakening for non-values (2026-05-26)
508
+
509
+
After `step_preserves_type` and `step_output_context_eq` reached Qed
510
+
(via the at-pre helper pattern, Path 3 above), preservation's 12
511
+
remaining admits split into two flavours:
512
+
513
+
| Sub-case | Count | Blocker |
514
+
|----------|------:|---------|
515
+
| Congruence RIGHT (touches_region) | 11 | r-shrunk env, sibling might reference r |
0 commit comments