We address the problem of translating informal mathematical proofs expressed in natural language into formal proofs in Lean4 under a constrained computational budget. Our approach is grounded in two key insights. First, informal proofs tend to proceed via a sequence of logical transitions - often implications or equivalences - without explicitly specifying intermediate results or auxiliary lemmas. In contrast, formal systems like Lean require an explicit representation of each proof state and the tactics that connect them. Second, each informal reasoning step can be viewed as an abstract transformation between proof states, but identifying the corresponding formal tactics often requires nontrivial domain knowledge and precise control over proof context. To bridge this gap, we propose a two stage framework. Rather than generating formal tactics directly, we first extract a Chain of States (CoS), a sequence of intermediate formal proof states aligned with the logical structure of the informal argument. We then generate tactics to transition between adjacent states in the CoS, thereby constructing the full formal proof. This intermediate representation significantly reduces the complexity of tactic generation and improves alignment with informal reasoning patterns. We build dedicated datasets and benchmarks for training and evaluation, and introduce an interactive framework to support tactic generation from formal states. Empirical results show that our method substantially outperforms existing baselines, achieving higher proof success rates.
First Experiments with Neural Translation of Informal to Formal Mathematics
University of Innsbruck(因斯布鲁克大学);Czech Technical University in Prague(布拉格捷克理工大学)
我们报告了我们的实验,训练深度神经网络,自动翻译非正式的LaTeX写的Mizar文本到正式的Mizar语言。据我们所知,这是第一次当神经网络已被采用在数学的形式化。Using Luong et al.的神经机器翻译模型(NMT),我们测试了我们对齐的非正式正式语料库对各种超参数和评估他们的结果。实验结果表明,我们的最佳模型配置能够在65.73%的推理数据上生成正确的Mizar语句,所有模型的联合覆盖率为79.17%。这些结果表明,通过人工神经网络的形式化是一种很有前途的方法自动形式化的数学。我们提出了几个案例研究来说明我们的结果。
Lean Meets Theoretical Computer Science: Scalable Synthesis of Theorem Proving Challenges in Formal-Informal Pairs
D-CHAB, ETH Zurich, Zurich, Switzerland.;D-INFK, ETH Zurich, Zurich, Switzerland.;ETH AI Center, Zurich, Switzerland.;University of Pennsylvania, PA, USA.;Independent Researcher.
Proceedings of the International Workshop on Methodologies for Translating Legal Norms into Formal Representations (LN2FR 2022) in association with 35th International Conference on Legal Knowledge and Information Systems (JURIX 2022)