{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2603-24465","title":"MechMath: Sorrifier-Driven Formal Decomposition Workflow for Automated Theorem Proving","arxiv_id":"2603.24465","date":"2026-03-25","proceeding":null,"authors":["Ruichen Qiu","Yichuan Cao","Junqi Liu","Dakai Guo","Xiao-Shan Gao","Lihong Zhi","Ruyong Feng"],"abstract":"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.","url_abs":"https://arxiv.org/abs/2603.24465","url_pdf":"https://arxiv.org/pdf/2603.24465","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2603.24465"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/MechMath/MechMath-v1","reach":null}],"summary":{"unverified":15},"by_repo_kind":{"found_in_text":{"samples":15,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":15,"samples":[{"code_sha256_prefix":"87b518b0a65eb03c","entry":"extract_content_by_tag","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/utils.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"87b518b0a65eb03c"}},{"code_sha256_prefix":"a110ead50bbb0182","entry":"extract_error","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/feedback.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/feedback.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a110ead50bbb0182"}},{"code_sha256_prefix":"c7f66af130c3a829","entry":"extract_error_dict","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/utils.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c7f66af130c3a829"}},{"code_sha256_prefix":"a50b9e4b0f25862b","entry":"extract_from_box","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/utils.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a50b9e4b0f25862b"}},{"code_sha256_prefix":"bf3107ef589c2680","entry":"extract_logic_error","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/feedback.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/feedback.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bf3107ef589c2680"}},{"code_sha256_prefix":"701260b6fa0fa8e1","entry":"filter_error_messages","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/sorrifier.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/sorrifier.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"701260b6fa0fa8e1"}},{"code_sha256_prefix":"1747a79cf49add0e","entry":"format_feedback_messages","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/feedback.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/feedback.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1747a79cf49add0e"}},{"code_sha256_prefix":"b3370e77a671c397","entry":"gen_one_sorry_of_block","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/sorrifier.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/sorrifier.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b3370e77a671c397"}},{"code_sha256_prefix":"17b8e8719543609f","entry":"get_indent","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/parser.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/parser.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"17b8e8719543609f"}},{"code_sha256_prefix":"00df48c980211da4","entry":"get_search_result","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/search.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/search.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"00df48c980211da4"}},{"code_sha256_prefix":"af0fa648e07de9b6","entry":"is_error","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/client.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/client.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"af0fa648e07de9b6"}},{"code_sha256_prefix":"29c7bc71b7ad2700","entry":"leandex","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/search.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/search.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"29c7bc71b7ad2700"}},{"code_sha256_prefix":"abf345a2fa0aa735","entry":"loogle","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/search.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/search.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"abf345a2fa0aa735"}},{"code_sha256_prefix":"5569d923e1ca9d92","entry":"remove_comments","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/code_blocks.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/code_blocks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"5569d923e1ca9d92"}},{"code_sha256_prefix":"57422d1a4865d73c","entry":"remove_sorry_statements","repo":"MechMath/MechMath-v1","repo_kind":"found_in_text","path":"src/mechmath/lean/code_blocks.py","file_url":"https://github.com/MechMath/MechMath-v1/blob/HEAD/src/mechmath/lean/code_blocks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"57422d1a4865d73c"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.CL","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}