DiscussionTechnical

Fermat's Last Theorem proved by AI | Lex Fridman

Lex Clips

A researcher discusses how AI systems unexpectedly proved Fermat's Last Theorem in Lean with 13 million lines of code, far surpassing previous expectations. The achievement demonstrates that autoformalization is essentially solved, though the proof remains inelegant and requires significant cleanup to meet Mathlib quality standards.

Summary

The speaker, an expert in formal mathematics and Lean, describes being shocked by recent developments in AI-assisted theorem proving. Two days before learning about the Fermat's Last Theorem formalization, he gave a colloquium at Princeton explaining the current limitations of AI in mathematics—specifically that AI systems could only build one or two layers on top of existing Mathlib libraries and struggled with 'canonization' (refactoring code to match library standards). He believed such major formalizations were at least three years away.

However, on Friday of that same week, Anthropic released a 13 million-line Lean proof of Fermat's Last Theorem. The speaker explains the AI system accomplished this by 'jerry-rigging'—combining imperfect solutions across multiple layers rather than producing clean, canonical code. The proof is sorry-free (complete) but lacks elegance; significant work remains to make it Mathlib-quality. The human involvement was minimal—approximately 2-3 people whose primary role was providing encouragement ('Keep going').

This experience led the speaker to conclude that autoformalization as a problem is essentially solved, though not in the idealized way he would have preferred. While beautifying mathematical libraries will remain difficult work requiring thousands of human hours, the core challenge of formalizing human-written theorems has been overcome. The speaker notes this was the first of multiple shocks in a month—followed by Navier-Stokes and quasi-Riemann Hypothesis formalizations.

Key Insights

  • AI systems were previously only capable of extending Mathlib by one or two layers and struggled with canonization (refactoring code to match library standards), making major formalizations seem years away
  • The Fermat's Last Theorem proof was accomplished by AI systems jerry-rigging solutions across multiple layers rather than producing clean canonical code, with minimal human involvement (2-3 people primarily saying 'Keep going')
  • The speaker's prior estimates were fundamentally wrong—what he expected would take at least three years happened within days, representing a 'million X' improvement beyond his distribution of what systems were capable of
  • Autoformalization (converting human-written mathematics to formal proofs) is now essentially solved as a problem, though the resulting proofs remain inelegant and require significant work to meet quality standards
  • Multiple breakthrough formalizations occurred within a month (Fermat's Last Theorem, Navier-Stokes, quasi-Riemann Hypothesis), suggesting a fundamental shift in AI capabilities for mathematical formalization

Topics

AI theorem proving and formalizationFermat's Last Theorem formalization in LeanLimitations and capabilities of AI in mathematicsMathlib library and canonical code structureAutoformalization problemRapid AI advancement and shifting expectations

Transcript

[0:02] And this is-- It's been a month of things happening way outside of my model of what was possible. The Fermat's Last Theorem formalization, I was sure we were three years away, at least, from being able to do something like that. - So, maybe you can elaborate on that. It was in Lean, it was formalized as... How big was the Fermat's Last Theorem in Lean? - Like, 13 million lines. - 13 million lines. Okay. - So I just-- Two days before, I gave a colloquium in the Princeton Math Department where I explained in painstaking detail what Lean is, what Mathlib is, but also [0:33] that AI systems today, you know, there's this Mathlib library where…

Full transcript available for MurmurCast members

Sign Up to Access

More from Lex Clips

Get AI summaries like this delivered to your inbox daily

Get AI summaries delivered to your inbox

MurmurCast summarizes your YouTube channels, podcasts, and newsletters into one daily email digest.