Equation#
- class discopy.monoidal.Equation(*terms, symbol='=', symbols=None, space=1, up_to=None)[source]#
Bases:
discopy.cat.EquationAn
cat.Equationof diagrams, i.e. with adraw()method.- Parameters:
terms (Diagram) – The terms of the equation.
symbol – The symbol between each pair of terms,
"="by default.symbols – The symbols between each pair of terms, overriding
symbol;len(terms) * (symbol, )by default.space – The space between the terms when drawing the equation.
up_to – The function up to which
bool(equation)compares its terms, overriding the subclass’up_toif given.
Example
>>> x = Ty('x') >>> f, g = Box('f', x, x), Box('g', x, x) >>> print(Equation(f, g)) Equation(f, g)
- draw(path=None, **params)[source]#
Drawing an equation.
- Parameters:
path – Where to save the drawing.
params – Passed to
Diagram.draw().