A Consistent Foundation for Isabelle/HOL

Abstract

The interactive theorem prover Isabelle/HOL is based on the well understood higher-order logic (HOL), which is widely believed to be consistent (and provably consistent in set theory by a standard semantic argument). However, Isabelle/HOL brings its own personal touch to HOL: overloaded constant definitions, used to provide the users with Haskell-like type classes. These features are a delight for the users, but unfortunately are not easy to get right as an extension of HOL—they have a history of inconsistent behavior. It has been an open question under which criteria overloaded constant definitions and type definitions can be combined together while still guaranteeing consistency. This paper presents a solution to this problem: non-overlapping definitions and termination of the definition-dependency relation (tracked not only through constants but also through types) ensures relative consistency of Isabelle/HOL.

This is a preview of subscription content, log in to check access.

Fig. 1

Notes

  1. 1.

    This example works in versions of Isabelle prior to Isabelle2016. A correction patch [1], based on the results reported in this paper and in [20], has been integrated in Isabelle2016.

  2. 2.

    Namely, Coq 8.4pl6; the inconsistency is now fixed in Coq 8.5.

  3. 3.

    We shall consistently use \(\bullet \) to indicate non-built-in items.

  4. 4.

    To ensure consistency, we will also require that \(\tau \) has no common instance with the left-hand side of any other type definition.

  5. 5.

    In the conference paper [21], what we call here “definitional theory” was called “well-formed definitional theory.” We have slightly changed terminology in order to align more faithfully to the official Isabelle documentation [39].

  6. 6.

    Any infinite (not necessarily countable) set would do here; we only choose \(\mathbb {N}\) for simplicity.

  7. 7.

    Recall that \(f\langle a \leftarrow b\rangle \) denotes function update: \(f\langle a \leftarrow b\rangle \) is the function that acts like f except that it sends a to b.

  8. 8.

    Note that, by Lemma 15(1), we have that \(F_u = (T_u,C_u)\) is a fragment.

  9. 9.

    Note that the property “D is a definitional theory” is not decidable; it is the conjunction with the composability property that ensures decidability.

References

  1. 1.

    A consistent foundation for Isabelle/HOL— a correction patch. http://www21.in.tum.de/~kuncar/documents/patch.html

  2. 2.

    Adams, M.: Introducing HOL zero—(extended abstract). In: Fukuda, K., van der Hoeven, J., Joswig, M., Takayama, N. (eds.) ICMS 2010, LNCS, vol. 6327, pp. 142–143. Springer (2010)

  3. 3.

    Anand, A., Rahli, V.: Towards a formally verified proof assistant. In: Klein, G., Gamboa, R. (eds.) ITP 2014, LNCS, vol. 8558, pp. 27–44. Springer (2014)

  4. 4.

    Arthan, R.D.: Some mathematical case studies in ProofPower–HOL. In: Slind, K. (ed.) TPHOLs 2004 (Emerging Trends), School of Computing, pp. 1–16. University of Utah (2010)

  5. 5.

    Barras, B.: Coq en Coq. Tech. Rep. 3026, INRIA (1996)

  6. 6.

    Barras, B.: Sets in Coq Coq in Sets. J. Formaliz. Reason. 3(1), 29–48 (2010)

    MathSciNet  MATH  Google Scholar 

  7. 7.

    Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development - Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. An EATCS Series. Springer, Berlin (2004)

    Google Scholar 

  8. 8.

    Blanchette, J.C., Popescu, A., Traytel, D.: Foundational extensible corecursion: a proof assistant perspective. In: Fisher, K., Reppy, J.H. (eds.) ICFP 2015, pp. 192–204. ACM (2015)

  9. 9.

    Bove, A., Dybjer, P., Norell, U.: A brief overview of Agda-a functional language with dependent types. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009, LNCS, vol. 5674, pp. 73–78. Springer (2009)

  10. 10.

    Dénès, M.: [Coq-Club] Propositional extensionality is inconsistent in Coq. Archived at https://sympa.inria.fr/sympa/arc/coq-club/2013-12/msg00119.html

  11. 11.

    Gordon, M.J.C., Melham, T.F. (eds.): Introduction to HOL: A Theorem Proving Environment for Higher Order Logic. Cambridge University Press, Cambridge (1993)

    Google Scholar 

  12. 12.

    Grabowski, A., Kornilowicz, A., Naumowicz, A.: Mizar in a nutshell. J. Formaliz. Reason. 3(2), 153–245 (2010)

    MathSciNet  MATH  Google Scholar 

  13. 13.

    Haftmann, F., Wenzel, M.: Constructive type classes in Isabelle. In: Altenkirch, T., McBride, C. (eds.) TYPES 2006, LNCS, vol. 4502, pp. 160–174. Springer (2006)

  14. 14.

    Harrison, J.: HOL Light: A Tutorial Introduction. In: Srivas, M.K., Camilleri, A.J. (eds.) FMCAD ’96, LNCS, vol. 1166, pp. 265–269. Springer (1996)

  15. 15.

    Harrison, J.: Towards self-verification of HOL light. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006, LNCS, vol. 4130, pp. 177–191. Springer (2006)

  16. 16.

    Hölzl, J., Immler, F., Huffman, B.: Type classes and filters for mathematical analysis in Isabelle/HOL. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013, LNCS, vol. 7998, pp. 279–294. Springer (2013)

  17. 17.

    Huffman, B., Urban, C.: A New Foundation for Nominal Isabelle. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010, LNCS, vol. 6172, pp. 35–50. Springer (2010)

  18. 18.

    Krauss, A., Schropp, A.: A Mechanized translation from higher-order logic to set theory. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010, LNCS, vol. 6172, pp. 323–338. Springer (2010)

  19. 19.

    Kumar, R., Arthan, R., Myreen, M.O., Owens, S.: HOL with definitions: semantics, soundness, and a verified implementation. In: Klein, G., Gamboa, R. (eds.) ITP 2014, LNCS, vol. 8558, pp. 308–324. Springer (2014)

  20. 20.

    Kunčar, O.: Correctness of Isabelle’s cyclicity checker: implementability of overloading in proof assistants. In: Leroy, X., Tiu, A. (eds.) CPP 2015, pp. 85–94. ACM (2015)

  21. 21.

    Kunčar, O., Popescu, A.: A consistent foundation for Isabelle/HOL. In: Urban, C., Zhang, X. (eds.) ITP 2015, LNCS, vol. 9236, pp. 234–252. Springer (2015)

  22. 22.

    Kunčar, O., Popescu, A.: Comprehending Isabelle/HOL’s consistency. In: Yang, H. (ed.) ESOP 2017, LNCS, vol. 10201, pp. 724–749. Springer (2017)

  23. 23.

    Kunčar, O., Popescu, A.: Safety and conservativity of definitions in hol and isabelle/hol (2018). Conditionally accepted at POPL 2018. Draft available at http://andreipopescu.uk/pdf/conserv_HOL_IsabelleHOL.pdf

  24. 24.

    Leino, K.R.M., Moskal, M.: Co-induction simply—automatic co-inductive proofs in a program verifier. In: Jones, C.B., Pihlajasaari, P., Sun, J. (eds.) FM 2014, LNCS, vol. 8442, pp. 382–398. Springer (2014)

  25. 25.

    Lochbihler, A.: Light-weight containers for Isabelle: efficient, extensible, nestable. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013, LNCS, vol. 7998, pp. 116–132. Springer (2013)

  26. 26.

    McBride, C., et al.: [HoTT] Newbie questions about homotopy theory and advantage of UF/Coq. Archived at http://article.gmane.org/gmane.comp.lang.agda/6106

  27. 27.

    Müller, O., Nipkow, T., von Oheimb, D., Slotosch, O.: HOLCF= HOL+LCF. J. Funct. Program. 9(2), 191–223 (1999)

    MathSciNet  Article  MATH  Google Scholar 

  28. 28.

    Myreen, M.O., Davis, J.: The reflective Milawa theorem prover is sound—(down to the machine code that runs it). In: Klein, G., Gamboa, R. (eds.) ITP 2014, LNCS, vol. 8558, pp. 421–436. Springer (2014)

  29. 29.

    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL—a proof assistant for higher-order logic, LNCS, vol. 2283, Springer (2002)

  30. 30.

    Nipkow, T., Snelting, G.: Type classes and overloading resolution via order-sorted unification. In: Hughes, J. (ed.) Functional Programming Languages and Computer Architecture, LNCS, vol. 523, pp. 1–14. Springer (1991)

  31. 31.

    Obua, S.: Checking conservativity of overloaded definitions in higher-order logic. In: Pfenning, F. (ed.) RTA 2006, LNCS, vol. 4098, pp. 212–226. Springer (2006)

  32. 32.

    Pitts, A.: Introduction to HOL: a theorem proving environment for higher order logic, chap. The HOL Logic. In: Gordon and Melham [12] pp. 191–232. (1993)

  33. 33.

    Shankar, N., Owre, S., Rushby, J.M.: PVS Tutorial. Computer Science Laboratory, SRI International (1993). http://www.csl.sri.com/papers/wift-tutorial/

  34. 34.

    Sozeau, M., Oury, N.: First-class type classes. In: Mohamed, O.A., Muñoz, C.A., Tahar, S. (eds.) TPHOLs 2008, LNCS, vol. 5170, pp. 278–293. Springer (2008)

  35. 35.

    Urban, C.: Nominal techniques in Isabelle/HOL. J. Autom. Reason. 40(4), 327–356 (2008)

    MathSciNet  Article  MATH  Google Scholar 

  36. 36.

    The HOL4 Theorem Prover. http://hol.sourceforge.net/

  37. 37.

    Wadler, P., Blott, S.: How to make ad-hoc polymorphism less ad hoc. In: POPL ’89, pp. 60–76. ACM (1989)

  38. 38.

    Wenzel, M.: Type Classes and overloading in higher-order logic. In: Gunter, E.L., Felty, A.P. (eds.) TPHOLs ’97, LNCS, vol. 1275, pp. 307–322. Springer (1997)

  39. 39.

    Wenzel, M.: The Isabelle/Isar Reference Manual (2016). http://isabelle.in.tum.de/doc/isar-ref.pdf

Download references

Acknowledgements

We thank the reviewers for their useful comments and suggestions, and for catching some errors in the proofs. The anonymous ITP 2015 and Makarius Wenzel also made useful comments on the conference version of the paper. We thank Tobias Nipkow, Larry Paulson and Makarius Wenzel for inspiring discussions. This paper was partially supported by the DFG Grant Ni 491/13-3 and by the EPSRC grant EP/N019547/1.

Author information

Affiliations

Authors

Corresponding author

Correspondence to Andrei Popescu.

Additional information

This is an extended version of the conference paper [21]. It includes detailed proofs of the results.

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Kunčar, O., Popescu, A. A Consistent Foundation for Isabelle/HOL. J Autom Reasoning 62, 531–555 (2019). https://doi.org/10.1007/s10817-018-9454-8

Download citation

Keywords

  • Higher-order logic
  • Theorem proving
  • Isabelle/HOL
  • Consistency
  • Model-theoretic semantics
  • Ad hoc overloading