skip to main content
research-article
Open Access

Safety and conservativity of definitions in HOL and Isabelle/HOL

Published:27 December 2017Publication History
Skip Abstract Section

Abstract

Definitions are traditionally considered to be a safe mechanism for introducing concepts on top of a logic known to be consistent. In contrast to arbitrary axioms, definitions should in principle be treatable as a form of abbreviation, and thus compiled away from the theory without losing provability. In particular, definitions should form a conservative extension of the pure logic. These properties are crucial for modern interactive theorem provers, since they ensure the consistency of the logic, as well as a valid environment for total/certified functional programming.

We prove these properties, namely, safety and conservativity, for Higher-Order Logic (HOL), a logic implemented in several mainstream theorem provers and relied upon by thousands of users. Some unique features of HOL, such as the requirement to give non-emptiness proofs when defining new types and the impossibility to unfold type definitions, make the proof of these properties, and also the very formulation of safety, nontrivial.

Our study also factors in the essential variation of HOL definitions featured by Isabelle/HOL, a popular member of the HOL-based provers family. The current work improves on recent results which showed a weaker property, consistency of Isabelle/HOL's definitions.

Skip Supplemental Material Section

Supplemental Material

holandisabellehol.webm

References

  1. Andreas Abel, Thierry Coquand, and Peter Dybjer. 2007. Normalization by Evaluation for Martin-Lof Type Theory with Typed Equality Judgements. In LICS. 3–12. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Mark Adams. 2010. Introducing HOL Zero (Extended Abstract). In ICMS ’10. Springer.Google ScholarGoogle Scholar
  3. Wolfgang Ahrendt, Bernhard Beckert, Richard Bubel, Reiner Hähnle, Peter H. Schmitt, and Mattias Ulbrich (Eds.). 2016. Deductive Software Verification - The KeY Book - From Theory to Practice. Springer.Google ScholarGoogle Scholar
  4. Thorsten Altenkirch. 1993. Proving Strong Normalization of CC by Modifying Realizability Semantics. In TYPES. 3–18.Google ScholarGoogle Scholar
  5. Rob Arthan. 2014. "HOL Constant Definition Done Right". In ITP. 531–536. Google ScholarGoogle ScholarCross RefCross Ref
  6. R. D. Arthan. 2004. Some Mathematical Case Studies in ProofPower–HOL. In TPHOLs.Google ScholarGoogle Scholar
  7. Andrea Asperti, Wilmer Ricciotti, Claudio Sacerdoti Coen, and Enrico Tassi. 2011. The Matita Interactive Theorem Prover. In CADE. 64–69. Google ScholarGoogle Scholar
  8. Bruno Barras. 2010. Sets in Coq, Coq in Sets. Journal of Formalized Reasoning 3, 1 (2010).Google ScholarGoogle Scholar
  9. Yves Bertot and Pierre Casteran. 2004. Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions. Springer. Google ScholarGoogle ScholarCross RefCross Ref
  10. Jasmin Christian Blanchette, Johannes Hölzl, Andreas Lochbihler, Lorenz Panny, Andrei Popescu, and Dmitriy Traytel. 2014. Truly Modular (Co)datatypes for Isabelle/HOL. In ITP, Vol. 8558. 93–110.Google ScholarGoogle Scholar
  11. Ana Bove, Peter Dybjer, and Ulf Norell. 2009. A Brief Overview of Agda—A Functional Language with Dependent Types. In TPHOLs.Google ScholarGoogle Scholar
  12. Alonzo Church. 1940. A Formulation of the Simple Theory of Types. The Journal of Symbolic Logic 5, 2 (1940), 56–68. Google ScholarGoogle ScholarCross RefCross Ref
  13. Thierry Coquand, Jean Gallier, and Le Chesnay Cedex. 1990. A Proof of Strong Normalization For the Theory of Constructions Using a Kripke-Like Interpretation. In Workshop on Logical Frameworks.Google ScholarGoogle Scholar
  14. Thierry Coquand and Arnaud Spiwack. 2006. A Proof of Strong Normalisation using Domain Theory. In LICS. 307–316. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Karl Crary and Stephanie Weirich. 1999. Flexible Type Analysis. In ICFP. 233–248. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Karl Crary, Stephanie Weirich, and J. Gregory Morrisett. 1998. Intensional Polymorphism in Type-Erasure Semantics. In ICFP. 301–312. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Javier Esparza, Peter Lammich, René Neumann, Tobias Nipkow, Alexander Schimpf, and Jan-Georg Smaus. 2013. A Fully Verified Executable LTL Model Checker. In CAV. 463–478. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Arve Gengelbach and Tjark Weber. 2017. Model-Theoretic Conservative Extension for Definitional Theories. (2017). Pre-proceedings of LSFA 2017. Available at http://lsfa2017.cic.unb.br/LSFA2017.pdf .Google ScholarGoogle Scholar
  19. J.H. Geuvers. 1993. Logics and Type systems. Ph.D. Dissertation. University of Nijmegen.Google ScholarGoogle Scholar
  20. Lorenzo Gheri and Andrei Popescu. 2017. A Formalized General Theory of Syntax with Bindings. In ITP. 241–261. Google ScholarGoogle ScholarCross RefCross Ref
  21. M. J. C. Gordon and T. F. Melham (Eds.). 1993. Introduction to HOL: A Theorem Proving Environment for Higher Order Logic. Cambridge University Press.Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Florian Haftmann and Makarius Wenzel. 2006. Constructive Type Classes in Isabelle.. In TYPES. 160–174.Google ScholarGoogle Scholar
  23. John Harrison. 1996. HOL Light: A Tutorial Introduction. In FMCAD. Springer. Google ScholarGoogle ScholarCross RefCross Ref
  24. John Harrison. 2006. Towards self-verification of HOL Light. In IJCAR. Springer. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. John Harrison. 2009. HOL Light: An Overview. In TPHOLs. 60–66.Google ScholarGoogle Scholar
  26. Leon Henkin. 1949. The Completeness of the First-Order Functional Calculus. J. Symbolic Logic 14, 3 (09 1949), 159–166.Google ScholarGoogle ScholarCross RefCross Ref
  27. Isabelle. 2016. The Isabelle Library. (2016). https://isabelle.in.tum.de/dist/library/HOL/index.html .Google ScholarGoogle Scholar
  28. Matt Kaufmann, Panagiotis Manolios, and J Strother Moore. 2000. Computer-Aided Reasoning: An Approach. Kluwer Academic Publishers.Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Gerwin Klein, June Andronick, Kevin Elphinstone, Gernot Heiser, David Cock, Philip Derrin, Dhammika Elkaduwe, Kai Engelhardt, Rafal Kolanski, Michael Norrish, Thomas Sewell, Harvey Tuch, and Simon Winwood. 2010. seL4: formal verification of an operating-system kernel. Commun. ACM 53, 6 (2010), 107–115. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Gerwin Klein, Tobias Nipkow, Larry Paulson, and René Thiemann (eds.). 2016. Isabelle’s Archive of Formal Proofs. (2016).Google ScholarGoogle Scholar
  31. Alexander Krauss. 2009. Automating recursive definitions and termination proofs in higher-order logic. Ph.D. Dissertation. Technical University Munich.Google ScholarGoogle Scholar
  32. Ramana Kumar, Rob Arthan, Magnus O. Myreen, and Scott Owens. 2014. HOL with Definitions: Semantics, Soundness, and a Verified Implementation. In ITP. 308–324.Google ScholarGoogle Scholar
  33. Ramana Kumar, Rob Arthan, Magnus O. Myreen, and Scott Owens. 2016. Self-Formalisation of Higher-Order Logic -Semantics, Soundness, and a Verified Implementation. J. Autom. Reasoning 56, 3 (2016), 221–259. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Ondřej Kunčar. 2015. Correctness of Isabelle’s Cyclicity Checker: Implementability of Overloading in Proof Assistants. In CPP. 85–94.Google ScholarGoogle Scholar
  35. Ondřej Kunčar and Andrei Popescu. 2015. A Consistent Foundation for Isabelle/HOL. In ITP. 234–252.Google ScholarGoogle Scholar
  36. Ondřej Kunčar and Andrei Popescu. 2016. From Types To Sets By Local Type Definitions in Higher-Order Logic. In ITP. 200–218. Google ScholarGoogle ScholarCross RefCross Ref
  37. Ondřej Kunčar and Andrei Popescu. 2017a. Comprehending Isabelle/HOL’s Consistency. In ESOP. 724–749.Google ScholarGoogle Scholar
  38. Ondřej Kunčar and Andrei Popescu. 2017b. Safety and Conservativity of Definitions in HOL and Isabelle/HOL: Extended Version. (2017). www.andreipopescu.uk/pdf/popl2018_extended.pdf .Google ScholarGoogle Scholar
  39. Ondřej Kunčar and Andrei Popescu. 2017c. Safety and Conservativity of Definitions in HOL and Isabelle/HOL: Isabelle/HOL Implementation. (2017). http://www21.in.tum.de/~kuncar/documents/unf.html .Google ScholarGoogle Scholar
  40. K. Rustan M. Leino. 2010. Dafny: An Automatic Program Verifier for Functional Correctness. In LPAR (Dakar). 348–370.Google ScholarGoogle Scholar
  41. Andreas Lochbihler. 2010. Verifying a Compiler for Java Threads. In ESOP. 427–447. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Thomas F. Melham. 1989. Automating Recursive Type Definitions in Higher Order Logic. In Current Trends in Hardware Verification and Automated Theorem Proving. 341–386. Google ScholarGoogle ScholarCross RefCross Ref
  43. Magnus O. Myreen and Jared Davis. 2014. The Reflective Milawa Theorem Prover Is Sound - (Down to the Machine Code That Runs It). In ITP. 421–436.Google ScholarGoogle Scholar
  44. Tobias Nipkow and Gerwin Klein. 2014. Concrete Semantics - With Isabelle/HOL. Springer.Google ScholarGoogle Scholar
  45. Tobias Nipkow, Lawrence Paulson, and Markus Wenzel. 2002. Isabelle/HOL — A Proof Assistant for Higher-Order Logic. LNCS, Vol. 2283. Springer.Google ScholarGoogle Scholar
  46. Tobias Nipkow and Gregor Snelting. 1991. Type Classes and Overloading Resolution via Order-Sorted Unification. In Functional Programming Languages and Computer Architecture. Google ScholarGoogle ScholarCross RefCross Ref
  47. Michael Norrish. 2004. Recursive Function Definition for Types with Binders. In TPHOLs. 241–256. Google ScholarGoogle ScholarCross RefCross Ref
  48. Steven Obua. 2006. Checking Conservativity of Overloaded Definitions in Higher-Order Logic.. In RTA. 212–226. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. Sam Owre and Natarajan Shankar. 1999. The Formal Semantics of PVS. (1999). SRI technical report. http://www.csl.sri.com/ papers/csl- 97- 2/ .Google ScholarGoogle Scholar
  50. Lawrence C. Paulson. 1990. A formulation of the simple theory of types (for Isabelle). In COLOG-88. 246–274.Google ScholarGoogle Scholar
  51. Lawrence C. Paulson. 2010. Three Years of Experience with Sledgehammer, a Practical Link between Automatic and Interactive Theorem Provers. In PAAR. 1–10.Google ScholarGoogle Scholar
  52. Frank Pfenning and Carsten Schürmann. 1999. System Description: Twelf - A Meta-Logical Framework for Deductive Systems. In CADE. 202–206.Google ScholarGoogle Scholar
  53. Brigitte Pientka and Joshua Dunfield. 2010. Beluga: A Framework for Programming and Reasoning with Deductive Systems (System Description). In IJCAR. 15–21.Google ScholarGoogle Scholar
  54. A. Pitts. 1993. Introduction to HOL: A Theorem Proving Environment for Higher Order Logic, Chapter The HOL Logic, 191–232. In Gordon and Melham [ Gordon and Melham 1993 ].Google ScholarGoogle Scholar
  55. Andrei Popescu and Elsa L. Gunter. 2011. Recursion principles for syntax with bindings and substitution. In ICFP. 346–358. Google ScholarGoogle ScholarDigital LibraryDigital Library
  56. Andrei Popescu, Elsa L. Gunter, and Christopher J. Osborn. 2010. Strong Normalization for System F by HOAS on Top of FOAS. In LICS. 31–40.Google ScholarGoogle Scholar
  57. John C. Reynolds. 1983. Types, Abstraction and Parametric Polymorphism. In IFIP Congress. 513–523.Google ScholarGoogle Scholar
  58. Donald Sannella and Andrzej Tarlecki. 2012. Foundations of Algebraic Specification and Formal Software Development. Springer. I–XVI, 1–581 pages.Google ScholarGoogle Scholar
  59. Konrad Slind and Michael Norrish. 2008. "A Brief Overview of HOL4". In TPHOLs. 28–32. Google ScholarGoogle ScholarDigital LibraryDigital Library
  60. Dmitriy Traytel, Andrei Popescu, and Jasmin Christian Blanchette. 2012. Foundational, Compositional (Co)datatypes for Higher-Order Logic: Category Theory Applied to Theorem Proving. In LICS. 596–605.Google ScholarGoogle Scholar
  61. D. A. Turner. 2004. Total Functional Programming. J. UCS 10, 7 (2004), 751–768.Google ScholarGoogle Scholar
  62. Markus Wenzel. 1997. Type Classes and Overloading in Higher-Order Logic.. In TPHOLs. 307–322. Google ScholarGoogle ScholarCross RefCross Ref
  63. Markus Wenzel. 1999. Isar - A Generic Interpretative Approach to Readable Formal Proof Documents. In TPHOLs. 167–184.Google ScholarGoogle Scholar
  64. Makarius Wenzel. 2014. System description: Isabelle/jEdit in 2014. In UITP. 84–94.Google ScholarGoogle Scholar
  65. Freek Wiedijk. 2009. Stateless HOL. In TYPES. 47–61.Google ScholarGoogle Scholar
  66. Burkhart Wolff. 2015. Isabelle Foundation & Certification. (2015). Archived at https://lists.cam.ac.uk/pipermail/ cl- isabelle- users/2015- September/thread.html .Google ScholarGoogle Scholar

Index Terms

  1. Safety and conservativity of definitions in HOL and Isabelle/HOL

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!