Diagram
Diagram#
- class discopy.frobenius.Diagram(inside, dom, cod, _scan=True)[source]#
Bases:
discopy.compact.Diagram
A frobenius diagram is a compact diagram with
Spider
boxes.- Parameters
- classmethod spiders(n_legs_in, n_legs_out, typ, phases=None)[source]#
The spiders on a given type with
n_legs_in
andn_legs_out
and some optional vector ofphases
.
- unfuse()[source]#
Unfuse arbitrary spiders into spiders with one or three legs.
See also
This
Example
>>> from discopy.drawing import Equation >>> spider = Spider(3, 5, Ty(''), "$\\phi$") @ Ty() >>> Spider.color = "red" >>> Equation(spider, spider.unfuse(), symbol="$\\mapsto$").draw( ... path='docs/_static/hypergraph/unfuse.png')
- Return type