Learning to Disprove: Formal Counterexample Generation with Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Li, Zenan, Li, Zhaoyu, Yang, Kaiyu, Ma, Xiaoxing, Su, Zhendong
Format: Preprint
Published: 2026
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908902001475584
author Li, Zenan
Li, Zhaoyu
Yang, Kaiyu
Ma, Xiaoxing
Su, Zhendong
author_facet Li, Zenan
Li, Zhaoyu
Yang, Kaiyu
Ma, Xiaoxing
Su, Zhendong
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2603_19514
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Learning to Disprove: Formal Counterexample Generation with Large Language Models
Li, Zenan
Li, Zhaoyu
Yang, Kaiyu
Ma, Xiaoxing
Su, Zhendong
Artificial Intelligence
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.
title Learning to Disprove: Formal Counterexample Generation with Large Language Models
topic Artificial Intelligence
url https://arxiv.org/abs/2603.19514