Ob

Contents

Ob#

class discopy.rigid.Ob(name, z=0, dom=monoidal.Colour('white'), cod=monoidal.Colour('white'))[source]#

Bases: discopy.monoidal.Wire

A rigid object has adjoints Ob.l() and Ob.r().

Parameters:
  • name (str) – The name of the object.

  • z (int) – The winding number.

  • dom (monoidal.Colour) – The domain colour.

  • cod (monoidal.Colour) – The codomain colour.

Note

Taking an adjoint reverses the direction of the wire, hence it swaps the domain and codomain colours.

Example

>>> a = Ob('a')
>>> assert a.l.r == a.r.l == a and a != a.l.l != a.r.r
property l: Ob#

The left adjoint of the object.

property r: Ob#

The right adjoint of the object.