Credit: Hill Street Studios/Getty
For more than a decade, a small group of mathematicians has been developing Lean, a system that allows computers to verify mathematical proofs. The previously little-known project is now attracting wide attention as artificial-intelligence models tackle some of mathematics’ most difficult problems. Although AI can generate vast amounts of evidence quickly, Lean offers a way to check whether each formal step follows logically from the underlying mathematical rules.
“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 AI-generated proofs of problems that have resisted solution 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 trying to understand the result used AI tools to produce a human-readable explanatory paper. Even so, Lean’s endorsement was sufficient for members of the community to trust the result, 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 both a proof assistant and a programming language for formally verifying mathematical proofs. When a mathematician enters a statement or proof into Lean, the system checks whether every step is logically sound under the rules of the selected mathematical system.
Mathematical proofs are generally built by combining previously established results. To prove, for example, that the square of every even number is even, mathematicians can draw on established definitions and theorems. Before Lean, researchers verified one another’s proofs by reading relevant papers and references and mentally reconstructing each step of an argument. For complicated problems, that process can take years. Lean can verify large numbers of formal proofs in a matter of hours.
Many mathematical concepts have been translated into Lean and added to Mathlib, an open-source, community-maintained library of Lean statements. Researchers can use the library to build proofs on top of 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 its submissions, creating a common language for formal mathematical proofs. This work has received “little academic recognition” for its reviewers, says Kevin Buzzard, a mathematician at Imperial College London who helps maintain Mathlib.

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


