LeanDojo: Theorem Proving with Retrieval-Augmented Language Models
Abstract
Domain fit: AI-adjacent · Paper appears method- or tooling-adjacent to AI workflows with partial ecosystem coverage.
Large language models (LLMs) have shown promise in proving formal theorems using proof assistants such as Lean. However, existing methods are difficult to reproduce or build on, due to private code, data, and large compute requirements. This has created substantial barriers to research on machine learning methods for theorem proving. This paper removes these barriers by introducing LeanDojo: an open-source Lean playground consisting of toolkits, data, models, and benchmarks. LeanDojo extracts data from Lean and enables interaction with the proof environment programmatically. It contains fine-grained annotations of premises in proofs, providing valuable data for premise selection: a key bottleneck in theorem proving. Using this data, we develop ReProver (Retrieval-Augmented Prover): an LLM-based prover augmented with retrieval for selecting premises from a vast math library. It is inexpensive and needs only one GPU week of training. Our retriever leverages LeanDojo's program analysis capability to identify accessible premises and hard negative examples, which makes retrieval much more effective. Furthermore, we construct a new benchmark consisting of 98,734 theorems and proofs extracted from Lean's math library. It features challenging data split requiring the prover to generalize to theorems relying on novel premises that are never used in training. We use this benchmark for training and evaluation, and experimental results demonstrate the effectiveness of ReProver over non-retrieval baselines and GPT-4. We thus provide the first set of open-source LLM-based theorem provers without any proprietary datasets and release it under a permissive MIT license to facilitate further research.
Results and benchmarks
Large language models (LLMs) have shown promise in proving formal theorems using proof assistants such as Lean.
Benchmark evidence is limited
Evidence graph: 2 refs, 1 links.
Utility signals: depth 65/100, grounding 58/100, status medium.
Implementation
No direct implementation yet
Maintained implementation evidence is not confirmed for this paper yet.
Use the implementation status and reproduction sections for the current action plan.
No verified maintained repo yet
There is no verified maintained implementation yet. Use this baseline plan to decide whether to prototype now or defer.
- No direct maintained implementation was found. Use the paper PDF and citation graph to design a baseline reproduction.
- Start from related paper: Multi-Prover Interactive Proofs: Unsound Foundations..
- Start from this likely method family: Information retrieval.
Time to first repro: a few days
Recommendation evidence is currently too limited for a maintained-repo choice. Use Implementation Status and Reproduction Path for a practical baseline plan.
- Estimate is based on paper-only reproduction flow
Reproduction readiness
No repo
No verified implementation available
- No maintained repository has been identified for this paper. Check adjacent implementations or HF artifacts below.
Hardware requirements
- Expect multi-day setup/compute for meaningful reproduction based on current guidance.
Validation caveat
Hugging Face artifacts
No trustworthy direct or curated related Hugging Face artifacts were found yet. Use targeted searches to quickly locate candidate models, datasets, and demos.
Tip: start with models, then check datasets and spaces if you need evaluation data or demos.
Research context
40
Citations
0
References
Tasks
Automated theorem proving, Computer science, Mathematical proof, Bottleneck, Gas meter prover, Benchmark (surveying), Construct (python library), Theoretical computer science
Methods
Information retrieval
Domains
Computational Theory and Mathematics
Related papers
- Multi-Prover Interactive Proofs: Unsound Foundations.Search on Paper2Code
2017 · Semantic similarity
- Multi-prover Interactive Proofs: Unsound FoundationsSearch on Paper2Code
2017 · Semantic similarity
- Incremental Proofs of Sequential WorkSearch on Paper2Code
2019 · Semantic similarity
- Practical Zero-Knowledge Proofs: Giving Hints and Using DeficienciesSearch on Paper2Code
2007 · Semantic similarity
- Rational Proofs with Multiple ProversSearch on Paper2Code
2016 · Semantic similarity
- Practical zero-knowledge proofs: Giving hints and using deficienciesSearch on Paper2Code
1991 · Semantic similarity
Open this paper in HFEPX to review benchmark signals, evaluation modes, and human-feedback protocol context.
Open in HFEPXJump to Paper2Code search queries derived from this paper's research context.