Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

ImProver: Agent-Based Automated Proof Optimization

About

Large language models (LLMs) have been used to generate formal proofs of mathematical theorems in proofs assistants such as Lean. However, we often want to optimize a formal proof with respect to various criteria, depending on its downstream use. For example, we may want a proof to adhere to a certain style, or to be readable, concise, or modularly structured. Having suitably optimized proofs is also important for learning tasks, especially since human-written proofs may not optimal for that purpose. To this end, we study a new problem of automated proof optimization: rewriting a proof so that it is correct and optimizes for an arbitrary criterion, such as length or readability. As a first method for automated proof optimization, we present ImProver, a large-language-model agent that rewrites proofs to optimize arbitrary user-defined metrics in Lean. We find that naively applying LLMs to proof optimization falls short, and we incorporate various improvements into ImProver, such as the use of symbolic Lean context in a novel Chain-of-States technique, as well as error-correction and retrieval. We test ImProver on rewriting real-world undergraduate, competition, and research-level mathematics theorems, finding that ImProver is capable of rewriting proofs so that they are substantially shorter, more modular, and more readable.

Riyaz Ahuja, Jeremy Avigad, Prasad Tetali, Sean Welleck• 2024

Related benchmarks

TaskDatasetResultRank
Formal Theorem ProvingMiniF2F (test)--
128
Proof OptimizationMiniCTX v2 (test)
Length0.355
11
Proof length optimizationMIL
Improvement43.55
4
Proof Optimization (Declarativity)MIL aggregated (test)
Improvement9.34
4
Proof Optimization (Length)Mathlib
Improvement6.19
4
Proof Optimization (Length)MIL aggregated (test)
Improvement20.96
4
Proof optimization (Mixed)MIL aggregated (test)
Improvement27.31
4
Neural Theorem ProvingMIL-C04
Pass@1545.45
2
Neural Theorem ProvingMIL-C08
Pass@1533.33
2
Neural Theorem ProvingMIL General Subset
Pass@1539.13
2
Showing 10 of 15 rows

Other info

Follow for update