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.25.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.25.0
File Size Uploaded Provenance Actions
lean_pkg-0.25.0.tar.gz 1.8 MB With provenance Details for lean_pkg-0.25.0.tar.gz

Built distribution (wheel)

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

Total release size: 2.9 MB

Release files / lean_pkg-0.25.0.tar.gz

Download URL lean_pkg-0.25.0.tar.gz
Size 1.8 MB
Tags Source
SHA-256 checksum
How to use checksums
b29440ce15f6cc4f161fd7943d1ca3e79d771c2bd7e6d2c5b71b9a2250eef98c
BLAKE2b-256 checksum
How to use checksums
e0073ece22c66f80b89b4ff3bfd95da2bfcd15e480302df597dc741675a1702c
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 6, 2026.

Transparency log

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

Download URL lean_pkg-0.25.0-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1975c504228ba36ad0831075ecda130b120c7f0dcb01e961a2a9f8e6413dc3be
BLAKE2b-256 checksum
How to use checksums
d8af03e3c2848b6e644cecbf17ffc88613004f6ef44d504622867858cab3cc7a
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 6, 2026.

Transparency log

Security for lean-pkg 0.25.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.25.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 6, 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