| Pin | Location |
|---|---|
| Python ≥ 3.11 | pyproject.toml + committed uv.lock (uv sync --frozen --all-extras) |
Lean 4 stable v4.32.1 |
lean-toolchain (checkout) and src/leanverifier/resources/lean-project/lean-toolchain (wheel) |
mathlib v4.32.1 |
lakefile.toml + committed lake-manifest.json |
Never use Lean RC toolchains on supported branches. Run Lake commands from the repository root for development; installed wheels materialize the packaged Lake project into an isolated cache.
| Path | Role |
|---|---|
LeanVerifier/ |
Supported Lean sources (checkout; keep in sync with packaged copy) |
LeanVerifier.lean |
Root import (must not import experimental) |
src/leanverifier/ |
Generator + CLI (src layout; avoids Windows case collision with LeanVerifier/) |
src/leanverifier/resources/ |
Packaged schemas, Lean project, axiom-audit script (importlib.resources) |
schemas/ |
Checkout mirror of packaged JSON schemas (must match resource hashes) |
examples/affine_binary/ |
Canonical worked example |
tests/ |
unit / schema / integration / mutation / security |
experimental/ |
Legacy FormalVerifML — excluded from supported build |
scripts/ |
audits, docs verification, wheel smoke, release scaffolding |
docs/ |
User/developer guides + assurance case |
lake build
lake lint
uv sync --frozen --all-extras
uv run python scripts/audit_axioms.py
uv run python -m pytest
uv run ruff check src/leanverifier tests scripts
uv run mypy src/leanverifier
uv run python scripts/verify_docs.py
uv build && uv run python scripts/smoke_wheel.py --dist dist
git status --porcelain # clean after build when .lake / caches are gitignoredAfter editing checkout schemas/ or Lean sources that ship in the wheel, refresh packaged copies and digests:
uv run python scripts/regen_resource_hashes.pyDigests are LF-canonical (see .gitattributes). Always regenerate on the machine that edited the files; do not hand-edit hashes.json.
- Keep definitions exact over ℚ; no
Array Float, bang indexing,getD, or silent zip truncate. - Prove unit theorems with
norm_numwhere helpful; include repeated-weight examples. - Extend
Audit/PublicAxioms.leanand ensurescripts/audit_axioms.pystill passes. - Update
CLAIMS.mdif the public claim surface changes.
User-controlled values may appear only as rationals, lengths, digests, and comments.
Generated modules import only supported LeanVerifier modules.
Module names must match GeneratedModel_[0-9a-f]{16}.
.github/workflows/ci.yml is SHA-pinned with permissions: contents: read by default.
Do not use pull_request_target or workflow_run for untrusted tests.
RC release scaffolding lives in .github/workflows/release-rc.yml (see release-process.md).
experimental/legacy-formalverifml/ retains FormalVerifML sources with a WARNING header.
It is never a Lake dependency of LeanVerifier and is not installed by the Python package.