| | |
Summary: Derivatives of Containers
Michael Abbott1, Thorsten Altenkirch2, Neil Ghani1, and Conor McBride3
1 Department of Mathematics and Computer Science, University of Leicester
¢¡¤£¦¥¨§©§¨§¨©¨¡¦¨§© £"!#%$& , ')(10¤2 ¢£¤345©5§¤£6%$&
2 School of Computer Science and Information Technology, Nottingham University
7¤8 §£¤36%9! 7¤7 5§£4%$&
3 Department of Computer Science, University of Durham
£4 7 @ ¢£2A9¡©$¥¨§1 B5§£4%$&
Abstract. We are investigating McBride's idea that the type of one-hole contexts
are the formal derivative of a functor from a categorical perspective. Exploiting
our recent work on containers we are able to characterise derivatives by a
universal property and show that the laws of calculus including a rule for initial
algebras as presented by McBride hold -- hence the differentiable containers
include those generated by polynomials and least fixpoints. Finally, we discuss
abstract containers (i.e. quotients of containers) -- this includes a container which
plays the role of ex in calculus by being its own derivative.
1 Introduction
In his classic functional pearl Huet (1997) shows how to represent a tree with one of
its subtrees `in focus' by a pair of the subtree and the one-hole context (or `zipper')
in which it sits. The unpublished article McBride (2001) gives a `generic program' for
|