Box#

class discopy.compact.Box(name, dom, cod, data=None, z=0, **params)[source]#

Bases: discopy.symmetric.Box, discopy.ribbon.Box, Diagram

A compact box is a symmetric and ribbon box in a compact diagram.

Parameters
  • name (str) – The name of the box.

  • dom (pivotal.Ty) – The domain of the box, i.e. its input.

  • cod (pivotal.Ty) – The codomain of the box, i.e. its output.