项目
在 GitHub 查看
lean-dojo/LeanDojo
关于
用于提取数据并以编程方式与 Lean 交互的工具。
数据与分析实测星标增长
- 24小时
- 0
- 7天
- +2
- 15天
- +4
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文LeanDojo: Machine Learning for Theorem Proving in Lean
Note: This original LeanDojo library is deprecated. Please use LeanDojo-v2 for all new projects. The information below is kept for historical reference. We will soon be moving LeanDojo-v2 here.

LeanDojo is a Python library for learning–based theorem provers in Lean, providing two main features:
- Extracting data (proof states, tactics, premises, etc.) from Lean repos.
- Interacting with Lean programmatically.
LeanDojo's current version is compatible with Lean 4 v4.3.0-rc2 or later. We strongly suggest using the current version. However, you may use the legacy branch if you want to work with earlier versions (including Lean 3).
Requirements
- Supported platforms: Linux, Windows WSL, and macOS
- Git >= 2.25
- 3.9 <= Python < 3.13
- wget
- elan
- Generate a GitHub personal access token and set the environment variable
GITHUB_ACCESS_TOKENto it
Installation
LeanDojo is available on PyPI and can be installed via pip:
pip install lean-dojo
It can also be installed locally from the Git repo:
pip install .
Documentation
Questions and Bugs
- For general questions and discussions, please use GitHub Discussions.
- To report a potential bug, please open an issue. In the issue, please include your OS information, the exact steps to reproduce the error on the latest version of LeanDojo, and complete logs in debug mode (setting the environment variable
VERBOSEto 1). Important: If your issue cannot be reproduced easily, it will be unlikely to receive any help.
Related Links
- LeanDojo Website: The official website of LeanDojo.
- LeanDojo Benchmark
: The dataset used in our paper, consisting of theorems and proofs extracted from mathlib.
- LeanDojo Benchmark 4
: The Lean 4 version of LeanDojo Benchmark, consisting of theorems and proofs extracted from mathlib4 by generate-benchmark-lean4.ipynb.
- ReProver: The ReProver (Retrieval-Augmented Prover) model in our paper.
- LeanDojo ChatGPT Plugin
- Lean Copilot: Running language models as copilots for theorem proving in Lean
Citation
LeanDojo: Theorem Proving with Retrieval-Augmented Language Models
Neural Information Processing Systems (NeurIPS), 2023
Kaiyu Yang, Aidan Swope, Alex Gu, Rahul Chalamala,
Peiyang Song, Shixing Yu, Saad Godil, Ryan Prenger, Anima Anandkumar
@inproceedings{yang2023leandojo,
title={{LeanDojo}: Theorem Proving with Retrieval-Augmented Language Models},
author={Yang, Kaiyu and Swope, Aidan and Gu, Alex and Chalamala, Rahul and Song, Peiyang and Yu, Shixing and Godil, Saad and Prenger, Ryan and Anandkumar, Anima},
booktitle={Neural Information Processing Systems (NeurIPS)},
year={2023}
}
探索相关项目
加载中…