Lean (proof assistant)
Lean is a proof assistant and a functional programming language.[src] It is based on the calculus of constructions with inductive types (specifically, the Calculus of Inductive Constructions), the foundational type theory developed with the Coq theorem prover, which was renamed to Rocq in 2024.[src] It is a free and open-source software project hosted on GitHub.[src] Development is currently supported by the nonprofit Lean Focused Research Organization (FRO).[src]
Lean is a proof assistant and a functional programming language.[src] It is based on the calculus of constructions with inductive types (specifically, the Calculus of Inductive Constructions), the foundational type theory developed with the Coq theorem prover, which was renamed to Rocq in 2024.[src] It is a free and open-source software project hosted on GitHub.[src] Development is currently supported by the nonprofit Lean Focused Research Organization (FRO).[src] ==Examples (Lean 4)== The natural numbers can be defined as an inductive type.[src] This definition is based on the Peano axioms and states that every natural number is either zero or the successor of some other natural number.[src] inductive Nat : Type | zero : Nat | succ : Nat → Nat Addition of natural numbers can be defined recursively, using pattern matching.[src] def Nat.add : Nat → Nat → Nat | n, Nat.zero => n -- n + 0 = n | n, Nat.succ m => Nat.succ (Nat.add n m) -- n + succ(m) = succ(n + m) This is a simple proof of (P \wedge Q) \implies (Q \wedge P) for two propositions and (where is the conjunction and \implies the implication) in Lean using tactic mode: theorem and_swap (p q : Prop) : p ∧ q → q ∧ p := by intro h -- assume p ∧ q with proof h, the goal is q ∧ p apply And.intro -- the goal is split into two subgoals, one is q and the other is p · exact h.right -- the first subgoal is exactly the right part of h : p ∧ q · exact h.left -- the second subgoal is exactly the left part of h : p ∧ q This same proof in term mode: theorem and_swap (p q : Prop) : p ∧ q → q ∧ p := fun ⟨hp, hq⟩ => ⟨hq, hp⟩ The theorem can also be proved using the grind tactic, which uses techniques from SMT solvers to automatically construct proofs: theorem and_swap (p q : Prop) : p ∧ q → q ∧ p := by grind ==See also== Dependent type List of proof assistants mimalloc Type theory ==References== --> ==External links== Lean Community Lean FRO The Natural Number Game - an interactive tutorial to learn Lean Moogle.ai - a semantic search engine for finding theorems in mathlib[src]
12 sentences · 12 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Lean (proof assistant)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/lean-proof-assistant. Accessed 27 November 2026.
Chicago
"Lean (proof assistant)." encyclopegia.org. Accessed November 27, 2026. https://encyclopegia.org/wiki/lean-proof-assistant.
APA
encyclopegia.org. (2026). Lean (proof assistant). Retrieved November 27, 2026, from https://encyclopegia.org/wiki/lean-proof-assistant
Accessed November 27, 2026 · CC BY-SA 4.0 · citation page · JSON