Abstract
The delay datatype was introduced by Capretta [3] as a means to deal with partial functions (as in computability theory) in Martin-Löf type theory. It is a monad and it constitutes a constructive alternative to the maybe 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 monad quotiented by weak bisimilarity is still a monad. In this paper, we consider Hofmann’s alternative approach [6] 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. We have fully formalized our results in the Agda dependently typed programming language.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Working in homotopy type theory [15], we would assume this principle only for 0-types, i.e., sets, and that would also be enough for our purposes.
- 2.
Propositions are (\(-1\))-types and proposition extensionality is univalence for (\(-1\))-types.
- 3.
Notice that \(\mathsf {AC}\) is fundamentally different from the type-theoretic axiom of choice:
$$\begin{aligned} \prod _{\{X, Y: \mathcal {U}\}}\,\prod _{P : X \rightarrow Y \rightarrow \mathcal {U}}\,\left( \prod _{x : X} \, \sum _{y : Y} \, P\,x\,y \right) \rightarrow \sum _{f : X \rightarrow Y} \, \prod _{x : X} \, P\,x\,(f\,x) \end{aligned}$$which is provable in type theory.
References
Adámek, J., Milius, S., Velebil, J.: Elgot algebras. Log. Methods Comput. Sci. 2(5:4), 1–31 (2006)
Benton, N., Kennedy, A., Varming, C.: Some domain theory and denotational semantics in Coq. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 115–130. Springer, Heidelberg (2009)
Capretta, V.: General recursion via coinductive types. Log. Methods Comput. Sci. 1(2:1), 1–28 (2005)
Chicli, L., Pottier, L., Simpson, D.: Mathematical quotients and quotient types in Coq. In: Geuvers, H., Wiedijk, F. (eds.) TYPES 2002. LNCS, vol. 2646, pp. 95–107. Springer, Heidelberg (2003)
Cockett, R., Díaz-Boïls, J., Gallagher, J., Hrubes, P.: Timed sets, complexity, and computability. In: Berger, U., Mislove, M. (eds.) Proceedings of 28th Conference on the Mathematical Foundations of Program Semantics, MFPS XXVIII. Electron. Notes in Theor. Comput. Sci., vol. 286, pp. 117–137. Elsevier, Amsterdam (2012)
Hofmann, M.: Extensional Constructs in Intensional Type Theory. CPHS/BCS Distinguished Dissertations. Springer, London (1997)
Hughes, J.: Generalising monads to arrows. Sci. Comput. Program. 37(1–3), 67–111 (2000)
Jacobs, B., Heunen, C., Hasuo, I.: Categorical semantics for arrows. J. Funct. Program. 19(3–4), 403–438 (2009)
Kraus, N., Escardó, M., Coquand, T., Altenkirch, T.: Notions of anonymous existence in Martin-Löf type theory. Manuscript (2014)
Maietti, M.E.: About effective quotients in constructive type theory. In: Altenkirch, T., Naraschewski, W., Reus, B. (eds.) TYPES 1998. LNCS, vol. 1657, pp. 166–178. Springer, Heidelberg (1999)
Martin-Löf, P.: 100 years of Zermelo’s axiom of choice: what was the problem with it? Comput. J. 49(3), 345–350 (2006)
Moggi, E.: Notions of computation and monads. Inf. Comput. 93(1), 55–92 (1991)
Norell, U.: Dependently typed programming in Agda. In: Koopman, P., Plasmeijer, R., Swierstra, D. (eds.) AFP 2008. LNCS, vol. 5832, pp. 230–266. Springer, Heidelberg (2009)
Troelstra, A.S., Van Dalen, D.: Constructivism in Mathematics: An Introduction, v. I. Studies in Logic and the Foundations of Mathematics, vol. 121. North-Holland, Amsterdam (1988)
The Univalent Foundations Program: Homotopy Type Theory: Univalent Foundations of Mathematics. Institute for Advanced Study, Princeton, NY (2013). http://homotopytypetheory.org/book
Acknowledgement
We thank Thorsten Altenkirch, Andrej Bauer, Bas Spitters and our anonymous referees for comments.
This research was supported by the ERDF funded Estonian CoE project EXCS and ICT national programme project “Coinduction”, the Estonian Science Foundation grants No. 9219 and 9475 and the Estonian Ministry of Education and Research institutional research grant IUT33-13.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Chapman, J., Uustalu, T., Veltri, N. (2015). Quotienting the Delay Monad by Weak Bisimilarity. In: Leucker, M., Rueda, C., Valencia, F. (eds) Theoretical Aspects of Computing - ICTAC 2015. ICTAC 2015. Lecture Notes in Computer Science(), vol 9399. Springer, Cham. https://doi.org/10.1007/978-3-319-25150-9_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-25150-9_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-25149-3
Online ISBN: 978-3-319-25150-9
eBook Packages: Computer ScienceComputer Science (R0)