proof: retarget whole-contract helper IR from core output#2126
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_7208ce47-4829-453e-a0ed-e83b1bbc57ec) |
Member
Author
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
This was referenced Jul 9, 2026
Th0rgal
changed the base branch from
paloma/issue-2080-helper-segment-reserved-names-phase28
to
main
July 9, 2026 09:16
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
legacyCompatibleRuntimeContract_of_compileValidatedCore, packaging the concretecompileValidatedCore = Except.ok iroutput into the closed helper-aware runtime compatibility shape.compile_preserves_semantics_with_helper_proofs_and_helper_ir_of_compileValidatedCore, a whole-contract retarget connector that consumesinterpretIRWithInternalsfor the compiled runtime contract without a manualhhelperIRequality.PrintAxioms.leanfor the two new public theorem entries.Stack / base
paloma/issue-2080-helper-segment-reserved-names-phase28Do not merge until predecessor stack is merged/green.
Validation
git diff --check- passedlean-slot lake build Compiler.Proofs.IRGeneration.Contract- passedlean-slot lake build PrintAxioms- passed (pre-existing warnings only in unrelated modules)python3 scripts/generate_print_axioms.py --check- passedpython3 scripts/check_proof_length.py- passedsorry,admit, oraxiomdeclarations.Remaining #2080 gate
This slice removes the raw whole-contract
hhelperIRequality at the validated-core connector. The remaining closure is to deriveLegacyCompatibleExternalBodies ir(or preferably the weaker disjoint external-body runtime condition) directly from the concretecompileValidatedCoreexternal-function compilation output, so the connector has no external-body compatibility premise.Refs #2080
Note
Low Risk
Proof-only changes in compiler IR generation lemmas and axiom inventory; no executable compiler, auth, or data-path behavior.
Overview
Adds Lean proof plumbing so whole-contract helper-aware correctness can be stated from a concrete
compileValidatedCore = Except.ok irresult instead of a hand-writteninterpretIRWithInternals = interpretIRequality.legacyCompatibleRuntimeContract_of_compileValidatedCorecombines the pipeline fact that supported specs yield an empty internal table withLegacyCompatibleExternalBodiesintoLegacyCompatibleRuntimeContract, matching what the closed conservative-extension theorems expect.compile_preserves_semantics_with_helper_proofs_and_helper_ir_of_compileValidatedCoreis the validated-core entry point: it rebuildsCompilationModel.compile = Except.ok irfrom validation + core, feeds the legacy runtime witness above, and uses the already-closedinterpretIRWithInternalsZeroConservativeExtensionGoal_closedpath—callers no longer supplyhhelperIRmanually.LegacyCompatibleExternalBodies irremains an explicit premise (not yet derived from compilation output).PrintAxioms.leanis regenerated to list the two new public theorems.Reviewed by Cursor Bugbot for commit 3f11865. Bugbot is set up for automated code reviews on this repo. Configure here.