Skip to content

Commit ff1ab29

Browse files
docs(ROADMAP): add Four-layer redesign section per PRESERVATION-DESIGN §12.5 (#259)
## Summary Executes [`formal/PRESERVATION-DESIGN.md` §12.5](../blob/main/formal/PRESERVATION-DESIGN.md) — the ROADMAP rollout. Inserts a new top-level section between the status snapshot and the formal-proof-status section titled **`== Four-layer redesign (2026-05-26 → )`**, structuring the L1/L2/L3/L4 implementation order with a per-layer current status. ### What this provides that the existing file lacked The pre-existing `[#preservation-closure-plan]` section is already correctly labelled "superseded by four-layer redesign", but it only provides *negative* orientation (what was). This new section provides the *positive* organising structure (what is + what's next + per-layer status) the spec asks for. ### Per-layer status snapshot - **L1**: landed (judgment + step relation); 9 admits remain as L2-integration debt. - **L2**: landed (PRs #176 + #177); `linear_to_affine` Qed zero axioms. - **L3**: calculus mechanised (`Echo.v`); typing-rule integration is next-block work. - **L4**: mechanical scaffold landed (`L4.v`); surface syntax not yet wired. ## Companion PRs - #256 — README §12.2 four-layers section - #257 — EXPLAINME §12.3 claims - #258 — vision §12.4 dyad-and-layers ## Test plan - [x] Diff is purely additive (54 insertions, 0 deletions). - [x] GPG-signed commit. - [x] All claims back-cite the proof artefact or design doc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a375986 commit ff1ab29

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

ROADMAP.adoc

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,60 @@ Ephapax is an early-development linear-type language implemented across
1818
IR, two-phase pipeline, Zig FFI, and conformance test suite are
1919
complete. Type checker and WASM code generation are in progress.
2020

21+
== Four-layer redesign (2026-05-26 → )
22+
23+
The verified preservation counterexample
24+
(`formal/Counterexample.v`, three `Qed` lemmas) closed the original
25+
preservation closure plan as unreachable in the legacy single-layer
26+
typing judgment. The new plan separates four orthogonal layers; each
27+
is implemented in sequence and preservation is *re-derived per
28+
layer* from explicit invariants.
29+
30+
. *L1 — Region capability threading*
31+
+
32+
- Restate the typing judgment to thread `R_in / R_out` (the
33+
region-capability environment) through every compound rule.
34+
- Land in `formal/TypingL1.v` + `formal/Semantics_L1.v` against
35+
`Counterexample.v` as a regression oracle.
36+
- Status: judgment landed, `m`-indexed post-L2-hybrid; 9 L1
37+
supporting-lemma admits remain as L2-integration debt.
38+
39+
. *L2 — Modality parameter*
40+
+
41+
- Promote the per-type `is_linear_ty` predicate to a judgment
42+
parameter `m : Modality`.
43+
- Mechanise `linear_to_affine : Linear ≤ Affine` as a single
44+
induction.
45+
- Status: landed in-place via PRs #176 + #177; `linear_to_affine`
46+
Qed with zero axioms.
47+
48+
. *L3 — Echo residue*
49+
+
50+
- `formal/Echo.v` mirrors `echo-types/proofs/agda/Echo.agda`. The
51+
L3 calculus (modes, `LEcho`, `weaken`, `degrade_mode`) is
52+
mechanised locally.
53+
- Next: introduce `TEcho ⟨op⟩` + the `T_Observe` rule into the
54+
typing judgment; modify `S_Region_Exit` and `S_Drop` to produce
55+
residue values.
56+
- Status: K-free scaffold landed via #166/#167/#173; typing-rule
57+
integration is the next-block work.
58+
59+
. *L4 — Mode declaration*
60+
+
61+
- Project-level metadata (`Cargo.toml` or `ephapax.toml`). Type
62+
checker reads the declaration and selects the L2 modality.
63+
- No proof obligations of its own — see `formal/L4-DYADIC.md`.
64+
- Status: mechanical scaffold landed in `formal/L4.v`
65+
(`ProgramMode` + `program_mode_to_modality`); surface syntax
66+
not yet wired into the parser.
67+
68+
The previous *Preservation closure plan* section is **archived** —
69+
see `formal/PRESERVATION-HANDOFF.md` for the historical record. PRs
70+
#92 / #102 / #104 / #106 / #114 / #116 / #117 / #121 / #146 are
71+
pre-discovery; treat them as archaeology, not instructions.
72+
73+
Canonical design source: `formal/PRESERVATION-DESIGN.md`.
74+
2175
== Formal-proof status
2276

2377
=== Coq (`formal/`)

0 commit comments

Comments
 (0)