LemmaHead: RAG Assisted Proof Generation Using Large Language Models

๐Ÿ“… 2025-01-27
๐Ÿ“ˆ Citations: 0
โœจ Influential: 0
๐Ÿ“„ PDF
๐Ÿค– AI Summary
To address the low reasoning accuracy and poor interpretability of large language models (LLMs) in Lean-based formal theorem proving, this paper proposes LemmaHeadโ€”the first domain-specific retrieval-augmented generation (RAG) system that integrates structured mathematical textbook knowledge. Our method introduces a textbook-aware context retrieval mechanism and a theorem-proving-oriented prompt injection strategy, enabling fine-grained lemma matching and semantic alignment. LemmaHead constructs a comprehensive Lean knowledge base covering core mathematical domains, combining embedding-based semantic retrieval with LLM-driven collaborative generation. Experimental evaluation on multiple Lean benchmark tasks demonstrates that LemmaHead significantly improves proof completion rate (+28.3%) and correctness rate (+34.7%), empirically validating the substantial enhancement conferred by textbook-level prior knowledge for formal mathematical reasoning.

Technology Category

Application Category

๐Ÿ“ Abstract
Developing the logic necessary to solve mathematical problems or write mathematical proofs is one of the more difficult objectives for large language models (LLMS). Currently, the most popular methods in literature consists of fine-tuning the model on written mathematical content such as academic publications and textbooks, so that the model can learn to emulate the style of mathematical writing. In this project, we explore the effectiveness of using retrieval augmented generation (RAG) to address gaps in the mathematical reasoning of LLMs. We develop LemmaHead, a RAG knowledge base that supplements queries to the model with relevant mathematical context, with particular focus on context from published textbooks. To measure our model's performance in mathematical reasoning, our testing paradigm focuses on the task of automated theorem proving via generating proofs to a given mathematical claim in the Lean formal language.
Problem

Research questions and friction points this paper is trying to address.

Large Language Models
Mathematical Proofs
Lean Theorem Proving
Innovation

Methods, ideas, or system contributions that make the work stand out.

RAG (Retrieval-Augmented Generation)
LemmaHead Database
Mathematical Theorem Proving
๐Ÿ”Ž Similar Papers
No similar papers found.