REFACTOR: Learning to Extract Theorems from Proofs (2402.17032v1)
Abstract: Human mathematicians are often good at recognizing modular and reusable theorems that make complex mathematical results within reach. In this paper, we propose a novel method called theoREm-from-prooF extrACTOR (REFACTOR) for training neural networks to mimic this ability in formal mathematical theorem proving. We show on a set of unseen proofs, REFACTOR is able to extract 19.6% of the theorems that humans would use to write the proofs. When applying the model to the existing Metamath library, REFACTOR extracted 16 new theorems. With newly extracted theorems, we show that the existing proofs in the MetaMath database can be refactored. The new theorems are used very frequently after refactoring, with an average usage of 733.5 times, and help shorten the proof lengths. Lastly, we demonstrate that the prover trained on the new-theorem refactored dataset proves more test theorems and outperforms state-of-the-art baselines by frequently leveraging a diverse set of newly extracted theorems. Code can be found at https://github.com/jinpz/refactor.
- Neural module networks. 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp. 39–48, 2015.
- Proving theorems using incremental learning and hindsight experience replay. In International Conference on Machine Learning, pp. 1198–1210. PMLR, 2022.
- Holist: An environment for machine learning of higher order logic theorem proving. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pp. 454–463. PMLR, 2019a. URL http://proceedings.mlr.press/v97/bansal19a.html.
- Learning to Reason in Large Theories without Imitation. arXiv preprint arXiv:1905.10501, 2019b.
- The Coq proof assistant reference manual. INRIA, version, 6(11), 1999.
- Top-down synthesis for library learning. Proceedings of the ACM on Programming Languages, 7(POPL):1182–1213, 2023.
- Automatically composing representation transformations as a means for generalization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019. URL https://openreview.net/forum?id=B1ffQnRcKX.
- Haskell B Curry. Functionality in combinatory logic. Proceedings of the National Academy of Sciences, 20(11):584–590, 1934.
- The Lean theorem prover (system description). In International Conference on Automated Deduction, pp. 378–388. Springer, 2015.
- Bootstrap learning via modular concept discovery. In Francesca Rossi (ed.), IJCAI 2013, Proceedings of the 23rd International Joint Conference on Artificial Intelligence, Beijing, China, August 3-9, 2013, pp. 1302–1309. IJCAI/AAAI, 2013. URL http://www.aaai.org/ocs/index.php/IJCAI/IJCAI13/paper/view/6890.
- Learning libraries of subroutines for neurally-guided bayesian program induction. In Samy Bengio, Hanna M. Wallach, Hugo Larochelle, Kristen Grauman, Nicolò Cesa-Bianchi, and Roman Garnett (eds.), Advances in Neural Information Processing Systems 31: Annual Conference on Neural Information Processing Systems 2018, NeurIPS 2018, December 3-8, 2018, Montréal, Canada, pp. 7816–7826, 2018. URL https://proceedings.neurips.cc/paper/2018/hash/7aa685b3b1dc1d6780bf36f7340078c9-Abstract.html.
- Dreamcoder: Growing generalizable, interpretable knowledge with wake-sleep bayesian program learning. CoRR, abs/2006.08381, 2020. URL https://arxiv.org/abs/2006.08381.
- Fast graph representation learning with PyTorch Geometric. In ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019.
- Differentiable programs with neural libraries. In ICML, 2017.
- Sharing HOL4 and HOL light proof knowledge. In Martin Davis, Ansgar Fehnker, Annabelle McIver, and Andrei Voronkov (eds.), Logic for Programming, Artificial Intelligence, and Reasoning - 20th International Conference, LPAR-20 2015, Suva, Fiji, November 24-28, 2015, Proceedings, volume 9450 of Lecture Notes in Computer Science, pp. 372–386. Springer, 2015. doi: 10.1007/978-3-662-48899-7_26. URL https://doi.org/10.1007/978-3-662-48899-7_26.
- Initial experiments with statistical conjecturing over large formal corpora. In Andrea Kohlhase, Paul Libbrecht, Bruce R. Miller, Adam Naumowicz, Walther Neuper, Pedro Quaresma, Frank Wm. Tompa, and Martin Suda (eds.), Joint Proceedings of the FM4M, MathUI, and ThEdu Workshops, Doctoral Program, and Work in Progress at the Conference on Intelligent Computer Mathematics 2016 co-located with the 9th Conference on Intelligent Computer Mathematics (CICM 2016), Bialystok, Poland, July 25-29, 2016, volume 1785 of CEUR Workshop Proceedings, pp. 219–228. CEUR-WS.org, 2016. URL http://ceur-ws.org/Vol-1785/W23.pdf.
- Learning to prove with tactics. CoRR, abs/1804.00596, 2018. URL http://arxiv.org/abs/1804.00596.
- Transformers Generalize to the Semantics of Logics. arXiv preprint arXiv:2003.04218, 2020.
- Inductive representation learning on large graphs. arXiv preprint arXiv:1706.02216, 2017.
- John Harrison. HOL Light: A tutorial introduction. In International Conference on Formal Methods in Computer-Aided Design, pp. 265–269. Springer, 1996.
- A neuro-vector-symbolic architecture for solving raven’s progressive matrices. Nature Machine Intelligence, 5(4):363–375, 2023.
- Towards algorithmic cut-introduction. In International Conference on Logic for Programming Artificial Intelligence and Reasoning, pp. 228–242. Springer, 2012.
- William A Howard. The formulae-as-types notion of construction. To HB Curry: essays on combinatory logic, lambda calculus and formalism, 44:479–490, 1980.
- GamePad: A learning environment for theorem proving. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019. URL https://openreview.net/forum?id=r1xwKoR9Y7.
- Compositional attention networks for machine reasoning. In International Conference on Learning Representations (ICLR), 2018.
- Compositional generalization through abstract representations in human and artificial neural networks. Advances in Neural Information Processing Systems, 35:32225–32239, 2022.
- Learning-assisted theorem proving with millions of lemmas. J. Symb. Comput., 69:109–128, 2015. doi: 10.1016/j.jsc.2014.09.032. URL https://doi.org/10.1016/j.jsc.2014.09.032.
- Lemmatization for stronger reasoning in large theories. In Carsten Lutz and Silvio Ranise (eds.), Frontiers of Combining Systems - 10th International Symposium, FroCoS 2015, Wroclaw, Poland, September 21-24, 2015. Proceedings, volume 9322 of Lecture Notes in Computer Science, pp. 341–356. Springer, 2015. doi: 10.1007/978-3-319-24246-0_21. URL https://doi.org/10.1007/978-3-319-24246-0_21.
- Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun (eds.), 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. URL http://arxiv.org/abs/1412.6980.
- Deep learning for symbolic mathematics. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020. URL https://openreview.net/forum?id=Ske31kBtPr.
- Isarstep: a benchmark for high-level mathematical reasoning. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=Pzj6fzU6wkj.
- The neuro-symbolic concept learner: Interpreting scenes, words, and sentences from natural supervision. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id=rJgMlhRctm.
- An evolutionary/heuristic-based proof searching framework for interactive theorem prover. Applied Soft Computing, 104:107200, 2021.
- Pytorch: An imperative style, high-performance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett (eds.), Advances in Neural Information Processing Systems 32, pp. 8024–8035. Curran Associates, Inc., 2019. URL http://papers.neurips.cc/paper/9015-pytorch-an-imperative-style-high-performance-deep-learning-library.pdf.
- Guiding Inferences in Connection Tableau by Recurrent Neural Networks. In Christoph Benzmüller and Bruce Miller (eds.), Intelligent Computer Mathematics, pp. 309–314, Cham, 2020. Springer International Publishing. ISBN 978-3-030-53518-6.
- Generative language modeling for automated theorem proving. CoRR, abs/2009.03393, 2020. URL https://arxiv.org/abs/2009.03393.
- Mathematical reasoning via self-supervised skip-tree training. arXiv preprint arXiv:2006.04757, 2020.
- Lemmas: Generation, selection, application. arXiv preprint arXiv:2303.05854, 2023.
- First Neural Conjecturing Datasets and Experiments. In Christoph Benzmüller and Bruce Miller (eds.), Intelligent Computer Mathematics, pp. 315–323, Cham, 2020. Springer International Publishing. ISBN 978-3-030-53518-6.
- Automated proof compression by invention of new definitions. In International Conference on Logic for Programming Artificial Intelligence and Reasoning, pp. 447–462. Springer, 2010.
- Philip Wadler. Propositions as types. Communications of the ACM, 58(12):75–84, 2015.
- Learning to prove theorems by learning to generate theorems. CoRR, abs/2002.07019, 2020. URL https://arxiv.org/abs/2002.07019.
- Exploration of neural machine translation in autoformalization of mathematics in mizar. Proceedings of ACM SIGPLAN International Conference on Certified Programs and Proofs, 2020.
- Daniel Whalen. Holophrasm: a neural automated theorem prover for higher-order logic, 2016.
- The scattering compositional learner: Discovering objects, attributes, relationships in analogical reasoning. CoRR, abs/2007.04212, 2020. URL https://arxiv.org/abs/2007.04212.
- INT: An Inequality Benchmark for Evaluating Generalization in Theorem Proving. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id=O6LPudowNQm.
- Learning to Prove Theorems via Interacting with Proof Assistants. In Proceedings of International Conference on Machine Learning (ICML), 2019.
- Leandojo: Theorem proving with retrieval-augmented language models. arXiv preprint arXiv:2306.15626, 2023.
Sponsor
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.