# String diagrams

> The graphical calculus of monoidal, braided, and pivotal categories, drawn in plain TikZ: wires for objects, boxes for morphisms, read from bottom to top.

A package in the TeXeR TikZ library: https://texer.org/library/string-diagrams

Category: Mathematics. On CTAN: https://ctan.org/pkg/pgf

Tags: string diagrams, graphical calculus, monoidal categories, category theory

## Examples

- [Identity and a morphism](https://texer.org/library/string-diagrams/morphism.md): A wire is the identity on an object; a box on a wire is a morphism from the object below to the object above.
- [Composition and tensor product](https://texer.org/library/string-diagrams/composition-tensor.md): Boxes stacked on one wire compose; boxes side by side are tensored.
- [Cup and cap](https://texer.org/library/string-diagrams/cup-cap.md): The evaluation (cap) and coevaluation (cup) maps of a dual pair of objects.
- [Snake identity](https://texer.org/library/string-diagrams/snake-identity.md): A cap after a cup straightens out to the identity: the zigzag equation of a dual pair.
- [Braiding and its inverse](https://texer.org/library/string-diagrams/braiding.md): The braiding of two wires, its inverse, and the equation that says they cancel.
- [Twist](https://texer.org/library/string-diagrams/twist.md): A wire with a curl, which in a ribbon category is the twist θ on that object.
- [Trace](https://texer.org/library/string-diagrams/trace.md): A morphism with its output bent around to its input: the categorical trace, a closed loop.
