class discopy.grammar.thue.Rule(dom, cod, name=None, **params)[source]#

Bases: Box

A rule is a box with monoidal types as dom and cod and an optional name.

  • dom (T) – The domain of the rule, i.e. its input.

  • cod (T) – The codomain of the rule, i.e. its output.

  • name (str) – The name of the rule, empty by default.