[Paper Review] Guarded Cubical Type Theory: Path Equality for Guarded Recursion
This paper introduces guarded cubical type theory (GCTT), unifying cubical type theory's computational path equality with guarded dependent type theory's guarded recursion. By integrating the interval type from cubical type theory to control unfolding of fixed-points, GCTT enables decidable type checking and canonicity while supporting non-trivial proofs of extensional equality for guarded recursive types, including coinductive constructions.
This paper improves the treatment of equality in guarded dependent type theory (GDTT), by combining it with cubical type theory (CTT). 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 GDTT with decidable type-checking, while still supporting non-trivial equality proofs that reason about the extensions of guarded recursive constructions. CTT is a variation of Martin-Löf type theory in which the identity type is replaced by abstract paths between terms. CTT provides a computational interpretation of functional extensionality, is conjectured to have decidable type checking, and has an implemented type-checker. Our new type theory, called guarded cubical type theory, provides a computational interpretation of extensionality for guarded recursive types. This further expands the foundations of 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, and present semantics in a presheaf category.
Motivation & Objective
- To address the undecidability of type checking in guarded dependent type theory (GDTT) due to equality reflection.
- To support non-trivial proofs of extensional equality for guarded recursive types without sacrificing canonicity or decidability.
- To provide a computational interpretation of extensionality for guarded recursive types using path equality from cubical type theory (CTT).
- To establish a sound categorical semantics for GCTT in a presheaf topos over $\mathcal{C} \times \omega$.
- To lay the foundation for formalizing program logics and coinductive reasoning in a type theory with decidable type checking and computational equality.
Proposed method
- Combines guarded dependent type theory (GDTT) with cubical type theory (CTT) by integrating the interval type $\mathbb{I}$ from CTT into GDTT to control fixed-point unfolding.
- Uses path types instead of inductive identity types, allowing for computational interpretation of functional and guarded extensionality.
- Defines a new type constructor $\triangleright$ for 'later' types, with a path-based equality rule that enables reasoning about the extensions of guarded recursive constructions.
- Constructs a model of GCTT in the presheaf topos $\widehat{\mathcal{C} \times \omega}$, using fibrations in cubical sets and internal logic with De Morgan algebra structure.
- Employs a prototype type checker to validate examples, including proofs about stream functions and guarded fixed-points.
- Leverages the internal logic of cubical sets to model identity types and ensure coherence in the presence of guarded recursion.
Experimental results
Research questions
- RQ1Can path equality from cubical type theory be used to provide a computational interpretation of extensionality for guarded recursive types without equality reflection?
- RQ2Can guarded cubical type theory support decidable type checking and canonicity while enabling non-trivial proofs about the extensions of guarded recursive constructions?
- RQ3How can the interval type of cubical type theory be used to control the unfolding of fixed-points in guarded recursive types?
- RQ4What categorical semantics support the soundness of guarded cubical type theory in a presheaf topos?
- RQ5How do the interaction principles between $\triangleright$ and path types enable reasoning about coinductive types in a constructive and computationally meaningful way?
Key findings
- Guarded cubical type theory (GCTT) successfully combines cubical type theory's path-based equality with guarded dependent type theory's recursion, enabling extensional reasoning without equality reflection.
- The theory supports a computational interpretation of guarded extensionality: terms of type $\triangleright \operatorname{Id} A\, t\, u$ can be mapped to paths $\operatorname{Id} (\triangleright A)\, (\mathsf{next}\, t)\, (\mathsf{next}\, u)$.
- A sound semantics for GCTT is established in the presheaf topos $\widehat{\mathcal{C} \times \omega}$, using fibrations in cubical sets and an internal De Morgan algebra with the disjunction property.
- The model supports the full internal logic of cubical sets, including the composition operation and universe of fibrant types, enabling a full model of CTT extended with guarded recursion.
- Examples involving stream functions and guarded fixed-points have been formally checked in a prototype implementation, confirming the expressivity and correctness of the system.
- The approach provides a foundation for formalizing program logics and coinductive reasoning in a type theory with decidable type checking and canonicity, as supported by the prototype implementation.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.