Skip to the content.

← Command reference · lean-pkg coverage · CLI overview

lean-pkg coverage check

validate coverage.yaml against claims.yaml and the receipts at HEAD; exit 0/1; read-only (–file without NAME: offline, no registry).

Usage

lean-pkg coverage check [--file PATH] [--claims PATH] [--comparator PATH]
                        [--allow-private-manuscript] [--json] [NAME]

Arguments and flags

Argument or flag Description
NAME  
--file PATH check this working-copy file instead of coverage.yaml committed at HEAD (claim ids and receipts are still read at HEAD); without NAME: the offline check, which reads no registry and no receipt and says which checks it skipped
--claims PATH offline only (no NAME): the claims file the rows’ claim ids are checked against
--comparator PATH offline only (no NAME): a comparator configuration whose theorems must each be the declaration of a claim a row names or of an internal or reusable claim (repeat for each configuration)
--allow-private-manuscript accept manuscript.version ‘unposted’ (a private draft); the output says so

Details

Form What it does Key flags
coverage check NAME read-only: validate coverage.yaml (schema coverage/1, committed at HEAD; --file PATH checks a working copy) against claims.yaml and the receipts at HEAD: exact key sets, closed enums (same-assumptions, inputs-supplied, outside; cluster easley), duplicate keys refused (x- extension keys excepted, at the top level and on rows only: shape-checked, never read, judged or shown; one line after the verdict names each with where it appears; Extension keys), claim ids that exist and are not superseded, inputs for every inputs-supplied row, at least one outside row or nothing_excluded: {reason}, a posted manuscript version (arXiv:IDvN or {repo, commit, sha256}; unposted only with --allow-private-manuscript), every compute job a committed Slurm receipt; the lean-scope-page rules that apply: no placeholder text (FILL-ME, TODO, TBD, FIXME, XXX), every named claim’s file committed at HEAD, every theorem of the recorded comparator receipt the declaration of a claim some row names or of an internal or reusable claim (an experimental or superseded one is refused, its status named), every configuration there with definition_names carrying judged_as.reviewer; kind: library (no manuscript; rows {title, claims, note?}, the library’s main results; manuscript, nothing_excluded and paper row keys refused); exit 0 or 1; --json {ok, name, file, kind, rows, counts, conclusions, witnesses, manuscript, private_manuscript, errors[], warnings[], extension_keys[]} (manuscript, counts and conclusions null for a library; conclusions is {full, weaker, special-case} over the rows with a Lean counterpart, from the optional conclusion key of proposal 0010; witnesses is {rows, checked, unchecked, mismatch}: the rows naming a witness (proposal 0011), each the witness of one of the row’s claims, and the claims ledger’s state of each, computed only when a row names one; the states are null in the offline form); a warning, never an error, for each assumption a theorem mapped by a same-assumptions or inputs-supplied row takes that is not listed: a binder headed by a Prop def of the package (its module’s file committed at HEAD), per the hyp-decl lines of the gate receipt’s sealed verify log, that neither the claim’s hypotheses nor a {hypothesis, text} input of the row names (proposal 0003, open question 7; no log or no hyp-probe/1 section: no warning; Unlisted assumptions) (The verification page) [--file PATH] [--allow-private-manuscript]
coverage check --file PATH (no NAME) the offline form (#328), before the package is registered or the files are committed: reads no registry record and no receipt. Runs every check above that needs neither: the coverage/1 schema with its length limits and placeholder rule, the manuscript version (--allow-private-manuscript as above), lean_pkg_version; with --claims PATH, the claims file’s claims/1 schema (the coverage package must be its package), each row’s claim ids (present, not superseded) and a warning for each reusable claim no row names; with --comparator PATH (repeatable: pass every configuration), each configuration theorem the declaration of a claim a row names or of an internal or reusable claim (a configuration lean-pkg-signoff.json beside the coverage file marks smoke is exempt; skipped when the Lean file of a named, internal or reusable claim is not readable under the coverage file’s directory). The checks that need the registry record, the checkout at HEAD or a receipt (compute receipts, claim files committed at HEAD, definition sign-off, the e-print baseline) are listed as skipped, as are those whose input was not given. NAME is optional only here: with NAME, --file keeps its meaning (claim ids and receipts read at HEAD), and --claims/--comparator are a usage error (exit 2); no NAME and no --file is a usage error too. The verdict is the first and the last line; exit 0 or 1; --json the payload above plus offline: true, claims_file, comparator[], checks[{check, status pass\|fail\|warn\|skipped, detail}], skipped[] (name is the file’s package). verify runs this check at HEAD as its preflight --file PATH [--claims PATH] [--comparator PATH ...] [--allow-private-manuscript]

JSON output

Top-level keys of --json, as recorded in the golden contract (tests/golden/json-keys.json):

Examples

Validate coverage.yaml committed at HEAD (the paper-to-Lean map that page renders).

lean-pkg coverage check my-proof

Check the working copy before committing it.

lean-pkg coverage check my-proof --file coverage.yaml

The offline form, before the package is registered or the files are committed; reads no registry and no receipt, and lists the checks it skipped.

lean-pkg coverage check --file coverage.yaml --claims claims.yaml --comparator comparator.json

Sample output:

coverage.yaml: coverage: OK; library; 1 main result(s); offline, 4 check(s) skipped
  pass: schema: coverage/1 schema and length limits
  ...
  pass: comparator theorems: each of 1 theorem(s) in 1 configuration(s) is the declaration of a claim a row names or of an internal or reusable claim (R11)
  skipped: compute receipts: each compute job is a receipt committed under .lean-receipts/: needs the receipts at HEAD
  ...
coverage.yaml: coverage: OK; library; 1 main result(s); offline, 4 check(s) skipped