MechMath: Sorrifier-Driven Formal Decomposition Workflow for Automated Theorem Proving
Ruichen Qiu · Yichuan Cao · Junqi Liu · Dakai Guo · Xiao-Shan Gao · Lihong Zhi · Ruyong Feng
MechMath is an efficient agentic framework for automated theorem proving in Lean, which adopts a sorrifier-driven formal decomposition workflow.
摘要
Recent advances in large language models (LLMs) and LLM-based agents have substantially improved the capabilities of automated theorem proving. However, for problems that require complex mathematical reasoning, current systems seldom succeed in their initial attempt, necessitating iterative adjustments to their proof strategies. Existing approaches for handling failed attempts typically either iteratively fix errors within the proof or discard the entire proof and regenerate it from scratch. The former leads to progressively longer contexts, which degrade the model's ability to attend to the remaining unresolved subproblems, while the latter is inefficient, as it may abandon mostly correct reasoning due to localized errors. To address this dilemma, we present _MechMath_, an agent system centered on a Sorrifier-driven formal decomposition paradigm. By leveraging the `sorry` placeholder in Lean to precisely isolate unresolved subgoals while preserving the surrounding verified proof structure, MechMath extracts each failed subproblem into a clean, self-contained context and resolves it independently. This avoids both the waste of full regeneration and the excessive context length induced by repeated repairs. Experimental results on challenging mathematical competition benchmarks, including IMO 2025, Putnam 2025, miniF2F, and a subset of ProverBench, demonstrate that our agent achieves significant advantages in proving efficiency.