Witnessing (Co)datatypes

  • Jasmin Christian Blanchette
  • Andrei Popescu
  • Dmitriy Traytel
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9032)

Abstract

Datatypes and codatatypes are useful for specifying and reasoning about (possibly infinite) computational processes. The Isabelle/HOL proof assistant has recently been extended with a definitional package that supports both. We describe a complete procedure for deriving nonemptiness witnesses in the general mutually recursive, nested case—nonemptiness being a proviso for introducing types in higher-order logic.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Abel, A., Altenkirch, T.: A predicative strong normalisation proof for a λ-calculus with interleaving inductive types. In: Coquand, T., Nordström, B., Dybjer, P., Smith, J. (eds.) TYPES 1999. LNCS, vol. 1956, pp. 21–40. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  2. 2.
    Abel, A., Pientka, B., Thibodeau, D., Setzer, A.: Copatterns: Programming infinite structures by observations. In: Giacobazzi, R., Cousot, R. (eds.) POPL 2013, pp. 27–38. ACM (2013)Google Scholar
  3. 3.
    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, Heidelberg (2010)CrossRefGoogle Scholar
  4. 4.
    Arthan, R.D.: Some mathematical case studies in ProofPower–HOL. In: Slind, K. (ed.) TPHOLs 2004 (Emerging Trends). pp. 1–16. School of Computing. University of Utah (2004)Google Scholar
  5. 5.
    Barr, M.: Terminal coalgebras in well-founded set theory. Theor. Comput. Sci. 114(2), 299–315 (1993)CrossRefMATHMathSciNetGoogle Scholar
  6. 6.
    Berghofer, S., Wenzel, M.: Inductive datatypes in HOL—lessons learned in formal-logic engineering. In: Bertot, Y., Dowek, G., Hirschowitz, A., Paulin, C., Théry, L. (eds.) TPHOLs 1999. LNCS, vol. 1690, pp. 19–36. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  7. 7.
    Bertot, Y.: Filters on coinductive streams, an application to Eratosthenes’ sieve. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 102–115. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  8. 8.
    Blanchette, J.C., Hölzl, J., Lochbihler, A., Panny, L., Popescu, A., Traytel, D.: Truly modular (co)datatypes for Isabelle/HOL. In: Klein, G., Gamboa, R. (eds.) ITP 2014. LNCS, vol. 8558, pp. 93–110. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  9. 9.
    Blanchette, J.C., Popescu, A., Traytel, D.: Supplementary material associated with this paper, https://github.com/dtraytel/Witnessing-Codatatypes
  10. 10.
    Blanchette, J.C., Popescu, A., Traytel, D.: Cardinals in Isabelle/HOL. In: Klein, G., Gamboa, R. (eds.) ITP 2014. LNCS, vol. 8558, pp. 111–127. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  11. 11.
    Blanchette, J.C., Popescu, A., Traytel, D.: Unified classical logic completeness. In: Demri, S., Kapur, D., Weidenbach, C. (eds.) IJCAR 2014. LNCS, vol. 8562, pp. 46–60. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  12. 12.
    Ghani, N., Johann, P., Fumex, C.: Generic fibrational induction. Log. Meth. Comput. Sci. 8(2:12), 1–27 (2012)Google Scholar
  13. 13.
    Gordon, M.J.C., Melham, T.F. (eds.): Introduction to HOL: A Theorem Proving Environment for Higher Order Logic. Cambridge University Press (1993)Google Scholar
  14. 14.
    Gunter, E.L.: Why we can’t have SML-style datatype declarations in HOL. In: Claesen, L.J.M., Gordon, M.J.C. (eds.) TPHOLs 1992. IFIP Transactions, vol. A-20, pp. 561–568. North-Holland/Elsevier (1993)Google Scholar
  15. 15.
    Gvero, T., Kuncak, V., Piskac, R.: Interactive synthesis of code snippets. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 418–423. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  16. 16.
    Harrison, J.: HOL Light: A tutorial introduction. In: Srivas, M., Camilleri, A. (eds.) FMCAD 1996. LNCS, vol. 1166, pp. 265–269. Springer, Heidelberg (1996)Google Scholar
  17. 17.
    Hasegawa, R.: Two applications of analytic functors. Theor. Comput. Sci. 272(1–2), 113–175 (2002)CrossRefMATHGoogle Scholar
  18. 18.
    Hermida, C., Jacobs, B.: Structural induction and coinduction in a fibrational setting. Inf. Comput. 145(2), 107–152 (1998)CrossRefMATHMathSciNetGoogle Scholar
  19. 19.
    Homeier, P.V.: A design structure for higher order quotients. In: Hurd, J., Melham, T. (eds.) TPHOLs 2005. LNCS, vol. 3603, pp. 130–146. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  20. 20.
    Howard, B.T.: Inductive, coinductive, and pointed types. In: Harper, R., Wexelblat, R.L. (eds.) ICFP 1996, pp. 102–109. ACM Press, New York (1996)Google Scholar
  21. 21.
    Huffman, B.: A purely definitional universal domain. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 260–275. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  22. 22.
    Huffman, B., Kunčar, O.: Lifting and transfer: A modular design for quotients in Isabelle/HOL. In: Gonthier, G., Norrish, M. (eds.) CPP 2013. LNCS, vol. 8307, pp. 131–146. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  23. 23.
    Kaliszyk, C., Urban, C.: Quotients revisited for Isabelle/HOL. In: Chu, W.C., Wong, W.E., Palakal, M.J., Hung, C.-C. (eds.) SAC 2011, pp. 1639–1644. ACM (2011)Google Scholar
  24. 24.
    Krauss, A., Nipkow, T.: Proof pearl: Regular expression equivalence and relation algebra. J. Autom. Reasoning 49(1), 95–106 (2012)CrossRefMATHMathSciNetGoogle Scholar
  25. 25.
    Lenisa, M., Power, J., Watanabe, H.: Distributivity for endofunctors, pointed and co-pointed endofunctors, monads and comonads. Electr. Notes Theor. Comput. Sci. 33, 230–260 (2000)CrossRefMathSciNetGoogle Scholar
  26. 26.
    Lochbihler, A.: Java and the Java memory model—A unified, machine-checked formalisation. In: Seidl, H. (ed.) ESOP 2012. LNCS, vol. 7211, pp. 497–517. Springer, Heidelberg (2012)Google Scholar
  27. 27.
    Lucanu, D., Goriac, E.-I., Caltais, G., Roşu, G.: CIRC: A behavioral verification tool based on circular coinduction. In: Kurz, A., Lenisa, M., Tarlecki, A. (eds.) CALCO 2009. LNCS, vol. 5728, pp. 433–442. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  28. 28.
    Melham, T.F.: Automating recursive type definitions in higher order logic. In: Birtwistle, G., Subrahmanyam, P.A. (eds.) Current Trends in Hardware Verification and Automated Theorem Proving, pp. 341–386. Springer, Heidelberg (1989)Google Scholar
  29. 29.
    Nakata, K., Uustalu, T., Bezem, M.: A proof pearl with the fan theorem and bar induction—Walking through infinite trees with mixed induction and coinduction. In: Yang, H. (ed.) APLAS 2011. LNCS, vol. 7078, pp. 353–368. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  30. 30.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)Google Scholar
  31. 31.
    Paulson, L.C.: A formulation of the simple theory of types (for Isabelle). In: Martin-Löf, P., Mints, G. (eds.) COLOG 1988. LNCS, vol. 417, pp. 246–274. Springer, Heidelberg (1990)Google Scholar
  32. 32.
    Paulson, L.C.: A fixedpoint approach to (co)inductive and (co)datatype definitions. In: Plotkin, G.D., Stirling, C., Tofte, M. (eds.) Proof, Language, and Interaction—Essays in Honour of Robin Milner, pp. 187–212. MIT Press (2000)Google Scholar
  33. 33.
    Pierce, B.C.: Types and Programming Languages. MIT Press (2002)Google Scholar
  34. 34.
    Rutten, J.J.M.M.: Relators and metric bisimulations. Electr. Notes Theor. Comput. Sci. 11, 252–258 (1998)CrossRefMathSciNetGoogle Scholar
  35. 35.
    Rutten, J.J.M.M.: Universal coalgebra: A theory of systems. Theor. Comput. Sci. 249, 3–80 (2000)CrossRefMATHMathSciNetGoogle Scholar
  36. 36.
    Schropp, A., Popescu, A.: Nonfree datatypes in Isabelle/HOL—Animating a many-sorted metatheory. In: Gonthier, G., Norrish, M. (eds.) CPP 2013. LNCS, vol. 8307, pp. 114–130. Springer, Heidelberg (2013)CrossRefGoogle Scholar
  37. 37.
    Slind, K., Norrish, M.: A brief overview of HOL4. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 28–32. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  38. 38.
    Smyth, M.B.: Power domains. J. Comput. Syst. Sci. 16(1), 23–36 (1978)CrossRefMATHMathSciNetGoogle Scholar
  39. 39.
    Traytel, D., Popescu, A., Blanchette, J.C.: Foundational, compositional (co)datatypes for higher-order logic—Category theory applied to theorem proving. In: LICS 2012, pp. 596–605. IEEE (2012)Google Scholar
  40. 40.
    Univalent Foundations Program: Homotopy Type Theory—Univalent Foundations of Mathematics. Institute for Advanced Study (2013), http://homotopytypetheory.org/book/

Copyright information

© Springer-Verlag Berlin Heidelberg 2015

Authors and Affiliations

  • Jasmin Christian Blanchette
    • 1
    • 2
  • Andrei Popescu
    • 3
  • Dmitriy Traytel
    • 4
  1. 1.Inria Nancy & LORIAVillers-lès-NancyFrance
  2. 2.Max-Planck-Institut für InformatikSaarbrückenGermany
  3. 3.Department of Computer Science, School of Science and TechnologyMiddlesex UniversityLondonUK
  4. 4.Fakultät für InformatikTechnische Universität MünchenMünchenGermany

Personalised recommendations