The Lean 4 Theorem Prover and Programming Language
Open accessThe DOI matches its Crossref record; 15 of the 15 references it cites were found in a registry or an index.
Abstract
Lean 4 is a reimplementation of the Lean interactive theorem prover (ITP) in Lean itself. It addresses many shortcomings of the previous versions and contains many new features. Lean 4 is fully extensible: users can modify and extend the parser, elaborator, tactics, decision procedures, pretty printer, and code generator. The new system has a hygienic macro system custom-built for ITPs. It contains a new typeclass resolution procedure based on tabled resolution, addressing significant performance problems reported by the growing user base. Lean 4 is also an efficient functional programming language based on a novel programming paradigm called functional but in-place . Efficient code generation is crucial for Lean users because many write custom proof automation procedures in Lean itself.
Overview
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Integrity signals
Registry
Cites
Statistics
Verification
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Free: it reads the open-access text and checks the first 5 claims that cite a source we can check. Create a free account to check every claim.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
The cited source says what the claim attributes to it.
In the citing paper
“Proof assistants such as Lean [81], Isabelle [82], and Coq [83] provide formal proof languages based on rigorous logical foundations, enabling each derivation step to be checked by a verifier.”
From Code as Agent Harness (2026) · cites this paper as [81]
The cited source says what the claim attributes to it.
In the citing paper
“proof-checking frameworks such as Lean32 can check their validity regardless of whether a proof was written by a human or a model.”
From Designing reproducible large-language-model-assisted scientific analyses (2026) · cites this paper as [32]
The cited source says what the claim attributes to it.
In the citing paper
“AlphaProof is an RL agent designed to discover formal mathematical proofs by interacting with a verifiable environment based on the Lean theorem prover1.”
From Olympiad-level formal mathematical reasoning with reinforcement learning (2026) · cites this paper as [1]
The cited source says what the claim attributes to it.
In the citing paper
“We wrote models of the Cedar evaluator, authorizer, and validator in Lean [31], and are in the process of writing one for the symbolic compiler.”
From How We Built Cedar: A Verification-Guided Approach (2024) · cites this paper as [31]
The cited source says what the claim attributes to it.
In the citing paper
“First, we construct simple and readable formal models of Cedar's components. We write these models in the Lean programming language [31], and carry out mechanized proofs to show that they satisfy important correctness properties.”
From How We Built Cedar: A Verification-Guided Approach (2024) · cites this paper as [31]
1 more claim about this paper
Create a free account to see every claim other papers make about this one.
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Citations
Cites
Coquand, T., & Huet, G. (1988) · Information and Computation · doi:10.1016/0890-5401(88)90005-3 · Cited by 1,082
How to make ad-hoc polymorphism less ad hoc
Wadler, P., & Blott, S. (1989) · Proceedings of the 16th ACM SIGPLAN-SIGACT symposium on Principles of programming languages - POPL '89 · doi:10.1145/75277.75283 · Cited by 773 · cited 1×
“Typeclasses [16] provide an elegant and effective way of managing ad-hoc polymorphism in both programming languages and interactive proof assistants.”
BackgroundThe Lean Theorem Prover (System Description)
de Moura, L., Kong, S., Avigad, J., van Doorn, F., & von Raumer, J. (2015) · Lecture Notes in Computer Science · doi:10.1007/978-3-319-21401-6_26 · Cited by 416
Self-citationCommunity, T. M. (2020) · Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs · doi:10.1145/3372885.3373824 · Cited by 161 · cited 1×
“In 2017, using Lean 3, a community of users with very different backgrounds started the Lean mathematical library project mathlib [13].”
MethodProgramming with Higher-Order Logic
Miller, D., & Nadathur, G. (2012) · Cambridge University Press eBooks · doi:10.1017/cbo9781139021326 · Cited by 149
Compiling Haskell by program transformation: A report from the trenches
Jones, S. (1996) · Lecture notes in computer science · doi:10.1007/3-540-61055-3_27 · Cited by 115 · cited 2×
“The code generator performs many transformations, and many of them are based on techniques used in the Haskell compiler GHC [7].”
MethodA metaprogramming framework for formal verification
Ebner, G., Ullrich, S., Roesch, J., Avigad, J., & de Moura, L. (2017) · Proceedings of the ACM on Programming Languages · doi:10.1145/3110278 · Cited by 79 · cited 1×
“We believe the Lean 3 theorem prover’s success is primarily due to its extensibility capabilities and metaprogramming framework [6].”
BackgroundSelf-citationAxiomatic foundations and algorithms for deciding semantic equivalences of SQL queries
Chu, S., Murphy, B., Roesch, J., Cheung, A., & Suciu, D. (2018) · Proceedings of the VLDB Endowment · doi:10.14778/3236187.3236200 · Cited by 61
Buzzard, K., Commelin, J., & Massot, P. (2020) · Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs · doi:10.1145/3372885.3373830 · Cited by 39
Tabled Typeclass ResolutionPreprint
Selsam, D., Ullrich, S., & de Moura, L. (2020) · arXiv (Cornell University) · doi:10.48550/arxiv.2001.04301 · Cited by 33 · cited 1×
“Lean 4 implements a new procedure [12], tabled typeclass resolution, that solves these problems by using discrimination trees 10 . for better indexing and tabling, which is a generalization of memoizing introduced initially to address similar limitations of early logic programming systems 11 .”
Self-citationPerceus: garbage free reference counting with reuse
Reinking, A., Xie, N., de Moura, L., & Leijen, D. (2021) · Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation · doi:10.1145/3453483.3454032 · Cited by 32 · cited 2×
“FBIP also allows Lean users to use data structures, such as arrays and hashtables, in pure code without any performance penalty when they are not shared.”
BackgroundSelf-citationMaintaining a Library of Formal Mathematics
van Doorn, F., Ebner, G., & Lewis, R. Y. (2020) · Lecture Notes in Computer Science · doi:10.1007/978-3-030-53518-6_16 · Cited by 29
de Moura, L., Kong, S., Avigad, J. D., van Doorn, F., & von Raumer, J. (2015) · Cited by 25
Self-citationUllrich, S., & de Moura, L. (2019) · Implementation and Application of Functional Languages · doi:10.1145/3412932.3412935 · Cited by 23 · cited 4×
“The code generator performs many transformations, and many of them are based on techniques used in the Haskell compiler GHC [7].”
BackgroundResultInfluentialSelf-citationBeyond Notations: Hygienic Macro Expansion for Theorem Proving Languages
Ullrich, S., & de Moura, L. (2020) · Lecture notes in computer science · doi:10.1007/978-3-030-51054-1_10 · Cited by 12 · cited 3×
“Lean 4 takes ideas from the Scheme family of programming languages and solves these two problems simultaneously by use of a hygienic , i.e. capture-avoiding, macro system custom-built for ITPs [15].”
InfluentialSelf-citation
Research works printed but not linked: 1
- Buzzard, K., Hughes, C., Lau, K., Livingston, A., Mir, R.F., Morrison, S.: Schemes in Lean. https://arxiv.org/abs/2101.02602 (2021), arXiv:2101.02602 · arXiv
Cited by
cvc5: A Versatile and Industrial-Strength SMT Solver
Barbosa, H., Barrett, C., Brain, M., Kremer, G., Lachnitt, H., Mann, M., Mohamed, A., Mohamed, M., Niemetz, A., Nötzli, A., et al. (2022) · Lecture Notes in Computer Science · doi:10.1007/978-3-030-99524-9_24 · Cited by 468
“The Proof Module can output formal unsatisfiability proofs in three proof formats: Alethe [128], Lean 4 [88], and LFSC [133].”
MethodInfluentialSolving olympiad geometry without human demonstrations
Trinh, T. H., Wu, Y., Le, Q. V., He, H., & Luong, T. (2024) · Nature · doi:10.1038/s41586-023-06747-5 · Cited by 311
Agentic Large Language Models, a Survey
Plaat, A., Van Duijn, M., Van Stein, N., Preuss, M., Van der Putten, P., & Batenburg, K. J. (2025) · Journal of Artificial Intelligence Research · doi:10.1613/jair.1.18675 · Cited by 75
ter Beek, M. H., Chapman, R., Cleaveland, R., Garavel, H., Gu, R., ter Horst, I., Keiren, J. J. A., Lecomte, T., Leuschel, M., Rozier, K. Y., et al. (2024) · Formal Aspects of Computing · doi:10.1145/3689374 · Cited by 97
“Theorem provers, such as Coq 3 [51], Isabelle [241], Lean [233], Vampire [264], KeYmaera X [254, 255], LP [140], PVS [248], Z3 [232], and others allow users to mechanically, and sometimes even automatically, prove generic statements and theories about system artefacts formalized as mathematical…”
Advancing mathematics research with AI-driven formal proof search
Tsoukalas, G., Kovsharov, A., Shirobokov, S., Surina, A., Firsching, M., Bérczi, G., Ruiz, F. J. R., Suggala, A., Wagner, A. Z., Wieser, E., et al. (2026) · Science · doi:10.1126/science.aej2213 · Cited by 62
Metadata
- Authors
- Moura, L. D., & Ullrich, S.
- Affiliations
- Karlsruhe Institute of Technology (DE)
- Venue
- Lecture Notes in Computer Science
- Publisher
- Springer International Publishing
- Published
- 2021
- Pages
- 625-635
- ISSN
- 0302-9743 (ISSN-L)
- 1611-3349
- OpenAlex
- W3178506813
- Semantic Scholar
- c4c0d6ffd70081d143b32be53b06fec1259b3ad8
- Cited by
- 258
- References
- 15
- Citations by year
- 2026: 110 · 2025: 61 · 2024: 46 · 2023: 25 · 2022: 14 · 2021: 1
- FWCI
- 9.93
- Type
- conference paper
- Language
- en
- Open access
- hybrid
- doi.org
- Licence
- cc-by
- creativecommons.org/licenses/by/4.0 (tdm)
- creativecommons.org/licenses/by/4.0 (vor, 185 d)
- Locations
- Lecture notes in computer science (publishedVersion, cc-by)
- Repository KITopen (Karlsruhe Institute of Technology) (submittedVersion, cc-by)
- KITopen (cc-by)
- Topics
- Physical Sciences › Computer Science › Software › Logic, programming, and type systems
- Physical Sciences › Computer Science › Computational Theory and Mathematics › Mathematics, Computing, and Information Processing
- Physical Sciences › Computer Science › Computational Theory and Mathematics › Formal Methods in Verification
- Keywords
- Lean 4, interactive theorem proving, extensibility, proof automation, code generation, elaboration
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review
Data sources
Bibliographic data: Semantic Scholar, OpenAlex, Crossref.
Contains information from the Semantic Scholar Academic Graph Datasets, made available under the ODC Attribution License (ODC-BY 1.0).
Semantic Scholar’s data is described in: Kinney, R., et al. (2023). The Semantic Scholar Open Data Platform. arXiv:2301.10140.