proof(#2080): reserved-name dispatch seam (replaces false internal_-prefix helper premise)#2121
Merged
Th0rgal merged 1 commit intoJul 8, 2026
Conversation
…invariant Introduce InternalTableNamesReserved as the true generalization of InternalTableNamesInternalPrefixed: decoded helper names are either internal_-prefixed OR a known compiler-helper prefix (__verity_, checked_, panic_error_). Consumers only need that the ABI param-load builtins (calldataload, calldatasize, lt, revert, and, iszero) are outside that reserved set to derive findInternalFunction? = none and the calls-disjoint fact, so the invariant is dischargeable from a real populated internal table. - IRInterpreter: reservedInternalHelperPrefixes, IsReservedInternalHelperName (+Decidable), InternalTableNamesReserved, findInternalFunction?_eq_none_of_not_reserved, InternalTableNamesReserved_of_internalPrefixed. - Function: genParamLoads_callsDisjoint_of_reserved; route the internalNamesPrefixed variant through it. - Contract: reserved-name per-function seam and populated-table append/pipeline connectors. Regenerate PrintAxioms.lean; allowlist the signature-dominated reserved seam. Refs #2080
|
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_a288087f-d125-4060-9517-1e42b5cd2c70) |
1d14f3f
into
paloma/issue-2080-populated-table-phase25c
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.
Summary
Phase 27 of the #2080 L2 proof tier. The previous slice assumed every helper in a runtime contract's internal-function table is
internal_-prefixed. That premise is false for a real populated table: compiler helpers are named__verity_*,checked_*,panic_error_*, and template intrinsics — noneinternal_-prefixed. This PR replaces that false seam with the true reserved-name invariant.InternalTableNamesReservedgeneralizesInternalTableNamesInternalPrefixed: every decoded helper name is eitherinternal_-prefixed or carries a known compiler-helper prefix (reservedInternalHelperPrefixes = [internal_, __verity_, checked_, panic_error_]).IsReservedInternalHelperNameisDecidable.calldataload,calldatasize,lt,revert,and,iszero) are not reserved (by decide) to obtainfindInternalFunction? = noneand hencegenParamLoadscalls-disjointness — so the invariant is dischargeable from actual compilation output.InternalTableNamesReserved_of_internalPrefixedlets the compiled-internal naming route still feed the new consumer seam; the_of_internalNamesPrefixedparam-load lemma is rerouted through_of_reserved.compileFunctionSpec_correct_..._of_reserved, plus populated-tableInternalTableNamesReserved_of_internalFunctions_append/_of_helpers_append_compiledInternalTableconnectors.Touched:
IRInterpreter.lean,Function.lean,Contract.lean(+ regeneratedPrintAxioms.lean, one signature-dominated allowlist entry incheck_proof_length.py).Base / dependency
Stacked on #2120 (
paloma/issue-2080-populated-table-phase25c), which is stacked on #2119. Do not merge until the predecessor stack (#2119 → #2120) is merged/green. Rebase ontomainonce they land.Validation
lean-slot lake build Compiler.Proofs.IRGeneration.{IRInterpreter,Function,Contract}— success (BUILD_EXIT=0, 1151/1151).python3 scripts/generate_print_axioms.py --check— OK (up to date).python3 scripts/check_proof_length.py— passed (reserved seam allowlisted, signature-dominated single-term body).git diff --check— clean.sorry/admit/axiomin touched proof files.Refs #2080
Note
Low Risk
Proof-only Lean changes with no runtime or auth logic; risk is limited to theorem wiring and axiom inventory consistency.
Overview
Replaces the false premise that every runtime internal helper is
internal_-prefixed with a reserved-name invariant (InternalTableNamesReserved/IsReservedInternalHelperNameoverinternal_,__verity_,checked_,panic_error_), so populated tables with real compiler helpers can still dischargefindInternalFunction? = nonefor ABI param-load builtins.IRInterpreter.leanadds the reserved naming definitions,findInternalFunction?_eq_none_of_not_reserved, andInternalTableNamesReserved_of_internalPrefixed.Function.leanintroducesgenParamLoads_callsDisjoint_of_reservedand routes the oldinternal_-prefixed lemma through it.Contract.leanadds the per-function seamcompileFunctionSpec_correct_..._of_reservedand renames/populates-table connectors toInternalTableNamesReserved_of_internalFunctions_append/_of_helpers_append_compiledInternalTable.PrintAxioms.leanandcheck_proof_length.pyare updated for the new public theorems.Reviewed by Cursor Bugbot for commit 6a005a2. Bugbot is set up for automated code reviews on this repo. Configure here.