syntax#

DisCoPy’s mathematical core: a zoo of diagrams, categories and functors.

discopy.cat

The free (dagger) category with formal sums, unary operators and symbolic variables.

discopy.monoidal

The free (pre)monoidal category, i.e. planar diagrams.

discopy.braided

The free braided category, i.e. diagrams with braids.

discopy.balanced

The free balanced category, i.e. diagrams with braids and a twist.

discopy.symmetric

The free symmetric category, i.e. diagrams with swaps.

discopy.cartesian

The free cartesian category, i.e. diagrams with copy and discard.

discopy.traced

The free traced category, i.e. diagrams with swaps where outputs can feedback into inputs.

discopy.closed

The free closed monoidal category, i.e. with exponential objects.

discopy.rigid

The free rigid category, i.e. diagrams with cups and caps.

discopy.pivotal

The free pivotal category, i.e. diagrams with cups and caps that can rotate by a full turn.

discopy.ribbon

The free ribbon category, i.e. diagrams with braids, cups and caps.

discopy.compact

The free compact category, i.e. diagrams with swaps, cups and caps.

discopy.frobenius

The free hypergraph category, i.e. diagrams with swaps and spiders.

discopy.hypergraph

The free hypergraph category with diagrams encoded as cospans of hypergraphs.