Commit f3e57fd
proofs(P43): port canonical_* forms to the L1 modality-polymorphic judgment
Closes proof-debt P43 prerequisite from the comprehensive inventory.
Prerequisite for P42 (progress_l1).
What lands
Seven modality-polymorphic canonical-forms lemmas at the end of
formal/Semantics_L1.v, mirroring the legacy Linear-only versions at
formal/Semantics.v:603-630:
- canonical_unit_l1_m : v : TBase TUnit + is_value v → v = EUnit
- canonical_bool_l1_m : v : TBase TBool + is_value v → ∃ b, v = EBool b
- canonical_i32_l1_m : v : TBase TI32 + is_value v → ∃ n, v = EI32 n
- canonical_fun_l1_m : v : TFun T1 T2 + is_value v → ∃ body, v = ELam T1 body
- canonical_prod_l1_m : v : TProd T1 T2 + is_value v → ∃ v1 v2, v = EPair v1 v2 ∧ ...
- canonical_sum_l1_m : v : TSum T1 T2 + is_value v → (∃ v0, v = EInl T v0 ∧ ...) ∨ (∃ v0, v = EInr T v0 ∧ ...)
- canonical_string_l1_m : v : TString r + is_value v → ∃ l, v = ELoc l r
The `_m` suffix follows the convention established by
region_shrink_preserves_typing_l1_gen_m and subst_typing_gen_l1_m.
A pre-existing Linear-only canonical_string_l1 at line 908 is left
untouched (it predates the L2 modality hybrid; the new _m version
generalises it).
All 7 proofs are single-line inversions:
intros; inversion H0; subst; inversion H; subst; <discharge>
Same structural pattern as the legacy proofs — the L1 judgment's
value-typing rules are sufficiently rigid that inversion on
is_value v + the typing derivation pins the constructor.
Build oracle: just -f formal/Justfile all clean. All 7 Print
Assumptions blocks (added inline) print "Closed under the global
context" — these lemmas surface ZERO axioms, exactly as the
canonical-forms framework requires.
Next: progress_l1 (P42) uses these as the case analysis on the type
of a closed well-typed value. Stated separately because it requires
the step relation's totality on non-value terms.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 29080c7 commit f3e57fd
1 file changed
Lines changed: 83 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3265 | 3265 | | |
3266 | 3266 | | |
3267 | 3267 | | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
| 3272 | + | |
| 3273 | + | |
| 3274 | + | |
| 3275 | + | |
| 3276 | + | |
| 3277 | + | |
| 3278 | + | |
| 3279 | + | |
| 3280 | + | |
| 3281 | + | |
| 3282 | + | |
| 3283 | + | |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
| 3295 | + | |
| 3296 | + | |
| 3297 | + | |
| 3298 | + | |
| 3299 | + | |
| 3300 | + | |
| 3301 | + | |
| 3302 | + | |
| 3303 | + | |
| 3304 | + | |
| 3305 | + | |
| 3306 | + | |
| 3307 | + | |
| 3308 | + | |
| 3309 | + | |
| 3310 | + | |
| 3311 | + | |
| 3312 | + | |
| 3313 | + | |
| 3314 | + | |
| 3315 | + | |
| 3316 | + | |
| 3317 | + | |
| 3318 | + | |
| 3319 | + | |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
| 3323 | + | |
| 3324 | + | |
| 3325 | + | |
| 3326 | + | |
| 3327 | + | |
| 3328 | + | |
| 3329 | + | |
| 3330 | + | |
| 3331 | + | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
| 3335 | + | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
| 3348 | + | |
| 3349 | + | |
| 3350 | + | |
0 commit comments