cs.AIMar 19, 2026

Learning to Disprove: Formal Counterexample Generation with Large Language Models

Authors: Zenan Li, Zhaoyu Li, Kaiyu Yang, Xiaoxing Ma, Zhendong Su

Organizations: ETH Zurich · University of Toronto · MiroMind · Nanjing University

Abstract

Mathematical reasoning demands two critical, complementary skills: constructing rigorous proofs for true statements and discovering counterexamples that disprove false ones. However, current AI efforts in mathematics focus almost exclusively on proof construction, often neglecting the equally important task of finding counterexamples. In this paper, we address this gap by fine-tuning large language models (LLMs) to reason about and generate counterexamples. We formalize this task as formal counterexample generation, which requires LLMs not only to propose candidate counterexamples but also to produce formal proofs that can be automatically verified in the Lean 4 theorem prover. To enable effective learning, we introduce a symbolic mutation strategy that synthesizes diverse training data by systematically extracting theorems and discarding selected hypotheses, thereby producing diverse counterexample instances. Together with curated datasets, this strategy enables a multi-reward expert iteration framework that substantially enhances both the effectiveness and efficiency of training LLMs for counterexample generation and theorem proving. Experiments on three newly collected benchmarks validate the advantages of our approach, showing that the mutation strategy and training framework yield significant performance gains.

Figures & tables

Appendix figures & tables8 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Counterexample Generation via Per-Theorem Symbolic Verifiers: When Imitation Hurts and Reinforcement Repairs

    Oct 1, 2026Omar Farouk Zouak, Houssam Eddine Boukhalfa, Soumaya Lakehal +2LLM ReasoningRL for Language Model Reasoning

  2. Learning to Reason with Insight for Informal Theorem Proving

    Apr 17, 2026Yunhe Li, Hao Shi, Bowen Deng +8Automated Theorem ProvingRL for Language Model Reasoning

  3. Discovering New Theorems via LLMs with In-Context Proof Learning in Lean

    Sep 16, 2025Kazumi Kasaura, Naoto Onda, Yuta Oriike +3Automated Theorem ProvingIn-Context Learning