TL;DR
While large language models (LLMs) have made remarkable progress in automated formal theorem proving, they remain remarkably brittle when faced with basic compositional reasoning. This paper introduces Ineq-Comp, an inequality benchmark showing that even top-tier formal provers (like DeepSeek-Prover-V2, Goedel-Prover, and Kimina) experience drastic performance collapses when elementary seed inequalities undergo simple, human-intuitive transformations such as variable duplication or algebraic rewriting.
What Problem Does This Paper Address?
Recent AI systems can generate verifiable formal proofs in interactive theorem provers like Lean 4, scoring silver-medal-level results on Olympiad math. However, standard benchmarks like MiniF2F, ProofNet, and PutnamBench have wide, opaque difficulty gaps and suffer from potential training data contamination, making it hard to diagnose why a model fails.
Humans solve complex math by decomposing problems into modular sub-problems—"standing on the shoulders of giants." Do neural provers actually understand mathematical structure and compose known lemmas, or are they merely memorizing proof script syntax? The authors specifically test whether LLMs can perform compositional reasoning on mathematical inequalities (e.g., AM-GM, Cauchy–Schwarz, Jensen) when subjected to basic transformations that humans find trivial.
Methods
The authors designed a bottom-up framework that systematically builds complex inequalities from elementary ones:
- Type I Transformations (Duplication & Composition): Replicating a seed inequality $f(X) \ge g(X)$ using new variables $Y$ to form $f(Y) \ge g(Y)$, then multiplying them ($f(X)f(Y) \ge g(X)g(Y)$) or adding them. A human easily solves this by solving both halves independently and combining them.
- Type II Transformations (Algebraic Rewriting): Applying monotonic, one-to-one coordinate substitutions on variables (e.g., $x_i \mapsto x_i^2$ or $\sqrt{x_i}$).
- Automated Rule-Based Expansions (Ineq-Mix): Programmatically composing pairs of inequalities using operations (addition, weighted sums, min/max, multiplication) and applying problem-level monotonic functions (such as $\exp$ or $\log$).
- Ablation Studies: Probing failure modes by (1) scaling model parameters up to 671B, (2) providing full formal proofs of the seed problems via in-context learning (ICL), and (3) fine-tuning models on synthetic composed inequalities to test out-of-distribution (OOD) generalization.
Datasets
The authors curate and open-source Ineq-Comp (formalized in Lean 4 with verified ground-truth proofs):
- Ineq-Simp: 75 curated seed problems (covering AM-GM, Cauchy–Schwarz, Jensen, Schur, sum-of-squares, and induction) plus 150 variants (75 Type I, 75 Type II).
- Ineq-Mix: 100 evaluation problems automatically generated by combining distinct seed problems using formal composition rules.
- Ineq-Real: 50 real-world competition inequality problems (sourced from Gaokao, Olympiads, and competition training).
Key Insights and Ideas
- Surface-Form Sensitivity over Semantic Understanding: Top models solve seed problems with high success rates, but their accuracy plummets on Type I compositions. The logic is identical, yet models fail because the surface syntax changed.
- Informal vs. Formal Disconnect: Models like OpenAI o3 or DeepSeek-R1-Distill often find the exact right decomposition and mention the right inequality (e.g., AM-GM) in their informal English "thinking" process, but abandon it completely when writing Lean 4 code.
- Overreliance on Brute Force Tactics: Instead of applying high-level Mathlib lemmas (like Cauchy or AM-GM), almost all provers default to
nlinarithpaired withsq_nonneg(sum-of-squares), trying to brute-force polynomials. Kimina-Distill-7B was the only tested model that correctly applied Mathlib’s native AM-GM theorem. - In-Context Proofs Do Not Fix the Gap: Giving models the complete, verified Lean proof of the seed problem in their prompt does not reliably enable them to solve the composed variant.
- Data Augmentation Fails to Transfer: Fine-tuning Goedel-Prover on thousands of synthetic AM-GM compositions improved in-distribution performance, but yielded near-zero gains on out-of-distribution compositions (e.g., Cauchy–Schwarz variants), proving that supervised fine-tuning alone is insufficient to instill general compositional reasoning.
Key Results
- Massive Performance Drops on Trivial Compositions:
- On Ineq-AMGM seeds, Kimina-Prover-7B scores 80.0% (pass@3200), but plunges to 44.0% on Type I variants.
- DeepSeek-Prover-V1.5 drops from 60.0% on AM-GM seeds down to 4.0% on Type I.
- Goedel-Prover-SFT drops from 60.0% to 4.0% on Type I.
- DeepSeek-Prover-V2-7B is the most robust, but still experiences a >20% absolute drop at pass@32 (from 75.0% to 58.6% on AM-GM Type I; 64.6% to 33.0% on Cauchy Type I).
- Model Scaling Dampens but Doesn't Eliminate the Gap: DeepSeek-Prover-V2-671B improves overall accuracy, yet maintains a noticeable gap (88.0% on seeds vs. 68.3% on Type I at pass@32).
- Synthetic Compositions are Harder than Real-World Problems: On Ineq-Mix, all whole-proof generation models except DeepSeek-Prover-V2 solved fewer than 7% of problems at 128 attempts, whereas they achieved more than double that solve rate on competition problems in Ineq-Real.
Limitations and Future Work
- Compute Constraints: Experiments used fixed generation parameters (temperature 1.0, 16k context limit) without extensive hyperparameter sweeps due to consuming over 10,000 H100 GPU hours.
- Domain Scope: The study focuses strictly on algebraic inequalities and Lean 4; extending this benchmark methodology to other domains (e.g., combinatorics, abstract algebra, topology) and proof assistants (Isabelle, Coq) is an open area.
- Future Directions: Developing richer training signals, such as targeted reinforcement learning for subgoal decomposition, hierarchical premise retrieval, and aligning informal chain-of-thought planning directly with formal tactic execution.
Summary updated