mlsanityData to 14 Oct 2026

Lean Refactor: Multi-Objective Controllable Proof Optimization via Agentic Strategy Search

arXiv 2605.20244 ↗First posted 18 May 2026cs.LO cs.AI cs.CLcited by 1

On the map: LLM agents and tool use → Educational agents and math problem solving

Abstract (arXiv)

We present Lean Refactor, a plug-and-play retrieval-augmented agentic framework for multi-objective, controllable, and version-robust refactoring of Lean proofs. LLM-generated proofs are notoriously correct-but-verbose and brittle across library versions, yet existing refactoring works overlook three practical challenges: 1) Lean refactoring is natively multi-objective (proof length, compilation cost, and version compatibility are often in tension); 2) Lean repositories have fragile compatibility, whereas LLM releases are unaware of Lean/Mathlib versions; 3) Training-based pipelines require repeated fine-tuning with each new LLM release, scaling neither with model churn nor with Lean's release cycle. Lean Refactor steers a frozen agentic LLM with retrievals from a curated database of multi-objective refactoring strategies, each densely annotated with metadata such as supported Lean/Mathlib versions and expected compilation-cost reduction. Experiments show over 70% token-level compression on competition benchmarks, over 20% on research repositories, and up to 60% compilation-time reduction, outperforming prior work and Claude Code. Version-filtered retrieval further improves compression on the target Lean version, and refactored miniF2F proofs exhibit stronger zero-shot version transfer to future Lean releases than their unrefactored counterparts.

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Educational agents and math problem solving, one of 16 directions in LLM agents and tool use. Builds on 27 of its 47 references that are in the map. First posted on arXiv 18 May 2026.

Builds on

27 of 47 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024ImProver: Agent-Based Automated Proof Optimization7 Oct

Other references · 26

  1. 2023GPT-4 Technical Reportcited by 18,396
  2. 2022Training language models to follow instructions with human feedbackcited by 15,971
  3. 2023LeanDojo: Theorem Proving with Retrieval-Augmented Language Modelscited by 427
  4. 2021MiniF2F: a cross-system benchmark for formal Olympiad-level mathematicscited by 391
  5. 2020Generative Language Modeling for Automated Theorem Provingcited by 388
  6. 2025DeepSeek-Prover-V2: Advancing Formal Mathematical Reasoning via Reinforcement Learning for Subgoal Decompositioncited by 287
  7. 2024DeepSeek-Prover: Advancing Theorem Proving in LLMs through Large-Scale Synthetic Datacited by 234
  8. 2024DeepSeek-Prover-V1.5: Harnessing Proof Assistant Feedback for Reinforcement Learning and Monte-Carlo Tree Searchcited by 197
  9. 2025Goedel-Prover-V2: Scaling Formal Theorem Proving with Scaffolded Data Synthesis and Self-Correctioncited by 154
  10. 2025Goedel-Prover: A Frontier Model for Open-Source Automated Theorem Provingcited by 133
  11. 2025Seed-Prover: Deep and Broad Reasoning for Automated Theorem Provingcited by 101
  12. 2025Aristotle: IMO-level Automated Theorem Provingcited by 58
14 more
  1. 2025SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?cited by 36
  2. 2025APOLLO: Automated LLM and Lean Collaboration for Advanced Formal Reasoningcited by 35
  3. 2025RefactorBench: Evaluating Stateful Reasoning in Language Agents Through Codecited by 30
  4. 2025Language Models for Code Optimization: Survey, Challenges and Future Directionscited by 15
  5. 2025ProofOptimizer: Training Language Models to Simplify Proofs without Human Demonstrationscited by 11
  6. 2025Lean Finder: Semantic Search for Mathlib That Understands User Intentscited by 8
  7. 2025RefAgent: A Multi-agent LLM-based Framework for Automatic Software Refactoringcited by 8
  8. 2025Tuning LLM-based Code Optimization via Meta-Prompting: An Industrial Perspectivecited by 7
  9. 2025Do Large Language Models Understand Performance Optimization?cited by 6
  10. 2025Growing Mathlib: maintenance of a large scale mathematical librarycited by 5
  11. 2025PerfCoder: Large Language Models for Interpretable Code Performance Optimizationcited by 3
  12. 2025FasterPy: An LLM-based Code Execution Efficiency Optimization Frameworkcited by 3
  13. 2025Refactoring with LLMs: Bridging Human Expertise and Machine Understandingcited by 2
  14. 2025SemOpt: LLM-Driven Code Optimization via Rule-Based Analysiscited by 2

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Optimizing the Cost-Quality Tradeoff of Agentic Theorem Provers in Lean
  2. 2026ProofLoom: Proof-Obligation-Driven Theory Construction for Autoformalizing Research-Level Stochastic Optimization
  3. 2026Self-Modifying Lean Proof Agents with Verifier-Grounded Benchmark Coevolution
  4. 2026OProver: A Unified Framework for Agentic Formal Theorem Proving
  5. 2026Proof-Refactor: Refactoring Generated Formal Proofs into Modular Artifacts
  6. 2026LEAP: Supercharging LLMs for Formal Mathematics with Agentic Frameworks
  7. 2026SorryDB: Can AI Provers Complete Real-World Lean Theorems?
  8. 2026Discover and Prove: An Open-source Agentic Framework for Hard Mode Automated Theorem Proving in Lean 4