class discopy.frobenius.Spider(n_legs_in, n_legs_out, typ, data=None, **params)[source]#

Bases: Box

The spider with n_legs_in and n_legs_out on a given atomic type, with some optional phase as data.

  • n_legs_in (int) – The number of legs in.

  • n_legs_out (int) – The number of legs out.

  • typ (Ty) – The type of the spider.

  • data – The phase of the spider.


>>> x = Ty('x')
>>> spider = Spider(1, 2, x)
>>> assert spider.dom == x and spider.cod == x @ x
property phase#

The phase of the spider.