MonoidalCategory#

class discopy.abc.MonoidalCategory[source]#

Bases: Category, Generic

A monoidal category is a Category with a method tensor for both its objects and its morphisms.

This base class also implements syntactic sugar @ for whiskering.

abstract classmethod tensor(*morphisms)[source]#

Parallel composition of n >= 0 morphisms, to be instantiated.

Parameters:
  • other – The other morphism to compose in parallel.

  • morphisms (C1) –

Return type:

C1

classmethod whisker(other)[source]#

Do nothing if other is already a morphism else apply id().

Parameters:

other (C0 | C1) – The object or morphism to be tensored on the left or right.

Return type:

C1