Millennium Prize Problems in Lean 4

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.

The seven Millennium Prize Problems

Getting started

lake build
python3 scripts/clay_refs.py verify

The first command checks the Lean development. The second verifies the local copies of the official Clay PDFs.

The seven problems

ProblemLean fileMain declarationStatus
P versus NPProblems/PVersusNP/Millennium.leanMillennium.clay_prize_p_versus_npOpen
Riemann HypothesisProblems/RiemannHypothesis/Millennium.leanMillennium.clay_prize_riemann_hypothesisOpen
Navier–StokesProblems/NavierStokes/Millennium.leanMillenniumNavierStokes.clay_prize_navier_stokesOpen
Hodge ConjectureProblems/Hodge/Millennium.leanMillenniumHodge.clay_prize_hodge_conjectureOpen
Birch and Swinnerton-DyerProblems/BirchSwinnertonDyer/Millennium.leanMillenniumBirchSwinnertonDyer.clay_prize_birch_swinnerton_dyerOpen
Yang–Mills existence and mass gapProblems/YangMills/HamiltonianSpectrum.leanMillenniumYangMills.clay_prize_yang_millsOpen
Poincaré ConjectureProblems/Poincare/Millennium.leanMillenniumPoincare.clay_prize_poincare_conjectureSolved by Perelman; Lean proof not included

Each file ends with a declaration named clay_prize_*. Its body is currently sorry, marking the place where a complete formal proof would go. There are exactly seven such placeholders—one for each problem.

P versus NP is slightly different because either P = NP or P ≠ NP would settle the problem. ClayPVersusNPResolution represents both possibilities with the constructors equal and notEqual.

Formalization scope

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:

  • Hodge theory uses a realization package for rational and complex cohomology, the Hodge decomposition, and algebraic cycle classes.
  • Yang–Mills uses an axiomatic quantum-field-theory model and records both bounded and unbounded Hamiltonian formulations.
  • Birch and Swinnerton-Dyer packages the analytic continuation of the relevant L-series as explicit data.
  • P versus NP uses a concrete finite-alphabet Turing-machine model.

The detailed choices and related declarations are listed in Problems/Registry.lean and documented inside the corresponding Lean files.

Repository layout

PathContents
Problems/The seven statements and their supporting definitions
Problems/Common/Definitions shared by several problems
Problems/Registry.leanA checked index of the problems, their status, and related declarations
Problems/*/references/clay/Local copies of the official Clay PDFs
scripts/clay_refs.pyDownloads or verifies the Clay PDFs

References

Contributing

Contributions that improve the accuracy of the statements, replace temporary mathematical interfaces with native Mathlib constructions, or provide formal proofs are welcome.