Commit 91de8eb
feat(L2): Phase D slice 4 Phase 4b — preservation_l2 β for ground-non-linear T1 (#233)
## Summary
Phase 4 continuation following PR #228's Phase 4a (linear T1). Closes
the \`T_App_L2_Eff\` β-case (\`S_App_Fun\` step) for ground-non-linear
T1 ∈ { \`TBase TUnit\`, \`TBase TBool\`, \`TBase TI32\` } via Phase 2's
\`subst_typing_gen_l1_m_ground_nonlinear\` (PR #220).
Two lemmas, mirroring #228's Linear pattern:
- **\`preservation_l2_app_eff_beta_ground_nonlinear_l1\`** — L1-level
kernel. Inversion on the lambda forces \`T_Lam_L1_*_Eff\` (TFun cases
discriminate); \`value_R_G_preserving_l1\` on the argument collapses
\`R_in\` / \`G''\` to \`R\` / \`G\`. The Linear case discharges the
\`|=L1\` (Linear) \`Hv_type\` premise directly with \`Harg\`; the Affine
case bridges via \`ground_nonlinear_retype_l1_m\` (cross-modality, same
R) since Phase 2's premise uses the Linear-only \`|=L1\` shorthand.
- **\`preservation_l2_app_eff_beta_ground_nonlinear\`** — L2 wrapper.
Inverts both \`has_type_l2\` hypotheses through \`L2_lift_l1\`
(\`T_App_L2_Eff\` discriminates: lambda's head is \`ELam\` not \`EApp\`;
argument is a value). Defers to the L1 kernel and re-lifts via
\`L2_lift_l1\`.
Combined with PR #228's Phase 4a, this closes \`T_App_L2_Eff\` β for T1
∈ { **linear**, **ground-non-linear** }. Remaining open:
- **Phase 4c** (\`TFunEff T1\`) — blocked on Phase 3b, [issue
#225](#225).
- **Phase 4d** (compound: \`EPair\` / \`EInl\` / \`EInr\` / \`EEcho\`
with non-linear sub-components) — deferred to Phase 5 per
\`SUBST-LEMMA-GENERALIZATION-DESIGN.md\`.
## Build + assumption audit
\`\`\`
$ cd /tmp/ephapax-phase-4b/formal && just all
coq_makefile -f _CoqProject -o build.mk
make -f build.mk
COQDEP VFILES
COQC TypingL2.v
COQC L4.v
(exit 0)
\`\`\`
- Rocq 9.1.1 / Coq 8.18 clean rebuild across all 10 .v files.
- Zero new admits, zero new axioms.
- \`Print Assumptions preservation_l2_app_eff_beta_ground_nonlinear\`
shows only pre-existing axioms inherited transitively via
\`subst_typing_gen_l1_m_ground_nonlinear\` (PR #220's audit closed that
lemma under the global context).
## Net delta
- \`formal/TypingL2.v\`: +83 lines (one L1 kernel lemma + one L2 wrapper
lemma + ~30 line docstring).
- No other files touched.
## Owner-directive compliance (CLAUDE.md 2026-05-27)
- ✅ Does NOT close \`Theorem preservation\` in \`formal/Semantics.v\`.
- ✅ Does NOT extend \`Semantics.v\` / \`Typing.v\` /
\`Counterexample.v\`.
- ✅ Does NOT close any residual \`Semantics_L1.v\` admit (purely new
infrastructure).
- ✅ Works per-layer: L1 kernel + L2 wrapper, both at the post-redesign
m-indexed \`has_type_l1\` judgment.
- ✅ Reads \`PRESERVATION-DESIGN.md\` /
\`SUBST-LEMMA-GENERALIZATION-DESIGN.md\` first.
- ✅ No new \`Axiom\` or \`Admitted\` markers.
## Refs
- PR #220 — Phase 2 (\`subst_typing_gen_l1_m_ground_nonlinear\`)
- PR #228 — Phase 4a (linear T1 sibling)
- ephapax#225 — Phase 4c gating issue (TFunEff)
- formal/SUBST-LEMMA-GENERALIZATION-DESIGN.md Phase 4
- formal/PRESERVATION-DESIGN.md §5.1
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d9e2bb7 commit 91de8eb
1 file changed
Lines changed: 83 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
491 | 491 | | |
492 | 492 | | |
493 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
0 commit comments