biclosed#
The free biclosed monoidal category, i.e. with left and right exponentials.
Summary#
A biclosed type is a monoidal type that can be exponentiated. |
|
A |
|
An |
|
A |
|
A biclosed diagram is a monoidal diagram with |
|
A biclosed box is a monoidal box in a biclosed diagram. |
|
The evaluation of an exponential type. |
|
The coevaluation of an exponential type, i.e. the dagger of |
|
The currying of a biclosed diagram. |
|
A biclosed sum is a monoidal sum and a biclosed box. |
|
A biclosed functor is a monoidal functor that preserves evaluation and currying. |
Axioms#
Diagram.curry() and Diagram.uncurry() are inverses.
>>> x, y, z = map(Ty, "xyz")
>>> f, g, h = Box('f', x, z << y), Box('g', x @ y, z), Box('h', y, x >> z)
>>> from discopy.drawing import Equation
>>> Equation(f.uncurry(left=True).curry(left=True), f).draw(
... path='docs/_static/biclosed/curry-left.png', margins=(0.1, 0.05))
>>> Equation(h.uncurry().curry(), h).draw(
... path='docs/_static/biclosed/curry-right.png', margins=(0.1, 0.05))
>>> Equation(
... g.curry(left=True).uncurry(left=True), g, g.curry().uncurry()).draw(
... path='docs/_static/biclosed/uncurry.png')