Algebra

Contents

Algebra#

class discopy.grammar.cfg.Algebra(ob=None, ar=None, dom=None, cod=None)[source]#

Bases: Functor

An algebra is a functor with the free operad as domain and a given operad as codomain.

Parameters:
  • ob (dict[monoidal.Ty, cod.ob]) – The mapping from domain to codomain colours.

  • ar (dict[Rule, cod.ar]) – The mapping from domain to codomain operations.

  • cod (Operad) – The codomain of the algebra.

  • dom (T) –