{"slug": "lean-4-proof-of-fermat-s-last-theorem-how-claude-did-it-in-11-days", "title": "Lean 4 proof of Fermat's Last Theorem: how Claude did it in 11 days", "summary": "Anthropic published a complete Lean 4 formalization of Fermat's Last Theorem on September 4, 2026, a 13-million-line proof written largely by dozens of Claude agents in 11 days and verified by Lean's kernel rather than human referees. The proof, built on Tianyi Peng's Prove2Me multi-agent platform and following the 1995 Darmon–Diamond–Taylor exposition, was confirmed by Imperial College London's Kevin Buzzard, who leads a competing human formalization effort and wrote that it tells us \"essentially nothing\" about mathematics. The repository's FinalCheck.lean uses #print axioms and #guard_msgs to guarantee the proof depends only on Lean's standard axioms, with no sorry or native_decide.", "body_md": "On September 4, 2026, Anthropic published a complete Lean 4 proof of Fermat's Last Theorem: 13 million lines, written largely by Claude agents in 11 days, and checked by a machine rather than by referees. The mathematician who has led the human effort to do the same thing since 2024 confirmed that it checks out, and then wrote that it tells us \"essentially nothing\" about mathematics. Both are true, and the gap between them is the interesting part for anyone who writes software that has to be correct.\n\n`sorry`, no `native_decide`.\nThe statement fits on one line: no positive integers a, b and c satisfy aⁿ + bⁿ = cⁿ for any integer n greater than 2. Pierre de Fermat wrote it in a book margin around 1637 and claimed a proof the margin was too small to hold. A 1908 prize of 100,000 gold marks attracted 621 incorrect proofs in its first year.\n\nAndrew Wiles announced a proof in June 1993. A gap was found, he fixed it with Richard Taylor, and the result was published in May 1995: 129 pages that, in Anthropic's words, took \"months of painstaking work to verify\". Nobody seriously doubted it after that. The doubt was never whether the theorem is true. It was whether any single human could check every step.\n\nLean is a proof assistant: a programming language whose type checker also checks mathematics. You write the theorem as a type, write the proof as a program, and the Lean kernel refuses to compile anything with a gap. Formalizing means rewriting a human proof at that level of detail, down to every lemma a textbook would call obvious.\n\nThis is the statement Anthropic's repo proves, from its `FinalCheck.lean`:\n\n```\ntheorem fermat_last_theorem (n : ℕ) (hn : 3 ≤ n) (a b c : ℕ)\n    (ha : 0 < a) (hb : 0 < b) (hc : 0 < c) : a ^ n + b ^ n ≠ c ^ n\n\n/-- info: 'fermat_last_theorem' depends on axioms: [propext, Classical.choice, Quot.sound] -/\n#guard_msgs in\n#print axioms fermat_last_theorem\n```\n\nThe second half matters most. `#print axioms` lists everything the proof ultimately assumes, and `#guard_msgs` makes the build fail if that list differs from the expected one. `propext`, `Classical.choice` and `Quot.sound` are Lean's standard axioms. `sorry` is Lean's placeholder for \"trust me\", and `native_decide` hands a computation to compiled code outside the kernel. Neither appears, so the checker's answer is not \"probably\" but \"yes, given these three axioms and this statement\".\n\nKevin Buzzard at Imperial College London has led a human project to formalize the theorem since 2024 ([GitHub](https://github.com/ImperialCollegeLondon/FLT)). Its blueprint, the plan alone, runs to 86 pages, and the work \"was expected to take years\".\n\nAnthropic's [research post](https://www.anthropic.com/research/formalizing-fermats-last-theorem) describes \"dozens of Claude agents\" running in a Claude Code multi-agent harness on Prove2Me, a platform from Tianyi Peng of Columbia. Prove2Me keeps a directed acyclic graph of theorem statements, with Fermat's Last Theorem at the root and the lemmas it depends on below, so each agent knows what is still open and what to prove next. The model was \"a general-purpose internal research model roughly comparable to Claude Fable 5.1\".\n\nThe graph exists because the first attempts failed. Early agents \"lost track of the project's state and stopped collaborating\". Those runs still contributed about 7 % of the non-boilerplate lines. Human input was limited to \"occasional high-level instructions\" from Peng, such as \"Jacobian as a scheme sounds high priority\". The proof follows the 1995 Darmon–Diamond–Taylor exposition of Wiles and Taylor–Wiles.\n\nAfter 11 days, at 02:00:57 UTC on August 18, \"The FLT root reads PROVED\". Anthropic announced it on September 4.\n\nYou don't read it; you rebuild it. The [repository](https://github.com/anthropics/fermats-last-theorem) README gives the numbers:\n\n| Check | Result | \n|---|---|\n| Lean version, modules | 4.33.1, 60,475 modules | \n| From-scratch `lake build` | 5 h 32 min at 96 jobs, peak 153 GB RAM | \n| `comparator` replay | 14 h 46 min, peak 230 GB RAM | \n| nanoda, an independent kernel in Rust | \"Checked 1,052,234 declarations with no errors\" | \n| Axioms | exactly `propext` ,`Classical.choice` ,`Quot.sound` | \n\nThe independent kernel is the part to notice. If Lean's own kernel had a bug, a second implementation written separately would be unlikely to share it. The trust you need shrinks to three things: the statement on the first line of the code block above, the three axioms, and two small kernels.\n\nWhat you give up is readability. The README says the names are machine-generated and the code is \"written to be checked rather than read\". It is a \"Research artifact. Not maintained and not accepting contributions.\"\n\nBuzzard's post is titled [\"FLT: Anthropic has beaten me to it\"](https://xenaproject.wordpress.com/2026/09/04/flt-anthropic-has-beaten-me-to-it/). Anthropic lent him a machine with 500 GB of RAM. He compiled \"over 13.4 million lines\", which took \"nearly 20 times as long to compile as Lean's mathematics library (on a machine with 96 cores!)\", ran `comparator`, and reported: \"it checks out\".\n\nThen: \"Note that mathematically this work of anthropic tells us essentially nothing\". He was \"99.9% sure\" the theorem was fine and number theorists were \"100% sure\"; the formalization \"just faithfully follows the early literature on the proof and adds nothing.\" Anthropic's post says proof assistants demonstrate a proof's \"correctness beyond a doubt\". For this theorem there was little doubt to remove.\n\nWhat it does show is how far autoformalization has come, and that is the part he is excited about. It also completes the last of Freek Wiedijk's 100 formalization challenges, a list about 20 years old.\n\nOn money he wrote: \"I was given £1M to run my project over 5 years; Anthropic took only 11 days but I do wonder if they spent more money…\" Anthropic gave tokens, not dollars. In the comments David Jao estimated 6 billion output tokens at API prices at about $300,000, and HN user sebzim4500 reached the same figure at $50 per million output tokens. That excludes training the model.\n\nMy favourite detail: the email telling him arrived while he was at the Green Man festival in Wales with poor 4G, from \"someone I'd never heard of\", and he \"wrote them off as a crank\".\n\nThis was mathematics, but the pattern is familiar from software.\n\nOn the same front page ([HN](https://news.ycombinator.com/item?id=49544762)), a human won one back. Shin Jin-seo, 26, a 9-dan and the world's top-rated Go player, beat KataGo, the strongest open-source Go engine, two games to one in Seoul in July, taking black plus two stones ([KED Global](https://www.kedglobal.com/artificial-intelligence/newsView/ked202607210007)). Two stones is roughly the historic gap between a top professional and a new one.\n\nHe lost game one badly, won game two by 4.5 points, and won the decider by 11.5 points in 221 moves, holding a 99 % win probability from mid-game after \"a measured attack on move 80\". The prize was 250 million won, about $170,000, plus a Genesis G90. His explanation: \"rather than trying to imitate AI, it is far more important to build the board according to my own style.\"\n\n**Chrome 152** ([release notes](https://chromereleases.googleblog.com/2026/09/stable-channel-update-for-desktop_01882797386.html)) shipped 12 security fixes. [CVE-2026-85046](https://nvd.nist.gov/vuln/detail/cve-2026-85046), a type confusion in V8, earned its reporter $1,000, and \"Google is aware that an exploit for CVE-2026-85046 exists in the wild.\" Update, and note that Shin's prize was 170 times the bounty.\n\n**Mullvad** is [shutting down](https://mullvad.net/en/blog/shutting-down-our-public-encrypted-dns-servers-and-sponsoring-quad9-instead) its public encrypted DNS on November 2 and sponsoring Quad9 instead. If you hard-coded its DoH servers, change them before then.\n\n**The Rust React Compiler is native in Vite.** `@vitejs/plugin-react` 6.1.0 takes `{ compiler: true }` to use oxc's compiler. On a 1,036-file codebase the compile step went from 14.3 s to 0.81 s, and the full build from 22.1 s to 9.3 s ([write-up](https://blog.master.dev/react-now-rusted-all-the-way-out/)).\n\n**IBM Bob** ([bob.ibm.com](https://bob.ibm.com/)) greets you with \"Hi, I'm Bob!\", runs subagents, targets Java and mainframe modernization, and ships an analytics product called Bobalytics.\n\nI stamped it SHIP IT. The kernel says yes, an independent kernel says yes, and Buzzard says yes. The mathematics did not change. The way we check mathematics did: a proof nobody will ever read can now be trusted further than one a few experts read, as long as the statement and the axioms are right.\n\n**Did AI prove Fermat's Last Theorem?**\n\nNo new proof. Claude formalized Wiles and Taylor's existing proof in Lean 4, so a machine could check every step.\n\n**How long is the Lean proof of Fermat's Last Theorem?**\n\nAbout 13 million lines of Lean with 29,500 intermediate theorems, over five times the size of Mathlib.\n\n**Can I check the proof myself?**\n\nThe repo is public. The README reports a 5.5-hour build on 96 jobs with 153 GB of RAM peak, so you need a large machine.\n\n*This article expands on an episode of **The Daily Diff**, a five-minute daily video on what shipped and what broke in tech.\n[Watch the episode](https://www.youtube.com/watch?v=aGd6UZJEFwA) · [Subscribe on YouTube](https://www.youtube.com/@dailydiffdev) · the written diff lands in your inbox every morning at [thedailydiff.dev](https://thedailydiff.dev).*", "url": "https://wpnews.pro/news/lean-4-proof-of-fermat-s-last-theorem-how-claude-did-it-in-11-days", "canonical_source": "https://dev.to/axrisi/lean-4-proof-of-fermats-last-theorem-how-claude-did-it-in-11-days-1ig2", "published_at": "2026-09-27 15:47:38+00:00", "updated_at": "2026-09-27 16:01:46.365573+00:00", "lang": "en", "topics": ["artificial-intelligence", "large-language-models", "ai-agents", "ai-research", "ai-tools"], "entities": ["Anthropic", "Claude", "Lean 4", "Kevin Buzzard", "Imperial College London", "Tianyi Peng", "Columbia University", "Prove2Me"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/lean-4-proof-of-fermat-s-last-theorem-how-claude-did-it-in-11-days", "markdown": "https://wpnews.pro/news/lean-4-proof-of-fermat-s-last-theorem-how-claude-did-it-in-11-days.md", "text": "https://wpnews.pro/news/lean-4-proof-of-fermat-s-last-theorem-how-claude-did-it-in-11-days.txt", "jsonld": "https://wpnews.pro/news/lean-4-proof-of-fermat-s-last-theorem-how-claude-did-it-in-11-days.jsonld"}}