{"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-2606-05400","title":"LeanMarathon: Toward Reliable AI Co-Mathematicians through Long-Horizon Lean Autoformalization","arxiv_id":"2606.05400","date":"2026-06-03","proceeding":null,"authors":["Yuanhe Zhang","Yuekai Sun","Taiji Suzuki","Jason D. Lee","Fanghui Liu"],"abstract":"Long-horizon autoformalization of research mathematics fails not only at hard lemmas, but at scale: statements drift, dependencies tangle, context decays, and local repairs corrupt distant work. We present LeanMarathon, a multi-agent harness for reliable research-level Lean autoformalization. Its core abstraction is an evolving blueprint: a Lean file that serves simultaneously as formal proof skeleton, natural-language proof graph, and shared system of record. Four contract-scoped agents construct, audit, prove, and repair this blueprint. These agents are coordinated by a two-stage orchestrator that first stabilizes target fidelity through adversarial review and then discharges the proof directed acyclic graph (DAG) from its dynamic leaves upward in parallel CI-gated rounds. LeanMarathon turns one brittle multi-hour run into many local, recoverable, parallel transactions. We evaluate LeanMarathon on two recent research papers spanning four Erdős problems (#1051, #1196, #164, #1217). Across three autonomous runs, it formalizes all seven target theorems with no sorry, proving 258 lemmas and theorems. These results show that reliable AI co-mathematics requires not only stronger provers, but durable harnesses that preserve target fidelity across long mathematical developments. The code can be found at https://github.com/YuanheZ/LeanMarathon.","url_abs":"https://arxiv.org/abs/2606.05400","url_pdf":"https://arxiv.org/pdf/2606.05400","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":"https://app.syntology.ai/?focus=2606.05400","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2606.05400"}},"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/YuanheZ/LeanMarathon","reach":null}],"summary":{"ran":11,"unverified":4},"by_repo_kind":{"found_in_text":{"samples":15,"ran":11,"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":0,"samples":[{"code_sha256_prefix":"99f2364977bbe8a9","entry":"branch_slug","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":".scripts/per_node_worker_loop.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/.scripts/per_node_worker_loop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"99f2364977bbe8a9"}},{"code_sha256_prefix":"9299243a41efe83d","entry":"construct_mapping_without_duplicates","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":"agents/Blueprinter/.codex/hooks/ralph_wiggum_stop.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/agents/Blueprinter/.codex/hooks/ralph_wiggum_stop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9299243a41efe83d"}},{"code_sha256_prefix":"50b4e938c741848e","entry":"emit_block","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":"agents/Blueprinter/.codex/hooks/ralph_wiggum_stop.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/agents/Blueprinter/.codex/hooks/ralph_wiggum_stop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"50b4e938c741848e"}},{"code_sha256_prefix":"713abf373429aed5","entry":"emit_terminate","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":"agents/Blueprinter/.codex/hooks/ralph_wiggum_stop.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/agents/Blueprinter/.codex/hooks/ralph_wiggum_stop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"713abf373429aed5"}},{"code_sha256_prefix":"c929d35ea6ce5114","entry":"line_of_offset","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":".scripts/verify_blueprint.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/.scripts/verify_blueprint.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c929d35ea6ce5114"}},{"code_sha256_prefix":"d74e1da769253e9c","entry":"parse_patch","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":"mcp-servers/apply-patch/apply_patch_mcp.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/mcp-servers/apply-patch/apply_patch_mcp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"d74e1da769253e9c"}},{"code_sha256_prefix":"ff851fd3b9d8b0a4","entry":"replace_toml_string_if_present","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":".scripts/stage1_blueprint_loop.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/.scripts/stage1_blueprint_loop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ff851fd3b9d8b0a4"}},{"code_sha256_prefix":"28c4e0f933f99ae5","entry":"run_cmd","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":".scripts/per_node_worker_loop.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/.scripts/per_node_worker_loop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"28c4e0f933f99ae5"}},{"code_sha256_prefix":"4ebb1779d0ddbbc3","entry":"seek_sequence","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":"mcp-servers/apply-patch/apply_patch_mcp.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/mcp-servers/apply-patch/apply_patch_mcp.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4ebb1779d0ddbbc3"}},{"code_sha256_prefix":"7cfe8c603ed52012","entry":"skip_comments_and_ws","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":".scripts/verify_blueprint.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/.scripts/verify_blueprint.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7cfe8c603ed52012"}},{"code_sha256_prefix":"7c6310420d6728a1","entry":"yaml_quote","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":".scripts/per_node_worker_loop.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/.scripts/per_node_worker_loop.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7c6310420d6728a1"}},{"code_sha256_prefix":"f06e807ab002d4a9","entry":"build_snapshot","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":"mcp-servers/dag-tracker/dag_tracker_mcp.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/mcp-servers/dag-tracker/dag_tracker_mcp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f06e807ab002d4a9"}},{"code_sha256_prefix":"e0588123af01b084","entry":"find_balanced","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":".scripts/verify_blueprint.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/.scripts/verify_blueprint.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e0588123af01b084"}},{"code_sha256_prefix":"987b08a77407184b","entry":"load_verifier","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":"mcp-servers/dag-tracker/dag_tracker_mcp.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/mcp-servers/dag-tracker/dag_tracker_mcp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"987b08a77407184b"}},{"code_sha256_prefix":"218f485fdc9529cf","entry":"snapshot","repo":"YuanheZ/LeanMarathon","repo_kind":"found_in_text","path":"mcp-servers/dag-tracker/dag_tracker_mcp.py","file_url":"https://github.com/YuanheZ/LeanMarathon/blob/HEAD/mcp-servers/dag-tracker/dag_tracker_mcp.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"218f485fdc9529cf"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,264 of the 9,581 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9581,"papers_checked":6264},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}