Artificial intelligence tools are greatly increasing the speed with which mathematicians can solve problems. However, the resulting evidence is so vast that it is difficult for humans to verify it.Credit: Hill Street Studios/Getty
Artificial intelligence is helping mathematicians tackle difficult problems at unprecedented speed, but the volume and complexity of the resulting work can make it difficult for people to verify. A formal proof system called Lean is becoming an important check on AI-generated mathematics, allowing researchers to test whether each logical step follows from the rules of a mathematical system.
For more than a decade, a small group of mathematicians has worked largely outside the spotlight to develop tools that enable machines to verify mathematical proofs. Their project, Lean, is now being thrust into the public arena as AI models produce solutions to some of mathematics’ most challenging problems.
“In the beginning, no one could predict what would happen with Lean,” says Leonardo de Moura, a computer scientist at Amazon Web Services in Redmond, Washington, and the system’s creator. Many mathematicians now rely on technology to check proofs of problems that have remained unsolved for centuries.
Last month, mathematician Levent Alpöge posted 17 million lines of Lean code purporting to prove the Riemann hypothesis, an infamous open problem. Mathematicians seeking to understand the proof used AI tools to produce a human-readable explanatory paper. But Lean’s endorsement was enough for the community to trust the results, says Emily Leal, a mathematician at Johns Hopkins University in Baltimore, Maryland, and a member of the Maslib Initiative, which oversees a digital library of Lean statements.
“If the proof is written on paper, there is no way that people can immediately assess it with a high degree of confidence that it is the correct proof,” Leal says.
“If I said, ‘One day the Riemann Hypothesis will be tested and proven using Lean and AI,’ people would say I’m crazy,” de Moura says.
What is Lean?
Lean is a proof assistant and programming language for formally verifying mathematical proofs. When a mathematician expresses a statement or proof in Lean, the system checks whether every step is logically sound under the rules of the chosen mathematical system.
Mathematical proofs are generally built by combining results that have already been established. To prove, for example, that the square of every even number is even, mathematicians can rely on existing definitions and theorems. Before Lean, researchers verified one another’s proofs by reading papers and references and mentally reconstructing each step of the argument. For complex problems, that process can take years. Lean can verify large numbers of proofs in a matter of hours.
Many mathematical concepts have been translated into Lean and added to Mathlib, an open-source library of Lean statements maintained by its community. Researchers can use the library to construct proofs from mathematics that has already been formalized.
Mathlib was created in 2017 and now contains more than 2 million lines of Lean code. A mostly volunteer team has reviewed and approved all of its submissions, creating a common language for formal mathematical proofs. This achievement has received “little academic recognition” for the reviewers, says Kevin Buzzard, a mathematician at Imperial College London who helps maintain Mathlib.

Lean, a programming language designed to help verify mathematical proofs, has confirmed that the Riemann hypothesis has been proven.Credit: Michael Szebor/Nature
Although Lean is often described as guaranteeing accuracy, Buzzard says the software remains vulnerable to bugs and glitches and can produce incomplete proofs. Lean code must therefore pass through additional validation steps before a proof is declared correct.
How has Lean changed mathematics?
Source: www.nature.com












