ribbon#
The free ribbon category, i.e. diagrams with braids, cups and caps.
Summary#
A ribbon diagram is a pivotal diagram and a balanced diagram. |
|
A ribbon box is a pivotal and balanced box in a ribbon diagram. |
|
A ribbon cup is a pivotal cup in a ribbon diagram. |
|
A ribbon cap is a pivotal cap in a ribbon diagram. |
|
A ribbon braid is a balanced braid in a ribbon diagram. |
|
A ribbon functor is both a pivotal functor and a balanced functor. |
Axioms#
A ribbon category is a braided pivotal category, such that the trace of the braid is unitary.
>>> x = Ty('x')
>>> twist_l = Braid(x, x).trace(left=True)
>>> twist_r = Braid(x, x).trace(left=False)
>>> eq = Equation(twist_l >> twist_l[::-1], Id(x), twist_r >> twist_r[::-1])
>>> eq.draw(margins=(.2, 0), doctest='docs/_static/ribbon/twist-untwist.svg')
Equivalently, a ribbon category is a balanced pivotal category, such that the twist is the trace of the braid [Sel10]. This is made explicit by drawing wires as ribbons, i.e. two parallel wires with the twist drawn as the double braid.
>>> ribbon_twist = Diagram.twist(x).to_ribbons()
>>> eq = Equation(ribbon_twist, twist_l.to_ribbons())
>>> eq.draw(symbol='$\\mapsto$', wire_labels=False,
... doctest="docs/_static/balanced/ribbon_twist.svg")
A ribbon category is strict whenever the twist is the identity. Strict ribbon categories have diagrams with knots, i.e. ribbons where the two parallel wires coincide and the twist is the identity.
>>> eq_strict = Equation(twist_l, Id(x), twist_r)
>>> eq_strict.draw(margins=(.2, .1), doctest='docs/_static/ribbon/strict.svg')
Arbitrary ribbon diagrams, with boxes, braids, twists, cups and caps, are
drawn in the dual rail encoding by Diagram.to_ribbons(). Every object is
doubled into a coloured ribbon, a braid becomes two ribbons crossing (the one
going under is shadowed), a twist becomes a ribbon turning over and a cup or
cap becomes a ribbon folding back.
>>> y, z = Ty('y'), Ty('z')
>>> f, g = Box('f', x @ y, x @ y), Box('g', x @ y, x @ y)
>>> diagram = (f @ z
... >> x @ y @ Twist(z)
... >> x @ Braid(y, z)
... >> Braid(x, z) @ y
... >> z @ g
... >> Braid(z, x) @ y
... >> x @ Braid(z, y)).trace(left=False)
>>> diagram.to_ribbons().draw(
... wire_labels=False, path='docs/_static/ribbon/dual_rail.svg')