Autoformalizing Euclidean Geometry (2405.17216v1)
Abstract: Autoformalization involves automatically translating informal math into formal theorems and proofs that are machine-verifiable. Euclidean geometry provides an interesting and controllable domain for studying autoformalization. In this paper, we introduce a neuro-symbolic framework for autoformalizing Euclidean geometry, which combines domain knowledge, SMT solvers, and LLMs. One challenge in Euclidean geometry is that informal proofs rely on diagrams, leaving gaps in texts that are hard to formalize. To address this issue, we use theorem provers to fill in such diagrammatic information automatically, so that the LLM only needs to autoformalize the explicit textual steps, making it easier for the model. We also provide automatic semantic evaluation for autoformalized theorem statements. We construct LeanEuclid, an autoformalization benchmark consisting of problems from Euclid's Elements and the UniGeo dataset formalized in the Lean proof assistant. Experiments with GPT-4 and GPT-4V show the capability and limitations of state-of-the-art LLMs on autoformalizing geometry problems. The data and code are available at https://github.com/loganrjmurphy/LeanEuclid.
- Towards a mathematics formalisation assistant using large language models. arXiv preprint arXiv:2211.07524, 2022.
- Avigad, J. Notes on ”A formal system for Euclid’s Elements”. https://www.andrew.cmu.edu/user/avigad/Papers/euclid_notes.htm.
- A formal system for Euclid’s Elements. The Review of Symbolic Logic, 2009.
- ProofNet: Autoformalizing and formally proving undergraduate-level mathematics. arXiv preprint arXiv:2302.12433, 2023.
- The Coq proof assistant reference manual: Version 6.1. PhD thesis, Inria, 1997.
- Satisfiability modulo theories. 2018.
- Proof-checking Euclid. Annals of Mathematics and Artificial Intelligence, 2019.
- Buchberger, B. Applications of gröbner bases in non-linear computational geometry. In Trends in Computer Algebra, 2005.
- GeoQA: A geometric question answering benchmark towards multimodal numerical reasoning. In Findings of the Association for Computational Linguistics: ACL, 2021a.
- UniGeo: Unifying geometry logical reasoning via reformulating mathematical expression. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2022.
- Evaluating large language models trained on code. arXiv preprint arXiv:2107.03374, 2021b.
- NL2TL: Transforming natural languages to temporal logics using large language models. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
- nl2spec: Interactively translating unstructured natural language to temporal logics with large language models. In International Conference on Computer Aided Verification (CAV), 2023.
- Towards autoformalization of mathematics and code correctness: Experiments with elementary proofs. arXiv preprint arXiv:2301.02195, 2023.
- The Lean 4 theorem prover and programming language. In International Conference on Automated Deduction (CADE), 2021.
- Baldur: Whole-proof generation and repair with large language models. In Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering (ESEC/FSE), 2023.
- G-LLaVA: Solving geometric problem with multi-modal large language model. arXiv preprint arXiv:2312.11370, 2023.
- A formal proof of the Kepler conjecture. In Forum of Mathematics, Pi, volume 5, 2017.
- Proof artifact co-training for theorem proving with language models. In International Conference on Learning Representations (ICLR), 2022.
- Heiberg, J. L. Euclid’s Elements. 2007. URL https://github.com/rfitzp/Elements.
- Hernandez-Espiet, A. feat: synthetic geometry. https://github.com/leanprover-community/mathlib4/pull/7300, 2023.
- Hilbert, D. Grundlagen der geometrie. Springer-Verlag, 2013.
- Draft, Sketch, and Prove: Guiding formal theorem provers with informal proofs. In International Conference on Learning Representations (ICLR), 2023a.
- Multilingual mathematical autoformalization. arXiv preprint arXiv:2311.03755, 2023b.
- GeomVerse: A systematic evaluation of large models for geometric reasoning. arXiv preprint arXiv:2312.12241, 2023.
- HyperTree proof search for neural theorem proving. In Neural Information Processing Systems (NeurIPS), 2022.
- CompCert—a formally verified optimizing compiler. In Embedded Real Time Software and Systems, 2016.
- A survey on deep learning for theorem proving. arXiv preprint arXiv:2404.09939, 2024.
- UniMath: A foundational and multimodal mathematical reasoner. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2023.
- Inter-GPS: Interpretable geometry problem solving with formal language and symbolic reasoning. In Annual Meeting of the Association for Computational Linguistics (ACL), 2021.
- Miller, N. G. A diagrammatic formal system for Euclidean geometry. 2001.
- Mumma, J. Proofs, pictures, and Euclid. Synthese, 2010.
- Nevins, A. J. Plane geometry theorem proving using forward chaining. Artificial Intelligence, 1975.
- OpenAI. GPT-4 technical report. arXiv preprint arXiv:2303.08774, 2023.
- Data-efficient learning of natural language to linear temporal logic translators for robot task specification. In International Conference on Robotics and Automation (ICRA), 2023.
- BLEU: a method for automatic evaluation of machine translation. In Annual Meeting of the Association for Computational Linguistics (ACL), 2002.
- GeoDRL: A self-learning framework for geometry problem solving using reinforcement learning in deductive reasoning. In Findings of the Association for Computational Linguistics: ACL, 2023.
- Generative language modeling for automated theorem proving. arXiv preprint arXiv:2009.03393, 2020.
- Schulz, S. System description: E 1.8. In International Conference on Logic for Programming, Artificial Intelligence, and Reasoning, 2013.
- Metamathematische methoden in der geometrie. Springer-Verlag, 2013.
- Towards large language models as copilots for theorem proving in Lean. arXiv preprint arXiv: Arxiv-2404.12534, 2024.
- The mathlib Community. The Lean mathematical library. In Certified Programs and Proofs (CPP), 2020.
- Solving olympiad geometry without human demonstrations. Nature, 2023.
- First experiments with neural translation of informal to formal mathematics. In Conferences on Intelligent Computer Mathematics (CICM), 2018.
- Wu, W.-t. On the decision problem and the mechanization of theorem-proving in elementary geometry. In Selected Works Of Wen-Tsun Wu. 2008.
- Autoformalization with large language models. In Neural Information Processing Systems (NeurIPS), 2022.
- Learning to prove theorems via interacting with proof assistants. In International Conference on Machine Learning (ICML), 2019.
- LeanDojo: Theorem proving with retrieval-augmented language models. In Neural Information Processing Systems (NeurIPS), 2023.
- Automated production of traditional proofs for theorems in Euclidean geometry I. the Hilbert intersection point theorems. Annals of Mathematics and Artificial Intelligence, 1995.