Idris htSubst COMPLETE (all 15 cases) + substLemma0 — substitution layer of #108#119
Merged
Conversation
…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
marked this pull request as ready for review
June 20, 2026 14:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the QTT substitution lemma
htSubston the Idris track and lands itssubst0corollary — the substitution layer (4c) ofpreservation(#108).htSubstCOMPLETE (all 15 cases, total, hole-free)The 5 usage-splitting cases are filled, so
htSubst(mirror of Coqht_subst) is fully proved:usplit3(USnoc-boundary split) ×2 →uaddSplitBoundary2→ recurse →substReassocMult→uaddUappend.q-scaled variants viasubstReassocAdd+uscaleUappend(Let also needsuaddComm/qAddCommfor thed1-scaled accounting).Iextended and body usage reshaped; Case unifies its two branch residuals (justInj'on the sharedd2split).The
b-index-erasure obstruction (ADR-003) that stalled this is resolved by carryingbas an erased implicit in bothhvSubstandhtSubst.substLemma0The
subst0corollary =htSubstat the empty prefixI = TEmpty— the workhorseS_App/S_CaseL/S_CaseR/S_Letwill consume.Registry
proofs/STATUS.mdupdated: the Idrispreservationrow now recordshtSubstCOMPLETE +substLemma0; the only remaining hole in the whole solo-core is?todo_preservation.Remaining for
preservation(4d, next)uaddAssoc→subst2Lemma(two-variableLetPairsubstitution) → theStep-induction.preservationis still NOT proved (honest).Test plan
idris2 --build solo-core.ipkgexits 0 (8/8); only?todo_preservationopen%default total, no postulatesRefs #108,
proofs/STATUS.md🤖 Generated with Claude Code
Generated by Claude Code