← Latest papers
💬 NLP

Mechanic: Sorrifier-Driven Formal Decomposition Workflow for Automated Theorem Proving

The paper introduces Mechanic, a novel agent system that utilizes Lean's "sorry" placeholder to isolate and independently resolve failed subgoals within a formal proof, thereby avoiding the inefficiencies of full regeneration and the context degradation associated with iterative repairs to significantly improve automated theorem proving on challenging mathematical benchmarks.

Original authors: Ruichen Qiu, Yichuan Cao, Junqi Liu, Dakai Guo, Xiao-Shan Gao, Lihong Zhi, Ruyong Feng

Published 2026-03-26
📖 4 min read☕ Coffee break read

Original authors: Ruichen Qiu, Yichuan Cao, Junqi Liu, Dakai Guo, Xiao-Shan Gao, Lihong Zhi, Ruyong Feng

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

The Big Problem: The "All-or-Nothing" Trap

Imagine you are a master chef trying to cook a complex, 10-course banquet (a difficult math proof). You have a very strict food critic (the computer compiler, Lean) who checks every single ingredient and step.

In the past, if you made a tiny mistake—say, you forgot to salt the soup in Course 3—the critic would reject the entire banquet. You would have to throw away the perfectly cooked appetizers, the main course, and the desserts, and start cooking the whole 10-course meal from scratch. This is incredibly wasteful and slow.

Alternatively, some chefs tried to fix just the soup. But if they kept adding more and more "fixes" to the same pot, the recipe became a giant, messy list of instructions that the chef (the AI) eventually got too confused to read.

The Solution: Meet "Mechanic"

The authors of this paper built a new AI agent called Mechanic. Instead of throwing away the whole meal or drowning in a messy recipe, Mechanic uses a clever trick called "Sorrifying."

Think of the word "sorry" in the Lean programming language as a "Pause Button" or a "Placeholder."

Here is how Mechanic works, step-by-step:

1. The Rough Draft (Informal Proof)

First, Mechanic writes a rough, human-readable plan for the proof. It's like sketching the menu on a napkin. It checks this plan with a "Verifier" (a smart editor) to make sure the logic makes sense before trying to cook anything.

2. The Cooking Attempt (Formal Proof)

Mechanic tries to turn that napkin sketch into a strict, computer-readable recipe (Lean code).

  • The Old Way: If the computer says "Error!" at step 3, the old AI would panic, delete the whole recipe, and try a new one.
  • Mechanic's Way: When the computer says "Error!" at step 3, Mechanic looks at the error. It realizes, "Ah, I messed up the soup, but the appetizers and the main course are perfect!"

3. The "Sorrifier" (The Magic Tool)

This is the core innovation. Mechanic takes the broken part of the recipe (the soup) and replaces it with a sorry tag.

  • What sorry does: It tells the computer, "I promise this part works, just pretend it's done for now so we can check the rest."
  • The Result: The computer accepts the rest of the banquet (the appetizers and main course) as valid. The only thing left to do is fix that one specific pot of soup.

4. The Decomposition (Cutting the Cake)

Now, instead of looking at the whole 10-course meal, Mechanic isolates just the "Soup Problem."

  • It extracts that specific error and turns it into a tiny, self-contained mini-challenge (a subgoal).
  • It forgets about the rest of the banquet for a moment and focuses entirely on solving just the soup.
  • Once the soup is fixed, it plugs the solution back into the main recipe.

Why This is a Game-Changer

Imagine you are building a massive Lego castle.

  • Old AI: If you put a red brick in the wrong spot in the middle tower, the whole castle collapses. You have to take it all apart and start over.
  • Mechanic: If you put a red brick in the wrong spot, Mechanic puts a sticky note on it that says "Fix Later." The rest of the castle stands tall and stable. Mechanic then takes that one sticky note, builds a tiny, perfect tower just for that spot, and snaps it back in.

The Results: Faster and Cheaper

The paper tested Mechanic on some of the hardest math problems in the world (like the Putnam and IMO competitions).

  • Efficiency: Because Mechanic doesn't throw away its hard work, it solves problems much faster.
  • Cost: It uses less computer power (and money) because it doesn't waste time re-generating correct parts of the proof.
  • Structure: The proofs it creates are "wide but shallow." Instead of a deep, confusing tower of fixes, it builds a broad, flat structure where many small problems are solved side-by-side.

Summary

Mechanic is like a smart construction crew that refuses to demolish a building just because one window is cracked. Instead, they put up a scaffold around the broken window, fix it, and keep building the rest of the skyscraper. This allows them to solve the hardest math puzzles in the world without getting stuck in a loop of endless mistakes.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →