A comprehensive library for AI-assisted theorem proving in Lean
Project description
LeanLibrary
To install LeanLibrary, run
uv pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple lean-library==0.1.10
install Pantograph
uv add git+https://github.com/stanford-centaur/PyPantograph
make sure you've installed CUDA-compiled torch,
uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu126
export your Github access token,
export GITHUB_ACCESS_TOKEN=<GITHUB_ACCESS_TOKEN>
Example
from leanlibrary.agent.hf_agent import HFAgent
from leanlibrary.trainer.sft_trainer import SFTTrainer
url = "https://github.com/durant42040/lean4-example"
commit = "005de00d03f1aaa32cb2923d5e3cbaf0b954a192"
trainer = SFTTrainer(
model_name="deepseek-ai/DeepSeek-Prover-V2-7B",
output_dir="outputs-deepseek",
epochs_per_repo=1,
batch_size=2,
lr=2e-5,
)
agent = HFAgent(trainer=trainer)
agent.setup_github_repository(url=url, commit=commit)
agent.train()
agent.prove()
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
lean_library-1.0.0.tar.gz
(126.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
lean_library-1.0.0-py3-none-any.whl
(157.4 kB
view details)
File details
Details for the file lean_library-1.0.0.tar.gz.
File metadata
- Download URL: lean_library-1.0.0.tar.gz
- Upload date:
- Size: 126.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
450dde2f246d9bf12c812bfdb6f88e7a35d07335a1044bde07285a55e69b5396
|
|
| MD5 |
09bdaf7ef77d1068abce4fdfa1df8ae0
|
|
| BLAKE2b-256 |
64a2b198f7b7c4ede90e111dbceea95e2015c765f5d606dacd7cd06948937193
|
File details
Details for the file lean_library-1.0.0-py3-none-any.whl.
File metadata
- Download URL: lean_library-1.0.0-py3-none-any.whl
- Upload date:
- Size: 157.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77403c7d194ed5e7815a4e36726902e73349999e76a203dc56d220ff8c071dac
|
|
| MD5 |
9a2390fb5583ce56e1f44942ed2c0fdf
|
|
| BLAKE2b-256 |
b709a3c5663a7cdc2191c006b84640bddbe6d6305d60b7ff6c98fde10d4e013e
|