Traced

Traced#

class discopy.para.Traced(dom, cod, inside, param=None, copar=None)[source]#

Bases: Symmetric, discopy.abc.TracedCategory

Parametric maps over a traced symmetric underlying category form a traced category, with the parameters swapped out of the way.

Parameters:
  • dom (ob)

  • cod (ob)

  • inside (category)

  • param (ob)

  • copar (ob)

trace(n=1, left=False)[source]#

The trace of a parametric map is the trace of the underlying morphism, with the parameters swapped out of the way.

Parameters:
  • n (int) – The number of objects to trace over.

  • left (bool) – Whether to trace the wires on the left or right.

Return type:

Traced