Commit a54ecb7
authored
proof(L1.G): convert Axiom region_liveness_at_split_l1 to Lemma with 1 narrow admit (#181)
## Summary
Adaptation of design-branch PR #178 to main's m-indexed `has_type_l1`
(per #176). Replaces the opaque universal `Axiom
region_liveness_at_split_l1` with a structurally-proved `Lemma …
Admitted.` that closes 28 of 29 inductive cases concretely, leaving
exactly 1 admit at the documented counterexample sub-case
(T_Region_Active_L1 with binder = rv).
## Structure
1. **`region_liveness_at_split_l1_gen`** — generalised over the modality
parameter `m`. Induction handles all 29 constructors including the
mode-split `T_Lam_L1_Linear/Affine`, `T_Case_L1_Linear/Affine`,
`T_If_L1_Linear/Affine`.
- R-unchanged cases (11) auto-discharge via `try assumption`.
- Compound cases (16) route IH chains.
- `T_Region_L1` (fresh binder) closes via `remove_first_L1_count_other`
(~In r R ∧ In rv R gives r ≠ rv).
- `T_Region_Active_L1` splits on `r =? rv`:
- `r ≠ rv`: same `remove_first_L1_count_other` argument.
- `r = rv`: **GENUINELY FALSE — admit** with documented counterexample.
2. **`region_liveness_at_split_l1`** — Linear-specialised wrapper
matching the original Axiom's signature for existing call sites in
`subst_typing_gen_l1`. One-line proof by `eapply` on `_gen`.
## What this is and isn't
**Is**: a proof-debt **transparency** improvement. 28 cases now have
concrete witnesses; the residual obstacle is one narrowly-defined
sub-case with a source-level counterexample.
**Isn't**: a soundness improvement. The lemma's statement is universal
`forall e`, still false in the residual sub-case, still accepted by
`Admitted.` the same way `Axiom` was. Counterexample:
```
ERegion rv (EI32 5) : TBase TI32 -| [] at R = [rv]
```
The rule pops the only `rv` from `R_body`; `In rv R = True` but `In rv
R' = False`.
## Closure paths forward (in-file)
- **(i)** Restate with a `no_region_active_pop_of rv e` side condition
and discharge at the 9 call sites in `subst_typing_gen_l1` (smallest
step).
- **(ii)** Multi-set `region_env` (substantial L1 redesign).
- **(iii)** Weaker contextual signature.
## Verification
- 0 Axiom declarations in `formal/Semantics_L1.v` (down from 1)
- Full project rebuild: 9 .v files clean
- `Counterexample.v` still Qed (regression test for the L1 design
counterexample)
- `Print Assumptions subst_preserves_typing_l1` still mentions
`region_liveness_at_split_l1` (now as opaque Admitted-Lemma, not Axiom —
same logical state)
## Test plan
- [x] `coqc 8.18.0` builds cleanly
- [x] Clean full-project rebuild passes — 9 .v files
- [x] 0 `Axiom` declarations in `Semantics_L1.v`
- [ ] CI green
Refs PR #178 (design-branch original), PR #176 (L2 hybrid + m-indexing).
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent c01f0fa commit a54ecb7
1 file changed
Lines changed: 112 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
609 | 713 | | |
610 | 714 | | |
611 | 715 | | |
612 | 716 | | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
613 | 721 | | |
614 | 722 | | |
615 | 723 | | |
| |||
0 commit comments