Skip to main content

Guarded Cubical Type Theory


This paper improves the treatment of equality in guarded dependent type theory (\(\mathsf {GDTT}\)), by combining it with cubical type theory (\(\mathsf {CTT}\)). \(\mathsf {GDTT}\) is an extensional type theory with guarded recursive types, which are useful for building models of program logics, and for programming and reasoning with coinductive types. We wish to implement \(\mathsf {GDTT}\) with decidable type checking, while still supporting non-trivial equality proofs that reason about the extensions of guarded recursive constructions. \(\mathsf {CTT}\) is a variation of Martin–Löf type theory in which the identity type is replaced by abstract paths between terms. \(\mathsf {CTT}\) provides a computational interpretation of functional extensionality, enjoys canonicity for the natural numbers type, and is conjectured to support decidable type-checking. Our new type theory, guarded cubical type theory (\(\mathsf {GCTT}\)), provides a computational interpretation of extensionality for guarded recursive types. This further expands the foundations of \(\mathsf {CTT}\) as a basis for formalisation in mathematics and computer science. We present examples to demonstrate the expressivity of our type theory, all of which have been checked using a prototype type-checker implementation. We show that \(\mathsf {CTT}\) can be given semantics in presheaves on \(\mathcal {C}\times \mathbb {D}\), where \(\mathcal {C}\) is the cube category, and \(\mathbb {D}\) is any small category with an initial object. We then show that the category of presheaves on \(\mathcal {C}\times \omega \) provides semantics for \(\mathsf {GCTT}\).

