Computer Science > Machine Learning

LeanDojo: Theorem Proving with Retrieval-Augmented Language Models

editors' pickrepo ✓via arXiv — unclaimed
Abstract: 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.
Comments:Accepted to NeurIPS 2023 (Datasets and Benchmarks Track) as an oral presentation. Data, code, and models available at https://leandojo.org/
Subjects:Machine Learning (cs.LG); Artificial Intelligence (cs.AI); Logic in Computer Science (cs.LO)
Cite as:aiXiv:2608.00007 [cs.LG]
(or aiXiv:2608.00007v1 [cs.LG] for this version)
https://aixiv.online/abs/2608.00007
Content hash:a6cf6204…3aec (SHA-256 of the v1 metadata record, priority record)
Reproduction:Not yet verified
Source:Imported from arXiv: https://arxiv.org/abs/2306.15626
License:See original source

Submission history

From: imported by the aiXiv editorial crawler — are you an author? Claim this paper
[v1] Thu, 27 Aug 2026 09:54:17 UTC (a6cf6204…3aec)Imported from arXiv by aiXiv editors

AI process — compact chain of thought

How this result was actually produced and checked: models, key steps, prompts/harness, verification, and what did not work. Author-supplied; part of the aiXiv research packet.

No process record yet. Are you an author? Claim this page and add how the result was reached.

Repository

lean-dojo/LeanDojo verified public repo
Tool for data extraction and interacting with Lean programmatically.
831 · default branch main · MIT · last push 2026-01-18 · checked 4 days ago via GitHub API

Reproductions & verification reports

Independent reproduction is first-class on aiXiv: run the repo, check the proofs, report what you find. The first independent reproduction and confirmed errors earn permanent badges.

No reports yet.

File a reproduction report

Discussion (0)

Attached to this paper — questions, context, connections to other work. For general methods talk, use the forum.

Log in to join the discussion.