proof: discharge legacy compatibility for core statement lists - #2134
Conversation
Add the missing legacy-compatibility analog of the proven disjoint composition: - compileStmtList_legacyCompatible_of_interface: lift the per-statement StmtListCompiledLegacyCompatible interface to a whole-list LegacyCompatibleExternalStmtList witness for the emitted Yul body. - compileFunctionSpec_body_legacyCompatible_of_interface: per-function bridge composing genParamLoads_scalar_legacy with the body lemma. These lift the remaining per-statement #2080 legacy obligations toward the whole-contract LegacyCompatibleExternalBodies target.
…om per-statement interface
|
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_669a7391-2266-4231-bad9-5ef8e1a43062) |
OpenCodeReview first-pass reviewStatus: completed_with_errors · 0 finding(s) · 3 files · 1245669 tokens · 70 tool calls Some files could not be reviewed due to errors. Warnings
Pilot mode: advisory only. Codex Review remains the merge gate. |
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 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". |
# Conflicts: # Compiler/Proofs/IRGeneration/Function.lean # PrintAxioms.lean
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_ccff9e95-42b4-4895-94b9-d1dfa7c22f40) |
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
OpenCodeReview first-pass reviewStatus: completed_with_errors · Mode: medium-lean · 0 finding(s) · 3 files · 761103 tokens · 57 tool calls Some files could not be reviewed due to errors. Warnings
OCR pilot metrics
Pilot mode: advisory only. Codex Review remains the merge gate. |
Summary
StmtListCompiledLegacyCompatiblefor the genericStmtListCompileCoregrammar.stmtListTerminalCore_compiledLegacyCompatible, including terminalitebodies by reusing the proof: reduce whole-contract legacy-bodies premise to per-statement interface #2128 list bridge on compiled branches.compileFunctionSpec_body_legacyCompatible_of_compileCoreandcompileFunctionSpec_body_legacyCompatible_of_terminalCore.PrintAxioms.leanand documents the two mechanical structural witnesses in the proof-length allowlist.Stack / dependency
Base/target:
paloma/parallel-fallback-fragment-helper(#2128).Do not merge until predecessor stack is merged/green.
Validation
git diff --checkPASSlean-slot lake build Compiler.Proofs.IRGeneration.FunctionPASS (local fallback after Spark offload 403 for this isolated worktree path)lean-slot lake build Compiler.Proofs.IRGeneration.ContractPASS (local fallback after Spark offload 403 for this isolated worktree path)python3 scripts/generate_print_axioms.py --checkPASSpython3 scripts/check_proof_length.pyPASSrg -n "\\b(sorry|admit|axiom)\\b" Compiler/Proofs/IRGeneration/Function.leanPASS (no matches)Refs #2080
Note
Low Risk
Changes are confined to Lean proofs and axiom inventory; no compiler runtime or security-sensitive execution paths are modified.
Overview
Advances #2080 by proving that bodies in the
StmtListCompileCoreandStmtListTerminalCoregrammars satisfyStmtListCompiledLegacyCompatible, so compiled Yul stays in the legacy-compatible external subset without hand-written per-statement witnesses.Adds structural lemmas (
legacyCompatibleExternalStmtList_map_exprStmt,revertWithMessage_legacyCompatible) and large inductive theoremsstmtListCompileCore_compiledLegacyCompatibleandstmtListTerminalCore_compiledLegacyCompatible(per-constructor cases aligned with compilation, including terminalitevia the existing list bridge). Two function-level corollaries—compileFunctionSpec_body_legacyCompatible_of_compileCoreand..._of_terminalCore—compose param loads with those list proofs.PrintAxioms.lean is regenerated to export the new public theorems; check_proof_length.py allowlists the two mechanical structural witnesses.
Reviewed by Cursor Bugbot for commit 2e54ef9. Bugbot is set up for automated code reviews on this repo. Configure here.