Commit d174c06
proof(solo-core): QTT substitution lemma + preservation (axiom-free) — F1.4 phase 4
Discharge F1.4: `Theorem preservation : Preservation.` and
`affine_pres : AffinePreservation.` are now real `Qed.`, axiom-free
(`Print Assumptions` = "Closed under the global context"), over the
separated QTT context (Usage.v).
Architecture (standard de Bruijn type-soundness, adapted to the
separated tctx+uvec context):
- shape invariant: has_type G D t a -> ulen D = tlen G
- weakening (ht_shift): insert a fresh Zero-usage variable at any
de Bruijn depth; structural over all 15 term constructors
- substitution (ht_subst): open-context QTT substitution at a context
boundary; the affine accounting is pure usage-vector algebra
(subst_reassoc_add / subst_reassoc_mult), where uadd_comm /
uadd_assoc / uscale_add pay off — no non-commutative context fact is
ever needed (the promised payload of the separated context)
- preservation: induction on `step`; redex cases use the substitution
corollaries (subst_lemma0 / subst2_lemma), congruence cases the IH
Kernel fix (Syntax.v): subst2 now pre-shifts the inner substitutee —
subst0 u1 (subst0 (shift 0 u2) t) — so it is correct for OPEN tensor
components (required by preservation over a non-empty context; the old
form corrupted u2's index-0 free variable). Identical to the old
definition on CLOSED values (shift 0 is the identity there), so
closed-program evaluation and `progress` are unchanged.
Docs: README.md / proofs/STATUS.md / Soundness.v header updated to mark
the Coq track of progress/preservation as locally-checked (axiom-free
Qed); the Idris twin remains a tracked obligation (Phase F5 parity).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent afa0e29 commit d174c06
4 files changed
Lines changed: 1157 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
62 | | - | |
| 64 | + | |
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| |||
0 commit comments