Lean combines a formal language, elaborator, tactic framework, libraries and a small kernel. Definitions, executable programs and theorems can live in the same environment, allowing software properties and mathematical results to be stated and proved precisely.
Lean proofs ultimately produce proof terms that the kernel checks independently. Humans or automated systems can search for proof steps, but an accepted result must still satisfy the kernel's logical rules.
ELI5
The Lean proof assistant is a tool for writing mathematical statements and proofs in a precise language that a computer can check. People and AI systems can suggest proof steps, but Lean accepts the result only when its small checking core verifies the logic.
For example, someone can state in Lean that adding zero leaves a number unchanged and provide a formal proof. Lean checks that every step follows from the definitions and rules, rather than trusting a persuasive written explanation.
Can Lean verify software as well as mathematics?
Yes. Lean can express programs and their properties in one language, allowing developers to prove that implementations satisfy formal specifications.
Why is Lean useful for AI-generated code?
AI can generate implementations and proof attempts, while Lean's kernel independently checks whether the final proof term is valid.


