IneqAgent: Agentic Inequality Proving in Lean with Symbolic Computation
Organizations: School of Software Engineering, East China Normal University · School of Computer and Information Science, Southwest University
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 Lean4. 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 inequality, implying Merris's conjecture in dimension four.
Figures & tables
| MO-INT-20 | Ineq-Real | Evan Chen | LitIneq | Overall | ||||||
| Method | SR | Time | SR | Time | SR | Time | SR | Time | SR | Time |
| Symbolic computation | ||||||||||
| Z3 | 25.00 | 234.20 | 30.00 | 20.04 | 42.86 | 0.15 | 55.41 | 1.80 | 42.47 | 19.59 |
| Maple | 0.00 | – | 10.00 | 1.69 | 26.19 | 1.28 | 41.89 | 152.60 | 25.27 | 101.132 |
| Isabelle sos | 0.00 | – | 4.00 | 21.69 | 9.52 | 21.69 | 21.62 | 18.90 | 11.83 | 19.66 |
| LLM provers | ||||||||||
| LLM inference cost threshold (US cents) | |||||||||||
| 5 | 10 | 50 | 100 | No cap | |||||||
| Backbone | Method | SR | Cost | SR | Cost | SR | Cost | SR | Cost | SR | Cost |
| DeepSeek-V4-Flash | Direct Agent | 66.67 | 1.9499 | 79.03 | 2.7609 | 90.32 | 4.6700 | 90.32 | 4.6700 | 90.32 | 4.6700 |
| IneqAgent (ours) | 88.17 | 0.6773 | 92.47 | 0.9485 | 94.09 | 1.3619 | 94.09 | 1.3619 | 94.09 | 1.3619 | |
| Qwen3.8-Flash | Direct Agent | 68.28 | 1.7882 | 84.41 | 2.7370 | 92.47 | 4.0352 | 93.55 | 4.7061 | 93.55 | 4.7061 |
| IneqAgent (ours) | 83.87 | 0.8219 | 89.25 | 1.1747 | 92.47 | 1.5543 | 92.47 | 1.5543 | 92.47 | 1.5543 | |
| Variant | SR (%) | Avg. LLM cost (US 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 |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Meaning | Value |
|---|---|---|
| Progressive-widening scale | ||
| Progressive-widening exponent | ||
| Exploration coefficient | ||
| Weight of the Lean-based reward | ||
| Stagnation penalty per attempt | ||
| Maximum stagnation penalty |
| Condition | Contribution to |
|---|---|
| Candidate compiles ( ) | |
| Proof text changed ( ) | |
| Proof text unchanged ( ) | |
| Change in unfinished-marker count | |
| unfinished markers remain | |
| new structured steps |
| Source group | Count | Instances and source attributions |
|---|---|---|
| Bernstein examples | 2 | Coefficient and subdivision examples |
| APPIRL benchmark | 2 | C1–C2: Verschelde (1996), Polynomial homotopy continuation: A portable Ada software package ( Verschelde, 1996 ) |
| APPIRL benchmark | 1 | C3: Iserles (1995), personal communication at the AMS–SIAM summer seminar ( Iserles, 1995 ) |
| APPIRL benchmark | 2 | C4, C6: Noonburg (1989), A neural network modeled by an adaptive Lotka–Volterra system ( Noonburg, 1989 ) |
| APPIRL benchmark | 1 | C5: Verschelde (2001), The PHC Pack, the database of polynomial systems ( Verschelde, 2001 ) |
| APPIRL benchmark | 1 | C7: Faugère (1999), A new efficient algorithm for computing Gröbner bases (F4) ( Faugère, 1999 ) |
| Target total degree | ||||
| Variables | – | – | – | Total |
| – | 6 | 2 | 2 | 10 |
| – | 4 | 9 | 0 | 13 |
| – | 7 | 7 | 3 | 17 |
| – | 4 | 2 | 2 | 8 |
| 0 | 1 | 0 | 1 | |
| Backbone | Input | Cached input | Output |
|---|---|---|---|
| DeepSeek-V4-Flash | 0.2206 | 0.0074 | 0.6618 |
| Qwen3.8-Flash | 0.1176 | 0.0147 | 0.3971 |
| Kimi-K3 | 2.9412 | 0.2941 | 14.7059 |
| GPT-5.5 | 5.0000 | 0.5000 | 30.0000 |
| Task | Variables | Total degree | Monomials | Time (s) | Cost (US cents) |
|---|---|---|---|---|---|
| Dittert, | 16 | 4 | 521 | 5,292 | 84.6728 |
| Dittert, | 25 | 5 | 118,755 | 6,704 | 100.1654 |
| HD | 9 | 4 | 222 | 42,731 | 521.9610 |
Lean Theorem Proving
Lean theorem proving uses the Lean proof assistant to construct machine-checked mathematical proofs, often with automated search and language models.
See all 123 papers