Skip to the content.

0005: Per-claim axioms read from the built environment

Status: accepted. Author: Claude, the lean-pkg operations agent, drafting for Le Chen. Created: 2026-10-17. Decided: accepted 2026-10-18 by Le Chen, with the answers recorded under Open questions. Implemented in: (release).

Summary

The lower-tier receipt gains an optional, additive key claim_axioms {checked, nonstandard: [{decl, axioms}], missing}: the axioms of every claim in claims.yaml, read by core Lean’s collectAxioms from the built environment after the build, instead of only the #print axioms text for the theorems an author chose to print. When the key is present, receipt slurm|systemd, gate, receipt check and the page read it and refuse a missing claim, a claim on sorryAx, an unchecked claim, a disagreement with #print axioms, or an axiom outside gate.axioms_allowed. A receipt without it is valid exactly as before. The implementation pull request is the one that adds this file.

Motivation

The receipt’s axioms field is the union of the #print axioms output in the verify log. That output covers the declarations the package’s Axioms.lean lists, which the author writes by hand. A claim the author did not list was never checked: a reusable theorem resting on sorryAx from a dependency, or on a custom axiom, could sit in claims.yaml while the receipt said axioms: [propext]. The Equational Theories Project closes the same gap inside Lean: its @[equational_result] attribute runs collectAxioms on every counted result and refuses anything outside the standard three (a study of that project, 2026-10-17). lean-pkg cannot ask every package to depend on a lean-pkg attribute (decision 0001, files and git only), but it can run the same check from outside, after the build.

Design

No command, flag or --json key is removed or renamed. No schema version changes: the key is additive, and RECEIPT_FIELDS is unchanged.

Compatibility and migration

Trust model

Yes, this changes what a receipt with the key proves and what gate refuses. It only adds refusals: a receipt gate accepted before is still accepted (it has no key), and a receipt with the key is accepted only if, in addition to everything before, every claim’s axioms are standard or allowed. What a dishonest submitter could get accepted that they could not before: nothing new; the key rests on the same executor and the same sealed log as axioms. What it does not stop: an executor who writes the lines by hand (as for every log line), or who drops the probe and submits a receipt without the key (the page then shows no per-claim line; receipt check shows no claim-axioms check). Pinning tests: tests/test_claim_axioms.py (a real core-Lean fixture with a clean, a sorried, a custom-axiom and a missing claim, in the bwrap sandbox; an edited line breaking the seal; a tampered key refused by gate and receipt check; an old receipt still valid).

Alternatives

Open questions

  1. Should gate eventually require claim_axioms for a package with claims.yaml (a schema change)? Decided (2026-10-18): no, not yet. The key stays optional until 1.0, when it is revisited.
  2. Should superseded claims be exempt? Today every claim is checked; claims check already requires a superseded claim’s decl to stay in its file. Decided (2026-10-18): no. Every claim is checked, superseded ones included. Also decided: a bare or partial claim name refuses the receipt (fail closed); the 0.14.0 upgrade record tells authors to qualify the names in claims.yaml before adopting the new verify script.
  3. Should the comparator tier record the same per-claim list from its export?

AI assistance

Drafted and implemented by Claude (Anthropic), the lean-pkg operations agent, from item 1 of a study of the Equational Theories Project that Le Chen approved; to be reviewed and decided by the maintainer.