Trust boundary checks - #7
Merged
Merged
Conversation
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>
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.
Supports CompElliptic's independently re-checkable trust principle with a build-time check, and corrects the trust-discipline wording in its prose description.
assert_axiomsand the trust-boundary censusAdds
assert_axioms(CompElliptic/Meta/AxiomCheck.lean), a concise sibling of Mathlib'sassert_no_sorrybuilt on the samecollectAxiomsmachinery.assert_axioms foofails the build unlessfoodepends only on the standard axioms (propext/Classical.choice/Quot.sound);assert_axioms foo +nativeadditionally permitsnative_decidecompiler-trust axioms. It matches on the axiom tier (anative_decidename component), not the pretty-printed axiom name. That ensures that it stays green across toolchain bumps that rename thenative_decideaxiom, while still failing the moment a declaration reaches beyond its declared tier (asorry, an unexpected axiom, ornative_decidewhere none was permitted).CompElliptic/TrustBoundary.leanusesassert_axiomsas 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 plainlake build— and therefore CI — enforces it.README trust-discipline wording
native_decide"adds theLean.ofReduceBoolaxiom": current toolchains add a per-declaration compiler-trust axiom instead, and the exact name is not something a reader should rely on.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 thatscripts/gen_*.pystill reproduces the committed field files.🤖 Claude Opus 4.8