TL;DR
A team of mathematicians and computer scientists has formalized the proof of Fermat’s Last Theorem in the Lean 4 proof assistant. This development demonstrates advances in automated theorem proving and mathematical rigor. The effort is still ongoing, with some details yet to be confirmed.
Researchers have completed a formal proof of Fermat’s Last Theorem within the Lean 4 proof assistant, a significant step in the application of automated theorem proving to complex mathematical problems. This achievement underscores the growing role of formal verification tools in mathematics and computer science, and it highlights the potential for Lean 4 to handle advanced proofs previously verified only through traditional means.
The formalization effort was led by a collaborative team of mathematicians and computer scientists who used Lean 4, the latest version of the popular proof assistant. Fermat’s Last Theorem, proven by Andrew Wiles in 1994, states that there are no three positive integers a, b, and c that satisfy the equation a^n + b^n = c^n for any integer n greater than 2. While Wiles’ proof is widely accepted, it is complex and not formally checked by computer. The new project aims to encode the entire proof within Lean 4, creating a machine-verifiable version.
According to sources close to the project, the formal proof has reached a stage where key components have been verified, but the process is not yet fully complete. The team reports that they have successfully encoded the main theorem and several auxiliary lemmas, with ongoing work to verify the entire proof chain. The project leverages Lean 4’s improved automation and performance features, which facilitate handling complex mathematical structures.
Implications for Mathematical Rigor and Automation
This development is significant because it demonstrates that even highly intricate proofs like Fermat’s Last Theorem can be encoded and verified within modern proof assistants. Formal verification offers a level of certainty beyond traditional peer review, reducing the potential for human error in complex proofs. It also highlights the increasing capability of tools like Lean 4 to handle advanced mathematics, potentially transforming how proofs are validated and shared in the future.
For the broader scientific community, this milestone indicates a future where automated proof systems could verify entire bodies of mathematical knowledge, fostering greater confidence in results and enabling new research avenues that rely on formalized foundations.
As an affiliate, we earn on qualifying purchases.
The Evolution of Formal Proofs and Lean 4’s Role
Fermat’s Last Theorem was famously conjectured by Pierre de Fermat in 1637, with a handwritten note claiming he had a proof too large to fit in the margin. It remained unproven for centuries until Andrew Wiles provided a proof in 1994, which was later refined and verified by the mathematical community. Despite widespread acceptance, Wiles’ proof is not fully formalized in a computer-checkable system.
In recent years, the development of proof assistants like Lean has accelerated, with Lean 4 representing the latest iteration. Its enhanced automation, better support for complex mathematics, and increased performance make it a promising platform for formalizing significant theorems. The current effort to encode Fermat’s Last Theorem in Lean 4 builds on prior successes with formal proofs of other mathematical results, reflecting a broader trend towards computer-assisted verification in mathematics.
As an affiliate, we earn on qualifying purchases.
Remaining Challenges in Complete Formalization
While key components of the proof have been formalized, the project is still ongoing, and it is not yet confirmed whether the entire proof chain has been verified in Lean 4. Some parts of the original proof, especially those involving deep mathematical structures, are still being encoded and checked. It remains unclear how long the full formalization will take or whether unforeseen complexities will arise.

LEAN PROGRAMMING FOR FORMAL SOFTWARE VERIFICATION: Mathematical proof systems and logical frameworks for verified computation
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Next Steps Toward Full Verification and Broader Adoption
The immediate next step is to complete the formal encoding of all components of Wiles’ proof within Lean 4. Researchers plan to publish detailed updates on their progress and potentially release the formal proof for peer review within the formal verification community. Long-term, this project aims to serve as a template for formalizing other complex proofs, promoting wider adoption of proof assistants in mathematical research and education.
As an affiliate, we earn on qualifying purchases.
Key Questions
What is the significance of formalizing Fermat’s Last Theorem?
Formalizing such a landmark theorem demonstrates the capabilities of proof assistants like Lean 4 and enhances confidence in the correctness of complex mathematical proofs through machine verification.
How does Lean 4 differ from earlier proof assistants?
Lean 4 offers improved automation, better performance, and more advanced support for complex mathematics, making it more suitable for formalizing intricate proofs like Fermat’s Last Theorem.
Is the formal proof publicly available now?
As of now, the formal proof is still being completed and has not yet been released publicly. Researchers plan to publish their progress once the full formalization is verified.
Will this impact future mathematical research?
Yes, successful formalizations like this could lead to more widespread use of formal verification in mathematics, reducing errors and enabling new discoveries based on machine-verified proofs.
What are the main technical challenges remaining?
The main challenges include encoding the entire proof chain in Lean 4 and verifying all complex components without gaps, which requires significant effort and expertise.
Source: hn