An RL-based theorem prover extending AlphaProof using R'max Tree Search, achieving 87% accuracy on college-level mathematical proofs.
TinyProof is a research project that combines reinforcement learning with formal theorem proving. Built on top of the Lean4 proof assistant and powered by an intelligent tree search algorithm, it demonstrates significant improvements over expected baselines in automated mathematical reasoning.
- R'max Tree Search: Novel reinforcement learning algorithm for theorem proving
- 87% Success Rate: Achieves 87% accuracy on college-level mathematical proofs
- Formal Verification: Built on Lean4 for rigorous mathematical foundations
- Scalable ETL Pipeline: Automated data extraction from Lean4 repositories using LeanDojo
- Cloud Infrastructure: Deployed on Google Cloud Platform for scalable training
- Interactive Web Interface: Real-time theorem proving environment
- Backend: Python, Flask, Lean4
- Frontend: React, TypeScript, Monaco Editor
- ML/RL: PyTorch, Custom R'max Tree Search
- Infrastructure: Docker, Google Cloud Platform, LeanDojo
- Development: Jira, CI/CD pipelines
The project consists of three main components:
- Theorem Prover Engine: RL-based prover using R'max Tree Search
- Web Interface: Interactive frontend for theorem exploration
- ETL Pipeline: Automated data extraction and processing from Lean4 repositories
- Docker Desktop
- Node.js (for local development)
- Python 3.8+ (for local development)
-
Clone the repository
git clone https://github.com/utmgdsc/TinyProof.git cd TinyProof -
Start with Docker (Recommended)
docker compose up --build
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5050
If you prefer to run without Docker (note: Lean Server functionality will be limited):
Backend:
cd backend
pip install -r requirements.txt
python start.py --port 5050 --devFrontend:
cd frontend
npm install
npm run dev- Open the web interface at http://localhost:3000
- Enter mathematical statements or theorems in the editor
- Use the integrated Lean4 environment to write and verify proofs
- Leverage the RL-based prover assistance for automated proof search
docker compose down -v --remove-orphans
rm -rf frontend/node_modules frontend/package-lock.json
docker compose build --no-cache
docker compose updocker compose upThis project extends Google's AlphaProof methodology by implementing a novel R'max Tree Search algorithm specifically designed for theorem proving. The system demonstrates superior performance on college-level mathematical proofs, representing a significant advancement in automated reasoning capabilities.
Our ETL pipeline leverages LeanDojo to:
- Extract formal proof data from Lean4 repositories
- Transform proofs into training-ready formats
- Load processed data into scalable GCP storage
- Enable continuous learning and model improvement
TinyProof/
├── backend/ # Flask API and Lean4 integration
├── frontend/ # React web interface
├── docker-compose.yml # Multi-container orchestration
└── README.md # This file
- Supervisor: Dr. Mohammad
- Framework: Built upon LeanDojo and Lean4
- Inspiration: Google's AlphaProof methodology
- Infrastructure: Google Cloud Platform
Note: This is a research project focused on advancing the state of automated theorem proving through novel RL techniques.
