6.2 Presenting Formal and Informal Mathematics
Total Page:16
File Type:pdf, Size:1020Kb
PDF hosted at the Radboud Repository of the Radboud University Nijmegen The following full text is a publisher's version. For additional information about this publication click this link. http://hdl.handle.net/2066/119001 Please be advised that this information was generated on 2021-09-27 and may be subject to change. Documentation and Formal Mathematics Web Technology meets Theorem Proving Proefschrift ter verkrijging van de graad van doctor aan de Radboud Universiteit Nijmegen, op gezag van de rector magnificus prof. mr. S.C.J.J. Kortmann, volgens besluit van het college van decanen in het openbaar te verdedigen op dinsdag 17 december 2013 om 12.30 uur precies door Carst Tankink geboren op 21 januari 1986 te Warnsveld Promotor: Prof. dr. J.H. Geuvers Copromotor: Dr. J.H. McKinna Manuscriptcommissie: Prof. dr. H.P. Barendregt Prof. dr. M. Kohlhase (Jacobs University, Bremen) Dr. M. Wenzel (Université Paris Sud) ISBN:978-94-6191-963-2 This research has been carried out under the auspices of the research school IPA (Institute for Programming research and Algorithmics). The author was supported by the Netherlands Organisation for Scientific Research (NWO) under the project “MathWiki: a Web-based Collaborative Authoring Environment for Formal Proofs”. cbaThis work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License. The source code of this thesis is available at https://bitbucket.org/Carst/thesis. Contents Contents iii Preface vii 1 Introduction 1 1.1 Wikis and other Web Technology . .2 1.2 Tools of the Trade: Interactive Theorem Provers . .4 1.3 Collaboration or Communication . .5 1.4 Contributions and Outline of this Thesis . .6 2 Architecture of Agora 9 2.1 Introduction . .9 2.2 Users . .9 2.2.1 Reader . 12 2.2.2 Author . 13 2.2.3 Narrator . 14 2.3 Validation . 15 2.4 Documents . 18 2.4.1 Markup languages . 19 2.4.2 Scene types . 20 2.4.3 Providing functionality . 21 2.5 Repositories . 23 2.5.1 Version control . 23 2.5.2 Community features . 24 3 Proviola 25 3.1 Introduction . 25 3.2 Motivation . 25 3.3 Communicating a Formal Proof . 28 3.4 Proof Movies . 30 3.4.1 Watching a Movie . 31 3.4.2 Creating a Movie . 32 3.5 Rich Movies: Narratives in Coqdoc . 34 3.5.1 Course notes . 35 3.6 Enhancing movies with commentary . 35 3.6.1 Rendering enhanced movies . 36 3.6.2 Scenes: Structuring a Narrative . 37 3.7 Adding Commentary to a Proof . 38 iii iv CONTENTS 3.8 Towards Interactive Movies . 39 3.8.1 Writing Editable scenes . 41 3.8.2 Interacting with Editable Scenes . 41 3.9 Related work . 42 3.10 Conclusions . 43 4 Point and Write 45 4.1 Introduction . 45 4.2 Describing and Including Formal Text . 46 4.2.1 Use Case . 46 4.2.2 Alternatives for Inclusion . 47 4.3 Syntax for Referring . 48 4.3.1 Requirements on syntax . 49 4.3.2 Resulting Syntax . 50 4.4 Annotation of Types and Content . 51 4.4.1 The Type Vocabulary of the OMDoc Ontology . 52 4.4.2 Datasets for Content Annotation . 52 4.5 Annotating Formal Texts . 53 4.6 Point-and-Write in Agora . 55 4.7 Conclusions and Future Work . 57 5 Authoring 59 5.1 Introduction . 59 5.2 Proving in Agora: Managing Context . 62 5.3 Document representations . 65 5.3.1 Server model . 65 5.3.2 Client model . 65 5.3.3 Communication . 66 5.4 Synchronizing the document . 67 5.4.1 Update_server: updating the server-side from the client . 67 5.4.2 Update_client: getting frame data from the server . 68 5.5 Computing with the documents . 71 5.5.1 A theorem prover driver . 71 5.6 Conclusions and Further Work . 74 6 Case Study 77 6.1 Introduction . 77 6.1.1 Similar Systems . 79 6.2 Presenting Formal and Informal Mathematics . 80 6.2.1 Informal Descriptions . 81 6.2.2 Formal Texts . 81 6.3 Document Structure: Frames and Scenes . 81 6.4 Interaction with Formal HOL Light Code . 84 6.4.1 Parsing and Proving . 85 6.4.2 Hyperlinking . 88 6.4.3 Editing and Proof Advising . 88 6.5 Inclusion of the Informal Flyspeck Texts . 90 6.5.1 Structure of the source text . 90 6.5.2 Transformation to Creole . 90 CONTENTS v 6.6 Conclusion and Future Work . 91 7 Conclusions 93 Samenvatting 97 Summary 99 Curriculum Vitae 101 Bibliography 103 vi CONTENTS Preface There is only one name on the front of this thesis, but as any researcher can tell you, you cannot do research and produce a thesis on your own. I have been especially fortunate to have a group of people who supported me, both professionally and personally, through the last four years. First, I want to thank Herman and James, who have supervised me during my Ph.D. research, allowing me to plot my own course, but expertly guiding me with the right questions and requests for clarification. This thesis was reviewed by a manuscript committee of three people, who sacrificed valuable time to read the manuscript and provide comments. Thank you, Henk, Michael and Makarius. When I defend this thesis, it will be before a committee of people in addition to the three above, who have likewise sacrificed their time: thank you, Johan, Theo, Freek and Julien. While I am thanking people who have read my texts over the years, I would like to thank the anonymous referees who have read the papers that formed the basis of this thesis. Their comments have improved the overall quality of the thesis. During the ceremony, I will be supported by two wonderful “paranimpfen”: thank you, Maya and Pim. I have done my research in collaboration with many others. I want to thank Josef especially for being a collaborator on the MathWiki project and writing papers with me, and Freek for planting the seed of what would become the Proviola. In addition, I am thankful to have worked together with Christoph and Cezary on two papers, who provided an external view on the research. Back in Eindhoven, there were several people who have set me on an academic path: Jan Friso decided to hire me as a student assistant in his MCRL2 team, after a suggestion by Michel. Francien supervised me during my master’s thesis research, and was the one who suggested I talk to Herman, causing me to start on this path. In Nijmegen, I had the pleasure of sharing a room with many interesting and friendly people. One in particular stands out. Maya, thank you for being an awesome office mate, someone to talk to, complain to and drink tea (or cofee) with. Dick, Eelis, Evgeni, Hans, Jan, Saskia and Yowon, thank you as well for sharing the office with me over the years. Alyona, thank you for sharing train rides with me for a year, and reflecting on Dutch culture versus Russian culture. The Intelligent Systems group gave me some very nice colleagues over the years. At the risk of forgetting someone and being reminded of on a later date, I want to thank Alexandra, Ali, Andrew, Bram, Dan, Daniel, Dimitrios, Elena, Fabio, Georgiana, Giulio, Janos, Jonce, Joris, Kasper, Lionel, Max, Nicole, Robbert, Saiden, Suzan, Tjeerd, Tom, Tom, Twan, Wout and Wouter As a Ph.D. student, I was a member of the IPA research school, which provided several occasions for getting social with other Ph.D. students. I want to thank Tim and Meivan for organizing these events, and all members with whom I have talked, discussed and drunk. vii viii PREFACE Jeroen in particular has been a friend since we started university together and still is. I have many happy memories of attending the Oregon Programming Language Summer School in 2011, and I met more people than I can thank by name. However, I want to thank Andrew for lending me his shirt when my luggage took a trip of its own with United, Sneha for being the happy presence of the school, and Emma and Joey for taking me bouldering for the first time. Speaking of bouldering, as I mention in my “Stellingen”, it is the ideal sport for scientists. Thanks to the people at Monk Eindhoven for running the gym, and Daniel, Janina and Tim, Tom and Twan for making the sport social on occasion. The second hobby that supported me socially during the Ph.D. is playing RPGs. Thank you Bart, Kris, Maikel, Mark, Peter and Rom for playing the campaigns with me. Having the unconditional love of a dog to fall back on is something that is impossible to overestimate, and since dogs cannot read, I want to thank the people who allowed us to take them into our lives: Jannes and Anja, thank you for Ayla, even though she could not stay with us for long. Arthur and Paulien, thank you for Kaylee, who is lying next to me on the sofa as I write this. Dad, mom and Bram, thank you for all the support you have given me over the years. Even if it was difficult for you to understand exactly what I was doing in my research, you occasionally tried :-) Finally, there is one more person who needs to be thanked. Cora, my love, thank you for always being there for me, even when things were not going well for yourself. Carst Tankink, Eindhoven, October 15, 2013. Chapter 1 Introduction Computer verified mathematics is a field on the border between computer science and math- ematics: its aim is to develop tools and languages that allow mathematicians to write proofs that can be verified by a computer.