← Command reference · lean-pkg claims · CLI overview
lean-pkg claims ledger
per-claim closure from the recorded evidence: verified only with zero diagnostics; read-only; exit 0 only when the package is ready.
Usage
lean-pkg claims ledger [--stage {gate,promote}] [--json] NAME
Arguments and flags
| Argument or flag | Description |
|---|---|
NAME |
|
--stage {gate,promote} |
the authority required: gate (lower tier) or promote (also the comparator tier for every reusable theorem and lemma; the default). Choices: gate, promote. |
Details
| Form | What it does | Key flags |
|---|---|---|
claims ledger NAME |
read-only, nothing stored: each claim (the claims file at the gate-bound commit, else the cache, else the file committed at HEAD) with named diagnostics from the recorded receipts, re-checked with gate’s and promote’s validators; a claim is verified only with zero diagnostics, else out-of-scope, blocked, unknown, open or conditional (it lists hypotheses, or inherits outstanding ones; conditional claims); the package is ready, open, failed or unknown (fails closed: no claims or no reusable claim is unknown); --stage promote (default) also requires the comparator tier for reusable theorems and lemmas, --stage gate only the lower tier; exit 0 only when ready; --json adds ledger_digest; codes and rules in Lifecycle. Manuscript findings (manuscript_findings, statement_basis: corrected; schema) are listed per claim with one summary line and --json manuscript_findings, and change no status; a lean_evidence declaration missing at the gate-bound commit is finding-evidence-missing |
[--stage gate\|promote] [--json] |
Exit codes
Exit 1 is also a negative answer here:
claims ledger NAME: the ledger is not ready
JSON output
Top-level keys of --json, as recorded in the golden contract (tests/golden/json-keys.json):
claims-ledger(exit 0):bound_commit,claims,claims_source,comparator_sha256,counts,ledger_digest,manuscript_findings,name,ok,package_status,reasons,receipt_sha256,required,schema,stage
Examples
Re-check each claim against the recorded gate and comparator receipts (promote stage, the default) and print its status with named diagnostics; an internal theorem or lemma that a comparator configuration at the gate-bound commit names, with the comparator tier clean, is judged like a reusable one (verified when its diagnostics are empty) but never required, nothing is stored, and the exit is 0 only when the package is ready.
lean-pkg claims ledger my-proof
Sample output:
my-proof: claims ledger (promote stage): READY; 1 required, 2 verified
claims from claims.yaml at 23d643ab1b53; gate-bound commit 23d643ab1b53
verified my-proof/main-bound (MyProof.main_bound)
verified my-proof/aux-bound (MyProof.aux_bound) [internal, judged by the comparator]
ledger_digest: sha256:f092217e8c62f3dfbf6f528663d5b6a484c5c2075fb03230e5d989ef5e62adfd
my-proof: claims ledger (promote stage): READY; 1 required, 2 verified
Require only the lower-tier receipt; an internal claim is judged only at the promote stage, so here it stays out-of-scope.
lean-pkg claims ledger my-proof --stage gate
Sample output:
my-proof: claims ledger (gate stage): READY; 1 required, 1 verified, 1 out-of-scope
claims from claims.yaml at 23d643ab1b53; gate-bound commit 23d643ab1b53
verified my-proof/main-bound (MyProof.main_bound)
out-of-scope my-proof/aux-bound (MyProof.aux_bound) [internal]
ledger_digest: sha256:512d404728b4332e3f2e27427c1f4482ba1256e2634520860a3244e1a69b1960
my-proof: claims ledger (gate stage): READY; 1 required, 1 verified, 1 out-of-scope