BlueprintRepair: Typed Local Edits for Failed Lean Proof Blueprints
The paper introduces BlueprintRepair, a schema-checked local editing interface for repairing failed Lean proof blueprints that achieves cost and token efficiency comparable to or better than free-form patching and rewriting methods, as validated by the new BlueprintTrace benchmark.
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 teach a super-smart robot how to solve a complex math problem. You can't just tell the robot, "Go figure it out!" and hope it gets it right on the first try. Instead, you give it a map—a blueprint. This blueprint isn't a picture of the answer; it's a checklist of smaller steps (lemmas) that need to be true to reach the final goal. If the robot gets stuck, it's usually because one step on the checklist is wrong, a connection is missing, or the robot forgot to prove one of the steps.
In the world of computer science, this is called "formal verification." It's like building a skyscraper where every single brick must be mathematically proven to hold the weight of the one above it. If one brick is shaky, the whole building collapses. Recently, scientists have started using Artificial Intelligence (AI) to help write these proofs. But AI is like a brilliant but sometimes careless architect: it can draw a beautiful blueprint, but it might accidentally leave out a support beam or write a rule that doesn't make sense. When the blueprint fails, the question is: How do we fix it? Do we ask the AI to tear down the whole building and start over? Do we ask it to scribble a quick note on the wall to patch a hole? Or do we give it a specific set of tools to fix just the broken part?
This paper, titled BlueprintRepair, explores exactly that question. The researchers built a special "repair shop" for these AI-generated math blueprints. They created a system where an AI can fix a broken proof plan using ten specific, pre-approved tools (like "weaken this rule" or "add this connection") instead of just rewriting the whole thing from scratch. They tested this against two other methods: one where the AI tries to patch the code with free-form text changes, and another where the AI rewrites the entire module.
Here is what they found. When the blueprint had a small, localized error—like a missing link or a wrong number—the "typed local edits" method (using the specific tools) worked almost as well as the free-form methods. In fact, with a model called DeepSeek-V4-Flash, the tool-based method solved 79 out of 91 small errors, while the free-form methods solved 81. The difference was tiny. However, the tool-based method was much faster and cheaper. It reached its maximum success rate using only 10,000 "tokens" (a measure of how much text the AI generates), while the other methods needed to generate much more text to catch up. In terms of cost, the tool-based method was the cheapest per solved problem, while the free-form patching was 1.30 times more expensive, and the full rewrite was 2.06 times more expensive.
The researchers also tested a second AI model, Qwen3.6-Flash. This model solved fewer problems overall, but the pattern stayed the same: the specific tool-based repairs were still the most cost-effective and reached their success limit much faster than the others. Interestingly, when the blueprint had multiple, complicated errors chained together, the free-form methods sometimes had a slight edge, but for the vast majority of small, fixable mistakes, the "surgical" approach of using specific tools was the winner.
The paper also introduces a new dataset called BLUEPRINTTRACE, which records every single attempt, success, and failure. This is like a black box flight recorder for math proofs, showing exactly where the AI went wrong and why. One of the most important rules in this system is that the AI cannot change the final goal (the target theorem). If the AI tries to change the question it's supposed to answer, the system rejects it immediately. This ensures that the AI is actually solving the problem it was given, not just finding an easier one.
In short, the paper suggests that when an AI's math blueprint is mostly correct but has a few broken pieces, giving it a specific set of tools to fix those pieces is a smarter, faster, and cheaper way to go than letting it rewrite the whole thing. It's the difference between a surgeon making a precise incision to remove a tumor and a demolition crew knocking down the whole hospital to fix a leaky pipe. While the demolition crew might eventually get the job done, the surgeon gets there with less mess and less cost. The study doesn't claim this is the perfect solution for every single math problem, but for the specific type of "localized" errors they tested, the typed local edits are the most efficient path forward.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.