A New Approach Towards Autoformalization
Nilay Patel, Rahul Saha, Jeffrey Flanigan
TL;DR
This work addresses the difficulty of autoformalizing real-world mathematics by decomposing the task into four subtasks: formalizing theorems and definitions in an unlinked form, linking entities to a formal library, and adjusting types to satisfy a proof assistant's checker. It introduces arXiv2Formal, a beta 50-theorem Lean 3 benchmark, to enable supervised progress on subtask 1 and to foster community contributions. Early GPT-3.5 experiments show that in-context learning can improve translations but reveal persistent issues with typing and context that the proposed linking and type-adjustment steps aim to remedy. By lowering complexity and data requirements, this staged approach aims to scale autoformalization toward real-world, research-level mathematics and broader proof ecosystems, with extensions to Lean 4 on the horizon.
Abstract
Verifying mathematical proofs is difficult, but can be automated with the assistance of a computer. Autoformalization is the task of automatically translating natural language mathematics into a formal language that can be verified by a program. This is a challenging task, and especially for higher-level mathematics found in research papers. Research paper mathematics requires large amounts of background and context. In this paper, we propose an avenue towards tackling autoformalization for research-level mathematics, by breaking the task into easier and more approachable subtasks: unlinked formalization (formalization with unlinked definitions and theorems), entity linking (linking to the proper theorems and definitions), and finally adjusting types so it passes the type checker. In addition, we present arXiv2Formal, a benchmark dataset for unlinked formalization consisting of 50 theorems formalized for the Lean theorem prover sampled from papers on arXiv.org. We welcome any contributions from the community to future versions of this dataset.
