This repository contains Lean 4 formulations of the seven Millennium Prize Problems described by the Clay Mathematics Institute. It focuses on the problem statements and the mathematics needed to express them, not on claiming solutions.
lake exe cache get # Mathlib build cache
lake build # builds the statements (`Problems`) and the checks (`Tests`)
python3 scripts/clay_refs.py verify
The second command checks the Lean development. The third verifies the local copies of the official Clay PDFs. The same three steps run in CI on every push and pull request.
| Problem | Lean file | Propositions that count as a solution | Status |
|---|---|---|---|
| P versus NP | Problems/PVersusNP/Millennium.lean | Millennium.ClayPVersusNP (P = NP) or Millennium.ClayPVersusNP.Formulations.NegativeBranch (P ≠ NP) | Open |
| Riemann Hypothesis | Problems/RiemannHypothesis/Millennium.lean | Millennium.ClayRiemannHypothesis | Open |
| Navier–Stokes | Problems/NavierStokes/Millennium.lean | any one of MillenniumNavierStokes.FeffermanA, FeffermanB, FeffermanC, FeffermanD | Open |
| Birch and Swinnerton-Dyer | Problems/BirchSwinnertonDyer/Millennium.lean | MillenniumBirchSwinnertonDyer.ClayBirchSwinnertonDyer | Open |
| Poincaré Conjecture | Problems/Poincare/Millennium.lean | MillenniumPoincare.ClayPoincareConjecture | Solved by Perelman; Lean proof not included |
| Hodge Conjecture | Problems/Hodge/Millennium.lean | none | Statement incomplete, not a valid target (see below) |
| Yang–Mills existence and mass gap | Problems/YangMills/Millennium.lean | none | Statement incomplete, not a valid target (see below) |
Problems/Registry.lean records the same information as checked Lean metadata, including the
status of each statement.
A solution is a sorry-free proof of one of the propositions in the table, using only the
standard axioms (propext, Classical.choice, Quot.sound; check with #print axioms).
clay_prize_* whose body is sorry. Replace the body.Tests/AggregateTargets.lean, and the Navier–Stokes
disjunction is proved outright in Tests/NavierStokes/AggregateIsTrivial.lean (zero force plus
the scaling symmetry of the equations, no fluid dynamics).A review in September 2026 (with an independent contribution by Kevin Buzzard, PR #9) found that
two of the formal statements are interface sketches whose data are not pinned down by the stated
properties. Both files carry a warning at the top, both are marked statement_incomplete in the
registry, and their former sorry placeholders have been removed.
SmoothProjectiveVariety ℂ in the repository has no complex points, because
points must be in bijection with the plain Scheme hom-set Spec ℂ ⟶ X and also inject into
a finite projective space, so ClayHodge is vacuously true
(Tests/Hodge/StatementIsVacuous.lean, contributed by Kevin Buzzard). Independently, the cycle-class map
is free data: setting it to zero preserves every "canonical" anchor, so ClayHodge would become
false as soon as the first defect were repaired (Tests/Hodge/CycleClassUnconstrained.lean).
A faithful statement needs the analytic topology on X(ℂ), a defined Hodge decomposition and
cycle-class map, and the rational–complex comparison isomorphism, none of which exist in Mathlib.Contributions that replace these sketches with faithful statements are very welcome; they are substantial projects, not patches.
The statements follow the Clay PDFs included in this repository. Some subjects require explicit interfaces for mathematics that is not yet available directly in Mathlib:
ℝ³ × [0,∞); the equations and the derivative bounds are imposed on the open
half-space t > 0, because the ambient derivative used in the equations is not meaningful on the
boundary. The pressure-periodicity erratum is included.RiemannHypothesis; Poincaré is equivalent to the shape of
Mathlib's proof_wanted statement.The detailed choices and related declarations are listed in Problems/Registry.lean and documented
inside the corresponding Lean files.
The Tests library is built by lake build and holds compiled facts about the statements:
sanity checks that must keep holding (equivalences with Mathlib statements, axiom audits,
inhabitation of data types), and regression witnesses that show why certain formulations are not
targets. A regression witness is expected to stop compiling when the statement it exposes is fixed.
| Path | Contents |
|---|---|
Problems/ | The seven statements and their supporting definitions |
Problems/Common/ | Definitions shared by several problems |
Problems/Registry.lean | A checked index of the problems, their status, and related declarations |
Problems/*/references/clay/ | Local copies of the official Clay PDFs |
Tests/ | Compiled sanity checks and regression witnesses |
scripts/clay_refs.py | Downloads or verifies the Clay PDFs |
.github/workflows/ci.yml | Continuous integration: build and PDF verification |
C^∞ (PR #7); Yang–Mills locality
direction fixed (PR #8); Navier–Stokes equations moved to the open half-space; P versus NP
certificate encoding fixed (every language was in NP); Yang–Mills vacuum-uniqueness axiom fixed;
Birch–Swinnerton-Dyer auxiliary formulations with empty data types removed or weakened; Hodge
and Yang–Mills demoted to statement_incomplete; Tests library and CI added.Contributions that improve the accuracy of the statements, replace temporary mathematical
interfaces with native Mathlib constructions, add tests, or provide formal proofs are welcome.
Statement changes should come with a test in Tests/ showing that the new statement is not
trivially provable or refutable.
Lean
99.1%
This repository contains Lean 4 formulations of the seven Millennium Prize Problems described by the Clay Mathematics Institute. It focuses on the problem statements and the mathematics needed to express them, not on claiming solutions.
lake exe cache get # Mathlib build cache
lake build # builds the statements (`Problems`) and the checks (`Tests`)
python3 scripts/clay_refs.py verify
The second command checks the Lean development. The third verifies the local copies of the official Clay PDFs. The same three steps run in CI on every push and pull request.
| Problem | Lean file | Propositions that count as a solution | Status |
|---|---|---|---|
| P versus NP | Problems/PVersusNP/Millennium.lean | Millennium.ClayPVersusNP (P = NP) or Millennium.ClayPVersusNP.Formulations.NegativeBranch (P ≠ NP) | Open |
| Riemann Hypothesis | Problems/RiemannHypothesis/Millennium.lean | Millennium.ClayRiemannHypothesis | Open |
| Navier–Stokes | Problems/NavierStokes/Millennium.lean | any one of MillenniumNavierStokes.FeffermanA, FeffermanB, FeffermanC, FeffermanD | Open |
| Birch and Swinnerton-Dyer | Problems/BirchSwinnertonDyer/Millennium.lean | MillenniumBirchSwinnertonDyer.ClayBirchSwinnertonDyer | Open |
| Poincaré Conjecture | Problems/Poincare/Millennium.lean | MillenniumPoincare.ClayPoincareConjecture | Solved by Perelman; Lean proof not included |
| Hodge Conjecture | Problems/Hodge/Millennium.lean | none | Statement incomplete, not a valid target (see below) |
| Yang–Mills existence and mass gap | Problems/YangMills/Millennium.lean | none | Statement incomplete, not a valid target (see below) |
Problems/Registry.lean records the same information as checked Lean metadata, including the
status of each statement.
A solution is a sorry-free proof of one of the propositions in the table, using only the
standard axioms (propext, Classical.choice, Quot.sound; check with #print axioms).
clay_prize_* whose body is sorry. Replace the body.Tests/AggregateTargets.lean, and the Navier–Stokes
disjunction is proved outright in Tests/NavierStokes/AggregateIsTrivial.lean (zero force plus
the scaling symmetry of the equations, no fluid dynamics).A review in September 2026 (with an independent contribution by Kevin Buzzard, PR #9) found that
two of the formal statements are interface sketches whose data are not pinned down by the stated
properties. Both files carry a warning at the top, both are marked statement_incomplete in the
registry, and their former sorry placeholders have been removed.
SmoothProjectiveVariety ℂ in the repository has no complex points, because
points must be in bijection with the plain Scheme hom-set Spec ℂ ⟶ X and also inject into
a finite projective space, so ClayHodge is vacuously true
(Tests/Hodge/StatementIsVacuous.lean, contributed by Kevin Buzzard). Independently, the cycle-class map
is free data: setting it to zero preserves every "canonical" anchor, so ClayHodge would become
false as soon as the first defect were repaired (Tests/Hodge/CycleClassUnconstrained.lean).
A faithful statement needs the analytic topology on X(ℂ), a defined Hodge decomposition and
cycle-class map, and the rational–complex comparison isomorphism, none of which exist in Mathlib.Contributions that replace these sketches with faithful statements are very welcome; they are substantial projects, not patches.
The statements follow the Clay PDFs included in this repository. Some subjects require explicit interfaces for mathematics that is not yet available directly in Mathlib:
ℝ³ × [0,∞); the equations and the derivative bounds are imposed on the open
half-space t > 0, because the ambient derivative used in the equations is not meaningful on the
boundary. The pressure-periodicity erratum is included.RiemannHypothesis; Poincaré is equivalent to the shape of
Mathlib's proof_wanted statement.The detailed choices and related declarations are listed in Problems/Registry.lean and documented
inside the corresponding Lean files.
The Tests library is built by lake build and holds compiled facts about the statements:
sanity checks that must keep holding (equivalences with Mathlib statements, axiom audits,
inhabitation of data types), and regression witnesses that show why certain formulations are not
targets. A regression witness is expected to stop compiling when the statement it exposes is fixed.
| Path | Contents |
|---|---|
Problems/ | The seven statements and their supporting definitions |
Problems/Common/ | Definitions shared by several problems |
Problems/Registry.lean | A checked index of the problems, their status, and related declarations |
Problems/*/references/clay/ | Local copies of the official Clay PDFs |
Tests/ | Compiled sanity checks and regression witnesses |
scripts/clay_refs.py | Downloads or verifies the Clay PDFs |
.github/workflows/ci.yml | Continuous integration: build and PDF verification |
C^∞ (PR #7); Yang–Mills locality
direction fixed (PR #8); Navier–Stokes equations moved to the open half-space; P versus NP
certificate encoding fixed (every language was in NP); Yang–Mills vacuum-uniqueness axiom fixed;
Birch–Swinnerton-Dyer auxiliary formulations with empty data types removed or weakened; Hodge
and Yang–Mills demoted to statement_incomplete; Tests library and CI added.Contributions that improve the accuracy of the statements, replace temporary mathematical
interfaces with native Mathlib constructions, add tests, or provide formal proofs are welcome.
Statement changes should come with a test in Tests/ showing that the new statement is not
trivially provable or refutable.
Lean
99.1%