Reference. Towards Univalent Reference Types: The Impact of Univalence on Denotational Semantics

We develop a denotational semantics for general reference types in an impredicative version of guarded homotopy type theory, an adaptation of synthetic guarded domain theory to Voevodsky’s univalent foundations. We observe for the first time the profound impact of univalence on the denotational semantics of mutable state. Univalence automatically ensures that all computations are invariant under symmetries of the heap - a bountiful source of program equivalences. In particular, even the most simplistic univalent model enjoys many new equations that do not hold when the same constructions are carried out in the universes of traditional set-level (extensional) type theory.

Cite

Cite as @sterling-2024-towards (helia, typst) · \cite{sterling-2024-towards} (LaTeX)
BibTeX
bibtex · 14 lines
@inproceedings{sterling-2024-towards,
  doi = {10.4230/LIPICS.CSL.2024.47},
  url = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CSL.2024.47},
  author = {Sterling, Jonathan and Gratzer, Daniel and Birkedal, Lars},
  keywords = {univalent foundations, homotopy type theory, impredicative encodings, synthetic guarded domain theory, guarded recursion, higher-order store, reference types, Theory of computation → Denotational semantics, Theory of computation → Categorical semantics, Theory of computation → Type structures, Theory of computation → Type theory},
  language = {en},
  title = {Towards Univalent Reference Types: The Impact of Univalence on Denotational Semantics},
  volume = {288},
  pages = {47:1-47:21},
  publisher = {Schloss Dagstuhl – Leibniz-Zentrum für Informatik},
  year = {2024},
  copyright = {Creative Commons Attribution 4.0 International license},
  booktitle = {32nd EACSL Annual Conference on Computer Science Logic (CSL 2024)}
}
hayagriva YAML (typst)
yaml · 17 lines
sterling-2024-towards:
  type: article
  title: 'Towards Univalent Reference Types: The Impact of Univalence on Denotational Semantics'
  author:
  - Sterling, Jonathan
  - Gratzer, Daniel
  - Birkedal, Lars
  date: 2024
  page-range: 47:1-47:21
  url: https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.CSL.2024.47
  serial-number:
    doi: 10.4230/LIPICS.CSL.2024.47
  parent:
    type: proceedings
    title: 32nd EACSL Annual Conference on Computer Science Logic (CSL 2024)
    publisher: Schloss Dagstuhl – Leibniz-Zentrum für Informatik
    volume: 288
Cited by (1)

Modelling Recursion and Probabilistic Choice in Guarded Type Theory stassen-2025-modelling

Constructive type theory combines logic and programming in one language. This is useful both for reasoning about programs written in type theory, as well as for reasoning about other programming languages inside type theory. It is well-known that it is challenging to extend these applications to languages with recursion and computational effects such as probabilistic choice, because these features are not easily represented in constructive type theory. We show how to define and reason about FPC ⊕ , a programming language with probabilistic choice and recursive types, in guarded type theory. We use higher inductive types to represent finite distributions and guarded recursion to model recursion. We define both operational and denotational semantics of FPC ⊕ , as well as a relation between the two. The relation can be used to prove adequacy, but we also show how to use it to reason about programs up to contextual equivalence.
DOI · arXiv · pldb
Cites 46 works (8 here)
With notes (8)

Unifying cubical and multimodal type theory aagaard-2024-unifying

In this paper we combine the principled approach to modalities from multimodal type theory (MTT) with the computationally well-behaved realization of identity types from cubical type theory (CTT). The result – cubical modal type theory (Cubical MTT) – has the desirable features of both systems. In fact, the whole is more than the sum of its parts: Cubical MTT validates desirable extensionality principles for modalities that MTT only supported through ad hoc means. We investigate the semantics of Cubical MTT and provide an axiomatic approach to producing models of Cubical MTT based on the internal language of topoi and use it to construct presheaf models. Finally, we demonstrate the practicality and utility of this axiomatic approach to models by constructing a model of (cubical) guarded recursion in a cubical version of the topos of trees. We then use this model to justify an axiomatization of Löb induction and thereby use Cubical MTT to smoothly reason about guarded recursion.
DOI · arXiv

Internalizing representation independence with univalence angiuli-2021-internalizing

In their usual form, representation independence metatheorems provide an external guarantee that two implementations of an abstract interface are interchangeable when they are related by an operation-preserving correspondence. If our programming language is dependently-typed, however, we would like to appeal to such invariance results within the language itself, in order to obtain correctness theorems for complex implementations by transferring them from simpler, related implementations. Recent work in proof assistants has shown that Voevodsky’s univalence principle allows transferring theorems between isomorphic types, but many instances of representation independence in programming involve non-isomorphic representations. In this paper, we develop techniques for establishing internal relational representation independence results in dependent type theory, by using higher inductive types to simultaneously quotient two related implementation types by a heterogeneous correspondence between them. The correspondence becomes an isomorphism between the quotiented types, thereby allowing us to obtain an equality of implementations by univalence. We illustrate our techniques by considering applications to matrices, queues, and finite multisets. Our results are all formalized in Cubical Agda, a recent extension of Agda which supports univalence and higher inductive types in a computationally well-behaved way.
PDF · DOI · pldb

