proof: add helper IR WithInternals body seam#2114
Merged
Th0rgal merged 2 commits intoJul 7, 2026
Merged
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_58005f0c-bfce-4244-af55-a90c2843028e) |
Member
Author
|
Review/validation update from fallback merge worker:
Not merging yet. Exact blockers:
|
2c248df
into
paloma/issue-2080-structural-head-witnesses
21 checks passed
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.
Refs #2080
Base / dependency
Stacked on PR #2113 (
paloma/issue-2080-structural-head-witnesses). Do not merge until predecessor stack is merged/green.Live predecessor stack at creation:
paloma/issue-2080-parametric-scope-liftpaloma/issue-2080-direct-withinternalspaloma/issue-2080-structural-withinternalspaloma/issue-2080-structural-head-witnessesSummary
WithInternalsexecution sibling for the helper-IR generic list theorem, preservingspec.functionsthrough compile reconstruction and executing withexecIRStmtsWithInternals.StmtListGenericWithHelpersAndHelperIRWithInternalsdirectly.WithInternalshelper-free/direct/expr/structural/residual witnesses, avoiding the legacy/default-empty helper-world list seam for that path.PrintAxioms.leanand proof-length allowlist entries for the new mechanical proof seams.Validation
lean-slot lake build Compiler.Proofs.IRGeneration.GenericInduction.Helpers✅lean-slot lake build Compiler.Proofs.IRGeneration.GenericInduction.Main✅lean-slot lake build Compiler.Proofs.HelperStepProofs✅python3 scripts/generate_print_axioms.py --check✅python3 scripts/check_proof_length.py✅git diff --check✅sorry/admit/axiomdeclarations ✅Remaining #2080 interface/gate
This slice adds the execution sibling and a body-level mixed
WithInternalsconsumer. The top-level function path still has default-empty helper-world compile hypotheses in existing compiler wrappers, so the next slice should bridge function compilation/body compile facts tomodel.functionswhere locally coherent, then thread this body consumer into the function-level preservation route.Note
Low Risk
Lean proof-only changes that extend existing IR-generation induction patterns; no runtime, auth, or deployment behavior.
Overview
Adds the spec.functions-aware execution path for helper-IR generic statement lists, so compile and
execIRStmtsWithInternalsstay in the real helper world instead of the legacy default-empty list seam.In Helpers, new step/result theorems
exec_compileStmtList_generic_with_helpers_and_helper_ir_with_internals_sizeOf_extraFuel_*mirror the existing helper-IR fuel induction but takeStmtListGenericWithHelpersAndHelperIRWithInternalsand compile withspec.functions.In Main, new body preservation theorems consume that witness directly (
supported_function_body_correct_from_exact_state_generic_helper_steps_and_helper_ir_with_internalsand a split-interface variant that assembles helper-free/direct/expr/structural/residualWithInternalsstep interfaces into one generic list witness while keeping body compile inmodel.functions.PrintAxioms and check_proof_length are updated for the four new public lemmas and their long mechanical proofs.
Reviewed by Cursor Bugbot for commit 0754fca. Bugbot is set up for automated code reviews on this repo. Configure here.