AI is learning to re-prove Fermat's Last Theorem, the 350-year-old maths puzzle
More than three decades after Andrew Wiles proved the 350-year-old Fermat's Last Theorem, mathematicians are teaching AI to understand and verify its famously difficult proof. The goal is not to solve the theorem again but to build machines that can check, explain and eventually help discover entirely new mathematics.

For centuries, Fermat's Last Theorem was the Everest of mathematics.
Now, three decades after it was finally solved, mathematicians are asking artificial intelligence to prove it all over again.
That sounds bizarre. Why prove something that has already been proved?
Because the real target is much bigger than one famous theorem.
Researchers want AI to learn how to understand, verify and eventually help create mathematical proofs that humans can trust. If it succeeds, it could change how mathematics is done.
FIRST, WHAT IS FERMAT'S LAST THEOREM?
The theorem sounds surprisingly simple.
It says that for any whole numbers, the equation a + b = c has no solution when n is greater than 2.
For example, the familiar equation 3 + 4 = 5 works because the power is 2.
But once the exponent becomes 3, 4, 5 or higher, no set of positive whole numbers will ever satisfy the equation.
French mathematician Pierre de Fermat scribbled this claim in the margin of a book in 1637, famously writing that he had a "truly marvellous proof" but the margin was too small to contain it.
The problem remained unsolved for more than 350 years until British mathematician Andrew Wiles finally proved it in 1994 using highly advanced mathematics. His proof runs to around 130 pages and draws on ideas from several branches of the subject.
SO WHY BRING AI INTO THE STORY?
The aim is not to replace Wiles' proof.
Instead, mathematicians such as Kevin Buzzard of Imperial College London are teaching computers to translate complex proofs into formal mathematical language that software can check line by line. Every logical step must be verified, leaving no room for hidden mistakes.
Think of it as the mathematical equivalent of turning handwritten instructions into computer code that can be tested automatically.
If AI can master one of the hardest proofs ever written, it could eventually help researchers verify new discoveries much faster.
THE BIGGER DREAM
Recent discussions among mathematicians suggest AI is already becoming more than a calculator.
Researchers are exploring AI systems that can search through mathematical literature, suggest ideas, organise failed attempts and even collaborate on proofs instead of merely answering questions. Others say AI is changing how they approach long-standing problems, including Fermat's Last Theorem, by handling the repetitive formal work while humans focus on creative insights.
No one expects AI to replace mathematicians anytime soon.
But if a machine can learn to understand one of history's greatest proofs, it may soon help humans solve the next great mystery that has not even been imagined yet.
For centuries, Fermat's Last Theorem was the Everest of mathematics.
Now, three decades after it was finally solved, mathematicians are asking artificial intelligence to prove it all over again.
That sounds bizarre. Why prove something that has already been proved?
Because the real target is much bigger than one famous theorem.
Researchers want AI to learn how to understand, verify and eventually help create mathematical proofs that humans can trust. If it succeeds, it could change how mathematics is done.
FIRST, WHAT IS FERMAT'S LAST THEOREM?
The theorem sounds surprisingly simple.
It says that for any whole numbers, the equation a + b = c has no solution when n is greater than 2.
For example, the familiar equation 3 + 4 = 5 works because the power is 2.
But once the exponent becomes 3, 4, 5 or higher, no set of positive whole numbers will ever satisfy the equation.
French mathematician Pierre de Fermat scribbled this claim in the margin of a book in 1637, famously writing that he had a "truly marvellous proof" but the margin was too small to contain it.
The problem remained unsolved for more than 350 years until British mathematician Andrew Wiles finally proved it in 1994 using highly advanced mathematics. His proof runs to around 130 pages and draws on ideas from several branches of the subject.
SO WHY BRING AI INTO THE STORY?
The aim is not to replace Wiles' proof.
Instead, mathematicians such as Kevin Buzzard of Imperial College London are teaching computers to translate complex proofs into formal mathematical language that software can check line by line. Every logical step must be verified, leaving no room for hidden mistakes.
Think of it as the mathematical equivalent of turning handwritten instructions into computer code that can be tested automatically.
If AI can master one of the hardest proofs ever written, it could eventually help researchers verify new discoveries much faster.
THE BIGGER DREAM
Recent discussions among mathematicians suggest AI is already becoming more than a calculator.
Researchers are exploring AI systems that can search through mathematical literature, suggest ideas, organise failed attempts and even collaborate on proofs instead of merely answering questions. Others say AI is changing how they approach long-standing problems, including Fermat's Last Theorem, by handling the repetitive formal work while humans focus on creative insights.
No one expects AI to replace mathematicians anytime soon.
But if a machine can learn to understand one of history's greatest proofs, it may soon help humans solve the next great mystery that has not even been imagined yet.