What a lean-pkg page lets you believe, what it asks you to take on trust, and how to check it yourself.
This page is for a referee or reader who meets a Lean verification page made
with lean-pkg and wants to know how much it is worth. It is written from the
code: each check is named by the module and function that enforces it
(cli is src/lean_pkg/cli.py, and so on), so it can be read. Where
lean-pkg relies on honesty rather than on a check, it says so.
The short version: lean-pkg checks that its evidence files agree with one another and with one git commit. It does not re-run Lean when it validates a receipt. A receipt is an unsigned record of a run, not a proof. The proof is the Lean source at the bound commit, and the only way to remove trust in the person who ran the checks is to run them again, which the last section shows.
What each artifact certifies
| Artifact | Certifies (checked by lean-pkg) | Does not certify | Trusted |
|---|---|---|---|
Lower-tier gate receipt (.lean-receipts/<c12>-<job>.json) |
binds one commit X; its lean_toolchain equals lean-toolchain committed at X and its mathlib_rev the Mathlib rev in lake-manifest.json at X; sorry_count is 0; axioms is a subset of the allowed set (default propext, Quot.sound, Classical.choice); with the additive claim_axioms key, the axioms of every claim in claims.yaml at X (none missing, none on sorryAx, the rest allowed); HEAD is X or an admitted descendant (gate.validate_receipt); its redacted verify log <c12>-<job>-verify.redacted.log (or .gz) is present and hashes to report_sha256 (gate.report_log_check): a receipt whose log is missing or unreadable is refused by gate, gate --check and every consumer of a recorded receipt (the claims ledger and so promote, next, comparator, palomar prepare, index add and index check) |
that the build actually ran: the counts are copied from a log the executor wrote; anything about statements | the executor (person, script, host) that ran lake build and #print axioms and wrote the log |
Hypotheses section (hyp-probe/1 in the sealed verify log; proposal 0003) |
at writing time, its structure: complete (hyp-done last, its counts matching), each line one JSON object with its tag’s exact keys, none printed twice, none altered by redaction (hypotheses.judge_structure); afterwards it is sealed by report_sha256 like the rest of the log, and every reader takes it only from a log that hashes to it (gate.sealed_log_text). For a claim that lists hypotheses, the claims ledger, the page, status, receipt check and the index judge from these facts alone: each listed hypothesis heads an explicit binder of the declaration and is a def or inductive Prop; it is discharged only at the promote stage, by a corollary whose Challenge type is the claim’s minus exactly its binders (and a proof of it, when it takes no parameters), each credited by one comparator name in the same build (hypotheses.evaluate); a claim with hypotheses is conditional, never verified |
that the executor’s probe printed what the built environment holds: the facts are text in a log the executor wrote, as the build counts are; what a hypothesis says; that every assumption of a theorem is listed (an unlisted one is only warned about, and only when its head is a Prop def of the package: unlisted assumptions) |
the executor, as for the lower-tier receipt; the author’s choice of which binders are assumptions; the statements module (comparator) |
Statements module declaration (statements_module in claims.yaml; #369) |
one Lean module name of the package (not a list, a path or a Mathlib module); at the commit read (claims sync, claims check, the gate’s claims check, receipt check), its file is committed and, as lean-pkg’s text scanner reads it, holds only Prop definitions (def, abbrev, inductive, structure with a written type ending in Prop), no theorem, axiom, opaque, instance, example, sorry or other command, and imports only Mathlib’s vocabulary; palomar check warns for each Challenge import beyond Mathlib, naming this module apart from any other |
what each hypothesis says (trivially true or false changes what a theorem means); what the elaborator makes of the text (a text check); that Palomar accepts a Challenge importing it (not confirmed) | the author’s declaration and the module’s text: it is part of the trusted statement, like the Challenge, and the page links it (comparator) |
Slurm receipt (receipt slurm) |
at writing time only: sacct showed the job COMPLETED with exit 0:0 (receipt.check_job); the job’s stdout seal matches the log byte for byte and lake-manifest.json was unchanged during the job (receipt.check_stdout); stderr was empty; the log shows a finished build and no module restored from Lake’s cache; with --seal-sacct, also later: the record sacct gave is committed beside the receipt (slurm_sacct), and gate and receipt check refuse the receipt unless it still hashes to the block and shows the job COMPLETED 0:0 in a window containing generated_at (receipt.sacct_seal_problem) |
anything after writing: gate never runs sacct again, and a reader cannot, since accounting is private to the cluster. job_id: slurm-<J> is a string; nothing outside the cluster ties it to a real job. With --seal-sacct, that the sealed record is what the cluster said: it rests on whoever ran sacct or saved --sacct-file |
the person who ran receipt slurm, the cluster’s accounting, and the account that ran the job |
systemd receipt (receipt systemd --run) |
the unit’s recorded terminal state, exit 0, no restart, resource caps, and a clean checkout at X before and after the run (receipt_systemd.check_unit); the host appears only as a hashed label |
that the host is any particular machine | the person and the host that ran it |
Comparator receipt (lean-pkg receipt comparator, schema comparator-receipt/2) |
lists exactly the comparator*.json configurations tracked at X; each configuration’s bytes and fields equal the receipt’s; each log hashes to log_sha256 and contains the full line Your solution is okay!; permitted axioms within the allowed set; tool pins well-formed; both tiers bind the same commit (gate.validate_comparator, core.comparator_pass). When the runner wrote it, lake comparator checked, for every theorem_names entry, that the Solution proves exactly the Challenge statement with only the permitted axioms, and replayed the proof in Lean’s kernel and in independent kernels (NanoDa and con-ron for the toolchain mechanism; nanoda for legacy). A Slurm claim (job_id J, host_policy Slurm job J ...) counts only with its slurm_sacct seal: lean-pkg receipt comparator --seal-sacct found J COMPLETED with exit 0:0 in a window containing the run, under the sealing account and on the receipt’s node where known, and the sealed record committed beside the receipt still hashes and parses to that (receipt.sacct_seal_problem) |
validation re-reads hashes and the PASS line; it does not re-run the comparator (promote says so: “not re-run”). That the Challenge says what the paper says. Theorems not listed in a configuration. The body of a definition hole (definition_names). An unsealed Slurm claim: it is only the SLURM_JOB_ID the shell had |
the comparator and the kernels; the person who wrote the Challenge; the runner of lean-pkg receipt comparator |
Olean manifest (olean_manifest in the comparator receipt) |
the runner refused the run if the package’s compiled modules under .lake/build/lib changed between the build stage and the end of the comparison (comparator_receipt.check_oleans) |
no validator reads it after the run; it is a statement by the runner about its own run | the runner |
Definition-hole sign-off (lean-pkg-signoff.json) |
a non-empty reviewer name that is not a model or agent token, a date, and config_sha256 equal to the configuration’s bytes at X, covering every hole (holes.check_definition_holes, holes.check_reviewer) |
that the reviewer exists, read the bodies, or judged them correctly: “This is a declaration, not a verification” | the named human reviewer |
coverage.yaml rows, and the rule R11 |
the file is strict coverage/1; each claim a row names is in claims.yaml at HEAD with its file committed; every theorem the recorded comparator receipt compared is the declaration of a claim some row names, or of a claim claims.yaml marks internal or reusable (R11, coverage.scope_problems); a compute job is backed by a committed receipt with job_id: slurm-<J>, or by a comparator receipt whose Slurm claim carries a valid sacct seal (coverage.compute_backing, coverage.slurm_job_of); an input {hypothesis, text} names a hypothesis of a claim its row names (coverage.input_hypothesis_problems); a warning, never a refusal, for an assumption a mapped theorem takes that neither its claim nor its row lists, when the gate receipt’s sealed log shows its head is a Prop def of the package (coverage.unlisted_assumption_warnings) |
the class (same-assumptions, inputs-supplied, outside), the conclusion strength (conclusion, conclusion_scope; proposal 0010), which claim a row’s witness speaks for (proposal 0011; the witness’s type itself is checked by the probe), the summary, the notes and an input’s text are the authors’ words; that a row’s Lean statement matches the paper’s result; that every assumption is listed |
the authors |
Verification page (lean-pkg page) |
every number and status word is rendered from the data above; the word verified appears only when the claims ledger at the promote stage closes the row, and never alone on a row with a conditional claim, which reads Conditional. “Verified under assumptions … Outstanding: …” (page._conditional_text), and a row says its statement was compared only when a passing comparator configuration at the gate-bound commit judged every claim it names (page._row_compared); the Lean statement shown is read from the source at the gate-bound commit (the Challenge module when the comparator compared it), or the file is linked when it cannot be read reliably (page._lean_statement, lean_scan.statement); page --check fails when the README block differs from a fresh render (page.render_all, page.readme_problems) |
the page renders the receipts; it does not validate them again (that is gate, comparator and index check) and does not run Lean. Its first line tells the reader which statements to compare by eye (page.TRUST_LINE), and What the checks establish says what no tool checks. The paper statement (paper.statement in coverage.yaml) is the authors’ transcription, not checked against the manuscript |
lean-pkg’s renderer, and the registry record it reads (status, recorded receipts) |
Index entry (index/<name>/entry.yaml) |
index check --clone clones the repository, checks out the pin and runs the same validators as gate and comparator on the receipts as first committed in the pin or an evidence-only descendant; the index copies equal those bytes; trust is recomputed and must equal the stated one; comparator trust needs every headline judged (index.check_entry, index.derive, index.compute_trust) |
as for the receipts it carries; Palomar and Reservoir lookups are skipped, not failed, when the network is unreachable; the DOI is checked for form only |
the receipts’ authors; the git host; Palomar’s API |
Palomar (index trust palomar, record palomar-registered) |
an entry is graded palomar when it lists a Palomar id; index check fetches the entry and refuses one registered for another commit or repository (index.network_checks) |
lean-pkg runs Palomar’s checks only as a prediction (palomar check, “predictive, non-authoritative”); with no network the id is not verified; compute_trust grades palomar before looking at the other tiers |
Palomar’s verifier and registry |
Publication hold (update --withdraw-publication) |
while it is set, promote and the promote checklist of publish refuse (cli.promote_checklist), and next recommends nothing to publish |
it does not unpublish anything: a repository once public may have been cloned or forked | the owner who set it; the registry file |
The trust chain
A page made with lean-pkg is only as good as each of these. Each is named with what it is trusted for.
- The Lean kernel. Lean’s own kernel accepted the proofs during the
build. For the comparator tier, the proofs were also replayed in a second,
independently written kernel (NanoDa, and con-ron for the
toolchainmechanism; the pinned nanoda forlegacy), so a bug in one kernel alone does not pass. - The comparator (
lake comparatorfrom the project’s own toolchain, or the pinnedleanprover/comparatorforlegacy). Trusted to compare the exported Challenge and Solution statements correctly and to enforce the permitted axioms. lean-pkg vendors the driver scripts (scripts/verify-comparator.sh,scripts/comparator-check.sh) with their local changes listed in their headers. - The toolchain pin.
lean-toolchainat the bound commit names the Lean release; every validator compares the receipt against it (gate.check_toolchain_at). The toolchain itself is downloaded by elan and trusted as released, kernel included. - The toolchain advisories. Lean releases occasionally ship with a
kernel or runtime soundness bug that a later point release fixes. lean-pkg
ships a dated list of them,
toolchain-advisories.yaml, each entry citing the Lean release notes and the lean4 issue or pull request.gate,gate --check,receipt checkandpalomar checkprint a WARN line (and listtoolchain_advisoriesin--json) when the toolchain is on it, and the page says so under How this was checked (never a reason forpage --checkto call a page stale). A warning, never a refusal: the proofs may well be sound, and the comparator tier’s independent kernels catch several of these bugs. The list is trusted to be complete only as far as its maintainers have read upstream; a toolchain not on it is not thereby certified. - The Mathlib pin.
lake-manifest.jsonat the bound commit pins Mathlib to a commit. Mathlib’s own proofs are checked by the same kernels when the package is built against it; its definitions are trusted to mean what their names say, which is the same trust every Mathlib user extends. - The person running the gate. The lower-tier receipt is written from a
log the executor’s script produced. lean-pkg checks the log’s internal
consistency and binding, not that Lean produced it. A Challenge statement
is chosen by a person, and its fidelity to the paper is a human judgement.
With the
claim_axiomskey, the axioms of every claim come from core Lean’scollectAxiomsrun on the built environment after the build, not only from the#print axiomstext of the theorems someone printed; the lines are in the same sealed log, so they rest on the same executor. - The host. The receipts were produced on some machine. A compromised host can produce any log. The systemd and comparator receipts name the host (as a hashed label or a chosen public label), which identifies it but does not vouch for it.
- Git history. Commits are identified by SHA-1 object names, and every binding (receipt to commit, descendant rules, config and log bytes) is judged on git objects, never on the working tree. lean-pkg does not check commit signatures.
- The git host and Zenodo. The public repository host keeps the commits
available;
index addrefuses a pin no public branch contains. A Zenodo DOI names an archived release and the commit it was cut from; lean-pkg records the DOI and that commit and checks their form, but does not download the archive and compare it.
Positioning against Lean’s own checks
Lean v4.35.0 (2026-10-12) ships lake check, which replays a build’s
export through Lean’s kernel and refuses non-standard axioms, and
lake comparator; with --paranoid both also run the independent kernels
the toolchain now bundles. Those are items 1 and 2 of the chain above, and
lean-pkg does not compete with them: its toolchain comparator mechanism
already runs lake comparator. What a check run does not do is say which
commit, toolchain and Mathlib pin it judged, who ran it and where, whether
its Challenge is the result the paper claims, or how a referee re-checks it
later. Those are lean-pkg’s receipts, coverage rows, page and
receipt check. lean-pkg will consume lake check as a receipt producer
once its result can be bound to a commit (v4.35.0 documents no
machine-readable report), and will then drop what it duplicates. The FAQ
entry What does lean-pkg add now that Lean has lake check --paranoid?
separates what has shipped from what the Lean FRO has announced.
Threats
Covered
- A proof of some other statement than the one shown. The comparator
checks that each listed Solution theorem has exactly the statement of its
Challenge namesake, so the statement a reader reads in
Challenge.leanis the one proved. The page prints which theorems were compared, and R11 requires each to belong to a row, so none is hidden. sorry. The lower tier refusessorry_countother than 0; the receipt writers count Lean’s owndeclaration uses 'sorry'warnings and refuse a declared count below them (receipt.py); a module restored from Lake’s cache (whose warnings are not printed) is refused (Reused/Replayed/Unpackedin the build section).- Extra axioms, including the one
native_decideadds. The axioms must be a subset of the allowed set. Anative_decideproof rests on an extra axiom (under Lean v4.35.0-rc2,#print axiomsreports an auxiliary<name>._native.native_decide.ax_1_1), outside the default set, so it is refused unless the package widensgate.axioms_allowed. The comparator enforcespermitted_axiomsper configuration, and both are checked against the same allowed set. - An edited receipt or log. Every log is bound by its SHA-256 to the
receipt; every configuration by its bytes at the bound commit. Editing one
without the other is refused, whether the edit is committed (the log no
longer hashes to the receipt) or only in the working tree (
gateandcomparatorrefuse a log that differs from its copy committed at HEAD). - A receipt moved to another commit. A receipt names a 40-hex commit and
is accepted only at that commit or at a descendant whose difference is
evidence only (
gate.evidence_only_descendant), or, when the package opted in, a docs-only descendant (gate.docs_only_descendant). A receipt copied onto unrelated history is refused. - An opt-in granted after the fact. The docs-only opt-in is
lean-pkg-binding.yamlread at the bound commit X and nowhere else, by every reader (gate,receipt check,index check): a copy added after X grants nothing, a later edit or removal of it is drift, a copy under.lean-receipts/, at the repository root above a subdirectory package or in the referee’s working tree is never read, and a file at X that does not validate does not opt in. - Source edits after the gate. Any change under the package directory
other than
.lean-receipts/(and the derived keys offormalization.yaml) is drift. Under the docs-only opt-in, a change to any build input (.leanfiles the lakefile’s targets own, lakefiles,lake-manifest.json,lean-toolchain, declaredbuild_inputs, files the checker names, symlinks,.gitattributesand others) is still drift. Lake build caches and compiled artifacts are never evidence. - A bare job id presented as a cluster run. A receipt whose
job_idis a bare number never backs a site acknowledgment; onlyslurm-<J>, whichreceipt slurmwrites aftersacct, or a comparator receipt whose Slurm claimlean-pkg receipt comparator --seal-sacctcorroborated withsacct(coverage.slurm_job_of). A comparator receipt that only carriesSLURM_JOB_ID(set by any shell) is still a valid comparator receipt, but backs nocomputejob; neither does a seal of another job, of a window that does not contain the run, or one edited after it was written. - A lower-tier receipt without its log.
report_sha256must hash a log that is there: a receipt whose sealed verify log is missing or unreadable is refused wherever a lower-tier receipt is judged, with the path to restore it to (Restoring preserved evidence). - A conditional result shown as verified. A claim that lists
hypothesesisconditionalin the claims ledger, neververified; the page,status,receipt check, the index andsearchsay so, and none prints verified alone on such a row, headline or claim. A hypothesis counts as discharged only through facts in the sealed log: a corollary whose Challenge type drops exactly its binders, compared in the same comparator build at the promote stage. Editing the facts after the seal breaksreport_sha256, and a log without them leaves the claim open (hypotheses-unchecked), never verified (Conditional claims).
Not covered: lean-pkg relies on honesty here
- A Challenge that does not say what the paper says, for example a weakened statement (a dropped hypothesis, a special case, a vacuous premise). No tool compares Lean with mathematics. The page says so in a fixed paragraph. The comparator guide lists what a human reviewer must check.
- What a hypothesis says. A conditional claim is only as meaningful as its hypotheses. A hypothesis that is trivially true, or false, changes what the theorem means, and no tool judges that: the statements module is trusted like the Challenge, and the page links each hypothesis to its source so a reader can read it (A statements module for conditional claims).
- An unlisted assumption. Which binders count as assumptions is the
author’s choice. An assumption the theorem takes but no one lists is not
hidden (the Lean statement shows it and the comparator checks it), but the
ledger then calls the claim verified.
coverage checkwarns, and never refuses, when the gate receipt’s sealed log shows such a binder headed by aPropdefof the package; a head from Mathlib or another dependency, or an inductiveProp, is not warned about (Unlisted assumptions). - A fabricated run. Validation checks hashes, field agreement and the
PASS line; it never re-runs Lean (
gate.validate_comparator;promoteprints “not re-run”). Anyone can write a log that contains the PASS line, hash it, and write a receipt that validates. The defence is to re-run. - A fabricated cluster claim.
slurm-<J>is a string.receipt slurmandlean-pkg receipt comparator --seal-sacctransacctonce on the author’s side (or read a saved copy,--sacct-file); nobody can repeat that from outside the cluster, and a saved copy is text an author could write. The seal moves a comparator receipt’s claim from “the shell hadSLURM_JOB_IDset” to “an accounting record of that job, consistent with the run, was sealed”, the same bar as the lower tier. A site’s sentence on a page (a cluster’s acknowledgment) therefore means “the author declares these jobs ran on that site and kept receipts and accounting records for them”. - A fabricated GitHub Actions run, at level 1. A receipt’s
ciblock (Theciblock) is checked offline for consistency only: with itself, the commit and the committed log. Every value in it (run id, repository, event, runner) is text the author could write, so a level-1 receipt is as forgeable as a hand-writtenslurm-<J>one, and gets exactly what that gets: acomputejob backed, and no sentence on the page. The GitHub Actions sentence renders only from a run corroborated against GitHub’s public record (level 2,--corroborate; without it a README carrying the sentence failspage --check). - What level 2 proves, and what it does not.
--corroborateasks GitHub’s public REST API, not the author: the attempt the receipt names completed with success, on the receipt’s commit, in the package’s own repository by numeric id (a fork’s run, or another repository’s, does not back), in a job on a GitHub-hosted runner, running lean-pkg’sverify.ymlat a 40-hex commit whose content is a released one (the shipped pin list), and that job wrote exactly onelean-pkg-receiptannotation whose hashes are the committed receipt and log bytes. So a level-2 receipt needs a real run, and a fabricated log beside a real run is refused. It does not prove the mathematics: build code (lakefile, dependencies) runs in the same job beforereceipt ciand could alter what it reads or emit a second annotation (a second one is refused; the alteration is not prevented). It trusts GitHub (the runner, the API). And it decays: once the run is deleted or its records expire (90 days by default) level 2 fails with the reason named, and the next--corroboraterender drops the sentence; nothing records the level. Every failed request (404, 403 or 429, a network error, a redirect offapi.github.com) fails closed. A token, when set, only raises the rate limit and is never printed or written (Corroborating the run).lean-pkg receipt ciwrites the receipt in the job with no token; lean-pkg’s reusableverify.ymlholdscontents: readandid-token: write(the OIDC token is read for itsjob_workflow_refclaim and never kept), nevercontents: write, and CI never pushes: the author collects the receipt withreceipt ci --collect, under their ownghlogin. Build code in the same job runs beforereceipt ciand could alter what it reads, as on a cluster. - A malicious package author. The author controls the source, the Challenge, the configurations, the logs and the host. The comparator receipt binds the configuration bytes, so the list of compared theorems is fixed, but which theorems to list is the author’s choice. A definition hole’s sign-off names a reviewer that lean-pkg cannot verify.
- A compromised host or toolchain. A host that rewrites Lean’s output, or a modified toolchain, produces receipts that validate. The second kernel helps only if the kernels are themselves intact.
- Files the build reads that the docs-only rule cannot see. A package
that reads data at elaboration time (
include_str, a file loaded by a macro) must list it inbuild_inputs; lean-pkg cannot check the list is complete. Without the opt-in this does not arise. With it, the opt-in and the declared inputs are committed at X, public and the author’s: a reader sees them, andreceipt checkapplies them by default (a referee who does not accept them passes--evidence-only). - The registry. The page reads the package’s status and recorded receipts from the author’s registry, which is private. A reader sees the rendered result, not the record.
Re-verify a page yourself
Do not take a receipt’s word for it: run the checks again.
You need only the public repository, a Linux machine, the Lean toolchain the
package pins (elan installs it), bwrap for the comparator, and lean-pkg
(pipx install lean-pkg). No lean-pkg
registry and no shared account. These steps were run end to end on a small
package with no Mathlib; with Mathlib add lake exe cache get before each
build.
1. Clone and find the bound commit. The page’s Reproduce section prints
it as git checkout <X> # the commit the build check binds (pages written before 0.11: # the commit the gate receipt binds).
git clone https://github.com/OWNER/REPO && cd REPO
X=<the 40-hex commit from the page>
git merge-base --is-ancestor "$X" HEAD && echo "HEAD descends from X"
git diff --no-renames --name-status "$X" HEAD # what changed after the gate
Everything listed must be evidence (.lean-receipts/) or, for a package
that opted in to the docs-only rule (git show "$X":lean-pkg-binding.yaml
prints the opt-in when there is one), files the build does not read (the
README, coverage.yaml, notes). A .lean file, a lakefile,
lake-manifest.json or lean-toolchain in that list means the page
describes an older source than HEAD.
2. Check the pins.
git show "$X":lean-toolchain
git show "$X":lake-manifest.json | python3 -c 'import json,sys; print([(p["name"], p.get("rev")) for p in json.load(sys.stdin)["packages"]])'
They must equal lean_toolchain and mathlib_rev in the receipts, and the
toolchain and Mathlib lines of the page.
3. Check the receipt hashes. The page’s Evidence table gives the SHA-256 of each committed receipt:
sha256sum .lean-receipts/*.json
Then let lean-pkg’s own validators check the receipts, with no registry, no network and no Lean run:
lean-pkg receipt check --repo . --commit "$X"
lean-pkg receipt check --repo . --commit "$X" --json # every check with its verdict
It runs gate’s and comparator’s validators on a private clone of the
checkout, at X and at HEAD (--at REF for a tag or another ref), and prints
one line per check, PASS, FAIL or SKIP (not applicable, with the
reason), then the verdict. receipt check: PASS NAME at <X> (tier comparator; ...)
means: the lower-tier and comparator receipts bind X, HEAD is X or an
evidence-only descendant of it (only .lean-receipts/ changed, and
formalization.yaml in its derived keys only, the same exemption gate
applies; the result prints exemption applied: ... when it was needed), the
toolchain and Mathlib pins agree with
lean-toolchain and lake-manifest.json at X, every configuration, log and
redacted log hashes to what the receipts say and each log has its PASS line,
the comparator configurations at X name every reusable theorem claim
(by the naming rule, or by the claim’s explicit judged_as, checked against
the configurations),
coverage.yaml accounts for every compared theorem (R11), and the page block
states exactly what the receipts record. The table of checks is in
Checking a published package’s receipts.
Exit 0 only when no check fails.
A tag on the evidence commit itself passes without any option, even though
that commit refreshed formalization.yaml. A package that committed its
README, coverage.yaml or notes after the evidence is a docs-only
descendant. When the author committed lean-pkg-binding.yaml at X (the
committed opt-in), receipt check applies it without a flag: an opt-in
line names the file and its declared build_inputs, the rule: line says
the docs-only rule is the author’s opt-in, committed at X, and the binding
line lists every path that changed after X. That pass means “only files
the author declared the build does not read changed”, not “nothing changed”:
read the list against step 1. The opt-in proves that the author chose the
rule at X, before the later commits, and which inputs they declared; it does
not prove that the list of inputs is complete (a file read at elaboration
time and left out of build_inputs can still change). To refuse the rule,
re-run with --evidence-only. For a package without the file (an author who
opted in only in a private registry) the binding check fails; look at step
1’s list yourself, and if every path there is a file the build does not
read, re-run with --docs-descendants: the result says that you accepted
that rule. A file at X that says false or does not validate overrides that
flag.
Steps 1 to 3 establish that the evidence is consistent. They do not establish that a run happened. Steps 4 and 5 do.
4. Rebuild and print the axioms at X, in a fresh clone (no .lake/):
git checkout --detach "$X"
lake build
lake lean Verify/Axioms.lean # or the package's own #print axioms file
The build must finish with no declaration uses 'sorry' warning, and every
#print axioms line must report a subset of the axioms the page lists.
5. Re-run the comparator at X, in the same clean clone:
COMPARATOR_RECEIPT_ALLOW_HOST=1 comparator-receipt --repo .
COMPARATOR_RECEIPT_ALLOW_HOST=1 is the explicit authorization for a run
outside a Slurm job; it is recorded in your receipt’s host_policy. Add
COMPARATOR_RECEIPT_NO_MATHLIB=1 for a package without Mathlib. The run
prints one acceptance line per kernel and Your solution is okay! for every
configuration, and writes .lean-receipts/<c12>-comparator.json in your
clone. Compare it with the published one: the same commit, mechanism,
lean_toolchain and tools, and for each configuration the same path,
sha256 and theorem_names. Then read Challenge.lean (or the configured
challenge module) against the paper: that last step is the one no tool does.
What a third party cannot reproduce
- The cluster run. A Slurm receipt’s
sacctcheck cannot be repeated outside the cluster, and the job’s raw log and stdout stay there; only the redacted log and the hashes are public. Re-running steps 4 and 5 replaces the need for them. page --check. It reads the author’s registry record (status, recorded receipts), which is private, so a reader cannot re-render the page from the repository alone.receipt checkcompares the page’s facts (the bound commit, the pins, the Evidence table, the trust boundary counts) with the receipts instead; the prose around them is the author’s.- The docs-only opt-in of a package without
lean-pkg-binding.yaml. An author who opted in only in their registry (the deprecated route) left no record in the repository.receipt checkandindex checkwithout that registry then apply the stricter evidence-only rule (receipt checkwithgate’s derived-keys exemption forformalization.yamlat the package root);receipt check --docs-descendantsapplies the docs-only rule when you have judged the later commits yourself (step 1). The committed file is reproducible: both read it at X. - The olean manifest. It describes the author’s build directory, which is not published.