libsemigroups - demo

This is a short demo of what you can do with libsemigroups from Python.


In [9]:
from semigroups import *

In [10]:
M = full_transformation_monoid(5)

In [11]:
S.size()


Out[11]:
3125

In [12]:
S.nridempotents()


Out[12]:
196

In [14]:
S = Semigroup([Transformation([0, 1, 2, 4, 5, 5, 5, 5]), Transformation([4,2,3,2,6,6,6,6])])

In [15]:
S.size()


Out[15]:
26

In [16]:
S.nridempotents()


Out[16]:
7