meta: adopt and enforce the csimp axiom-census rule - #16
Merged
Conversation
daira
force-pushed
the
csimp-census-rule
branch
2 times, most recently
from
July 27, 2026 12:37
38865fb to
ad8f655
Compare
daira
commented
Jul 27, 2026
daira
commented
Jul 27, 2026
Every @[csimp] replacement lemma must carry its own assert_axioms entry in TrustBoundary.lean: the compiler applies a csimp substitution in all downstream compiled code, but the axioms of the lemma's proof are not propagated into downstream native_decide axiom tracking (open lean4#7463), so an unchecked csimp lemma would be an axiom-smuggling channel. Adds the guard script and CI job (currently zero csimp declarations, trivially covered), notes the rule in the README's trust discussion, and commits the underlying research document (design/lean-native-trust-research.md). Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
daira
marked this pull request as ready for review
July 27, 2026 12:56
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.
Adopts the rule that every
@[csimp]replacement lemma must carry its ownassert_axiomsentry inCompElliptic/TrustBoundary.lean, and enforces it withscripts/check_csimp_census.sh(new CI job). Rationale: the axioms of a csimp proof are not propagated into downstreamnative_decideaxiom tracking (open lean4#7463), so a csimp lemma whose axioms go unchecked would be an axiom-smuggling channel invisible to every consumer's census entry. There are currently zero@[csimp]declarations, so the check passes trivially; it exists so the first one cannot land without a census check.Also commits the underlying mechanism study (
design/lean-native-trust-research.md: whatnative_decide, the IR interpreter, and precompiled dylibs actually trust, against lean4 v4.30.0 sources) and notes the rule in the README's trust discussion.The check is a guard against accidental omissions, not adversarial code; its scope note says so.
🤖 Claude Fable 5