Quotienting the delay monad by weak bisimilarity

James Chapman, Tarmo Uustalu, Niccolò Veltri

Research output: Contribution to journalArticle

3 Citations (Scopus)

Abstract

The delay datatype was introduced by Capretta (Logical Methods in Computer Science, 1(2), article 1, 2005) as a means to deal with partial functions (as in computability theory) in Martin-Löf type theory. The delay datatype is a monad. It is often desirable to consider two delayed computations equal, if they terminate with equal values, whenever one of them terminates. The equivalence relation underlying this identification is called weak bisimilarity. In type theory, one commonly replaces quotients with setoids. In this approach, the delay datatype quotiented by weak bisimilarity is still a monad-a constructive alternative to the maybe monad. In this paper, we consider the alternative approach of Hofmann (Extensional Constructs in Intensional Type Theory, Springer, London, 1997) of extending type theory with inductive-like quotient types. In this setting, it is difficult to define the intended monad multiplication for the quotiented datatype. We give a solution where we postulate some principles, crucially proposition extensionality and the (semi-classical) axiom of countable choice. With the aid of these principles, we also prove that the quotiented delay datatype delivers free ω-complete pointed partial orders (ωcppos). Altenkirch et al. (Lecture Notes in Computer Science, vol. 10203, Springer, Heidelberg, 534-549, 2017) demonstrated that, in homotopy type theory, a certain higher inductive-inductive type is the free ωcppo on a type X essentially by definition; this allowed them to obtain a monad of free ωcppos without recourse to a choice principle. We notice that, by a similar construction, a simpler ordinary higher inductive type gives the free countably complete join semilattice on the unit type 1. This type suffices for constructing a monad, which is isomorphic to the one of Altenkirch et al. We have fully formalized our results in the Agda dependently typed programming language.

LanguageEnglish
Pages67-92
Number of pages26
JournalMathematical Structures in Computer Science
Volume29
Issue number1
Early online date17 Oct 2017
DOIs
Publication statusPublished - 31 Jan 2019
Event12th International Colloquium on Theoretical Aspects of Computing - Cali, Colombia
Duration: 29 Oct 201531 Dec 2015

Fingerprint

Monads
Type Theory
Computer science
Partial Order
Computer programming languages
Terminate
Quotient
Computer Science
Computability Theory
Homotopy Theory
Homotopy Type
Alternatives
Semilattice
Postulate
Equivalence relation
Axiom
Proposition
Join
Programming Languages
Countable

Keywords

  • delay datatype
  • monad

Cite this

Chapman, James ; Uustalu, Tarmo ; Veltri, Niccolò. / Quotienting the delay monad by weak bisimilarity. In: Mathematical Structures in Computer Science. 2019 ; Vol. 29, No. 1. pp. 67-92.
@article{391322a4cadd4854ba35d54fc31d6cd2,
title = "Quotienting the delay monad by weak bisimilarity",
abstract = "The delay datatype was introduced by Capretta (Logical Methods in Computer Science, 1(2), article 1, 2005) as a means to deal with partial functions (as in computability theory) in Martin-L{\"o}f type theory. The delay datatype is a monad. It is often desirable to consider two delayed computations equal, if they terminate with equal values, whenever one of them terminates. The equivalence relation underlying this identification is called weak bisimilarity. In type theory, one commonly replaces quotients with setoids. In this approach, the delay datatype quotiented by weak bisimilarity is still a monad-a constructive alternative to the maybe monad. In this paper, we consider the alternative approach of Hofmann (Extensional Constructs in Intensional Type Theory, Springer, London, 1997) of extending type theory with inductive-like quotient types. In this setting, it is difficult to define the intended monad multiplication for the quotiented datatype. We give a solution where we postulate some principles, crucially proposition extensionality and the (semi-classical) axiom of countable choice. With the aid of these principles, we also prove that the quotiented delay datatype delivers free ω-complete pointed partial orders (ωcppos). Altenkirch et al. (Lecture Notes in Computer Science, vol. 10203, Springer, Heidelberg, 534-549, 2017) demonstrated that, in homotopy type theory, a certain higher inductive-inductive type is the free ωcppo on a type X essentially by definition; this allowed them to obtain a monad of free ωcppos without recourse to a choice principle. We notice that, by a similar construction, a simpler ordinary higher inductive type gives the free countably complete join semilattice on the unit type 1. This type suffices for constructing a monad, which is isomorphic to the one of Altenkirch et al. We have fully formalized our results in the Agda dependently typed programming language.",
keywords = "delay datatype, monad",
author = "James Chapman and Tarmo Uustalu and Niccol{\`o} Veltri",
year = "2019",
month = "1",
day = "31",
doi = "10.1017/S0960129517000184",
language = "English",
volume = "29",
pages = "67--92",
journal = "Mathematical Structures in Computer Science",
issn = "0960-1295",
number = "1",

}

