Ty#
- class discopy.rigid.Ty(*inside, dom=None, cod=None, _scan=True, **kwargs)[source]#
Bases:
discopy.abc.Pregroup,discopy.biclosed.TyA rigid type is a biclosed type with rigid objects inside.
- Parameters:
inside (tuple[Wire, ...]) – The objects inside the type.
dom (C0)
cod (C0)
_scan (bool)
Example
>>> s, n = Ty('s'), Ty('n') >>> assert n.l.r == n == n.r.l >>> assert (s @ n).l == n.l @ s.l and (s @ n).r == n.r @ s.r
- assert_isadjoint(other)[source]#
Raise
AxiomErrorif two rigid types are not adjoints.- Parameters:
other – The alleged right adjoint.
- property z: int#
The winding number is only defined for types of length 1.
- unwind()[source]#
The atomic type with winding number zero, see
Wire.unwind(). This method is only defined for atomic types.The previous normalisation applied
.ronce, which is only an involution for pivotal types: it sent rigidn.rton.r.r.Example
>>> n = Ty('n') >>> assert n.r.r.unwind() == n.l.unwind() == n
- Return type: