Skip to main content

LeanDojo: Machine Learning for Theorem Proving in Lean

LeanDojo

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).

Documentation Status PyPI GitHub license Code style: black


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_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 exact steps to reproduce the error on the latest version of LeanDojo, and complete logs in debug mode (setting the environment variable VERBOSE to 1). Important: If your issue cannot be reproduced easily, it will be unlikely to receive any help.

Related Links

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}
}

Metadata

Release files for lean-dojo 4.20.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lean-dojo 4.20.0
File Size Uploaded
lean_dojo-4.20.0.tar.gz 67.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for lean-dojo 4.20.0
File Interpreter ABI Platform
lean_dojo-4.20.0-py3-none-any.whl Python 3 none any Details

Total release size: 67.3 MB

Release files / lean_dojo-4.20.0.tar.gz

Download URL lean_dojo-4.20.0.tar.gz
Size 67.2 MB
Tags Source
SHA-256 checksum
How to use checksums
990bdcbb38c4aede61b9b776ef0fe84b422d2fd0a7c1088c3c2ed14e5c8939b4
BLAKE2b-256 checksum
How to use checksums
c4256af86f47bf571955a0f5cee7fd37e7b59804d83bf5cc000a390cac42e58f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release files / lean_dojo-4.20.0-py3-none-any.whl

Download URL lean_dojo-4.20.0-py3-none-any.whl
Size 53.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
247110b1c6ee1308f844f79c99140d8437fe02f538b308b911ea81b35eb3254b
BLAKE2b-256 checksum
How to use checksums
e305ce64788a8bfc599ca8545e0533876d04b46fde41d2d66c8b303b95c6be72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.27.0

Release history Release notifications | RSS feed

This release

4.20.0 This release

2 release files

2.2.0

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.9.0

2 release files

1.8.2

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.0

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.0

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page