Quotienting the delay monad by weak bisimilarity. / Chapman, James; Uustalu, Tarmo; Veltri, Niccolò.

In: Mathematical Structures in Computer Science, Vol. 29, No. 1, 31.01.2019, p. 67-92.

Research output: Contribution to journalArticle

TY - JOUR

T1 - Quotienting the delay monad by weak bisimilarity

AU - Chapman, James

AU - Uustalu, Tarmo

AU - Veltri, Niccolò

PY - 2019/1/31

Y1 - 2019/1/31

N2 - The delay datatype was introduced by Capretta (Logical Methods in Computer Science, 1(2), article 1, 2005) as a means to deal with partial functions (as in computability theory) in Martin-Löf type theory. The delay datatype is a monad. It is often desirable to consider two delayed computations equal, if they terminate with equal values, whenever one of them terminates. The equivalence relation underlying this identification is called weak bisimilarity. In type theory, one commonly replaces quotients with setoids. In this approach, the delay datatype quotiented by weak bisimilarity is still a monad-a constructive alternative to the maybe monad. In this paper, we consider the alternative approach of Hofmann (Extensional Constructs in Intensional Type Theory, Springer, London, 1997) of extending type theory with inductive-like quotient types. In this setting, it is difficult to define the intended monad multiplication for the quotiented datatype. We give a solution where we postulate some principles, crucially proposition extensionality and the (semi-classical) axiom of countable choice. With the aid of these principles, we also prove that the quotiented delay datatype delivers free ω-complete pointed partial orders (ωcppos). Altenkirch et al. (Lecture Notes in Computer Science, vol. 10203, Springer, Heidelberg, 534-549, 2017) demonstrated that, in homotopy type theory, a certain higher inductive-inductive type is the free ωcppo on a type X essentially by definition; this allowed them to obtain a monad of free ωcppos without recourse to a choice principle. We notice that, by a similar construction, a simpler ordinary higher inductive type gives the free countably complete join semilattice on the unit type 1. This type suffices for constructing a monad, which is isomorphic to the one of Altenkirch et al. We have fully formalized our results in the Agda dependently typed programming language.

AB - The delay datatype was introduced by Capretta (Logical Methods in Computer Science, 1(2), article 1, 2005) as a means to deal with partial functions (as in computability theory) in Martin-Löf type theory. The delay datatype is a monad. It is often desirable to consider two delayed computations equal, if they terminate with equal values, whenever one of them terminates. The equivalence relation underlying this identification is called weak bisimilarity. In type theory, one commonly replaces quotients with setoids. In this approach, the delay datatype quotiented by weak bisimilarity is still a monad-a constructive alternative to the maybe monad. In this paper, we consider the alternative approach of Hofmann (Extensional Constructs in Intensional Type Theory, Springer, London, 1997) of extending type theory with inductive-like quotient types. In this setting, it is difficult to define the intended monad multiplication for the quotiented datatype. We give a solution where we postulate some principles, crucially proposition extensionality and the (semi-classical) axiom of countable choice. With the aid of these principles, we also prove that the quotiented delay datatype delivers free ω-complete pointed partial orders (ωcppos). Altenkirch et al. (Lecture Notes in Computer Science, vol. 10203, Springer, Heidelberg, 534-549, 2017) demonstrated that, in homotopy type theory, a certain higher inductive-inductive type is the free ωcppo on a type X essentially by definition; this allowed them to obtain a monad of free ωcppos without recourse to a choice principle. We notice that, by a similar construction, a simpler ordinary higher inductive type gives the free countably complete join semilattice on the unit type 1. This type suffices for constructing a monad, which is isomorphic to the one of Altenkirch et al. We have fully formalized our results in the Agda dependently typed programming language.

KW - delay datatype

KW - monad

UR - https://www.cambridge.org/core/journals/mathematical-structures-in-computer-science

UR - http://www.ictac2015.co/

U2 - 10.1017/S0960129517000184

DO - 10.1017/S0960129517000184

M3 - Article

VL - 29

SP - 67

EP - 92

JO - Mathematical Structures in Computer Science

T2 - Mathematical Structures in Computer Science

JF - Mathematical Structures in Computer Science

SN - 0960-1295

IS - 1

ER -