A comprehensive library for AI-assisted theorem proving in Lean
Project description
LeanLibrary
To install LeanLibrary, run
uv pip install lean-library
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.2.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.2-py3-none-any.whl
(157.4 kB
view details)
File details
Details for the file lean_library-1.0.2.tar.gz.
File metadata
- Download URL: lean_library-1.0.2.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 |
6082b801df5882dedf7ac12a7cc9169edb1efac16f74bf88b36f0a52f128b9fd
|
|
| MD5 |
7c57c309d817c8d957a330370bc0e10f
|
|
| BLAKE2b-256 |
b0bc71d776c8b5eec7fa952306810aacebe2dae17faa10f9f3494c2390550535
|
File details
Details for the file lean_library-1.0.2-py3-none-any.whl.
File metadata
- Download URL: lean_library-1.0.2-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 |
9b1ba8658001280a21b2fd16a1f8d8e87c3cda50871a9a94df79f9c1707cf017
|
|
| MD5 |
8eae0f502829196b94a82f51a86de6ad
|
|
| BLAKE2b-256 |
b436107bc8202209cad1aff496701704cea5bafc3ca6a3e478ae6a0fa937165f
|