FreeCategory#

class discopy.cat.FreeCategory(inside, dom, cod, _scan=True)[source]#

Bases: discopy.abc.Category

A category whose arrows are paths of generating arrows.

Note

Subclasses are assumed to have a generator_factory class attribute for the type of the generators and an arrow factory ar whose constructor accepts inside, dom, cod and _scan as keyword arguments. New arrows are always built internally through that constructor by keyword (passing _scan=False to skip the composability check when it is guaranteed by construction), so that subclasses are free to expose a different, more user-friendly positional signature without breaking the machinery below.

Parameters:
  • dom (C0) –

  • cod (C0) –

classmethod id(dom=None)[source]#

The identity path on dom, with no generators inside.

dagger()[source]#

Contravariant involution, called with [::-1].