MonoidalCategory#
- class discopy.abc.MonoidalCategory[source]#
Bases:
Category,GenericA monoidal category is a
Categorywith a methodtensorfor both its objects and its arrows.This base class also implements syntactic sugar
@for whiskering.- abstract classmethod id(dom)[source]#
Identity on a given domain, to be instantiated.
- Parameters:
dom (T) – The object on which to take the identity.
- Return type:
- abstract tensor(other)[source]#
Parallel composition, to be instantiated.
- Parameters:
other (MonoidalCategory) – The other arrow to compose in parallel.
- Return type:
- classmethod whisker(other)[source]#
Apply
MonoidalCategory.id()ifotheris not tensorable else do nothing.- Parameters:
other (T) – The whiskering object.
- Return type: