Pierre de Fermat: A Pioneering 17th-Century Mathematician.
Credit: LeBrecht Music & Art, YAY Media AS/Alamy
In a bustling hotel lobby in central London, tourists prepare for a day of exploration amidst the sweltering heat. Meanwhile, hotel staff are resetting the dining room after breakfast, while a group of scholars gathers in a windowless conference room to discuss the evolving role of humans in mathematics, particularly in an age where AI is capable of proving theorems independently.
The atmosphere in the room is charged with a mix of astonishment at recent advancements in artificial intelligence, excitement about the new avenues they open, and a hint of anxiety regarding personal futures in this new landscape.
Twenty-five researchers from diverse fields and countries have converged here for a week to explore Fermat’s Last Theorem through the lens of cutting-edge AI models.
Fermat’s Last Theorem, once a puzzle for mathematicians for centuries, was conclusively proven by Andrew Wiles in 1993. The theorem states that there are no whole number solutions for the equation aⁿ + bⁿ = cⁿ when n is an integer greater than 2—a straightforward statement that belies its complexity.
Currently, Kevin Buzzard, a professor at Imperial College London, is undertaking a five-year project to translate Wiles’ extensive 100-page proof into a formal computer code known as “Lean.” This initiative aims to facilitate rigorous verification of correctness and create a foundation for additional research.
Formalizing mathematical theorems is essential for ensuring they transcend manual calculations, organizing them for computational analysis, and meticulously scrutinizing their logic to detect any inconsistencies. Presently, there are over 2 million lines of formalized mathematics in a centralized repository named Mathlib.
This workshop is a unique confluence of mathematicians, computer scientists, and AI experts, all striving to enhance Buzzard’s project by enabling modern AI models to assist in the formulation of Fermat’s Last Theorem.
Participants gather around a laptop, each with a distinct interface for one of the industry’s leading AI models. The atmosphere is engaging, with a second room available for those who prefer a quieter workspace.
Research problems and sub-problems are divided, tackled collaboratively by human brains guiding the AI. Buzzard notes that the codebase for the project had initially reached 20,000 lines before the workshop commenced—an amount that doubled within just the first day.
The Formalization of the Fermat project, funded in 2024, began slowly with Buzzard painstakingly hand-coding the material. However, around December of last year, progress accelerated significantly, spurred by the advent of AI’s growing capabilities in tackling advanced mathematics. Notably, in May, an AI successfully resolved an 80-year-old problem posed by Paul Erdős, leaving the mathematical community in awe.
“I always had a quiet confidence in our success. But after two years, AI advancements have led me to rethink our approach fundamentally. What I originally proposed seems simplistic now; we could aim for something substantially superior,” he states.
Although Wiles’ proof spans 100 pages, it is built on roughly 2,000 pages of foundational mathematics from the mid-20th century. Buzzard’s initial objective was to formalize only the conclusive paper’s most recent refinement, assuming the supporting material was sound.
If this theorem were imagined as a pyramid, Buzzard aimed to start from the 90% summit, where the most intriguing challenges are located. However, he now believes that a comprehensive approach to construct the entire foundation from top to bottom is feasible.
He remains optimistic about achieving his initial objectives by the close of the five-year term. Factors such as AI’s evolution, accessibility costs, and outcomes from this workshop will influence the extent to which he can build the remaining structure.
Han Lu Su, a researcher from Imperial College London, is actively participating in the workshop. She taught herself how to use Lean through ChatGPT just six months earlier and now finds herself immersed in this frontier of research.
Many of her peers still rely on traditional pen-and-paper methods, indicating that the formal application of AI showcased here is not yet representative of the entire mathematical community. Still, she believes this may offer a glimpse into its future. “I sense that the industrialization of intellectual processes is advancing,” she observes. “With AI tools performing so efficiently, the question arises: What do we contribute?”
A wide range of tools is employed throughout the workshop, from free open-source resources to high-end models from American startups. Although participants cannot quantify the exact expenditures on tokens—which are the units that facilitate access to AI intelligence—most acknowledge that costs could easily reach thousands of pounds per day. “Sure, I’m burning tokens like they’re going out of style,” Sue remarks.
To tackle intricate mathematical challenges, teams require not just quantity but quality. Sue recounts that on the workshop’s first day, she and a colleague both aimed to formalize the same mathematical concept. She devised a solution of 800 words, while her colleague achieved a 400-word resolution. Both proved the theorem effectively, but shorter solutions are advantageous for AI processing and more intuitive for human understanding.
AI-generated code can often be verbose, cumbersome, and sluggish in execution, according to Buzzard. This code might inadvertently leverage obscure functions within Lean, leading to issues when updated versions are released.
Many Mathlib curators approach the addition of AI-generated Lean code with caution, even when such code is capable of proving theorems. Buzzard emphasizes that the existing code within the library is crafted by mathematicians with adept skills, ensuring it is efficient, concise, and human-readable—a robust basis for future work. The code produced in this workshop may have varied clarity.
“We’re layering unnecessary complexity on top of our existing code—let’s call it ‘slop’—and this raises the question: Can we subsequently build upon it or will we face obstacles?” Buzzard queries.
These developments also engender philosophical inquiries for mathematicians. The evolution of research tools inevitably alters their roles. In the most optimistic scenarios, AI could extend the boundaries of mathematics, potentially surpassing human cognition.
“We all contribute to mathematics because we are passionate about it and recognize its significance. However, with AI’s emergence, we must ask: Why are we pursuing this? What are the implications?” Buzzard reflects. “If a machine corroborates a theorem that humans cannot comprehend, what have we achieved?”
Such inquiries intensify when the subjects at hand delve into abstract realms, involving concepts like 38-dimensional spheres that pose complex challenges with no immediate application. “This abstract world exists, but does it retain its relevance if humans are absent to appreciate it?” Buzzard wonders.
Topics:
Source: www.newscientist.com


