TracedCategory#
- class discopy.abc.TracedCategory[source]#
Bases:
MonoidalCategory,GenericA traced category is a
MonoidalCategorywith a methodtracefor the partial trace of a morphism over some objects.- abstract trace(n=1, left=False)[source]#
The trace of a morphism, to be instantiated.
Tracing no object at all is the identity, i.e. the vanishing axiom
f.trace(0) == f, see nLab.- Parameters:
n (int) – The number of objects to trace over.
left (bool) – Whether to trace the wires on the left or right.
- Return type:
C1