Since 2023, announcements that something has been “formally verified in Lean” have come quickly: Fermat’s Last Theorem, GPU kernels, a claimed blow-up for the Navier–Stokes equations. Some say exactly what was done; others claim more than the code proves. This lecture surveys the work field by field and says, for each item, what was formalized, what was assumed, and who has checked it. It ends with a checklist you can apply to the next announcement yourself. Every claim links to its source; where we could not confirm something, we say so.
Notebook and cheatsheet
This lecture has no notebook; its Lean blocks run in any file that imports Mathlib. Cheatsheet: Landmark formalizations, 2020–2026, Reading a “formally verified” claim, BitVec and bv_decide.
Three labels
A claim like “X was verified in Lean” bundles four claims: a Lean statement exists, its proof has no gaps, the statement means what the English says, and someone outside the team has looked. The course keeps them apart with three labels.
Definition 13.1 (Status tags).Each tag applies to one specific claim, not to a whole project.
- VERIFIED: the Lean code is public and free of
sorry, and someone outside the team that produced it (or this course) has checked it. For an open community project, which anyone could join and check, we count the community’s own public builds.- SELF-REPORTED: the authors or a company say so; we found no independent check.
- DISPUTED: an independent party has published a substantive objection. We link both sides.
A SELF-REPORTED tag (Definition 13.1) is not an accusation: most correct work starts that way, and public, sorry-free code keeps the tag until someone outside the team has checked that its statements say what the paper says.
Dates run down the page, not to scale. Hollow dots and dashed badges mark events that are not Lean results.
Mathematics
The PFR conjecture: VERIFIED. The polynomial Freiman–Ruzsa conjecture, about sets that are almost closed under addition, was proved on 2023-11-09. A Lean project started three days later and was sorry-free on 2023-12-05: about 30 people led by Terence Tao and Yaël Dillies, writing nearly all the code by hand, with GitHub Copilot as autocomplete (repository, Tao’s tour of the blueprint). Lecture 14 copies its method.
The Equational Theories Project: VERIFIED. A magma is a set with one binary operation
and no axioms; a law is an equation such as
Carleson’s theorem: VERIFIED. Carleson’s theorem (1966) says the Fourier series of a square-integrable function converges almost everywhere. The Lean project proves it for bounded measurable periodic functions, as a consequence of a generalization to doubling metric measure spaces; a human team led by Floris van Doorn finished it on 2025-07-18 (blueprint paper, the generalization).
Sphere packing: VERIFIED in dimension 8, SELF-REPORTED in dimension 24. A human project at EPFL (Hariharan, Viazovska and others) began in March 2024 and wrote the blueprint. Math Inc reports that its system Gauss then finished dimension 8 in about five days (announced 2026-02-23) and dimension 24 in about two weeks. The arXiv paper says the dimension-8 result was formally verified in February 2026. The human project, a team separate from Math Inc, checked that code: no definition had been changed, only the standard axioms were used, and David Renshaw ran manual checks and lean4checker (Lean community blog). No outside check of dimension 24 is named. According to a Xena guest post, the human team then found that cleaning up the AI-written code was “more trouble than it was worth” and is redoing the dimension-8 proof, “still with ample help from AI”.
The strong prime number theorem: SELF-REPORTED. This is the prime number theorem with an error term. Tao and Alex Kontorovich launched the project in January 2024. Gauss is reported to have finished it around September 2025 (we could not confirm the date), with “targeted human scaffolding”; the repository is public.
Fermat’s Last Theorem: VERIFIED. Kevin Buzzard’s
project at Imperial College is ongoing and
builds the modern number theory it needs into Mathlib. Separately, on 2026-09-04, Anthropic
announced a complete Lean proof produced by Claude agents in 11 days, about 13 million lines
(Buzzard counts over 13.4 million),
with occasional high-level instructions from humans
(announcement,
repository). It follows the 1995
exposition by Darmon, Diamond and Taylor for exponents
Erdős problems: SELF-REPORTED, problem by problem. Tao’s wiki of AI contributions, frozen on 2026-06-30, lists about 68 problems with full AI solutions and about 24 with Lean proofs (our counts). It warns that several “new” solutions were already in the literature, and that these are the easy cases. Separately, Tao guessed that only about 1–2% of the open problems are within reach of current AI tools with little human help. A 2026 DeepMind paper reports that proof search solved 9 of the 353 Erdős problems in the Formal Conjectures repository (arXiv 2605.22763).
We give no size for Mathlib: its statistics page labels its counts ambiguously.
Navier–Stokes, event by event
The press merged several events into one story; this section separates them.
What Clay asks. The Navier–Stokes equations describe an incompressible viscous fluid with
velocity
The Clay Institute’s
official problem statement,
by Charles Fefferman, asks for a proof of any one of four statements. (A) and (B) say that in
three dimensions, on
| date | event | status |
|---|---|---|
| 2025-09-18 | DeepMind and collaborators find candidate blow-up solutions for related models by neural-network numerics. blog | no Lean; not a proof |
| 2026-09-08 | OpenAI claims blow-up with a smooth force: a 166-page paper and a Lean repository. blog, repository | DISPUTED |
| 2026-09-08 | Buckmaster and Alpöge post Lean-checked forced blow-up results for related models (IPM, 2D Boussinesq, 3D Euler). fluid_lean | SELF-REPORTED |
| 2026-09-11 | Clay says the problem “has apparently been settled”, in a process it calls “deliberately unhurried”. Clay | no prize awarded |
| 2026-10-06 | Bastounis, Circelli and Hansen publish an analysis of OpenAI’s Lean code. arXiv 2610.08144 | the objection |
What was claimed. OpenAI’s repository states, for every positive viscosity, results of
types (C) and (D), with Lean definitions adapted from DeepMind’s Formal Conjectures project.
The question most people mean, blow-up with no force, remains open. The repository also
claims blow-up for the unforced Euler equations, which have no viscosity and are not a Clay
problem (SELF-REPORTED). Lecture 5 reads the
The objection. The paper is titled “Navier-Stokes lost in translation: Why Lean verification of AI autoformalisation does not guarantee correct natural language proofs.” It reports at least two places where the Lean code does not match the written proof; in both, the English claims more than the Lean proves. The authors do not claim the blow-up result is false. Their point is about what the Lean check certifies. They also argue that faithfully translating mathematical English is not, in general, a computable task.
Three questions get merged:
- Does the Lean proof check against its Lean statement? Only this is the kernel’s job.
- Does the Lean statement say what Clay asks? For (C) and (D), a forced statement has the right shape.
- Does the English paper say what the Lean proves? The objection says no.
The status is DISPUTED because an independent party has published a substantive objection to the claim that the Lean code validates the paper.
Hardware, software and physics
PTX in Lean: SELF-REPORTED. PTX is the intermediate assembly language that NVIDIA’s compilers emit for GPUs. A memory model says which values a read may return when many threads share memory. Koska, Koska and Koska (SF Tensor) built a Lean model of PTX on the axiomatic memory model of Lustig, Sahasrabuddhe and Giroux (ASPLOS 2019) and proved seven kernels correct (nine PTX entry points), from an elementwise map to a Hopper matrix multiply, a scalar FlashAttention and a three-kernel mixture-of-experts pipeline, with about 34,000 lines of proof written with AI assistance (arXiv 2611.04447, 2026-11-03). The paper states its assumptions:
- the kernels have no undefined behaviour at the instruction-set level (not proved);
- NVIDIA’s assembler
ptxasand the hardware implement PTX correctly; - floating-point numbers are exact real numbers, so rounding is out of scope;
- two memory-model axioms, No-Thin-Air and Fence-SC, are omitted;
- the results are partial correctness: if a run finishes, its answer is right; termination is not proved.
It also proves, for each kernel, that some complete execution exists, so the correctness theorem is not vacuously true; Lecture 14 asks you to do the same. We could not confirm that the code is public: version 1 of the paper links to no repository.
Other low-level work (all SELF-REPORTED):
LARK (2026-11-01) uses one Lean GPU model for PTX, CUDA
and HIP; LLM agents proved 9 of 10 production kernels equivalent to PyTorch code and found a
data race in the tenth. LNSym simulates Armv8
machine code; its README does not say which routines have finished proofs.
Lean-MLIR verifies compiler rewrites. bv_decide, which ships with Lean, is a bit-blaster: it turns a
statement about fixed-width integers into a SAT problem. Its
OOPSLA 2025 paper reports
more than 7,000 LLVM rewrites proved; the checklist below runs it.
Software (all SELF-REPORTED):
- Cedar (AWS), an authorization-policy language: a Lean model, compared with the production Rust by differential testing. Proofs found 4 bugs in the validator (one non-termination bug, and three found while proving it sound); testing found 21 more.
- SampCert (AWS): verified sampling for differential privacy, deployed in AWS Clean Rooms.
- SymCrypt via Aeneas (Microsoft, September 2026). Aeneas translates Rust into Lean. 237,000 lines of Lean (30,000 of them generated by Aeneas; AI agents wrote the proofs) prove safety, absence of panics and functional correctness for 16,700 lines of Rust. Of these, the ML-KEM and SHA-3 code (about 4,100 lines) is in Windows Insider builds; about 7,400 lines are experimental code that SymCrypt does not ship.
Tools and libraries, rather than claims: Std.Do, a Hoare logic for Lean’s own do programs
(Lecture 9); CSLib,
which “aims to be for computer science what Lean’s Mathlib is for mathematics” (white paper,
2026-02-04); Veil for
distributed protocols; and the Verified zkEVM programme for
zero-knowledge proofs.
Physics and quantum information (all SELF-REPORTED):
- Physlib, Joseph Tooby-Smith’s library (first HepLean, then PhysLean; paper), merged with Lean-QuantumInfo around March 2026. Lecture 14 explains how to contribute.
- The generalized quantum Stein’s lemma, on the best error rate for telling a quantum state apart from a family of states: Meiburg, Lessa and Soldati formalized the Hayashi–Yamasaki proof (arXiv 2510.08672, October 2025).
- Lean-QEC (May 2026): stabilizer, CSS and
bivariate-bicycle quantum codes, with distances checked by SAT solving and
bv_decide, for example acode. Lecture 14 has a small version. - CHSH rigidity (April 2026): formalizing this result about Bell tests exposed a gap in the original argument.
- Shor’s algorithm (July 2026): an AI-agent formalization of order finding and the arithmetic circuits, with resource estimates.
How to read a “formally verified” claim
Every case above can be judged with the same five questions (Remark 13.1), and Lecture 14 applies them to your own project.
Remark 13.1 (The audit checklist).
- Statement. Find the exact Lean statement of the main theorem and its definitions. Does it say what the English says? Look for added hypotheses (a force), weakened conclusions, and definitions that do not mean what their names suggest.
- Axioms and
sorry. Run#print axiomson the main theorem. Anything beyondpropext,Classical.choiceandQuot.soundneeds an explanation.- Trusted extras.
native_decide,bv_decideand external tools trust code beyond the kernel. Find out what each one trusts.- Public and reproducible. Is the code public, with pinned Lean and Mathlib versions, and does it build?
- Independent check. Who outside the team has built it, run an independent checker, or compared the statement with the mathematics?
Questions 2 and 3 are mechanical. Here are three proofs by three tactics:
import Mathlib
theorem ten_decide : 2 ^ 10 = 1024 := by decide
theorem ten_native : 2 ^ 10 = 1024 := by native_decide
theorem xor_bv (x y : BitVec 8) : x ^^^ y ^^^ y = x := by bv_decide
#print axioms ten_decide
#print axioms ten_native
#print axioms xor_bvOn this page, which loads Mathlib, Lean reports:
'ten_decide' depends on axioms: [propext]
'ten_native' depends on axioms: [propext, ten_native._native.native_decide.ax_1]
'xor_bv' depends on axioms: [propext, Classical.choice, Quot.sound, xor_bv._native.bv_decide.ax_1]decide asks the kernel itself to compute the answer, and propext is one of the standard
three. (With only Std.Tactic.BVDecide imported, ten_decide depends on no axioms at all.)
native_decide compiles the computation to machine code and runs it; Lean records that trust
as a new axiom named after the theorem. bv_decide sends the problem to a SAT solver and checks
the solver’s certificate with compiled code, which again appears as an axiom (the suffix after
ax_ can differ in another file). These axioms make the trust visible: a claim that relies on
them also claims that the compiler and the certificate checker are correct.
An unfinished proof shows up the same way. Finishing this one is an exercise (decide works):
theorem ten_sorry : 2 ^ 10 = 1024 := by sorry
#print axioms ten_sorryLean warns “declaration uses sorry”, which is a warning, not a success, and reports
'ten_sorry' depends on axioms: [propext, sorryAx]. sorryAx means the proof is unfinished, whatever an announcement says.
The axiom list cannot catch everything. A project can declare its own axiom, and then anything follows:
axiom free_lunch : ∀ n : Nat, n + 1 = n
theorem five_eq_four : (5 : Nat) = 4 := free_lunch 4
#print axioms five_eq_fourLean accepts this “proof” and reports 'five_eq_four' depends on axioms: [free_lunch]. In a
large project a bad axiom can hide far from the main theorem, so run the check on the main
theorem itself. And no axiom list reveals a true statement that says the wrong thing; only
question 1 catches that.
For question 5, Lean 4.35’s build tool has two commands (see lake help check and lake help comparator).
lake check replays every declaration through the kernel in a sandbox and fails on any
non-standard axiom; --paranoid adds independent kernels. lake comparator takes a
challenge file (statements with sorry) and a solution file, and confirms that each named
theorem proves the same statement with only permitted axioms. It absorbs the standalone
Comparator that Buzzard used on FLT. The page
Did you really prove it? asks
the same questions for a general reader.
Applied to three headline claims:
| question | FLT (2026-09-04) | Navier–Stokes (2026-09-08) | PTX (2026-11-03) |
|---|---|---|---|
| 1. statement | follows Darmon–Diamond–Taylor | forced (C, D); unforced case open | partial correctness; floats as reals; two axioms omitted |
| 2. axioms | standard three | standard three requested in its Comparator setup | standard three, per the paper |
| 3. trusted extras | none reported | not checked by us | ptxas and hardware assumed correct |
| 4. public | yes | yes, pinned to Lean 4.34.0-rc2 | we could not confirm |
| 5. independent check | Buzzard: build and Comparator | a published objection on fidelity | none found |
| status | VERIFIED | DISPUTED | SELF-REPORTED |
Try this
- Run the first Lean block. Then replace
bv_decideinxor_bvbydecideand see what Lean reports. How many cases woulddecidehave to check? - Pick a SELF-REPORTED item with a public repository (the strong PNT, Cedar or Physlib) and find its main theorem’s statement. What would move it to VERIFIED?
- Choose an announcement from the last month that is not on this page and fill in the five rows of the checklist table for it, marking every cell you could not check.
Readings
- Terence Tao, Formalizing the proof of PFR in Lean4 using Blueprint: a short tour, 2023. How a large formalization is organised.
- Bastounis, Circelli and Hansen, Navier–Stokes lost in translation, 2026. Read it alongside OpenAI’s repository.
- Charles Fefferman, Existence and smoothness of the Navier–Stokes equation, the Clay problem statement, with alternatives (A) to (D).
- Avigad, Buzzard, Commelin, Degenne, Morrison, Nash and Topaz, How to Formalize All of Mathematics, Xena blog, 2026-10-16. Why experts must steer AI-generated libraries.