Reinforcement learning for Lean theorem proving
Project description
LeanReinforcement
Repository for LeanReinforcement (LR), a Monte Carlo Tree Search (MCTS) agent building on the ReProver system.
Gym-like
This repository builds on the gym-like LeanDojo interface for interacting with Lean. See the LeanDojo documentation for more information on how to use it.
Monte Carlo Tree Search
Relevant sources will be added here as the project progresses.
TODO
- Import ReProver weights to Snellius
- Set up premise retrieval code
- Create gym environment with LeanDojo and OpenAI Gym
- Decide PPO vs MCTS => MCTS on top of ReProver
- Update Snellius environment
- Import LeanDojo benchmark to Snellius
- Look into LeanDojo step time, value functions, etc.
- Implement runner script to run MCTS agent on LeanDojo environment
- Implement appropriate DataLoader training and evaluation
- Implement training loop
- Run experiments on Snellius
- Finish in-comment ToDo's
- Checkpoint saving and loading
- Subtree reusage
- Reimplement tactic generator fine-tuning
- Implement ValueHead Dataset creation
- Set up wandb/tensorboard equivalent logging
- Write README.md
- Write paper
- Fix parallelization memory issues
License
LeanReinforcement: An MCTS RL agent for Automatic Theorem Proving in Lean. Copyright (C) 2025 Gerben Koopman
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Project details
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
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
File details
Details for the file lean_reinforcement-0.1.4.tar.gz.
File metadata
- Download URL: lean_reinforcement-0.1.4.tar.gz
- Upload date:
- Size: 48.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d351416a2d8bba8725c515103435c6e790119c5ffc01b5a51a9f25ec9b551a1
|
|
| MD5 |
6e954f0a054ae26110eb8c961838c7b3
|
|
| BLAKE2b-256 |
2a433ae57a0fa12ca8bd9f86d5470d2a8eb2c4dd30538a08eb081292ef50e943
|
Provenance
The following attestation bundles were made for lean_reinforcement-0.1.4.tar.gz:
Publisher:
python-publish.yml on GerbenKoopman/LeanReinforcement
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lean_reinforcement-0.1.4.tar.gz -
Subject digest:
4d351416a2d8bba8725c515103435c6e790119c5ffc01b5a51a9f25ec9b551a1 - Sigstore transparency entry: 763331299
- Sigstore integration time:
-
Permalink:
GerbenKoopman/LeanReinforcement@04acf68089c9bcfcbac36fc09d0e8c54e6f91134 -
Branch / Tag:
refs/tags/v0.1.4-alpha - Owner: https://github.com/GerbenKoopman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@04acf68089c9bcfcbac36fc09d0e8c54e6f91134 -
Trigger Event:
release
-
Statement type:
File details
Details for the file lean_reinforcement-0.1.4-py3-none-any.whl.
File metadata
- Download URL: lean_reinforcement-0.1.4-py3-none-any.whl
- Upload date:
- Size: 62.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06bb75b097b2ed82b3edb23748c538edd520fd50bb7b872a660a07992cb1338b
|
|
| MD5 |
3d6d35d1e5504c1b7f01e28b1ff2dad2
|
|
| BLAKE2b-256 |
40389c5e7cf8ed93547ac9e7038dc533719cc51013def9f5afd2cef1e51cdf96
|
Provenance
The following attestation bundles were made for lean_reinforcement-0.1.4-py3-none-any.whl:
Publisher:
python-publish.yml on GerbenKoopman/LeanReinforcement
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
lean_reinforcement-0.1.4-py3-none-any.whl -
Subject digest:
06bb75b097b2ed82b3edb23748c538edd520fd50bb7b872a660a07992cb1338b - Sigstore transparency entry: 763331302
- Sigstore integration time:
-
Permalink:
GerbenKoopman/LeanReinforcement@04acf68089c9bcfcbac36fc09d0e8c54e6f91134 -
Branch / Tag:
refs/tags/v0.1.4-alpha - Owner: https://github.com/GerbenKoopman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@04acf68089c9bcfcbac36fc09d0e8c54e6f91134 -
Trigger Event:
release
-
Statement type: