Classifying Proof Strategies in Abella
Total Page:16
File Type:pdf, Size:1020Kb
ABSTRACT CLASSIFYING PROOF STRATEGIES IN ABELLA In the realm of logic certain domains have kept their head above water, resisting the thrust of automation. As such, interactive theorem provers exist for these higher-order or more complex logics, demanding significant expenditures of human expertise and time. Recent decades have witnessed many attempts to bring automation to interactive theorem provers, and the last ten years have seen an explosion of machine learning research on the topic. This thesis defines a representation for proofs that are completed interactively in the theorem prover Abella based on the concept of strategies. The core idea is that certain strategies for applying the inductive hypothesis and following the structure of definitions within the specification can both be used to help automate proofs, and instances of these strategies can be extracted from existing proofs. The latter is the focus of this work, providing the implementation details along with the programs for parsing proof data, interacting with the Abella system to reprove proof scripts, and transforming the extracted data into the abstract representation corresponding to strategies. This representation starts with targets which annotate each proof step with information tied to the strategy. Then a proof tree is constructed, which captures the dependencies between proof steps; and the combination of targets and proof tree and transformed into a proof frame, the abstraction that corresponds directly with a strategy. The potential of this data abstraction to facilitate partial and full automation along with proof visualization and summary is explained and put forth as future work. Joseph Reeves August 2020 CLASSIFYING PROOF STRATEGIES IN ABELLA by Joseph Reeves A thesis submitted in partial fulfillment of the requirements for the degree of Master of Science in Computer Science in the College of Science and Mathematics California State University, Fresno August 2020 © 2020 Joseph Reeves APPROVED For the Department of Computer Science: We, the undersigned, certify that the thesis of the following student meets the required standards of scholarship, format, and style of the university and the student's graduate degree program for the awarding of the master's degree. Joseph Reeves Thesis Author Todd Wilson (Chair) Computer Science Ming Li Computer Science David Ruby Computer Science For the University Graduate Committee: Dean, Division of Graduate Studies AUTHORIZATION FOR REPRODUCTION OF MASTER’S THESIS I grant permission for the reproduction of this thesis in part or in its entirety without further authorization from me, on the condition that the person or agency requesting reproduction absorbs the cost and provides proper acknowledgment of authorship. X Permission to reproduce this thesis in part or in its entirety must be obtained from me. Signature of thesis author: Joseph Reeves ACKNOWLEDGMENTS First and foremost, I would like to thank Todd Wilson for his role as advisor to this thesis. Since taking his CSci 217 course two years ago, each semester has been filled with office visits that spiraled into long conversations; and these conversations were what cultivated my interest in type-theory, logic, and computation. And his intuitions about the field provided key guidance in the development of this thesis, and really helped get the work off the ground. Additionally, I would like to thank Ming Li for opening the door to my academic career, inviting me to a research team and advising our group through several publications and conference presentations. In this group, Carlos Moreno was an outstanding research mentor, showing me the ropes and often rewriting my buggy code. My interests in the fields of logic, computation, and artificial intelligence were aroused through courses I took with David Ruby, as well as the math department professors Oscar and Maria Nogin. Their lecturing, or independent studies, directed me towards areas that I found exciting. Lastly, I would like to thank my family and friends for supporting me through this process; as well as the students I instructed, many of which I can now call friends, that kept academic life enjoyable. TABLE OF CONTENTS Page LIST OF FIGURES ............................................................................................................. viii INTRODUCTION.................................................................................................................... 1 Theorem Proving.............................................................................................................. 1 The Future of Theorem Proving...................................................................................... 4 Thesis Contributions ........................................................................................................ 7 Thesis Overview .............................................................................................................. 9 RELATED WORK ................................................................................................................ 10 Proof Systems................................................................................................................. 11 Automation with Learning ............................................................................................ 14 Automation with Expert Knowledge and Strategies.................................................... 21 Proof Capture ................................................................................................................. 25 Conclusion ...................................................................................................................... 27 AN INTRODUCTION TO ABELLA .................................................................................. 29 The Abella Logical Framework .................................................................................... 29 Proving Add Exists ........................................................................................................ 31 Why Abella? ................................................................................................................... 38 Additional Example Proofs ........................................................................................... 38 PROOF STRATEGIES.......................................................................................................... 39 Inductive Proof Schemes ............................................................................................... 40 Connecting a Strategy with a Definition ...................................................................... 43 Strategy Description ...................................................................................................... 48 Additional Strategies...................................................................................................... 49 EXTRACTING PROOF DATA ........................................................................................... 51 vii vii Page The Two-Phase Approach ............................................................................................. 51 The Static Phase ............................................................................................................. 52 The Dynamic Phase ....................................................................................................... 53 ABSTRACTING A PROOF ................................................................................................. 58 Targets ............................................................................................................................ 58 Nodes ............................................................................................................................ 71 Proof Trees ..................................................................................................................... 72 Proof Frames .................................................................................................................. 81 Querying the Data .......................................................................................................... 87 SOLVING PROOFS USING STRATEGIES ...................................................................... 89 Using a Strategy ............................................................................................................. 89 Filling in the Frame........................................................................................................ 91 CONCLUSION ...................................................................................................................... 96 REFERENCES ....................................................................................................................... 98 APPENDICES ...................................................................................................................... 102 APPENDIX A: EXAMPLE SPECIFICATIONS AND THEOREMS ............................. 103 LIST OF FIGURES Page Figure 1. Proof diagram for the theorem add exists, with an Abella-like syntax. ............... 3 Figure 2. Example sig file. ..................................................................................................... 32 Figure 3. Example mod file. .................................................................................................. 33 Figure 4. Add exists proof screen 1. ....................................................................................