Skip to content

meta: port ironwood's extended AxiomCheck - #20

Merged
daira merged 1 commit into
mainfrom
axiomcheck-port
Aug 11, 2026
Merged

daira merged 1 commit into
mainfrom
axiomcheck-port

Conversation

@daira

@daira daira commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Replaces the minimal assert_axioms/assert_computable with ironwood's extended version (Zcash/Meta/AxiomCheck.lean), which the two repos now share up to repo-specific references. This is groundwork for re-checking the build with an independent kernel implementation (nanoda): the owner-naming census makes the exact per-use native_decide axiom names a build-checked artifact, which is what an external checker's permitted-axiom list needs to pin.

What the extended version adds:

  • +native(D₁, ...) owner lists — a bare +native permitted a native_decide axiom brought in by any declaration entering the dependency cone; entries now name the owning declarations of exactly the axioms reached, and a stale or incomplete list fails the build with the list to write.
  • Provenance checks — an alleged native auxiliary must sit in the owner's own footprint, come from the same module, and start strictly inside the owner's declaration range. This rejects hand-written or macro-emitted axioms merely named like compiler auxiliaries.
  • Compiled-body override rejection@[implemented_by]/@[extern] swap what runs without changing the axiom footprint; both commands reject a censused target carrying one, and any override anywhere in the non-ambient import closure.
  • Native evaluated-surface check — a native_decide certificate must not have evaluated a partial declaration (the kernel constant has no body at all). The walk follows @[csimp] replacements, so a future registration of padd_eq_paddFast cannot open a gap.
  • assert_computable hardening — rejects unsafe definitions (which can inhabit any type by bare self-reference) and an over-broad +choice.
  • Fully qualified entry names — entries no longer depend on the census file's opens.

The regression tests for forged axioms, doctored @[implemented_by] bodies, and partial-backed certificates are ported to a new MetaCheck library outside CompElliptic/: they never enter the production import graph, the source-level sweeps (check_csimp_census.sh, check_native_optin.py) do not scan them, and a plain lake build still runs them.

TrustBoundary's six +native entries now name their owners, build-checked as exact: each Tonelli–Shanks datum owns the two certificates of its primitivity check (ax_1, ax_2), and the curve-order entries reach exactly the nsmul witnesses' axioms (ax_1_1).

🤖 Claude Fable 5

Comment thread lakefile.lean Outdated

@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 marked this pull request as ready for review August 10, 2026 04:17

@TalDerei TalDerei left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ACK port

Replace the minimal assert_axioms/assert_computable with ironwood's
extended version. The `+native` flag now requires naming the owning
declaration(s) of exactly the native_decide axioms the entry reaches,
with provenance checks that reject an axiom merely named like a
compiler auxiliary. Both commands also reject compiled-body overrides
(`@[implemented_by]`, `@[extern]`) anywhere in the import closure,
reject `partial` declarations inside a certificate's evaluated term,
and require fully qualified entry names.

The regression tests live in a new MetaCheck library outside
CompElliptic/, so their forged axioms never enter the production
import graph and the source-level sweep scripts do not scan them.

TrustBoundary's `+native` entries now name their owners: each
Tonelli–Shanks datum owns the two certificates of its primitivity
check, and the curve-order entries reach exactly the nsmul witnesses.

Co-authored-by: Claude Fable 5 <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-reACK

@daira
daira merged commit ac9b8e3 into main Aug 11, 2026
6 checks passed
@daira
daira deleted the axiomcheck-port branch August 11, 2026 08:11
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.

2 participants