proof: add expression helper bridge interface witness#2096
Merged
Conversation
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_cd7820b8-a0c9-4191-8df8-a32a8c283eae) |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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
ExprInternalHelperHeadStepBridgefor expression-position internal-helper statement headsCompiledStmtStepWithHelpersAndHelperIRand list-levelStmtListExprInternalHelperStepInterfaceassembly theoremsPrintAxioms.leanfor the three new public proof declarationsReferences #2080.
Proof status
This is non-vacuous at the expression-helper interface boundary: when
stmtTouchesExprInternalHelperSurface stmt = true, the list witness now consumes an exact helper-aware compiled statement step supplied byExprInternalHelperHeadStepBridge.The full semantic closure is still blocked by the missing expression-context API theorem documented in code: a compositional lemma connecting
SourceSemantics.evalExprWithHelpersinternal-call summary/world-preservation evidence to compiled Yul expression evaluation underevalIRCallWithInternals.This PR preserves the existing helper-surface-closed fast paths and does not remove
SupportedStmtList.helperSurfaceClosed.Validation
lean-slot lake build Compiler.Proofs.HelperStepProofs(passed; Spark offload denied for this mission path, built locally)lake env lean Compiler/Proofs/HelperStepProofs.lean(passed)python3 scripts/generate_print_axioms.py --check(passed)make check(passed)Note
Low Risk
Proof-only additions with no runtime or compiler behavior changes; helper-surface-closed fast paths are unchanged.
Overview
Adds the expression-position helper proof plumbing in
HelperStepProofs.lean, parallel to the existing direct-call and direct-assign bridges.Introduces
ExprInternalHelperHeadStepBridge(compile + source/IRstmtStepMatchesIRExecWithInternalsobligation for statement heads whose helper work is in expressions), then three assembly theorems: singletonCompiledStmtStepWithHelpersAndHelperIR, cons onStmtListExprInternalHelperStepInterface, and list induction from per-head bridges whenstmtTouchesExprInternalHelperSurfaceholds.Documentation in-file notes full semantic closure still depends on a missing compositional lemma tying
evalExprWithHelperstoevalIRCallWithInternals.PrintAxioms.leanis updated to register the three new public theorems (5467 total).Reviewed by Cursor Bugbot for commit b580e95. Bugbot is set up for automated code reviews on this repo. Configure here.