# AI Agents Formalize Fermat's Last Theorem in Record Time
Anthropic's Claude AI agents accomplished a mathematical feat that researchers expected would consume years of human labor. The team formalized the proof of Fermat's last theorem into computer-verifiable code in just 11 days, according to New Scientist.
Fermat's last theorem states that no three positive integers a, b, and c can satisfy the equation a^n + b^n = c^n for any integer value of n greater than 2. French mathematician Pierre de Fermat proposed this in 1637. Andrew Wiles finally proved it in 1995 after working on the problem for decades, producing a landmark 109-page proof that drew on deep results from modern algebraic geometry and number theory.
The challenge was not proving the theorem again. Rather, mathematicians needed to convert Wiles's proof into a formal language that automated theorem provers could verify line by line. This translation process, called formalization, requires expressing every logical step in code that leaves no room for ambiguity or gaps.
Formalizing major proofs typically demands years of specialized work. Mathematicians must break complex arguments into tiny, verifiable steps. They reference existing formalized lemmas and theorems in libraries like Mathlib, a vast repository of formalized mathematics. Each step must connect precisely to definitions and prior results.
Anthropic deployed Claude as autonomous agents capable of iteratively solving problems. The AI system accessed formalization tools and mathematical libraries, then worked through the proof systematically. Claude identified which theorems applied at each step, wrote code in the Lean programming language used by the formalization community, and debugged errors across multiple attempts.
The 11-day timeline represents dramatic acceleration. Previous formalization projects on this scale consumed many months or years. The Kepler conjecture formalization took over a decade, though it involved additional complexity. Younger, more straightforward proofs still require months of expert work.
This achievement reveals how AI agents can automate mathematical labor that previously required human expertise and patience. Anthropic did not cut corners on rigor. The formalized code produces proofs that computer systems can verify with absolute certainty, something even Wiles's original proof cannot claim on its own. The formal version catches errors invisible to human review.
The result matters for multiple reasons. First, it demonstrates that AI agents excel at systematic, rule-based tasks that fit computer languages well. Second, it opens pathways to accelerate formalization of other major proofs sitting in mathematical literature but never encoded. Third, it suggests AI can augment human mathematicians by handling tedious verification work, freeing them for creative problem-solving.
Limitations exist. Claude performed this task under human guidance and with access to specialized tools designed for the purpose. Formalizing entirely new mathematical proofs remains harder than translating existing ones. The AI did not discover mathematics; it translated existing human knowledge into machine-readable form.
Nonetheless, the result signals a shift in how mathematics might progress. Formal verification could become routine rather than exceptional. Researchers could spend less effort validating old proofs and more time generating new ones. The 11-day formalization of Fermat's last theorem represents one data point in a larger transformation of mathematical practice itself.