Modalities in homotopy type theory rijke-2020-modalities

Univalent homotopy type theory (HoTT) may be seen as a language for the category of ∞-groupoids. It is being developed as a new foundation for mathematics and as an internal language for (elementary) higher toposes. We develop the theory of factorization systems, reflective subuniverses, and modalities in homotopy type theory, including their construction using a “localization” higher inductive type. This produces in particular the (𝑛-connected, 𝑛-truncated) factorization system as well as internal presentations of subtoposes, through lex modalities. We also develop the semantics of these constructions.
DOI · arXiv

Displayed Categories ahrens-lumsdaine-2019

We introduce and develop the notion of displayed categories. A displayed category over a category C is equivalent to “a category D and functor F : D –> C”, but instead of having a single collection of “objects of D” with a map to the objects of C, the objects are given as a family indexed by objects of C, and similarly for the morphisms. This encapsulates a common way of building categories in practice, by starting with an existing category and adding extra data/properties to the objects and morphisms. The interest of this seemingly trivial reformulation is that various properties of functors are more naturally defined as properties of the corresponding displayed categories. Grothendieck fibrations, for example, when defined as certain functors, use equality on objects in their definition. When defined instead as certain displayed categories, no reference to equality on objects is required. Moreover, almost all examples of fibrations in nature are, in fact, categories whose standard construction can be seen as going via displayed categories. We therefore propose displayed categories as a basis for the development of fibrations in the type-theoretic setting, and similarly for various other notions whose classical definitions involve equality on objects. Besides giving a conceptual clarification of such issues, displayed categories also provide a powerful tool in computer formalisation, unifying and abstracting common constructions and proof techniques of category theory, and enabling modular reasoning about categories of multi-component structures. As such, most of the material of this article has been formalised in Coq over the UniMath library, with the aim of providing a practical library for use in further developments.

We introduce and develop the notion of displayed categories. A displayed category over a category 𝐶 is equivalent to “a category 𝐷 and functor 𝐹:𝐷→𝐶, but instead of having a single collection of “objects of 𝐷” with a map to the objects of 𝐶, the objects are given as a family indexed by objects of 𝐶, and similarly for the morphisms. This encapsulates a common way of building categories in practice, by starting with an existing category and adding extra data/properties to the objects and morphisms. The interest of this seemingly trivial reformulation is that various properties of functors are more naturally defined as properties of the corresponding displayed categories. Grothendieck fibrations, for example, when defined as certain functors, use equality on objects in their definition. When defined instead as certain displayed categories, no reference to equality on objects is required. Moreover, almost all examples of fibrations in nature are, in fact, categories whose standard construction can be seen as going via displayed categories. We therefore propose displayed categories as a basis for the development of fibrations in the type-theoretic setting, and similarly for various other notions whose classical definitions involve equality on objects. Besides giving a conceptual clarification of such issues, displayed categories also provide a powerful tool in computer formalisation, unifying and abstracting common constructions and proof techniques of category theory, and enabling modular reasoning about categories of multi-component structures. As such, most of the material of this article has been formalised in Coq over the UniMath library, with the aim of providing a practical library for use in further developments.

DOI · arXiv

Guarded Cubical Type Theory birkedal-2018-guarded

DOI

Nominal Sets: Names and Symmetry in Computer Science pitts_nominal_sets

First steps in synthetic guarded domain theory: step-indexing in the topos of trees birkedalFirstStepsSGDT2012

We present the topos S of trees as a model of guarded recursion. We study the internal dependently-typed higher-order logic of S and show that S models two modal operators, on predicates and types, which serve as guards in recursive definitions of terms, predicates, and types. In particular, we show how to solve recursive type equations involving dependent types. We propose that the internal logic of S provides the right setting for the synthetic construction of abstract versions of step-indexed models of programming languages and program logics. As an example, we show how to construct a model of a programming language with higher-order store and recursive types entirely inside the internal logic of S. Moreover, we give an axiomatic categorical treatment of models of synthetic guarded domain theory and prove that, for any complete Heyting algebra A with a well-founded basis, the topos of sheaves over A forms a model of synthetic guarded domain theory, generalizing the results for S.
DOI

Call-By-Push-Value: A Functional/Imperative Synthesis levy-2003-callbypushvalue

DOI
External (38)
sterling-2024-towards reference entries/refs/sterling-2024-towards/sterling-2024-towards.hel