LeanDojo: Machine Learning for Theorem Proving in Lean
Project description
LeanDojo: Machine Learning for Theorem Proving in Lean
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.12
- wget
- elan
- Generate a GitHub personal access token and set the environment variable
GITHUB_ACCESS_TOKEN
to 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 version of LeanDojo, the exact steps to reproduce the error, and complete logs in debug mode (setting the environment variable
VERBOSE
to 1). The more details you provide, the better we will be able to help you.
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 by generate-benchmark-lean3.ipynb.
- 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}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file lean_dojo-2.1.3.tar.gz
.
File metadata
- Download URL: lean_dojo-2.1.3.tar.gz
- Upload date:
- Size: 67.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6c12bdaeae1567fc1e674bec0f693eb3a6cc53ffdd7d0cb2ce2afeb9cd54963 |
|
MD5 | c005f1670aab5b2096d0a892968b1ea3 |
|
BLAKE2b-256 | 8fb5d082b173e42f3d243b4cf1a7cb86f23654b9475bf9a1f892d45abd69e79e |
File details
Details for the file lean_dojo-2.1.3-py3-none-any.whl
.
File metadata
- Download URL: lean_dojo-2.1.3-py3-none-any.whl
- Upload date:
- Size: 52.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.27.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aac2459e7c469a26c5ea3e47ac9ba04af10a8614d3d1b6fb4efa120693fcc1dd |
|
MD5 | 65954496f951498cd2c295f42310e527 |
|
BLAKE2b-256 | 41894a1e67cd6bc7fdac0a512661de2e193ae1a6121030671a2c886fb3321611 |