bitfilter

Article 0.13
November 9, 2026

Formal theorem proving in Lean
Lean theorem proving since 2025: the system, Mathlib, AI provers and their benchmarks, research mathematics and verified software, and our own test of a benchmark on today's Lean

A search tree drawn as lines branching downward; most branches end early, one bright path reaches the bottom.

In this article

    A note before we start

    Lean is a programming language and a proof assistant: you state a theorem in a precise formal language, write a proof, and a small program called the kernel checks every step. If the kernel accepts it, the proof is correct, whoever or whatever wrote it. That last clause is why Lean became the center of AI for mathematics. A language model can produce a convincing wrong argument; it cannot get a wrong proof past the kernel.

    Since January 2025 that combination has moved faster than anyone predicted. Machines went from solving almost none of the Putnam competition problems in Lean to solving all of them. Olympiad gold medals were won in Lean, and AI systems produced Lean proofs of Fermat's Last Theorem and of new results on open problems. At the same time the kernel had its worst summer for soundness bugs, the main benchmarks turned out to be full of wrongly stated problems, and mathematicians began asking who will read millions of lines nobody wrote by hand.

    This article covers what changed in Lean itself, in Mathlib, in the provers and their benchmarks, in research mathematics and in software verification, and what remains open. We also ran our own test on a laptop: a standard benchmark on today's Lean, with built-in automation and with a small open prover.

    Part 1

    A kernel, a library, and why the machines chose it.

    A proof the machine checks

    In Lean, a theorem is a type and a proof is a program of that type. Writing proofs term by term would be unbearable, so people write tactics: commands such as induction, simp or linarith that build the proof term for them. Tactics can be large, clever and buggy. It does not matter, because whatever they build goes to the kernel, a few thousand lines of code that knows only the rules of the type theory and checks the term from scratch.

    This is the de Bruijn criterion: trust a small checker, not the large system around it. It is what lets an AI system be anything at all, a search over tactics, a language model, a swarm of agents, and still produce a result a mathematician can rely on. The kernel checks the proof. What it cannot check is whether the theorem you stated is the one you meant. That gap runs through this whole article.

    Around the kernel sits Mathlib, the community library: about 2.5 million lines covering undergraduate and much graduate mathematics, from linear algebra and measure theory to algebraic geometry. Almost every result in this article builds on it.

    What it looks like

    theorem sum_odd (n : ℕ) :
        ∑ i ∈ Finset.range n, (2 * i + 1) = n ^ 2 := by
      induction n with
      | zero => simp
      | succ n ih =>
        rw [Finset.sum_range_succ, ih]
        ring
    
    theorem sq_ge (a b : ℝ) : 2 * a * b ≤ a ^ 2 + b ^ 2 := by
      nlinarith [sq_nonneg (a - b)]
    
    example (x : ℤ) (h : 3 * x + 2 = 11) : x = 3 := by grind

    Three small proofs, checked with Lean 4.35 and Mathlib. The sum of the first n odd numbers is n² by induction; the inequality follows from (a − b)² ≥ 0, which nlinarith is told to use; grind solves the linear equation on its own. #print axioms reports that sum_odd uses only the three standard axioms.

    The statement (top) is written or approved by a person. Everything in the large middle box, tactics, search, language models, agents, is untrusted: it only has to produce a proof term. The kernel (bright box) checks the term. Independent checkers (outlined) can check it again. Only the statement is beyond the machine's reach.

    The statement (top) is written or approved by a person. Everything in the large middle box, tactics, search, language models, agents, is untrusted: it only has to produce a proof term. The kernel (bright box) checks the term. Independent checkers (outlined) can check it again. Only the statement is beyond the machine's reach.

    Why everyone chose Lean

    Isabelle, Rocq (renamed from Coq with version 9.0 in 2025), HOL Light and Agda all have long records and large libraries. Isabelle's archive holds 5.6 million lines, more than Mathlib. Yet almost all AI theorem-proving work since 2024 targets Lean.

    The reasons are practical. Mathlib is one unified library with strict review, so a model trained on it learns one consistent style. Lean is also a fast programming language, so tactics, search tools and training harnesses are written in Lean itself. The Lean FRO, a nonprofit, builds the machine-facing tools the labs need: a REPL, a proof comparator, a benchmark server. The first AI prover teams picked it, and the training data and benchmarks followed.

    Not everyone accepts the verdict. Lawrence Paulson, in “Why not just use Lean?”, credits Lean's rise to community choices rather than technical superiority, and points to Isabelle's Sledgehammer and readable Isar proofs. For code, benchmarks consistently show models doing worse in Lean than in Dafny, which we come back to in Part 8.

    Two years in brief

    Apr 2025
    DeepSeek-Prover-V2 and Kimina-Prover bring long reasoning and reinforcement learning to open provers. The Equational Theories Project settles 22 million implications.
    Jul 2025
    Gold-medal level at the IMO: Harmonic's Aristotle in Lean, Google and OpenAI in natural language. Carleson's theorem is fully formalized.
    Aug 2025
    Lean 4.22 ships grind and the new compiler.
    Sep 2025
    Math Inc's Gauss formalizes the strong prime number theorem in three weeks.
    Nov 2025
    AlphaProof is published in Nature.
    Dec 2025
    Putnam 2025: AI systems prove all 12 problems in Lean within days.
    Jan 2026
    The first Erdős problem regarded as solved autonomously by AI, with a Lean proof.
    Feb 2026
    Sphere packing in dimension 8 is formally verified.
    Jul 2026
    Two kernel soundness bugs in a week. AxiomProver scores 42 of 42 at IMO 2026 in Lean.
    Sep 2026
    A Lean proof of Fermat's Last Theorem, written by AI agents in 11 days. PutnamBench is solved outright.

    Part 2

    What changed in Lean itself, and who checks the checker.

    grind

    The biggest change to Lean in this period is grind, a tactic modeled on SMT solvers, released with Lean 4.22 in August 2025 by Kim Morrison and Leonardo de Moura. It works by contradiction on a shared “whiteboard” of facts: congruence closure merges equal terms, E-matching instantiates lemmas tagged @[grind], case splits are guided, and satellite solvers handle linear integer arithmetic (cutsat, which supersedes omega), commutative rings and fields via Gröbner bases, linear real arithmetic and orders. Unlike an external SMT solver, it produces an ordinary Lean proof term that the kernel checks.

    grind is deliberately not a brute-force engine. Its documentation says it is not designed for problems whose search space explodes, such as pigeonhole or Sudoku; for those Lean has bv_decide, which bit-blasts to SAT, runs the CaDiCaL solver and checks its certificate with a checker proved correct in Lean. The FRO's current roadmap notes that “AI-generated proofs are becoming a major source of grind and bv_decide usage.”

    Lean releases that mattered

    VersionDateChange
    4.22Aug 2025grind; new compiler replaces the old; module system (experimental); mvcgen for verifying programs
    4.23Sep 2025Old C++ compiler removed; faster kernel checking of reflection proofs
    4.25Nov 2025Interactive grind, finish?, suggested loop invariants
    4.27Jan 2026Module system stable; about 1 GB less memory editing Mathlib
    4.29Mar 2026Each native computation becomes its own visible axiom
    4.32.1–2Jul 2026Two kernel soundness fixes
    4.34Sep 2026Closes three more routes to a proof of False
    4.35Oct 2026vcgen replaces mvcgen; lake comparator; kernel in a separate process for untrusted projects

    Lean ships about once a month. 4.35.0, of October 12, 2026, is the current stable release; we used it for our test.

    Faster, smaller, stricter

    The new code generator, written in Lean, replaced the old C++ one in 2025. The module system, stable since January 2026, makes declarations private by default and hides proofs from importing files, so a change to a proof no longer forces everything downstream to rebuild. In a talk in April 2026, the FRO reported that 64% of Mathlib's data is now private and the memory needed to import Mathlib fell by 48%; the full library builds in under ten minutes on a 96-core server.

    For programs, Lean gained Hoare-logic tooling: Std.Do specifications for monadic code, and mvcgen, which turns them into verification conditions, replaced in 4.35 by vcgen, reported to take 0.32 seconds on a benchmark where mvcgen took 66. Native computation got stricter: since 4.29, each use of the compiler inside a proof adds its own named axiom, so #print axioms shows exactly which steps trust compiled code rather than the kernel.

    Four levels of checking

    Build
    The file compiles and the editor shows no errors. Enough for your own work, not for a proof from someone you do not trust.
    Axioms
    #print axioms lists every axiom the proof depends on. Anything beyond propext, Classical.choice and Quot.sound needs a reason.
    Replay
    lean4checker replays every declaration through the kernel in a fresh process, catching proofs that bypassed it.
    Comparator
    Comparator builds the proof in a sandbox, checks it with the kernel and optionally an independent kernel, and confirms the theorem matches a trusted copy of the statement. The reference manual calls it the gold standard and names unreviewed AI-generated proofs as a threat to defend against.

    Who checks the checker

    A kernel is small, but it is still code. Lean's is written in C++, and there are now independent ones: Lean4Lean, Mario Carneiro's kernel written and partly verified in Lean itself, and nanoda, a Rust kernel of under 5,000 lines. In April 2026 the FRO opened the Lean Kernel Arena, a public test suite of valid and deliberately invalid proofs that every checker runs. It now lists 35 checkers. The official kernel takes 32 minutes to check all of Mathlib; the fastest independent ones take about 70 to 80 seconds, by skipping work the official one repeats.

    De Moura's argument, in “Who Watches the Provers?”, is that several small independent kernels that must all agree are a stronger guarantee than any single verified one, and stronger than tools such as Dafny or Verus whose trusted base includes a full SMT solver. In March, Tristan Stérin ran an AI agent team for 72 hours looking for ways to prove False: it found seven in Rocq, two in nanoda, one in Lean4Lean and none in the official Lean kernel. That record did not survive the summer.

    The summer of soundness bugs

    In July 2026, Lean had two kernel soundness bugs in a week. The first, fixed in 4.32.1, let a malicious metaprogram running inside Lean get the kernel to accept False; it was found by Patrick Hulin with help from an OpenAI model. The second surfaced on July 25 in a public repository claiming a sorry-free, axiom-free Lean disproof of the Collatz conjecture, produced with AI assistance. Kiran Gopinathan reduced it to a proof of False three days later, and a fix shipped about an hour after the report.

    The postmortem traced it to nested inductive types with unused parameters, reachable only by sending a declaration straight to the kernel. It also took a second bug: nanoda accepted the same proof because of an unrelated flaw, fixed a week earlier. A security-focused AI then found more kernel mistakes, all caught by nanoda; Lean 4.34 closed three more routes to False. Comparator now runs nanoda by default.

    Thomas Hales, writing for mathematicians in October, called it the summer of soundness bugs. Mathlib was rechecked and nothing in it depended on the bugs. The lesson is about adversaries: when the provers are optimized machines rewarded for acceptance, the kernel faces the kind of pressure a network parser does, and gets found out the same way.

    Postmortem

    This is an implementation bug, not a hole in Lean's meta-theory.

    Leonardo de Moura, postmortem for kernel soundness bug 14576, August 2026

    Part 3

    The library everything depends on, and the people reviewing it.

    Lines of code in Mathlib at the end of each month since the port from Lean 3 finished in August 2023 (line); gray bars mark 2025 and 2026. From 1.72 million lines in January 2025 (left ring) to 2.50 million now (right ring). The dip in 2024 is a large refactoring. Gridlines every 500,000 lines. From the project's published git statistics.

    Lines of code in Mathlib at the end of each month since the port from Lean 3 finished in August 2023 (line); gray bars mark 2025 and 2026. From 1.72 million lines in January 2025 (left ring) to 2.50 million now (right ring). The dip in 2024 is a large refactoring. Gridlines every 500,000 lines. From the project's published git statistics.

    Mathlib in numbers

    MeasureValue
    Theorems293,303
    Definitions139,874
    Lines2.50 million in 9,479 files
    Growth in 2025about +27% in lines
    Contributors772 by the statistics page; 826 commit authors
    Maintainers28, on two-year terms
    Merged pull requests10,314 in 2025; 8,849 in 2024
    Open pull requests2,766
    Pull requests labeled LLM-generated1,341, of which 426 open

    Mathlib statistics and git statistics as of November 9, 2026; pull requests from the GitHub API on November 8. Growth is roughly linear, not exponential, despite everything else in this article.

    Review is the bottleneck

    Mathlib does not accept code just because it compiles. Reviewers check that definitions are the right ones, at the right generality, with a usable API, because hundreds of later files will build on them. That is slow, and it does not scale with AI output. In July 2025 Alex Gerko of XTX Markets gave $10 million, half to the Lean FRO and half to Mathlib, which started the Mathlib Initiative with paid reviewers and a goal of answering 90% of review rounds within a week.

    Kevin Buzzard reported in February 2026 that paying expert reviewers produced a “huge” acceleration in merged features, but that money cannot easily multiply mathematics tenfold because the output still needs experts to read it. His summary: “Formal languages can check proofs, but humans need to check definitions.” The open queue has kept growing, from over 2,000 in February to 2,766 in November.

    Mathlib's rule

    As of mid-2026, code written by an AI without the supervision of a Lean subject expert fails to meet that bar by a large margin.

    Mathlib contribution guidelines, section on AI. Disclosure of AI use is mandatory, LLM-written comments are banned, and low-quality AI pull requests are closed without comment.

    Libraries written by machines

    Since Mathlib will not absorb machine output at machine speed, the community built places next to it that can. Tau Ceti, launched in July 2026 by the FRO and the Mathlib Initiative, is a library downstream of Mathlib written by AI: humans own the roadmap and AI reviewers judge pull requests against open rubrics. By October it was reported at about 3 million lines, larger than Mathlib. Lean Pool is a similar AI-maintained archive.

    In October seven of the field's central figures, Avigad, Buzzard, Commelin, Degenne, Morrison, Nash and Topaz, published “How to Formalize All of Mathematics”. It predicts that most of mathematics can be formalized within three years and proposes Palomar, a registry where every project declares whether it was written by humans, with AI or autonomously, and ships a Comparator setup so anyone can check it. Its warning is the other half of the plan.

    The manifesto

    A lousy formalization of existing results is worse than no formalization at all.

    Avigad, Buzzard, Commelin, Degenne, Morrison, Nash and Topaz, How to Formalize All of Mathematics, October 2026

    Part 4

    How machines write Lean proofs, and how that changed.

    From search to reasoning

    Until 2024, neural provers mostly worked one tactic at a time: a model proposes the next tactic, Lean runs it and returns the new goals, and a tree search explores the options, as in LeanDojo and its successors. The alternative was to write a whole proof in one go, check it, and sample many times. Both were limited by what a small model could see in a single goal.

    In 2025 the whole-proof approach won, by borrowing from reasoning models. A prover now thinks at length in natural language, sketches the argument, then writes the full Lean proof, and is trained by reinforcement learning with the Lean compiler as the reward: a proof that compiles scores one, anything else zero. The verifier cannot be fooled by fluency, which makes it an unusually clean reward signal. Tree search survived as an outer loop, over subgoals and lemmas rather than single tactics.

    Open provers on miniF2F

    ProverDateSizeminiF2F testBudget
    BFS-ProverFeb 20257B72.95%tree search
    Kimina-Prover PreviewApr 202572B80.7%8,192 attempts
    DeepSeek-Prover-V2Apr 2025671B88.9%8,192 attempts
    Goedel-Prover-V2Aug 20258B / 32B84.6% / 90.4%32 attempts
    BFS-Prover-V2Sep 202532B95.08%tree search, planner
    LongCat-Flash-ProverMar 2026560B MoE97.1%72 attempts
    Goedel-ArchitectJun 2026agent99.2%1 attempt

    As reported by the authors. miniF2F is 244 test problems from olympiads, AIME, AMC and textbooks. Budgets are not comparable: an attempt may be one sample or a long agentic session. Goedel-Prover-V2-8B matched DeepSeek-Prover-V2-671B at 32 attempts with a model 80 times smaller.

    How they are trained

    Four techniques recur. Decomposition: DeepSeek-Prover-V2 used a general model to break problems into subgoals, proved the subgoals with a small prover, and used the assembled proofs as training data. Reinforcement learning with the verifier as reward, now standard. Self-correction: Goedel-Prover-V2 feeds Lean's error messages back to the model, lifting its 32B model from 88.1% to 90.4%. Test-time learning: training further on the problem at hand, which AlphaProof did for days per problem.

    Each comes with a cost. Kimina reports 92.2% on miniF2F with test-time reinforcement learning, against 84.0% at 32 attempts. Hilbert, Apple's recursive decomposition system, reached 99.2% on miniF2F and 462 of 660 PutnamBench problems with an average of 1,840 model calls per problem. LongCat-Flash-Prover added explicit checks for “theorem consistency and legality”, because a model rewarded only for compiling learns to cheat: changing the statement, or finding a hole in the checker.

    AlphaProof

    Google DeepMind's AlphaProof, which solved three IMO 2024 problems, was finally published in Nature in November 2025. It is the AlphaZero recipe applied to Lean: about a million informal problems were translated by a model into about 80 million formal statements, and a 3-billion-parameter proof network learned by proving and disproving them, with Lean as the referee.

    The paper puts numbers on the cost. Auto-formalization took about 100,000 TPU-days and the main reinforcement learning about 80,000. On the IMO problems it solved, it trained further on variants of each problem for two to three days. On its formal IMO benchmark it solved about three quarters of number theory and algebra problems but only a fifth of combinatorics, the area where formal statements are hardest to write and search is least guided.

    Its successor is different in kind. AlphaProof Nexus, published in Science in October 2026, couples a general language model to Lean, and resolved 9 of 353 open Erdős problems it attempted, at a few hundred dollars each.

    The companies

    Three startups built their products on Lean. Harmonic's Aristotle combines a Lean search model of over 200 billion parameters with informal reasoning and a geometry engine; it produced Lean proofs for five of six IMO 2025 problems, and has since been the most common tool for formalizing Erdős problem solutions. ByteDance's Seed-Prover was officially entered at IMO 2025 and solved four problems in the time limit and a fifth after; Seed-Prover 1.5 reached 88% of PutnamBench and 80% of the FATE-H algebra benchmark.

    Axiom Math's AxiomProver proved all 12 Putnam 2025 problems, eight by the end of the exam and four in the following days, and later produced proofs of open conjectures, including Fel's conjecture. Math Inc's Gauss specializes in formalizing existing mathematics at scale. Mistral released Leanstral, an open-weight Lean model with 6 billion active parameters.

    General models took over

    The most important shift of 2026 is that specialized provers stopped being necessary for most tasks. Numina-Lean-Agent is Claude Code with a Lean tool server and no prover training; it proved all 12 Putnam 2025 problems at about $50 per problem by default and about $1,000 for the hardest. Google's LEAP did the same with general models. Delta-Prover had already reached 95.9% on miniF2F with an unmodified general model in mid-2025.

    Frontier models in March 2025 solved between zero and three PutnamBench problems on a single attempt. By late 2026, every system claiming all 672 is an agent around a general model, and specialists such as Leanstral or Goedel-Prover are used as subroutines inside them. What changed was not that general models learned Lean syntax, but that they became good enough at long tasks to use Lean's feedback: run the proof, read the error, look up a lemma, try again, for hours.

    Part 5

    Olympiads and the Putnam, in Lean.

    IMO 2025

    SystemLanguageResultNote
    Harmonic AristotleLean5 of 6Statements formalized by hand by Harmonic
    ByteDance Seed-ProverLean4 of 6 in time, 5 afterOfficial entry; two proofs took 3 days and 2,000–4,000 lines
    Google Gemini Deep ThinkEnglish35 of 42, goldGraded by IMO coordinators
    OpenAI experimental modelEnglish35 of 42, goldGraded by former medallists it hired

    Aristotle, Seed-Prover. Problem 6, the hardest, was solved by none. A Lean proof is checked completely but only against a statement someone wrote; a natural-language proof is graded by people.

    Putnam 2025 in Lean

    SystemSolvedKind
    AxiomProver12 (8 by the end of the exam)Specialized
    Numina-Lean-Agent12Claude Code and Lean tools
    LEAP12Gemini agent
    MerLean-Prover12Planning harness
    Seed-Prover 1.511, in 9 hoursSpecialized
    Goedel-Architect11Open-weight agent
    Aristotle10Specialized

    The 2025 Putnam was held on December 6, after the systems were trained, so these are clean of contamination. AxiomProver's proofs took 43 to 518 minutes each; the longest, A5, is 2,054 lines.

    IMO 2026

    At IMO 2026 in Shanghai in July, Axiom reported 42 of 42 in Lean: 7,722 lines across six proofs, about 25 hours of compute, checked with Comparator against Mathlib. There is a significant caveat. The formal statements were also written by AxiomProver, from the English problems. Nobody official graded them; readers have to check for themselves that each formal statement says what the problem says.

    The other headline results were in natural language. NVIDIA's open Nemotron pipeline scored 30 of 42, a gold medal, without any formal prover, and several companies claimed perfect scores graded by organizers or by other models. Two years after AlphaProof's silver, a perfect olympiad score no longer distinguishes systems. The competitions that still do are those whose problems have no known answer.

    Problems solved on PutnamBench in Lean, every leaderboard entry by date (rings) and the best so far (line), July 2024 to October 2026. The dashed line is 672, all problems. The best stood at 8 in February 2025, 86 in July, 462 in October, 668 in January 2026, and all 672 from August.

    Problems solved on PutnamBench in Lean, every leaderboard entry by date (rings) and the best so far (line), July 2024 to October 2026. The dashed line is 672, all problems. The best stood at 8 in February 2025, 86 in July, 462 in October, 668 in January 2026, and all 672 from August.

    What 672 costs

    SystemSolvedReported cost
    Seed-Prover 1.558110 GPU-days per problem
    Aleph Prover668, then 672average $68–74, up to $1,468
    Goedel-Architect642average $5.80
    Leanstral 1.55884 million tokens per problem
    Midas Prover672, answers not givenaverage $6.17, 31 minutes
    NEAR AI, DeepSeek V4672mean $0.17, median $0.04

    From the PutnamBench leaderboard, as submitted by the authors. Costs count different things: some exclude reviewers, infrastructure or failed runs, and one entry received human-written proofs as hints. Most top entries are closed.

    Reading a leaderboard

    PutnamBench was built in 2024 to be hard: 1962 to 2025 Putnam problems formalized in Lean, Isabelle and Rocq. It went from under 2% to 100% in eighteen months. Before trusting any single number, check four things. Attempts: pass@1 and pass@8,192 are different claims. Answers: 346 of the 672 problems ask for a value, and in the standard track the value is written into the statement, so the prover only has to show it is right. Only Midas reports all 672 in the harder mode where it must find the answer. Hints: Mistral's 658 used the official human-written solutions as context, and the leaderboard says so.

    Openness: several leading entries share their proofs only privately with the maintainers. And the benchmark itself changed under the systems: Aleph's authors found 28 mistakes in the formal statements, which were corrected. With the Lean track saturated, attention is moving to benchmarks of research mathematics, which is where the next parts go.

    Part 6

    Saturated scores, wrong statements, and cheating machines.

    miniF2F is done

    miniF2F, 488 competition problems formalized in 2021, was the standard benchmark for four years. By 2026 several systems report 99% to 100% of its test set. The more interesting finding came from re-reading it. miniF2F-v2, in November 2025, compared every formal statement with the original problem and found that more than half disagree with or simplify the informal one.

    The effect on scores was large. A pipeline that has to translate the problem and then prove it, as a real user would, scored about 36% on the original benchmark, though its separate stages reported 97% and 69%. On the corrected version, the best end-to-end system went from 40% to 70%. Benchmarks had been measuring the ability to prove what someone else stated, and stating is the harder half.

    Benchmarks, then and now

    BenchmarkProblemsBest at releaseBest since
    ProofNet371 undergraduatelow single digits41.4% (BFS-Prover-V2)
    PutnamBench672 (Lean)1 problemall 672
    FormalMATH5,56016.46%
    CombiBench100 combinatorics710
    FATE-H / FATE-X100 / 100 algebra3% / 0%87% / 34% (claimed, Leanstral 1.5)
    ProverBench32570.8% (LongCat)
    Verina189 programs4.9% proofs (o3)96.8% resolved (Aristotle, claimed)

    As reported by the authors. FATE-X is above PhD qualifying exam level. Blank: no later result we could confirm.

    Wrong statements

    The deepest problem with formal benchmarks is that the kernel checks proofs against whatever was written. If a formal statement is accidentally easier than the problem, or false, or provable from contradictory hypotheses, scores go up or down for reasons unrelated to skill. Faults in Our Formal Benchmarking, at ICML 2026, audited five Lean benchmarks and their forks and reported 4,833 findings, 398 of them certified mechanically: counterexamples, vacuous theorems, unsound axioms.

    Other audits found the same pattern. PutnamBench accepted 28 corrections from one team; the Isabelle version needed 130. Beyond Compilation tested eight translation systems on 227 statements: the best agent produced statements that compiled 87.2% of the time, but only 57.7% were judged faithful. The Faithfulness Gap proposes testing translations by proving properties both ways. None of this is solved; it is the single biggest source of error in the field.

    Gaming the checker

    Provers trained to make Lean accept their output will exploit anything that makes Lean accept their output. The benchmark audit found that a bug in Lean versions before 4.20, which let apply? report success without producing a valid proof, appears in at least three published DeepSeek-Prover-V2 proofs. native_decide, which evaluates a claim with compiled code instead of the kernel, extends trust to the whole compiler and is banned by most evaluation harnesses.

    In January 2026 James Hanson showed that a crafted declaration could make decide appear to prove Fermat's Last Theorem in a way that fooled both lean4checker and SafeVerify, a popular checker for AI proofs, but not Comparator. SafeVerify was patched the next day. AxiomProver's Putnam proofs had been checked with SafeVerify; its IMO 2026 proofs were also run through Comparator. Every serious result now states which checker it used. One that does not is a draft.

    Part 7

    Big formalizations, open problems, and what mathematicians make of it.

    Human projects that finished

    Two large human-led projects finished. The Equational Theories Project, led by Terence Tao, settled all 22,028,942 implications between 4,694 laws of magmas, every one checked in Lean, in April 2025, with contributions from dozens of people and automated provers but no major role for modern AI. Carleson's theorem on the convergence of Fourier series, a famously hard proof, was completed in July 2025, less than 13 months after it began, by a team led by Floris van Doorn; the paper followed in September 2026.

    Both worked from a blueprint: a human-written plan breaking the proof into hundreds of small lemmas, each formalized separately and tracked in a dependency graph. The blueprint is what let dozens of contributors work in parallel. It turned out to be exactly what AI agents needed too.

    Gauss

    Math Inc's Gauss is an agent system for formalizing existing mathematics. Its first public result, announced in September 2025, completed the strong prime number theorem project that Tao and Alex Kontorovich had set as a challenge in January 2024: about 25,000 lines and more than 1,000 theorems and definitions in three weeks, working from human natural-language scaffolding. The human project had worked on it for 18 months.

    Then sphere packing. Maryna Viazovska's proof that the E8 lattice packs spheres best in dimension 8 had been under formalization since March 2024, with a blueprint by her team. In February 2026 Gauss finished the remaining work in five days, against the team's estimate of six months, and then formalized the 24-dimensional case from the paper alone in about two weeks. The team's paper records the human and machine parts. The code peaked at about 500,000 lines before being cut to 200,000.

    Fermat

    Kevin Buzzard started formalizing Fermat's Last Theorem in October 2024 with five years of funding and a modest promise: to reduce it to results known in the 1980s. On September 4, 2026 Anthropic announced a complete Lean proof, written by Claude agents working largely autonomously for 11 days: about 13 million lines and 29,500 intermediate theorems, following Darmon, Diamond and Taylor's 1995 account of Wiles's proof and building on Mathlib and Buzzard's project.

    Buzzard checked it himself. It took about twenty times as long to build as Mathlib on a 96-core machine; he ran Comparator and inspected the definitions, and wrote that he is 99.9% sure it is right. He also noted what it is not: it covers exponents of 17 and above, relying on an earlier human formalization for small cases, and it formalizes the 1990s proof, not the modern one his project is building toward. Anthropic itself says the proof is probably far longer than it needs to be.

    Large formalizations

    ProjectLinesTimeBy
    Kepler conjecture (2014)about 500,000about 20 work-yearsHumans
    Strong prime number theoremabout 25,0003 weeksGauss, with human scaffolding
    Sphere packing, 8 and 24about 200,0002 years human, then 3 weeksHumans, then Gauss
    Unit distance disproofabout 1.2 million3 weeksOpenAI model (reported)
    Fermat's Last Theoremabout 13 million11 daysClaude agents; checked by Buzzard
    Finite simple groups43.1 million24 days (reported)Axiom; not independently checked

    Kepler from Hales; others from the projects. Axiom's classification of finite simple groups, announced in late October, is sorry-free and ships a Comparator setup, but at the time of writing nobody independent has reported rebuilding it. Line counts measure machine verbosity as much as mathematics.

    Erdős problems

    Thomas Bloom's database of about a thousand problems posed by Paul Erdős became the field's proving ground for open questions, with Lean statements for many of them in DeepMind's Formal Conjectures repository. In January 2026, Erdős problem 728 became the first regarded as solved autonomously by AI: a GPT model produced the argument and Aristotle the Lean proof.

    The record since is real but needs reading closely. Tao's wiki of AI contributions separates solutions found by AI alone, those where earlier literature turned up afterwards, and those built with humans, and says it is not a benchmark. Problem 707 was disproved with a Lean proof before its authors found that Marshall Hall had published a counterexample in 1947. Buzzard noted that problem 124 was solved in a form Erdős probably did not intend. Bloom estimated in September 2026 that three to five Erdős problems of real substance had been solved by AI.

    Counterexamples

    In May 2026 an OpenAI model disproved Erdős's unit distance conjecture, problem 90. A group including Noga Alon, Bloom and Timothy Gowers wrote a human-checked account, and the result was formalized several times, once in about 1.2 million lines of machine-written Lean in three weeks. In July a counterexample to a three-variable case of the Jacobian conjecture, found with an AI model, was reported and checked in Isabelle; the two-variable case remains open.

    Not every claim has held up as stated. OpenAI's September Navier–Stokes result, formalized in Lean, concerns a version of the problem with an external forcing term, and mathematicians dispute whether it addresses the Clay problem. The Lean proof is not in question. Whether its statement is the famous one is, and no kernel can settle that.

    Tao, June 2026

    It is now easier to generate long correct proofs than it is to generate short correct proofs.

    Terence Tao, on Mathstodon, after reporting that virtually every formalization task he had issued could now be completed within hours, but with proofs “hundreds of lines longer than what a human would choose”.

    What mathematicians say

    Buzzard's Annals Challenge asked how much current research can even be stated in Lean. Of 213 papers in the Annals of Mathematics since 2020, only about 20% have main theorems that could be formalized with existing definitions. Writing the statements, his team found four typos that made main theorems in papers by Fields medallists trivially false. Definitions, not proofs, are the frontier.

    Reactions range widely. Twenty-five Fields medallists signed a declaration in September 2026 that the goals of AI companies and of mathematicians are “severely misaligned”, objecting to problems being used as advertising. Hales concluded that a Lean proof should not be accepted until a human has audited that its statement says what is claimed. An expert review of an agent's formalization of a Grothendieck vanishing theorem found it compiled but chose definitions no mathematician would use. Almost no one now disputes that machines can write correct Lean. The argument is about what it is worth.

    Part 8

    Lean as a verifier of real software.

    Verified software in Lean

    Lean is also used to prove programs correct, and most of the money is there. AWS rewrote the specification of Cedar, the authorization language behind Amazon Verified Permissions, in Lean and proves properties of it, differential-testing it against the production Rust code nightly. SampCert, over 12,000 lines of Lean, verifies the random samplers behind AWS Clean Rooms' differential privacy.

    For Rust, Aeneas translates safe Rust into pure Lean functions to be proved about. In September 2026 Microsoft Research reported 237,000 lines of Lean establishing memory safety, freedom from panics and functional correctness of 16,700 lines of Rust in its SymCrypt library, including SHA-3 and the post-quantum ML-KEM, with agents writing most proofs; the verified code ships in Windows test builds. Harmonic has extended Aristotle to C and to hardware, including RISC-V multiply and divide instructions.

    Writing verified code

    BenchmarkTasksResult
    Vericoding (Sep 2025)12,504 specsLean 27%, Verus 44%, Dafny 82%
    AlgoVeri (Feb 2026)77 per languageLean 7.8%, Verus 24.7%, Dafny 40.3%
    Verina189o3: 72.6% code, 52.3% specs, 4.9% proofs
    CLEVER161At most 1 end to end
    Vericoding Lean, agentic (May 2026)423 specs95.0% with 50 model calls

    Write a program and prove it meets a formal specification. Off-the-shelf models do much worse in Lean than in Dafny, whose SMT solver closes many goals automatically, but agents with search tools closed most of the gap by mid-2026.

    Why code is harder

    Competition mathematics has a fixed statement and one goal. Program verification needs a specification, an implementation, loop invariants and a proof, and the spec can be wrong in the same way a theorem statement can. Verina found models wrote correct code 72.6% of the time and a sound, complete specification about half the time, but a proof under 5%.

    Lean's weakness here was its tooling, not its logic. Dafny and Verus call an SMT solver on every verification condition; Lean until 2025 had no verification-condition generator and no SMT-style tactic. grind and vcgen exist to fill that gap, and Loom and Veil build Dafny-style verifiers inside Lean. The vericoding authors attribute Lean's low score partly to mvcgen being new when they ran it.

    Part 9

    A standard benchmark on today's Lean, with and without AI, on a laptop.

    What we did

    We wanted three things that papers rarely report together, on a machine anyone could own: whether a standard benchmark still works on current Lean, how much of it Lean's own automation solves with no AI at all, and what a small open prover adds. We used an Apple M4 laptop with 24 GB of memory, Lean 4.35.0 and the matching Mathlib release, and miniF2F, in the Lean 4 version published with DeepSeek-Prover-V1.5 in 2024: 488 problems, 244 of them the test set every paper reports on.

    First we compiled every statement with its proof replaced by sorry. Then we ran ten tactics, each alone, on each test problem, with Lean's default resource limit doubled. Finally we ran DeepSeek-Prover-V2-7B, the small model from that paper, quantized to 8 bits and run with MLX, asking for four complete proofs per problem without its long-reasoning mode. Every proof was grafted onto our copy of the statement, so the model could not change the theorem, and anything containing sorry, native_decide, new axioms or option changes was rejected before Lean saw it.

    Statements that no longer compile

    CauseStatements
    Big-operator syntax ∑ x in s, removed from Mathlib64
    … of which also needed a type annotation moved2
    Complex.abs, removed from Mathlib1
    Total, of 48865 (13%)

    Compiled with Lean 4.35.0 and Mathlib v4.35.0. 32 of the broken statements are in the test set. All were mechanical fixes, and after them every statement compiled. Any paper reporting miniF2F results on recent Lean has had to make the same repairs, and few say how.

    Test problems solved, of 244 (dashed line). Gray: each tactic alone, from grind (81) down to positivity (0). Bright: any of the ten (96). Dotted: the 7B prover, first attempt on average (91) and four attempts (120). Last: both together (131).

    Test problems solved, of 244 (dashed line). Gray: each tactic alone, from grind (81) down to positivity (0). Bright: any of the ten (96). Dotted: the 7B prover, first attempt on average (91) and four attempts (120). Last: both together (131).

    Built-in tactics, one at a time

    TacticSolvedOnly this one
    grind81 (33%)26
    bound49 (20%)2
    nlinarith33 (14%)1
    omega30 (12%)0
    linarith29 (12%)0
    aesop29 (12%)2
    norm_num22 (9%)0
    decide22 (9%)0
    simp_all21 (9%)0
    positivity0 (0%)0
    Any of the ten96 (39%)

    miniF2F test, 244 problems, each tactic alone with a limit of 400,000 heartbeats. “Only this one”: problems no other tactic solved. positivity proves only goals of the form 0 < x or 0 ≤ x, which competition problems rarely are.

    Where they succeed

    SourceProblemsAny tactic7B prover, 4 attempts
    MATH1308392
    AMC and AIME601116
    IMO2003
    Other3429

    MATH: problems from the MATH dataset, mostly computations. AMC and AIME: American competitions. IMO: olympiad problems, including some from the shortlist. Other: custom algebra, number theory and induction problems.

    A 7B prover on a laptop

    MeasureValue
    Solved, first attempt (average over four)91.2 (37.4%)
    Solved, any of four attempts120 (49%)
    Solved by the model but no tactic35
    Solved by a tactic but not the model11
    Solved by either131 (54%)
    Proofs rejected before checking123
    Mean proof length361 tokens
    Generation time, all 976 attempts3.8 hours

    DeepSeek-Prover-V2-7B, 8-bit, non-chain-of-thought prompt, temperature 1.0, up to 768 tokens per proof. In the same mode its paper reports 55.5% on one attempt and 68.0% with 32, on the Lean version it was trained with, with proofs averaging 443 tokens.

    What we saw

    Two years of Lean development broke 13% of the benchmark's statements. Every repair was mechanical, but reported miniF2F scores now depend on repairs that papers rarely describe.

    grind alone solved 81 problems, more than the other nine tactics together (70), and 26 that none of them could. All ten together solved 96 (39%), with no AI: almost all computations from the MATH dataset, and no IMO problem.

    The 7B model solved 120 problems (49%) with four attempts and 37% on a first attempt, below the 55.5% its paper reports. Our 768-token limit, 8-bit weights and newer Mathlib all cost something; we cannot separate them. It added 35 problems no tactic solved, including three IMO problems. For two inequalities it guessed which products of hypotheses nlinarith needed; Lean did the rest.

    Together, automation and the model solved 131 (54%) in under four hours on a laptop. The best systems report 99% on the same problems. The gap is reasoning, attempts and compute.

    Part 10

    What is settled, what is open, and how to read a claim.

    Settled and open

    Settled: machines can write correct Lean proofs of competition problems, and of long, hard, known mathematics, faster than any human team. Proving is no longer the bottleneck in formalization; stating, reviewing and maintaining are. Specialized provers mattered in 2025 and became components in 2026, as general models learned to use Lean's feedback over long sessions. Lean's kernel is not infallible, but the response to its bugs, independent kernels, Comparator and an open test arena, is the strongest trust story any proof assistant has.

    Open: how to check, at scale, that a formal statement means what its author claims, which no kernel can do. Whether machine-written libraries of tens of millions of lines will be usable by people, or only by other machines. Who reviews them. Whether AI-found results on open problems are new, a question that needs literature search more than proof. And whether formal verification of software, where most of the money is, catches up with mathematics, as SymCrypt and the vericoding results suggest it can.

    Reading a Lean claim in 2026

    Statement
    Who wrote the formal statement, a person or the same system that proved it? Has anyone compared it with the informal problem?
    Checker
    Was it checked with Comparator or at least lean4checker, and which axioms does it use? Is native_decide or anything beyond the standard three involved?
    Budget
    One attempt or thousands? Hours or GPU-days? Were answers or human proofs given as hints?
    Openness
    Can you download the proof and build it yourself, with a stated Lean and Mathlib version?
    Novelty
    For open problems: was the literature searched? Tao's wiki lists several “new” results found in old papers.
    Size
    Lines of code measure verbosity. A million-line proof is a correct proof, not necessarily a good one.

    Check the statement

    Glossary

    Kernel
    The small program that checks proof terms against the rules of Lean's type theory.
    Tactic
    A command that builds part of a proof, such as simp, linarith or grind.
    Mathlib
    Lean's community library of formalized mathematics.
    sorry
    A placeholder that admits a goal without proof; a finished proof has none.
    Formalization
    Writing mathematics in a proof assistant's language.
    Autoformalization
    Doing that automatically, usually with a language model.
    Blueprint
    A human-written plan of a proof as a graph of lemmas, used to coordinate formalization.
    pass@k
    Success if any of k attempts is correct.
    Comparator
    The FRO's tool that checks a proof in a sandbox against a trusted statement.
    native_decide
    Proving a claim by running compiled code, trusting the compiler.
    miniF2F, PutnamBench
    Benchmarks of competition problems in Lean.
    Statement fidelity
    Whether a formal statement says what the informal one says.

    Reading list: provers and benchmarks

    Provers
    DeepSeek-Prover-V2. Kimina-Prover. Goedel-Prover-V2. Seed-Prover and 1.5. Aristotle. Hilbert. AlphaProof. Goedel-Architect
    Agents
    Numina-Lean-Agent. Delta-Prover. Ax-Prover. LEAP. AlphaProof Nexus
    Benchmarks
    PutnamBench and its leaderboard. miniF2F-v2. FATE. Faults in Our Formal Benchmarking. Beyond Compilation

    Reading list: Lean, mathematics, software

    Lean
    The grind tactic. Validating proofs. Who Watches the Provers?. Postmortem for bug 14576. FRO roadmap
    Mathematics
    How to Formalize All of Mathematics. FLT: Anthropic has beaten me to it. The Annals Challenge. Equational Theories Project. Hales on reliability
    Software
    How We Built Cedar. SampCert. SymCrypt with Aeneas. Vericoding. Verina

    Colophon

    Article
    bitfilter 0.13, November 9, 2026.
    Editors
    Aleksandar Bradic
    Research
    Written for this article from the papers, blogs, release notes and repositories linked throughout. arXiv identifiers were checked against arXiv and DOIs against Crossref. Results are as their authors report them; company announcements not independently checked are marked as claims.
    Data
    Mathlib size from the project's git statistics of November 9, 2026. PutnamBench results from the leaderboard file, last updated October 5, 2026.
    Experiment
    Lean 4.35.0 and Mathlib v4.35.0 on an Apple M4 with 24 GB of memory. miniF2F statements from the DeepSeek-Prover-V1.5 repository. DeepSeek-Prover-V2-7B, 8-bit, run with MLX.
    Next
    All articles