Brandon Shapiro and David Spivak (“Dynamic Categories, Dynamic Operads”) build categorical structures whose hom-objects are themselves machines, so that a dynamic category is a category in which morphisms carry interactive, stateful behaviour.

The category of polynomial functors is monoidal closed for the substitution product , with an internal hom satisfying

From this Spivak and Shapiro extract , a category-enriched structure whose hom from to is the category of -coalgebras. These coalgebras are stateful machines that read and react to whatever flows between the interfaces and . A polynomial comonoid is precisely a small category, which is how ordinary categorical data sits inside .

Their slogan is that a dynamic thing is a thing enriched in . Replacing hom-sets by hom-categories-of-coalgebras turns any categorical notion into its dynamic analogue.

Definition (dynamic category)

A dynamic category is a category enriched in . Its objects are interfaces, and each hom is a category of coalgebras of behaviours, with composition given by a coherent way of running two machines in series. Applying the same recipe to operads yields dynamic operads.

Remark on why closedness matters

The internal hom is what lets a morphism carry state. A -coalgebra is a dynamical system on the interface , so enrichment in these coalgebra categories is the formal content of “the arrows themselves evolve”.