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
docs: canonicalise the preservation closure plan in ROADMAP (#117)
After PR #116 brought preservation to 12 open goals (from 910 at session
start), this PR sets the 5-phase closure plan as the canonical path in
ROADMAP.adoc. Any session picking up the proof work follows this.
## Plan summary
Full detail in ROADMAP §"Preservation closure plan". 5 phases:
1. **Lemma B** (linearity-context invariance for siblings) — ~3-4h
2. **Apply Lemma B** → close 11 congruence cases — ~2h, parallelizable
3. **Region-env weakening lemma** for non-values — 1-2 days
4. **Apply Phase 3** → close S_Region_Step — ~1h
5. **`Admitted.` → `Qed.`** + docs sweep — ~1h
Total: 3 sessions / ~10 hours wall-clock with fan-out.
## Other docs updated
- `PROOF-NEEDS.md` — points at ROADMAP plan + lists 5 phases
- `formal/PRESERVATION-HANDOFF.md` — header redirects to ROADMAP;
state-at-a-glance extended through 2026-05-21
No proof changes. Phase 1 commences in a follow-up PR on top of this.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: PROOF-NEEDS.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,22 @@
7
7
-`src/formal/Ephapax/Formal/RegionLinear.idr` — Idris2 region-based linearity proof (explicitly states "REAL proof — not believe_me, not assert_total")
8
8
- 17 Idris2 files across formal verification layer
9
9
- No `believe_me`, `sorry`, or `assert_total` in Idris2 source code
10
-
- Coq admitted proofs remaining in `formal/Semantics.v`: 1 (`preservation`)
10
+
- Coq admitted proofs remaining in `formal/Semantics.v`: 1 (`preservation` — 12 open goals, plan below)
11
11
12
12
## What needs proving
13
-
-**`preservation`**: Close the remaining ~29 open goals in the proof script at `formal/Semantics.v` L3215–L3339 so the `Qed` lands and the file builds without `Admitted.` Down from 910 open goals (full 35×26 cross-case combinatorial) after introducing the standard preservation pattern (`remember (mu, R, e) as cfg eqn:Hcfg` + symmetric for cfg', then `inversion Hcfg; subst; inversion Hcfg'; subst;` inside each case). The remaining 29 are real diagonal cases — see `formal/PRESERVATION-HANDOFF.md` for the per-case checklist. Supporting lemmas already Qed (`subst_preserves_typing`, `region_env_perm_typing`, `region_add_typing`, `region_shrink_preserves_typing`, `values_dont_step`). The S_Region_Step + T_Region_Active case still blocks on a region-env *weakening* lemma for non-values, which does not yet exist. An earlier ~40-goal diagnostic (PR #104) measured the PRE-`remember-cfg`-pattern state and is superseded.
13
+
-**`preservation`**: Close the remaining **12 open goals** in `formal/Semantics.v` so the `Qed` lands. Down from 910 at session start (98.7% reduction). Reduction story: 910 → 29 via remember-cfg (PR #102) → 22 via universal-IH revert (PR #106) → 12 via per-case manual closures (PR #116). The remaining 12 are 11 congruence cases (`S_*_Step` variants) + 1 region case (`S_Region_Step + T_Region_Active`).
Total: 3 sessions / ~10 hours wall-clock with fan-out. See ROADMAP for full effort estimates and risk-adjusted forecast.
24
+
25
+
Supporting lemmas already Qed: `subst_preserves_typing`, `region_env_perm_typing`, `region_add_typing`, `region_shrink_preserves_typing`, `values_dont_step`, and **`step_R_eq_or_touches_region`** (PR #114, the region-invariance lemma used by the per-case closures and required by Phase 2).
14
26
-**Linear type consumption**: Prove resources with linear types are consumed exactly once across all execution paths (region boundaries, exception handlers)
15
27
-**Effect system soundness**: Prove the effect type system correctly tracks side effects and that effect-free terms are truly pure
16
28
-**Region safety**: Prove that region-based memory management prevents use-after-free and dangling references across region boundaries
Copy file name to clipboardExpand all lines: formal/PRESERVATION-HANDOFF.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,26 @@
2
2
3
3
# Hand-off: closing `preservation` in `formal/Semantics.v`
4
4
5
-
Diagnostic + remediation log. The proof is still `Admitted.`, but as of
6
-
2026-05-20 it's **down from 910 open goals to ~29 real ones** via the
7
-
standard preservation pattern. This file tells whoever picks it up
8
-
next exactly what's open and why.
5
+
Diagnostic + remediation log. The proof is still `Admitted.`, but as
6
+
of **2026-05-21** it's **down from 910 open goals to 12** via four
7
+
landed PRs. This file tells whoever picks it up next exactly what's
8
+
open and what the canonical closure path is.
9
+
10
+
> **The canonical closure plan is now in `ROADMAP.adoc` §
11
+
> "Preservation closure plan".** This file remains as the per-case
12
+
> diagnostic record. Read ROADMAP first; come back here for case
13
+
> detail.
9
14
10
15
## State at a glance
11
16
12
17
| Date | Open goals | Notes |
13
18
|------|-----------:|-------|
14
19
| 2026-04-27 | "fully closed" | In-file comment — but `coqc` rejected the `Qed.`. The claim was unsubstantiated; the proof never closed. |
15
20
| 2026-05-20 (am) | 910 | Discovered via `Show. Show Existentials.` before the `Admitted.`. Exactly 35 (step rules) × 26 (typing rules). The existing `try solve [...]` chain closes ZERO. |
16
-
| 2026-05-20 (pm) |**29**| After the standard preservation pattern (`remember (mu, R, e) as cfg` + symmetric for cfg', then `inversion Hcfg; subst; inversion Hcfg'; subst;` inside each case). 97% reduction. |
21
+
| 2026-05-20 (pm) | 29 | After the standard preservation pattern (`remember (mu, R, e) as cfg` + symmetric for cfg', then `inversion Hcfg; subst; inversion Hcfg'; subst;` inside each case). 97% reduction. PR #102. |
22
+
| 2026-05-20 (eve) | 22 | After `revert mu R e mu' R' e' Hcfg Hcfg'` before `induction Hstep` so each case's IH carries universal quantification over the inner step's config. PR #106. |
23
+
| 2026-05-20 (eve) | 22 | Region-invariance lemma `step_R_eq_or_touches_region` landed as infrastructure (no goal closures). PR #114. |
24
+
| 2026-05-20 (night) |**12**| 10 β-reduction / value-step cases discharged via per-case manual proofs using the lemma. PR #116. **98.7% reduction across one day.**|
0 commit comments