betaFeedback

WorksComputer Science

Learning to Disprove: Formal Counterexample Generation with Large Language Models

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 constructs candidate counterexample-generation tasks by systematically extracting theorems and removing selected hypotheses. 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 substantial performance gains.

Introduction

Endowing machines with mathematical reasoning capabilities has long represented one of the most fundamental and challenging frontiers in artificial intelligence research [1]. In recent years, with the emergence of reasoning large language models (LLMs) such as OpenAI-o1 [44], DeepSeek-R1 [22], and Gemini-2.5-Pro [16], significant advances have been achieved in this area. Furthermore, several formal reasoning LLMs, including Seed prover [14], Kimina prover [62], and Goedel prover [39], have also demonstrated strong performance in generating formal proofs and interacting with theorem provers [17, 7, 46]. The impressive capabilities exhibited by these models open up new avenues for addressing advanced and complex mathematical problems. However, existing studies often emphasize the logical deduction of LLMs; their capability to find counterexamples remains underexplored [36].

In mathematics, counterexamples are far more than mere exceptions [6]; they play a vital role in theory development [32], conjecture refinement [24], and educational enhancement [80]. For instance, since a conjecture must hold for all possible inputs, identifying anomalous examples and special cases is a crucial step for formulating valuable conjectures. Moreover, for LLM reasoning, its effectiveness largely depends on how well models can reflect upon and evaluate their intermediate reasoning steps [52]. Hence, counterexample generation becomes equally vital: it equips models with the ability to self-verify their logical processes, thereby strengthening both their reasoning reliability and explanatory power.

In this paper, we focus on training LLMs to generate formal counterexamples. Although casting the task into a formal setting requires the LLM to additionally provide a formal proof for each counterexample, it allows for the automatic evaluation of the proposed counterexample via the Lean 4 theorem prover. Two significant challenges arise in this task: First, there is a severe scarcity of training data. Currently, CounterMath [36] stands as the sole dataset specifically curated for benchmarking counterexample generation, comprising only 1,216 natural language problems. This limited size renders it inadequate for practical LLM training. Second, the reward signals during training are exceptionally sparse. When LLMs fail to produce correct counterexamples for complex problems, the training reward vanishes, hindering further improvement in model performance and resulting in a plateau at a low success rate.

To address these challenges, we propose an integrated framework illustrated in Figure 1. We design a new mutation strategy that drops selected hypotheses from provable theorems to construct candidate counterexample problems. Through this mutation strategy, we synthesize a large problem dataset for counterexample search. Furthermore, we introduce a multi-reward function based on verified proofs of the counterexample target and the negation of the discarded hypothesis, which can provide auxiliary feedback even when the main counterexample target remains unsolved.

Figure 1. Framework of counterexample training. In the data synthesis stage, the symbolic mutation drops the hypothesis of a provable theorem, creating candidate counterexample problems. In the subsequent expert stage, two rewards are introduced based on whether proofs establish the counterexample target and the negation of the dropped hypothesis, boosting training effectiveness and efficiency.

Experiments on three newly collected benchmarks demonstrate the effectiveness of our framework. Leveraging the proposed mutation strategy, we synthesized 575K candidate counterexample problems for fine-tuning. Together with a curated large-scale dataset and a multi-reward training scheme, this allows us to train a model specialized for counterexample generation. We further establish three applicable tasks: counterexample search, verification of autoformalized results, and verification of reasoning steps. Experimental results show that our fine-tuned model achieves substantial improvements on these tasks over current LLMs. Notably, our fine-tuned model achieves a relative improvement of 47% to 74% in pass@1 success rate compared to the strongest baseline.

Formal Counterexample Generation

The counterexample problem arises in disproving a universal mathematical conjecture of the form ∀x,P(x)\forall x, P(x). By identifying a counterexample x∗x^*, the conjecture can be invalidated through its negation ∃x∗,¬P(x)\exists x^*, \neg P(x), which is established by proving the instantiated negation ¬P(x∗)\neg P(x^*). A classic example is the conjecture “all continuous functions are differentiable.” To refute this claim, one must demonstrate the existence of a function that is continuous but non-differentiable, e.g., the absolute value function f(x)=∣x∣f(x) = |x|. Recently, automated mathematical research and knowledge discovery have garnered increasing attention [11, 54, 43].

As a result, the counterexample generation, as a specific yet crucial step in judging the correctness and completeness of newly proposed statements, has also evolved from being merely an incremental improvement to becoming pivotal in shaping the future of mathematical inquiry.

There are several symbolic tools designed for finding counterexamples to conjectures, such as nitpick in Isabelle [10] and plausible in Lean 4 [34]. They often rely on sophisticated software engineering techniques like random testing or SAT/SMT solving [9, 2]. Nonetheless, mathematics is fundamentally different from program proving, and the inherent complexity of higher-order logic hinders the effectiveness of these tools in both formulating problems and generating solutions. A promising alternative lies in LLM-based counterexample generation. LLMs offer substantial expressiveness and strong reasoning capabilities, albeit with some sacrifice in soundness compared to symbolic tools.

In addition to using LLM-based counterexample generation as a powerful tool for examining mathematical conjectures, training LLMs to generate counterexamples offers a new perspective for boosting the LLM’s reasoning capabilities. Unlike traditional mathematical proofs that are typically derived through logical deduction, aligning well with existing chain-of-thought models [67, 15], counterexample generation involves a guess-and-check paradigm [77, 50]; the LLM first proposes a potential counterexample and then verifies its validity.

Formal counterexample generation aims to establish a two-stage, informal-to-formal process. As illustrated in Figure 2, given a formal problem, the LLM is first prompted to find a counterexample through informal reasoning. It then produces a formal proof for the theorem based on this derived counterexample. Finally, the validity of the proposed counterexample is confirmed if its corresponding formal proof is successfully verified by the Lean 4 theorem prover [17].

Figure 2. Task of formal counterexample generation. This task requires the LLM first to perform informal reasoning to identify a valid counterexample for the given problem, and then generate the corresponding formal proof, which is automatically verified by theorem provers (e.g., Lean 4).

This approach differs from other informal-to-formal reasoning methods, which mainly focus on creating an informal sketch followed by its formalization and completion [28, 51, 12]. In those methods, informal and formal reasoning are consistent and congruous with one another. In contrast, formal counterexample generation necessitates a sequential pattern of informal-to-formal reasoning. Specifically, the initial natural language reasoning serves as a counterexample proposal, transforming the abstract challenge of proving an existential statement into the more concrete task of formally verifying a specific instance.

Nevertheless, both stages of formal counterexample generation pose distinct challenges for current LLMs. The “guess” phase requires models to propose effective counterexamples by analyzing various edge scenarios, including corner cases and limit values. This particular capability remains an undeveloped aspect of their training [36]. In the “check” phase, LLMs generate formal proofs, an endeavor complicated by the scarcity of training data for existential theorems [76], which significantly hinders the models’ performance. By addressing these challenges, counterexample generation can become a powerful tool to enhance the reasoning capabilities of LLMs and assist mathematicians in verifying conjectures.

The Proposed Framework

Our proposed approach consists of two stages: (1) counterexample problem synthesis and (2) multi-reward guided training. The first stage is devoted to creating a large-sized unlabeled dataset, i.e., the counterexample problem without a ground-truth answer and a formal proof. In the second stage, we carry out the expert iteration, where the LLM repeatedly generates counterexamples and formal proofs and then is fine-tuned on the successful ones. We will outline each stage as follows.

Counterexample Problem Synthesis

We first collect a substantial number of formal theorems to serve as foundational seeds. These seed theorems must meet two criteria: they should be (1) formally provable and (2) expressed in a universal format (e.g., ∀x\forall x). In addition to sourcing these from existing Lean 4 formal libraries, like Mathlib, we extract intermediate subgoals or lemmas from formal proofs generated by LLMs. Specifically, given a formal proof, we decompose it into a series of proof steps, and categorize each proof step by its proving style. If a proof step is stated in declarative style (i.e., using have or suffices tactic), we directly transform it into a new theorem. Conversely, for a proof step stated in a procedural style (using tactics such as simp and rw), we analyze and compare the proof states before and after applying such a tactic to establish a new theorem.

Next, we design a mutation-based data synthesis method. To elaborate, let us start with a formally provable, universally stated theorem, which can be represented as

theorem original_version (x : X) : H₁ x → H₂ x → C x

Here, H1H_1 and H2H_2 are two hypotheses, and CC is the conclusion. This theorem asserts that for any element xx in the space XX, if both H1(x)H_1(x) and H2(x)H_2(x) hold true, then C(x)C(x) follows.

Discarding one of the hypotheses (for example, H1(x)H_1(x)) yields the universally quantified conjecture ∀x:X, H2(x)→C(x)\forall x : X,\ H_2(x) \to C(x). If H1H_1 is essential to the validity of the original theorem, this conjecture is false. Its negation is classically equivalent to ∃x:X, H2(x)∧¬C(x)\exists x : X,\ H_2(x) \land\neg C(x): a counterexample must satisfy the retained hypothesis and falsify the conclusion. We formalize this counterexample target as

theorem mutated_version : ∃ x : X, H₂ x ∧ ¬ C x

Before mutation, we use Lean 4 to identify and remove hypotheses unused in the original proof ([35]). This is a heuristic filter: a hypothesis used in a particular proof need not be logically necessary for the theorem. Mutation therefore does not guarantee that the resulting conjecture is false or that a counterexample exists. A generated target is confirmed satisfiable only when a witness is verified. Compared with LLM-based problem augmentation ([64, 78, 25]), this symbolic strategy provides a scalable way to generate candidate counterexample problems for training.

Multi-reward Guided Training

We follow the standard expert iteration pipeline ([3]) to train the LLMs with unlabeled data. In this framework, the model is repeatedly applied to perform large-scale inference on counterexample problems, from which candidate solutions and formal proofs are collected. The correct ones are then used to further refine the model through supervised fine-tuning. A key limitation, noted in prior work, is that LLMs often fail to produce correct results on difficult problems ([48, 70, 18]), restricting training to a cycle of generating and fine-tuning only on simpler examples. This issue is essentially the sparse reward problem in classic reinforcement learning ([23, 53]), commonly alleviated through techniques such as reward shaping ([33]) or curriculum learning ([8]).

Rather than adopting these conventional approaches, we propose using a multi-reward strategy to effectively address this limitation. A witness x∗x^* for the counterexample target ∃x,H2(x)∧¬C(x)\exists x, H_2(x) \land\neg C(x) must also satisfy ¬H1(x∗)\neg H_1(x^*): otherwise, the original theorem and H2(x∗)H_2(x^*) would imply C(x∗)C(x^*), a contradiction. This leads to the formation of a new theorem

theorem dropped_hypothesis : ∃ x : X, ¬ H₁ x

To score a candidate x∗x^*, the LLM is prompted to prove dropped_hypothesis and mutated_version using that candidate as the witness. These proofs are subsequently verified by the theorem prover, which yields two distinct rewards for the counterexample. When the generated proofs use the proposed witness, the auxiliary reward corresponds to proving ¬H1(x∗)\neg H_1(x^*), while the main reward corresponds to proving H2(x∗)∧¬C(x∗)H_2(x^*) \land\neg C(x^*). The auxiliary condition alone does not establish a counterexample. Although the prompts request the same proposed witness, verifying a proof of an existential target alone does not guarantee that the proof uses that witness. This is a limitation of the feedback mechanism, discussed further under limited model capability in the Limitations section. The auxiliary target can provide a training signal when its proof succeeds even if the main target remains unsolved; it does not guarantee a nonzero reward or a valid counterexample. Ultimately, we combine these two rewards as the final sample weight for the supervised fine-tuning.

Additionally, we include the training of LLMs for generating formal proofs of counterexamples in the expert iteration. Besides collecting the formal proof of mutated_version, the formal proof of dropped_hypothesis can also be used for fine-tuning. However, since formally proving the necessary condition is often easier, the model might fall into a low-difficulty trap, frequently generating shorter proofs. To mitigate this, the sample weight of the auxiliary proof should be reduced, and other techniques, e.g., group relative policy optimization (GRPO) [56], can also be employed to encourage the generation of longer formal proofs.

Overall Framework

Formally, let us define the seed dataset as {Ti}i=1N\{\mathcal{T}_i\}_{i=1}^{N}, where Ti\mathcal{T}_i stands for a seed theorem. For every theorem Ti\mathcal{T}_i, mutation yields the counterexample target Mi\mathcal{M}_i and the auxiliary target Hi\mathcal{H}_i expressing the negation of the dropped hypothesis. We introduce two LLMs, represented as qϕq_\phi and qψq_\psi, for generating counterexamples and formal proofs, respectively. For a given counterexample problem Mi\mathcal{M}_i, we first prompt the LLM to propose a counterexample xi∼qϕ(xi∣Mi)x_i \sim q_\phi(x_i \mid\mathcal{M}_i). Next, the formal proof πiM\pi_i^{M} is constructed by integrating the problem and the proposed counterexample, i.e., πiM∼qψ(πiM∣Mi,xi)\pi_i^{M} \sim q_\psi(\pi_i^{M} \mid\mathcal{M}_i, x_i). In addition, the LLM provides the formal proof πiH\pi_i^{H} for the auxiliary target, given by πiH∼qψ(πiH∣Hi,xi)\pi_i^{H} \sim q_\psi(\pi_i^{H} \mid\mathcal{H}_i, x_i).

We utilize the indicator function I(⋅)\mathbb{I}(\cdot) to signify the theorem prover’s verification. Through verifying the two formal proofs πiM\pi_i^{M} and πiH\pi_i^{H}, we establish the combined reward for the counterexample xix_i as ri:=riM+riHr_i := r_i^{M} + r_i^{H}, where riM:=αI(πiM)r_i^{M} := \alpha\mathbb{I}(\pi_i^{M}), riH:=(1−α)I(πiH)r_i^{H} := (1-\alpha)\mathbb{I}(\pi_i^{H}), and α∈[0,1]\alpha\in[0,1] is a trade-off coefficient. Then, the supervised fine-tuning of counterexample generation is conducted on the weighted dataset {(Mi,xi;ri)}i=1N\{(\mathcal{M}_i,x_i;r_i)\}_{i=1}^{N}. We continue to use these two rewards as the weights for the supervised fine-tuning of formal proof generation. The corresponding weighted dataset is derived from the formal proofs of two theorems and structured as {((Mi,xi),πiM;riM)}i=1N∪{((Hi,xi),πiH;riH)}i=1N\{((\mathcal{M}_i,x_i),\pi_i^{M};r_i^{M})\}_{i=1}^{N} \cup\{((\mathcal{H}_i,x_i),\pi_i^{H};r_i^{H})\}_{i=1}^{N}.

The overall framework is accordingly summarized in Algorithm 1.

Experiments

This section presents the experimental results. Specifically, our study aims to address the following research questions (RQs):

  • RQ1 (Efficacy and efficiency of data mutation): What is the success rate and time consumption of data mutation for generating new theorems from a single seed theorem?

  • RQ2 (Efficacy and efficiency of multi-reward training): Compared to single-reward training, does multi-reward training improve the performance and training efficiency?

  • RQ3 (Performance improvement of integrated workflow): Compared with baselines, does our proposed framework achieve better performance in generating formal counterexamples?

Algorithm 1 The Integrated Workflow of Data Mutation and Multi-Reward Training

Input: A seed dataset {Ti}i=1N\{T_i\}_{i=1}^{N}, with each formally provable and expressed in a universal format. Output: Two LLMs, qϕq_{\phi} and qψq_{\psi}, for generating counterexamples and formal proofs.

  1. Phase 1: Dataset Mutation

  2. for i=1,…,Ni = 1, \ldots, N do

  3. Mutate TiT_i, collecting the counterexample target MiM_i and the auxiliary target HiH_i.

  4. end for

  5. Phase 2: Expert Iteration

  6. for k=1,…k = 1, \ldots do

  7. Step 2.1: Large-scale Inference and Verification

  8. for i=1,…,Ni = 1, \ldots, N do

  9. Generate a counterexample xix_i using qϕq_{\phi}: xi∼qϕ(xi∣Mi)x_i \sim q_{\phi}(x_i \mid M_i).

  10. Generate formal proofs for the counterexample and auxiliary targets:

  11. πiM∼qψ(πiM∣Mi,xi)\pi_i^M \sim q_{\psi}(\pi_i^M \mid M_i, x_i) and πiH∼qψ(πiH∣Hi,xi)\pi_i^H \sim q_{\psi}(\pi_i^H \mid H_i, x_i).

  12. Compute rewards based on proof correctness:

  13. riM:=α⋅I(Verify⁡(πiM))r_i^M := \alpha\cdot\mathbb{I}(\operatorname{Verify}(\pi_i^M)), riH:=(1−α)⋅I(Verify⁡(πiH))r_i^H := (1-\alpha) \cdot\mathbb{I}(\operatorname{Verify}(\pi_i^H)), and ri:=riM+riHr_i := r_i^M + r_i^H.

  14. end for

  15. Step 2.2: Supervised Model Fine-tuning

  16. Update the model qϕq_{\phi} based on the weighted dataset {(Mi,xi;ri)}i=1N\{(M_i, x_i; r_i)\}_{i=1}^{N}.

  17. Update the model qψq_{\psi} on the dataset {((Mi,xi),πiM;riM)}i=1N∪{((Hi,xi),πiH;riH)}i=1N\{((M_i, x_i), \pi_i^M; r_i^M)\}_{i=1}^{N} \cup\{((H_i, x_i), \pi_i^H; r_i^H)\}_{i=1}^{N}.

  18. end for

All experiments were conducted on a Linux server featuring two AMD EPYC 7C13 64-core processors equipped with eight high-end GPUs. The code, together with the experimental data, is available at https://figshare.com/s/02e05a2c2945ee10dcc4.

RQ1: Efficacy and Efficiency of Data Mutation

Leveraging the proposed mutation strategy, we can curate a substantial number of counterexample problems as training materials for LLMs. To obtain the seed theorems, we aggregated all theorems and lemmas from the Lean 4 formal library Mathlib (mathlib Community, 2020) and the popular formal dataset Leanworkbook ([76]). We also extracted intermediate subgoals or lemmas from formal proofs generated by LLMs (Goedel prover v2 ([39]) and DSP+ ([12])) on the MiniF2F ([84]) and PutnamBench ([58]). These four data sources originate from diverse mathematical domains and varying levels of difficulty. Mathlib encompasses a broad spectrum of mathematical concepts and foundational lemmas, while Leanworkbook comprises formalized content from approximately ten distinct categories (e.g., algebra, number theory, combinatorics). MiniF2F and PutnamBench focus on competition-level problems, with the former targeting high-school-level challenges and the latter undergraduate-level tasks, potentially involving more complex concepts.

We implemented a Lean 4 tactic, mutate, to perform the symbolic mutation. Before applying it, we utilized the Lean 4 theorem prover to analyze the formal proof of the seed theorem, identifying and eliminating hypotheses unused in that proof. Following the execution of the mutate operator, the theorem prover was invoked again to ensure the grammatical correctness of the newly generated problem.

The results of the mutation process on the four data sources are presented in Table 1. In total, we collected approximately 575K candidate counterexample problems, which constitute a sufficiently large dataset to support LLM fine-tuning. The efficacy and efficiency of the mutation procedure are illustrated in Figure 3. The proposed method yields a mutation ratio in the approximate range of 1.6–2.5, while the average execution time per seed theorem remains between 0.3 and 0.71 seconds. Note that the execution time on Mathlib is comparatively lower because this formal library is pre-compiled.

Source# of seed theorems# of mutated problems
Mathlib43,99088,217
Leanworkbook17,06142,480
MiniF2F48,41594,215
PutnamBench212,463350,127
Total321,929575,039

Table 1. Overall results of data mutation. Applied to a set of seed theorems, our mutation method generates a diverse collection of candidate counterexample problems.

Figure 3. Results of mutation ratio and average execution time. Evaluated across multiple data sources, our method maintains a high mutation ratio while remaining computationally efficient.

RQ2: Efficacy and efficiency of multi-reward training

To evaluate the proposed multi-reward training, we conducted an ablation study by comparing training with and without the multi-reward function. To elaborate, we selected Qwen3 8B as the base model (Qwen Team, [49]) for informal reasoning, which is responsible for proposing counterexamples, and DeepSeek-Prover-v2 7B (Ren et al., [51]) as the base model for formal reasoning, which generates proofs for the proposed counterexamples. Both models were trained under the framework described in Algorithm 1, with the sole difference between the single-reward and multi-reward settings being the choice of coefficient α\alpha. In the single-reward setting, α\alpha was fixed at 1.0, whereas in the multi-reward setting, it was set to 0.8 to ensure that both rewards contribute effectively. We also adapted Dr.GRPO (Liu et al., [40]), a normalized variant of GRPO, to regulate proof length, thereby preventing proofs from being excessively short (overfitting) or unnecessarily long (overthinking).

From the collected dataset of 575K instances, we reserved 3K for validation. Due to limited computational resources, training was limited to 56 iterations with a batch size of 10K. In each iteration, large-scale inference and verification were conducted, after which both models were updated accordingly.

We compute pass@kk rates for k=1,4,9k = 1, 4, 9 on the validation set and plot the pass@kk rate curves in Figure 4. Compared with the single-reward training, the multi-reward approach achieves both faster convergence and higher final performance. Specifically, at convergence, multi-reward training reaches approximately 49%, 52%, and 54% for pass@1, pass@4, and pass@9, respectively, whereas the single-reward baseline attains only 43%, 46%, and 47%. For reference, we also report the pass@kk results of existing LLM-based theorem provers in Appendix § 18.

Figure 4. Pass@kk (k=1,4,9k = 1, 4, 9) rate curves on the validation set. Compared with the single-reward baseline, multi-reward training converges faster and yields superior final performance.

RQ3: Performance improvement of integrated workflow

We establish three tasks to evaluate our fine-tuned model: the identification of counterexamples, as well as the verification of autoformalized results and reasoning steps. For the counterexample identification, we employ Kimina-Autoformalizer 7B (Wang et al., [62]) to formalize CounterMath (Li et al., [36]), which is constructed from four classic counterexample textbooks. This yields 1,058 formal counterexample problems, forming our benchmark (denoted as For-COUNTER). Furthermore, we assess the effectiveness of counterexample generation by identifying potential errors in the formalization of correct theorems and in the reasoning steps of proving theorems. Therefore, we construct VERI-FORMALIZE, which comprises 3K unprovable problems generated by formalizing FormalMath [79], and another 3K dataset VERI-REASON obtained when applying DSP+ [12] to solve the problems from FormalMath.

The pass@kk (k=1,4,9k = 1, 4, 9) results are summarized in Table 2. Instead of reporting pass@kk rates, we present the absolute number of correctly solved problems, since the established benchmark contains inaccuracies. The results show that the model fine-tuned with our framework substantially outperforms existing state-of-the-art LLMs. Overall, open-source neural provers demonstrate stronger performance than general-purpose LLMs. Our fine-tuned model further advances the state of the art: for pass@1, it solves 95, 69, and 63 more problems than the strongest baseline across the three benchmarks. Similar gains are observed for pass@4 and pass@9, further confirming the superiority of our model. We also conduct an ablation study in Appendix § 18 to evaluate the contribution of each component (i.e., informal and formal reasoning models).

Table 2: Numbers of solved problems on three counterexample-generation tasks under pass@kk (k=1,4,9k = 1, 4, 9). Relative percentage improvements in the Δ\Delta row are rounded down to the nearest integer. Our fine-tuned model achieves the best performance on all three benchmarks and all three kk values, outperforming both general-purpose LLMs and open-source neural theorem provers.

DatasetFOR-COUNTERVERI-REASONVERI-FORMALIZE
✓\checkmark@1✓\checkmark@4✓\checkmark@9✓\checkmark@1✓\checkmark@4✓\checkmark@9✓\checkmark@1✓\checkmark@4✓\checkmark@9
GENERAL-PURPOSE LLMS
Gemini-2.5-Flash21668259152813
Grok-3-mini3074101410192819
GPT-4.1-mini196510354971503187137
Deepseek-R16113515851751052772102
OPEN-SOURCED NEURAL PROVERS
Leanabell-prover106159181144210231111198228
STP-prover10115717913115117099150171
Kimina-prover-distill311091656611415618141249
Goedel-prover-v2891772158814720063165201
Deepseek-prover-v212720022414420323469135186
Ours222274302213260295174255313
Δ\Delta957478695061635764
74%↑74\%\uparrow37%↑37\%\uparrow34%↑34\%\uparrow47%↑47\%\uparrow23%↑23\%\uparrow26%↑26\%\uparrow56%↑56\%\uparrow28%↑28\%\uparrow25%↑25\%\uparrow

Table 2. Numbers of solved problems on three counterexample-generation tasks under pass@kk (k=1,4,9k = 1, 4, 9). Relative percentage improvements in the Δ\Delta row are rounded down to the nearest integer. Our fine-tuned model achieves the best performance on all three benchmarks and all three kk values, outperforming both general-purpose LLMs and open-source neural theorem provers.

Related Work

Formal counterexample generation is generally related to LLM-based counterexample generation and formal reasoning (a.k.a neural theorem proving). We provide a brief overview of related work in these directions and highlight the connections and differences between our work and theirs.

LLM-based Counterexample Generation

Counterexample finding is essential for both advancing mathematical research and strengthening the reasoning capabilities of LLMs. Despite its importance, there has been relatively little work on incorporating counterexample generation and AI techniques. Early attempts (Wagner, 2021; Gheb­leh et al., 2024a;b; Roucairol & Cazenave, 2022; Vito & Stefanus, 2023) employed reinforcement learning and Monte Carlo tree search to identify counterexamples in combinatorics and graph theory, later extending this line of work with transformer-based models to improve search performance [13]. More recently, some studies have begun to explore the potential of LLMs in proposing counterexamples. For example, CounterMath [36] introduced a benchmark in this direction, demonstrating that current LLMs still face significant challenges. However, this benchmark is established purely in natural language, making it difficult to rigorously verify the correctness of counterexample candidates. MathConstruct [5], by contrast, evaluates constructive proof generation and integrates symbolic methods for validation. Compared with our work, it is confined to competition-level problems, whereas our work grounds the task in Lean 4 formal language and focuses on undergraduate-level settings.

LLM-based Formal Reasoning

The mathematical reasoning capability of LLMs is widely regarded as a key indicator of their overall intelligence [1, 4, 45]. Formal reasoning requires an LLM to express its thought process in a formal language, with theorem provers verifying each step [74, 37]. Leveraging advanced techniques such as autoformalization [69], premise retrieval [73], library learning [61], and proof search [31], LLM-based formal reasoning has achieved remarkable progress [26, 12, 51, 39], culminating in silver-medal level performance at the 2025 International Mathematical Olympiad [14].

However, to the best of our knowledge, systematic investigations into the formal proof of counterexample problems remain extremely limited. Although some methods involve disproving the newly collected theorem when it cannot be successfully proved [29, 39, 51], the majority of available data do not fall into this category. As a result, existing LLM-based theorem provers perform poorly on counterexample-guided formal reasoning. Our work explicitly targets this gap by synthesizing counterexample problems and fine-tuning the LLMs. Additionally, our work follows the informal-to-formal paradigm for formal proof generation. Different from prior approaches that tightly align informal and formal reasoning [27], we adopt a sequential scheme: the LLM first engages in informal reasoning to search for counterexamples, while formal reasoning is employed to verify the validity of the candidate results through proof.

Formal Data Synthesis

Data plays a crucial role in enhancing the reasoning capability of LLMs [81, 74, 19]. Beyond manual collection and annotation, formal data synthesis methods are typically categorized into two categories: neural and symbolic. Neural methods employ LLMs to either autoformalize existing informal problems or directly generate formal ones. For instance, Minimo [47] and STP [18] use an LLM conjecturer to propose new theorems, while DeepSeek-Prover [72], Kimi-Prover [62], and GoedeI [38] fine-tune autoformalization models to translate math competition problems into Lean theorems. Symbolic methods often employ a precise and controllable mutation mechanism to ensure the validity of the generated problems. MetaGen [65] mutates Metamath theorems via substitution, and works such as LeanNavigator [75] and Alchemy [68] extend this to Lean 4 by applying tactics like apply or rw. Although broadly applicable, these operators often fail to produce sufficiently hard problems. Thus, some focus on domain-specific strategies, e.g., geometry [57], inequalities [66], or TCS [83], yielding stronger training performance.

Our proposed method falls into the second category; we target the counterexample problem, devise a dedicated mutation strategy, and implement it as a new Lean 4 tactic. This generates syntactically valid candidate problems and can be applied to neural-generated theorems as well; the existence of a counterexample still requires verification. Based on the mutation strategy, we further design a multi-reward function compatible with popular reinforcement learning methods like GRPO [56] and its variants [82].

Limitations

While our proposed framework demonstrates strong potential in counterexample search and formal proof generation, several directions remain for further improvement and extension.

Data quality of synthetic data. Compared with manually collecting and labeling problems and solutions, symbolic mutation can generate large volumes of data at extremely low cost. However, data quality remains an extensive concern, as the generated data often lacks careful selection. This results in the downgrade of training efficiency. For instance, as shown in our training curves Figure 4, LLM fine-tuning converges within roughly half an epoch, suggesting that a substantial portion of the generated data is redundant. Although prior studies have explored methods to improve synthetic data quality [42, 71, 63], effectively incorporating these techniques into formal counterexample generation remains an open challenge.

Limited budget of model training. We provide additional case studies in Appendix § 19, which demonstrate that the limited capability (or size) of the LLM significantly compromises the performance of our framework. First, the 8B informal reasoning model frequently fails to produce correct results, even for simple calculations. Employing a larger model or incorporating tool-use strategies could help alleviate this issue. Second, the 7B formal reasoning model often struggles to follow instructions and fails to utilize the provided counterexamples when deriving formal proofs. This leads to inaccurate feedback rewards that undermine overall performance. While these limitations could likely be mitigated by using larger LLMs, resource constraints prevent us from exploring this direction at present. We leave it for future work and further investigation.

Conclusion

In this work, we investigated the crucial yet largely underexplored problem of formal counterexample generation with reasoning large language models. We identified and discussed two key challenges, data scarcity and sparse reward signals, that hinder the development of models specialized for this task. To address these issues, we introduced an integrated framework that combines a symbolic mutation strategy for large-scale counterexample synthesis with a multi-reward scheme for more effective and efficient model training. Experiments on three newly constructed benchmarks demonstrate that our approach substantially outperforms existing state-of-the-art LLMs in counterexample generation. We believe that our proposed framework opens up a promising direction for enhancing the self-reflective and self-corrective reasoning capabilities of LLMs, while also providing a practical copilot for validating mathematical conjectures.

Acknowledgments

We thank Terry Ding for pointing out an error in our formulation of the counterexample target.

Ethics Statement

This work focuses on formal counterexample generation and does not involve human subjects or sensitive data. The datasets employed are publicly available and widely used in prior research. We do not anticipate any ethical concerns or harmful applications arising from this study.

Reproducibility Statement

We provide detailed descriptions of the training and inference setup in the main text (§ 4) and Appendix § 17. All datasets and preprocessing steps are thoroughly documented. Source code is available at https://doi.org/10.6084/m9.figshare.31741879 to ensure full reproducibility.

Usage of LLMs in Paper Writing

We used GPT-4o solely for grammar checking and minor language polishing. The LLM was not involved in research ideation, data analysis, or substantive writing. The authors take full responsibility for the content of this paper.

Illustrative Examples

We further illustrate our framework using a concrete example in Figure 5. Starting from the original theorem aimeII_2001_p3_g4_extracted_54, we discard h5:x13≠420h_5 : x_{13} \ne420. The counterexample target aimeII_2001_p3_mut_54_drop4 retains the recurrence and the values of x(10),x(11),x(12)x(10), x(11), x(12), but negates the conclusion to require x(14)=523x(14) = 523. The auxiliary target aimeII_2001_p3_54_drop4 negates the dropped hypothesis to require x(13)=420x(13) = 420. Figure 5 gives a single witness satisfying both targets.

Figure 5. A corrected mathematical illustration of our counterexample training framework. The seed theorem is an intermediate subgoal extracted from DSP+’s proof of AIME-II 2001 Problem 3 in miniF2F. The witness is an explicit construction, not a recorded model response.

Experimental Setting

In our expert iteration framework, we employ two LLMs; Qwen3 8B (Qwen Team [49]) for generating candidate counterexamples and Deepseek-Prover-V2 7B (Ren et al. [51]) for producing formal proofs. We fix the maximum generation length to 4,096 tokens and set the sampling temperature to 0.9 for both models. For weighted training, we adapt LLaMA-Factory (Zheng et al. [85]), using its default configuration (Adam optimizer (Kingma [30]) with a learning rate of 1e−51\mathrm{e}{-5} and cosine learning rate schedule). Following prior work ([18, 39]), we perform an additional re-training step on the collected dataset paired with verified correct answers.

During evaluation, for each problem, we prompt Qwen3 to generate three counterexample candidates, and for each candidate, Deepseek-Prover-V2 produces three corresponding formal proofs. For verification, we employ lean-repl with a 60-second timeout and an 8GB memory limit per proof.

Regarding the prompt setting, for the baseline methods, we adopt the official prompt templates provided in their respective repositories. In our method, the prompts are designed for Qwen3 and Deepseek-Prover-V2, and are detailed in the following.

Prompt of Informal Reasoning for Counterexample Search

Find a concrete example to prove the following existential problem. Note that:

  1. Please reason the problem and give the final answer in Natural Language.

  2. The final answer should be in the format \boxed{{...}}. The problem is: {formal_statement}

Prompts of Formal Reasoning for Proof Generation

Complete the following Lean 4 code using the given concrete example {example}:

{header}
{formal_statement}

Additional Results

Table 3: Pass@kk (k=1,4,9k = 1, 4, 9) rates on the validation set. The results demonstrate that our framework enables the fine-tuned model to substantially outperform baselines.

ModelLeanabellSTPKimina-distillGoedel-v2Deepseek-v2OursΔ\Delta (pp)
✓@125.4%23.7%9.8%14.0%14.1%49.8%24.4↑
✓@436.0%33.2%25.3%31.1%30.0%52.7%16.7↑
✓@939.9%37.5%35.8%38.2%36.2%54.1%14.2↑

Table 3. Pass@kk (k=1,4,9k = 1, 4, 9) rates on the validation set. The results demonstrate that our framework enables the fine-tuned model to substantially outperform baselines.

We also evaluate the performance of our fine-tuned model against existing neural theorem provers on the split-out validation set. As shown in Table 3, the fine-tuned model substantially outperforms the existing approaches by a large margin (14.2 to 24.4 percentage points). This improvement can be attributed to our synthesized dataset and the effectiveness of multi-reward training.

We plot the pass@kk curves in Figure 6 to explain why we select only k=1,4,9k = 1, 4, 9 in our empirical evaluation. The results show that the performance of the five existing neural theorem provers nearly converges once kk approaches 10. Therefore, using k=1,4,9k = 1, 4, 9 is sufficient to capture the performance differences in our comparison.

Figure 6. Pass@kk curves of five neural theorem provers. The results are derived from the evaluation of FOR-COUNTER and show that the performance nearly converges when k=10k = 10.

We conduct an ablation study to evaluate the contribution of each component to the overall performance. Specifically, our method first employs the fine-tuned Qwen3 to propose a candidate counterexample, and then leverages Deepseek-prover-v2 (denoted as Ds-prv-v2) to generate the formal proof based on this counterexample. To examine the necessity and effectiveness of each component, we replace the fine-tuned Qwen3 with its original version, and Ds-prv-v2 with its original version, respectively. We also include the evaluation results for the combination of the original Qwen3 and the original Ds-prv-v2 as a reference.

The overall results are presented in Table 4. They demonstrate that fine-tuning both modules contributes to performance, and combining our two fine-tuned models yields the best performance. Compared to the gains from fine-tuning the formal reasoning model, the improvements from fine-tuning the informal reasoning model are relatively marginal. We therefore conduct case studies in the next section to analyze the underlying reasons.

ModelPass@kkQwen3 ×\times Ds-prv-v2Ours ×\times Ds-prv-v2Qwen3 ×\times OursOurs
Validation Set✓ @126.2%30.9%47.2%49.8%
Validation Set✓ @436.2%38.7%50.3%52.7%
Validation Set✓ @940.4%43.7%51.0%54.1%
FOR-COUNTER✓ @114.1%15.2%19.1%20.9%
FOR-COUNTER✓ @418.9%20.1%24.3%25.8%
FOR-COUNTER✓ @921.0%21.5%27.7%28.5%

Table 4. Pass@kk (k=1,4,9k = 1, 4, 9) rates for different module combinations. Results evaluated on the validation set and FOR-COUNTER show that both modules (informal reasoning and formal reasoning models) are successfully improved by fine-tuning with our framework.

Case Studies

We revisit the validation-set seed theorem used in Figure 5. We first state the corrected counterexample target, then review the earlier draft’s model-output excerpts and their limitations. The original theorem, as well as its corresponding proof, is shown below.

theorem aimeII_2001_p3_g4_extracted_54
  (x : ℕ → ℤ)
  (h₁ : ∀ n ≥ 5, x n = x (n - 1) - x (n - 2) + x (n - 3) - x (n - 4))
  (h₂ : x 10 = -267)
  (h₃ : x 11 = 211)
  (h₄ : x 12 = 375)
  (h₅ : x 13 ≠ 420) :
  x 14 ≠ 523 := by
  have h₆ : x 13 = x 12 - x 11 + x 10 - x 9 := by
    rw [h₁ 13 (by omega)]
  have h₇ : x 14 = x 13 - x 12 + x 11 - x 10 := by
    rw [h₁ 14 (by omega)]
  rw [h₇]
  rw [h₂, h₃, h₄]
  simp
  intro h
  have : x 13 = 420 := by
    linarith
  exact h₅ this

Dropping the last hypothesis h₅ : x 13 ≠ 420 and negating the remaining universal conjecture gives the following counterexample target. The original conclusion above remains unchanged.

theorem aimeII_2001_p3_mut_54_drop4 :
  ∃ (x : ℕ → ℤ),
    (∀ n ≥ 5, x n = x (n - 1) - x (n - 2) + x (n - 3) - x (n - 4))
    ∧ x 10 = -267 ∧ x 11 = 211 ∧ x 12 = 375 ∧ x 14 = 523 := by
  sorry

A concrete witness is the period-10 integer sequence x(n)=vn mod 10x(n) = v_n \bmod10 with

v=(−267,211,375,420,523,267,−211,−375,−420,−523).v = (-267, 211, 375, 420, 523, 267, -211, -375, -420, -523).

Checking the ten residue classes verifies the recurrence. This gives x(10)=−267x(10) = -267, x(11)=211x(11) = 211, x(12)=375x(12) = 375, x(13)=420x(13) = 420, and x(14)=523x(14) = 523, satisfying both the counterexample and auxiliary targets.

Earlier model-output excerpts. The prompts and responses below are retained from the earlier draft. Their displayed target incorrectly used x(14)≠523x(14) \ne523, so they must not be read as verified runs on the corrected target. These excerpts illustrate arithmetic and instruction-following errors; they do not establish performance on the corrected target. We preserve their formulas verbatim to distinguish recorded text from the corrected construction above.

Earlier Informal Prompt (Incorrect Target)

Find a concrete example to prove the following existential problem. Note that:

  1. Please reason the problem and give the final answer in Natural Language.

  2. The final answer should be in the format \boxed{{...}}. The problem is:

theorem aimeII_2001_p3_mut_54_drop4 :
  ∃ (x : ℕ → ℤ),
    (∀ n ≥ 5, x n = x (n - 1) - x (n - 2) + x (n - 3) - x (n - 4))
    ∧ x 10 = -267 ∧ x 11 = 211 ∧ x 12 = 375 ∧ x 14 ≠ 523 := by
  sorry

Response of Informal Reasoning Model (Incorrect)

We are given the recurrence relation

x(n)=x(n−1)−x(n−2)+x(n−3)−x(n−4),n≥5x(n) = x(n - 1) - x(n - 2) + x(n - 3) - x(n - 4), \quad n \ge5

together with the constraints

x(10)=−267,x(11)=211,x(12)=375,x(14)≠523.x(10) = -267,\quad x(11) = 211,\quad x(12) = 375,\quad x(14) \ne523.

Step 1. Characteristic polynomial. The recurrence has characteristic equation

r4−r3+r2−r=r(r−1)(r2+1)=0,r^4 - r^3 + r^2 - r = r(r - 1)(r^2 + 1) = 0,

with roots 0,1,i,−i0,1,i,-i. Thus the general solution is

x(n)=A+Cin+D(−i)n.x(n) = A + C i^n + D(-i)^n.

Step 2. Apply conditions. For n=10,11,12n = 10, 11, 12 we compute:

x(10)=A−C+D=−267,x(11)=A−iC−D=211,x(12)=A+C+D=375.\begin{aligned} x(10) &= A - C + D = -267,\\ x(11) &= A - iC - D = 211,\\ x(12) &= A + C + D = 375. \end{aligned}

From the first and third equations: 2C=642⇒C=3212C = 642 \Rightarrow C = 321, and A+D=54A + D = 54. Substituting into the second gives

D=−157+321i2,A=54−D=54+157+321i2.D = -\frac{157+321i}{2},\qquad A = 54 - D = 54 + \frac{157+321i}{2}.

Step 3. Check x(14)x(14). Since i14=−1i^{14} = -1 and (−i)14=−1(-i)^{14} = -1,

x(14)=A−C−D=(A+D)−C−2D=−267−2D.x(14) = A - C - D = (A + D) - C - 2D = -267 - 2D.

Plugging in DD yields

x(14)=−110+321i,x(14) = -110 + 321i,

which is not a real number and in particular ≠523\ne523. Conclusion. A valid function xx exists. One explicit example is

x(n)=(54+157+321i2)+321in−157+321i2(−i)n.x(n) = \left(54 + \frac{157+321i}{2}\right) + 321i^n - \frac{157+321i}{2}(-i)^n.

This satisfies the recurrence, the given values, and x(14)≠523x(14) \ne523.

This response is incorrect: the required sequence is integer-valued, and the characteristic polynomial of the stated recurrence is r4−r3+r2−r+1r^4-r^3+r^2-r+1, not the polynomial in the excerpt. The next response satisfies the earlier, incorrectly stated target, but it is not a counterexample to the conjecture we intend to refute.

Earlier Informal Response (Previously Mislabeled Correct)

We can explicitly construct such a sequence by fixing the first four values and then extending by the recurrence. Define

x(1)=211,x(2)=375,x(3)=−103,x(4)=0,x(1) = 211,\quad x(2) = 375,\quad x(3) = -103,\quad x(4) = 0,

and for all n≥5n \ge5 set

x(n)=x(n−1)−x(n−2)+x(n−3)−x(n−4).x(n) = x(n-1) - x(n-2) + x(n-3) - x(n-4).

Step 1. Compute terms. Applying the recurrence successively:

x(5)=−211+375−(−103)+0=267,x(6)=−211,x(7)=−375,x(8)=103,x(9)=0,x(10)=211−375+(−103)−0=−267,x(11)=211,x(12)=375,x(13)=−103,x(14)=0.\begin{aligned} x(5) &= -211 + 375 - (-103) + 0 = 267,\quad x(6) = -211,\quad x(7) = -375,\\ x(8) &= 103,\quad x(9) = 0,\quad x(10) = 211 - 375 + (-103) - 0 = -267,\\ x(11) &= 211,\quad x(12) = 375,\quad x(13) = -103,\quad x(14) = 0. \end{aligned}

Step 2. Verify conditions.

x(10)=−267,x(11)=211,x(12)=375,x(14)=0≠523.x(10) = -267,\quad x(11) = 211,\quad x(12) = 375,\quad x(14) = 0 \ne523.

All required conditions are satisfied.

Remark. This sequence is in fact periodic with period 10. In Lean, one can constructively define x:N→Zx : \mathbb{N} \to\mathbb{Z} either by recursion from the initial values, or directly by cases depending on nn mod 10.

This sequence satisfies the recurrence and the retained values, but x(14)=0x(14) = 0 does not satisfy the corrected target x(14)=523x(14) = 523. Its x(13)=−103x(13) = -103 also fails the auxiliary target x(13)=420x(13) = 420. Thus, although it solves the earlier displayed problem, it cannot be used as a counterexample to the intended conjecture. The following earlier formal response additionally changes the proposed sequence and fails the recurrence (for example at n=10n = 10). It is an erroneous attempt, not a verified proof.

Earlier Formal Prompt and Response (Incorrect Target and Proof)

Complete the following Lean 4 code using the given concrete example x(10)=−267x(10) = -267, x(11)=211x(11) = 211, x(12)=375x(12) = 375, x(14)=0≠523x(14) = 0 \ne523:

theorem aimeII_2001_p3_mut_54_drop4 :
∃ (x : ℕ → ℤ),
(∀ n ≥ 5, x n = x (n - 1) - x (n - 2) + x (n - 3) - x (n - 4))
∧ x 10 = -267 ∧ x 11 = 211 ∧ x 12 = 375 ∧ x 14 ≠ 523 := by
/-
We need to find a function \( x : \mathbb{N} \to \mathbb{Z} \) that satisfies
the recurrence relation \( x(n) = x(n - 1) - x(n - 2) + x(n - 3) - x(n - 4)
\) for \( n \geq 5 \), and also satisfies \( x(10) = -267 \), \( x(11) = 211
\), \( x(12) = 375 \), and \( x(14) \neq 523 \).

We can define such a function by specifying its values at each integer up to \(
n = 14 \), ensuring that the recurrence relation is satisfied for \( n \geq 5
\). We then verify that the specific values for \( x(10) \) to \( x(14) \)
meet the given conditions.
-/
use fun n => if n = 10 then -267 else if n = 11 then 211 else if n = 12 then 375
else if n = 13 then 523 else 0
constructor
· intro n hn
  simp [Nat.le_of_lt_succ, Nat.le_of_lt_succ] at hn
  split_ifs <;> omega
constructor
· simp
constructor
· simp
constructor
· simp
simp
<;> norm_num
<;> omega

References

  1. [1]Janice Ahn, Rishu Verma, Renze Lou, Di Liu, Rui Zhang, and Wenpeng Yin. Large language models for mathematical reasoning: Progresses and challenges. arXiv preprint arXiv:2402.00157, 2024.arxiv.org/abs/2402.00157
  2. [2]Paul Ammann and Jeff Offutt. Introduction to software testing. Cambridge University Press, 2017.
  3. [3]Thomas Anthony, Zheng Tian, and David Barber. Thinking fast and slow with deep learning and tree search. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1705.08439
  4. [4]Andrea Asperti, Alberto Naibo, and Claudio Sacerdoti Coen. Thinking machines: Mathematical reasoning in the age of llms. arXiv preprint arXiv:2508.00459, 2025.DOI
  5. [5]Mislav Balunović, Jasper Dekoninck, Nikola Jovanović, Ivo Petrov, and Martin Vechev. Mathconstruct: Challenging llm reasoning with constructive proofs. arXiv preprint arXiv:2502.10197, 2025.arxiv.org/abs/2502.10197
  6. [6]Ali Barahmand. On mathematical conjectures and counterexamples. Journal of Humanistic Mathematics, 9(1):295–303, 2019. doi: 10.5642/jhummath.201901.17. URL https://scholarship.claremont.edu/jhm/vol9/iss1/17.DOI
  7. [7]Bruno Barras, Samuel Boutin, Cristina Cornes, Judicaël Courant, Yann Coscoy, David Delahaye, Daniel de Rauglaudre, Jean-Christophe Filliâtre, Eduardo Giménez, Hugo Herbelin, et al. The coq proof assistant reference manual. INRIA, version, 6(11):17–21, 1999.
  8. [8]Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In Proceedings of the 26th annual international conference on machine learning, pp. 41–48, 2009.DOI
  9. [9]Béatrice Bérard, Michel Bidoit, Alain Finkel, François Laroussinie, Antoine Petit, Laure Petrucci, and Philippe Schnoebelen. Systems and software verification: model-checking techniques and tools. Springer Science & Business Media, 2013.
  10. [10]Jasmin Christian Blanchette and Tobias Nipkow. Nitpick: A counterexample generator for higher-order logic based on a relational model finder. In International conference on interactive theorem proving, pp. 131–146. Springer, 2010.DOI
  11. [11]Daniil A Boiko, Robert MacKnight, Ben Kline, and Gabe Gomes. Autonomous chemical research with large language models. Nature, 624(7992):570–578, 2023.DOI
  12. [12]Chenrui Cao, Liangcheng Song, Zenan Li, Xinyi Le, Xian Zhang, Hui Xue, and Fan Yang. Reviving dsp for advanced theorem proving in the era of reasoning models. arXiv preprint arXiv:2506.11487, 2025.arxiv.org/abs/2506.11487
  13. [13]François Charton, Jordan S Ellenberg, Adam Zsolt Wagner, and Geordie Williamson. Patternboost: Constructions in mathematics with a little help from ai. arXiv preprint arXiv:2411.00566, 2024.arxiv.org/abs/2411.00566
  14. [14]Luoxin Chen, Jiming Gu, Liankai Huang, Wenhao Huang, Zhicheng Jiang, Allan Jie, Xiaoran Jin, Xing Jin, Chenggang Li, Xiajing Ma, et al. Seed-prover: Deep and broad reasoning for automated theorem proving. arXiv preprint arXiv:2507.23726, 2025a.arxiv.org/abs/2507.23726
  15. [15]Qiguang Chen, Libo Qin, Jinhao Liu, Dengyun Peng, Jiannan Guan, Peng Wang, Mengkang Hu, Yuhang Zhou, Te Gao, and Wanxiang Che. Towards reasoning era: A survey of long chain-of-thought for reasoning large language models. arXiv preprint arXiv:2503.09567, 2025b.arxiv.org/abs/2503.09567
  16. [16]Gheorghe Comanici, Eric Bieber, Mike Schaeekermann, Ice Pasupat, Noveen Sachdeva, Inderjit Dhillon, Marcel Blistein, Ori Ram, Dan Zhang, Evan Rosen, et al. Gemini 2.5: Pushing the frontier with advanced reasoning, multimodality, long context, and next generation agentic capabilities. arXiv preprint arXiv:2507.06261, 2025.arxiv.org/abs/2507.06261
  17. [17]Leonardo De Moura, Soonho Kong, Jeremy Avigad, Floris Van Doorn, and Jakob von Raumer. The lean theorem prover (system description). In International Conference on Automated Deduction, pp. 378–388. Springer, 2015.
  18. [18]Kefan Dong and Tengyu Ma. Stp: Self-play llm theorem provers with iterative conjecturing and proving. arXiv preprint arXiv:2502.00212, 2025.arxiv.org/abs/2502.00212
  19. [19]Yann Fleureau, Jia Li, Edward Beeching, Lewis Tunstall, Ben Lipkin, Roman Soletsky, Shengyi Costa Huang, and Kashif Rasul. How numinamath won the 1st aimo progress prize, 2024.
  20. [22]Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Ruoyu Zhang, Runxin Xu, Qihao Zhu, Shirong Ma, Peiyi Wang, Xiao Bi, et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025.DOI
  21. [23]Joshua Hare. Dealing with sparse rewards in reinforcement learning. arXiv preprint arXiv:1910.09281, 2019.arxiv.org/abs/1910.09281
  22. [24]Colin Brian Haselgrove. A disproof of a conjecture of pólya. Mathematika, 5(2):141–145, 1958.DOI
  23. [25]Yingya Huang, Xiaohan Lin, Zhengying Liu, Qingxing Cao, Huajian Xin, Haiming Wang, Zhenguo Li, Linqi Song, and Xiaodan Liang. Mustard: Mastering uniform synthesis of theorem and proof data. arXiv preprint arXiv:2402.08957, 2024.arxiv.org/abs/2402.08957
  24. [26]Xingguang Ji, Yahui Liu, Qi Wang, Jingyuan Zhang, Yang Yue, Rui Shi, Chenxi Sun, Fuzheng Zhang, Guorui Zhou, and Kun Gai. Leanabell-prover-v2: Verifier-integrated reasoning for formal theorem proving via reinforcement learning. arXiv preprint arXiv:2507.08649, 2025.arxiv.org/abs/2507.08649
  25. [27]Albert Q Jiang, Sean Welleck, Jin Peng Zhou, Wenda Li, Jiacheng Liu, Mateja Jamnik, Timothée Lacroix, Yuhuai Wu, and Guillaume Lample. Draft, sketch, and prove: Guiding formal theorem provers with informal proofs. arXiv preprint arXiv:2210.12283, 2022.arxiv.org/abs/2210.12283
  26. [28]Albert Qiaochu Jiang, Sean Welleck, Jin Peng Zhou, Timothee Lacroix, Jiacheng Liu, Wenda Li, Mateja Jamnik, Guillaume Lample, and Yuhuai Wu. Draft, sketch, and prove: Guiding formal theorem provers with informal proofs. In The Eleventh International Conference on Learning Representations, 2023.arxiv.org/abs/2210.12283
  27. [29]Dongwei Jiang, Marcio Fonseca, and Shay B Cohen. Leanreasoner: Boosting complex logical reasoning with lean. arXiv preprint arXiv:2403.13312, 2024.arxiv.org/abs/2403.13312
  28. [30]Diederik P Kingma. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.arxiv.org/abs/1412.6980
  29. [31]Guillaume Lample, Timothee Lacroix, Marie-Anne Lachaux, Aurelien Rodriguez, Amaury Hayat, Thibaut Lavril, Gabriel Ebner, and Xavier Martinet. Hypertree proof search for neural theorem proving. Advances in neural information processing systems, 35:26337–26349, 2022.arxiv.org/abs/2205.11491
  30. [32]Leon J Lander, Thomas R Parkin, and John L Selfridge. A survey of equal sums of like powers. Mathematics of Computation, 21(99):446–459, 1967.DOI
  31. [33]Adam Daniel Laud. Theory and application of reward shaping in reinforcement learning. University of Illinois at Urbana-Champaign, 2004.
  32. [34]Lean Prover Community. plausible. https://github.com/leanprover-community/plausible, 2024. GitHub repository.
  33. [35]Lean Prover Community. Unused variables linter documentation. https://leanprover-community.github.io/con-nf/doc/Lean/Linter/UnusedVariables.html, 2025.
  34. [36]Yinghui Li, Jiayi Kuang, Haojing Huang, Zhikun Xu, Xinnian Liang, Yi Yu, Wenlian Lu, Yangning Li, Xiaoyu Tan, Chao Qu, et al. One example shown, many concepts known! counterexample-driven conceptual reasoning in mathematical llms. In Forty-second International Conference on Machine Learning, 2025.arxiv.org/abs/2502.10454
  35. [37]Zhaoyu Li, Jialiang Sun, Logan Murphy, Qidong Su, Zenan Li, Xian Zhang, Kaiyu Yang, and Xujie Si. A survey on deep learning for theorem proving. arXiv preprint arXiv:2404.09939, 2024.arxiv.org/abs/2404.09939
  36. [38]Yong Lin, Shange Tang, Bohan Lyu, Jiayun Wu, Hongzhou Lin, Kaiyu Yang, Jia Li, Mengzhou Xia, Danqi Chen, Sanjeev Arora, et al. Goedel-prover: A frontier model for open-source automated theorem proving. arXiv preprint arXiv:2502.07640, 2025a.arxiv.org/abs/2502.07640
  37. [39]Yong Lin, Shange Tang, Bohan Lyu, Ziran Yang, Jui-Hui Chung, Haoyu Zhao, Lai Jiang, Yihan Geng, Jiawei Ge, Jingruo Sun, et al. Goedel-prover-v2: Scaling formal theorem proving with scaffolded data synthesis and self-correction. arXiv preprint arXiv:2508.03613, 2025b.arxiv.org/abs/2508.03613
  38. [40]Zichen Liu, Changyu Chen, Wenjun Li, Penghui Qi, Tianyu Pang, Chao Du, Wee Sun Lee, and Min Lin. Understanding rl-zero-like training: A critical perspective. arXiv preprint arXiv:2503.20783, 2025.
  39. [42]Niklas Muennighoff, Zitong Yang, Weijia Shi, Xiang Lisa Li, Li Fei-Fei, Hannaneh Hajishirzi, Luke Zettlemoyer, Percy Liang, Emmanuel Candès, and Tatsunori Hashimoto. s1: Simple test-time scaling. arXiv preprint arXiv:2501.19393, 2025.arxiv.org/abs/2501.19393
  40. [43]Alexander Novikov, Ngân Vũ, Marvin Eisenberger, Emilien Dupont, Po-Sen Huang, Adam Zsolt Wagner, Sergey Shirobokov, Borislav Kozlovskii, Francisco JR Ruiz, Abbas Mehrabian, et al. Alphaevolve: A coding agent for scientific and algorithmic discovery. arXiv preprint arXiv:2506.13131, 2025.
  41. [44]OpenAI. Introducing openai o1 preview. Technical report, OpenAI, 2023. URL https://openai.com/index/introducing-openai-o1-preview/.
  42. [45]Markus Pantsar. How to recognize artificial mathematical intelligence in theorem proving. Topoi, pp. 1–14, 2025.
  43. [46]Lawrence C Paulson et al. The isabelle reference manual. Technical report, University of Cambridge, Computer Laboratory, 1993.
  44. [47]Gabriel Poesia, David Broman, Nick Haber, and Noah Goodman. Learning formal mathematics from intrinsic motivation. Advances in Neural Information Processing Systems, 37:43032–43057, 2024.arxiv.org/abs/2407.00695
  45. [48]Stanislas Polu, Jesse Michael Han, Kunhao Zheng, Mantas Baksys, Igor Babuschkin, and Ilya Sutskever. Formal mathematics statement curriculum learning. arXiv preprint arXiv:2202.01344, 2022.arxiv.org/abs/2202.01344
  46. [49]Qwen Team. Qwen3 technical report, 2025. URL https://arxiv.org/abs/2505.09388.
  47. [50]A David Redish. Vicarious trial and error. Nature Reviews Neuroscience, 17(3):147–159, 2016.DOI
  48. [51]ZZ Ren, Zhihong Shao, Junxiao Song, Huajian Xin, Haocheng Wang, Wanjia Zhao, Liyue Zhang, Zhe Fu, Qihao Zhu, Dejian Yang, et al. Deepseek-prover-v2: Advancing formal mathematical reasoning via reinforcement learning for subgoal decomposition. arXiv preprint arXiv:2504.21801, 2025.
  49. [52]Matthew Renze and Erhan Guven. Self-reflection in llm agents: Effects on problem-solving performance. arXiv preprint arXiv:2405.06682, 2024.DOI
  50. [53]Martin Riedmiller, Roland Hafner, Thomas Lampe, Michael Neunert, Jonas Degrave, Tom Wiele, Vlad Mnih, Nicolas Heess, and Jost Tobias Springenberg. Learning by playing solving sparse reward tasks from scratch. In International conference on machine learning, pp. 4344–4353. PMLR, 2018.
  51. [54]Bernardino Romera-Paredes, Mohammadamin Barekatain, Alexander Novikov, Matej Balog, M Pawan Kumar, Emilien Dupont, Francisco JR Ruiz, Jordan S Ellenberg, Pengming Wang, Omar Fawzi, et al. Mathematical discoveries from program search with large language models. Nature, 625(7995):468–475, 2024.
  52. [56]Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Yang Wu, et al. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024.
  53. [57]Trieu H Trinh, Yuhai Wu, Quoc V Le, He He, and Thang Luong. Solving olympiad geometry without human demonstrations. Nature, 625(7995):476–482, 2024.DOI
  54. [58]George Tsoukalas, Jasper Lee, John Jennings, Jimmy Xin, Michelle Ding, Michael Jennings, Amitayush Thakur, and Swarat Chaudhuri. Putnambench: Evaluating neural theorem-provers on the putnam mathematical competition. Advances in Neural Information Processing Systems, 37:11545–11569, 2024.arxiv.org/abs/2407.11214
  55. [61]Haiming Wang, Huajian Xin, Chuanyang Zheng, Lin Li, Zhengying Liu, Qingxing Cao, Yinya Huang, Jing Xiong, Han Shi, Enze Xie, et al. Lego-prover: Neural theorem proving with growing libraries. arXiv preprint arXiv:2310.00656, 2023.arxiv.org/abs/2310.00656
  56. [62]Haiming Wang, Mert Unsal, Xiaohan Lin, Mantas Baksy, Junqi Liu, Marco Dos Santos, Flood Sung, Marina Vinyes, Zhenzhe Ying, Zekai Zhu, et al. Kimina-prover preview: Towards large formal reasoning models with reinforcement learning. arXiv preprint arXiv:2504.11354, 2025.arxiv.org/abs/2504.11354
  57. [63]Jiachen Tianhao Wang, Tong Wu, Dawn Song, Prateek Mittal, and Ruoxi Jia. Greats: Online selection of high-quality data for llm training in every iteration. Advances in Neural Information Processing Systems, 37:131197–131223, 2024a.DOI
  58. [64]Ke Wang, Jiahui Zhu, Minjie Ren, Zeming Liu, Shiwei Li, Zongye Zhang, Chenkai Zhang, Xiaoyu Wu, Qiqi Zhan, Qingjie Liu, et al. A survey on data synthesis and augmentation for large language models. arXiv preprint arXiv:2410.12896, 2024b.arxiv.org/abs/2410.12896
  59. [65]Mingzhe Wang and Jia Deng. Learning to prove theorems by learning to generate theorems. Advances in neural information processing systems, 33:18146–18157, 2020.arxiv.org/abs/2002.07019
  60. [66]Chenrui Wei, Mengzhou Sun, and Wei Wang. Proving olympiad algebraic inequalities without human demonstrations. Advances in Neural Information Processing Systems, 37:82811–82822, 2024.arxiv.org/abs/2406.14219
  61. [67]Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, Fei Xia, Ed Chi, Quoc V Le, Denny Zhou, et al. Chain-of-thought prompting elicits reasoning in large language models. Advances in neural information processing systems, 35:24824–24837, 2022.arxiv.org/abs/2201.11903
  62. [68]Shaonan Wu, Shuai Lu, Yeyun Gong, Nan Duan, and Ping Wei. Alchemy: Amplifying theorem-proving capability through symbolic mutation. arXiv preprint arXiv:2410.15748, 2024a.arxiv.org/abs/2410.15748
  63. [69]Yuhui Wu, Albert Qiaochu Jiang, Wenda Li, Markus Rabe, Charles Staats, Mateja Jamnik, and Christian Szegedy. Autoformalization with large language models. Advances in neural information processing systems, 35:32353–32368, 2022.arxiv.org/abs/2205.12615
  64. [70]Zijian Wu, Suozhi Huang, Zhejian Zhou, Huaiyuan Ying, Jiayu Wang, Dahua Lin, and Kai Chen. Internlm2. 5-stepprover: Advancing automated theorem proving via expert iteration on large-scale lean problems. arXiv preprint arXiv:2410.15700, 2024b.
  65. [71]Mengzhou Xia, Sadhika Malladi, Suchin Gururangan, Sanjeev Arora, and Danqi Chen. Less: Selecting influential data for targeted instruction tuning. arXiv preprint arXiv:2402.04333, 2024.arxiv.org/abs/2402.04333
  66. [72]Huajian Xin, Daya Guo, Zhihong Shao, Zhizhou Ren, Qihao Zhu, Bo Liu, Chong Ruan, Wenda Li, and Xiaodan Liang. Deepseek-prover: Advancing theorem proving in llms through large-scale synthetic data. arXiv preprint arXiv:2405.14333, 2024.arxiv.org/abs/2405.14333
  67. [73]Kaiyu Yang, Aidan Swope, Alex Gu, Rahul Chalamala, Peiyang Song, Shixing Yu, Saad Godil, Ryan J Prenger, and Animashree Anandkumar. Leandojo: Theorem proving with retrieval-augmented language models. Advances in Neural Information Processing Systems, 36:21573–21612, 2023.arxiv.org/abs/2306.15626
  68. [74]Kaiyu Yang, Gabriel Poesia, Jingxuan He, Wenda Li, Kristin Lauter, Swarat Chaudhuri, and Dawn Song. Formal mathematical reasoning: A new frontier in ai. arXiv preprint arXiv:2412.16075, 2024.arxiv.org/abs/2412.16075
  69. [75]David Yin and Jing Gao. Generating millions of lean theorems with proofs by exploring state transition graphs. arXiv preprint arXiv:2503.04772, 2025.arxiv.org/abs/2503.04772
  70. [76]Huaiyuan Ying, Zijian Wu, Yihan Geng, Jiayu Wang, Dahua Lin, and Kai Chen. Lean workbook: A large-scale lean problem set formalized from natural language math problems. Advances in Neural Information Processing Systems, 37:105848–105863, 2024.arxiv.org/abs/2406.03847
  71. [77]H Peyton Young. Learning by trial and error. Games and economic behavior, 65(2):626–643, 2009.
  72. [78]Longhui Yu, Weisen Jiang, Han Shi, Jincheng Yu, Zhengying Liu, Yu Zhang, James T Kwok, Zhenguo Li, Adrian Weller, and Weiyang Liu. Metamath: Bootstrap your own mathematical questions for large language models. arXiv preprint arXiv:2309.12284, 2023.arxiv.org/abs/2309.12284
  73. [79]Zhouliang Yu, Ruotian Peng, Keyi Ding, Yizhe Li, Zhongyuan Peng, Minghao Liu, Yifan Zhang, Zheng Yuan, Huajian Xin, Wenhao Huang, et al. Formalmath: Benchmarking formal mathematical reasoning of large language models. arXiv preprint arXiv:2505.02735, 2025.arxiv.org/abs/2505.02735
  74. [80]Rina Zazkis and Egan J Chernoff. What makes a counterexample exemplary? Educational Studies in Mathematics, 68(3):195–208, 2008.DOI
  75. [81]Liang Zeng, Liangjun Zhong, Liang Zhao, Tianwen Wei, Liu Yang, Jujie He, Cheng Cheng, Rui Hu, Yang Liu, Shuicheng Yan, et al. Skywork-math: Data scaling laws for mathematical reasoning in large language models–the story goes on. arXiv preprint arXiv:2407.08348, 2024.arxiv.org/abs/2407.08348
  76. [82]Kaiyan Zhang, Yuxin Zuo, Bingxiang He, Youbang Sun, Runze Liu, Che Jiang, Yuchen Fan, Kai Tian, Guoli Jia, Pengfei Li, et al. A survey of reinforcement learning for large reasoning models. arXiv preprint arXiv:2509.08827, 2025a.arxiv.org/abs/2509.08827
  77. [83]Terry Jingchen Zhang, Wenyu an Jiang, Rongchuan Liu, Yisong Wang, Junran Yang, Ning Wang, Nicole Ni, Yinyua Huang, and Mrinmaya Sachan. Lean meets theoretical computer science: Scalable synthesis of theorem proving challenges in formal-informal pairs. arXiv preprint arXiv:2508.15878, 2025b.arxiv.org/abs/2508.15878
  78. [84]Kunhao Zheng, Jesse Michael Han, and Stanislas Polu. Minif2f: a cross-system benchmark for formal olympiad-level mathematics. arXiv preprint arXiv:2109.00110, 2021.arxiv.org/abs/2109.00110
  79. [85]Yaowei Zheng, Richong Zhang, Junhao Zhang, Yanhan Ye, Zheyan Luo, Zhangchi Feng, and Yongqiang Ma. Llamafactory: Unified efficient fine-tuning of 100+ language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 3: System Demonstrations), Bangkok, Thailand, 2024. Association for Computational Linguistics. URL http://arxiv.org/abs/2403.13372.

Paper details

vlnc:W_5xy7wbs4
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 18

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

GPT-4o (bare)

View statement
Looking for related papers…
Contents