skip to main content

Admissible Types-to-PERs Relativization in Higher-Order Logic

Published:11 January 2023Publication History
Skip Abstract Section

Abstract

Relativizing statements in Higher-Order Logic (HOL) from types to sets is useful for improving productivity when working with HOL-based interactive theorem provers such as HOL4, HOL Light and Isabelle/HOL. This paper provides the first comprehensive definition and study of types-to-sets relativization in HOL, done in the more general form of types-to-PERs (partial equivalence relations). We prove that, for a large practical fragment of HOL which includes container types such as datatypes and codatatypes, types-to-PERs relativization is admissible, in that the provability of the original, type-based statement implies the provability of its relativized, PER-based counterpart. Our results also imply the admissibility of a previously proposed axiomatic extension of HOL with local type definitions. We have implemented types-to-PERs relativization as an Isabelle tool that performs relativization of HOL theorems on demand.

References

  1. Martín Abadi and Gordon D. Plotkin. 1990. A Per Model of Polymorphism and Recursive Types. In LICS 1990. IEEE Computer Society, 355–365. https://doi.org/10.1109/LICS.1990.113761 Google ScholarGoogle ScholarCross RefCross Ref
  2. Michael Gordon Abbott, Thorsten Altenkirch, and Neil Ghani. 2005. Containers: Constructing strictly positive types. Theor. Comput. Sci., 342, 1 (2005), 3–27. https://doi.org/10.1016/j.tcs.2005.06.002 Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Mark Adams. 2010. Introducing HOL Zero (Extended Abstract). In ICMS 2010, Komei Fukuda, Joris van der Hoeven, Michael Joswig, and Nobuki Takayama (Eds.) (LNCS, Vol. 6327). Springer, 142–143. https://doi.org/10.1007/978-3-642-15582-6_25 Google ScholarGoogle ScholarCross RefCross Ref
  4. Stuart F. Allen. 1987. A Non-Type-Theoretic Semantics for Type-Theoretic Language. Ph. D. Dissertation. Cornell University, USA. Google ScholarGoogle Scholar
  5. Thorsten Altenkirch, Simon Boulier, Ambrus Kaposi, and Nicolas Tabareau. 2019. Setoid Type Theory - A Syntactic Translation. In MPC 2019, Graham Hutton (Ed.) (LNCS, Vol. 11825). Springer, 155–196. https://doi.org/10.1007/978-3-030-33636-3_7 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Rob D. Arthan and Roger Bishop Jones. 2005. Z in HOL in ProofPower. In The Newsletter of the Formal Aspects of Computing Science (FACS) Specialist Group. issn:0950-1231 https://web.archive.org/web/20221014122152/https://www.bcs.org/media/3096/facts200503.pdf Google ScholarGoogle Scholar
  7. Andrea Asperti, Wilmer Ricciotti, Claudio Sacerdoti Coen, and Enrico Tassi. 2011. The Matita Interactive Theorem Prover. In CADE-23, Nikolaj S. Bjørner and Viorica Sofronie-Stokkermans (Eds.) (LNCS, Vol. 6803). Springer, 64–69. https://doi.org/10.1007/978-3-642-22438-6_7 Google ScholarGoogle ScholarCross RefCross Ref
  8. Gilles Barthe, Venanzio Capretta, and Olivier Pons. 2003. Setoids in type theory. J. Funct. Program., 13, 2 (2003), 261–293. https://doi.org/10.1017/S0956796802004501 Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Stefan Berghofer and Tobias Nipkow. 2000. Proof Terms for Simply Typed Higher Order Logic. In TPHOLs 2000, Mark Aagaard and John Harrison (Eds.) (LNCS, Vol. 1869). Springer, 38–52. https://doi.org/10.1007/3-540-44659-1_3 Google ScholarGoogle ScholarCross RefCross Ref
  10. Stefan Berghofer and Markus Wenzel. 1999. Inductive Datatypes in HOL – Lessons Learned in Formal-Logic Engineering. In TPHOLs 1999, Yves Bertot, Gilles Dowek, André Hirschowitz, Christine Paulin-Mohring, and Laurent Théry (Eds.) (LNCS, Vol. 1690). Springer, 19–36. https://doi.org/10.1007/3-540-48256-3_3 Google ScholarGoogle ScholarCross RefCross Ref
  11. Jean-Philippe Bernardy, Patrik Jansson, and Ross Paterson. 2012. Proofs for free – Parametricity for dependent types. J. Funct. Program., 22, 2 (2012), 107–152. https://doi.org/10.1017/S0956796812000056 Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Jean-Philippe Bernardy and Marc Lasson. 2011. Realizability and Parametricity in Pure Type Systems. In FOSSACS 2011, Martin Hofmann (Ed.) (LNCS, Vol. 6604). Springer, 108–122. https://doi.org/10.1007/978-3-642-19805-2_8 Google ScholarGoogle ScholarCross RefCross Ref
  13. Jean-Philippe Bernardy and Guilhem Moulin. 2012. A Computational Interpretation of Parametricity. In LICS 2012. IEEE Computer Society, 135–144. https://doi.org/10.1109/LICS.2012.25 Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Yves Bertot and Pierre Castéran. 2004. Interactive Theorem Proving and Program Development - Coq’Art: The Calculus of Inductive Constructions. Springer. https://doi.org/10.1007/978-3-662-07964-5 Google ScholarGoogle ScholarCross RefCross Ref
  15. 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 2014, Gerwin Klein and Ruben Gamboa (Eds.) (LNCS, Vol. 8558). Springer, 93–110. https://doi.org/10.1007/978-3-319-08970-6_7 Google ScholarGoogle ScholarCross RefCross Ref
  16. Ana Bove, Peter Dybjer, and Ulf Norell. 2009. A Brief Overview of Agda – A Functional Language with Dependent Types. In TPHOLs 2009, Stefan Berghofer, Tobias Nipkow, Christian Urban, and Makarius Wenzel (Eds.) (LNCS, Vol. 5674). Springer, 73–78. https://doi.org/10.1007/978-3-642-03359-9_6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Alonzo Church. 1940. A Formulation of the Simple Theory of Types. J. Symb. Log., 5, 2 (1940), 56–68. https://doi.org/10.2307/2266170 Google ScholarGoogle ScholarCross RefCross Ref
  18. Robert L. Constable, Stuart F. Allen, Mark Bromley, Rance Cleaveland, J. F. Cremer, Robert Harper, Douglas J. Howe, Todd B. Knoblock, N. P. Mendler, Prakash Panangaden, James T. Sasaki, and Scott F. Smith. 1986. Implementing mathematics with the Nuprl proof development system. Prentice Hall. isbn:978-0-13-451832-9 http://dl.acm.org/citation.cfm?id=10510 Google ScholarGoogle Scholar
  19. Leonardo Mendonça de Moura, Soonho Kong, Jeremy Avigad, Floris van Doorn, and Jakob von Raumer. 2015. The Lean Theorem Prover (System Description). In CADE-25, Amy P. Felty and Aart Middeldorp (Eds.) (LNCS, Vol. 9195). Springer, 378–388. https://doi.org/10.1007/978-3-319-21401-6_26 Google ScholarGoogle ScholarCross RefCross Ref
  20. Jose Divasón, Sebastiaan J. C. Joosten, Ondřej Kunčar, René Thiemann, and Akihisa Yamada. 2018. Efficient certification of complexity proofs: formalizing the Perron-Frobenius theorem (invited talk paper). In CPP 2018, June Andronick and Amy P. Felty (Eds.). ACM, 2–13. https://doi.org/10.1145/3167103 Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Jose Divasón and René Thiemann. 2022. A Formalization of the Smith Normal Form in Higher-Order Logic. J. Autom. Reason., 66, 4 (2022), 1065–1095. https://doi.org/10.1007/s10817-022-09631-5 Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Peter J. Freyd, P. Mulry, Giuseppe Rosolini, and Dana S. Scott. 1992. Extensional PERs. Inf. Comput., 98, 2 (1992), 211–227. https://doi.org/10.1016/0890-5401(92)90019-C Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Herman Geuvers. 2009. Proof assistants: History, ideas and future. Sadhana, 34, 1 (2009), 3–25. https://doi.org/10.1007/s12046-009-0001-5 Google ScholarGoogle ScholarCross RefCross Ref
  24. Georges Gonthier. 2007. The Four Colour Theorem: Engineering of a Formal Proof. In ASCM 2007, Deepak Kapur (Ed.) (LNCS, Vol. 5081). Springer, 333. https://doi.org/10.1007/978-3-540-87827-8_28 Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Michael J. C. Gordon. 1991. Introduction to the HOL System. In TPHOLs 1991, Myla Archer, Jeffrey J. Joyce, Karl N. Levitt, and Phillip J. Windley (Eds.). IEEE Computer Society, 2–3. Google ScholarGoogle ScholarCross RefCross Ref
  26. 1993. Introduction to HOL: A theorem proving environment for higher order logic, Michael J. C. Gordon and Tom F. Melham (Eds.). Cambridge University Press. isbn:0-521-44189-7 http://www.cs.ox.ac.uk/tom.melham/pub/Gordon-1993-ITH.html Google ScholarGoogle Scholar
  27. Adam Grabowski, Artur Kornilowicz, and Adam Naumowicz. 2010. Mizar in a Nutshell. J. Formaliz. Reason., 3, 2 (2010), 153–245. https://doi.org/10.6092/issn.1972-5787/1980 Google ScholarGoogle ScholarCross RefCross Ref
  28. Thomas C. Hales, Mark Adams, Gertrud Bauer, Dat Tat Dang, John Harrison, Truong Le Hoang, Cezary Kaliszyk, Victor Magron, Sean McLaughlin, Thang Tat Nguyen, Truong Quang Nguyen, Tobias Nipkow, Steven Obua, Joseph Pleso, Jason M. Rute, Alexey Solovyev, An Hoai Thi Ta, Trung Nam Tran, Diep Thi Trieu, Josef Urban, Ky Khac Vu, and Roland Zumkeller. 2015. A formal proof of the Kepler conjecture. CoRR, abs/1501.02155 (2015), arxiv:1501.02155. arxiv:1501.02155 Google ScholarGoogle Scholar
  29. John Harrison. 1996. HOL Light: A Tutorial Introduction. In FMCAD 1996, Mandayam K. Srivas and Albert John Camilleri (Eds.) (LNCS, Vol. 1166). Springer, 265–269. https://doi.org/10.1007/BFb0031814 Google ScholarGoogle ScholarCross RefCross Ref
  30. John Harrison. 2009. HOL Light: An Overview. In TPHOLs 2009, Stefan Berghofer, Tobias Nipkow, Christian Urban, and Makarius Wenzel (Eds.) (LNCS, Vol. 5674). Springer, 60–66. https://doi.org/10.1007/978-3-642-03359-9_4 Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Paul F. Hoogendijk and Oege de Moor. 2000. Container types categorically. J. Funct. Program., 10, 2 (2000), 191–225. https://doi.org/10.1017/s0956796899003640 Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Brian Huffman and Ondrej Kuncar. 2013. Lifting and Transfer: A Modular Design for Quotients in Isabelle/HOL. In CPP 2013, Georges Gonthier and Michael Norrish (Eds.) (LNCS, Vol. 8307). Springer, 131–146. https://doi.org/10.1007/978-3-319-03545-1_9 Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Fabian Immler and Bohua Zhan. 2019. Smooth manifolds and types to sets for linear algebra in Isabelle/HOL. In CPP 2019, Assia Mahboubi and Magnus O. Myreen (Eds.). ACM, 65–77. https://doi.org/10.1145/3293880.3294093 Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. The Isabelle Community. 2022. The HOL-Main session of the Isabelle/HOL distribution. https://isabelle.in.tum.de/website-Isabelle2021-1/dist/library/HOL/HOL/index.html Google ScholarGoogle Scholar
  35. The Isabelle Community. 2022. The Standard Library of the Isabelle/HOL distribution. https://isabelle.in.tum.de/website-Isabelle2021-1/dist/library/HOL/HOL-Library/index.html Google ScholarGoogle Scholar
  36. Matt Kaufmann, Panagiotis Manolios, and J Strother Moore. 2000. Computer-Aided Reasoning: An Approach. Kluwer Academic Publishers. https://doi.org/10.1007/978-1-4615-4449-4 Google ScholarGoogle ScholarCross RefCross Ref
  37. Stephen Cole Kleene. 1945. On the Interpretation of Intuitionistic Number Theory. J. Symb. Log., 10, 4 (1945), 109–124. https://doi.org/10.2307/2269016 Google ScholarGoogle ScholarCross RefCross Ref
  38. 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. https://doi.org/10.1145/1743546.1743574 Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Georg Kreisel. 1959. Interpretation of Analysis by Means of Constructive Functionals of Finite Types. In Constructivity in Mathematics, Arend Heyting (Ed.). Amsterdam: North-Holland Pub. Co., 101–128. Google ScholarGoogle Scholar
  40. Jean-Louis Krivine. 1993. Lambda-calculus, types and models. Masson. Google ScholarGoogle Scholar
  41. Ondřej Kunčar. 2015. Correctness of Isabelle’s Cyclicity Checker: Implementability of Overloading in Proof Assistants. In CPP 2015, Xavier Leroy and Alwen Tiu (Eds.). ACM, 85–94. https://doi.org/10.1145/2676724.2693175 Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Ondřej Kunčar and Andrei Popescu. 2015. A Consistent Foundation for Isabelle/HOL. In ITP 2015, Christian Urban and Xingyuan Zhang (Eds.) (LNCS, Vol. 9236). Springer, 234–252. https://doi.org/10.1007/978-3-319-22102-1_16 Google ScholarGoogle ScholarCross RefCross Ref
  43. Ondřej Kunčar and Andrei Popescu. 2018. Safety and conservativity of definitions in HOL and Isabelle/HOL. Proc. ACM Program. Lang., 2, POPL (2018), 24:1–24:26. https://doi.org/10.1145/3158112 Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. Ondřej Kunčar and Andrei Popescu. 2019. From Types to Sets by Local Type Definition in Higher-Order Logic. J. Autom. Reason., 62, 2 (2019), 237–260. https://doi.org/10.1007/s10817-018-9464-6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. Xavier Leroy. 2009. Formal verification of a realistic compiler. Commun. ACM, 52, 7 (2009), 107–115. https://doi.org/10.1145/1538788.1538814 Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. Thomas F. Melham. 1989. Automating Recursive Type Definitions in Higher Order Logic. In Current Trends in Hardware Verification and Automated Theorem Proving. 341–386. https://doi.org/10.1007/978-1-4612-3658-0_9 Google ScholarGoogle ScholarCross RefCross Ref
  47. Mihails Milehins. 2022. An extension of the framework types-to-sets for Isabelle/HOL. In CPP 2022, Andrei Popescu and Steve Zdancewic (Eds.). ACM, 180–196. https://doi.org/10.1145/3497775.3503674 Google ScholarGoogle ScholarDigital LibraryDigital Library
  48. John C. Mitchell. 1996. Foundations for programming languages. MIT Press. isbn:978-0-262-13321-0 Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. John Myhill and John Cedric Shepherdson. 1955. Effective operations on partial recursive functions. Mathematical Logic Quarterly, 1, 4 (1955), 310–317. https://doi.org/10.1002/malq.19550010407 Google ScholarGoogle ScholarCross RefCross Ref
  50. Tobias Nipkow and Gerwin Klein. 2014. Concrete Semantics – With Isabelle/HOL. Springer. https://doi.org/10.1007/978-3-319-10542-0 Google ScholarGoogle ScholarCross RefCross Ref
  51. Tobias Nipkow, Lawrence C. Paulson, and Markus Wenzel. 2002. Isabelle/HOL — A Proof Assistant for Higher-Order Logic (LNCS, Vol. 2283). Springer. https://doi.org/10.1007/3-540-45949-9 Google ScholarGoogle ScholarCross RefCross Ref
  52. Tobias Nipkow and Gregor Snelting. 1991. Type Classes and Overloading Resolution via Order-Sorted Unification. In FPCA 1991, John Hughes (Ed.) (LNCS, Vol. 523). Springer, 1–14. https://doi.org/10.1007/3540543961_1 Google ScholarGoogle ScholarCross RefCross Ref
  53. Sam Owre, John M. Rushby, and Natarajan Shankar. 1992. PVS: A Prototype Verification System. In CADE-11, Deepak Kapur (Ed.) (LNCS, Vol. 607). Springer, 748–752. https://doi.org/10.1007/3-540-55602-8_217 Google ScholarGoogle ScholarCross RefCross Ref
  54. Lawrence C. Paulson. 1988. A formulation of the simple theory of types (for Isabelle). In COLOG 1988, Per Martin-Löf and Grigori Mints (Eds.) (LNCS, Vol. 417). Springer, 246–274. https://doi.org/10.1007/3-540-52335-9_58 Google ScholarGoogle ScholarCross RefCross Ref
  55. Lawrence C. Paulson and Jasmin Christian Blanchette. 2010. Three years of experience with Sledgehammer, a Practical Link Between Automatic and Interactive Theorem Provers. In IWIL 2010, Geoff Sutcliffe, Stephan Schulz, and Eugenia Ternovska (Eds.) (EPiC Series in Computing, Vol. 2). EasyChair, 1–11. https://doi.org/10.29007/36dt Google ScholarGoogle ScholarCross RefCross Ref
  56. Andrew M. Pitts. 1993. Introduction to HOL: A theorem proving environment for higher order logic. 191–232. isbn:0-521-44189-7 http://www.cs.ox.ac.uk/tom.melham/pub/Gordon-1993-ITH.html Google ScholarGoogle Scholar
  57. Andrei Popescu and Dmitriy Traytel. 2022. Admissible Types-To-PERs Relativization in Higher-Order Logic (Extended Technical Report). https://doi.org/10.5281/zenodo.7313923 Google ScholarGoogle Scholar
  58. Andrei Popescu and Dmitriy Traytel. 2022. Formalization and implementation artifact associated with this paper.. https://doi.org/10.5281/zenodo.7308911 Google ScholarGoogle ScholarDigital LibraryDigital Library
  59. John C. Reynolds. 1983. Types, Abstraction and Parametric Polymorphism. In IFIP 1983, R. E. A. Mason (Ed.). North-Holland/IFIP, 513–523. Google ScholarGoogle Scholar
  60. Bertrand Russell. 1919. Descriptions. In Introducton to Mathematical Philosophy. George Allen and Unwin Publishers Ltd., 167–180. Google ScholarGoogle Scholar
  61. Jan J. M. M. Rutten. 2000. Universal coalgebra: a theory of systems. Theor. Comput. Sci., 249, 1 (2000), 3–80. https://doi.org/10.1016/S0304-3975(00)00056-6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. Konrad Slind and Michael Norrish. 2008. A Brief Overview of HOL4. In TPHOLs 2008, Otmane Aït Mohamed, César A. Muñoz, and Sofiène Tahar (Eds.) (LNCS, Vol. 5170). Springer, 28–32. https://doi.org/10.1007/978-3-540-71067-7_6 Google ScholarGoogle ScholarDigital LibraryDigital Library
  63. 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 2012. IEEE Computer Society, 596–605. https://doi.org/10.1109/LICS.2012.75 Google ScholarGoogle ScholarDigital LibraryDigital Library
  64. Philip Wadler. 1989. Theorems for Free!. In FPCA 1989, Joseph E. Stoy (Ed.). ACM, 347–359. https://doi.org/10.1145/99370.99404 Google ScholarGoogle ScholarDigital LibraryDigital Library
  65. Makarius Wenzel. 2022. The Isabelle/Isar implementation manual. https://isabelle.in.tum.de/website-Isabelle2021-1/dist/doc/implementation.pdf Google ScholarGoogle Scholar

Index Terms

  1. Admissible Types-to-PERs Relativization in Higher-Order Logic

        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

        • Article Metrics

          • Downloads (Last 12 months)159
          • Downloads (Last 6 weeks)24

          Other Metrics

        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!