Algebra

Contents

Algebra#

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

Bases: discopy.cat.Functor

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

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

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

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

  • dom (type) –