lean-pkg
Lean checks the proofs. You check the statements. lean-pkg checks the receipts.
A registry and trust gate for Lean 4 formalization packages: know which packages exist, who holds each one, and what evidence binds it to a verified commit, before anything becomes public.
A Lean project that builds with zero sorry is not yet a verified theorem. The statement may have
drifted from the paper's claim, the check ran in the same kernel that elaborated the proof, and "CI was
green" is a status word nobody can re-derive. lean-pkg requires two receipts before a package goes
public: a build-and-axioms receipt bound to one commit, and a comparator receipt in which trusted
statements are checked against the proofs and replayed in an independent kernel. At publication it
re-derives both from bytes.
Install
pipx install lean-pkg # or: uv tool install lean-pkg, or pip install lean-pkg
lean-pkg doctor # what this machine has, and what it needs
Python 3.11 or newer on Linux. Lean itself comes from elan, as for any Lean project.
From a new package to a verified page
lean-pkg new my-proof --kind library # scaffold a package (Mathlib by default), then lake build it
lean-pkg registry init # a private registry of your own (~/.lean-pkg/registry)
lean-pkg register my-proof --url https://github.com/you/my-proof --path src/my-proof --license-spdx Apache-2.0
lean-pkg verify my-proof # both receipts and the gate, in one step
lean-pkg page my-proof --write # the verification page in README.md
lean-pkg publish my-proof --dry-run # the checklist before the repository goes public
The Quickstart walks through each step and its output.
Learn more
- Documentation, starting with the Quickstart and the π-λ tutorial, Dynkin's π-λ theorem end to end for a mathematician who has barely used Lean.
- Video series: eight short episodes, from why a green build is not a verified theorem to a paper with a Lean companion.
- Receipts and trust: what each receipt binds and what it lets you believe.
- For coding agents:
lean-pkg llmsprints the agent contract (llms.txt). - Source, changelog, issues.
Cite a release by its Zenodo DOI (concept DOI 10.5281/zenodo.23272098). Apache-2.0.
Metadata
Release files for lean-pkg 0.30.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lean_pkg-0.30.1.tar.gz | 1.9 MB | With provenance | Details for lean_pkg-0.30.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lean_pkg-0.30.1-py3-none-any.whl | Python 3 | none | any | Details for lean_pkg-0.30.1-py3-none-any.whl |
Total release size: 3.0 MB
Release files / lean_pkg-0.30.1.tar.gz
| Download URL | lean_pkg-0.30.1.tar.gz |
|---|---|
| Size | 1.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fbc992940ae1cb5aa3471b9438b546edfb0778dd0a006a5fdf4e4d19741e0ed4
|
|
BLAKE2b-256 checksum How to use checksums |
e8ffd24b0bd84c6a6f85969bf36d139b5d6d36ff2d34713b77c266f88634e7e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logRelease files / lean_pkg-0.30.1-py3-none-any.whl
| Download URL | lean_pkg-0.30.1-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
091ab0ef5dc2e96c12036fb99f21efe44fb8ac8f242f0f4a45b481961895b388
|
|
BLAKE2b-256 checksum How to use checksums |
f88931cb4fbdd5d73584d9f34851f556d749c9a517f079eac998af429268cdea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logSecurity for lean-pkg 0.30.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for lean_pkg-0.30.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.