Whiskerable#
- class discopy.monoidal.Whiskerable[source]#
Bases:
ABC
Abstract class implementing the syntactic sugar
@
for whiskering and parallel composition with some methodtensor
.- abstract classmethod id(dom)[source]#
Identity on a given domain, to be instantiated.
- Parameters:
dom (any) – The object on which to take the identity.
- Return type:
- abstract tensor(other)[source]#
Parallel composition, to be instantiated.
- Parameters:
other (Whiskerable) – The other diagram to compose in parallel.
- Return type:
- classmethod whisker(other)[source]#
Apply
Whiskerable.id()
ifother
is not tensorable else do nothing.- Parameters:
other (any) – The whiskering object.
- Return type: