arXiv:2610.20681cs.AIOct 2026

Manuscript Offprint

arXiv:2610.20681

IneqAgent: Agentic Inequality Proving in Lean with Symbolic Computation

Gaolei He, Jinhui Li, Ruobing Zuo, Xia Zeng, Zhengfeng Yang

ABSTRACT

Formal inequality proving requires mathematical reasoning and exact computation, often connected through intermediate lemmas and goal reformulations. We introduce IneqAgent, an agentic framework combining LLM reasoning with symbolic computation for inequality proving in Lean 4. Lemma-level Monte Carlo Tree Search coordinates lemma construction, goal reformulation, and symbolic backend selection. Complementary sum-of-squares, Bernstein, and successive difference-substitution backends produce exact certificates for local Lean proof generation. The agent integrates these proofs with LLM-generated steps and uses Lean feedback to construct complete proofs checked against the original theorem statements. On four benchmarks, IneqAgent with DeepSeek-V4-Flash solves 175 of 186 problems (94.09%), achieving the highest overall success rate among the evaluated methods. Across four backbones, it achieves higher success rates at low LLM inference cost thresholds than Direct Agent using the same backbone, with lower mean inference costs over each method's successful runs. We also obtain Lean-verified strengthenings of Dittert's conjecture in dimensions four and five, and certify the Holens–Djokovic (4, 4) inequality, implying Merris's conjecture in dimension four. Code is available at https://github.com/gaolei-he/IneqAgent.

1 INTRODUCTION

Inequality proving is an important task in automated mathematical reasoning (Wei et al., 2024; Li et al., 2025a). Even concise inequalities can require carefully chosen substitutions, auxiliary bounds, and substantial algebraic computation. Proving them in Lean (de Moura & Ullrich, 2021) requires suitable mathematical strategies and explicit justification of each step, including sign and domain conditions.

Large language models (LLMs) support formal proof construction through learned proof generation and interaction with tools and verifiers (Lin et al., 2025; Ren et al., 2025; Wang et al., 2025; Varambally et al., 2026; Requena et al., 2026). Symbolic methods complement these capabilities by constructing checkable algebraic certificates (Peyrl & Parrilo, 2008; Kaltofen et al., 2012; Magron & Safey El Din, 2018). Combining them presents two challenges. First, symbolic backends depend on the goal's algebraic form and assumptions: a rational inequality, for example, may require denominator positivity before polynomial reformulation. Second, exact certificate construction can be computationally demanding. When numerical solvers are used, floating-point candidates typically satisfy certificate identities only approximately and require exact recovery and verification.

We introduce IneqAgent, an agentic framework combining LLM reasoning, symbolic computation, and Lean verification. The agent uses lemma-level MCTS to explore proof paths, choosing backend calls, goal reformulations, and intermediate lemmas according to the goal's structure and backend requirements. It integrates certificate-derived local proofs with LLM-generated steps, rewrites, and proofs of side conditions. Lean checks the complete proof against the original theorem statement.

The symbolic module provides three complementary backends. Using Putinar-type certificates (Putinar, 1993), the sum-of-squares (SOS) backend extends the numerical–symbolic certification procedure of Kaltofen et al. (2012) from unconstrained problems to problems with equality and inequality constraints through sequential recovery. The Bernstein backend combines numerical and exact linear programming with subdivision for box-constrained goals. Successive difference substitution uses exact substitutions and coefficient nonnegativity checks for polynomial goals over nonnegative variables. The module supports applicable original goals and intermediate lemmas.

We apply IneqAgent to conjectures on matrix permanents, obtaining Lean-verified proofs of strengthened inequalities for Dittert's conjecture in dimensions four and five that establish quantitative stability and unique maximizers. We also verify an exact SOS certificate for the Holens–Djokovic (4, 4) inequality in Lean and derive Merris's conjecture in dimension four. On four inequality benchmarks, IneqAgent with DeepSeek-V4-Flash solves 175 of 186 problems (94.09%), achieving the highest overall success rate among the evaluated methods. It also records lower mean solving times than the evaluated LLM-based provers. Across four backbones, it achieves lower mean LLM inference costs and higher success rates at low cost thresholds than Direct Agent using the same backbone. Both means are computed over each method's own successful runs. Ablations further support combining MCTS with symbolic computation.

Our main contributions are as follows:

• We introduce IneqAgent, which uses lemma-level MCTS to coordinate LLM reasoning, goal reformulation, and symbolic computation, producing complete proofs checked by Lean against the original theorem statements.

• We develop a symbolic proving module with complementary SOS, Bernstein, and difference-substitution backends. We extend the recovery procedure of Kaltofen et al. (2012) to constrained SOS certificates through sequential recovery, and translate certificates from all three backends into local Lean proofs.

• We demonstrate applications to matrix-permanent conjectures and introduce LitIneq, a benchmark of 74 formalized inequality tasks from research papers and formal-verification projects. We evaluate IneqAgent through benchmark comparisons, inference-cost analysis, and ablation studies.

References (100)

Couldn't load all references. Reload the page to try again.