This is a preview of subscription content, access via your institution.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7



  2. with the exception of the clock quantification of \(\mathsf {GDTT}\), which we leave to future work.


  4. provides a concise presentation of \(\mathsf {CTT}\).

  5. For a constructive meta-theory we add that, for each c, equality with \(\top _c\) is decidable.

  6. This type is already present in Kapulkin and Lumsdaine [20, Theorem 3.4.1].

  7. A perhaps more natural definition would require this function to be a bijection. However since this is a technical definition used only in this section we state it only in the generality we need.



  1. Abel, A., Vezzosi, A.: A formalized proof of strong normalization for guarded recursive types. In: APLAS, pp. 140–158 (2014)

  2. Altenkirch, T., McBride, C., Swierstra, W.: Observational equality, now! In: PLPV, pp. 57–68 (2007)

  3. Atkey, R., McBride, C.: Productive coprogramming with guarded recursion. In: ICFP, pp. 197–208 (2013)

  4. Birkedal, L., Rasmus, E.M.: Intensional type theory with guarded recursive types qua fixed points on universes. In: LICS, pp. 213–222 (2013)

  5. Birkedal, L., Reus, B., Schwinghammer, J., Støvring, K., Thamsborg, J., Yang, H.: Step-indexed Kripke models over recursive worlds. In: POPL, pp. 119–132 (2011)

  6. 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. In: LMCS, vol. 8, no. 4 (2012)

  7. Birkedal, L., Bizjak, A., Clouston, R., Grathwohl, H.B., Spitters, B., Vezzosi, A.: Guarded cubical type theory: path equality for guarded recursion. In: CSL, vol. 3, p. 37 (2016)

  8. Birkhoff, G.: Rings of sets. Duke Math. J. 3(3), 443–54 (1937)

    MathSciNet  Article  MATH  Google Scholar 

  9. Bizjak, A., Møgelberg, R.E.: A model of guarded recursion with clock synchronisation. In: MFPS, pp. 83–101 (2015)

  10. Bizjak, A., Grathwohl, H.B., Clouston, R., Møgelberg, R.E., Birkedal, L.: Guarded dependent type theory with coinductive types. In: FoSSaCS, pp. 20–35 (2016)

  11. Clouston, R., Bizjak, A., Grathwohl, H.B., Birkedal, L.: The guarded lambda-calculus: programming and reasoning with guarded recursion for coinductive types. Log. Methods Comput. Sci. (2016).

    MathSciNet  MATH  Google Scholar 

  12. Cohen, C., Coquand, T., Huber, S., Mörtberg, A.: Cubical type theory: a constructive interpretation of the univalence axiom. In: Post-proceedings of the 21st International Conference on Types for Proofs and Programs, TYPES 2015 (2016)

  13. Coquand, T.: Internal version of the uniform Kan filling condition. (2015). Accessed 13 June 2018

  14. Cornish, W., Fowler, P.: Coproducts of de Morgan algebras. Bull. Aust. Math. Soc. 16(1), 1–13 (1977)

    MathSciNet  Article  MATH  Google Scholar 

  15. Dybjer, P.: Internal type theory. In: TYPES ’95, pp. 120–134 (1996)

  16. Hofmann, M.: Extensional Constructs in Intensional Type Theory. Springer, Berlin (1997)

    Book  MATH  Google Scholar 

  17. Hofmann, M., Streicher, T.: Lifting Grothendieck universes. (1999). Accessed 13 June 2018

  18. Huber, S.: Canonicity for cubical type theory. arXiv:1607.04156 (2016)

  19. Johnstone, P.T.: Sketches of an Elephant: A Topos Theory Compendium. Oxford University Press, Oxford (2002)

    MATH  Google Scholar 

  20. Kapulkin, C., Lumsdaine, P.L.: The simplicial model of univalent foundations (after Voevodsky). arXiv:1211.2851 (2012)

  21. Mac Lane, S.: Categories for the Working Mathematician, vol. 5. Springer, Berlin (1978)

    Book  MATH  Google Scholar 

  22. Mac Lane, S., Moerdijk, I.: Sheaves in Geometry and Logic. Springer, Berlin (1992)

    MATH  Google Scholar 

  23. Martin-Löf, P.: An intuitionistic theory of types: predicative part. In: Logic Colloquium ’73, pp. 73–118 (1975)

  24. The Coq Development Team: The Coq proof assistant reference manual. LogiCal Project, 2004. Version 8.0 (2004)

  25. McBride, C., Paterson, R.: Applicative programming with effects. J. Funct. Program. 18(1), 1–13 (2008)

    Article  MATH  Google Scholar 

  26. Møgelberg, R.E.: A type theory for productive coprogramming via guarded recursion. In: CSL-LICS (2014)

  27. Nakano, H.: A modality for recursion. In: LICS, pp. 255–266 (2000)

  28. Norell, U.: Towards a practical programming language based on dependent type theory. Ph.D. Thesis, Chalmers University of Technology (2007)

  29. Orton, I., Pitts, A.M.: Axioms for modelling cubical type theory in a topos. In: CSL (2016)

  30. Phoa, W.: An introduction to fibrations, topos theory, the effective topos and modest sets. Technical Report ECS-LFCS-92-208, LFCS, University of Edinburgh (1992)

  31. Sacchini, J.L.: Well-founded sized types in the calculus of constructions. In: TYPES 2015 talk (2015) (2015). Accessed 13 June 2018

  32. Spitters, B.: Cubical sets as a classifying topos. In: TYPES (2015)

  33. The Univalent Foundations Program: Homotopy Type Theory: Univalent Foundations for Mathematics. Institute for Advanced Study (2013)

  34. Vickers, S.: Locales and toposes as spaces. In: Aiello, M., Pratt-Hartmann, I.E., van Benthem, J.F.A.K. (eds.) Handbook of Spatial Logics, pp. 429–496. Springer, Berlin (2007)

    Chapter  Google Scholar 

  35. Voevodsky, V.: Martin-Lof identity types in the C-systems defined by a universe category. arXiv:1505.06446 (2015)

Download references


We gratefully acknowledge our discussions with Thierry Coquand, and the comments of our reviewers of the conference version of this article [7], and of this article. This research was supported in part by the ModuRes Sapere Aude Advanced Grant from The Danish Council for Independent Research for the Natural Sciences (FNU), and in part by the Guarded homotopy type theory project, funded by the Villum Foundation (Grant No. 00012386). Aleš Bizjak was supported in part by a Microsoft Research Ph.D. Grant.

Author information

Authors and Affiliations


A Preserves Commutativity

A Preserves Commutativity

We provide a formalisation of Sect. 3.3 which can be verified by our type-checker. This file, among other examples, is available in the gctt-examples folder in the type-checker repository.

figure y

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Birkedal, L., Bizjak, A., Clouston, R. et al. Guarded Cubical Type Theory. J Autom Reasoning 63, 211–253 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI:


  • Homotopy type theory
  • Cubical type theory
  • Guarded recursion