abc

Contents

abc#

The abstract base classes for categories.

These mirror the concrete hierarchy of discopy modules: each class adds the characteristic generator of its categorical structure as an abc.abstractmethod(), e.g. BraidedCategory is a MonoidalCategory with an abstract BraidedCategory.braid().

Summary#

Category

A category is a Python class with methods dom, cod, id, then, together with an attribute ob for its objects.

MonoidalCategory

A monoidal category is a Category with a method tensor for both its objects and its arrows.

BraidedCategory

A braided category is a MonoidalCategory with a method braid for the natural isomorphism x @ y -> y @ x.

TracedCategory

A traced category is a MonoidalCategory with a method trace for the partial trace of a morphism over some objects.

BalancedCategory

A balanced category is a BraidedCategory and a TracedCategory with a method twist for the natural automorphism x -> x.

SymmetricCategory

A symmetric category is a BalancedCategory where the braid is its own inverse called swap for the symmetry x @ y -> y @ x.

MarkovCategory

A Markov category is a SymmetricCategory with methods copy and merge for the supply of commutative comonoids.

FeedbackCategory

A feedback category is a MarkovCategory with a delay endofunctor and a feedback operator.

ClosedCategory

A closed category is a symmetric BiclosedCategory.

RigidCategory

A rigid category is a BiclosedCategory where every object has a left and right adjoint, witnessed by methods cups and caps.

PivotalCategory

A pivotal category is a RigidCategory where the left and right adjoints coincide, hence it is also a TracedCategory.

RibbonCategory

A ribbon category is a PivotalCategory which is also a BalancedCategory, i.e. where diagrams can draw knots and links.

NamedGeneric

A NamedGeneric is a Generic where the type parameter has a name.