RigidCategory#

class discopy.abc.RigidCategory[source]#

Bases: BiclosedCategory, Generic

A rigid category is a BiclosedCategory with a Pregroup as object type and methods for cups and caps.

abstract classmethod cups(left, right)[source]#

The cups witnessing right as the adjoint of left.

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 right as the adjoint of left.

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")
../_images/transpose.svg