Lean brings machine verification to AI maths proofs
Lean, a proof assistant and programming language created by computer scientist Leonardo de Moura, has become a key tool for checking mathematical proofs produced with AI. It verifies that each step follows the logical rules of mathematical systems, allowing massive proofs to be checked in hours rather than the years that manual review can require.
Mathematician Levent Alpöge posted 17 million lines of Lean code proving the Riemann hypothesis. Researchers used AI tools to turn the code into a human-readable explanation, while Lean’s verification gave mathematicians confidence in the result before they could fully understand the argument.
The system draws on Mathlib, an open-source, community-maintained library of formalized mathematics. Created in 2017, it now contains more than two million lines of Lean code, with submissions reviewed and approved by a largely volunteer team. This shared foundation lets researchers build on previously established results, although maintainers receive little academic recognition. Lean is not immune to bugs or glitches, so its code must undergo additional verification before a proof is accepted as correct.