Bubble#
- class discopy.cat.Bubble(*args, dom=None, cod=None, name='Bubble', method='bubble', **kwargs)[source]#
Bases:
Box
A bubble is a box with an arrow
arg
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
other
.cod (T) – The codomain of the bubble, default is that of
other
.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
.
- property arg#
The arrow inside the bubble if there is exactly one.
- property is_id_on_objects#
Whether the bubble is identity on objects.