Lean 4
How it works
The user writes definitions and theorems in a dependently typed language where a theorem is a type and its proof is a term of that type (the Curry-Howard correspondence). Proofs are built interactively with tactics (e.g. simp, grind, induction) that transform a proof goal until it is closed. An elaborator expands notation, infers types and resolves type-class instances, and then a small trusted kernel re-checks the resulting proof term. Lean 4 compiles programs to C code, and its hygienic macro system lets users extend syntax and automation directly from within Lean.
Problem solved
Informal mathematical proofs and ordinary code can hide subtle errors that human review and testing miss. Lean lets a theorem or a program property be stated formally and machine-checked for completeness and correctness, reducing trust to a small, well-audited kernel.
Components
Official
Implementation
Lean 4 is not backwards-compatible with Lean 3; Lean 3 code and proofs must be ported (the mathport effort).
Verification relies on kernel soundness; in 2026 a purported disproof of the Collatz conjecture turned out to rely on a bug in Lean, which was subsequently fixed.
Evolution
Leonardo de Moura starts the project at Microsoft Research; early versions (Lean 1 and 2) were experimental.
First moderately stable version (20 January 2017), implemented mainly in C++; the mathlib library grew around it.
Reimplementation capable of producing C code; hygienic macro system and a frontend implemented in Lean itself. Not backwards-compatible with Lean 3.
The nonprofit Lean Focused Research Organization is formed to improve the language's scalability and usability.
Google DeepMind creates AlphaProof, proving mathematical statements in Lean at the level of an IMO silver medalist.
DeepSeek introduces DeepSeek-Prover-V2, a theorem-proving model for Lean 4 built on DeepSeek-V3.
Hardware requirements
Lean 4 compiles to C code and runs cross-platform (Linux, macOS, Windows) on x86-64 and AArch64 CPUs; it needs no accelerators.