1#############################################################################
2##
3#W  extreme/monoid_pkg.tst
4#Y  Copyright (C) 2011-15                                James D. Mitchell
5##
6##  Licensing information can be found in the README file of this package.
7#
8#############################################################################
9##
10## a concatenation of relevant tests from the monoid/tst.
11gap> START_TEST("Semigroups package: extreme/monoid_pkg.tst");
12gap> LoadPackage("semigroups", false);;
13
14#
15gap> SEMIGROUPS.StartTest();
16gap> SEMIGROUPS.DefaultOptionsRec.acting := true;;
17
18# MonoidPkgTest2
19gap> g := CyclicGroup(3);;
20gap> r := GF(2);;
21gap> gr := GroupRing(r, g);;
22gap> iso := IsomorphismTransformationSemigroup(gr);;
23gap> s := Range(iso);;
24gap> Size(s);
258
26gap> SmallGeneratingSet(s);;
27gap> s := Semigroup(IrredundantGeneratingSubset(last));;
28gap> NrDClasses(s);
294
30gap> sizes := List(GreensDClasses(s), Size);;
31gap> Sort(sizes);;
32gap> sizes;
33[ 1, 1, 3, 3 ]
34gap> PartialOrderOfDClasses(s);
35[ [ 1, 4 ], [ 1, 2, 3 ], [ 3, 4 ], [ 4 ] ]
36gap> IsRegularSemigroup(s);
37true
38gap> ForAll(s, x -> x in s);
39true
40gap> MultiplicativeNeutralElement(s);
41IdentityTransformation
42gap> h := List(s, x -> InversesOfSemigroupElement(s, x));;
43gap> Sort(h);
44gap> h;
45[ [ Transformation( [ 1, 1, 1, 1, 1, 1, 1, 1 ] ) ],
46  [ IdentityTransformation ], [ Transformation( [ 1, 3, 5, 1, 7, 7, 3, 5 ] ) ]
47    , [ Transformation( [ 1, 4, 1, 4, 1, 4, 1, 4 ] ) ],
48  [ Transformation( [ 1, 5, 7, 1, 3, 3, 5, 7 ] ) ],
49  [ Transformation( [ 1, 6, 7, 4, 3, 8, 5, 2 ] ) ],
50  [ Transformation( [ 1, 7, 3, 1, 5, 5, 7, 3 ] ) ],
51  [ Transformation( [ 1, 8, 5, 4, 7, 2, 3, 6 ] ) ] ]
52gap> IsMonoidAsSemigroup(s);
53true
54gap> IsGroupAsSemigroup(s);
55false
56gap> i := MinimalIdeal(s);
57<simple transformation semigroup ideal of degree 8 with 1 generator>
58gap> Size(i);
591
60gap> MultiplicativeZero(s);
61Transformation( [ 1, 1, 1, 1, 1, 1, 1, 1 ] )
62gap> MultiplicativeZero(s) in i;
63true
64gap> h := List(GreensDClasses(s), GroupHClass);;
65gap> h := List(h, x -> StructureDescription(x));;
66gap> Sort(h);
67gap> h;
68[ "1", "1", "C3", "C3" ]
69gap> IsCliffordSemigroup(s);
70true
71
72# MonoidPkgTest3
73gap> a := Idempotent([3, 5, 6, 7, 8], [1, 2, 1, 1, 2, 3, 4, 5]) * (3, 5);;
74gap> b := a * (3, 5) * (3, 6, 7, 8);;
75gap> s := Semigroup(a, b);;
76gap> IsGroupAsSemigroup(s);
77true
78
79# MonoidPkgTest4
80gap> gens := [Transformation([3, 5, 3, 3, 5, 6]),
81> Transformation([6, 2, 4, 2, 2, 6])];;
82gap> S := Semigroup(gens);;
83gap> GroupHClass(GreensDClassOfElement(S, Elements(S)[1]));
84<Green's H-class: Transformation( [ 2, 2, 2, 2, 2 ] )>
85gap> IsomorphismPermGroup(last);
86MappingByFunction( <Green's H-class: Transformation( [ 2, 2, 2, 2, 2 ] )>
87 , Group(()), function( x ) ... end, function( x ) ... end )
88
89# MonoidPkgTest5
90gap> gens := [Transformation([4, 4, 8, 8, 8, 8, 4, 8]),
91>   Transformation([8, 2, 8, 2, 5, 5, 8, 8]),
92>   Transformation([8, 8, 3, 7, 8, 3, 7, 8]),
93>   Transformation([8, 6, 6, 8, 6, 8, 8, 8])];;
94gap> S := Semigroup(gens);;
95gap> Size(S);
9630
97gap> NrDClasses(S);
986
99gap> List(GreensDClasses(S), Size);
100[ 9, 1, 1, 9, 1, 9 ]
101gap> IsRegularSemigroup(S);
102false
103gap> NrRClasses(S);
10412
105gap> NrLClasses(S);
10612
107gap> IsBlockGroup(S);
108false
109gap> NrIdempotents(S);
11015
111gap> List(GreensDClasses(S), IsRegularDClass);
112[ true, true, true, true, true, false ]
113gap> d := GreensDClasses(S)[2];;
114gap> GreensRClasses(d);;
115gap> GreensLClasses(d);;
116gap> SchutzenbergerGroup(d);
117Group(())
118gap> h := List(GreensDClasses(S), function(d) if IsRegularDClass(d)
119> then return GroupHClass(d); else return fail; fi; end);;
120gap> MultiplicativeNeutralElement(S);
121fail
122gap> IsMonoidAsSemigroup(S);
123false
124gap> GroupOfUnits(S);
125fail
126gap> MultiplicativeZero(S);
127Transformation( [ 8, 8, 8, 8, 8, 8, 8, 8 ] )
128gap> h := Filtered(h, x -> not x = fail);
129[ <Green's H-class: Transformation( [ 2, 2, 8, 8, 8, 8, 2, 8 ] )>,
130  <Green's H-class: Transformation( [ 8, 2, 8, 2, 5, 5, 8, 8 ] )>,
131  <Green's H-class: Transformation( [ 8, 8, 3, 7, 8, 3, 7, 8 ] )>,
132  <Green's H-class: Transformation( [ 8, 5, 5, 8, 5, 8, 8, 8 ] )>,
133  <Green's H-class: Transformation( [ 8, 8, 8, 8, 8, 8, 8, 8 ] )> ]
134gap> List(h, StructureDescription);
135[ "1", "1", "1", "1", "1" ]
136gap> IsHTrivial(S);
137true
138gap> IsLTrivial(S);
139false
140gap> IsRTrivial(S);
141false
142gap> NrIdempotents(S);
14315
144gap> IsIdempotentGenerated(S);
145true
146gap> IsSemiband(S);
147true
148gap> IsCommutative(S);
149false
150gap> IsBand(S);
151false
152
153# MonoidPkgTest6: from greens.tst
154gap> gens := [Transformation([4, 5, 7, 1, 8, 6, 1, 7]),
155>  Transformation([5, 5, 3, 8, 3, 7, 4, 6]),
156>  Transformation([5, 7, 4, 4, 1, 4, 4, 4]),
157>  Transformation([7, 1, 4, 3, 6, 1, 3, 7])];;
158gap> m := Semigroup(gens);;
159gap> o := LambdaOrb(m);; Enumerate(o);;
160gap> AsSet(o);
161[ [ 0 ], [ 1 ], [ 1, 3 ], [ 1, 3, 4 ], [ 1, 3, 4, 6, 7 ], [ 1, 3, 4, 7 ],
162  [ 1, 3, 6 ], [ 1, 3, 6, 7 ], [ 1, 3, 7 ], [ 1, 4 ], [ 1, 4, 5 ],
163  [ 1, 4, 5, 6, 7, 8 ], [ 1, 4, 5, 7 ], [ 1, 4, 6 ], [ 1, 4, 6, 7 ],
164  [ 1, 4, 6, 7, 8 ], [ 1, 4, 7 ], [ 1, 4, 8 ], [ 1, 6 ], [ 1, 6, 7 ],
165  [ 1, 6, 7, 8 ], [ 1, 6, 8 ], [ 1, 7 ], [ 1, 7, 8 ], [ 1, 8 ], [ 3 ],
166  [ 3, 4 ], [ 3, 4, 5 ], [ 3, 4, 5, 6, 7, 8 ], [ 3, 4, 5, 7 ],
167  [ 3, 4, 5, 7, 8 ], [ 3, 4, 5, 8 ], [ 3, 4, 6 ], [ 3, 4, 6, 7 ],
168  [ 3, 4, 6, 7, 8 ], [ 3, 4, 6, 8 ], [ 3, 4, 7 ], [ 3, 4, 7, 8 ],
169  [ 3, 4, 8 ], [ 3, 5 ], [ 3, 5, 7 ], [ 3, 5, 8 ], [ 3, 6 ], [ 3, 6, 7 ],
170  [ 3, 6, 7, 8 ], [ 3, 6, 8 ], [ 3, 7 ], [ 3, 7, 8 ], [ 3, 8 ], [ 4 ],
171  [ 4, 5 ], [ 4, 5, 6 ], [ 4, 5, 6, 7 ], [ 4, 5, 6, 7, 8 ], [ 4, 5, 7 ],
172  [ 4, 5, 7, 8 ], [ 4, 5, 8 ], [ 4, 6 ], [ 4, 6, 7 ], [ 4, 6, 8 ], [ 4, 7 ],
173  [ 4, 7, 8 ], [ 4, 8 ], [ 5 ], [ 5, 6 ], [ 5, 6, 7 ], [ 5, 6, 8 ], [ 5, 7 ],
174  [ 5, 7, 8 ], [ 5, 8 ], [ 6 ], [ 6, 7 ], [ 6, 7, 8 ], [ 6, 8 ], [ 7 ],
175  [ 7, 8 ], [ 8 ] ]
176gap> gens := [Transformation([1, 5, 2, 2, 3, 5, 2]),
177>  Transformation([7, 3, 6, 5, 2, 4, 1]),
178>  Transformation([7, 5, 3, 2, 5, 5, 6])];;
179gap> m := Monoid(gens);;
180gap> o := LambdaOrb(m);; Enumerate(o);; AsSet(o);
181[ [ 0 ], [ 1, 2 ], [ 1, 2, 3 ], [ 1, 2, 3, 4, 5 ], [ 1, 2, 3, 4, 5, 6, 7 ],
182  [ 1, 2, 3, 4, 6 ], [ 1, 2, 3, 5 ], [ 1, 2, 3, 5, 6 ], [ 1, 2, 3, 6 ],
183  [ 1, 2, 4 ], [ 1, 2, 4, 5 ], [ 1, 2, 4, 5, 6 ], [ 1, 2, 5 ], [ 1, 2, 6 ],
184  [ 1, 3 ], [ 1, 3, 4 ], [ 1, 3, 4, 5, 6 ], [ 1, 3, 4, 6 ], [ 1, 3, 5 ],
185  [ 1, 3, 6 ], [ 1, 4 ], [ 1, 4, 5 ], [ 1, 4, 5, 6 ], [ 1, 4, 6 ], [ 1, 5 ],
186  [ 1, 5, 6 ], [ 1, 6 ], [ 2 ], [ 2, 3 ], [ 2, 3, 4 ], [ 2, 3, 4, 5 ],
187  [ 2, 3, 4, 5, 7 ], [ 2, 3, 4, 6 ], [ 2, 3, 4, 6, 7 ], [ 2, 3, 5 ],
188  [ 2, 3, 5, 6 ], [ 2, 3, 5, 6, 7 ], [ 2, 3, 5, 7 ], [ 2, 3, 6 ],
189  [ 2, 3, 6, 7 ], [ 2, 3, 7 ], [ 2, 4 ], [ 2, 4, 5 ], [ 2, 4, 5, 6 ],
190  [ 2, 4, 5, 6, 7 ], [ 2, 4, 5, 7 ], [ 2, 4, 6 ], [ 2, 4, 7 ], [ 2, 5 ],
191  [ 2, 5, 6 ], [ 2, 5, 7 ], [ 2, 6 ], [ 2, 6, 7 ], [ 2, 7 ], [ 3 ], [ 3, 4 ],
192  [ 3, 4, 5 ], [ 3, 4, 5, 6 ], [ 3, 4, 5, 6, 7 ], [ 3, 4, 6 ],
193  [ 3, 4, 6, 7 ], [ 3, 4, 7 ], [ 3, 5 ], [ 3, 5, 6 ], [ 3, 5, 7 ], [ 3, 6 ],
194  [ 3, 6, 7 ], [ 3, 7 ], [ 4 ], [ 4, 5 ], [ 4, 5, 6 ], [ 4, 5, 6, 7 ],
195  [ 4, 5, 7 ], [ 4, 6 ], [ 4, 6, 7 ], [ 4, 7 ], [ 5 ], [ 5, 6 ], [ 5, 6, 7 ],
196  [ 5, 7 ], [ 6 ], [ 6, 7 ] ]
197gap> Length(Enumerate(RhoOrb(m)));
198207
199gap> gens := [[Transformation([3, 4, 4, 3, 1, 1, 5])],
200> [Transformation([1, 1, 4, 3]), Transformation([2, 2, 2, 2]),
201> Transformation([3, 3, 1, 4])], [Transformation([4, 4, 2, 3, 3]),
202> Transformation([5, 2, 4, 3, 1])],
203> [Transformation([1, 5, 4, 1, 5]), Transformation([2, 4, 1, 3, 1])],
204> [Transformation([4, 1, 2, 3]), Transformation([4, 3, 4, 1])],
205> [Transformation([2, 1, 3, 1, 4, 3]),
206>   Transformation([2, 2, 2, 2, 1, 2]),
207>   Transformation([5, 3, 4, 3, 5, 6]),
208>   Transformation([6, 4, 1, 4, 5, 3]),
209> Transformation([6, 5, 2, 6, 3, 4])],
210> [Transformation([3, 5, 5, 1, 4, 7, 5])],
211> [Transformation([2, 5, 6, 1, 1, 3]),
212> Transformation([3, 1, 6, 2, 5, 2]),
213> Transformation([5, 4, 2, 3, 3, 5]),
214> Transformation([6, 6, 5, 5, 2, 2])],
215> [Transformation([1, 5, 3, 2, 3]), Transformation([4, 3, 2, 5, 2]),
216>   Transformation([5, 4, 1, 2, 2]), Transformation([5, 5, 5, 1, 1])],
217> [Transformation([2, 4, 4, 7, 2, 1, 2])],
218> [Transformation([3, 4, 2, 4, 6, 7, 4]),
219>   Transformation([4, 6, 3, 2, 4, 5, 4]),
220>   Transformation([6, 2, 3, 5, 5, 2, 2]),
221>   Transformation([6, 5, 4, 5, 2, 4, 4]),
222>   Transformation([7, 6, 7, 5, 6, 5, 7])],
223>  [Transformation([3, 2, 3, 3, 1]),
224> Transformation([4, 5, 1, 2, 4])],
225>  [Transformation([1, 4, 3, 4]), Transformation([2, 2, 1, 1]),
226>    Transformation([3, 1, 3, 4]), Transformation([4, 4, 3, 1])],
227> [Transformation([1, 2, 2, 3, 3]), Transformation([4, 3, 4, 3, 2]),
228>   Transformation([5, 3, 4, 5, 4])],
229> [Transformation([4, 3, 6, 4, 6, 1]),
230>   Transformation([4, 4, 4, 6, 3, 1])],
231> [Transformation([1, 4, 3, 4]), Transformation([3, 3, 3, 3]),
232>   Transformation([3, 4, 1, 4]), Transformation([4, 3, 1, 4])],
233> [Transformation([1, 3, 3, 5, 2]), Transformation([3, 4, 5, 1, 1])],
234> [Transformation([2, 6, 4, 6, 5, 2]),
235>   Transformation([3, 5, 6, 2, 5, 1]),
236>   Transformation([5, 1, 3, 3, 3, 1]),
237>   Transformation([6, 4, 4, 6, 6, 3])],
238> [Transformation([1, 3, 3, 3])],
239> [Transformation([4, 1, 2, 2, 3]), Transformation([4, 2, 3, 2, 2])],
240> [Transformation([1, 4, 6, 4, 4, 7, 2]),
241>   Transformation([1, 6, 5, 1, 7, 2, 7]),
242>   Transformation([2, 2, 7, 2, 1, 4, 4]),
243>   Transformation([5, 6, 2, 6, 3, 3, 5])],
244> [Transformation([1, 1, 3, 1]), Transformation([4, 2, 3, 4]),
245>   Transformation([4, 4, 2, 2])], [Transformation([3, 2, 1, 1]),
246>   Transformation([4, 1, 3, 2]), Transformation([4, 4, 1, 2])],
247> [Transformation([1, 6, 4, 2, 5, 3, 2]),
248> Transformation([4, 1, 4, 7, 4, 4, 5])],
249>   [Transformation([2, 4, 5, 4, 4])],
250>   [Transformation([1, 4, 2, 3]), Transformation([4, 3, 3, 3])],
251>   [Transformation([1, 1, 3, 1, 4])],
252>   [Transformation([4, 3, 3, 6, 7, 2, 3]),
253>   Transformation([6, 6, 4, 4, 2, 1, 4])],
254>   [Transformation([2, 2, 4, 6, 4, 3]),
255>   Transformation([3, 4, 1, 1, 5, 2]),
256>   Transformation([4, 4, 6, 4, 6, 1])],
257>   [Transformation([3, 5, 4, 2, 1, 2, 2]),
258>   Transformation([7, 7, 1, 5, 7, 1, 6])],
259>   [Transformation([3, 4, 1, 4]), Transformation([4, 3, 2, 2]),
260>   Transformation([4, 4, 1, 4])],
261>   [Transformation([3, 7, 4, 4, 3, 3, 5]),
262>   Transformation([4, 6, 1, 1, 6, 4, 1]),
263>   Transformation([6, 5, 7, 2, 1, 1, 3])],
264>   [Transformation([1, 2, 4, 1]), Transformation([4, 1, 2, 1]),
265>   Transformation([4, 2, 2, 4])],
266>   [Transformation([2, 1, 2, 2]), Transformation([2, 4, 1, 1]),
267>   Transformation([4, 2, 4, 3]), Transformation([4, 4, 1, 2])],
268>   [Transformation([1, 1, 1, 1, 1, 4]),
269>   Transformation([3, 3, 2, 4, 1, 3]),
270>   Transformation([4, 5, 2, 4, 4, 5]),
271>   Transformation([5, 3, 2, 6, 6, 4]),
272>   Transformation([6, 6, 5, 5, 1, 1])],
273>   [Transformation([1, 2, 4, 1]), Transformation([2, 4, 1, 2]),
274>   Transformation([3, 3, 1, 4]), Transformation([3, 4, 1, 2]),
275>   Transformation([4, 1, 4, 3])],
276>   [Transformation([1, 7, 6, 1, 7, 5, 5]),
277>   Transformation([2, 7, 1, 4, 7, 6, 2]),
278>   Transformation([4, 3, 7, 2, 6, 3, 4]),
279>   Transformation([4, 7, 2, 1, 7, 5, 4]),
280>   Transformation([5, 7, 5, 5, 5, 3, 5])],
281>   [Transformation([2, 4, 4, 3])],
282>   [Transformation([4, 6, 5, 1, 4, 4])],
283>   [Transformation([2, 3, 4, 5, 3]), Transformation([4, 1, 5, 1, 3]),
284>   Transformation([4, 1, 5, 5, 3])],
285>   [Transformation([1, 3, 1, 2, 2]), Transformation([2, 3, 5, 2, 4]),
286>   Transformation([2, 4, 3, 2, 5]), Transformation([4, 4, 2, 1, 2])],
287>   [Transformation([1, 4, 2, 4]), Transformation([2, 2, 1, 4]),
288>   Transformation([3, 2, 2, 2])],
289>   [Transformation([1, 5, 1, 1, 5]),
290> Transformation([4, 3, 1, 3, 2])],
291>   [Transformation([1, 3, 4, 4]), Transformation([2, 1, 3, 3]),
292> Transformation([4, 1, 3, 4]), Transformation([4, 2, 3, 3])],
293>   [Transformation([4, 3, 2, 2, 1, 4, 2]),
294>   Transformation([6, 5, 2, 7, 2, 2, 7])],
295>   [Transformation([2, 4, 4, 3]), Transformation([3, 4, 1, 3]),
296>   Transformation([4, 1, 3, 2]), Transformation([4, 4, 1, 1])],
297>   [Transformation([1, 2, 5, 2, 1]), Transformation([3, 2, 2, 4, 2]),
298>   Transformation([4, 5, 1, 1, 2]), Transformation([5, 5, 5, 2, 1])],
299>   [Transformation([1, 2, 4, 4]), Transformation([2, 1, 2, 1]),
300>   Transformation([2, 3, 2, 3]), Transformation([3, 2, 1, 3]),
301>   Transformation([3, 4, 3, 2])],
302>   [Transformation([1, 1, 1, 2, 2])],
303>   [Transformation([4, 4, 3, 3, 3, 2]),
304>   Transformation([4, 6, 3, 6, 4, 3]),
305>   Transformation([6, 4, 1, 3, 4, 5])],
306>   [Transformation([1, 1, 4, 3]), Transformation([3, 1, 3, 2])],
307>   [Transformation([1, 3, 5, 3, 3]), Transformation([1, 5, 4, 4, 3]),
308>  Transformation([2, 5, 3, 1, 1])],
309>   [Transformation([3, 2, 3, 4]), Transformation([3, 4, 3, 1]),
310>  Transformation([3, 4, 4, 4]), Transformation([4, 3, 1, 3])],
311>   [Transformation([2, 2, 5, 2, 2, 5]),
312> Transformation([2, 6, 5, 2, 6, 3]),
313> Transformation([4, 2, 4, 5, 5, 6]),
314>       Transformation([5, 4, 1, 4, 2, 2])],
315> [Transformation([1, 1, 3, 4]), Transformation([3, 1, 2, 2])],
316>   [Transformation([1, 1, 4, 5, 5, 3]),
317> Transformation([6, 4, 4, 5, 6, 5])],
318>  [Transformation([1, 4, 5, 3, 1, 7, 3]),
319>  Transformation([1, 6, 6, 5, 2, 4, 2])],
320>   [Transformation([3, 3, 1, 2, 3]), Transformation([5, 5, 1, 5, 3]),
321>  Transformation([5, 5, 5, 5, 2])],
322>   [Transformation([1, 2, 5, 1, 5, 6]),
323>   Transformation([5, 4, 5, 5, 3, 2])],
324>   [Transformation([1, 2, 1, 3]), Transformation([2, 3, 4, 4]),
325>  Transformation([4, 1, 1, 1])],
326>  [Transformation([1, 2, 2, 3, 2]), Transformation([4, 3, 2, 4, 1]),
327> Transformation([5, 1, 2, 2, 1]), Transformation([5, 2, 4, 1, 4]),
328> Transformation([5, 5, 4, 2, 2])],
329> [Transformation([2, 1, 2, 3]), Transformation([2, 2, 3, 2])],
330> [Transformation([4, 2, 1, 3])],
331>   [Transformation([1, 2, 3, 4]), Transformation([2, 2, 3, 4]),
332> Transformation([2, 2, 4, 3])],
333>   [Transformation([2, 1, 2, 1]), Transformation([3, 4, 2, 4])],
334>   [Transformation([3, 4, 1, 2, 2, 2]),
335>   Transformation([4, 4, 4, 2, 5, 3]),
336>   Transformation([5, 6, 6, 5, 5, 4])],
337>   [Transformation([1, 4, 1, 6, 4, 6]),
338>   Transformation([2, 4, 2, 5, 5, 6]),
339>   Transformation([3, 6, 2, 1, 4, 6]),
340>   Transformation([4, 6, 2, 4, 1, 2])],
341>   [Transformation([1, 3, 3, 3]), Transformation([2, 1, 3, 1]),
342>   Transformation([3, 1, 2, 3])],
343>   [Transformation([1, 4, 1, 2]), Transformation([2, 2, 3, 2]),
344>   Transformation([3, 3, 4, 3]), Transformation([4, 3, 3, 4]),
345>   Transformation([4, 4, 4, 2])],
346>   [Transformation([1, 2, 1, 4]), Transformation([4, 1, 1, 2]),
347>   Transformation([4, 3, 3, 2])],
348>   [Transformation([2, 3, 6, 7, 1, 2, 6])],
349>   [Transformation([4, 1, 1, 3, 3, 3])],
350>   [Transformation([3, 3, 2, 7, 5, 5, 1]),
351>   Transformation([3, 5, 5, 4, 1, 3, 2]),
352>   Transformation([4, 1, 3, 6, 6, 6, 5]),
353>   Transformation([7, 2, 7, 2, 7, 7, 2])],
354>   [Transformation([1, 1, 7, 5, 2, 1, 2]),
355>   Transformation([2, 7, 2, 6, 7, 5, 7]),
356>   Transformation([4, 5, 7, 4, 3, 1, 4])],
357>   [Transformation([3, 6, 4, 4, 2, 5, 1]),
358>   Transformation([4, 1, 2, 5, 7, 7, 3]),
359>   Transformation([4, 4, 1, 1, 6, 2, 7]),
360>   Transformation([5, 7, 6, 6, 1, 4, 5])],
361>   [Transformation([1, 1, 1, 2]), Transformation([1, 3, 1, 3]),
362>   Transformation([1, 4, 3, 3]), Transformation([3, 1, 1, 1]),
363>   Transformation([4, 2, 3, 4])],
364>   [Transformation([1, 3, 3, 2, 1, 3]),
365>   Transformation([1, 5, 5, 6, 5, 2]),
366>   Transformation([6, 3, 1, 1, 5, 5]),
367>   Transformation([6, 3, 1, 5, 2, 4])],
368>   [Transformation([2, 6, 1, 3, 1, 5]),
369>   Transformation([4, 3, 3, 5, 5, 5]),
370>   Transformation([4, 5, 6, 4, 4, 2]),
371>   Transformation([6, 3, 5, 4, 1, 4])],
372>   [Transformation([3, 1, 2, 2, 3]), Transformation([3, 2, 1, 2, 5]),
373>       Transformation([3, 3, 4, 2, 4])],
374>   [Transformation([1, 7, 1, 6, 6, 5, 3]),
375>   Transformation([2, 6, 5, 6, 1, 5, 6]),
376>   Transformation([3, 4, 6, 1, 5, 1, 6]),
377>   Transformation([7, 5, 7, 2, 5, 7, 4])],
378>   [Transformation([2, 1, 2, 2, 4]),
379>   Transformation([2, 1, 4, 1, 3]),
380>   Transformation([3, 3, 1, 3, 2]),
381>   Transformation([5, 4, 5, 4, 5])],
382>   [Transformation([2, 1, 4, 3]), Transformation([2, 3, 4, 4]),
383>   Transformation([3, 3, 1, 1])],
384>   [Transformation([2, 1, 1, 2])],
385>   [Transformation([1, 3, 1, 3, 3]), Transformation([2, 1, 1, 4, 1]),
386>   Transformation([4, 5, 1, 5, 4]), Transformation([5, 4, 3, 4, 2]),
387>   Transformation([5, 5, 5, 3, 4])],
388>   [Transformation([5, 5, 5, 5, 5])],
389>   [Transformation([3, 2, 1, 2, 6, 6]),
390>   Transformation([6, 2, 1, 4, 3, 2])],
391>   [Transformation([3, 4, 4, 2, 4, 7, 2]),
392>   Transformation([4, 1, 7, 7, 7, 1, 3]),
393>   Transformation([5, 5, 5, 4, 4, 3, 4]),
394>   Transformation([6, 6, 6, 3, 6, 7, 2]),
395>   Transformation([7, 7, 5, 1, 7, 2, 3])],
396>   [Transformation([1, 5, 3, 3, 1, 2, 2]),
397>   Transformation([3, 4, 1, 6, 3, 4, 5]),
398>   Transformation([4, 1, 2, 1, 6, 7, 5]),
399>   Transformation([4, 2, 7, 2, 4, 1, 1]),
400>   Transformation([7, 7, 7, 1, 5, 4, 4])],
401>   [Transformation([1, 3, 2, 6, 5, 5]),
402>   Transformation([3, 1, 2, 5, 6, 2]),
403>   Transformation([5, 5, 1, 5, 3, 5]),
404>   Transformation([6, 6, 1, 5, 6, 2])],
405>   [Transformation([1, 4, 3, 3, 4, 3]),
406>   Transformation([3, 1, 2, 5, 2, 5]),
407>   Transformation([3, 2, 1, 6, 5, 4]),
408>   Transformation([5, 2, 1, 1, 3, 1]),
409>   Transformation([6, 4, 1, 1, 1, 1])],
410>   [Transformation([4, 2, 3, 3, 4])],
411>   [Transformation([1, 4, 4, 4, 3, 1, 5]),
412>   Transformation([4, 7, 3, 6, 1, 7, 6])],
413>   [Transformation([4, 3, 5, 7, 7, 1, 6])],
414>   [Transformation([2, 2, 4, 1])],
415>   [Transformation([1, 1, 2, 6, 4, 6]),
416>   Transformation([4, 2, 3, 1, 2, 2]),
417>   Transformation([4, 2, 4, 3, 6, 5])],
418>   [Transformation([2, 3, 6, 4, 7, 4, 6]),
419>   Transformation([4, 4, 3, 2, 6, 4, 6]),
420>   Transformation([4, 6, 6, 5, 4, 6, 7]),
421>   Transformation([5, 6, 1, 6, 3, 5, 1])],
422>   [Transformation([1, 1, 5, 3, 1]),
423>   Transformation([2, 2, 4, 2, 3]),
424>   Transformation([2, 3, 4, 4, 5]),
425>   Transformation([2, 4, 2, 4, 5])],
426>   [Transformation([3, 1, 1, 5, 3]),
427> Transformation([3, 3, 5, 3, 1])],
428>   [Transformation([4, 3, 3, 5, 2, 5]),
429>   Transformation([6, 1, 2, 4, 1, 3])],
430>   [Transformation([2, 3, 4, 3, 3]), Transformation([3, 5, 2, 4, 2]),
431>   Transformation([3, 5, 2, 5, 2]),
432> Transformation([5, 3, 3, 5, 2])]];;
433gap> semis := List(gens, x -> Semigroup(x));;
434gap> res := List(semis, x -> [NrRClasses(x), Size(x)]);
435[ [ 3, 4 ], [ 2, 10 ], [ 3, 14 ], [ 12, 211 ], [ 4, 28 ], [ 378, 4818 ],
436  [ 2, 5 ], [ 92, 7142 ], [ 81, 615 ], [ 2, 4 ], [ 158, 2255 ], [ 18, 99 ],
437  [ 9, 50 ], [ 16, 76 ], [ 17, 77 ], [ 6, 13 ], [ 19, 330 ], [ 120, 1263 ],
438  [ 1, 1 ], [ 14, 53 ], [ 216, 1306 ], [ 6, 12 ], [ 15, 235 ], [ 23, 235 ],
439  [ 2, 2 ], [ 3, 9 ], [ 2, 2 ], [ 17, 206 ], [ 22, 506 ], [ 24, 340 ],
440  [ 7, 39 ], [ 99, 495 ], [ 10, 18 ], [ 10, 100 ], [ 34, 843 ], [ 14, 210 ],
441  [ 546, 3538 ], [ 2, 3 ], [ 2, 3 ], [ 35, 448 ], [ 21, 515 ], [ 9, 14 ],
442  [ 5, 11 ], [ 17, 23 ], [ 28, 763 ], [ 15, 199 ], [ 21, 170 ], [ 11, 142 ],
443  [ 2, 2 ], [ 33, 1259 ], [ 6, 25 ], [ 64, 426 ], [ 9, 40 ], [ 46, 388 ],
444  [ 6, 25 ], [ 11, 49 ], [ 48, 391 ], [ 7, 40 ], [ 13, 18 ], [ 6, 48 ],
445  [ 30, 792 ], [ 7, 11 ], [ 1, 3 ], [ 2, 3 ], [ 8, 17 ], [ 15, 115 ],
446  [ 49, 1724 ], [ 8, 45 ], [ 6, 46 ], [ 8, 66 ], [ 2, 4 ], [ 1, 3 ],
447  [ 322, 4344 ], [ 30, 661 ], [ 1597, 63890 ], [ 10, 76 ], [ 173, 9084 ],
448  [ 74, 3931 ], [ 15, 117 ], [ 163, 4804 ], [ 14, 106 ], [ 10, 28 ],
449  [ 1, 2 ], [ 53, 328 ], [ 1, 1 ], [ 17, 26 ], [ 172, 1443 ], [ 230, 15176 ],
450  [ 83, 1382 ], [ 158, 1074 ], [ 2, 2 ], [ 26, 535 ], [ 3, 6 ], [ 3, 3 ],
451  [ 44, 1834 ], [ 158, 1776 ], [ 19, 326 ], [ 9, 45 ], [ 32, 379 ],
452  [ 23, 149 ] ]
453gap> m := semis[32];;
454gap> Size(m);
455495
456gap> ForAll(GreensRClasses(m), x -> ForAll(Idempotents(x), y -> y in x));
457true
458gap> idem := Set(Concatenation(List(GreensRClasses(m), Idempotents)));
459[ Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] ),
460  Transformation( [ 1, 1, 1, 1, 1, 1 ] ),
461  Transformation( [ 1, 1, 1, 4, 1, 1, 1 ] ),
462  Transformation( [ 1, 1, 3, 1, 1, 1, 1 ] ),
463  Transformation( [ 1, 1, 3, 1, 1, 1, 3 ] ),
464  Transformation( [ 1, 1, 3, 1, 1, 1 ] ),
465  Transformation( [ 1, 1, 3, 3, 1, 1, 1 ] ),
466  Transformation( [ 1, 1, 3, 3, 1, 1, 3 ] ),
467  Transformation( [ 1, 1, 3, 3, 1, 1 ] ),
468  Transformation( [ 1, 1, 3, 6, 6, 6 ] ),
469  Transformation( [ 1, 1, 4, 4, 1, 1, 1 ] ),
470  Transformation( [ 1, 1, 4, 4, 1, 1, 4 ] ),
471  Transformation( [ 1, 1, 7, 1, 1, 1, 7 ] ),
472  Transformation( [ 1, 1, 7, 7, 1, 1, 7 ] ),
473  Transformation( [ 1, 2, 1, 1, 1, 1, 1 ] ),
474  Transformation( [ 1, 2, 1, 1, 1, 1, 2 ] ),
475  Transformation( [ 1, 2, 1, 1, 1, 1 ] ),
476  Transformation( [ 1, 2, 2, 2, 1, 1, 2 ] ),
477  Transformation( [ 1, 2, 2, 2, 2, 1, 2 ] ),
478  Transformation( [ 1, 2, 3, 3, 1, 1 ] ),
479  Transformation( [ 1, 2, 7, 7, 1, 1, 7 ] ),
480  Transformation( [ 1, 3, 3, 3, 1, 1, 3 ] ),
481  Transformation( [ 1, 3, 3, 3, 3, 1, 3 ] ),
482  Transformation( [ 1, 4, 4, 4, 1, 1, 4 ] ),
483  Transformation( [ 1, 4, 4, 4, 4, 1, 4 ] ),
484  Transformation( [ 1, 5, 5, 5, 5, 1, 5 ] ),
485  Transformation( [ 1, 7, 1, 1, 1, 1, 7 ] ),
486  Transformation( [ 1, 7, 3, 3, 1, 1, 7 ] ),
487  Transformation( [ 1, 7, 7, 7, 1, 1, 7 ] ),
488  Transformation( [ 1, 7, 7, 7, 7, 1, 7 ] ),
489  Transformation( [ 2, 2, 2, 2, 2, 2, 2 ] ),
490  Transformation( [ 2, 2, 2, 2, 2, 2 ] ),
491  Transformation( [ 2, 2, 7, 2, 2, 2, 7 ] ),
492  Transformation( [ 2, 2, 7, 7, 2, 2, 7 ] ),
493  Transformation( [ 3, 3, 3, 3, 3, 3, 3 ] ),
494  Transformation( [ 3, 3, 3, 3, 3, 3 ] ),
495  Transformation( [ 3, 3, 3, 4, 3, 3, 3 ] ),
496  Transformation( [ 3, 7, 3, 3, 3, 3, 7 ] ),
497  Transformation( [ 4, 4, 3, 4, 4, 4, 3 ] ),
498  Transformation( [ 4, 4, 3, 4, 4, 4, 4 ] ),
499  Transformation( [ 4, 4, 4, 4, 4, 4, 4 ] ),
500  Transformation( [ 5, 3, 3, 3, 5, 5, 3 ] ),
501  Transformation( [ 5, 4, 4, 4, 5, 5, 4 ] ),
502  Transformation( [ 5, 5, 3, 3, 5, 5, 3 ] ),
503  Transformation( [ 5, 5, 3, 3, 5, 5, 5 ] ),
504  Transformation( [ 5, 5, 3, 3, 5, 5 ] ),
505  Transformation( [ 5, 5, 3, 4, 5, 5, 3 ] ),
506  Transformation( [ 5, 5, 3, 4, 5, 5, 5 ] ),
507  Transformation( [ 5, 5, 3, 4, 5, 5 ] ),
508  Transformation( [ 5, 5, 3, 5, 5, 5, 3 ] ),
509  Transformation( [ 5, 5, 3, 5, 5, 5, 5 ] ),
510  Transformation( [ 5, 5, 3, 5, 5, 5 ] ),
511  Transformation( [ 5, 5, 4, 4, 5, 5, 4 ] ),
512  Transformation( [ 5, 5, 4, 4, 5, 5, 5 ] ),
513  Transformation( [ 5, 5, 5, 4, 5, 5, 5 ] ),
514  Transformation( [ 5, 5, 5, 5, 5, 5, 5 ] ),
515  Transformation( [ 5, 5, 5, 5, 5, 5 ] ),
516  Transformation( [ 5, 5, 7, 5, 5, 5, 7 ] ),
517  Transformation( [ 5, 5, 7, 7, 5, 5, 7 ] ),
518  Transformation( [ 5, 7, 3, 3, 5, 5, 7 ] ),
519  Transformation( [ 5, 7, 5, 5, 5, 5, 7 ] ),
520  Transformation( [ 5, 7, 7, 7, 5, 5, 7 ] ),
521  Transformation( [ 6, 2, 2, 2, 2, 6, 2 ] ),
522  Transformation( [ 6, 2, 2, 2, 6, 6, 2 ] ),
523  Transformation( [ 6, 2, 6, 6, 6, 6, 2 ] ),
524  Transformation( [ 6, 2, 6, 6, 6, 6, 6 ] ),
525  Transformation( [ 6, 3, 3, 3, 3, 6, 3 ] ),
526  Transformation( [ 6, 3, 3, 3, 6, 6, 3 ] ),
527  Transformation( [ 6, 4, 4, 4, 4, 6, 4 ] ),
528  Transformation( [ 6, 4, 4, 4, 6, 6, 4 ] ),
529  Transformation( [ 6, 5, 5, 5, 5, 6, 5 ] ),
530  Transformation( [ 6, 6, 3, 3, 6, 6, 3 ] ),
531  Transformation( [ 6, 6, 3, 3, 6, 6, 6 ] ),
532  Transformation( [ 6, 6, 3, 3, 6, 6 ] ),
533  Transformation( [ 6, 6, 3, 6, 6, 6, 3 ] ),
534  Transformation( [ 6, 6, 3, 6, 6, 6, 6 ] ),
535  Transformation( [ 6, 6, 3, 6, 6, 6 ] ),
536  Transformation( [ 6, 6, 4, 4, 6, 6, 4 ] ),
537  Transformation( [ 6, 6, 4, 4, 6, 6, 6 ] ),
538  Transformation( [ 6, 6, 6, 4, 6, 6, 6 ] ),
539  Transformation( [ 6, 6, 6, 6, 6, 6, 6 ] ),
540  Transformation( [ 6, 6, 6, 6, 6, 6 ] ),
541  Transformation( [ 6, 6, 7, 6, 6, 6, 7 ] ),
542  Transformation( [ 6, 6, 7, 7, 6, 6, 7 ] ),
543  Transformation( [ 6, 7, 3, 3, 6, 6, 7 ] ),
544  Transformation( [ 6, 7, 6, 6, 6, 6, 7 ] ),
545  Transformation( [ 6, 7, 7, 7, 6, 6, 7 ] ),
546  Transformation( [ 6, 7, 7, 7, 7, 6, 7 ] ),
547  Transformation( [ 7, 2, 7, 7, 7, 7, 7 ] ),
548  Transformation( [ 7, 7, 3, 3, 7, 7, 7 ] ),
549  Transformation( [ 7, 7, 3, 7, 7, 7, 7 ] ),
550  Transformation( [ 7, 7, 7, 7, 7, 7, 7 ] ) ]
551gap> idem = Set(Idempotents(m));
552true
553gap> H := GreensHClasses(m);;
554gap> I := Concatenation(List(GreensRClasses(m), GreensHClasses));;
555gap> ForAll(H, x -> Number(I, y -> Representative(x) in y) = 1);
556true
557gap> m := semis[68];;
558gap> H := GreensHClasses(m);;
559gap> I := Concatenation(List(GreensRClasses(m), GreensHClasses));;
560gap> ForAll(H, x -> Number(I, y -> Representative(x) in y) = 1);
561true
562gap> m := semis[74];;
563gap> r := GreensRClassOfElement(m, Transformation([2, 1, 2, 2, 1, 2, 1]));;
564gap> d := DClassOfRClass(r);;
565gap> dr := GreensRClasses(d);;
566gap> r2 := First(dr, x -> x = r);;
567gap> DClassOfRClass(r2) = d;
568true
569gap> m := Semigroup(GeneratorsOfSemigroup(m));
570<transformation semigroup of degree 7 with 3 generators>
571gap> r := GreensRClassOfElement(m, Transformation([2, 1, 2, 2, 1, 2, 1]));;
572gap> d := DClassOfRClass(r);;
573gap> dr := GreensRClasses(d);;
574gap> r2 := First(dr, x -> x = r);;
575gap> DClassOfRClass(r2) = d;
576true
577gap> res := List(semis, x -> [Length(GreensLClasses(x)), Size(x)]);
578[ [ 3, 4 ], [ 5, 10 ], [ 2, 14 ], [ 19, 211 ], [ 9, 28 ], [ 46, 4818 ],
579  [ 2, 5 ], [ 39, 7142 ], [ 25, 615 ], [ 2, 4 ], [ 789, 2255 ], [ 21, 99 ],
580  [ 11, 50 ], [ 25, 76 ], [ 42, 77 ], [ 10, 13 ], [ 23, 330 ], [ 87, 1263 ],
581  [ 1, 1 ], [ 24, 53 ], [ 195, 1306 ], [ 9, 12 ], [ 15, 235 ], [ 28, 235 ],
582  [ 2, 2 ], [ 7, 9 ], [ 2, 2 ], [ 18, 206 ], [ 26, 506 ], [ 25, 340 ],
583  [ 10, 39 ], [ 45, 495 ], [ 13, 18 ], [ 11, 100 ], [ 94, 843 ], [ 15, 210 ],
584  [ 80, 3538 ], [ 2, 3 ], [ 2, 3 ], [ 103, 448 ], [ 21, 515 ], [ 10, 14 ],
585  [ 7, 11 ], [ 14, 23 ], [ 27, 763 ], [ 14, 199 ], [ 20, 170 ], [ 13, 142 ],
586  [ 2, 2 ], [ 30, 1259 ], [ 9, 25 ], [ 23, 426 ], [ 17, 40 ], [ 34, 388 ],
587  [ 8, 25 ], [ 13, 49 ], [ 31, 391 ], [ 10, 40 ], [ 17, 18 ], [ 12, 48 ],
588  [ 68, 792 ], [ 10, 11 ], [ 1, 3 ], [ 2, 3 ], [ 8, 17 ], [ 22, 115 ],
589  [ 201, 1724 ], [ 7, 45 ], [ 10, 46 ], [ 11, 66 ], [ 2, 4 ], [ 1, 3 ],
590  [ 363, 4344 ], [ 68, 661 ], [ 2423, 63890 ], [ 11, 76 ], [ 57, 9084 ],
591  [ 84, 3931 ], [ 12, 117 ], [ 156, 4804 ], [ 16, 106 ], [ 10, 28 ],
592  [ 1, 2 ], [ 52, 328 ], [ 1, 1 ], [ 20, 26 ], [ 257, 1443 ], [ 74, 15176 ],
593  [ 333, 1382 ], [ 74, 1074 ], [ 2, 2 ], [ 28, 535 ], [ 3, 6 ], [ 3, 3 ],
594  [ 35, 1834 ], [ 93, 1776 ], [ 18, 326 ], [ 16, 45 ], [ 25, 379 ],
595  [ 33, 149 ] ]
596gap> ForAll(GreensLClasses(m), x ->
597> ForAll(Idempotents(x), y -> y in x));
598true
599gap> idem := Set(Concatenation(List(GreensLClasses(m), Idempotents)));
600[ Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] ),
601  Transformation( [ 1, 1, 1, 1, 5, 1, 1 ] ),
602  Transformation( [ 1, 1, 1, 1, 5, 1, 5 ] ),
603  Transformation( [ 1, 1, 1, 1, 5, 5, 1 ] ),
604  Transformation( [ 1, 1, 1, 4, 1, 1, 1 ] ),
605  Transformation( [ 1, 1, 1, 4, 1, 4, 1 ] ),
606  Transformation( [ 1, 1, 1, 4, 4, 1, 4 ] ),
607  Transformation( [ 1, 1, 1, 4, 5, 1, 5 ] ),
608  Transformation( [ 1, 1, 1, 5, 5, 1, 5 ] ),
609  Transformation( [ 1, 1, 4, 4, 1, 1, 1 ] ),
610  Transformation( [ 1, 1, 4, 4, 4, 1, 4 ] ),
611  Transformation( [ 1, 1, 5, 5, 5, 1, 5 ] ),
612  Transformation( [ 1, 2, 1, 1, 1, 1, 1 ] ),
613  Transformation( [ 1, 2, 1, 1, 2, 1, 1 ] ),
614  Transformation( [ 1, 2, 1, 1, 2, 1, 2 ] ),
615  Transformation( [ 1, 2, 1, 1, 2, 2, 2 ] ),
616  Transformation( [ 1, 2, 1, 1, 5, 1, 1 ] ),
617  Transformation( [ 1, 2, 1, 2, 2, 1, 2 ] ),
618  Transformation( [ 1, 2, 1, 2, 2, 2, 2 ] ),
619  Transformation( [ 1, 2, 2, 1, 1, 1, 1 ] ),
620  Transformation( [ 1, 2, 2, 1, 1, 2, 1 ] ),
621  Transformation( [ 1, 2, 2, 1, 2, 2, 1 ] ),
622  Transformation( [ 1, 2, 2, 1, 5, 5, 1 ] ),
623  Transformation( [ 1, 4, 1, 4, 4, 1, 4 ] ),
624  Transformation( [ 1, 4, 1, 4, 4, 4, 4 ] ),
625  Transformation( [ 1, 5, 1, 1, 5, 1, 1 ] ),
626  Transformation( [ 1, 5, 1, 1, 5, 1, 5 ] ),
627  Transformation( [ 1, 5, 1, 1, 5, 5, 5 ] ),
628  Transformation( [ 1, 5, 1, 4, 5, 4, 5 ] ),
629  Transformation( [ 1, 5, 1, 5, 5, 1, 5 ] ),
630  Transformation( [ 1, 5, 1, 5, 5, 5, 5 ] ),
631  Transformation( [ 1, 5, 5, 1, 5, 5, 1 ] ),
632  Transformation( [ 2, 2, 2, 2, 2, 2, 2 ] ),
633  Transformation( [ 2, 2, 2, 2, 2, 6, 2 ] ),
634  Transformation( [ 2, 2, 2, 2, 5, 2, 2 ] ),
635  Transformation( [ 2, 2, 2, 2, 5, 2, 5 ] ),
636  Transformation( [ 2, 2, 2, 2, 5, 5, 2 ] ),
637  Transformation( [ 2, 2, 2, 2, 6, 6, 2 ] ),
638  Transformation( [ 2, 2, 2, 2, 7, 2, 7 ] ),
639  Transformation( [ 2, 2, 2, 5, 5, 2, 5 ] ),
640  Transformation( [ 2, 2, 2, 6, 2, 6, 2 ] ),
641  Transformation( [ 2, 2, 2, 7, 7, 2, 7 ] ),
642  Transformation( [ 2, 2, 5, 5, 5, 2, 5 ] ),
643  Transformation( [ 2, 2, 7, 7, 7, 2, 7 ] ),
644  Transformation( [ 3, 3, 3, 3, 3, 3, 3 ] ),
645  Transformation( [ 3, 3, 3, 3, 5, 3, 3 ] ),
646  Transformation( [ 3, 3, 3, 3, 5, 3, 5 ] ),
647  Transformation( [ 3, 3, 3, 3, 5, 5, 3 ] ),
648  Transformation( [ 3, 3, 3, 3, 7, 3, 7 ] ),
649  Transformation( [ 3, 3, 3, 4, 3, 3, 3 ] ),
650  Transformation( [ 3, 3, 3, 4, 3, 4, 3 ] ),
651  Transformation( [ 3, 3, 3, 4, 4, 3, 4 ] ),
652  Transformation( [ 3, 3, 3, 4, 5, 3, 5 ] ),
653  Transformation( [ 3, 3, 3, 4, 7, 3, 7 ] ),
654  Transformation( [ 3, 3, 3, 5, 5, 3, 5 ] ),
655  Transformation( [ 3, 3, 3, 7, 7, 3, 7 ] ),
656  Transformation( [ 3, 4, 3, 4, 4, 3, 4 ] ),
657  Transformation( [ 3, 4, 3, 4, 4, 4, 4 ] ),
658  Transformation( [ 3, 5, 3, 3, 5, 3, 3 ] ),
659  Transformation( [ 3, 5, 3, 3, 5, 3, 5 ] ),
660  Transformation( [ 3, 5, 3, 3, 5, 5, 5 ] ),
661  Transformation( [ 3, 5, 3, 4, 5, 4, 5 ] ),
662  Transformation( [ 3, 5, 3, 5, 5, 3, 5 ] ),
663  Transformation( [ 3, 5, 3, 5, 5, 5, 5 ] ),
664  Transformation( [ 3, 7, 3, 3, 7, 3, 7 ] ),
665  Transformation( [ 3, 7, 3, 3, 7, 7, 7 ] ),
666  Transformation( [ 3, 7, 3, 4, 7, 4, 7 ] ),
667  Transformation( [ 3, 7, 3, 7, 7, 3, 7 ] ),
668  Transformation( [ 3, 7, 3, 7, 7, 7, 7 ] ),
669  Transformation( [ 4, 3, 3, 4, 3, 3, 4 ] ),
670  Transformation( [ 4, 3, 3, 4, 4, 3, 4 ] ),
671  Transformation( [ 4, 3, 3, 4, 4, 4, 4 ] ),
672  Transformation( [ 4, 3, 3, 4, 5, 5, 4 ] ),
673  Transformation( [ 4, 4, 4, 4, 4, 4, 4 ] ),
674  Transformation( [ 4, 4, 4, 4, 5, 4, 4 ] ),
675  Transformation( [ 4, 4, 4, 4, 5, 4, 5 ] ),
676  Transformation( [ 4, 4, 4, 4, 5, 5, 4 ] ),
677  Transformation( [ 4, 4, 4, 4, 7, 4, 7 ] ),
678  Transformation( [ 4, 5, 4, 4, 5, 4, 4 ] ),
679  Transformation( [ 4, 5, 4, 4, 5, 4, 5 ] ),
680  Transformation( [ 4, 5, 4, 4, 5, 5, 5 ] ),
681  Transformation( [ 4, 5, 5, 4, 5, 5, 4 ] ),
682  Transformation( [ 4, 7, 4, 4, 7, 4, 7 ] ),
683  Transformation( [ 4, 7, 4, 4, 7, 7, 7 ] ),
684  Transformation( [ 5, 2, 2, 5, 5, 2, 5 ] ),
685  Transformation( [ 5, 2, 2, 5, 5, 5, 5 ] ),
686  Transformation( [ 5, 2, 5, 5, 5, 5, 5 ] ),
687  Transformation( [ 5, 3, 3, 5, 5, 3, 5 ] ),
688  Transformation( [ 5, 3, 3, 5, 5, 5, 5 ] ),
689  Transformation( [ 5, 5, 3, 3, 5, 5, 5 ] ),
690  Transformation( [ 5, 5, 4, 4, 5, 5, 5 ] ),
691  Transformation( [ 5, 5, 5, 4, 5, 4, 5 ] ),
692  Transformation( [ 5, 5, 5, 4, 5, 5, 5 ] ),
693  Transformation( [ 5, 5, 5, 5, 5, 5, 5 ] ),
694  Transformation( [ 6, 2, 2, 6, 6, 6, 6 ] ),
695  Transformation( [ 6, 2, 6, 2, 2, 6, 2 ] ),
696  Transformation( [ 6, 2, 6, 6, 2, 6, 2 ] ),
697  Transformation( [ 6, 2, 6, 6, 2, 6, 6 ] ),
698  Transformation( [ 6, 2, 6, 6, 6, 6, 6 ] ),
699  Transformation( [ 6, 6, 6, 6, 6, 6, 6 ] ),
700  Transformation( [ 6, 6, 6, 6, 7, 6, 7 ] ),
701  Transformation( [ 6, 6, 6, 7, 7, 6, 7 ] ),
702  Transformation( [ 6, 6, 7, 7, 7, 6, 7 ] ),
703  Transformation( [ 6, 7, 6, 6, 7, 6, 7 ] ),
704  Transformation( [ 6, 7, 6, 7, 7, 6, 7 ] ),
705  Transformation( [ 7, 2, 2, 7, 2, 2, 7 ] ),
706  Transformation( [ 7, 2, 2, 7, 5, 5, 7 ] ),
707  Transformation( [ 7, 2, 2, 7, 6, 6, 7 ] ),
708  Transformation( [ 7, 2, 2, 7, 7, 2, 7 ] ),
709  Transformation( [ 7, 2, 2, 7, 7, 7, 7 ] ),
710  Transformation( [ 7, 2, 7, 7, 2, 7, 7 ] ),
711  Transformation( [ 7, 2, 7, 7, 5, 7, 7 ] ),
712  Transformation( [ 7, 2, 7, 7, 7, 7, 7 ] ),
713  Transformation( [ 7, 3, 3, 7, 3, 3, 7 ] ),
714  Transformation( [ 7, 3, 3, 7, 7, 3, 7 ] ),
715  Transformation( [ 7, 3, 3, 7, 7, 7, 7 ] ),
716  Transformation( [ 7, 5, 5, 7, 5, 5, 7 ] ),
717  Transformation( [ 7, 5, 7, 7, 5, 7, 7 ] ),
718  Transformation( [ 7, 6, 6, 7, 6, 6, 7 ] ),
719  Transformation( [ 7, 6, 6, 7, 7, 6, 7 ] ),
720  Transformation( [ 7, 7, 3, 3, 7, 7, 7 ] ),
721  Transformation( [ 7, 7, 4, 4, 7, 7, 7 ] ),
722  Transformation( [ 7, 7, 7, 4, 7, 4, 7 ] ),
723  Transformation( [ 7, 7, 7, 4, 7, 7, 7 ] ),
724  Transformation( [ 7, 7, 7, 6, 7, 6, 7 ] ),
725  Transformation( [ 7, 7, 7, 7, 5, 5, 7 ] ),
726  Transformation( [ 7, 7, 7, 7, 5, 7, 7 ] ),
727  Transformation( [ 7, 7, 7, 7, 6, 6, 7 ] ),
728  Transformation( [ 7, 7, 7, 7, 7, 6, 7 ] ),
729  Transformation( [ 7, 7, 7, 7, 7, 7, 7 ] ) ]
730gap> idem = Set(Idempotents(m));
731true
732gap> m := semis[30];;
733gap> r := GreensLClassOfElement(m, Transformation([3, 3, 3, 3, 3, 3, 5]));;
734gap> d := DClassOfLClass(r);;
735gap> dr := GreensLClasses(d);;
736gap> r2 := First(dr, x -> x = r);;
737gap> DClassOfLClass(r2) = d;
738true
739gap> m := Semigroup(GeneratorsOfSemigroup(m));
740<transformation semigroup of degree 7 with 2 generators>
741gap>  r := GreensLClassOfElement(m, Transformation([3, 3, 3, 3, 3, 3, 5]));
742<Green's L-class: Transformation( [ 3, 3, 3, 3, 3, 3, 5 ] )>
743gap> d := DClassOfLClass(r);;
744gap> dr := GreensLClasses(d);;
745gap> r2 := First(dr, x -> x = r);;
746gap> DClassOfLClass(r2) = d;
747true
748gap> List(semis, s -> Length(GreensHClasses(s)));
749[ 3, 5, 3, 77, 13, 1281, 2, 1032, 231, 2, 1355, 57, 28, 48, 57, 12, 139, 508,
750  1, 36, 801, 10, 71, 130, 2, 7, 2, 83, 158, 172, 22, 285, 17, 40, 377, 67,
751  1285, 2, 2, 212, 153, 14, 9, 22, 239, 65, 91, 55, 2, 367, 15, 168, 26, 207,
752  14, 29, 274, 22, 17, 26, 253, 10, 1, 2, 13, 64, 605, 20, 25, 33, 2, 1,
753  1520, 307, 9625, 41, 1885, 945, 54, 1297, 58, 18, 1, 173, 1, 25, 737, 2807,
754  636, 495, 2, 201, 3, 3, 471, 715, 118, 28, 197, 88 ]
755gap> ForAll(semis, s ->
756> Number(GreensHClasses(s), IsGroupHClass) = Length(Idempotents(s)));
757true
758gap> List(semis, s -> Number(GreensDClasses(s), IsRegularDClass));
759[ 1, 2, 2, 4, 3, 6, 1, 5, 4, 1, 6, 3, 3, 4, 3, 3, 4, 4, 1, 4, 6, 4, 4, 4, 1,
760  2, 1, 3, 5, 5, 3, 5, 3, 3, 5, 4, 6, 1, 1, 4, 4, 3, 3, 4, 4, 4, 4, 3, 1, 4,
761  3, 4, 4, 4, 4, 3, 6, 3, 3, 3, 4, 3, 1, 2, 2, 4, 4, 3, 3, 3, 1, 1, 5, 3, 7,
762  3, 5, 5, 5, 5, 2, 3, 1, 4, 1, 4, 5, 6, 5, 5, 1, 3, 1, 1, 6, 4, 3, 3, 4, 3 ]
763gap> List(semis, s -> Set(GreensDClasses(s), x -> Length(Idempotents(x))));
764[ [ 0, 1 ], [ 1, 4 ], [ 1, 2 ], [ 1, 5, 7, 30 ], [ 1, 4 ],
765  [ 0, 1, 6, 11, 167, 168 ], [ 0, 1 ], [ 2, 6, 42, 169, 197 ],
766  [ 0, 2, 5, 18, 58 ], [ 0, 1 ], [ 0, 1, 5, 8, 46, 159 ], [ 0, 1, 5, 19 ],
767  [ 0, 2, 4, 11 ], [ 0, 1, 2, 4, 14 ], [ 0, 1, 3, 12 ], [ 0, 1, 2, 3 ],
768  [ 2, 5, 17, 39 ], [ 0, 1, 6, 24, 137 ], [ 1 ], [ 0, 1, 3, 10 ],
769  [ 0, 1, 4, 6, 7, 221 ], [ 0, 1, 2, 3 ], [ 1, 4, 12, 24 ], [ 0, 1, 7, 34 ],
770  [ 0, 1 ], [ 0, 1, 3 ], [ 0, 1 ], [ 0, 5, 9, 36 ], [ 0, 1, 5, 17, 50 ],
771  [ 0, 1, 7, 63 ], [ 0, 1, 4, 8 ], [ 0, 1, 2, 7, 13, 69 ], [ 0, 1, 2, 4 ],
772  [ 4, 17 ], [ 0, 1, 2, 6, 20, 93 ], [ 1, 4, 10, 24 ], [ 0, 1, 7, 105, 199 ],
773  [ 0, 1 ], [ 0, 1 ], [ 0, 1, 5, 13, 48 ], [ 1, 5, 20, 51 ], [ 0, 1, 2, 3 ],
774  [ 0, 1, 3 ], [ 0, 1, 2, 3 ], [ 2, 7, 27, 82 ], [ 1, 4, 9, 24 ],
775  [ 0, 1, 3, 5, 38 ], [ 4, 6, 24 ], [ 0, 1 ], [ 1, 6, 47, 121 ],
776  [ 0, 1, 4, 5 ], [ 0, 1, 5, 14, 42 ], [ 0, 1, 3, 8 ], [ 0, 1, 6, 80 ],
777  [ 1, 3, 6 ], [ 0, 1, 4, 11 ], [ 0, 1, 4, 6, 20, 65 ], [ 0, 1, 4, 10 ],
778  [ 0, 1, 2 ], [ 2, 4, 10 ], [ 0, 1, 5, 34, 62 ], [ 0, 1, 2 ], [ 1 ], [ 1 ],
779  [ 0, 3, 4 ], [ 0, 1, 6, 26 ], [ 0, 2, 6, 47, 121 ], [ 2, 3, 10 ],
780  [ 1, 4, 11 ], [ 3, 4, 15 ], [ 0, 1 ], [ 1 ], [ 0, 1, 3, 7, 122, 248 ],
781  [ 0, 7, 12, 111 ], [ 0, 1, 7, 9, 258, 430, 889 ], [ 0, 1, 4, 20 ],
782  [ 0, 1, 6, 12, 231, 324 ], [ 0, 1, 3, 6, 143, 163 ], [ 1, 3, 4, 24 ],
783  [ 0, 1, 5, 7, 140, 277 ], [ 0, 5, 23 ], [ 0, 1, 4 ], [ 1 ], [ 0, 1, 5, 52 ],
784  [ 1 ], [ 0, 1, 2 ], [ 0, 1, 7, 11, 177 ], [ 0, 1, 2, 7, 38, 390, 434 ],
785  [ 0, 5, 9, 40, 114 ], [ 0, 1, 2, 6, 32, 65 ], [ 0, 1 ], [ 0, 6, 16, 74 ],
786  [ 0, 1 ], [ 0, 1 ], [ 1, 4, 6, 65, 114 ], [ 0, 1, 7, 40, 200 ],
787  [ 0, 5, 8, 44 ], [ 0, 1, 3, 10 ], [ 0, 1, 6, 73 ], [ 0, 1, 4, 33 ] ]
788gap> List(semis, x -> [Length(GreensDClasses(x))]);
789[ [ 3 ], [ 2 ], [ 2 ], [ 4 ], [ 3 ], [ 9 ], [ 2 ], [ 5 ], [ 6 ], [ 2 ],
790  [ 75 ], [ 10 ], [ 4 ], [ 8 ], [ 12 ], [ 5 ], [ 4 ], [ 16 ], [ 1 ], [ 10 ],
791  [ 101 ], [ 5 ], [ 4 ], [ 8 ], [ 2 ], [ 3 ], [ 2 ], [ 6 ], [ 7 ], [ 6 ],
792  [ 4 ], [ 19 ], [ 8 ], [ 3 ], [ 13 ], [ 4 ], [ 36 ], [ 2 ], [ 2 ], [ 14 ],
793  [ 4 ], [ 7 ], [ 4 ], [ 11 ], [ 4 ], [ 4 ], [ 7 ], [ 3 ], [ 2 ], [ 4 ],
794  [ 4 ], [ 7 ], [ 6 ], [ 16 ], [ 4 ], [ 7 ], [ 8 ], [ 4 ], [ 13 ], [ 3 ],
795  [ 7 ], [ 7 ], [ 1 ], [ 2 ], [ 4 ], [ 9 ], [ 10 ], [ 3 ], [ 3 ], [ 3 ],
796  [ 2 ], [ 1 ], [ 54 ], [ 10 ], [ 32 ], [ 4 ], [ 7 ], [ 15 ], [ 5 ], [ 22 ],
797  [ 7 ], [ 5 ], [ 1 ], [ 17 ], [ 1 ], [ 14 ], [ 62 ], [ 11 ], [ 26 ], [ 15 ],
798  [ 2 ], [ 8 ], [ 3 ], [ 3 ], [ 6 ], [ 19 ], [ 4 ], [ 5 ], [ 6 ], [ 13 ] ]
799gap> List(semis, s -> Length(Idempotents(s)));
800[ 1, 5, 3, 43, 9, 354, 1, 416, 83, 1, 220, 25, 17, 21, 16, 6, 63, 168, 1, 15,
801  240, 8, 41, 43, 1, 4, 1, 50, 74, 79, 13, 92, 7, 25, 122, 39, 314, 1, 1, 67,
802  77, 6, 7, 7, 118, 38, 47, 34, 1, 175, 10, 62, 13, 93, 11, 16, 97, 15, 4,
803  16, 102, 4, 1, 2, 7, 34, 176, 15, 16, 22, 1, 1, 381, 130, 1595, 25, 574,
804  316, 33, 430, 28, 9, 1, 63, 1, 5, 197, 872, 173, 106, 1, 96, 1, 1, 191,
805  248, 57, 14, 86, 38 ]
806gap> a := Transformation([2, 1, 4, 5, 6, 3]);;
807gap> b := Transformation([2, 3, 1, 5, 4, 1]);;
808gap> M := Semigroup(a, b);;
809gap> GreensLClassOfElement(M, a);
810<Green's L-class: Transformation( [ 2, 1, 4, 5, 6, 3 ] )>
811gap> f := FreeSemigroup(3);;
812gap> a := f.1;; b := f.2;; c := f.3;;
813gap> s := f / [[a ^ 2, a], [b ^ 2, b], [c ^ 2, c], [a * b, a],
814> [b * a, b], [a * c, a], [c * a, c], [b * c, b], [c * b, c]];
815<fp semigroup on the generators [ s1, s2, s3 ]>
816gap> Size(s);
8173
818gap> GreensLClassOfElement(s, s.1);
819<Green's L-class: s1>
820gap> gens := [Transformation([2, 2, 5, 2, 3]),
821> Transformation([2, 5, 3, 5, 3])];;
822gap> S := Semigroup(gens);;
823gap> f := Transformation([5, 5, 3, 5, 3]);;
824gap> GreensHClassOfElement(S, f);;
825gap> Representative(last);
826Transformation( [ 5, 5, 3, 5, 3 ] )
827gap> IsTrivial(SchutzenbergerGroup(last2));
828true
829gap> gens := [Transformation([4, 1, 4, 5, 3]),
830> Transformation([5, 3, 5, 4, 3])];;
831gap> S := Semigroup(gens);;
832gap> C := GreensLClassOfElement(S, gens[1] * gens[2] * gens[1]);
833<Green's L-class: Transformation( [ 5, 3, 5, 4, 3 ] )>
834gap> gens := [Transformation([5, 1, 1, 5, 1]),
835> Transformation([5, 2, 4, 3, 2])];;
836gap> S := Semigroup(gens);;
837gap> gens := [Transformation([1, 2, 1, 2, 1]),
838> Transformation([3, 4, 2, 1, 4])];;
839gap> S := Semigroup(gens);;
840gap> RClassReps(S);
841[ Transformation( [ 1, 2, 1, 2, 1 ] ), Transformation( [ 3, 4, 2, 1, 4 ] ),
842  Transformation( [ 1, 2, 2, 1, 2 ] ), Transformation( [ 2, 1, 2, 1, 1 ] ) ]
843gap> a := Transformation([2, 1, 4, 5, 6, 3]);;
844gap> b := Transformation([2, 3, 1, 5, 4, 1]);;
845gap> M := Semigroup(a, b);;
846gap> rc := GreensRClassOfElement(M, a * b * a);
847<Green's R-class: Transformation( [ 5, 2, 1, 4, 3, 3 ] )>
848gap> gens := [Transformation([3, 5, 2, 5, 1]),
849> Transformation([4, 3, 2, 1, 5])];;
850gap> S := Semigroup(gens);;
851gap> f := Transformation([2, 4, 2, 5, 3]);;
852gap> r := RClass(S, f);
853<Green's R-class: Transformation( [ 3, 1, 3, 5, 2 ] )>
854gap> LambdaOrb(r);
855<closed orbit, 25 points with Schreier tree with log>
856gap> AsList(last);
857[ [ 0 ], [ 1, 2, 3, 5 ], [ 1, 2, 3, 4, 5 ], [ 2, 3, 4, 5 ], [ 1, 2, 5 ],
858  [ 1, 3, 5 ], [ 3, 4, 5 ], [ 1, 2, 3 ], [ 2, 4, 5 ], [ 2, 3, 5 ],
859  [ 2, 3, 4 ], [ 1, 5 ], [ 2, 5 ], [ 1, 3 ], [ 4, 5 ], [ 3, 5 ], [ 2, 3 ],
860  [ 2, 4 ], [ 1, 2 ], [ 5 ], [ 3, 4 ], [ 1 ], [ 3 ], [ 4 ], [ 2 ] ]
861gap> LambdaOrbMults(LambdaOrb(r), LambdaOrbSCCIndex(r))[LambdaOrbSCCIndex(r)];
862[ IdentityTransformation, IdentityTransformation ]
863gap> SchutzenbergerGroup(r);
864Group([ (1,3,2,5) ])
865gap> gens := [Transformation([4, 1, 5, 2, 4]),
866> Transformation([4, 4, 1, 5, 3])];;
867gap> gens := [Transformation([4, 4, 3, 5, 3]),
868> Transformation([5, 1, 1, 4, 1]),
869> Transformation([5, 5, 4, 4, 5])];;
870gap> S := Semigroup(gens);;
871gap> f := Transformation([4, 5, 5, 5, 5]);;
872gap> SchutzenbergerGroup(GreensDClassOfElement(S, f));
873Group([ (4,5) ])
874gap> SchutzenbergerGroup(GreensRClassOfElement(S, f));
875Group([ (4,5) ])
876gap> SchutzenbergerGroup(GreensLClassOfElement(S, f));
877Group([ (4,5) ])
878gap> SchutzenbergerGroup(GreensHClassOfElement(S, f));
879Group([ (4,5) ])
880gap>  S := Semigroup([Transformation([6, 4, 4, 4, 6, 1]),
881> Transformation([6, 5, 1, 6, 2, 2])]);;
882gap> AsSet(Enumerate(LambdaOrb(S)));
883[ [ 0 ], [ 1 ], [ 1, 2, 5, 6 ], [ 1, 4 ], [ 1, 4, 6 ], [ 2 ], [ 2, 5 ],
884  [ 2, 5, 6 ], [ 2, 6 ], [ 4 ], [ 4, 6 ], [ 5 ], [ 6 ] ]
885gap> S := Semigroup([Transformation([2, 3, 4, 1]),
886> Transformation([3, 3, 1, 1])]);;
887gap> Idempotents(S, 1);
888[  ]
889gap> Idempotents(S, 2);
890[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 3, 3, 1 ] ),
891  Transformation( [ 2, 2, 4, 4 ] ), Transformation( [ 4, 2, 2, 4 ] ) ]
892gap> Idempotents(S, 3);
893[  ]
894gap> Idempotents(S, 4);
895[ IdentityTransformation ]
896gap> Idempotents(S);
897[ IdentityTransformation, Transformation( [ 1, 1, 3, 3 ] ),
898  Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 2, 2, 4, 4 ] ),
899  Transformation( [ 4, 2, 2, 4 ] ) ]
900gap> S := Semigroup([Transformation([2, 4, 1, 2]),
901> Transformation([3, 3, 4, 1])]);;
902gap> AsSet(Enumerate(RhoOrb(S)));
903[ [ 0 ], [ 1, 1, 1, 1 ], [ 1, 1, 1, 2 ], [ 1, 1, 2, 1 ], [ 1, 1, 2, 2 ],
904  [ 1, 1, 2, 3 ], [ 1, 2, 1, 1 ], [ 1, 2, 2, 1 ], [ 1, 2, 3, 1 ] ]
905
906# MonoidPkgTest7: from install_no_grape.tst
907gap> gens := [Transformation([4, 3, 3, 6, 7, 2, 3]),
908>   Transformation([6, 6, 4, 4, 2, 1, 4])];;
909gap> s := Semigroup(gens);;
910gap> Length(GreensRClasses(s));
91117
912gap> s := Semigroup(gens);;
913gap> NrRClasses(s);
91417
915gap> f := Transformation([3, 3, 3, 3, 3, 2, 3]);;
916gap> r := RClass(s, f);
917<Green's R-class: Transformation( [ 3, 3, 3, 3, 3, 2, 3 ] )>
918gap> LambdaOrb(r);
919<closed orbit, 19 points with Schreier tree with log>
920gap> AsSet(LambdaOrb(r));
921[ [ 0 ], [ 1 ], [ 1, 2, 4, 6 ], [ 1, 4 ], [ 1, 4, 6 ], [ 1, 6 ], [ 2 ],
922  [ 2, 3 ], [ 2, 3, 4, 6 ], [ 2, 3, 4, 6, 7 ], [ 2, 3, 6 ], [ 2, 4 ],
923  [ 2, 4, 6 ], [ 2, 6 ], [ 3 ], [ 3, 6 ], [ 4 ], [ 4, 6 ], [ 6 ] ]
924gap> SchutzenbergerGroup(r);
925Group([ (2,3) ])
926gap> Number(GreensDClasses(s), IsRegularDClass);
9273
928gap> s := Semigroup(gens);
929<transformation semigroup of degree 7 with 2 generators>
930gap> NrRegularDClasses(s);
9313
932
933# MonoidPkgTest8
934gap> g1 := Transformation([2, 2, 4, 4, 5, 6]);;
935gap> g2 := Transformation([5, 3, 4, 4, 6, 6]);;
936gap> m1 := Monoid(g1, g2);;
937gap> g1 := Transformation([5, 4, 4, 2, 1]);;
938gap> g2 := Transformation([2, 5, 5, 4, 1]);;
939gap> m2 := Monoid(g1, g2);;
940gap> g1 := Transformation([1, 2, 1, 3, 3]);;
941gap> g2 := Transformation([2, 2, 3, 5, 5]);;
942gap> m3 := Monoid(g1, g2);;
943gap> g1 := Transformation([8, 7, 5, 3, 1, 3, 8, 8]);;
944gap> g2 := Transformation([5, 1, 4, 1, 4, 4, 7, 8]);;
945gap> m4 := Monoid(g1, g2);;
946gap> g1 := Transformation([3, 1, 2, 3, 2, 3, 2, 3]);;
947gap> g2 := Transformation([2, 5, 8, 5, 2, 5, 7, 8]);;
948gap> m5 := Monoid(g1, g2);;
949gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6]);;
950gap> g2 := Transformation([5, 1, 7, 8, 7, 5, 8, 1]);;
951gap> m6 := Semigroup(g1, g2);;
952gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]);;
953gap> g2 := Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11]);;
954gap> m7 := Monoid(g1, g2);;  # (this is a good example!)
955gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]);;
956gap> g2 := Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11]);;
957gap> g3 := Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 6, 11]);;
958gap> m8 := Monoid(g1, g2, g3);;
959gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]);;
960gap> g2 := Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11]);;
961gap> g3 := Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 6, 11]);;
962gap> g4 := Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 11, 11]);;
963gap> m9 := Monoid(g1, g2, g3, g4);;
964gap> g1 := Transformation([12, 3, 6, 4, 6, 11, 9, 6, 6, 7, 6, 12]);;
965gap> g2 := Transformation([10, 7, 2, 11, 7, 3, 12, 4, 3, 8, 7, 5]);;
966gap> m11 := Monoid(g1, g2);;
967gap> g1 := Transformation([3, 2, 12, 2, 7, 9, 4, 2, 1, 12, 11, 12]);;
968gap> g2 := Transformation([3, 6, 12, 7, 2, 2, 3, 6, 1, 7, 11, 1]);;
969gap> m14 := Monoid(g1, g2);;
970gap> g1 := Transformation([2, 2, 3, 4, 5, 6]);;
971gap> g2 := Transformation([2, 3, 4, 5, 6, 1]);;
972gap> m15 := Monoid(g1, g2);;
973gap> g1 := Transformation([2, 1, 4, 5, 6, 7, 3, 2, 1]);;
974gap> g2 := Transformation([2, 1, 4, 2, 1, 4, 2, 1, 4]);;
975gap> m18 := Monoid(g1, g2);;
976gap> g1 := Transformation([5, 2, 5, 5, 8, 10, 8, 5, 2, 10]);;
977gap> g2 := Transformation([2, 2, 5, 5, 5, 8, 8, 8, 8, 8]);;
978gap> m22 := Monoid(g1, g2);;
979gap> g1 := Transformation([4, 6, 3, 8, 5, 6, 10, 4, 3, 7]);;
980gap> g2 := Transformation([5, 6, 6, 3, 8, 6, 3, 7, 8, 4]);;
981gap> g3 := Transformation([8, 6, 3, 2, 8, 10, 9, 2, 6, 2]);;
982gap> m23 := Monoid(g1, g2, g3);;
983
984# MonoidPkgTest9
985gap> SmallMonoids := [m1, m2, m3, m4, m5, m6, m7, m8, m9, m11, m14, m15, m18,
986> m22, m23];;
987gap> List(SmallMonoids, IsCompletelyRegularSemigroup);
988[ false, true, false, false, true, true, true, true, true, false, false,
989  false, false, true, false ]
990gap> List(SmallMonoids, IsRegularSemigroup);
991[ false, true, false, false, true, true, true, true, true, false, false,
992  true, true, true, false ]
993gap> List(SmallMonoids, IsSimpleSemigroup);
994[ false, false, false, false, false, true, false, false, false, false, false,
995  false, false, false, false ]
996gap> List(SmallMonoids, IsCompletelySimpleSemigroup);
997[ false, false, false, false, false, true, false, false, false, false, false,
998  false, false, false, false ]
999gap> List(SmallMonoids, IsInverseSemigroup);
1000[ false, true, false, false, false, false, false, false, false, false, false,
1001  false, false, false, false ]
1002gap> List(SmallMonoids, IsCliffordSemigroup);
1003[ false, true, false, false, false, false, false, false, false, false, false,
1004  false, false, false, false ]
1005gap> List(SmallMonoids, IsGroupAsSemigroup);
1006[ false, false, false, false, false, false, false, false, false, false,
1007  false, false, false, false, false ]
1008gap> List(SmallMonoids, IsZeroSemigroup);
1009[ false, false, false, false, false, false, false, false, false, false,
1010  false, false, false, false, false ]
1011gap> List(SmallMonoids, IsLeftZeroSemigroup);
1012[ false, false, false, false, false, false, false, false, false, false,
1013  false, false, false, false, false ]
1014gap> List(SmallMonoids, IsRightZeroSemigroup);
1015[ false, false, false, false, false, false, false, false, false, false,
1016  false, false, false, false, false ]
1017gap> List(SmallMonoids, IsCommutativeSemigroup);
1018[ false, false, false, false, false, false, false, false, false, false,
1019  false, false, false, false, false ]
1020gap> List(SmallMonoids, IsZeroGroup);
1021[ false, false, false, false, false, false, false, false, false, false,
1022  false, false, false, false, false ]
1023
1024# MonoidPkgTest10
1025gap> gens := [Transformation([2, 4, 1, 5, 4, 4, 7, 3, 8, 1]),
1026>   Transformation([3, 2, 8, 8, 4, 4, 8, 6, 5, 7]),
1027>   Transformation([4, 10, 6, 6, 1, 2, 4, 10, 9, 7]),
1028>   Transformation([6, 2, 2, 4, 9, 9, 5, 10, 1, 8]),
1029>   Transformation([6, 4, 1, 6, 6, 8, 9, 6, 2, 2]),
1030>   Transformation([6, 8, 1, 10, 6, 4, 9, 1, 9, 4]),
1031>   Transformation([8, 6, 2, 3, 3, 4, 8, 6, 2, 9]),
1032>   Transformation([9, 1, 2, 8, 1, 5, 9, 9, 9, 5]),
1033>   Transformation([9, 3, 1, 5, 10, 3, 4, 6, 10, 2]),
1034>   Transformation([10, 7, 3, 7, 1, 9, 8, 8, 4, 10])];;
1035gap> s := Semigroup(gens);;
1036gap> o := Orb(s, [1, 2, 3, 4], OnSets);
1037<open orbit, 1 points>
1038gap> Enumerate(o);
1039<closed orbit, 351 points>
1040gap> List(OrbSCC(o), x -> o{x});
1041[ [ [ 1, 2, 3, 4 ], [ 1, 2, 4, 5 ], [ 2, 3, 4, 8 ], [ 1, 2, 8, 9 ],
1042      [ 2, 3, 5, 6 ], [ 1, 4, 6, 8 ], [ 1, 4, 6, 10 ], [ 4, 6, 8, 9 ],
1043      [ 3, 4, 5, 8 ], [ 1, 3, 4, 5 ], [ 2, 4, 6, 9 ], [ 2, 4, 6, 8 ],
1044      [ 1, 5, 8, 9 ], [ 2, 3, 6, 8 ], [ 1, 2, 5, 9 ], [ 1, 2, 6, 9 ],
1045      [ 2, 3, 4, 5 ], [ 1, 6, 8, 10 ], [ 3, 4, 6, 7 ], [ 3, 7, 8, 9 ],
1046      [ 4, 6, 9, 10 ], [ 4, 5, 7, 8 ], [ 1, 6, 9, 10 ], [ 1, 6, 8, 9 ],
1047      [ 3, 6, 9, 10 ], [ 2, 6, 7, 9 ], [ 2, 4, 5, 8 ], [ 3, 5, 6, 10 ],
1048      [ 1, 2, 3, 10 ], [ 4, 6, 7, 10 ], [ 2, 4, 6, 7 ], [ 4, 8, 9, 10 ],
1049      [ 2, 3, 6, 9 ], [ 1, 2, 4, 8 ], [ 2, 4, 6, 10 ], [ 2, 4, 7, 8 ],
1050      [ 1, 8, 9, 10 ], [ 1, 4, 6, 9 ], [ 3, 5, 9, 10 ], [ 1, 3, 4, 10 ],
1051      [ 2, 5, 8, 9 ], [ 2, 4, 5, 6 ], [ 1, 2, 6, 10 ], [ 2, 4, 7, 10 ],
1052      [ 1, 4, 5, 7 ], [ 2, 4, 5, 7 ], [ 6, 8, 9, 10 ], [ 1, 3, 4, 8 ],
1053      [ 1, 5, 6, 9 ], [ 1, 2, 4, 9 ], [ 1, 2, 4, 6 ], [ 3, 4, 6, 8 ],
1054      [ 1, 3, 5, 6 ], [ 1, 3, 9, 10 ], [ 3, 5, 7, 8 ], [ 1, 3, 4, 7 ],
1055      [ 3, 7, 8, 10 ], [ 2, 6, 8, 9 ], [ 4, 7, 8, 9 ], [ 4, 5, 6, 10 ],
1056      [ 1, 2, 6, 7 ], [ 7, 8, 9, 10 ], [ 1, 3, 7, 8 ], [ 2, 5, 6, 10 ],
1057      [ 3, 4, 6, 9 ], [ 1, 4, 9, 10 ], [ 2, 3, 8, 9 ], [ 3, 4, 7, 8 ],
1058      [ 1, 3, 5, 7 ], [ 2, 5, 6, 9 ], [ 2, 3, 4, 6 ], [ 1, 4, 8, 10 ],
1059      [ 3, 6, 8, 9 ], [ 3, 4, 8, 9 ], [ 1, 5, 6, 10 ], [ 2, 3, 9, 10 ],
1060      [ 1, 4, 8, 9 ], [ 4, 7, 8, 10 ], [ 4, 5, 8, 10 ], [ 1, 7, 8, 10 ],
1061      [ 3, 6, 7, 8 ], [ 2, 5, 9, 10 ], [ 1, 4, 7, 10 ], [ 2, 4, 5, 9 ],
1062      [ 4, 5, 6, 8 ], [ 1, 7, 8, 9 ], [ 3, 5, 6, 8 ], [ 1, 3, 6, 10 ],
1063      [ 1, 2, 6, 8 ], [ 2, 6, 9, 10 ], [ 2, 7, 9, 10 ], [ 4, 7, 9, 10 ],
1064      [ 2, 4, 5, 10 ], [ 2, 3, 5, 10 ], [ 1, 3, 7, 10 ], [ 2, 5, 6, 8 ],
1065      [ 1, 6, 7, 10 ], [ 2, 3, 4, 9 ], [ 1, 3, 5, 10 ], [ 1, 2, 9, 10 ],
1066      [ 2, 3, 5, 7 ], [ 1, 4, 6, 7 ], [ 4, 5, 6, 9 ], [ 1, 4, 7, 9 ],
1067      [ 1, 4, 5, 6 ], [ 1, 7, 9, 10 ], [ 2, 4, 9, 10 ], [ 6, 7, 9, 10 ],
1068      [ 1, 4, 7, 8 ], [ 2, 3, 4, 10 ], [ 1, 2, 5, 8 ], [ 1, 2, 3, 5 ],
1069      [ 2, 4, 8, 9 ], [ 1, 2, 4, 10 ], [ 2, 3, 5, 9 ], [ 4, 6, 8, 10 ],
1070      [ 2, 6, 7, 10 ], [ 4, 6, 7, 8 ], [ 3, 4, 5, 6 ], [ 1, 3, 7, 9 ],
1071      [ 1, 2, 7, 8 ], [ 2, 3, 4, 7 ], [ 1, 2, 5, 6 ], [ 3, 4, 8, 10 ],
1072      [ 2, 4, 8, 10 ], [ 2, 6, 7, 8 ], [ 3, 4, 5, 7 ], [ 1, 4, 5, 10 ],
1073      [ 4, 5, 9, 10 ], [ 1, 6, 7, 9 ], [ 3, 4, 9, 10 ], [ 1, 2, 5, 10 ],
1074      [ 3, 4, 7, 10 ], [ 1, 4, 5, 8 ], [ 5, 6, 9, 10 ], [ 1, 2, 7, 9 ],
1075      [ 2, 3, 5, 8 ], [ 2, 3, 7, 8 ], [ 1, 3, 4, 6 ], [ 1, 3, 5, 9 ],
1076      [ 3, 7, 9, 10 ], [ 4, 6, 7, 9 ], [ 3, 4, 5, 10 ], [ 1, 4, 5, 9 ],
1077      [ 2, 4, 7, 9 ], [ 2, 5, 7, 8 ], [ 3, 4, 6, 10 ], [ 1, 5, 6, 8 ],
1078      [ 3, 4, 5, 9 ], [ 1, 2, 4, 7 ], [ 5, 6, 8, 9 ], [ 1, 5, 7, 8 ],
1079      [ 1, 2, 3, 9 ], [ 1, 3, 8, 9 ], [ 1, 2, 3, 8 ], [ 1, 3, 6, 9 ],
1080      [ 1, 2, 5, 7 ], [ 1, 2, 3, 7 ], [ 1, 3, 4, 9 ], [ 1, 5, 9, 10 ],
1081      [ 5, 6, 8, 10 ], [ 2, 3, 6, 10 ], [ 1, 2, 7, 10 ], [ 1, 3, 5, 8 ],
1082      [ 1, 3, 8, 10 ], [ 2, 6, 8, 10 ], [ 2, 8, 9, 10 ], [ 2, 5, 6, 7 ],
1083      [ 1, 2, 8, 10 ], [ 2, 3, 6, 7 ], [ 3, 4, 7, 9 ], [ 5, 6, 7, 8 ],
1084      [ 1, 5, 8, 10 ], [ 2, 5, 8, 10 ], [ 4, 5, 6, 7 ], [ 3, 5, 6, 7 ],
1085      [ 3, 5, 6, 9 ], [ 4, 5, 8, 9 ] ],
1086  [ [ 2, 4, 5 ], [ 6, 8, 10 ], [ 1, 3, 4 ], [ 2, 3, 8 ], [ 1, 4, 6 ],
1087      [ 4, 6, 10 ], [ 2, 6, 8 ], [ 2, 4, 6 ], [ 2, 4, 8 ], [ 1, 8, 9 ],
1088      [ 4, 8, 10 ], [ 5, 8, 9 ], [ 3, 4, 8 ], [ 3, 7, 8 ], [ 1, 6, 9 ],
1089      [ 2, 4, 9 ], [ 8, 9, 10 ], [ 7, 9, 10 ], [ 1, 5, 8 ], [ 3, 6, 8 ],
1090      [ 1, 3, 6 ], [ 2, 5, 9 ], [ 1, 2, 9 ], [ 2, 3, 5 ], [ 1, 6, 10 ],
1091      [ 4, 8, 9 ], [ 4, 7, 8 ], [ 1, 9, 10 ], [ 4, 6, 9 ], [ 4, 9, 10 ],
1092      [ 1, 4, 8 ], [ 7, 8, 10 ], [ 1, 4, 9 ], [ 2, 5, 8 ], [ 2, 9, 10 ],
1093      [ 2, 6, 9 ], [ 4, 7, 9 ], [ 1, 4, 5 ], [ 1, 7, 10 ], [ 1, 2, 7 ],
1094      [ 3, 4, 9 ], [ 1, 2, 6 ], [ 4, 6, 8 ], [ 2, 6, 10 ], [ 2, 8, 9 ],
1095      [ 1, 2, 10 ], [ 1, 2, 4 ], [ 3, 5, 9 ], [ 4, 5, 8 ], [ 5, 6, 10 ],
1096      [ 2, 3, 10 ], [ 3, 7, 10 ], [ 4, 6, 7 ], [ 7, 8, 9 ], [ 5, 6, 8 ],
1097      [ 3, 4, 6 ], [ 1, 6, 8 ], [ 2, 4, 10 ], [ 6, 7, 10 ], [ 2, 4, 7 ],
1098      [ 3, 4, 5 ], [ 1, 3, 7 ], [ 3, 8, 10 ], [ 6, 7, 8 ], [ 6, 8, 9 ],
1099      [ 4, 5, 6 ], [ 3, 5, 10 ], [ 2, 3, 9 ], [ 6, 9, 10 ], [ 4, 5, 7 ],
1100      [ 4, 5, 10 ], [ 2, 5, 10 ], [ 3, 6, 9 ], [ 1, 3, 10 ], [ 1, 2, 8 ],
1101      [ 2, 3, 6 ], [ 1, 2, 5 ], [ 3, 9, 10 ], [ 5, 7, 8 ], [ 5, 9, 10 ],
1102      [ 1, 5, 9 ], [ 1, 4, 10 ], [ 3, 8, 9 ], [ 1, 3, 8 ], [ 1, 2, 3 ],
1103      [ 1, 3, 9 ], [ 3, 5, 8 ], [ 3, 4, 10 ], [ 1, 7, 9 ], [ 1, 5, 6 ],
1104      [ 2, 7, 8 ], [ 3, 4, 7 ], [ 1, 5, 7 ], [ 1, 8, 10 ], [ 4, 7, 10 ],
1105      [ 3, 6, 7 ], [ 1, 4, 7 ], [ 2, 5, 7 ], [ 1, 7, 8 ], [ 2, 3, 7 ],
1106      [ 4, 5, 9 ], [ 5, 6, 9 ], [ 2, 3, 4 ], [ 1, 3, 5 ], [ 6, 7, 9 ],
1107      [ 3, 7, 9 ], [ 1, 6, 7 ], [ 2, 7, 9 ], [ 3, 6, 10 ], [ 2, 6, 7 ],
1108      [ 2, 8, 10 ], [ 2, 5, 6 ], [ 1, 5, 10 ], [ 2, 7, 10 ], [ 3, 5, 6 ],
1109      [ 5, 8, 10 ], [ 3, 5, 7 ], [ 5, 6, 7 ] ],
1110  [ [ 4, 6 ], [ 2, 6 ], [ 2, 10 ], [ 4, 8 ], [ 6, 10 ], [ 4, 9 ], [ 5, 8 ],
1111      [ 1, 8 ], [ 4, 10 ], [ 7, 8 ], [ 6, 8 ], [ 5, 9 ], [ 4, 5 ], [ 1, 7 ],
1112      [ 8, 10 ], [ 1, 4 ], [ 8, 9 ], [ 1, 9 ], [ 3, 5 ], [ 1, 6 ], [ 3, 4 ],
1113      [ 2, 8 ], [ 3, 6 ], [ 2, 4 ], [ 2, 9 ], [ 4, 7 ], [ 3, 8 ], [ 1, 3 ],
1114      [ 1, 2 ], [ 2, 3 ], [ 3, 7 ], [ 2, 5 ], [ 1, 10 ], [ 3, 10 ], [ 6, 7 ],
1115      [ 7, 10 ], [ 3, 9 ], [ 6, 9 ], [ 9, 10 ], [ 7, 9 ], [ 1, 5 ], [ 5, 7 ],
1116      [ 5, 6 ], [ 2, 7 ], [ 5, 10 ] ],
1117  [ [ 9 ], [ 4 ], [ 5 ], [ 6 ], [ 3 ], [ 8 ], [ 10 ], [ 1 ], [ 2 ], [ 7 ] ] ]
1118gap> g1 := Transformation([1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10]);;
1119gap> g2 := Transformation([2, 4, 4, 2, 10, 5, 11, 11, 11, 6, 7]);;
1120gap> m10 := Monoid(g1, g2);;
1121gap> g1 := Transformation([10, 8, 7, 4, 1, 4, 10, 10, 7, 2]);;
1122gap> g2 := Transformation([5, 2, 5, 5, 9, 10, 8, 3, 8, 10]);;
1123gap> m12 := Monoid(g1, g2);;
1124gap> g1 := Transformation([2, 1, 4, 5, 3, 7, 8, 9, 10, 6]);;
1125gap> g2 := Transformation([1, 2, 4, 3, 5, 6, 7, 8, 9, 10]);;
1126gap> g3 := Transformation([1, 2, 3, 4, 5, 6, 10, 9, 8, 7]);;
1127gap> g4 := Transformation([9, 1, 4, 3, 6, 9, 3, 4, 3, 9]);;
1128gap> m13 := Monoid(g1, g2, g3, g4);;
1129gap> g1 := Transformation([13, 10, 9, 5, 1, 5, 13, 13, 8, 2, 7, 2, 6]);;
1130gap> g2 := Transformation([6, 11, 12, 10, 4, 10, 13, 5, 8, 5, 11, 6, 9]);;
1131gap> m16 := Semigroup(g1, g2);;
1132gap> g1 := Transformation([12, 10, 8, 5, 1, 5, 12, 12, 8, 2, 6, 2]);;
1133gap> g2 := Transformation([5, 6, 10, 11, 10, 4, 10, 12, 5, 7, 4, 10]);;
1134gap> g3 := Transformation([6, 8, 12, 5, 4, 8, 10, 7, 4, 1, 10, 11]);;
1135gap> m17 := Monoid(g1, g2, g3);;
1136gap> g1 := Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]);;
1137gap> g2 := Transformation([5, 4, 1, 2, 3, 7, 6, 5, 4, 1]);;
1138gap> g3 := Transformation([2, 1, 4, 3, 2, 1, 4, 4, 3, 3]);;
1139gap> m19 := Monoid(g1, g2, g3);;
1140gap> g1 := Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]);;
1141gap> g2 := Transformation([2, 3, 4, 5, 6, 8, 7, 1, 2, 2]);;
1142gap> m20 := Monoid(g1, g2);;
1143gap> g1 := Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]);;
1144gap> g2 := Transformation([3, 8, 7, 4, 1, 4, 3, 3, 7, 2]);;
1145gap> m21 := Monoid(g1, g2);;
1146gap> BigMonoids := [m10, m12, m13, m16, m17, m19, m20, m21];;
1147gap> g1 := Transformation([2, 2, 4, 4, 5, 6]);;
1148gap> g2 := Transformation([5, 3, 4, 4, 6, 6]);;
1149gap> m1 := Monoid(g1, g2);;
1150gap> g1 := Transformation([5, 4, 4, 2, 1]);;
1151gap> g2 := Transformation([2, 5, 5, 4, 1]);;
1152gap> m2 := Monoid(g1, g2);;
1153gap> g1 := Transformation([1, 2, 1, 3, 3]);;
1154gap> g2 := Transformation([2, 2, 3, 5, 5]);;
1155gap> m3 := Monoid(g1, g2);;
1156gap> g1 := Transformation([8, 7, 5, 3, 1, 3, 8, 8]);;
1157gap> g2 := Transformation([5, 1, 4, 1, 4, 4, 7, 8]);;
1158gap> m4 := Monoid(g1, g2);;
1159gap> g1 := Transformation([3, 1, 2, 3, 2, 3, 2, 3]);;
1160gap> g2 := Transformation([2, 5, 8, 5, 2, 5, 7, 8]);;
1161gap> m5 := Monoid(g1, g2);;
1162gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6]);;
1163gap> g2 := Transformation([5, 1, 7, 8, 7, 5, 8, 1]);;
1164gap> m6 := Semigroup(g1, g2);;
1165gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]);;
1166gap> g2 := Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11]);;
1167gap> m7 := Monoid(g1, g2);;  # (this is a good example!)
1168gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]);;
1169gap> g2 := Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11]);;
1170gap> g3 := Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 6, 11]);;
1171gap> m8 := Monoid(g1, g2, g3);;
1172gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]);;
1173gap> g2 := Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11]);;
1174gap> g3 := Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 6, 11]);;
1175gap> g4 := Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 11, 11]);;
1176gap> m9 := Monoid(g1, g2, g3, g4);;
1177gap> g1 := Transformation([12, 3, 6, 4, 6, 11, 9, 6, 6, 7, 6, 12]);;
1178gap> g2 := Transformation([10, 7, 2, 11, 7, 3, 12, 4, 3, 8, 7, 5]);;
1179gap> m11 := Monoid(g1, g2);;
1180gap> g1 := Transformation([3, 2, 12, 2, 7, 9, 4, 2, 1, 12, 11, 12]);;
1181gap> g2 := Transformation([3, 6, 12, 7, 2, 2, 3, 6, 1, 7, 11, 1]);;
1182gap> m14 := Monoid(g1, g2);;
1183gap> g1 := Transformation([2, 2, 3, 4, 5, 6]);;
1184gap> g2 := Transformation([2, 3, 4, 5, 6, 1]);;
1185gap> m15 := Monoid(g1, g2);;
1186gap> g1 := Transformation([2, 1, 4, 5, 6, 7, 3, 2, 1]);;
1187gap> g2 := Transformation([2, 1, 4, 2, 1, 4, 2, 1, 4]);;
1188gap> m18 := Monoid(g1, g2);;
1189gap> g1 := Transformation([5, 2, 5, 5, 8, 10, 8, 5, 2, 10]);;
1190gap> g2 := Transformation([2, 2, 5, 5, 5, 8, 8, 8, 8, 8]);;
1191gap> m22 := Monoid(g1, g2);;
1192gap> g1 := Transformation([4, 6, 3, 8, 5, 6, 10, 4, 3, 7]);;
1193gap> g2 := Transformation([5, 6, 6, 3, 8, 6, 3, 7, 8, 4]);;
1194gap> g3 := Transformation([8, 6, 3, 2, 8, 10, 9, 2, 6, 2]);;
1195gap> m23 := Monoid(g1, g2, g3);;
1196gap> SmallMonoids :=
1197> [m1, m2, m3, m4, m5, m6, m7, m8, m9, m11, m14, m15, m18, m22, m23];;
1198gap> List(SmallMonoids, IsCompletelyRegularSemigroup);
1199[ false, true, false, false, true, true, true, true, true, false, false,
1200  false, false, true, false ]
1201gap> List(BigMonoids, IsCompletelyRegularSemigroup);
1202[ true, false, false, false, false, false, true, false ]
1203gap> g1 := Transformation([3, 3, 2, 6, 2, 4, 4, 6]);;
1204gap> g2 := Transformation([5, 1, 7, 8, 7, 5, 8, 1]);;
1205gap> cs1 := Semigroup(g1, g2);;
1206gap> IsCompletelySimpleSemigroup(cs1);
1207true
1208gap> g1 := Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]);;
1209gap> g2 := Transformation([2, 3, 4, 5, 6, 8, 7, 1, 2, 2]);;
1210gap> cs2 := Semigroup(g1, g2);;
1211gap> IsCompletelySimpleSemigroup(cs2);
1212true
1213gap> g1 := Transformation([2, 1, 1, 2, 1]);;
1214gap> g2 := Transformation([3, 4, 3, 4, 4]);;
1215gap> g3 := Transformation([3, 4, 3, 4, 3]);;
1216gap> g4 := Transformation([4, 3, 3, 4, 4]);;
1217gap> cs3 := Semigroup(g1, g2, g3, g4);;
1218gap> IsCompletelySimpleSemigroup(cs3);
1219true
1220gap> g1 := Transformation([4, 4, 4, 1, 1, 6, 7, 8, 9, 10, 11, 1]);;
1221gap> g2 := Transformation([6, 6, 6, 7, 7, 1, 4, 8, 9, 10, 11, 7]);;
1222gap> g3 := Transformation([8, 8, 8, 9, 9, 10, 11, 1, 4, 6, 7, 9]);;
1223gap> g4 := Transformation([2, 2, 2, 4, 4, 6, 7, 8, 9, 10, 11, 4]);;
1224gap> g5 := Transformation([1, 1, 1, 5, 5, 6, 7, 8, 9, 10, 11, 5]);;
1225gap> g6 := Transformation([1, 1, 4, 4, 4, 6, 7, 8, 9, 10, 11, 1]);;
1226gap> g7 := Transformation([1, 1, 7, 4, 4, 6, 7, 8, 9, 10, 11, 6]);;
1227gap> cs4 := Semigroup(g1, g2, g3, g4, g5, g6, g7);;
1228gap> IsCompletelySimpleSemigroup(cs4);
1229true
1230gap> g1 := Transformation([1, 2, 2, 1, 2]);;
1231gap> g2 := Transformation([3, 4, 3, 4, 4]);;
1232gap> g3 := Transformation([3, 4, 3, 4, 3]);;
1233gap> g4 := Transformation([4, 3, 3, 4, 4]);;
1234gap> cs5 := Semigroup(g1, g2, g3, g4);;
1235gap> IsCompletelySimpleSemigroup(cs5);
1236true
1237gap> dc := GreensDClassOfElement(m14, Transformation(
1238> [12, 2, 1, 3, 6, 6, 12, 2, 3, 3, 11, 3]));;
1239gap> dc = MinimalIdeal(m14);
1240false
1241gap> dc := GreensDClassOfElement(m9, Transformation(
1242> [3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]));;
1243gap> d := GreensDClassOfElement(m14, Transformation(
1244> [12, 2, 1, 3, 6, 6, 12, 2, 3, 3, 11, 3]));;
1245gap> g := GroupHClassOfGreensDClass(d);;
1246gap> s := Semigroup(AsList(g));;
1247gap> IsGroupAsSemigroup(s);
1248true
1249gap> IsGroupAsSemigroup(Range(IsomorphismTransformationSemigroup(
1250>  Group([(2, 4)(3, 5), (1, 2, 3, 5, 4)]))));
1251true
1252gap> IsGroupAsSemigroup(m14);
1253false
1254gap> List(SmallMonoids, IsCliffordSemigroup);
1255[ false, true, false, false, false, false, false, false, false, false, false,
1256  false, false, false, false ]
1257gap> List(BigMonoids, IsCliffordSemigroup);
1258[ false, false, false, false, false, false, false, false ]
1259gap> ForAll(GreensDClasses(m2), x -> Length(GreensHClasses(x)) = 1 and
1260> IsRegularDClass(x));
1261true
1262gap> IsCliffordSemigroup(m2);
1263true
1264gap> ForAll(GreensDClasses(m2), x -> Length(GreensHClasses(x)) = 1 and
1265> IsRegularDClass(x));
1266true
1267gap> g1 := Transformation([1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1268> 4, 4, 4, 4]);;
1269gap> g2 := Transformation([1, 2, 3, 4, 5, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1270> 4, 4, 4, 4]);;
1271gap> g3 := Transformation([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 4, 4, 4, 4,
1272> 4, 4, 4, 4, 4]);;
1273gap> g4 := Transformation([1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 12, 13, 14, 15,
1274> 16, 4, 4, 4, 4, 4]);;
1275gap> g5 := Transformation([1 .. 21]);;
1276gap> c3 := Semigroup(g1, g2, g3, g4, g5);;
1277gap> IsCliffordSemigroup(c3);
1278true
1279gap> Size(c3);
12805
1281gap> ForAll(GreensDClasses(c3), x -> Length(GreensHClasses(x)) = 1 and
1282> IsRegularDClass(x));
1283true
1284gap> g1 := g1 * (1, 2);;
1285gap> g2 := Transformation([1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1286> 4, 4, 4, 4]) * (1, 2, 3, 4);;
1287gap> g3 := Transformation([1, 2, 3, 4, 5, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1288> 4, 4, 4, 4]) * (5, 6);;
1289gap> g4 := Transformation([1, 2, 3, 4, 5, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
1290> 4, 4, 4, 4]) * (5, 6, 7);;
1291gap> g5 := Transformation([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 4, 4, 4, 4,
1292> 4, 4, 4, 4, 4]) * (8, 9);;
1293gap> g6 := Transformation([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 4, 4, 4, 4,
1294> 4, 4, 4, 4, 4]) * (10, 11);;
1295gap> g7 := Transformation([1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 12, 13, 14, 15,
1296> 16, 17, 18, 19, 20, 21]) * (12, 13);;
1297gap> g8 := Transformation(
1298> [1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21]) *
1299> (12, 13, 14, 15, 16);;
1300gap> g9 := Transformation([1 .. 21]) * (17, 18, 19, 20, 21);;
1301gap> c4 := Semigroup(g1, g2, g3, g4, g5, g6, g7, g8, g9);;
1302gap> IsCliffordSemigroup(c4);
1303true
1304gap> ForAll(GreensDClasses(c3), x -> Length(GreensHClasses(x)) = 1 and
1305> IsRegularDClass(x));
1306true
1307gap> ForAll(GreensDClasses(c4), x -> Length(GreensHClasses(x)) = 1 and
1308> IsRegularDClass(x));
1309true
1310gap> List(SmallMonoids, IsRegularSemigroup);
1311[ false, true, false, false, true, true, true, true, true, false, false,
1312  true, true, true, false ]
1313gap> List(BigMonoids, IsRegularSemigroup);
1314[ true, false, false, false, false, true, true, false ]
1315gap> List([c3, c4], IsInverseSemigroup);
1316[ true, true ]
1317gap> IsBand(c3);
1318true
1319gap> IsBand(c4);
1320false
1321gap> List(SmallMonoids, IsBand);
1322[ false, false, false, false, false, false, false, false, false, false,
1323  false, false, false, false, false ]
1324gap> List(BigMonoids, IsBand);
1325[ false, false, false, false, false, false, false, false ]
1326gap> g := Group(());;
1327gap> mat := [[(), (), ()], [(), (), ()], [(), (), ()], [(), (), ()]];;
1328gap> rms := ReesMatrixSemigroup(g, mat);;
1329gap> s := Range(IsomorphismTransformationSemigroup(rms));;
1330gap> IsRectangularBand(s);
1331true
1332gap> IsBand(s);
1333true
1334gap> IsSemiband(FullTransformationSemigroup(4));
1335false
1336gap> Size(Semigroup(Idempotents(FullTransformationSemigroup(4))));
1337233
1338gap> 4 ^ 4 - Factorial(4) + 1;
1339233
1340gap> ForAll(SmallMonoids, x -> not IsSemiband(x));
1341true
1342gap> List(SmallMonoids, IsOrthodoxSemigroup);
1343[ false, true, false, false, false, false, true, true, true, false, false,
1344  false, false, true, false ]
1345gap> s := SmallMonoids[1];
1346<non-regular transformation monoid of degree 6 with 2 generators>
1347gap> IsRegularSemigroup(s);
1348false
1349gap> IsOrthodoxSemigroup(s);
1350false
1351gap> t := Semigroup(Idempotents(s));
1352<transformation monoid of degree 6 with 3 generators>
1353gap> Size(t);
13544
1355gap> s := SmallMonoids[7];;
1356gap> Size(s);;
1357gap> t := Semigroup(Idempotents(s));;
1358gap> IsBand(t);
1359true
1360gap> IsRectangularBand(t);
1361false
1362gap> g := Group(());;
1363gap> mat := [[(), (), (), (), (), ()]];;
1364gap> rms := ReesMatrixSemigroup(g, mat);;
1365gap> s := Range(IsomorphismTransformationSemigroup(rms));;
1366gap> IsLeftZeroSemigroup(s);
1367true
1368gap> IsRightZeroSemigroup(s);
1369false
1370gap> mat := TransposedMat(mat);;
1371gap> rms := ReesMatrixSemigroup(g, mat);;
1372gap> s := Range(IsomorphismTransformationSemigroup(rms));;
1373gap> IsRightZeroSemigroup(s);
1374true
1375gap> IsLeftZeroSemigroup(s);
1376false
1377gap> List(BigMonoids, IsLeftZeroSemigroup);
1378[ false, false, false, false, false, false, false, false ]
1379gap> List(BigMonoids, IsRightZeroSemigroup);
1380[ false, false, false, false, false, false, false, false ]
1381gap> gens := [Transformation([2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 2]),
1382> Transformation([1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 3]),
1383> Transformation([1, 7, 3, 9, 5, 11, 7, 1, 9, 3, 11, 5, 5]),
1384> Transformation([7, 7, 9, 9, 11, 11, 1, 1, 3, 3, 5, 5, 7])];;
1385gap> S := Semigroup(gens);;
1386gap> IsSimpleSemigroup(S);
1387true
1388gap> IsCompletelySimpleSemigroup(S);
1389true
1390gap> gens := [Transformation([1, 2, 4, 3, 6, 5, 4]),
1391> Transformation([1, 2, 5, 6, 3, 4, 5]),
1392> Transformation([2, 1, 2, 2, 2, 2, 2])];;
1393gap> S := Semigroup(gens);;
1394gap> IsCompletelyRegularSemigroup(S);
1395true
1396gap> gens := [Transformation([2, 4, 5, 3, 7, 8, 6, 9, 1]),
1397> Transformation([3, 5, 6, 7, 8, 1, 9, 2, 4])];;
1398gap> S := Semigroup(gens);;
1399gap> IsGroupAsSemigroup(S);
1400true
1401gap> IsCommutativeSemigroup(S);
1402true
1403gap> gens := [Transformation([1, 2, 4, 5, 6, 3, 7, 8]),
1404> Transformation([3, 3, 4, 5, 6, 2, 7, 8]),
1405> Transformation([1, 2, 5, 3, 6, 8, 4, 4])];;
1406gap> S := Semigroup(gens);;
1407gap> IsCliffordSemigroup(S);
1408true
1409gap> gens := [Transformation([1, 1, 1, 4, 4, 4, 7, 7, 7, 1]),
1410> Transformation([2, 2, 2, 5, 5, 5, 8, 8, 8, 2]),
1411> Transformation([3, 3, 3, 6, 6, 6, 9, 9, 9, 3]),
1412> Transformation([1, 1, 1, 4, 4, 4, 7, 7, 7, 4]),
1413> Transformation([1, 1, 1, 4, 4, 4, 7, 7, 7, 7])];;
1414gap> S := Semigroup(gens);;
1415gap> IsBand(S);
1416true
1417gap> IsRectangularBand(S);
1418true
1419gap> S := FullTransformationSemigroup(4);;
1420gap> x := Transformation([1, 2, 3, 1]);;
1421gap> D := GreensDClassOfElement(S, x);;
1422gap> T := Semigroup(Elements(D));;
1423gap> IsSemiband(T);
1424true
1425gap> gens := [Transformation([1, 1, 1, 4, 5, 4]),
1426>  Transformation([1, 2, 3, 1, 1, 2]),
1427>  Transformation([1, 2, 3, 1, 1, 3]),
1428>  Transformation([5, 5, 5, 5, 5, 5])];;
1429gap> S := Semigroup(gens);;
1430gap> IsOrthodoxSemigroup(S);
1431true
1432gap> gens := [Transformation([2, 1, 4, 3, 5]),
1433>  Transformation([3, 2, 3, 1, 1])];;
1434gap> S := Semigroup(gens);;
1435gap> IsRightZeroSemigroup(S);
1436false
1437gap> gens := [Transformation([1, 2, 3, 3, 1]),
1438>  Transformation([1, 2, 4, 4, 1])];;
1439gap> S := Semigroup(gens);;
1440gap> IsRightZeroSemigroup(S);
1441true
1442gap> gens := [Transformation([2, 1, 4, 3, 5]),
1443>  Transformation([3, 2, 3, 1, 1])];;
1444gap> S := Semigroup(gens);;
1445gap> IsRightZeroSemigroup(S);
1446false
1447gap> gens := [Transformation([1, 2, 3, 3, 1]),
1448>  Transformation([1, 2, 3, 3, 3])];;
1449gap> S := Semigroup(gens);;
1450gap> IsLeftZeroSemigroup(S);
1451true
1452gap> gens := [Transformation([4, 7, 6, 3, 1, 5, 3, 6, 5, 9]),
1453>  Transformation([5, 3, 5, 1, 9, 3, 8, 7, 4, 3]),
1454>  Transformation([5, 10, 10, 1, 7, 6, 6, 8, 7, 7]),
1455>  Transformation([7, 4, 3, 3, 2, 2, 3, 2, 9, 3]),
1456>  Transformation([8, 1, 3, 4, 9, 6, 3, 7, 1, 6])];;
1457gap> S := Semigroup(gens);;
1458gap> IsZeroSemigroup(S);
1459false
1460gap> gens := [Transformation([1, 4, 2, 6, 6, 5, 2]),
1461> Transformation([1, 6, 3, 6, 2, 1, 6])];;
1462gap> S := Semigroup(gens);;
1463gap> MultiplicativeZero(S);
1464Transformation( [ 1, 1, 1, 1, 1, 1, 1 ] )
1465gap> Unbind(semis); Unbind(S); Unbind(m);
1466
1467# SEMIGROUPS_UnbindVariables
1468gap> Unbind(BigMonoids);
1469gap> Unbind(C);
1470gap> Unbind(D);
1471gap> Unbind(H);
1472gap> Unbind(I);
1473gap> Unbind(M);
1474gap> Unbind(S);
1475gap> Unbind(SmallMonoids);
1476gap> Unbind(T);
1477gap> Unbind(a);
1478gap> Unbind(b);
1479gap> Unbind(c3);
1480gap> Unbind(c4);
1481gap> Unbind(cs1);
1482gap> Unbind(cs2);
1483gap> Unbind(cs3);
1484gap> Unbind(cs4);
1485gap> Unbind(cs5);
1486gap> Unbind(d);
1487gap> Unbind(dc);
1488gap> Unbind(dr);
1489gap> Unbind(f);
1490gap> Unbind(g);
1491gap> Unbind(g1);
1492gap> Unbind(g2);
1493gap> Unbind(g3);
1494gap> Unbind(g4);
1495gap> Unbind(g5);
1496gap> Unbind(g6);
1497gap> Unbind(g7);
1498gap> Unbind(g8);
1499gap> Unbind(g9);
1500gap> Unbind(gens);
1501gap> Unbind(gr);
1502gap> Unbind(h);
1503gap> Unbind(i);
1504gap> Unbind(idem);
1505gap> Unbind(iso);
1506gap> Unbind(m);
1507gap> Unbind(m1);
1508gap> Unbind(m10);
1509gap> Unbind(m11);
1510gap> Unbind(m12);
1511gap> Unbind(m13);
1512gap> Unbind(m14);
1513gap> Unbind(m15);
1514gap> Unbind(m16);
1515gap> Unbind(m17);
1516gap> Unbind(m18);
1517gap> Unbind(m19);
1518gap> Unbind(m2);
1519gap> Unbind(m20);
1520gap> Unbind(m21);
1521gap> Unbind(m22);
1522gap> Unbind(m23);
1523gap> Unbind(m3);
1524gap> Unbind(m4);
1525gap> Unbind(m5);
1526gap> Unbind(m6);
1527gap> Unbind(m7);
1528gap> Unbind(m8);
1529gap> Unbind(m9);
1530gap> Unbind(mat);
1531gap> Unbind(o);
1532gap> Unbind(r);
1533gap> Unbind(r2);
1534gap> Unbind(rc);
1535gap> Unbind(res);
1536gap> Unbind(rms);
1537gap> Unbind(s);
1538gap> Unbind(semis);
1539gap> Unbind(sizes);
1540gap> Unbind(t);
1541gap> Unbind(x);
1542
1543#
1544gap> SEMIGROUPS.StopTest();
1545gap> STOP_TEST("Semigroups package: extreme/monoid_pkg.tst");
1546