Commit c246c69
syntax: expr_strictly_free_of_region (closes blocker 5) (#201)
## Summary
Reformulates the region-freedom predicate to drop the shadow short-
circuit in `ERegion r' body`, addressing **blocker 5** (predicate-
too-weak in the L1 region-shrinkage lemma family) identified by the
2026-05-28 audit (task #29).
- New `expr_strictly_free_of_region` in `Syntax.v` — identical to
`expr_free_of_region` except the `ERegion _ body` case recurses
unconditionally (no `String.eqb` shadow short-circuit).
- New `expr_strictly_free_implies_free` lemma (Qed) — trivial
structural induction establishing that strict freedom implies
weak freedom.
- L1 lemma family migrated to take `expr_strictly_free_of_region` as
the precondition: `region_shrink_preserves_typing_l1_gen_m`,
`region_shrink_preserves_typing_l1_gen`,
`region_shrink_preserves_typing_l1`,
`preservation_l3_region_active_echo`, and the top-level
`preservation_l3` theorem.
## Audit constraints honored
- **Zero new** `Admitted` / `Axiom` declarations. Counts preserved
exactly versus `main`: 4 `admit.` + 3 `Admitted.` in
`Semantics_L1.v`, 1 `Admitted.` in `Semantics.v`.
- The shadowed-sub-case admits at `Semantics_L1.v:553/621` (now
shifted by added comments) **remain**. They are blocked by a
list-vs-multiset structural mismatch (Phase D), **not** by
predicate weakness. Strengthening the predicate does **not**
close them — confirmed by the audit and verified empirically
here (same admit counts after migration).
- No patching of legacy `Theorem preservation` in `Semantics.v`
(provably false per `Counterexample.v`) or the legacy `Typing.v`
judgment, per the 2026-05-27 owner directive.
## Scope clarification
This PR **does not** close blocker 3 — that requires Phase D
(L2 effect-typed `TFun` work, branch
`phase-d-slice-1-tfun-eff`).
The step rules `S_Region_Exit` / `S_Region_Exit_Echo` in
`Semantics.v` still emit the **weak** `expr_free_of_region`
premise. Migrating those is a separate concern (legacy
operational semantics) and is intentionally **not** done in this
PR per the task brief. The L1 lemma chain
(`preservation_l3_*` -> `region_shrink_preserves_typing_l1_*`)
is internally consistent on the strict predicate; bridging the
weak step-rule premise to the strict L1 lemma precondition is a
follow-up.
## Build
All 9 `.v` files compile clean under `coqc 8.18.0` from a fresh
`.vo` state (Syntax, Typing, TypingL1, Modality, Semantics,
Semantics_L1, Counterexample, Echo, TypingL2).
## Test plan
- [x] `coqc 8.18.0` clean build of all 9 `.v` files from scratch
- [x] No new `Admitted` / `Axiom` declarations (counts match main)
- [x] Pre-existing 2 inner admits at `Semantics_L1.v:553/621`
remain unchanged (line-shifted by added comments)
- [x] Pre-existing outer `Admitted` at `Semantics_L1.v` (region
shrink helper) remains unchanged
- [x] Commit GPG-signed
Audit reference: task #29 (2026-05-28). Blocker 5 closure.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 570ee45 commit c246c69
2 files changed
Lines changed: 120 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
431 | 441 | | |
432 | 442 | | |
433 | 443 | | |
434 | 444 | | |
435 | | - | |
| 445 | + | |
436 | 446 | | |
437 | 447 | | |
438 | 448 | | |
| |||
532 | 542 | | |
533 | 543 | | |
534 | 544 | | |
535 | | - | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
536 | 550 | | |
537 | 551 | | |
538 | 552 | | |
| |||
601 | 615 | | |
602 | 616 | | |
603 | 617 | | |
604 | | - | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
605 | 621 | | |
606 | 622 | | |
607 | 623 | | |
| |||
656 | 672 | | |
657 | 673 | | |
658 | 674 | | |
659 | | - | |
| 675 | + | |
660 | 676 | | |
661 | 677 | | |
662 | 678 | | |
| |||
668 | 684 | | |
669 | 685 | | |
670 | 686 | | |
671 | | - | |
| 687 | + | |
672 | 688 | | |
673 | 689 | | |
674 | 690 | | |
| |||
1741 | 1757 | | |
1742 | 1758 | | |
1743 | 1759 | | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
1744 | 1768 | | |
1745 | 1769 | | |
1746 | 1770 | | |
1747 | 1771 | | |
1748 | 1772 | | |
1749 | 1773 | | |
1750 | | - | |
| 1774 | + | |
1751 | 1775 | | |
1752 | | - | |
| 1776 | + | |
1753 | 1777 | | |
1754 | 1778 | | |
1755 | 1779 | | |
| |||
1806 | 1830 | | |
1807 | 1831 | | |
1808 | 1832 | | |
1809 | | - | |
| 1833 | + | |
1810 | 1834 | | |
1811 | 1835 | | |
1812 | 1836 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
211 | 299 | | |
212 | 300 | | |
213 | 301 | | |
| |||
0 commit comments