The ever-growing complexity of mathematical proofs makes their manual verification by mathematicians very cognitively demanding. Autoformalization seeks to address this by translating proofs written in natural language into a formal representation that is computer-verifiable via interactive theorem provers. In this paper, we introduce a semantic parsing approach, based on the Universal Transformer architecture, that translates elementary mathematical proofs into an equivalent formalization in the language of the Coq interactive theorem prover. The same architecture is also trained to translate simple imperative code decorated with Hoare triples into formally verifiable proofs of correctness in Coq. Experiments on a limited domain of artificial and human-written proofs show that the models generalize well to intermediate lengths not seen during training and variations in natural language.
翻译:数学证明日益复杂,使得数学家的人工验证要求在认知上非常高。 自动化正规化试图通过将自然语言写成的证明转换成正式的表述,通过互动理论验证人进行计算机验证。 在本文中,我们引入了基于通用变异器结构的语义分解方法,将基本数学证明转换成以Coq互动理论验证人的语言进行的等同正规化。 同一结构还接受了培训,以便将与Hoare三重装饰的简单必要代码转换成Coq中可正式核实的正确性证明。 人工和人文证明的有限领域的实验表明,这些模型非常概括到在培训和自然语言变换期间所看不到的中间长度。