HOL Light QE

We are interested in algorithms that manipulate mathematical expressions in mathematically meaningful ways. Expressions are syntactic, but most logics do not allow one to discuss syntax. ${\rm CTT}_{\rm qe}$ is a version of Church's type theory that includes quotation and evaluation operators, akin to quote and eval in the Lisp programming language. Since the HOL logic is also a version of Church's type theory, we decided to add quotation and evaluation to HOL Light to demonstrate the implementability of ${\rm CTT}_{\rm qe}$ and the benefits of having quotation and evaluation in a proof assistant. The resulting system is called HOL Light QE. Here we document the design of HOL Light QE and the challenges that needed to be overcome. The resulting implementation is freely available.

[1]  Assia Mahboubi,et al.  An introduction to small scale reflection in Coq , 2010, J. Formaliz. Reason..

[2]  William M. Farmer,et al.  Incorporating Quotation and Evaluation into Church's Type Theory: Syntax and Semantics , 2016, CICM.

[3]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[4]  Jason Hickey,et al.  Reflection and its application to mechanized metareasoning about programming languages , 2007 .

[5]  Robert S. Boyer,et al.  Metafunctions: Proving Them Correct and Using Them Efficiently as New Proof Procedures. , 1979 .

[6]  Thomas F. Melham,et al.  On the Semantics of ReFLect as a Basis for a Reflective Theorem Prover , 2013, ArXiv.

[7]  Matt Kaufmann,et al.  Meta Reasoning in ACL2 , 2005, TPHOLs.

[8]  Samuel Boutin,et al.  Using Reflection to Build Efficient and Certified Decision Procedures , 1997, TACS.

[9]  Willard Van Orman Quine Mathematical Logic: Revised Edition , 1982 .

[10]  Robert S. Boyer,et al.  A computational logic handbook , 1979, Perspectives in computing.

[11]  David R. Christiansen,et al.  Elaborator reflection: extending Idris in Idris , 2016, ICFP.

[12]  Xin Yu,et al.  A computational approach to reflective meta-reasoning about languages with bindings , 2005, MERLIN '05.

[13]  Jim Grundy,et al.  A reflective functional language for hardware design and theorem proving , 2005, Journal of Functional Programming.

[14]  Robert L. Constable,et al.  Formalized Metareasoning in Type Theory , 1986, LICS.

[15]  Florian Rabe Generic Literals , 2015, CICM.

[16]  Robert L. Constable,et al.  Using Reflection to Explain and Enhance Type Theory , 1995 .

[17]  Xin Yu,et al.  MetaPRL - A Modular Logical Environment , 2003, TPHOLs.

[18]  John Harrison,et al.  HOL Light: An Overview , 2009, TPHOLs.

[19]  David Raymond Christiansen,et al.  Practical Reflection and Metaprogramming for Dependent Types , 2016 .

[20]  Leon Henkin,et al.  Completeness in the theory of types , 1950, Journal of Symbolic Logic.

[21]  David Raymond Christiansen Type-Directed Elaboration of Quasiquotations: A High-Level Syntax for Low-Level Reflection , 2014, IFL.

[22]  Jacques Carette,et al.  Formalizing Mathematical Knowledge as a Biform Theory Graph: A Case Study , 2017, CICM.

[23]  Eli Barzilay,et al.  Implementing Reflection in Nuprl , 2005 .

[24]  Benjamin Grégoire,et al.  Proving Equalities in a Commutative Ring Done Right in Coq , 2005, TPHOLs.

[25]  P. D. van der Walt,et al.  Reflection in Agda , 2012 .

[26]  G. A. Kavvos,et al.  On the Semantics of Intensionality and Intensional Recursion , 2017, ArXiv.

[27]  Jeremy Avigad,et al.  A metaprogramming framework for formal verification , 2017, Proc. ACM Program. Lang..

[28]  Wouter Swierstra,et al.  Engineering Proof by Reflection in Agda , 2012, IFL.

[29]  Ralf Hinze,et al.  A Reflection-based Proof Tactic for Lattices in Coq , 2009, Trends in Functional Programming.

[30]  Martin A. Giese,et al.  Towards Practical Reflection for Formal Mathematics , 2007 .

[31]  Tobias Nipkow,et al.  Proof Synthesis and Reflection for Linear Arithmetic , 2008, Journal of Automated Reasoning.

[32]  Harald Ruess,et al.  Case Studies in Meta-Level Theorem Proving , 1998, TPHOLs.

[33]  Douglas J. Howe Reflecting the semantics of reflected proof , 1993 .

[34]  Andrew Polonsky Axiomatizing the Quote , 2011, CSL.

[35]  William M. Farmer Incorporating Quotation and Evaluation into Church's Type Theory: Syntax and Semantics , 2016, CICM.

[36]  Peter B. Andrews An introduction to mathematical logic and type theory - to truth through proof , 1986, Computer science and applied mathematics.

[37]  Alan Bawden,et al.  Quasiquotation in Lisp , 1999, PEPM.

[38]  Robert L. Constable,et al.  The semantics of reflected proof , 1990, [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science.

[39]  Alonzo Church,et al.  A formulation of the simple theory of types , 1940, Journal of Symbolic Logic.

[40]  Monika Gruber Alfred Tarski and the "Concept of Truth in Formalized Languages" , 2016 .

[41]  P. Kleingeld,et al.  The Stanford Encyclopedia of Philosophy , 2013 .

[42]  Jeremy Avigad,et al.  A Machine-Checked Proof of the Odd Order Theorem , 2013, ITP.

[43]  Koji Nakagawa,et al.  Theorema: Towards computer-aided mathematical theory exploration , 2006, J. Appl. Log..

[44]  Tobias Nipkow,et al.  A FORMAL PROOF OF THE KEPLER CONJECTURE , 2015, Forum of Mathematics, Pi.

[45]  Herman Geuvers,et al.  Proof by computation in the Coq system , 2002, Theor. Comput. Sci..

[46]  William M. Farmer The Formalization of Syntax-Based Mathematical Algorithms Using Quotation and Evaluation , 2013, MKM/Calculemus/DML.

[47]  J. Strother Moore,et al.  An Industrial Strength Theorem Prover for a Logic Based on Common Lisp , 1997, IEEE Trans. Software Eng..

[48]  Manuel Clavel,et al.  Reflection in conditional rewriting logic , 2002, Theor. Comput. Sci..

[49]  Stefania Costantini,et al.  Meta-reasoning: A Survey , 2002, Computational Logic: Logic Programming and Beyond.

[50]  Ulf Norell,et al.  Dependently typed programming in Agda , 2009, TLDI '09.

[51]  M. Gordon,et al.  Introduction to HOL: a theorem proving environment for higher order logic , 1993 .

[52]  Damien Pous,et al.  Tactics for Reasoning Modulo AC in Coq , 2011, CPP.

[53]  Georges Gonthier,et al.  The Four Colour Theorem: Engineering of a Formal Proof , 2008, ASCM.

[54]  Norbert Völker HOL2P - A System of Classical Higher Order Logic with Second Order Polymorphism , 2007, TPHOLs.

[55]  J. Harrison Metatheory and Reflection in Theorem Proving: A Survey and Critique , 1995 .

[56]  Adam Chlipala,et al.  Certified Programming with Dependent Types - A Pragmatic Introduction to the Coq Proof Assistant , 2013 .