Towards Autoformalization of Mathematics and Code Correctness: Experiments with Elementary Proofs

Garett Cunningham, Razvan Bunescu, David Juedes


Abstract
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.
Anthology ID:
2022.mathnlp-1.4
Volume:
Proceedings of the 1st Workshop on Mathematical Natural Language Processing (MathNLP)
Month:
December
Year:
2022
Address:
Abu Dhabi, United Arab Emirates (Hybrid)
Editors:
Deborah Ferreira, Marco Valentino, Andre Freitas, Sean Welleck, Moritz Schubotz
Venue:
MathNLP
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
25–32
Language:
URL:
https://aclanthology.org/2022.mathnlp-1.4
DOI:
10.18653/v1/2022.mathnlp-1.4
Bibkey:
Cite (ACL):
Garett Cunningham, Razvan Bunescu, and David Juedes. 2022. Towards Autoformalization of Mathematics and Code Correctness: Experiments with Elementary Proofs. In Proceedings of the 1st Workshop on Mathematical Natural Language Processing (MathNLP), pages 25–32, Abu Dhabi, United Arab Emirates (Hybrid). Association for Computational Linguistics.
Cite (Informal):
Towards Autoformalization of Mathematics and Code Correctness: Experiments with Elementary Proofs (Cunningham et al., MathNLP 2022)
Copy Citation:
PDF:
https://aclanthology.org/2022.mathnlp-1.4.pdf
Video:
 https://aclanthology.org/2022.mathnlp-1.4.mp4