CMap#
- class discopy.biclosed.CMap(dom, cod, boxes, edges, offsets=None, loops=())[source]#
Bases:
discopy.monoidal.CMap- Parameters:
dom (C0) –
cod (C0) –
boxes (tuple[Box, ...]) –
edges (Iterable[int]) –
offsets (tuple[int | None, ...] | None) –
loops (tuple[C0, ...]) –
- curry(n=1, left=False)[source]#
Curry a combinatorial map using the closed structure of the host category.
- Parameters:
n – The number of objects to curry.
left – Whether to curry on the left or right.
- Return type:
Self
>>> from discopy.closed import Ty, Box >>> from discopy.drawing import Equation >>> x, y, z = map(Ty, "xyz") >>> f = Box("f", x @ y, z).to_map() >>> f.curry().uncurry().draw( ... path="docs/_static/cmap/biclosed-curry-right.png", show=False)
>>> f.curry(left=True).uncurry(left=True).draw( ... path="docs/_static/cmap/biclosed-curry-left.png", show=False)