INEQAGENT: Agentic Inequality Proving in Lean with Symbolic Computation
Summary (Overview)
- IneqAgent is an agentic framework that combines LLM reasoning with symbolic computation for formal inequality proving in Lean 4, using lemma-level Monte Carlo Tree Search (MCTS) to coordinate proof search.
- The framework integrates three complementary symbolic backends—sum-of-squares (SOS), Bernstein, and successive difference substitution—that produce exact certificates translated into local Lean proofs.
- On four benchmarks totaling 186 problems, IneqAgent with DeepSeek-V4-Flash solves 175 problems (94.09%), achieving the highest overall success rate among evaluated methods, an improvement of 18.28 percentage points over the strongest baseline (Hilbert at 75.81%).
- IneqAgent achieves higher success rates at low LLM inference cost thresholds (5 and 10 cents) across all four evaluated backbones, with lower mean inference costs over successful runs.
- The framework produces Lean-verified proofs of strengthened Dittert's conjecture in dimensions four and five, and certifies the Holens–Djokovic (4,4) inequality, implying Merris's conjecture in dimension four.
Introduction and Theoretical Foundation
Formal inequality proving requires both mathematical reasoning and exact computation, often connected through intermediate lemmas and goal reformulations. Even concise inequalities require carefully chosen substitutions, auxiliary bounds, and substantial algebraic computation. Proving them in Lean requires suitable mathematical strategies and explicit justification of each step, including sign and domain conditions.
Key challenges addressed by the paper:
- Backend dependency on goal structure: Symbolic backends depend on the goal's algebraic form and assumptions—a rational inequality may require denominator positivity before polynomial reformulation.
- Computational demands of exact certification: Floating-point candidates from numerical solvers typically satisfy certificate identities only approximately and require exact recovery and verification.
Theoretical foundations include:
- Putinar's Positivstellensatz (1993) for SOS certificates under polynomial constraints
- Kaltofen et al.'s (2012) numerical–symbolic recovery procedure for exact certificates
- Bernstein representations with subdivision (Ray & Nataraj, 2009) for box-constrained problems
- Successive difference substitution (Xia & Yang, 2016) for nonnegative variables
The problem is formalized as establishing:
where the domain is specified by constraints:
Methodology
Agentic Framework with Lemma-Level MCTS
IneqAgent normalizes the formal statement into standard form and uses a symbol-aware LLM prover based on lemma-level MCTS with the following components:
- Selection (Root-Priority Rule): The root node is expanded until it has child nodes; subsequent exploration selects the highest-scoring child at each level.
- Action (Symbol-Aware Actions): When a node is selected, the agent checks whether the current goal has an algebraic form supported by the symbolic module. If supported, it invokes the symbolic backend; otherwise, it invokes the LLM to generate lemmas and verifies them in Lean.
- Evaluation (Lean Feedback and Proof-Evolution Scoring): The reward function is:
where is a heuristic progress score based on Lean checking results, and assesses progress toward completing the original theorem.
Symbolic Proving Module
The module seeks to establish for all where is defined by polynomial constraints. Three complementary backends are provided:
1. SOS-based proving searches for a Putinar-type certificate:
where are sums of squares and are unrestricted polynomial multipliers. The approach extends Kaltofen et al.'s recovery procedure to constrained problems through sequential recovery: first recovering rational PSD Gram matrices for inequality multipliers, then recovering and equality multipliers via Gauss–Newton iterations and exact rational recovery.
2. Bernstein-based proving for box-constrained goals uses Bernstein basis polynomials:
The method solves an LP feasibility problem:
with recursive subdivision when numerical solving fails.
3. Successive difference substitution applies the method of Xia & Yang (2016) for the nonnegative orthant, introducing difference variables:
All substitutions and coefficient checks use exact arithmetic, requiring no numerical recovery.
Empirical Validation / Results
Main Benchmark Results
Table 1: Success rate (SR, %) and mean solving time (seconds) across benchmarks
| Method | MO-INT-20 SR | Ineq-Real SR | Evan Chen SR | LitIneq SR | Overall SR | Overall Time |
|---|---|---|---|---|---|---|
| Z3 | 25.00 | 30.00 | 42.86 | 55.41 | 42.47 | 19.59 |
| Maple | 0.00 | 10.00 | 26.19 | 41.89 | 25.27 | 101.13 |
| Isabelle sos | 0.00 | 4.00 | 9.52 | 21.62 | 11.83 | 19.66 |
| Goedel-Prover-V2-8B | 10.00 | 28.00 | 30.95 | 59.46 | 39.25 | 852.11 |
| DeepSeek-Prover-V2-7B | 10.00 | 18.00 | 28.57 | 44.59 | 30.11 | 497.22 |
| AxProverBase | 75.00 | 70.00 | 73.81 | 74.32 | 73.12 | 1094.43 |
| Hilbert | 75.00 | 86.00 | 76.19 | 68.92 | 75.81 | 1693.86 |
| LIPS | 35.00 | 36.00 | 54.76 | 41.89 | 42.47 | 1461.88 |
| IneqAgent (ours) | 95.00 | 92.00 | 100.00 | 91.89 | 94.09 | 156.76 |
Key results:
- IneqAgent solves 19/20 in MO-INT-20, 46/50 in Ineq-Real, 42/42 in Evan Chen, and 68/74 in LitIneq
- On LitIneq, IneqAgent improves over AxProverBase (strongest baseline there) by 17.57 percentage points
- Mean solving time is substantially lower than LLM-based provers (156.76s vs. 852-1694s for baselines)
Cost Threshold Analysis
Table 2 highlights at 5-cent threshold (SR %):
| Backbone | Direct Agent | IneqAgent |
|---|---|---|
| DeepSeek-V4-Flash | 66.67 | 88.17 |
| Qwen3.8-Flash | 68.28 | 83.87 |
| Kimi-K3 | 6.99 | 50.54 |
| GPT-5.5 | 0.00 | 48.92 |
IneqAgent achieves higher success rates at 5- and 10-cent thresholds across all four backbones, with improvements ranging from 15.59 to 48.92 percentage points at the 5-cent threshold.
Ablation Study
Table 3: Ablation results with DeepSeek-V4-Flash
| Variant | SR (%) ↑ | Avg. LLM cost (cents) ↓ | Avg. time (s) ↓ |
|---|---|---|---|
| Base agent | 90.32 | 4.6700 | 329.88 |
| Base + MCTS | 91.40 | 2.2251 | 191.64 |
| Base + Symbolic | 91.40 | 2.8514 | 200.56 |
| IneqAgent (full) | 94.09 | 1.3619 | 156.76 |
Both components individually improve performance (168→170 solved problems), and combining them solves 175 problems—five more than either component alone. The full configuration reduces mean LLM inference cost by 70.84% and mean wall-clock time by 52.48% relative to the base agent.
Conjecture Applications
Dittert's conjecture: IneqAgent produces Lean-verified proofs of strengthened inequalities:
with , , establishing quantitative stability and the unique maximizer in dimensions four and five.
Holens–Djokovic (4,4) inequality:
IneqAgent constructs an exact rational SOS certificate for the reduced nine-variable problem, which implies Merris's conjecture in dimension four via:
Theoretical and Practical Implications
-
Integration of reasoning paradigms: IneqAgent demonstrates that LLM reasoning and symbolic computation are complementary rather than competing approaches. The lemma-level MCTS provides a principled framework for deciding when to invoke symbolic backends versus LLM-generated steps.
-
Extending SOS certification: The sequential recovery procedure extends Kaltofen et al.'s (2012) numerical–symbolic recovery from unconstrained to constrained problems, enabling exact certification of Putinar-type certificates with equality and inequality constraints.
-
Cost efficiency: The framework achieves higher success rates at dramatically lower LLM inference costs (e.g., 1.36 cents average vs. 4.67 cents for Direct Agent with DeepSeek-V4-Flash), suggesting that symbolic computation can substitute for expensive LLM reasoning steps.
-
Research-level mathematical capability: Producing Lean-verified proofs of strengthened Dittert's conjecture and the Holens–Djokovic inequality demonstrates capability beyond competition problems, extending to open research questions in matrix theory.
-
New benchmark: The introduction of LitIneq (74 problems from research papers, polynomial optimization, and Flyspeck) provides a resource for future evaluation of inequality proving systems beyond competition-style problems.
Conclusion
IneqAgent successfully combines lemma-level MCTS with symbolic computation to achieve state-of-the-art results in formal inequality proving in Lean 4. The framework coordinates LLM reasoning, goal reformulation, and symbolic backend selection, integrating certificate-derived local proofs into complete proofs verified against original theorem statements.
Key achievements:
- 94.09% success rate on 186 benchmark problems, surpassing all evaluated baselines
- Lower LLM inference costs across four different backbones
- Lean-verified proofs of strengthened Dittert's conjecture (dimensions 4 and 5) and the Holens–Djokovic (4,4) inequality
The ablation study confirms that both MCTS and symbolic computation contribute meaningfully to performance, with the full system achieving the best results. Future directions may include extending the framework to broader classes of mathematical statements, improving the symbolic backends' coverage of non-polynomial goals, and scaling to larger problem instances.
Related papers
- Athanor: An Agent-Native System for Autonomous Post-Training Research
A team of four autonomous agents post-trained a 4B base model to vendor-instruct level in 104 hours for $12,000, without teacher models or human advice.
- Sci$Π$vot: Benchmarking Principal-Investigator Judgment at Pivotal Moments of Scientific AutoResearch Agents
Sci Pi vot shows frontier LLMs fail at scientific judgment, scoring below chance on choosing human-corrected plans, and more context or reasoning often makes them worse.
- CodeLift: Your Test Suite Is Secretly a Dense SWE Curriculum
CodeLift's behavior-balanced test weighting and snapshot slicing deliver denser, better-calibrated rewards, improving SWE-bench Verified pass@1 by 3.67 points over binary reward baselines.