proof: thread helper expr context through siblings#2102
Open
Th0rgal wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_ab069523-0cec-4a46-bdf1-a198fa450551) |
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
exprInternalHelperCompositionalContextResult_of_outer_facts_threaded_head, a threaded variant of the phase-7 payload adapter where the helper-head IR expression starts from an intermediate sibling state instead of the parent entry stateexprInternalHelperCompositionalContextResult_binary_right_threaded_contextso right-hand binary expression contexts can preserve the same helper-head payload after the left sibling advances IR stateevalIRExprsWithInternals_pair_of_valuesexposes left-to-right argument-state threading, andevalIRExprWithInternals_binary_builtin_of_valuespackages pure two-argument builtin evaluation once constructor-specific source/compile/value facts are suppliedPrintAxioms.leanReferences #2080.
Base / dependency
This PR is stacked on #2101 because #2101 is still open. Base branch:
paloma/issue-2080-expression-recursive-context.Proof status
This is a compiling, non-vacuous API bridge for the remaining helper-aware source/IR expression compiler lemma. It does not close the full recursive non-call
Exprtheorem orStmtListExprInternalHelperStepInterface, but it removes the key right-sibling state-shape gap: the helper payload can now be lifted from an IR state reached after evaluating an earlier sibling while the parent expression result is evaluated from the original IR state.The statement-head lift remains blocked on constructor-specific source/compile/value facts for expression-bearing statement heads. The next dispatch should use these threaded adapters to prove concrete binary constructor cases, then consume them through
ExprInternalHelperHeadStepBridge.Validation
lake env lean Compiler/Proofs/HelperStepProofs.lean(passed)lean-slot lake build Compiler.Proofs.HelperStepProofs(passed; Spark offload denied for this mission path, built locally)python3 scripts/generate_print_axioms.py --check(passed)python3 scripts/check_proof_length.py(passed)rg -n "\\bsorry\\b|\\badmit\\b|\\baxiom\\b" Compiler/Proofs/HelperStepProofs.lean(no matches)make check(passed)Note
Low Risk
Lean proof-library additions only; no runtime, auth, or compiler behavior changes beyond new reusable lemmas for future expression-helper proofs.
Overview
Adds helper-aware expression compositional proof bridges so binary/non-call
Exprlemmas can treat IR evaluation when a left sibling has already advancedIRState, while source evaluation still uses the original runtime.New theorems in
HelperStepProofs.lean:exprInternalHelperCompositionalContextResult_of_outer_facts_threaded_head(threaded variant of the outer-facts adapter),exprInternalHelperCompositionalContextResult_binary_right_threaded_context(right-child helper payload with sibling state threading), plusevalIRExprsWithInternals_pair_of_valuesandevalIRExprWithInternals_binary_builtin_of_valuesto package left-to-right arg evaluation and pure two-argument Yul builtin IR steps for constructor-specific lemmas.PrintAxioms.leanis regenerated to register the four new public lemmas (theorem count 5479 → 5483).Reviewed by Cursor Bugbot for commit 9174d5e. Bugbot is set up for automated code reviews on this repo. Configure here.