# Finding ideals of a finite semigroup machinery (GAP)

As you see, I did a finite semigroup and then try to find its possible ideals in a very basic way (with the hand of a friend):

> f:=FreeSemigroup("a","b");;
a:=f.1;;  b:=f.2;;
s:=f/[[a^3,a],[b^2,a^2],[b*a,a*b^3]];;
e:=Elements(s);;
w1:=List([1..Size(e)],i->Elements(SemigroupIdealByGenerators(s,[e[i]])));;
w2:=DuplicateFreeList(w1);;
w3 := Combinations(w2);;
for i in [1..Size(w3)] do
w3[i] := DuplicateFreeList(Flat(w3[i]));;
od;;
w3 := DuplicateFreeList(w3);

> [ [  ], [ b*a*b, b, b^2, b*a, b*a^2 ], [ a, a^2, a*b, a^2*b ] ]

Do you think that above codes suffice to make them visible appropriately? Thanks for your attention!

• I am a bit confused but maybe I am misintrepreting the Gap code. It seems that $ba = ab^3 = ab^2b = aa^2b = a^3b = ab$. Thus your semigroup is commutative. On the other hand, you have both ab and ba in the final line, which seems to indicate that these elements are distinct. – J.-E. Pin Dec 5 '15 at 19:57
• Yes! That's right. Maybe it happens cause of using an old version of GAP. I usualy use Alexander Hulpke's windows frendly one[math.colostate.edu/~hulpke/CGT/education.html]. Thanks for the point. :-) – mrs Dec 6 '15 at 19:02
• @J.-E.Pin GAP recognises here that $ab=ba$. If you call w4:=DuplicateFreeList(Flat(w3)); it will return [ b*a*b, b, b^2, b*a, b*a^2 ]. The code in question simply have $ab$ and $ba$ in different sublists. – Alexander Konovalov Dec 11 '15 at 20:56
• @s-snape Please do so, but I might be a bit slow to answer if the question is too difficult... – J.-E. Pin Mar 28 '16 at 13:30
• @s-snape Please delete this comment. – J.-E. Pin Mar 28 '16 at 21:56

A bit of theory, for finite semigroups:

• every ideal in a semigroup is a union of principal ideals (the least ideal containing a given single element)
• two elements in a finite semigroup generate the same principal ideal if and only if they are $\mathscr{D}$-related (this is the definition of being $\mathscr{D}$-related).
• the relation $\mathscr{D}$ is an equivalence relation, and its equivalence classes are called $\mathscr{D}$-classes
• if $A$ and $B$ are $\mathscr{D}$-classes, then we say that $A \leq_{\mathscr{D}} B$ if the the principal ideal generated by any (and all) elements in $A$ is contained in the principal ideal generated by any (and all) elements in $B$.

So, if you know the $\mathscr{D}$-classes of a finite semigroup, and the partial order $\leq_{\mathscr{D}}$, then you know everything about the ideals of the semigroup, and how they are interrelated.

In GAP, you can do:

T := Range(IsomorphismTransformationSemigroup(s));
DClasses(T);

you will see that your semigroup has two $\mathscr{D}$-classes and hence two ideals. If you have the Semigroups package, then you can also do:

Splash(DotDClasses(T));

and obtain the following picture of the $\mathscr{D}$-classes and their partial order:

You can also see that your semigroups is a copy of the direct product of the cyclic group of order 2 with itself, with an additional non-regular element on the top. The ideals are: the whole semigroup, and the group $C_2\times C_2$.