proof: lift expression helper context payload#2101
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_ba880132-09f2-4f09-a9b5-4b0468e7d343) |
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, a proof adapter that lifts the phase-6ExprInternalHelperCompositionalContextResulthelper-head payload through an already-proved outer expression contextargVals, compiled argument evaluation, helper-world evidence, helper dispatch, and source/compiled head-state relationPrintAxioms.leanfor the four new public theoremsReferences #2080.
Base / dependency
#2100 is merged, so this PR targets
maindirectly. It is not stacked.Proof status
This is a compiling, non-vacuous API bridge for the recursive expression-context theorem: once a constructor-specific proof supplies the parent compile/source-eval/IR-eval facts, the adapter preserves the exact helper-head payload produced by phase 6.
This does not fully close arbitrary expression recursion or
StmtListExprInternalHelperStepInterface. The remaining proof/API blocker is a uniform helper-aware source/IR expression compiler lemma for non-callExprconstructors, including sequential IR state threading for sibling expressions. The statement-head bridge should consume these adapters after that lemma is available.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-only additions with no executable compiler or runtime behavior changes; risk is limited to proof API correctness and maintainability.
Overview
Adds proof adapters in
HelperStepProofs.leanso constructor-specific lemmas can reuse the phase-6ExprInternalHelperCompositionalContextResulthelper-head payload when the parent expression’s compile, source-eval, and IR-eval facts are already proved.exprInternalHelperCompositionalContextResult_of_outer_factscopies the existing helper-world match andExprInternalHelperCompiledCallContextResultwitness from a child “head” into the parent result, given outerhcompile/hsource/hir. Unary and binary left/right wrappers (…_unary_context,…_binary_left_context,…_binary_right_context) instantiate that adapter for common non-call expression shapes; sibling IR state threading stays in the caller’shirhypothesis.PrintAxioms.leanis regenerated to list the four new public theorems (5479 total lemmas). Full automatic recursion over all non-callExprconstructors is still blocked on a uniform helper-aware expression compiler lemma.Reviewed by Cursor Bugbot for commit f90ac27. Bugbot is set up for automated code reviews on this repo. Configure here.