MathlibLemma: Folklore Lemma Generation and Benchmark for Formal Mathematics
This paper introduces MathlibLemma, an automated LLM-based pipeline that discovers and formalizes missing "folklore" lemmas to expand the Lean Mathlib library, while also establishing a comprehensive benchmark of over 4,000 verified mathematical statements to advance AI-assisted formal mathematics.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to build a massive, perfect library of mathematical knowledge using a robot assistant. You have a giant, existing library called Mathlib (built for the Lean proof assistant), which is like a super-organized encyclopedia of math facts.
However, there's a problem. While the library has the big, famous theorems, it's missing thousands of tiny, "obvious" facts that human mathematicians use every day without thinking twice. These are called folklore lemmas.
Think of it like this: If you were writing a novel, you wouldn't need to explain that "a square has four sides" or "if you add zero to a number, it stays the same." You just assume everyone knows it. But for a robot proof-checker, if that tiny fact isn't explicitly written down in the library, it gets stuck. It's like trying to build a house but realizing you forgot to buy the specific type of nails needed to hold the roof together. The house (the proof) is conceptually sound, but you can't finish the construction because a tiny, "obvious" piece is missing.
The Problem: The "Last Mile"
The paper argues that this missing "connective tissue" is the last mile barrier. It stops mathematicians from using these powerful computer tools as easily as they use word processors or calculators. Even if a human knows the proof, the computer can't do it because it's missing the tiny, intermediate steps.
Furthermore, when AI (Large Language Models) tries to help write these proofs, it often fails. Why? Because if the AI can't find the "obvious" fact in the library, it tries to invent the whole proof from scratch. This is like asking someone to build a bridge without a blueprint; they might get lost, make mistakes, or hallucinate (make things up) because the task is too huge.
The Solution: MATHLIBLEMMA
The authors created a system called MATHLIBLEMMA. Think of this system as a four-stage factory designed to find those missing "obvious" facts, write them down correctly, and prove they are true.
Here is how the factory works, step-by-step:
The Explorer (Discovery Module):
Imagine a curious librarian who reads the existing library and says, "Hey, we have a lot of facts about triangles, but we don't have a rule for what happens when you flip one upside down. That's probably true, but it's missing!" This module uses AI to brainstorm these missing facts based on what's already there.The Gatekeeper (Judge Module):
The Explorer might make mistakes. It might suggest something that sounds cool but is actually mathematically wrong (like saying "all numbers are even"). The Gatekeeper is a second AI that looks at the suggestions and says, "No, that's nonsense," or "Yes, that sounds right." It filters out the garbage before the factory wastes time on it.The Editor (Formalizer Module):
Even if an idea is mathematically correct, the AI might write it in a weird way that the computer doesn't understand (like a sentence with bad grammar). The Editor fixes the syntax. It talks to the computer (the Lean server) to see what's wrong, gets an error message, and asks the AI to fix it until the computer says, "Okay, this sentence is grammatically correct."The Builder (Prover Module):
Now that the fact is written correctly, the Builder tries to prove it. It attempts to construct the logical argument. If it fails, it gets an error, tries again, and fixes its mistakes. If it succeeds, it produces a verified proof that the computer accepts as 100% true.
What They Found
The team ran this factory and produced two major things:
- A New Library of Facts: They found and proved 1,506 of these missing "folklore" facts. They even took a small sample of these and successfully added them to the official Mathlib library, proving that AI can generate facts that meet the high standards of human experts.
- A New Challenge (The Benchmark): They created a test set of 4,028 of these missing facts to see how good different AI models are at finding and proving them.
The Results:
- Current AI models are getting better, but they are still far from perfect. The best models could only solve about 19% of these "obvious" facts on their own.
- However, when you combine the strengths of different models (like using a team of specialists), they could solve about 37%.
- Crucially, when human experts looked at the ones the AI couldn't solve, they found that 78% of them were actually solvable and mathematically true. This means the AI didn't fail because the facts were fake; it failed because the task is just really hard.
The Takeaway
This paper shows that we can use AI not just to consume existing math libraries, but to actively expand them. By automating the discovery of these tiny, missing pieces, we are helping to build a more complete, usable, and reliable foundation for formal mathematics. It's like filling in the gaps in a map so that the journey from a mathematical idea to a computer-verified proof becomes smooth and easy.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.