TRIGO: Benchmarking Formal Mathematical Proof Reduction for Generative Language Models

Jing Xiong, Jianhao Shen, Ye Yuan, Haiming Wang, Yichun Yin, Zhengying Liu, Lin Li, Zhijiang Guo, Qingxing Cao, Yinya Huang, Chuanyang Zheng, Xiaodan Liang, Ming Zhang, Qun Liu

Introduction

While Large Language Models (LLMs) have demonstrated impressive reasoning capabilities in natural language, their performance in Automated Theorem Proving (ATP) remains a significant challenge. Current benchmarks often focus on high-level symbolic logic, but they frequently overlook a model's ability to handle complex numerical combination reasoning—the meticulous "grunt work" of mathematics involving term grouping, factoring, and the application of specific identities to numerical constants.

Trigonometric expression reduction and its corresponding Lean formalization.

To address this gap, researchers introduced TRIGO, a benchmark designed to evaluate LLMs on the formal reduction of trigonometric expressions. By requiring models to generate step-by-step proofs in the Lean formal language, TRIGO tests whether models can move beyond "vibes-based" reasoning to strictly verifiable mathematical logic. The authors argue that trigonometric reduction is an ideal test case because it requires both knowledge of identities and precise numerical manipulation.

Methodology and System Design

The TRIGO framework bridges informal high school mathematics and formal code through a multi-step pipeline. First, human experts manually annotated the step-by-step reduction of trigonometric problems. These steps were then translated into Lean, a functional programming language and theorem prover. To scale the dataset, the researchers developed a "Theorem Generator" based on Lean-Gym, which applies 85 predefined transformation rules (e.g., sin_zero, tan_add) to create thousands of synthetic problems.

The interaction between a language model and a formal system during proof search.

Models are evaluated using search algorithms like Breadth-First Search (BFS) and Monte Carlo Tree Search (MCTS) to navigate the space of possible proof tactics. As shown in the system diagram, the language model generates proof steps (tactics) which are then verified by the formal system. This iterative process continues until the goal is reached or the search space is exhausted.

The TRIGO Benchmark Datasets

The benchmark consists of several distinct splits to evaluate different aspects of model performance:

  • TRIGO-real & TRIGO-web: Real-world problems collected from high school exercises and exams, manually formalized.
  • TRIGO-gen (TG-1, TG-2, TG-3): Synthetic samples generated by applying a fixed number of rules to control for difficulty.
  • TG-E: A "bridging" dataset that uses real-world expressions as starting points for the generator to help models generalize across distributions.

Key Insights and Results

The evaluation revealed several critical hurdles for current LLMs, particularly regarding the strictness of formal verification.

The "Have" Tactic and Numerical Generalization

One of the most significant challenges is the have tactic in Lean, used to introduce intermediate sub-goals. Models often struggle to identify which intermediate steps are necessary for simplification. Furthermore, LLMs exhibit a "numerical wall"—poor generalization to out-of-distribution (OOD) samples with large angles or unseen constants. In many cases, the pass rate for state-of-the-art models dropped to zero on OOD samples, suggesting they rely on pattern memorization rather than abstract logic.

Performance Comparison

  • GPT-2-PACT vs. GPT-4: A GPT-2 model fine-tuned on TRIGO and pre-trained on the PACT formal math dataset achieved a 34.88% pass rate on TRIGO-real. In contrast, while GPT-4 often reached the correct final answer in natural language, it frequently failed to produce a valid, verifiable Lean proof string, often hallucinating non-existent tactics or making trivial assumptions.
  • Search and Iteration: Sampling-based search outperformed simple beam search, as trigonometric reduction often requires non-obvious term groupings. Additionally, "Expert Iteration"—retraining models on their own successful proofs—significantly boosted performance on synthetic data.

Conclusion

TRIGO serves as a rigorous "stress test" for the formal reasoning claims of the LLM era. The findings highlight that current architectures lack the robust numerical reasoning required for formal verification. Future work will focus on developing better value functions for proof search and addressing the "numerical wall" to enable models to handle arbitrarily complex mathematical constants.

Summary updated

BibTeX
@inproceedings{xiong2023trigo,
  author = {Jing Xiong and Jianhao Shen and Ye Yuan and Haiming Wang and Yichun Yin and Zhengying Liu and Lin Li and Zhijiang Guo and Qingxing Cao and Yinya Huang and Chuanyang Zheng and Xiaodan Liang and Ming Zhang and Qun Liu},
  title = {{TRIGO: Benchmarking Formal Mathematical Proof Reduction for Generative Language Models}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-main.711},
}
Figure