paper-with-me

홈 › Papers

Proof-Refactor: Refactoring Generated Formal Proofs into Modular Artifacts

2026-06-02 · Yiming Fu, Peixuan Liu, Zichen Wang, Kun yuan arxiv

While Large Language Models (LLMs) have shown strong performance in generating formal proofs, their outputs often remain less readable, modular, maintainable, and reusable than proofs in mature formal mathematics libraries. We argue that this gap stems in part from the compile-first objective implicit in most proof-generation pipelines, which encourages monolithic or ad hoc proof scripts rather than library-quality artifacts. Existing approaches to proof-quality improvement often rely on explicit, computable optimization objectives. In practice, however, the most tractable and experimentally validated objectives are largely length-based, while higher-level qualities such as readability, modularity, maintainability, and reusability are difficult to reduce to reliable automatic metrics. Instead of optimizing proof improvement against a single proxy metric, we take a process-guided approach inspired by human proof-refactoring workflows. We propose an agentic framework $\textbf{Proof-Refactor}$ that decomposes proof refactoring into four phases: extracting candidate proof fragments, designing helper declarations, formally proving the extracted and designed components, and repairing the original proof using the verified components. On generated Lean proofs from PutnamBench and Putnam2025, Proof-Refactor improves rubric-based refactoring scores over a strong Claude Code refactoring baseline, with the largest gains in signature quality and human readability. These results suggest that process-guided refactoring can improve proof structure without treating proof length as the primary objective.

📄 PDF Abstract BibTeX arXiv:2606.03743

Code (0)

등록된 구현이 없습니다.

Similar Papers 제목 키워드 기반

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

2026-05-18 · Jialin Lu, Soonho Kong, Rodrigo Stehling, Kaiyu Yang 외 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 a…

REFACTOR: Learning to Extract Theorems from Proofs

2024-02-26 · Jin Peng Zhou, Yuhuai Wu, Qiyang Li, Roger Grosse

Human mathematicians are often good at recognizing modular and reusable theorems that make complex mathematical results within reach. In this paper, we propose a novel method called theoREm-from-prooF extrACTOR (REFACTOR…

Automated Theorem Proving

RefactorAssist: Agentic Refinement for Reliable Code Refactoring

2026-08-02 · Jonathan Cordeiro, Shayan Noei, Ying Zou arxiv

Code refactoring aims to enhance the internal structure of source code without affecting its functional behavior. The recent advancements of Large Language Models (LLMs) have demonstrated potential for automating softwar…

RefAgent: A Multi-agent LLM-based Framework for Automatic Software Refactoring

2025-11-05 · Khouloud Oueslati, Maxime Lamothe, Foutse Khomh arxiv

Large Language Models (LLMs) have substantially influenced various software engineering tasks. Indeed, in the case of software refactoring, traditional LLMs have shown the ability to reduce development time and enhance c…

How We Refactor and How We Document it? On the Use of Supervised Machine Learning Algorithms to Classify Refactoring Documentation

2020-10-26 · Eman Abdullah AlOmar, Anthony Peruma, Mohamed Wiem Mkaouer, Christian Newman 외

Refactoring is the art of improving the design of a system without altering its external behavior. Refactoring has become a well established and disciplined software engineering practice that has attracted a significant …