Guarded Dependent Type Theory with Coinductive Types

  • Aleš Bizjak
  • Hans Bugge Grathwohl
  • Ranald Clouston
  • Rasmus E. Møgelberg
  • Lars Birkedal
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9634)

Abstract

We present guarded dependent type theory, \(\mathsf {gDTT}\), an extensional dependent type theory with a ‘later’ modality and clock quantifiers for programming and proving with guarded recursive and coinductive types. The later modality is used to ensure the productivity of recursive definitions in a modular, type based, way. Clock quantifiers are used for controlled elimination of the later modality and for encoding coinductive types using guarded recursive types. Key to the development of \(\mathsf {gDTT}\) are novel type and term formers involving what we call ‘delayed substitutions’. These generalise the applicative functor rules for the later modality considered in earlier work, and are crucial for programming and proving with dependent types. We show soundness of the type theory with respect to a denotational model.

References

  1. 1.
    Abel, A., Pientka, B.: Wellfounded recursion with copatterns: A unified approach to termination and productivity. In: ICFP, pp. 185–196 (2013)Google Scholar
  2. 2.
    Appel, A.W., Melliès, P.A., Richards, C.D., Vouillon, J.: A very modal model of a modern, major, general type system. In: POPL, pp. 109–122 (2007)Google Scholar
  3. 3.
    Atkey, R., McBride, C.: Productive coprogramming with guarded recursion. In: ICFP, pp. 197–208 (2013)Google Scholar
  4. 4.
    Birkedal, L., Møgelberg, R.E.: Intensional type theory with guarded recursive types qua fixed points on universes. In: LICS, pp. 213–222 (2013)Google Scholar
  5. 5.
    Birkedal, L., Møgelberg, R.E., Schwinghammer, J., Støvring, K.: First steps in synthetic guarded domain theory: step-indexing in the topos of trees. LMCS 8(4) (2012)Google Scholar
  6. 6.
    Bizjak, A., Grathwohl, H.B., Clouston, R., Møgelberg, R.E., Birkedal, L.: Guarded dependent type theory with coinductive types (2016). http://arxiv.org/abs/1601.01586
  7. 7.
    Bizjak, A., Møgelberg, R.E.: A model of guarded recursion with clock synchronisation. In: MFPS (2015)Google Scholar
  8. 8.
    Brady, E.: Idris, a general-purpose dependently typed programming language: design and implementation. J. Funct. Program. 23(5), 552–593 (2013)MathSciNetCrossRefMATHGoogle Scholar
  9. 9.
    Clouston, R., Bizjak, A., Grathwohl, H.B., Birkedal, L.: Programming and reasoning with guarded recursion for coinductive types. In: FoSSaCS (2015)Google Scholar
  10. 10.
    Cohen, C., Coquand, T., Huber, S., Mörtberg, A.: Cubical type theory: a constructive interpretation of the univalence axiom, unpublished (2015)Google Scholar
  11. 11.
    Constable, R.L., Allen, S.F., Bromley, H.M., Cleaveland, W.R., Cremer, J.F., Harper, R.W., Howe, D.J., Knoblock, T.B., Mendler, N.P., Panangaden, P., Sasaki, J.T., Smith, S.F.: Implementing Mathematics with the Nuprl Proof Development System. Prentice-Hall Inc, Upper Saddle River, NJ, USA (1986)Google Scholar
  12. 12.
    Coquand, T.: Infinite objects in type theory. In: TYPES, pp. 62–78 (1993)Google Scholar
  13. 13.
    Giménez, E.: Codifying guarded definitions with recursive schemes. In: TYPES, pp. 39–59 (1995)Google Scholar
  14. 14.
    Hughes, J., Pareto, L., Sabry, A.: Proving the correctness of reactive systems using sized types. In: POPL, pp. 410–423 (1996)Google Scholar
  15. 15.
    Jacobs, B.: Categorical Logic and Type Theory. Studies in Logic and the Foundations of Mathematics, vol. 141. North Holland, Amsterdam (1999)MATHGoogle Scholar
  16. 16.
    Krishnaswami, N.R., Benton, N.: Ultrametric semantics of reactive programs. In: LICS, pp. 257–266 (2011)Google Scholar
  17. 17.
    The Coq development team: the coq proof assistant reference manual. LogiCal Project (2004). version 8.0. http://coq.inria.fr
  18. 18.
    McBride, C., Paterson, R.: Applicative programming with effects. J. Funct. Program. 18(1), 1–13 (2008)CrossRefMATHGoogle Scholar
  19. 19.
    Møgelberg, R.E.: A type theory for productive coprogramming via guarded recursion. In: CSL-LICS (2014)Google Scholar
  20. 20.
    Nakano, H.: A modality for recursion. In: LICS, pp. 255–266 (2000)Google Scholar
  21. 21.
    Norell, U.: Towards a practical programming language based on dependent type theory. Ph.D. thesis, Chalmers University of Technology (2007)Google Scholar
  22. 22.
    Paviotti, M., Møgelberg, R.E., Birkedal, L.: A model of PCF in guarded type theory. In: MFPS (2015)Google Scholar
  23. 23.
    Svendsen, K., Birkedal, L.: Impredicative concurrent abstract predicates. In: Shao, Z. (ed.) ESOP 2014 (ETAPS). LNCS, vol. 8410, pp. 149–168. Springer, Heidelberg (2014)CrossRefGoogle Scholar
  24. 24.
    The 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 2016

Authors and Affiliations

  • Aleš Bizjak
    • 1
  • Hans Bugge Grathwohl
    • 1
  • Ranald Clouston
    • 1
  • Rasmus E. Møgelberg
    • 2
  • Lars Birkedal
    • 1
  1. 1.Aarhus UniversityAarhusDenmark
  2. 2.IT University of CopenhagenCopenhagenDenmark

Personalised recommendations