Commit 1ee577d
feat(L1): Phase D slice 4 Phase 1 —
Phase 1 of the non-linear substitution-lemma generalisation per
`formal/SUBST-LEMMA-GENERALIZATION-DESIGN.md` §"Phase 1".
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`), recognising `TBase TUnit` / `TBase TBool` / `TBase TI32`.
- `ground_nonlinear_retype_l1_m` in `formal/Semantics_L1.v` (after
`loc_retype_at_R_l1_m`):
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; in EUnit/EBool/EI32 cases
inverts the typing derivation (uniquely produced by
T_Unit_L1/T_Bool_L1/T_I32_L1, each R-polymorphic) and re-applies the
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.
Phase 1 unblocks Phase 2 — the parallel substitution lemma
`subst_typing_gen_l1_m_ground_nonlinear` that the
`T_App_L2_Eff` β-case of `preservation_l2` needs for non-linear `T1`
in `TFunEff T1 T2 R_in R_out` lambdas.
Build oracle: coqc 8.18.0 clean across all 10 .v files (clean rebuild).
Zero new admits/axioms. `Semantics.v`/`Typing.v`/`Counterexample.v`
untouched.
STATE.a2ml `next_action` shifts to Phase 2 design (sibling lemma rather
than case-split into existing `subst_typing_gen_l1_m` — preserves the
~30 Qed downstreams).
Refs hyperpolymath/standards#134 (sub-issue of hyperpolymath/standards#124).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ground_nonlinear_retype_l1_m for TBase TUnit/TBool/TI321 parent d93151b commit 1ee577d
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