Equation#

An equation is a list of diagrams with a dedicated draw method.

Example

>>> from discopy.tensor import Spider, Swap, Dim, Id
>>> dim = Dim(2)
>>> mu, eta = Spider(2, 1, dim), Spider(0, 1, dim)
>>> delta, upsilon = Spider(1, 2, dim), Spider(1, 0, dim)
>>> special = Equation(mu >> delta, Id(dim))
>>> special  
Equation(Diagram(...), Id(Dim(2)))
>>> frobenius = Equation(
...     delta @ Id(dim) >> Id(dim) @ mu,
...     mu >> delta,
...     Id(dim) @ delta >> mu @ Id(dim))
>>> print(frobenius)  
Spider... @ Spider... = Spider... >> Spider... = Id... @ Spider...
>>> equation(special, frobenius, symbol=', ',
...          aspect='equal', draw_type_labels=False, figsize=(8, 2),
...          path='docs/_static/imgs/drawing/frobenius-axioms.png')
../_images/frobenius-axioms.png