Decorated cospans, corelations, and electrical circuits

**Abstract**

Given a category **C** with finite limits, it is well-known that one may
form a category with morphisms spans in **C**, and composition given by
pullback.
Furthermore, when an epi-mono factorisation system is available, one
may form a category with morphisms jointly-monic spans in **C**. In the
category **Set** this construction gives relations between
sets. Dually, one may talk of categories of cospans and corelations.

Given a cospan or corelation *X*→*N*←*Y*, we
may equip the so-called
apex *N* of the cospan with additional structure, such as a finite graph
with vertices *N*, or a real valued function on *N*. We call
this additional
structure a decoration, and the cospan a decorated cospan. We shall
discuss the conditions under which this construction gives a category, and
how to construct functors between such categories.

As an example, we shall show that a class of electrical circuit diagrams can be considered as morphisms in a decorated cospan category, and that the semantics of these circuit diagrams may be view as a functor from this category to the category of linear relations.

This is an expanded version of my Octoberfest 2015 talk. Joint work with John Baez (UC Riverside).