arXiv:2610.11862cs.AIOct 2026

Manuscript Offprint

arXiv:2610.11862

LEVER: Adaptive Cost-Aware Proof Search Over AND/OR Graphs

Nihal Jain, Shuangjie Yao, Begum Cicekdag, Zhuo Zhang, Suman Jana

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

Mathematicians value proofs for more than correctness: among correct proofs, simplicity, purity and the computational cost of finding them vary widely. Yet LLM-powered theorem provers largely search for any correct proof, and improve its quality only after it is found. We propose LEVER, a proof search algorithm that makes the objective over correct proofs programmable and optimizes it during search. LEVER scores partial proofs over an AND/OR proof graph, combining realized objective values with predictions for open subgoals, so the objective guides search before a proof is complete. The same mechanism optimizes computational cost, proof length, topical impurity, and even their weighted combinations, while the Lean kernel enforces correctness. On PutnamBench in Lean 4, under matched budgets, LEVER costs 34% less than a strong single-conversation agent while raising the solve rate from 80% to 96%. On reducing topical impurity, i.e., how far a proof strays from its theorem's subject, it improves over post-hoc refactoring (42% reduction against 33%) at two-thirds of the cost and more reliably; on proof length, the metric refactoring is built for, it approaches refactoring. Varying the objective's weights traces a quality-cost trade-off curve, so the user can choose how much a better proof is worth. Overall, LEVER is a performant, cost-efficient and tunable proof search algorithm for navigating the space of correct proofs.

1 INTRODUCTION

Mathematicians have long valued proofs for more than their correctness. A proof may be shorter, more elementary, or reveal structure that another proof obscures. The four-color theorem, for example, was proved in 1976 and formally verified decades later, yet a substantially different proof fifty years on exposed new structure in planar graphs and led to a near-linear-time coloring algorithm (Appel & Haken, 1977; Gonthier, 2008; Inoue et al., 2026). More broadly, the mathematical literature has debated the importance of characteristics like purity, simplicity and explanation (Steiner, 1978; Detlefsen & Arana, 2011; Thiele, 2003; Tao, 2007). The challenge is, therefore, not only to find a correct proof, but to choose among many.

This observation is crucial in the context of LLM-powered theorem provers that may generate correct proofs differing sharply in the computation needed to find them, their length, and the machinery they invoke. Yet current systems largely separate these concerns: proof search returns any verified proof (NearAI, 2026; MistralAI, 2026; Rögnvaldsson et al., 2026), sometimes with mechanisms to reduce inference cost, and proof quality is improved only afterwards through post-hoc refactoring (Ahuja et al., 2024; Lu et al., 2026; Fu et al., 2026). We take a different view: the objective over the space of proofs should be programmable, with correctness as a constraint. Optimizing such objectives during search can be both cheaper and more effective than optimizing it afterwards: a post-hoc method revisits a proof already paid for, and possibly inherits a trajectory (mathematical argument) chosen for a different objective.

The key idea of LEVER is to score a proof before it is finished. A partial proof has some goals proved and others still open. LEVER scores it as the realized scored of the proved parts plus a predicted value for each open goal; at any time only the partial proof with the best score is expanded, so the objective steers search from the beginning rather than after the task is complete. We support this mechanism by representing partial proofs as an AND/OR graph: a theorem or a goal (OR node) is proved by any one of its alternative decompositions (AND nodes), and an argument needs all of its subgoals (OR nodes). We demonstrate that objectives such as computational cost, proof length or topical impurity, or a weighted sum of them compose over the proof graphs, allowing us to optimize them. In this process, correctness is never compromised: the Lean kernel checks every decomposition, and the assembled final proof.

On PutnamBench (Tsoukalas et al., 2024), with the same model and budget allocation as a strong agent that generates proofs in a single conversation, LEVER raises the solve rate under a 3budgetfrom80.03 budget from 80.0% to 96.3% while reducing average cost from1.44 to $0.95, a 34% reduction. The gain comes from keeping contexts local: LEVER reads less than half the input tokens of the single-conversation agent. We then optimize the proof itself, for length and topical impurity, which we operationalize following work on purity of method (Detlefsen & Arana, 2011; Martinot, 2024): a proof accumulates impurity when it depends on results outside the subject of its theorem. So, length is often amenable to local compression, whereas purity can depend on the argument chosen at the start. Consistent with this, LEVER approaches post-hoc refactoring on length, but outperforms both refactoring and direct instruction on impurity, at two-thirds of refactoring's cost. Finally, varying the weight on quality metrics traces explicit quality-cost trade-off curves. This turns theorem proving from searching for any verified proof into searching for a verified proof under a user-specified objective, using the same search algorithm.

Our contributions are:

• Objective-guided search over partial proofs. A unified algorithm to optimize computation and proof quality during search by using values that combine realized costs with predictions for open subgoals, propagated through an AND/OR graph;

• Cheaper and stronger proof search. On PutnamBench, 34% lower cost and a 96.3% solve rate, against 80.0% for a strong single-conversation agent under a matched budget;

• Proof quality during construction. Search-time optimization outperforms refactoring on topical impurity at two-thirds of its cost, approaches it on length, and admits explicit quality–cost trade-off curves.