Lean4Lean: Verifying a Typechecker for Lean, in Lean
Not on the map. Why?
Abstract (arXiv)
In this paper we present a new "external checker" for the Lean theorem prover, written in Lean itself. This is the first complete typechecker for Lean 4 other than the reference implementation in C++ used by Lean itself, and our new checker is competitive with the original, running between 20% and 50% slower and usable to verify all of Lean's mathlib library, forming an additional step in Lean's aim to self-host the full elaborator and compiler. Moreover, because the checker is written in a language which admits formal verification, it is possible to state and prove properties about the kernel itself, and we report on progress to formalize the Lean type theory abstractly and prove some theorems about it. Finally, we combine these to get a proof of correctness of parts of the kernel. We plan to use this project to help justify any future changes to the kernel and type theory and ensure unsoundness does not sneak in through either the abstract theory or implementation bugs. The verification is already paying off, as one soundness bug has been spotted and fixed as a result of this work.
Key facts. Cited by 8 papers in the map (data through 14 Oct 2026). First posted on arXiv 21 Mar 2024.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 3; 2026: 5.
8 papers.
- 2025Physics Supernova: AI Agent Matches Elite Gold Medalists at IPhO 2025cited by 14
- 2025Faithful Logic Embeddings in HOL -- Deep and Shallowcited by 4
- 2026Proof-Carrying Certificates for LLM Pipelines: A Trust-Boundary Architecturecited by 2
- 2025KELPS: A Framework for Verified Multi-Language Autoformalization via Semantic-Syntactic Alignmentcited by 1
- 2026Formally Verified Patent Analysis via Dependent Type Theory: Machine-Checkable Certificates from a Hybrid AI + Lean 4 Pipelinecited by 1
- 2026LLMs Can See the Smoke but not the Fire: Evaluating Abductive Reasoning with Elenchoscited by 0
- 2026LeanCSP: A Framework for Certifying Constraint Reformulation and Solving in Leancited by 0
- 2026The Future of AI-assisted Physics: Discovering, Verifying and Organizing Results via Formalizationcited by 0
- 2026The Future of AI-assisted Physics: Discovering, Verifying and Organizing Results via Formalization6 Oct 2026
- 2026LeanCSP: A Framework for Certifying Constraint Reformulation and Solving in Lean30 Jul 2026
- 2026LLMs Can See the Smoke but not the Fire: Evaluating Abductive Reasoning with Elenchos14 Jul 2026
- 2026Proof-Carrying Certificates for LLM Pipelines: A Trust-Boundary Architecture13 May 2026
- 2026Formally Verified Patent Analysis via Dependent Type Theory: Machine-Checkable Certificates from a Hybrid AI + Lean 4 Pipeline20 Apr 2026
- 2025Physics Supernova: AI Agent Matches Elite Gold Medalists at IPhO 20251 Sep 2025
- 2025KELPS: A Framework for Verified Multi-Language Autoformalization via Semantic-Syntactic Alignment11 Jul 2025
- 2025Faithful Logic Embeddings in HOL -- Deep and Shallow26 Feb 2025