closed#
The free closed markov category, i.e. with copy, discard and exponentials.
Summary#
A closed type is a biclosed type in a symmetric category where left and right exponentials coincide, i.e. X << Y == X ** Y == Y >> X. |
|
An exponential object in a markov category. |
|
A term in the internal language of a closed category. |
|
A closed diagram is both a markov and a biclosed diagram. |
|
A closed box is a markov and biclosed box in a closed diagram. |
|
The evaluation of an exponential type. |
|
The coevaluation of an exponential type, i.e. the dagger of an Eval. |
|
The currying of a closed diagram. |
|
A markov sum is a symmetric sum and a markov box. |
|
A closed functor is a markov functor that preserves evaluation and currying. |
|
Axioms#
Diagram.curry() and Diagram.uncurry() are inverses.
>>> x, y, z = map(Ty, "xyz")
>>> f, g = Box('f', x, z << y), Box('g', x @ y, z)
>>> from discopy.drawing import Equation
>>> Equation(f.uncurry().curry(), f).draw(
... path='docs/_static/closed/curry-left.png', margins=(0.1, 0.05))
>>> Equation(g.curry().uncurry(), g).draw(
... path='docs/_static/closed/uncurry.png')