Bubble#
- class discopy.cat.Bubble(*args, dom=None, cod=None, name='', method='bubble', **kwargs)[source]#
Bases:
Box
A bubble is a box with arrow
args
inside and an optional pair of objectsdom
andcod
.- 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.