Nonfree Datatypes in Isabelle/HOL

Animating a Many-Sorted Metatheory
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8307)


Datatypes freely generated by their constructors are well supported in mainstream proof assistants. Algebraic specification languages offer more expressive datatypes on axiomatic means: nonfree datatypes generated from constructors modulo equations. We have implemented an Isabelle/HOL package for nonfree datatypes, without compromising foundations. The use of the package, and its nonfree iterator in particular, is illustrated with examples: bags, polynomials and λ-terms modulo α-equivalence. The many-sorted metatheory of nonfree datatypes is formalized as an ordinary Isabelle theory and is animated by the package into user-specified instances. HOL lacks a type of types, so we employ an ad hoc construction of a universe embedding the relevant parameter types.


Equational Theory Instance Type Target Type Horn Clause Relation Symbol 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    The Coq Proof Assistant (2013),
  2. 2.
  3. 3.
    Altenkirch, T., McBride, C., Morris, P.: Generic programming with dependent types. In: Backhouse, R., Gibbons, J., Hinze, R., Jeuring, J. (eds.) SSDGP 2006. LNCS, vol. 4719, pp. 209–257. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  4. 4.
    Blanqui, F., Hardin, T., Weis, P.: On the implementation of construction functions for non-free concrete data types. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 95–109. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  5. 5.
    Bove, A., Dybjer, P.: Dependent types at work. In: Bove, A., Barbosa, L.S., Pardo, A., Pinto, J.S. (eds.) LerNet ALFA Summer School 2008. LNCS, vol. 5520, pp. 57–99. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  6. 6.
    Clavel, M., Durán, F., Eker, S., Lincoln, P., Martí-Oliet, N., Meseguer, J., Quesada, J.F.: The Maude system. In: Narendran, P., Rusinowitch, M. (eds.) RTA 1999. LNCS, vol. 1631, pp. 240–243. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  7. 7.
    CoFI task group on semantics, CASL — The Common Algebraic Specification Language, Semantics (1999),
  8. 8.
    Coquand, T., Danielsson, N.A.: Isomorphism is equality. Draft (2013)Google Scholar
  9. 9.
    Haftmann, F., Wenzel, M.: Constructive type classes in Isabelle. In: Altenkirch, T., McBride, C. (eds.) TYPES 2006. LNCS, vol. 4502, pp. 160–174. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  10. 10.
    Harrison, J.: HOL Light: A tutorial introduction. In: Srivas, M., Camilleri, A. (eds.) FMCAD 1996. LNCS, vol. 1166, pp. 265–269. Springer, Heidelberg (1996)CrossRefGoogle Scholar
  11. 11.
    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
  12. 12.
    Huffman, B., Kuncar, O.: Lifting and transfer: A modular design for quotients in Isabelle/HOL. In: Isabelle Users Workshop (2012)Google Scholar
  13. 13.
    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, Heidelberg (2010)CrossRefGoogle Scholar
  14. 14.
    Kaliszyk, C., Urban, C.: Quotients revisited for Isabelle/HOL. In: SAC, pp. 1639–1644 (2011)Google Scholar
  15. 15.
    Kammüller, F., Wenzel, M., Paulson, L.C.: Locales - A sectioning concept for Isabelle. In: Bertot, Y., Dowek, G., Hirschowitz, A., Paulin, C., Théry, L. (eds.) TPHOLs 1999. LNCS, vol. 1690, pp. 149–166. Springer, Heidelberg (1999)CrossRefGoogle Scholar
  16. 16.
    Nadathur, G., Miller, D.: An overview of Lambda-Prolog. In: ICLP/SLP, pp. 810–827 (1988)Google Scholar
  17. 17.
    Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL: A Proof Assistant for Higher-Order Logic. LNCS, vol. 2283. Springer, Heidelberg (2002)Google Scholar
  18. 18.
    Norrish, M.: Recursive function definition for types with binders. In: Slind, K., Bunker, A., Gopalakrishnan, G.C. (eds.) TPHOLs 2004. LNCS, vol. 3223, pp. 241–256. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  19. 19.
    Popescu, A., Gunter, E.L.: Recursion principles for syntax with bindings and substitution. In: ICFP, pp. 346–358 (2011)Google Scholar
  20. 20.
    Schropp, A.: Instantiating deeply embedded many-sorted theories into HOL types in Isabelle. Master’s thesis, Technische Universität München (2012),
  21. 21.
    Schropp, A., Popescu, A.: Nonfree datatypes: metatheory, implementation and examples,
  22. 22.
    Shulman, M., Licata, D., Lumsdaine, P.L., et al.: Higher inductive types on the homotopy type theory blog,
  23. 23.
    Breazu-Tannen, V., Subrahmanyam, R.: Logical and computational aspects of programming with sets/bags/lists. In: Leach Albert, J., Monien, B., Rodríguez-Artalejo, M. (eds.) ICALP 1991. LNCS, vol. 510, pp. 60–75. Springer, Heidelberg (1991)CrossRefGoogle Scholar
  24. 24.
    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 (2012)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2013

Authors and Affiliations

  1. 1.Technische Universität MünchenGermany
  2. 2.Institute of Mathematics Simion Stoilow of the Romanian AcademyRomania
  3. 3.COMSA GmbHGermany

Personalised recommendations