Commit 54006dc
proof(Semantics_L1): close 3 Affine-only bullet-structure regressions (#187)
## Summary
L2-β follow-up landing. The L2-hybrid in #176 + #177 added three
Affine-only constructors (`T_Lam_L1_Affine`, `T_Case_L1_Affine`,
`T_If_L1_Affine`) which regressed 6 supporting lemmas in
`formal/Semantics_L1.v` to `Admitted`. This PR closes the 3 pure
bullet-structure regressions and generalises
`typing_preserves_length_l1` to modality-polymorphic.
**Net delta**: 15 Qed + 7 Admitted → **19 Qed + 4 Admitted** in
`Semantics_L1.v`.
### Closed lemmas
- `typing_preserves_bindings_l1` — output-ctx lookup preserved under
typing. Restored from commit `56f592f` with 2 new bullets for
`T_Case_L1_Affine` + `T_If_L1_Affine` (`T_Lam_L1_Affine` auto-discharges
via R/G-unchanged path).
- `unrestricted_flag_unchanged_l1` — non-linear bindings stable through
typing. Same 3-new-bullet pattern.
- `shift_typing_gen_l1` — extracted m-polymorphic
`shift_typing_gen_l1_m` (mirrors `region_liveness_at_split_l1_gen`'s
shape); Linear-only `shift_typing_gen_l1` retained as thin wrapper.
### Generalised
`typing_preserves_length_l1` now stated over `forall m`. All 12 call
sites in this file updated; Linear-only callers continue to work via
instantiation.
### Residual admits (L2-β follow-up #2)
- `subst_typing_gen_l1` — goal mentions modality, needs m-polymorphic
generalisation. Pure bullet-restoration insufficient; documented in
lemma comment.
- `region_shrink_preserves_typing_l1_gen` — list-vs-multiset bridge for
`T_Region_Active_L1` shadowed case (pre-L2 issue, not new debt).
- `region_liveness_at_split_l1_gen` — 1 narrow admit (genuinely false
per documented `ERegion rv (EI32 5)` counterexample).
- `preservation_l1` — capstone, depends on `subst_typing_gen_l1`.
### Owner-directive compliance
Per `CLAUDE.md` 2026-05-27:
- No new \`Axiom\` declarations.
- No ad-hoc side conditions on compound rules.
- No legacy \`Theorem preservation\` patching (untouched).
- Per-layer derivation against explicit invariants (L1 supporting
infrastructure).
## Test plan
- [x] \`just clean && just all\` in \`formal/\` — full project rebuild
clean
- [x] \`grep "^Admitted\." Semantics_L1.v\` confirms exactly 4 residual
admits (down from 7)
- [x] \`coqc 8.18.0\` accepts every restored proof
- [ ] CI Coq proofs job passes
Refs \`PROOF-NEEDS.md\` §2 "Near-term (L1 ⇒ L2 integration debt)".
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 3b5b92d commit 54006dc
6 files changed
Lines changed: 1063 additions & 71 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
91 | | - | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
| |||
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
106 | 113 | | |
107 | 114 | | |
108 | 115 | | |
| |||
219 | 226 | | |
220 | 227 | | |
221 | 228 | | |
222 | | - | |
| 229 | + | |
223 | 230 | | |
224 | 231 | | |
225 | 232 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
252 | 274 | | |
253 | 275 | | |
254 | 276 | | |
| |||
267 | 289 | | |
268 | 290 | | |
269 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
270 | 302 | | |
271 | 303 | | |
272 | 304 | | |
| |||
325 | 357 | | |
326 | 358 | | |
327 | 359 | | |
328 | | - | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
329 | 364 | | |
330 | 365 | | |
331 | 366 | | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
338 | 376 | | |
339 | 377 | | |
340 | 378 | | |
341 | 379 | | |
342 | | - | |
| 380 | + | |
| 381 | + | |
343 | 382 | | |
344 | 383 | | |
345 | 384 | | |
| |||
384 | 423 | | |
385 | 424 | | |
386 | 425 | | |
387 | | - | |
| 426 | + | |
| 427 | + | |
388 | 428 | | |
389 | 429 | | |
390 | 430 | | |
| |||
396 | 436 | | |
397 | 437 | | |
398 | 438 | | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
399 | 450 | | |
400 | 451 | | |
401 | 452 | | |
| |||
3676 | 3727 | | |
3677 | 3728 | | |
3678 | 3729 | | |
| 3730 | + | |
| 3731 | + | |
3679 | 3732 | | |
3680 | 3733 | | |
3681 | 3734 | | |
| |||
0 commit comments