Diagram#
- class discopy.compact.Diagram(inside, dom, cod, _scan=True)[source]#
Bases:
discopy.symmetric.Diagram,discopy.ribbon.Diagram,discopy.abc.CompactCategoryA compact diagram is a symmetric diagram and a ribbon diagram.
- Parameters:
inside (Layer) – The layers of the diagram.
dom (pivotal.Ty) – The domain of the diagram, i.e. its input.
cod (pivotal.Ty) – The codomain of the diagram, i.e. its output.
- layer_factory#
alias of
Layer
- classmethod trace_factory(diagram, left=False)[source]#
The trace of a pivotal diagram is its pre- and post-composition with cups and caps to form a feedback loop.
- Parameters:
diagram (Diagram) – The diagram to trace.
left – Whether to trace on the left or right.
- permutation_factory#
alias of
Permutation