通过 Prove2Me 和基于 Claude Code 的多智能体系统,一个智能体团队在不到两周的时间内完成了证明,消耗了大约六十亿个通用内部研究模型的输出令牌,该模型大致相当于 Claude Fable 5.1。最终的证明经过 Lean 检查;它仅使用 Lean 的三个标准公理,以及一个比较器:https://github.com/leanprover/comparator,确认定理的陈述与 Mathlib 自身对 FLT 的陈述一致。
我们能够如此快速地生成这一证明表明,现在有可能形式化大量数学,这既可能发现数学已知证明中的错误,也可以减轻审阅新工作的负担。在审查 Claude 的 Lean 证明后,Kevin Buzzard 告诉我们:
形式化也是人类对 AI 生成的数学结果建立信心的一个重要因素。随着 AI 和 AI 辅助数学家产生的(所谓)证明比以往更多,AI 辅助的形式化减轻了人类审阅者的一部分负担。我们预计,在为人类读者准备的任何写作中,同时生成形式化证明将变得普遍。虽然我们认为形式化证明不应取代人类可理解的阐述,但它可能是数学界跟上 AI 生成贡献的唯一可行方法。
编写 Lean 代码似乎也有助于 Claude 证明新颖结果。我们最近许多由 Claude 创作的结果都是在其证明的同时进行形式化的,Claude 似乎利用这些部分证明独立检查其假设,就像它编写数值模拟以确认自己方向正确一样。
形式化 FLT 是一个令牌密集型项目,但它也是迄今为止构建的最大 Lean 证明。Anthropic 的研究人员做了一个小实验,使用三个个人 Claude Max 计划来形式化 Hardy-Littlewood 圆法的应用。完全通过 Prove2Me 协作,智能体们在短短三天内共同完成了 Vinogradov 三素数定理的形式化:https://en.wikipedia.org/wiki/Vinogradov%27s_theorem。我们认为,有了合适的支架,通过消费者 AI 订阅进行重大结果的协作形式化是可实现的。
随着 AI 快速改变数学研究的面貌,数学家们——在 Anthropic 及其他地方——正在思考这对他们的工作意味着什么:https://leidendeclaration.ai/。然而,形式化是我们对 AI 作用感到明确肯定的一个领域。随着形式化成为一种更普遍的工具,我们希望它能帮助维护数学知识的共同信任基础。
我们的形式化工作是费马大定理和形式数学发展的悠久历史中的一小部分。Andrew Wiles 与 Richard Taylor 的首次完整证明是三百多年数学工作的顶点,整合了 Gerhard Frey、Jean-Pierre Serre、Ken Ribet、Barry Mazur、Robert Langlands、Jerrold Tunnell、Yutaka Taniyama、Goro Shimura 以及 André Weil 等人的思想。Claude 的证明遵循 Henri Darmon、Fred Diamond 和 Richard Taylor 的阐述:https://www.math.mcgill.ca/darmon/pub/Articles/Expository/05.DDT/paper.pdf。
我们的证明借鉴了 Kevin Buzzard 领导的伦敦帝国学院 FLT 项目:https://github.com/ImperialCollegeLondon/FLT 以及 flt-regular 项目:https://github.com/leanprover-community/flt-regular 的部分成果。Lean 和 Mathlib 本身是各自的心血结晶,得到了数百名数学家的贡献,其中许多人与 Lean FRO:https://lean-lang.org/fro/ 合作。我们感谢 Kevin Buzzard 对证明进行审阅并提出意见。
我们让 Claude 自主训练模型,以提高它们在几个公共基准测试上对 10 类对齐失败的表现。对于所有 10 类,Claude 都找到了改进的方法,在不降低能力的情况下提升了目标基准的表现。
在本文中,我们分享两个结果,展示 Claude 如何帮助生命科学家加快他们的研究进程。
涉及 AI 辅助发现、实用工作流程以及各科学领域的实地笔记的特性内容。
We are sharing the first complete computer-checked proof of Fermat’s Last Theorem. Claude worked largely autonomously over 11 days to write the proof in the Lean programming language. Below, we describe how the formalization was done and share some thoughts about what this work could mean for research mathematics. Around 1637, Pierre de Fermat jotted down a claim in the margin of his copy of Diophantus’s Arithmetica that would become one of the most famous mathematical conjectures of all time: no positive integers a, b, c satisfy aⁿ + bⁿ = cⁿ for any n > 2. Fermat’s Last Theorem:https://www.youtube.com/watch?v=1BSFyEIY2BY (FLT), as the conjecture became known, turned out to be incredibly difficult to prove. The first proof, from Sir Andrew Wiles in 1995, ran to 129 pages and required months of painstaking work to verify.
A decade later, Dutch computer scientist Jan Bergstra proposed “formalizing” Wiles’s proof: converting the mathematical reasoning into a form computers can check automatically. Since then, mathematicians have been developing the methods needed to encode such a complex proof, including a multi-year community effort kicked off in 2024 by Kevin Buzzard at Imperial College London to complete the formalization:https://lean-lang.org/use-cases/flt/ using the Lean proof assistant:https://en.wikipedia.org/wiki/Lean_(proof_assistant).
Recently, Tianyi Peng, an Anthropic researcher whose group at Columbia University builds tools for AI formalization, set out to test whether Claude could make progress on formalizing FLT. 1 The result went further than he expected. In 11 days, working largely autonomously, Claude produced the first end-to-end, computer-checked proof of FLT. Along the way, it wrote 13 million lines of Lean and proved 29,500 intermediate theorems.
We shared the resulting proof:https://github.com/anthropics/fermats-last-theorem with Kevin Buzzard, who said:
Automatically formalizing a proof as complex as FLT is a significant step towards a future in which all of mathematics can be readily checked. As AI produces ever more proofs, the ability to easily formalize work can lighten the burden of evaluating new results (a process that can take years). We are hopeful that it will become easier, not harder, to trust the body of knowledge upon which mathematics is built.
Unlike recent AI-driven:https://www.anthropic.com/research/riemann-zeta work on the Riemann hypothesis, which produced novel mathematics , what’s novel here is the verification —checking a mathematical proof as one would check a mathematical computation with a calculator. Proving math theorems requires assembling complex logical chains, and if a single link is broken, everything that follows it might turn out to be false. Understanding a novel result deeply enough to be confident in its correctness can take months, or even years, of work.
Fermat’s Last Theorem is an illustrative example. 2 Fermat wrote down the theorem’s statement in the margin of a book, alongside a tantalizing note:
For over 350 years, generations of mathematicians searched for a proof of FLT, marvelous or otherwise. In 1908, a prize of 100,000 German gold marks (the equivalent of 1–2 million dollars today) was announced for anyone who could produce a correct proof, and 621 incorrect attempts were produced in the first year alone.
In June 1993, Wiles presented what he believed to be the first correct proof of FLT in a three-day series of lectures. Two months into an intensive verification effort by several mathematicians, a reviewer asked Wiles a question that exposed a critical gap. Wiles spent a year trying to fix it, first alone and then with his former student Richard Taylor. He was on the brink of abandoning the project when he finally realized an approach he’d discarded earlier could fix the proof. Wiles published the first correct proof of FLT in May 1995; it relied on modern mathematical techniques that were far beyond what would have been known to Fermat in 1637. Since an elementary proof has not been found after centuries of trying, the mathematical community now believes Fermat’s own original “marvelous proof” was incorrect:https://mathenchant.wordpress.com/2016/05/16/fermats-last-theorem-the-curious-incident-of-the-boasting-frenchman/.
One way to check a proof’s correctness is to ask a computer to do it. Proof assistants like Lean verify the logic of a proof algorithmically, demonstrating its correctness beyond a doubt. The difficult part for humans is rewriting the proof so Lean can understand it. While a proof written for human readers will skip many obvious steps, Lean needs to see every step, no matter how trivial. Human proofs also build on centuries of published work, while a formalization starts from the tiny fraction of math that’s been formalized already.
For FLT, the formalization process was expected to take years. Just the blueprint:https://imperialcollegelondon.github.io/FLT/blueprint.pdf the mathematical community has been using to describe the initial phase of the project runs to 86 pages.
Claude completed the proof in 11 days, producing computer-verifiable proofs of 30,300 theorems along the way (using 29,500 in the final proof). Dozens of Claude agents collaborated to define concepts, prove intermediate theorems, and use those theorems to prove ever harder statements. At 13 million lines of Lean code, Claude’s proof is over 5x the size of Mathlib, the principal community library of mathematical proofs this theorem builds on. 3
Claude’s proof follows a simplified version of Wiles’s proof from Darmon, Diamond and Taylor:https://www.math.mcgill.ca/darmon/pub/Articles/Expository/05.DDT/paper.pdf. Mathematical input from humans was limited to occasional high-level instructions from Tianyi: “Jacobian as a scheme sounds high priority,” “push [the] Mazur [theorem] to be done soon.” You can find excerpts of Claude’s thinking here:https://www-cdn.anthropic.com/9e431dff043da6538d99d6c2d231b670aa3da263.pdf.
Excerpts of Claude’s thinking as it realizes what it has just accomplished.
A number of Claude’s initial attempts failed: while agents had some early success, they quickly lost track of the project’s state and stopped collaborating effectively. Their failed efforts contributed ~7% of the non-boilerplate lines in the final proof.
The effort succeeded when we switched to using Prove2Me:https://prove2me.vercel.app/, an open collaborative platform for formalizing mathematics designed by Tianyi Peng and his collaborators at Columbia University. Prove2Me helped by:
With Prove2Me and a Claude Code-based multi-agent harness, a team of agents completed the proof in a little under two weeks, consuming about six billion output tokens from a general-purpose internal research model roughly comparable to Claude Fable 5.1. The finished proof was checked by Lean; it uses just Lean’s three standard axioms, and a comparator:https://github.com/leanprover/comparator confirmed that the theorem’s statement matches Mathlib’s own statement of FLT.
The speed with which we were able to produce this proof demonstrates that it is now possible to formalize large swaths of mathematics, which may both catch errors in the common body of mathematical proofs and reduce the burden of refereeing new work. After reviewing Claude’s Lean proof, Kevin Buzzard told us:
Formalization is also a major factor in how humans can gain confidence in AI-generated mathematical results. As AI and AI-assisted mathematicians produce more (purported) proofs than ever before, AI-assisted formalization takes part of the load off human reviewers. We expect it will become common to produce a formalized proof alongside any write-up intended for a human reader. Although we do not think a formalized proof should replace a human-understandable exposition, it may be the only feasible way for the mathematical community to keep up with AI-generated contributions.
Writing Lean also seems to help Claude prove novel results. Many of our recent Claude-authored results have been formalized in parallel with their proofs, and Claude appears to use these partial proofs to independently check its hypotheses much like it writes numerical simulations to check that it’s on the right track.
Formalizing FLT was a token-intensive project, but it is also the largest Lean proof ever constructed. Anthropic researchers did a small experiment using three personal Claude Max plans to formalize applications of the Hardy-Littlewood Circle Method. Collaborating entirely through Prove2Me, the agents jointly completed a formalization of Vinogradov’s Three Primes Theorem:https://en.wikipedia.org/wiki/Vinogradov%27s_theorem in just three days. We think with the right scaffold, collaborative formalization of major results with consumer AI subscriptions is achievable.
To this end, Anthropic:https://www.anthropic.com/news/expanding-support-for-scientists as well as other labs:https://openai.com/index/chatgpt-for-academic-researchers/ have recently expanded their support for external researchers—including mathematicians working on pure math and formalization—with free and discounted subscriptions and research credits. We also offer dedicated grants:https://www.anthropic.com/news/ai-for-science-program for larger scientific projects, which could include formalizing other major theorems or improving Lean or Mathlib.
With AI rapidly changing what it looks like to do math research, mathematicians—at Anthropic and elsewhere—are grappling with what that means for their work:https://leidendeclaration.ai/. Formalization, however, is a place where we feel unambiguously good about the role of AI. As formalization becomes a more commonplace tool, we are hopeful that it will help maintain trust in the common body of mathematical knowledge.
Our formalization effort is a small piece of the long history of Fermat’s theorem and the development of formal mathematics. The first full proof from Andrew Wiles together with Richard Taylor was a culmination of more than three hundred years of mathematics, integrating ideas from Gerhard Frey, Jean-Pierre Serre, Ken Ribet, Barry Mazur, Robert Langlands, Jerrold Tunnell, Yutaka Taniyama, Goro Shimura, and André Weil, among others. Claude’s proof follows the exposition by Henri Darmon, Fred Diamond, and Richard Taylor.:https://www.math.mcgill.ca/darmon/pub/Articles/Expository/05.DDT/paper.pdf
Our proof adapts pieces from the Imperial College London FLT project:https://github.com/ImperialCollegeLondon/FLT led by Kevin Buzzard and the flt-regular project:https://github.com/leanprover-community/flt-regular. Lean and Mathlib are both their own labors of love and have received contributions from hundreds of mathematicians, many working with the Lean FRO:https://lean-lang.org/fro/. We thank Kevin Buzzard for reviewing the proof and for his comments.
The full proof is available on GitHub:https://github.com/anthropics/fermats-last-theorem along with a written walk-through of the proof.
We had Claude autonomously train models to improve their performance on several public benchmarks that measure 10 categories of alignment failure. For all 10, Claude found fixes that improved the target benchmarks without degrading capabilities.
In this post, we share two results that show how Claude can help life scientists increase the pace of their research.
Features on AI-assisted discoveries, practical workflows, and field notes across the sciences.