RigidCategory#
- class discopy.abc.RigidCategory[source]#
Bases:
BiclosedCategory,GenericA rigid category is a
BiclosedCategorywith aPregroupas object type and methods forcupsandcaps.- abstract classmethod cups(left, right)[source]#
The cups witnessing
rightas the adjoint ofleft.- Parameters:
left (C0) – The left-hand side of the cups.
right (C0) – Its adjoint, i.e. the right-hand side of the cups.
- Return type:
C1
- abstract classmethod caps(left, right)[source]#
The caps witnessing
rightas the adjoint ofleft.- Parameters:
left (C0) – The left-hand side of the caps.
right (C0) – Its adjoint, i.e. the right-hand side of the caps.
- Return type:
C1
- transpose(left=False)[source]#
The transpose of a morphism, i.e. its composition with cups and caps.
- Parameters:
left (bool) – Whether to transpose left or right.
- Return type:
C1
Example
>>> from discopy.monoidal import Equation >>> from discopy.rigid import Ty, Box >>> x, y = map(Ty, "xy") >>> f = Box('f', x, y) >>> Equation(f.transpose(left=True), f, f.transpose(), ... symbols=("$\\mapsfrom$", "$\\mapsto$")).draw( ... figsize=(8, 3), path="docs/_static/rigid/transpose.svg")