MathlibLemma: Folklore Lemma Generation and Benchmark for Formal Mathematics
This addresses a persistent barrier for mathematicians using Lean by automating the addition of missing mathematical content, though it is incremental in applying existing LLM techniques to a specific domain.
The authors tackled the problem of missing folklore lemmas in Mathlib, a formal mathematics library, by developing MathlibLemma, an LLM-based multi-agent system that automatically discovers and formalizes these lemmas, resulting in a verified library of 4,028 type-checked Lean statements, some of which have been merged into Mathlib.
While the ecosystem of Lean and Mathlib has enjoyed celebrated success in formal mathematical reasoning with the help of large language models (LLMs), the absence of many folklore lemmas in Mathlib remains a persistent barrier that limits Lean's usability as an everyday tool for mathematicians like LaTeX or Maple. To address this, we introduce MathlibLemma, the first LLM-based multi-agent system to automate the discovery and formalization of mathematical folklore lemmas. This framework constitutes our primary contribution, proactively mining the missing connective tissue of mathematics. Its efficacy is demonstrated by the production of a verified library of folklore lemmas, a subset of which has already been formally merged into the latest build of Mathlib, thereby validating the system's real-world utility and alignment with expert standards. Leveraging this pipeline, we further construct the MathlibLemma benchmark, a suite of 4,028 type-checked Lean statements spanning a broad range of mathematical domains. By transforming the role of LLMs from passive consumers to active contributors, this work establishes a constructive methodology for the self-evolution of formal mathematical libraries.