Commit e3d8651
feat(L1): Phase D slice 4 Phase 1 —
## Summary
Phase 1 of the non-linear substitution-lemma generalisation per
[`formal/SUBST-LEMMA-GENERALIZATION-DESIGN.md`](https://github.com/hyperpolymath/ephapax/blob/main/formal/SUBST-LEMMA-GENERALIZATION-DESIGN.md)
§"Phase 1" (design doc landed in #213).
Adds NEW infrastructure to L1, **orthogonal to legacy preservation** in
`Semantics.v` (that theorem remains correctly `Admitted` — provably
false per `Counterexample.v`, per owner directive 2026-05-27):
- `is_ground_nonlinear_ty : ty -> bool` in `formal/Syntax.v` (after
`is_linear_ty`).
- `ground_nonlinear_retype_l1_m` in `formal/Semantics_L1.v` (after
`loc_retype_at_R_l1_m`):
```coq
forall m R R' G v T,
is_value v ->
is_ground_nonlinear_ty T = true ->
has_type_l1 m R G v T R G ->
has_type_l1 m R' G v T R' G.
```
Proof destructs on the `is_value v` witness; EUnit/EBool/EI32 cases
invert + re-apply the corresponding R-polymorphic ground constructor at
R'; non-ground value cases (ELam/EPair/EInl/EInr/ELoc/EBorrow/EEcho)
discriminate `Hgrd` against the non-ground codomain type every
typing-rule inversion produces.
## Why this matters
The `T_App_L2_Eff` β-case of `preservation_l2` is blocked at non-linear
`T1` (in `TFunEff T1 T2 R_in R_out` lambdas) because
`subst_typing_gen_l1_m`'s `is_linear_ty T1 = true` precondition can't
fire for non-linear ground types (`TBase TUnit` / `TBase TBool` / `TBase
TI32`). Phase 1 ships the ground-non-linear retype primitive that Phase
2's parallel substitution lemma will use in place of
`loc_retype_at_R_l1_m` for R-shift retypes.
## Owner-directive compliance
Per `CLAUDE.md` 2026-05-27 (escalated again in #213 design doc
§"Owner-directive compliance check"):
- Does NOT close `Theorem preservation` in `Semantics.v`.
- Does NOT extend `Semantics.v` / `Typing.v` / `Counterexample.v` (all
untouched in diff).
- Does NOT close residual `Semantics_L1.v` admits via this work —
strictly NEW infrastructure orthogonal to legacy.
- Adds no new `Axiom` or `Admitted` declarations.
- Follows post-2026-05-26 four-layer redesign per
`PRESERVATION-DESIGN.md`.
## Test plan
- [x] `just clean && just all` in `formal/` — clean rebuild of all 10
`.v` files (coqc 8.18.0).
- [x] Zero new admits/axioms (proof is `Qed`).
- [x] `Semantics.v`/`Typing.v`/`Counterexample.v` untouched.
- [x] GPG-signed commit.
- [x] STATE.a2ml `next_action` shifted to Phase 2 design.
## Refs
Refs hyperpolymath/standards#134 (sub-issue of
hyperpolymath/standards#124 estate proof-debt epic). Follows #213
(design doc). Phase 2 (parallel substitution lemma) is the next slice.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ground_nonlinear_retype_l1_m for TBase TUnit/TBool/TI32 (#219)1 parent d93151b commit e3d8651
3 files changed
Lines changed: 60 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1177 | 1177 | | |
1178 | 1178 | | |
1179 | 1179 | | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1180 | 1220 | | |
1181 | 1221 | | |
1182 | 1222 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
458 | 475 | | |
459 | 476 | | |
460 | 477 | | |
| |||
0 commit comments