Skip to main content

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

lean_reinforcement-0.1.2.tar.gz (48.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lean_reinforcement-0.1.2-py3-none-any.whl (61.9 kB view details)

Uploaded Python 3

File details

Details for the file lean_reinforcement-0.1.2.tar.gz.

File metadata

  • Download URL: lean_reinforcement-0.1.2.tar.gz
  • Upload date:
  • Size: 48.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lean_reinforcement-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1b561e6a9e6c2346279404f98dd1e7168b74876df991e6e4d60da16aa6aad317
MD5 71e4f35aceaaba6457d2b3b188ff83a2
BLAKE2b-256 9dcd8f77d8cacc313f287374cbed4ddbe6983036b89610eddf99c4702b24e195

See more details on using hashes here.

Provenance

The following attestation bundles were made for lean_reinforcement-0.1.2.tar.gz:

Publisher: python-publish.yml on GerbenKoopman/LeanReinforcement

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lean_reinforcement-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for lean_reinforcement-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9f836b40570b7945470e4a756a1ba672e6813ba5eb057a826bde9fad6b885ffa
MD5 2cf6425fed0977f81646e843f6d7c75c
BLAKE2b-256 8f5ac2b9ca1456daa20dae1c506b49da46ba1dbe3292e883e20c32ca7d86c906

See more details on using hashes here.

Provenance

The following attestation bundles were made for lean_reinforcement-0.1.2-py3-none-any.whl:

Publisher: python-publish.yml on GerbenKoopman/LeanReinforcement

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page