Sum#
- class discopy.monoidal.Sum(terms, dom=None, cod=None)[source]#
Bases:
discopy.cat.Sum
,Box
A sum is a tuple of diagrams
terms
with the same domain and codomain.- Parameters:
Example
>>> f = Box('f', 'x', 'x') >>> print(f @ (f + f)) (f @ x >> x @ f) + (f @ x >> x @ f)
- to_drawing(functor_factory=None)#
Called before
Diagram.draw()
.- Return type: