-
Two Guarded Recursive Powerdomains for Applicative Simulation
Authors:
Rasmus Ejlers Møgelberg,
Andrea Vezzosi
Abstract:
Clocked Cubical Type Theory is a new type theory combining the power of guarded recursion with univalence and higher inductive types (HITs). This type theory can be used as a metalanguage for synthetic guarded domain theory in which one can solve guarded recursive type equations, also with negative variable occurrences, and use these to construct models for reasoning about programming languages.…
▽ More
Clocked Cubical Type Theory is a new type theory combining the power of guarded recursion with univalence and higher inductive types (HITs). This type theory can be used as a metalanguage for synthetic guarded domain theory in which one can solve guarded recursive type equations, also with negative variable occurrences, and use these to construct models for reasoning about programming languages. Combining this with HITs allows for the use of type constructors familiar from set-theory based approaches to semantics, such as quotients and finite powersets in these models.
In this paper we show how to reason about the combination of finite non-determinism and recursion in this type theory. Unlike traditional domain theory which takes an ordering of programs as primitive, synthetic guarded domain theory takes the notion of computation step as primitive in the form of a modal operator. We use this extra intensional information to define two guarded recursive (finite) powerdomain constructions differing in the way non-determinism interacts with the computation steps. As an example application of these we show how to prove applicative similarity a congruence in the cases of may- and must-convergence for the untyped lambda calculus with finite non-determinism. Such results are usually proved using operational reasoning and Howe's method. Here we use an adaptation of a denotational method developed by Pitts in the context of domain theory.
△ Less
Submitted 28 December, 2021;
originally announced December 2021.
-
Greatest HITs: Higher inductive types in coinductive definitions via induction under clocks
Authors:
Magnus Baunsgaard Kristensen,
Rasmus Ejlers Møgelberg,
Andrea Vezzosi
Abstract:
Guarded recursion is a powerful modal approach to recursion that can be seen as an abstract form of step-indexing. It is currently used extensively in separation logic to model programming languages with advanced features by solving domain equations also with negative occurrences. In its multi-clocked version, guarded recursion can also be used to program with and reason about coinductive types, e…
▽ More
Guarded recursion is a powerful modal approach to recursion that can be seen as an abstract form of step-indexing. It is currently used extensively in separation logic to model programming languages with advanced features by solving domain equations also with negative occurrences. In its multi-clocked version, guarded recursion can also be used to program with and reason about coinductive types, encoding the productivity condition required for recursive definitions in types. This paper presents the first type theory combining multi-clocked guarded recursion with the features of Cubical Type Theory, as well as a denotational semantics. Using the combination of Higher Inductive Types (HITs) and guarded recursion allows for simple programming and reasoning about coinductive types that are traditionally hard to represent in type theory, such as the type of finitely branching labelled transition systems. For example, our results imply that bisimilarity for these imply path equality, and so proofs can be transported along bisimilarity proofs. Among our technical contributions is a new principle of induction under clocks. This allows universal quantification over clocks to commute with HITs up to equivalence of types, and is crucial for the encoding of coinductive types. Such commutativity requirements have been formulated for inductive types as axioms in previous type theories with multi-clocked guarded recursion, but our present formulation as an induction principle allows for the formulation of general computation rules.
△ Less
Submitted 3 June, 2022; v1 submitted 3 February, 2021;
originally announced February 2021.
-
Partial Univalence in n-truncated Type Theory
Authors:
Christian Sattler,
Andrea Vezzosi
Abstract:
It is well known that univalence is incompatible with uniqueness of identity proofs (UIP), the axiom that all types are h-sets. This is due to finite h-sets having non-trivial automorphisms as soon as they are not h-propositions.
A natural question is then whether univalence restricted to h-propositions is compatible with UIP. We answer this affirmatively by constructing a model where types are…
▽ More
It is well known that univalence is incompatible with uniqueness of identity proofs (UIP), the axiom that all types are h-sets. This is due to finite h-sets having non-trivial automorphisms as soon as they are not h-propositions.
A natural question is then whether univalence restricted to h-propositions is compatible with UIP. We answer this affirmatively by constructing a model where types are elements of a closed universe defined as a higher inductive type in homotopy type theory. This universe has a path constructor for simultaneous "partial" univalent completion, i.e., restricted to h-propositions.
More generally, we show that univalence restricted to $(n-1)$-types is consistent with the assumption that all types are $n$-truncated. Moreover we parametrize our construction by a suitably well-behaved container, to abstract from a concrete choice of type formers for the universe.
△ Less
Submitted 1 May, 2020;
originally announced May 2020.
-
Guarded Cubical Type Theory
Authors:
Lars Birkedal,
Aleš Bizjak,
Ranald Clouston,
Hans Bugge Grathwohl,
Bas Spitters,
Andrea Vezzosi
Abstract:
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-tri…
▽ More
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, enjoys canonicity for the natural numbers type, and is conjectured to support decidable type-checking. Our new type theory, guarded cubical type theory (GCTT), 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. We show that CTT can be given semantics in presheaves on the product of the cube category and a small category with an initial object. We then show that the category of presheaves on the product of the cube category and omega provides semantics for GCTT.
△ Less
Submitted 6 October, 2017; v1 submitted 28 November, 2016;
originally announced November 2016.
-
Guarded Cubical Type Theory: Path Equality for Guarded Recursion
Authors:
Lars Birkedal,
Aleš Bizjak,
Ranald Clouston,
Hans Bugge Grathwohl,
Bas Spitters,
Andrea Vezzosi
Abstract:
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-tri…
▽ More
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.
△ Less
Submitted 28 June, 2016; v1 submitted 16 June, 2016;
originally announced June 2016.
-
Functions out of Higher Truncations
Authors:
Paolo Capriotti,
Nicolai Kraus,
Andrea Vezzosi
Abstract:
In homotopy type theory, the truncation operator ||-||n (for a number n > -2) is often useful if one does not care about the higher structure of a type and wants to avoid coherence problems. However, its elimination principle only allows to eliminate into n-types, which makes it hard to construct functions ||A||n -> B if B is not an n-type. This makes it desirable to derive more powerful eliminati…
▽ More
In homotopy type theory, the truncation operator ||-||n (for a number n > -2) is often useful if one does not care about the higher structure of a type and wants to avoid coherence problems. However, its elimination principle only allows to eliminate into n-types, which makes it hard to construct functions ||A||n -> B if B is not an n-type. This makes it desirable to derive more powerful elimination theorems. We show a first general result: If B is an (n+1)-type, then functions ||A||n -> B correspond exactly to functions A -> B which are constant on all (n+1)-st loop spaces. We give one "elementary" proof and one proof that uses a higher inductive type, both of which require some effort. As a sample application of our result, we show that we can construct "set-based" representations of 1-types, as long as they have "braided" loop spaces. The main result with one of its proofs and the application have been formalised in Agda.
△ Less
Submitted 4 July, 2015;
originally announced July 2015.