An ordinary category consists of a set of objects and a set of arrows, each with a single input or domain object and a single output or codomain object. Arrows are composed by plugging outputs into inputs, as when one composes unary operations.
An ordinary multicategory consists of a set of objects and a set of “multi-arrows”, each with a finite list of inputs or domain objects and a single output or codomain object. These multi-arrows are composed by means of multiple plug-ins or substitutions, as when one substitutes a list of operations of varying arities into an -ary operation.
Both categories and multicategories can be seen as monads in an appropriate bicategory of span-like objects. Categories are monads in the category of ordinary spans (of sets). Multicategories are monads in a bicategory of spans of shape
where is the set of finite lists of elements of .
In order to compose spans of this type, one takes advantage of certain properties of the list monad or free monoid monad , namely that it is a cartesian monad . This suggests the following wide extrapolation.
Let be a finitely complete category, and let be a cartesian monad on . Then there is a bicategory of -spans in , whose objects are objects of , whose morphisms are spans from to , and whose 2-cells are morphisms of such spans. The identity is the span
where is the unit of , and morphisms , are composed by taking pullbacks of shape
A -multicategory in is by definition a monad in the bicategory described above.