Bubble#
- class discopy.cat.Bubble(*args, dom=None, cod=None, name='', method='bubble', **kwargs)[source]#
Bases:
BoxA bubble is a box with arrow
argsinside and an optional pair of objectsdomandcod.- Parameters:
args (Arrow) – The arrows inside the bubble.
dom (T) – The domain of the bubble, default is that of
args.cod (T) – The codomain of the bubble, default is that of
args.name (str) – An optional name for the bubble.
method (str) – The method to call when a functor is applied to it.
kwargs – Passed to the __init__ of
Box.
- Raises:
ValueError – When dom is None but all the args have the same dom.
- property arg#
The arrow inside the bubble if there is exactly one.
- property is_id_on_objects#
Whether the bubble is identity on objects.