Lean proof

Lean proof

A Lean proof is a mathematical proof written in the programming language Lean and fully checked for correctness by a computer. Unlike a handwritten proof, a Lean proof cannot contain any unnoticed faulty steps – the computer only accepts it if every single step is flawlessly correct.

A Lean proof is a mathematical proof in a special language called Lean. Lean is software that mechanically checks every step of a proof. Ordinary proofs are written by a human on paper or in an academic paper – and other humans check them by reading. That takes time, and errors occur along the way. A Lean proof works differently: the computer only accepts it if every step follows logically and necessarily from the previous steps. If even a single step is flawed or incomplete, Lean returns an error message.

Why airtight proofs matter

Mathematicians publish thousands of proofs every year. Some of them contain errors that remain undetected for years. This is not an isolated case: even famous proofs that were considered complete have had to be corrected afterward. A machine-checked proof practically eliminates this risk.

For AI research, this is especially interesting. Systems that can generate or verify Lean proofs must genuinely master mathematical reasoning – not merely produce plausible-sounding answers. That is why Lean proofs are considered a tough benchmark for how well an AI model can actually think. You cannot fool a language model with a convincingly worded but incorrect proof: Lean checks the logic, not the style.

How a Lean proof comes into being

In Lean, a proof is written as a sequence of commands, similar to programming. Each command corresponds to a logical step: one draws on already-proven statements, applies computational rules, or breaks a problem down into subproblems. Lean has access to a huge library of already-proven mathematical statements called Mathlib – it’s like a database in which hundreds of thousands of mathematical results are already available, machine-checked. New proofs can build on this foundation.

The decisive difference from an ordinary proof is this: a human reading a proof can skim over an unclear spot and silently consider it obvious. Lean does not do that. Every gap, even one that seems trivial, must be filled explicitly. This makes writing the proof more laborious, but the result is one hundred percent reliable.

AI models are now being trained to automatically complete Lean proofs. They propose proof steps, and Lean immediately checks whether they are correct. This creates a fast feedback loop: the model attempts a step, Lean returns success or failure, and the model tries again.

Lean proofs in current AI research

In late 2024, Google DeepMind’s AI model AlphaProof caused a stir. It solved several problems from the International Mathematical Olympiad and delivered the solutions as Lean proofs – that is, not as readable text, but as machine-checked arguments. This was the first time an AI system produced formally verified output at this level.

The company Harmonic and the research group around Terence Tao, one of the world’s most renowned mathematicians, are also working to integrate Lean into everyday mathematical research. Tao has publicly stated that he can imagine formalizing future proofs together with AI systems in Lean. This would fundamentally shift the standard for mathematical reliability.

In tech media, the term is mainly encountered in discussions of benchmarks: Can a language model generate a Lean proof for an olympiad problem? Can it recognize and correct a flawed proof? These questions are now a research field in their own right – and Lean is the tool that decides whether an answer is truly correct or merely sounds correct.

Subscribe free. Unsubscribe the second it sucks.

High-signal news across AI, business, UX, and tech. Every morning.