Bubble#

class discopy.monoidal.Bubble(inside, dom=None, cod=None, **params)[source]#

Bases: Bubble, Box

Bubble in a monoidal diagram, i.e. a unary operator on homsets.

Parameters:

Examples

>>> x, y = Ty('x'), Ty('y')
>>> f, g = Box('f', x, y ** 3), Box('g', y, y @ y)
>>> d = (f.bubble(dom=x @ x, cod=y) >> g).bubble()
>>> d.draw(path='docs/_static/imgs/monoidal/bubble-example.png')
../_images/bubble-example.png
downgrade()[source]#

Downcasting to discopy.monoidal.Bubble.