Skip to content

Trust boundary checks - #7

Merged
daira merged 2 commits into
mainfrom
trust-boundary-checks
Jul 17, 2026
Merged

Trust boundary checks#7
daira merged 2 commits into
mainfrom
trust-boundary-checks

Conversation

@daira

@daira daira commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Supports CompElliptic's independently re-checkable trust principle with a build-time check, and corrects the trust-discipline wording in its prose description.

assert_axioms and the trust-boundary census

Adds assert_axioms (CompElliptic/Meta/AxiomCheck.lean), a concise sibling of Mathlib's assert_no_sorry built on the same collectAxioms machinery. assert_axioms foo fails the build unless foo depends only on the standard axioms (propext / Classical.choice / Quot.sound); assert_axioms foo +native additionally permits native_decide compiler-trust axioms. It matches on the axiom tier (a native_decide name component), not the pretty-printed axiom name. That ensures that it stays green across toolchain bumps that rename the native_decide axiom, while still failing the moment a declaration reaches beyond its declared tier (a sorry, an unexpected axiom, or native_decide where none was permitted).

CompElliptic/TrustBoundary.lean uses assert_axioms as a census of representative declarations grouped into three tiers: general theorems (standard axioms only), concrete facts checked by the kernel (Pratt certificates, standard axioms only), and concrete facts trusting the compiler (native_decide, marked +native). The census is imported by the library root, so a plain lake build — and therefore CI — enforces it.

README trust-discipline wording

  • Drops the stale claim that native_decide "adds the Lean.ofReduceBool axiom": current toolchains add a per-declaration compiler-trust axiom instead, and the exact name is not something a reader should rely on.
  • Hedges the independent-re-checking claim: a miscompiled or buggy oracle "could in principle be caught by disagreement" — the catch requires someone actually performing the independent check.
  • Cross-links the new build-checked census.

Housekeeping

The second commit removes "All rights reserved." from every file header (it was required under the 1910 Buenos Aires convention but has no effect under Berne, and every Buenos Aires signatory has been a Berne signatory since 2000). This includes the copyright line the field-file generators emit, so that scripts/gen_*.py still reproduces the committed field files.

🤖 Claude Opus 4.8

daira and others added 2 commits July 17, 2026 11:12
Add `assert_axioms`, a concise sibling of `assert_no_sorry` that pins a
declaration's trusted base to a tier — standard axioms, or standard plus
`native_decide` — by matching on the axiom kind rather than its
toolchain-dependent name. Use it in a new `CompElliptic.TrustBoundary`
census, imported by the library root so `lake build` enforces it.

Correct the README: drop the stale `Lean.ofReduceBool` claim (current
toolchains add a per-declaration `native_decide` axiom instead), and
hedge that independent re-checking catches a bad oracle only if someone
performs the check.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
The phrase was required under the 1910 Buenos Aires convention but has no
effect under Berne; every Buenos Aires signatory has been a Berne
signatory since 2000. Remove it from all file headers, including the
copyright line the field-file generators emit (so regeneration still
reproduces the committed files).

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

@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.

Self-ACK

@daira
daira merged commit 691d412 into main Jul 17, 2026
2 checks passed
@daira
daira deleted the trust-boundary-checks branch July 17, 2026 10:35
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