Abstract
We introduce the notion of containers as a mathematical formalisation of the idea that many important datatypes consist of templates where data is stored. We show that containers have good closure properties under a variety of constructions including the formation of initial algebras and final coalgebras. We also show that containers include strictly positive types and shapely types but that there are containers which do not correspond to either of these. Further, we derive a representation result classifying the nature of polymorphic functions between containers. We finish this paper with an application to the theory of shapely types and refer to a forthcoming paper which applies this theory to differentiable types.
Chapter PDF
Similar content being viewed by others
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
M. Abbott T. Altenkirch N. Ghani and C. McBride. Derivatives of containers. URL http://www.cs.nott.ac.uk/~txa/. Submitted for publication, 2003.
A. Abel and T. Altenkirch. A predicative strong normalisation proof for a λ-calculus with interleaving inductive types. In Types for Proof and Programs,TYPES’ 99, volume 1956 of Lecture Notes in Computer Science, 2000.
J. Adámek and V. Koubek. Least fixed point of a functor. Journal of Computer and System Sciences, 19:163–178, 1979.
J. Adámek and J. Rosický. Locally Presentable and Accessible Categories. Number 189 in London Mathematical Society Lecture Note Series. Cambridge University Press, 1994.
T. Altenkirch and C. McBride. Generic programming within dependently typed programming. In IFIP Working Conference on Generic Programming, 2002.
F. Borceux. Handbook of Categorical Algebra 2. Cambridge University Press, 1994.
A. Carboni and P. Johnstone. Connected limits, familial representability and Artin glueing. Math. Struct. in Comp. Science, 5:441–459, 1995.
R. Hasegawa. Two applications of analytic functors. Theoretical Computer Science, 272(1–2): 112–175, 2002.
M. Hofmann. Syntax and semantics of dependent types. In A. M. Pitts and P. Dybjer, editors, Semantics and Logics of Computation, volume 14, pages 79–130. Cambridge University Press, Cambridge, 1997.
P. Hoogendijk and O. de Moor. Container types categorically. Journal of Functional Programming, 10(2):191–225, 2000.
B. Jacobs. Categorical Logic and Type Theory. Number 141 in Studies in Logic and the Foundations of Mathematics. Elsevier, 1999.
C. B. Jay. A semantics for shape. Science of Computer Programming, 25:251–283, 1995.
C. B. Jay and J. R. B. Cockett. Shapely types and shape polymorphism. In ESOP’ 94: 5th European Symposium on Programming, Lecture Notes in Computer Science, pages 302–316. Springer-Verlag, 1994.
P. T. Johnstone. Topos Theory. Academic Press, 1977.
C. McBride. The derivative of a regular type is its type of one-hole contexts. URL http://www.dur.ac.uk/c.t.mcbride/. 2001.
E. Moggi, G. Bellè, and C. B. Jay. Monads, shapely functors and traversals. Electronic Notes in Theoretical Computer Science, 29, 1999.
P. Taylor. Practical Foundations of Mathematics. Cambridge University Press, 1999.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Abbott, M., Altenkirch, T., Ghani, N. (2003). Categories of Containers. In: Gordon, A.D. (eds) Foundations of Software Science and Computation Structures. FoSSaCS 2003. Lecture Notes in Computer Science, vol 2620. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-36576-1_2
Download citation
DOI: https://doi.org/10.1007/3-540-36576-1_2
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-00897-2
Online ISBN: 978-3-540-36576-1
eBook Packages: Springer Book Archive