Skip to main content

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

Cite a release by its Zenodo DOI (concept DOI 10.5281/zenodo.23272098). Apache-2.0.

Metadata

Release files for lean-pkg 0.30.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lean-pkg 0.30.0
File Size Uploaded Provenance Actions
lean_pkg-0.30.0.tar.gz 1.9 MB With provenance Details for lean_pkg-0.30.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lean-pkg 0.30.0
File Interpreter ABI Platform Actions
lean_pkg-0.30.0-py3-none-any.whl Python 3 none any Details for lean_pkg-0.30.0-py3-none-any.whl

Total release size: 3.0 MB

Release files / lean_pkg-0.30.0.tar.gz

Download URL lean_pkg-0.30.0.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
a5115fc7003cc6f66f3740baf7fc1b2a1a40692136dc9fd9da4980f47aa16980
BLAKE2b-256 checksum
How to use checksums
328384cb52a710e9471cf34d3bc03b5c8234a9e71265ec60f6e503a0d918abcf
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 22, 2026.

Transparency log

Release files / lean_pkg-0.30.0-py3-none-any.whl

Download URL lean_pkg-0.30.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f19259e73530754f1d19eccd5c465c17f391af6f80846fd9e4c3c281b57beb20
BLAKE2b-256 checksum
How to use checksums
3e09a1ad8ed23a8487489cc0ef7220a3f34a6bd18f2a5593fd0b3492952a33d9
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 22, 2026.

Transparency log

Security for lean-pkg 0.30.0

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.

Select from 2 files

Attestation for lean_pkg-0.30.0.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 22, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page