Skip to content

meta: adopt and enforce the csimp axiom-census rule - #16

Merged
daira merged 1 commit into
mainfrom
csimp-census-rule
Jul 27, 2026
Merged

meta: adopt and enforce the csimp axiom-census rule#16
daira merged 1 commit into
mainfrom
csimp-census-rule

Conversation

@daira

@daira daira commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Adopts the rule that every @[csimp] replacement lemma must carry its own assert_axioms entry in CompElliptic/TrustBoundary.lean, and enforces it with scripts/check_csimp_census.sh (new CI job). Rationale: the axioms of a csimp proof are not propagated into downstream native_decide axiom 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: what native_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

@daira
daira force-pushed the csimp-census-rule branch 2 times, most recently from 38865fb to ad8f655 Compare July 27, 2026 12:37
Comment thread scripts/check_csimp_census.sh Outdated
Comment thread scripts/check_csimp_census.sh
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
daira force-pushed the csimp-census-rule branch from ad8f655 to 78feb8c Compare July 27, 2026 12:54
@daira
daira marked this pull request as ready for review July 27, 2026 12:56

@daira daira left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@daira
daira merged commit 7032af8 into main Jul 27, 2026
5 checks passed
@daira
daira deleted the csimp-census-rule branch July 27, 2026 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant