Diagram
Diagram#
- class discopy.symmetric.Diagram(inside, dom, cod, _scan=True)[source]#
Bases:
discopy.braided.Diagram
A symmetric diagram is a braided diagram with
Swap
boxes.- Parameters
inside (Layer) – The layers inside the diagram.
dom (monoidal.Ty) – The domain of the diagram, i.e. its input.
cod (monoidal.Ty) – The codomain of the diagram, i.e. its output.
- classmethod swap(left, right)[source]#
The diagram that swaps the
left
andright
wires.- Parameters
- Return type
Note
This calls
braided.hexagon()
andbraid_factory
.