Theorem prover for Lean, augmented by retrieval
Top 92.3% on sourcepulse
ReProver provides retrieval-augmented language models for theorem proving in Lean 4. It addresses the challenge of generating correct and relevant tactics by leveraging a premise retrieval system to augment proof states, enabling more efficient and accurate automated theorem proving. The project is targeted at researchers and developers working with formal verification and automated reasoning systems.
How It Works
ReProver employs a two-stage approach. First, a premise retriever, based on a ByT5 encoder, embeds proof states and a corpus of relevant mathematical premises into vector representations. Cosine similarity is used to find the most relevant premises for a given proof state. Second, a tactic generator, a ByT5 encoder-decoder model, takes the proof state concatenated with the retrieved premises as input to generate a sequence of Lean tactics. This retrieval-augmented strategy aims to improve the quality and relevance of generated tactics by providing contextual information.
Quick Start & Requirements
conda create --yes --name ReProver python=3.11 ipython
), activate it (conda activate ReProver
), and install dependencies (pip install torch ...
). Prepend the repo's root to PYTHONPATH
.python scripts/download_data.py
), trace repos (python scripts/trace_repos.py
), and log in to Weights & Biases (wandb login
).transformers
, deepspeed
, pytorch-lightning
, wandb
, openai
, rank_bm25
, lean-dojo
, vllm
.Highlighted Details
Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
<a>
, </a>
) that need to be removed before use.6 months ago
1 day