[Paper Review] LEGO-Prover: Neural Theorem Proving with Growing Libraries
LEGO-Prover introduces a modular, growing skill library that lets an LLM-based prover retrieve and evolve lemmas to prove theorems. It improves miniF2F pass rates by leveraging newly created and evolved lemmas.
Despite the success of large language models (LLMs), the task of theorem proving still remains one of the hardest reasoning tasks that is far from being fully solved. Prior methods using language models have demonstrated promising results, but they still struggle to prove even middle school level theorems. One common limitation of these methods is that they assume a fixed theorem library during the whole theorem proving process. However, as we all know, creating new useful theorems or even new theories is not only helpful but crucial and necessary for advancing mathematics and proving harder and deeper results. In this work, we present LEGO-Prover, which employs a growing skill library containing verified lemmas as skills to augment the capability of LLMs used in theorem proving. By constructing the proof modularly, LEGO-Prover enables LLMs to utilize existing skills retrieved from the library and to create new skills during the proving process. These skills are further evolved (by prompting an LLM) to enrich the library on another scale. Modular and reusable skills are constantly added to the library to enable tackling increasingly intricate mathematical problems. Moreover, the learned library further bridges the gap between human proofs and formal proofs by making it easier to impute missing steps. LEGO-Prover advances the state-of-the-art pass rate on miniF2F-valid (48.0% to 57.0%) and miniF2F-test (45.5% to 47.1%). During the proving process, LEGO-Prover also manages to generate over 20,000 skills (theorems/lemmas) and adds them to the growing library. Our ablation study indicates that these newly added skills are indeed helpful for proving theorems, resulting in an improvement from a success rate of 47.1% to 50.4%. We also release our code and all the generated skills.
Motivation & Objective
- Motivate automating formal reasoning with modular lemma reuse to tackle increasingly complex theorems.
- Enable dynamic growth of a verified skill library through prover and evolver components.
- Bridge informal and formal proofs by enabling LLMs to reuse and evolve lemmas in Isabelle/Lean-like environments.
Proposed method
- Prover decomposes a theorem into subgoals and retrieves relevant lemmas from a growing skill library to construct a modular Isabelle proof.
- Evolver transforms existing lemmas into more general and reusable forms and solves unresolved requests to generate new lemmas.
- Three vector stores (lemma, request, problem) encode and retrieve skills via embeddings and k-NN search to inform prompting.
- LLMs draft informal proofs, which are formalized into Isabelle proof scripts with retrieved lemmas and verifier feedback.
- Isabelle/sledgehammer-based verification plus heuristic tactics auto-corrects proofs when needed, adding validated lemmas to the library.
- A growth loop: new lemmas from prover/evolver are verified and added, expanding the library for future proofs.

Experimental results
Research questions
- RQ1Can a growing, modular skill library improve neural theorem proving when integrated with LLMs?
- RQ2Do evolved lemmas generalize beyond their original problems to aid other proofs?
- RQ3How does modular proof construction compare with single-block proofs in terms of proof success and efficiency?
- RQ4What is the impact of removing the skill library on proving performance?
- RQ5How large and diverse is the resulting skill library, and how is it utilized?
Key findings
- LEGO-Prover achieves 57.0% miniF2F-valid and 50.0% miniF2F-test pass rates (with human informal proofs) and 52.4%/45.5% (model informal proofs).
- LEGO-Prover outperforms previous approaches on miniF2F by approximately 6.75 percentage points on average.
- A growing skill library enables sustained improvements: ablation without the library drops from 50.4% to 47.1% on validation within 50 attempts.
- The library eventually contains 22,532 skills, with contributions from prover (10.8%), request-driven evolver (38.2%), and directional transformer evolver (51.1%).
- Skills can be used directly or as references to inspire new lemmas, boosting LLM proof generation.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.