The notion of derivatives in calculus extends to containers in a surprising way preserving chain-rule and other properties.

Idea

Given a container, we might want to talk about the one-hole contexts of that container. This can be understood as a container with some datatype, where one position is may be occupied by a ‘hole’.

Definition

Given a container its derivative is a container such that is

So in general,

In cases where is emtpy then that shape is removed.

Partial Derivative

Given an -ary container , Let ; ,

Derivative of a Fixpoint

Let be an -ary container.

Examples

  • — empty container
  • — constant container has no place to insert a hole so it gets replaced with an empty container.
  • becomes the constant container .

References

gylterud2011-symmetric-containers-thesis abbott2005-container-derivative