Ineq-Comp: Benchmarking Human-Intuitive Compositional Reasoning in Automated Theorem Proving on Inequalities
Haoyu Zhao, Yihan Geng, Shange Tang, Yong Lin, Bohan Lyu, Hongzhou Lin, Chi Jin, Sanjeev Arora
TL;DR
Ineq-Comp introduces a bottom-up benchmark to diagnose compositional generalization in automated theorem proving for inequalities by starting from seed Lean 4 proofs of classical inequalities and applying controlled transformations to generate simple and multi-step variants. The study systematically evaluates a spectrum of provers, revealing a persistent gap: current systems struggle to reuse and compose basic reasoning strategies, even when provided with seed solutions or exposed to algebraic transformations. Key findings show heavy reliance on low-level tactics like sum-of-squares ($nlinarith$) and limited transfer of in-context demonstrations or fine-tuning to out-of-distribution variants, underscoring a fundamental brittleness in formal compositional reasoning. The work contributes a scalable dataset (Ineq-Simp, Ineq-Mix, Ineq-Real) and a framework for evaluating and extending compositional reasoning in formal proofs, highlighting a critical area for improving alignment between AI provers and human mathematical intuition.
Abstract
LLM-based formal proof assistants (e.g., in Lean) hold great promise for automating mathematical discovery. But beyond syntactic correctness, do these systems truly understand mathematical structure as humans do? We investigate this question in context of mathematical inequalities -- specifically the prover's ability to recognize that the given problem simplifies by applying a known inequality such as AM/GM. Specifically, we are interested in their ability to do this in a compositional setting where multiple inequalities must be applied as part of a solution. We introduce Ineq-Comp, a benchmark built from elementary inequalities through systematic transformations, including variable duplication, algebraic rewriting, and multi-step composition. Although these problems remain easy for humans, we find that most provers -- including Goedel, STP, and Kimina-7B -- struggle significantly. DeepSeek-Prover-V2-7B shows relative robustness, but still suffers a 20% performance drop (pass@32). Even for DeepSeek-Prover-V2-671B model, the gap between compositional variants and seed problems exists, implying that simply scaling up the model size alone does not fully solve the compositional weakness. Strikingly, performance remains poor for all models even when formal proofs of the constituent parts are provided in context, revealing that the source of weakness is indeed in compositional reasoning. Our results expose a persisting gap between the generalization behavior of current AI provers and human mathematical intuition. All data and evaluation code can be found at https://github.com/haoyuzhao123/LeanIneqComp.
