encyclopegia.org

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

Related articles

Proof

stub · references available

Lean on Me

stub · references available

personal care assistant

stub · references available

lean construction

stub · references available

physician assistant

stub · references available

Lean Startup

stub · references available

lean

stub · references available

Death Proof

stub · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1374563227 · 0.5 · snapshot enwiki-001374563227

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools
  • Careers — open roles: frontier engineers and sales partners

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.