Constant#

class discopy.biclosed.Constant(name, cod, **kwargs)[source]#

Bases: TermBase

A constant term of defined by a Diagram with dom=X, cod=Y. The constant has type Y if X is empty else it has type either Y << X if left=True else X >> Y.

Parameters:
  • name (Ty) –

  • cod (Ty) –

inside#

The diagram which defines the constant.

Type:

Diagram

left#

Whether the domain comes from the left or right.

Type:

Optional[bool]