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.1.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.1-py3-none-any.whl
(157.4 kB
view details)
File details
Details for the file lean_library-1.0.1.tar.gz.
File metadata
- Download URL: lean_library-1.0.1.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 |
e9968b1ad4dca61a6e88b760bb190e48b0b9cd7663b01319525d63a913348334
|
|
| MD5 |
0c30f321140eacfca186ff66867fca0b
|
|
| BLAKE2b-256 |
f0d9f604d627a3463f77d54891712abae215a387b8cf64250ea153a36e974ee2
|
File details
Details for the file lean_library-1.0.1-py3-none-any.whl.
File metadata
- Download URL: lean_library-1.0.1-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 |
ab225c112f8c809feb943fdf5aba04bef36828d1cf864407e522dda30e563bc2
|
|
| MD5 |
df7c708d8b064594d81266327635099d
|
|
| BLAKE2b-256 |
b7f5884c2ecc1c5c89c0bfed97a02d0c7b8d3704a3b2515985f559d1c3970899
|