Skip to content

Idris htSubst COMPLETE (all 15 cases) + substLemma0 — substitution layer of #108#119

Merged
hyperpolymath merged 3 commits into
mainfrom
claude/dreamy-hypatia-O8XHo
Jun 20, 2026
Merged

Idris htSubst COMPLETE (all 15 cases) + substLemma0 — substitution layer of #108#119
hyperpolymath merged 3 commits into
mainfrom
claude/dreamy-hypatia-O8XHo

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

Completes the QTT substitution lemma htSubst on the Idris track and lands its subst0 corollary — the substitution layer (4c) of preservation (#108).

htSubst COMPLETE (all 15 cases, total, hole-free)

The 5 usage-splitting cases are filled, so htSubst (mirror of Coq ht_subst) is fully proved:

  • Tensor / LetPair / Caseusplit3 (USnoc-boundary split) ×2 → uaddSplitBoundary2 → recurse → substReassocMultuaddUappend.
  • App / Let — the q-scaled variants via substReassocAdd + uscaleUappend (Let also needs uaddComm/qAddComm for the d1-scaled accounting).
  • binder cases recurse with the prefix I extended and body usage reshaped; Case unifies its two branch residuals (justInj' on the shared d2 split).

The b-index-erasure obstruction (ADR-003) that stalled this is resolved by carrying b as an erased implicit in both hvSubst and htSubst.

substLemma0

The subst0 corollary = htSubst at the empty prefix I = TEmpty — the workhorse S_App/S_CaseL/S_CaseR/S_Let will consume.

Registry

proofs/STATUS.md updated: the Idris preservation row now records htSubst COMPLETE + substLemma0; the only remaining hole in the whole solo-core is ?todo_preservation.

Remaining for preservation (4d, next)

uaddAssocsubst2Lemma (two-variable LetPair substitution) → the Step-induction. preservation is still NOT proved (honest).

Test plan

  • idris2 --build solo-core.ipkg exits 0 (8/8); only ?todo_preservation open
  • %default total, no postulates
  • Coq + Rust tracks unchanged

Refs #108, proofs/STATUS.md

🤖 Generated with Claude Code


Generated by Claude Code

claude added 3 commits June 20, 2026 13:55
…s (toward #108)

The QTT substitution lemma htSubst is now fully proved (all 15 cases, total,
hole-free) on the Idris track, mirroring Coq ht_subst. The 5 usage-splitting
cases land via the accounting algebra:

  - Tensor / LetPair / Case : usplit3 (USnoc-boundary split) x2 ->
    uaddSplitBoundary2 -> recurse -> substReassocMult -> uaddUappend
  - App / Let               : the q-scaled variants via substReassocAdd +
    uscaleUappend (Let also needs uaddComm/qAddComm for the d1-scaled shape)
  - binder cases (LetPair/Case/Let) recurse with the prefix I extended and the
    body usage reshaped (USnoc..); Case unifies the two branch residuals
    (justInj' on the shared d2 split).

Build green 8/8; the ONLY remaining hole in the whole solo-core is
?todo_preservation. Next: substLemma0 + subst2Lemma (corollaries) then the
Step-induction closes preservation.
…ward #108)

substLemma0 = htSubst at the empty prefix (I = TEmpty): substitute the single
top-of-context variable once, the workhorse the reduction rules S_App / S_CaseL
/ S_CaseR / S_Let consume. One-liner over the now-complete htSubst; build green.

Layer 4c (the QTT substitution lemma) is now: htSubst COMPLETE (15/15) +
substLemma0. Remaining for preservation (4d): uaddAssoc -> subst2Lemma (the
two-variable LetPair substitution), then the Step-induction.
… (Idris #108)

Idris preservation row: foundation -> htSubst COMPLETE (15/15, b-erasure
resolved) + substLemma0; only ?todo_preservation remains; subst2Lemma (via
uaddAssoc) + the Step-induction are the documented remainder.
@hyperpolymath
hyperpolymath marked this pull request as ready for review June 20, 2026 14:02
@hyperpolymath
hyperpolymath merged commit 89e3fac into main Jun 20, 2026
13 checks passed
@hyperpolymath
hyperpolymath deleted the claude/dreamy-hypatia-O8XHo branch June 20, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants