Alchemy: Amplifying Theorem-Proving Capability through Symbolic Mutation

Shaonan Wu, Shuai Lu, Yeyun Gong, Nan Duan, Ping Wei
2/12/2026

No official code found. Best implementation: wclsn/Alchemy (9 stars, Apache-2.0, last commit 2025-02-24).

Abstract

Formal proofs are challenging to write even for experienced experts. Recent progress in Neural Theorem Proving (NTP) shows promise in expediting this process. However, the formal corpora available on the Internet are limited compared to the general text, posing a significant data scarcity challenge for NTP. To address this issue, this work proposes Alchemy, a general framework for data synthesis that constructs formal theorems through symbolic mutation. Specifically, for each candidate theorem in Mathlib, we identify all invocable theorems that can be used to rewrite or apply to it. Subsequently, we mutate the candidate theorem by replacing the corresponding term in the statement with its equivalent form or antecedent. As a result, our method increases the number of theorems in Mathlib by an order of magnitude, from 110k to 6M. Furthermore, we perform continual pretraining and supervised finetuning on this augmented corpus for large language models. Experimental results demonstrate the effectiveness of our approach, achieving a 4.70% absolute performance improvement on Leandojo benchmark. Additionally, our approach achieves a 2.47% absolute performance gain on the out-of-distribution miniF2F benchmark based on the synthetic data.To provide further insights, we conduct a comprehensive analysis of synthetic data composition and the training paradigm, offering valuable guidance for developing a strong theorem prover.

View on arXivView PDF

Code Implementations(1)

wclsn/AlchemyCommunity100%
Apache-2.0

The codebase for ICLR 2025 paper - Alchemy: Amplifying Theorem-Proving Capability Through Symbolic Mutation

90Shell, PythonNov 27, 20241 years agoApache-2.0

Similar Papers

Cite this paper

@article{wu2026alchemy,
  title  = {Alchemy: Amplifying Theorem-Proving Capability through Symbolic Mutation},
  author = {Shaonan Wu and Shuai Lu and Yeyun Gong and Nan Duan and Ping Wei},
  year   = {2026},
  eprint = {2410.15748},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.15748},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.15748.svg)](https://codeofpaper.com/paper/2410.15748)

Discussion