balanced#
The free balanced category, i.e. diagrams with braids and a twist.
Summary#
A balanced diagram is a braided diagram with |
|
A braided box is a monoidal box in a braided diagram. |
|
Braid in a balanced category. |
|
The twist on atomic type |
|
A balanced sum is a braided sum and a balanced box. |
|
A braided category is a monoidal category with a method |
|
A balanced functor is a braided functor that twists. |
Axioms#
The axiom for the twist holds on the nose.
>>> x, y = Ty('x'), Ty('y')
>>> assert Diagram.twist(x @ y) == (Braid(x, y)
... >> Twist(y) @ Twist(x) >> Braid(y, x))
>>> Diagram.twist(x @ y).draw(path="docs/_static/balanced/twist.png")