Lean
What it is
Lean is an open-source programming language and proof assistant for formalizing mathematics, verifying software, and writing general-purpose code. Its deductive proof checking uses a minimal trusted kernel, which Lean describes as ensuring correctness in mathematical, software, and hardware verification. Lean 4 is its input language, and Lake, the package manager bundled with Lean, initializes and manages projects. The Grind tool automates some complex pattern matching, case analysis, and systems of linear inequalities; metaprogramming lets users add domain-specific notation and proof automation. Mathlib is a community-led mathematical library with more than a million lines covering areas including algebra, analysis, topology, probability, and computer science. Lean runs on Linux, macOS, and Windows, and Lean4Web provides a browser-based way to run code. The recommended installation uses VS Code with the Lean 4 extension for syntax highlighting and code completion; Neovim with lean.nvim is also described as well-supported, while VSCodium and Cursor support is unofficial. Learning materials include textbooks, tutorials, interactive games, documentation, and an API reference. Lean is free and released under the Apache 2.0 license.
For and against
For
- Free and open source under Apache 2.0.
- A minimal trusted kernel checks proofs.
- Mathlib spans several fields of mathematics and computer science.
- Runs on desktop systems and in a browser.
Against
- VSCodium and Cursor support is unofficial.
- The recommended setup uses VS Code and the Lean 4 extension.
The verdict
Lean brings theorem proving, formal mathematics, and general coding into one language with a trusted proof-checking kernel. Its library and learning resources offer starting points for users with different backgrounds.
Who it suits
Lean is for programmers, mathematicians, and theorem provers interested in formalization or deductive verification. It can also support general coding alongside proof-oriented work.
Plans and prices
Lean 4
Open-source programming language and proof assistant · no paid plans stated
Read 9 Oct 2026 · lean-lang.org
On the record
- Automation
- The site highlights the Grind tactic for handling pattern matching and case analysis and solving systems of linear inequalities.lean-lang.org · read 9 Oct 2026
- Browser use
- The learning page links to Lean4Web, described as a web-based version that runs Lean code in a browser.lean-lang.org · read 8 Oct 2026
- Editor integration
- The recommended setup uses VS Code and the official Lean 4 extension, which provides syntax highlighting and code completion.lean-lang.org · read 9 Oct 2026
- Extensibility
- Lean's metaprogramming capabilities let users add domain-specific notation and proof automation.lean-lang.org · read 9 Oct 2026
- Learning resources
- The learning page links to textbooks, tutorials, interactive games, core documentation, and an API reference.lean-lang.org · read 8 Oct 2026
- Libraries
- The official site describes Mathlib as a community-driven mathematical library with over a million lines spanning algebra, analysis, topology, probability, and computer science.lean-lang.org · read 8 Oct 2026
- License
- Lean is released under the Apache 2.0 license, which the documentation describes as allowing others to use and extend the code and mathematical libraries freely.lean-lang.org · read 9 Oct 2026
- Maker
- The Lean FRO says Leonardo de Moura created Lean in 2013 and that the FRO formed in July 2023 as a nonprofit under Convergent Research.lean-lang.org · read 9 Oct 2026
- Math and verification
- Lean is built for formalizing mathematics and formal verification, and is flexible enough for general coding.lean-lang.org · read 9 Oct 2026
- Mathematical library
- Mathlib is a community-driven library containing over a million lines of formalized mathematics.lean-lang.org · read 9 Oct 2026
- Other editors
- The manual installation guide says Neovim with lean.nvim is well-supported and describes VSCodium and Cursor support as unofficial.lean-lang.org · read 9 Oct 2026
- Package manager
- Lean projects are initialized and managed with Lake, the package manager bundled with Lean.lean-lang.org · read 8 Oct 2026
- Proof checking
- Lean's minimal trusted kernel is described as guaranteeing correctness in mathematical proof, software verification, and hardware verification.lean-lang.org · read 9 Oct 2026
- Security and trust
- The Lean FRO privacy policy says it collects communication information when users contact it and describes practices for transferring, retaining, and protecting personal information.lean-lang.org · read 9 Oct 2026
- Security example
- The site says AWS uses Lean to formally verify Cedar, an authorization policy language, by proving security properties and validating them against production code through differential testing.lean-lang.org · read 8 Oct 2026
- Support
- The Lean Community Zulip is described as the central hub for questions and collaboration, and Lean FRO hosts weekly technical office hours.lean-lang.org · read 9 Oct 2026
- Supported systems
- Tier 1 platforms include Linux, Apple Silicon macOS, and x86-64 Windows; x86-64 macOS and Emscripten WebAssembly are Tier 2.lean-lang.org · read 9 Oct 2026
- Trusted kernel
- The official site says Lean’s minimal trusted kernel guarantees correctness in mathematical proof, software verification, and hardware verification.lean-lang.org · read 8 Oct 2026