Skip to content

Build1 publisher3 min readPublished

Claude agents' 13-million-line Fermat proof shrinks human review to one statement and three axioms

Anthropic published a 13-million-line Lean 4 proof of Fermat's Last Theorem that dozens of Claude agents wrote in 11 days. For teams weighing agents on correctness-critical code, the kernel checks every step, so what humans still review is the statement being proved.

The Engineer · Build desk

Illustration accompanying Claude agents' 13-million-line Fermat proof shrinks human review to one statement and three axioms

What happened

  • The agents coordinated through Prove2Me, a Columbia platform that keeps a graph of theorem statements with Fermat's Last Theorem at the root.
  • The graph's root read PROVED at 02:00:57 UTC on August 18, and Anthropic announced the result on September 4.
  • Rebuilding the proof from scratch took 5 h 32 min on 96 jobs and peaked at 153 GB of RAM, according to the repository README.
  • Kevin Buzzard, who holds a 1 million pound, five-year grant for the same formalization, verified that the machine-built proof checks out.
  • A commenter estimated the token bill at about $300,000 at list prices.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • exposure A spec that encodes the wrong property gets proved just as completely, so in agent-verified code the theorem statement is where an error can still pass the kernel.
  • cost Each independent from-scratch check costs about 531 job-hours, a bill a team gating releases on agent-written proofs pays on every full rebuild.
  • decision With machine-generated names throughout, teams adopting agent proofs have to plan on regenerating them when a spec changes, since nobody will hand-edit them.
  • precedent Buzzard's funded project expected the formalization to take years; an 11-day agent run makes formalizing a published argument something a team can price in tokens.

The line worth reading sits at the bottom of FinalCheck.lean [5]:

``` #guard_msgs in #print axioms fermat_last_theorem ```

`#print axioms` lists everything the proof ultimately assumes, and `#guard_msgs` fails the build if that list differs from the expected one [6]. The expected list is `propext`, `Classical.choice` and `Quot.sound`, Lean's standard axioms [5]. Two escape hatches are shut. `sorry` is Lean's placeholder for "trust me", and `native_decide` hands a computation to compiled code outside the kernel. Neither appears [4][7]. This is good craft. A shortcut anywhere in 13 million lines, over five times the size of Mathlib, turns into a failed build [1][3][4].

The guarantee has a boundary. According to the dev.to write-up, the checker's answer is "yes, given these three axioms and this statement" [8]. The statement fits in two lines of Lean: for any n of at least 3 and positive naturals a, b and c, a^n + b^n does not equal c^n [9]. The 13 million lines between that statement and the axioms were, in the repository's words, "written to be checked rather than read," and the theorem names are machine-generated [11].

I think that split is what carries over to correctness-critical software. A kernel removes the proof from human review. Nobody on a team will page through machine-named lemmas, and nobody needs to. What reviewers still own is the statement. In a codebase, that statement is the spec the agents were told to prove.

The coordination layer came out of a failure. Early agents "lost track of the project's state and stopped collaborating," according to Anthropic's research post. Those runs still contributed about 7% of the non-boilerplate lines [17]. The fix was Prove2Me's graph, which gives each agent a view of what is still open and what to prove next [16]. Human steering was limited to "occasional high-level instructions" from Tianyi Peng, who built the platform [18]. One of them read: "Jacobian as a scheme sounds high priority" [18]. The model, per the post, was "a general-purpose internal research model roughly comparable to Claude Fable 5.1" [22].

Around 1637, Fermat claimed a proof that his margin was too small to hold [21]. Anthropic's version needed 29,500 intermediate theorems and about 6 billion output tokens [2]. That comes to roughly 460 output tokens for every line in the final proof, and about 440 lines per theorem [1][2]. At a commenter's $300,000 list-price estimate, each line cost about 2.3 cents [15][3].

On scaling, the evidence is one run. It gives no curve relating tokens to proof size. The agents also had a known route to follow: the proof tracks the 1995 Darmon-Diamond-Taylor exposition of Wiles and Taylor-Wiles [19]. For the 11-day figure to transfer to a codebase, a published argument would have to exist for agents to follow. The spec would have to break into a graph of lemmas they can claim. And a kernel would have to reject gaps [16][19].

Kevin Buzzard at Imperial College London has led a human formalization since 2024, working from an 86-page blueprint [14]. He confirmed the Anthropic proof and wrote that it tells us "essentially nothing" about mathematics [23]. According to the write-up, he also called it a real step for autoformalization [13].

What to watch

  • Independent from-scratch rebuilds of the repository that reproduce the axiom check and the build time on other hardware.
  • A Prove2Me run on a target with no published human proof to follow, the case the Fermat run did not test.
  • Whether any of the 29,500 machine-named intermediate theorems are cleaned up and upstreamed into Mathlib.
Loading claim ledger
Loading source directory links
Loading share composer
Loading topic controls
Loading related stories