1#############################################################################
2##
3#W  extreme/properties.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##
10gap> START_TEST("Semigroups package: extreme/properties.tst");
11gap> LoadPackage("semigroups", false);;
12
13#
14gap> SEMIGROUPS.StartTest();
15
16# PropertiesTest3
17gap> semis :=
18> [Semigroup([Transformation([2, 2, 4, 4]),
19>      Transformation([5, 3, 4, 4, 6, 6])]),
20>  Semigroup([Transformation([5, 4, 4, 2, 1]),
21>      Transformation([2, 5, 5, 4, 1])]),
22>  Semigroup([Transformation([1, 2, 1, 3, 3]),
23>      Transformation([2, 2, 3, 5, 5])]),
24>  Semigroup([Transformation([1, 2, 1, 3, 3]),
25>      Transformation([2, 2, 3, 5, 5])]),
26>  Semigroup([Transformation([8, 7, 5, 3, 1, 3, 8, 8]),
27>      Transformation([5, 1, 4, 1, 4, 4])]),
28>  Semigroup([Transformation([3, 1, 2, 3, 2, 3, 2, 3]),
29>      Transformation([2, 5, 8, 5, 2, 5, 7, 8])]),
30>  Semigroup([Transformation([3, 3, 2, 6, 2, 4, 4, 6]),
31>      Transformation([5, 1, 7, 8, 7, 5, 8, 1])]),
32>  Semigroup([Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]),
33>      Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11])]),
34>  Semigroup([Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]),
35>      Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11]),
36>      Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 6])]),
37>  Semigroup([Transformation([3, 3, 2, 6, 2, 4, 4, 6, 3, 4, 6]),
38>      Transformation([4, 4, 6, 1, 3, 3, 3, 3, 11, 11, 11]),
39>      Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 6]),
40>      Transformation([2, 2, 3, 4, 4, 6, 6, 6, 6, 11, 11])]),
41>  Semigroup([Transformation([12, 3, 6, 4, 6, 11, 9, 6, 6, 7, 6, 12]),
42>      Transformation([10, 7, 2, 11, 7, 3, 12, 4, 3, 8, 7, 5])]),
43>  Semigroup([Transformation([3, 2, 12, 2, 7, 9, 4, 2, 1, 12, 11, 12]),
44>      Transformation([3, 6, 12, 7, 2, 2, 3, 6, 1, 7, 11, 1])]),
45>  Semigroup(
46>    [Transformation([2, 2]), Transformation([2, 3, 4, 5, 6, 1])]),
47>  Semigroup([Transformation([2, 1, 4, 5, 6, 7, 3, 2, 1]),
48>      Transformation([2, 1, 4, 2, 1, 4, 2, 1, 4])]),
49>  Semigroup([Transformation([5, 2, 5, 5, 8, 10, 8, 5, 2, 10]),
50>      Transformation([2, 2, 5, 5, 5, 8, 8, 8, 8, 8])]),
51>  Semigroup([Transformation([4, 6, 3, 8, 5, 6, 10, 4, 3, 7]),
52>      Transformation([5, 6, 6, 3, 8, 6, 3, 7, 8, 4]),
53>      Transformation([8, 6, 3, 2, 8, 10, 9, 2, 6, 2])]),
54>  Semigroup([Transformation([1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10]),
55>      Transformation([2, 4, 4, 2, 10, 5, 11, 11, 11, 6, 7])]),
56>  Semigroup([Transformation([10, 8, 7, 4, 1, 4, 10, 10, 7, 2]),
57>      Transformation([5, 2, 5, 5, 9, 10, 8, 3, 8, 10])]),
58>  Semigroup([Transformation([2, 1, 4, 5, 3, 7, 8, 9, 10, 6]),
59>      Transformation([1, 2, 4, 3]),
60>      Transformation([1, 2, 3, 4, 5, 6, 10, 9, 8, 7]),
61>      Transformation([9, 1, 4, 3, 6, 9, 3, 4, 3, 9])]),
62>  Semigroup([Transformation([13, 10, 9, 5, 1, 5, 13, 13, 8, 2, 7, 2, 6]),
63>             Transformation([6, 11, 12, 10, 4, 10, 13, 5, 8, 5, 11, 6, 9])]),
64>  Semigroup([Transformation([12, 10, 8, 5, 1, 5, 12, 12, 8, 2, 6, 2]),
65>      Transformation([5, 6, 10, 11, 10, 4, 10, 12, 5, 7, 4, 10]),
66>      Transformation([6, 8, 12, 5, 4, 8, 10, 7, 4, 1, 10, 11])]),
67>  Semigroup([Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]),
68>      Transformation([5, 4, 1, 2, 3, 7, 6, 5, 4, 1]),
69>      Transformation([2, 1, 4, 3, 2, 1, 4, 4, 3, 3])])];;
70gap> List([1 .. 15], i -> IsCompletelyRegularSemigroup(semis[i]));
71[ false, true, false, false, false, true, true, true, true, true, false,
72  false, false, false, true ]
73gap> List([15 .. 22], i -> IsCompletelyRegularSemigroup(semis[i]));
74[ true, false, true, false, false, false, false, false ]
75
76# PropertiesTest4
77gap> s := Semigroup(Transformation([3, 3, 2, 6, 2, 4, 4, 6]),
78> Transformation([3, 3, 2, 6, 2, 4, 4, 6]));;
79gap> IsSimpleSemigroup(s);
80true
81
82# PropertiesTest5
83gap> s := Semigroup(Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]),
84> Transformation([2, 3, 4, 5, 6, 8, 7, 1, 2, 2]));;
85gap> IsSimpleSemigroup(s);
86true
87
88# PropertiesTest6
89gap> s := Semigroup(
90> Transformation([2, 1, 1, 2, 1]), Transformation([3, 4, 3, 4, 4]),
91> Transformation([3, 4, 3, 4, 3]), Transformation([4, 3, 3, 4, 4]));;
92gap> IsCompletelySimpleSemigroup(s);
93true
94
95# PropertiesTest7
96gap> s := Semigroup(Transformation([4, 4, 4, 1, 1, 6, 7, 8, 9, 10, 11, 1]),
97> Transformation([6, 6, 6, 7, 7, 1, 4, 8, 9, 10, 11, 7]),
98> Transformation([8, 8, 8, 9, 9, 10, 11, 1, 4, 6, 7, 9]),
99> Transformation([2, 2, 2, 4, 4, 6, 7, 8, 9, 10, 11, 4]),
100> Transformation([1, 1, 1, 5, 5, 6, 7, 8, 9, 10, 11, 5]),
101> Transformation([1, 1, 4, 4, 4, 6, 7, 8, 9, 10, 11, 1]),
102> Transformation([1, 1, 7, 4, 4, 6, 7, 8, 9, 10, 11, 6]));;
103gap> IsCompletelySimpleSemigroup(s);
104true
105
106# PropertiesTest8
107gap> s := Semigroup(Transformation([1, 2, 2, 1, 2]),
108> Transformation([3, 4, 3, 4, 4]),
109> Transformation([3, 4, 3, 4, 3]),
110> Transformation([4, 3, 3, 4, 4]));;
111gap> IsCompletelySimpleSemigroup(s);
112true
113
114# PropertiesTest9
115gap> s := semis[12];;
116gap> d := GreensDClassOfElement(s,
117> Transformation([12, 2, 1, 3, 6, 6, 12, 2, 3, 3, 11, 3]));;
118gap> g := GroupHClassOfGreensDClass(d);;
119gap> s := Semigroup(AsList(g));;
120gap> IsGroupAsSemigroup(s);
121true
122gap> IsGroupAsSemigroup(Range(IsomorphismTransformationSemigroup(
123>  Group([(2, 4)(3, 5), (1, 2, 3, 5, 4)]))));
124true
125gap> IsGroupAsSemigroup(semis[11]);
126false
127
128# PropertiesTest10
129gap> List(semis, IsCliffordSemigroup);
130[ false, true, false, false, false, false, false, false, false, false, false,
131  false, false, false, false, false, false, false, false, false, false, false
132 ]
133gap> ForAll(GreensDClasses(semis[2]), x -> Length(GreensHClasses(x)) = 1 and
134> IsRegularDClass(x));
135true
136gap> IsCliffordSemigroup(semis[2]);
137true
138gap> ForAll(GreensDClasses(semis[2]), x -> Length(GreensHClasses(x)) = 1 and
139> IsRegularDClass(x));
140true
141
142# PropertiesTest11
143gap> s := Semigroup(
144> Transformation([1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
145>                 4, 4, 4, 4, 4, 4, 4]),
146> Transformation([1, 2, 3, 4, 5, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
147>                 4]),
148> Transformation([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 4, 4, 4, 4, 4, 4, 4, 4, 4,
149>                 4]),
150> Transformation([1, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 12, 13, 14, 15, 16, 4, 4, 4,
151>                 4, 4]),
152> Transformation([1 .. 21] * 1));;
153gap> IsLTrivial(s);
154true
155
156# PropertiesTest12
157gap> gens := [
158> Transformation([1, 2, 1, 3, 3]),
159> Transformation([2, 2, 3, 5, 5])];;
160gap> s := Monoid(gens);;
161gap> IsLTrivial(s);
162true
163gap> d := DClass(s, Transformation([2, 2, 1, 1, 1]));;
164gap> IsLTrivial(d);
165true
166
167# PropertiesTest13
168gap> gens := [Transformation([2, 8, 3, 7, 1, 5, 2, 6]),
169> Transformation([3, 5, 7, 2, 5, 6, 3, 8]),
170> Transformation([4, 1, 8, 3, 5, 7, 3, 5]),
171> Transformation([4, 3, 4, 5, 6, 4, 1, 2]),
172> Transformation([5, 4, 8, 8, 5, 6, 1, 5]),
173> Transformation([6, 7, 4, 1, 4, 1, 6, 2]),
174> Transformation([7, 1, 2, 2, 2, 7, 4, 5]),
175> Transformation([8, 8, 5, 1, 7, 5, 2, 8])];;
176gap> s := Semigroup(gens);;
177gap> iter := IteratorOfDClasses(s);;
178gap> repeat
179>   d := NextIterator(iter);
180> until IsDoneIterator(iter) or IsLTrivial(d);
181gap> d = DClass(s, Transformation([2, 8, 3, 7, 1, 5, 2, 6]))
182> or d = DClass(s, Transformation([5, 5, 5, 5, 5, 5, 5, 5]));
183true
184gap> IsLTrivial(d);
185true
186gap> Size(d) in [1, 8];
187true
188gap> repeat
189>   d := NextIterator(iter);
190> until IsDoneIterator(iter) or not IsLTrivial(d) and IsRTrivial(d);
191gap> d;;
192gap> IsLTrivial(d);
193false
194gap> IsRTrivial(d);
195true
196gap> NrLClasses(d);
1971
198gap> NrRClasses(d);
1994560
200gap> IsRTrivial(s);
201false
202
203# PropertiesTest14
204gap> gens := [Transformation([3, 4, 1, 2, 1]),
205>   Transformation([4, 2, 1, 5, 5]),
206>   Transformation([4, 2, 2, 2, 4])];;
207gap> s := Semigroup(gens);;
208gap> IsRTrivial(s);
209false
210
211# PropertiesTest15
212gap> gens := [Transformation([1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10]),
213> Transformation([2, 4, 4, 2, 10, 5, 11, 11, 11, 6, 7])];;
214gap> s := Monoid(gens);;
215gap> IsRTrivial(s);
216false
217gap> IsHTrivial(s);
218false
219
220# PropertiesTest16
221gap> gens := [Transformation([2, 8, 3, 7, 1, 5, 2, 6]),
222>   Transformation([3, 5, 7, 2, 5, 6, 3, 8]),
223>   Transformation([6, 7, 4, 1, 4, 1, 6, 2]),
224>   Transformation([8, 8, 5, 1, 7, 5, 2, 8])];;
225gap> s := Semigroup(gens);;
226gap> IsAperiodicSemigroup(s);
227false
228
229# PropertiesTest17
230gap> gens := [Transformation([2, 6, 7, 2, 6, 1, 1, 5]),
231>   Transformation([3, 8, 1, 4, 5, 6, 7, 1]),
232>   Transformation([4, 3, 2, 7, 7, 6, 6, 5]),
233>   Transformation([7, 1, 7, 4, 2, 5, 6, 3])];;
234gap> s := Monoid(gens);;
235gap> IsCombinatorialSemigroup(s);
236false
237
238# PropertiesTest18
239gap> gens := [Transformation([3, 4, 1, 2, 1]),
240>   Transformation([4, 2, 1, 5, 5]),
241>   Transformation([4, 2, 2, 2, 4])];;
242gap> s := Semigroup(gens);;
243gap> IsAperiodicSemigroup(s);
244false
245
246# PropertiesTest19
247gap> gens := [Transformation([13, 10, 9, 5, 1, 5, 13, 13, 8, 2, 7, 2, 6]),
248> Transformation([6, 11, 12, 10, 4, 10, 13, 5, 8, 5, 11, 6, 9])];;
249gap> s := Semigroup(gens);;
250gap> IsAperiodicSemigroup(s);
251false
252
253# PropertiesTest20
254gap> gens := [Transformation([12, 10, 8, 5, 1, 5, 12, 12, 8, 2, 6, 2]),
255> Transformation([5, 6, 10, 11, 10, 4, 10, 12, 5, 7, 4, 10]),
256> Transformation([6, 8, 12, 5, 4, 8, 10, 7, 4, 1, 10, 11])];;
257gap> s := Monoid(gens);;
258gap> IsAperiodicSemigroup(s);
259false
260
261# PropertiesTest21
262gap> gens := [Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]),
263> Transformation([5, 4, 1, 2, 3, 7, 6, 5, 4, 1]),
264> Transformation([2, 1, 4, 3, 2, 1, 4, 4, 3, 3])];;
265gap> s := Monoid(gens);;
266gap> IsAperiodicSemigroup(s);
267false
268
269# PropertiesTest22
270gap> gens := [Transformation([1, 2, 1, 3, 3]),
271> Transformation([2, 2, 3, 5, 5])];;
272gap> s := Monoid(gens);;
273gap> IsAperiodicSemigroup(s);
274true
275
276# PropertiesTest23
277gap> gens := [Transformation([1, 3, 2, 6, 5, 4, 8, 7, 9, 10]),
278> Transformation([1, 2, 6, 4, 8, 3, 9, 5, 7, 10]),
279> Transformation([1, 10, 10, 10, 10, 10, 7, 8, 10, 10]),
280> Transformation([1, 10, 3, 10, 10, 6, 10, 10, 10, 10])];;
281gap> s := Semigroup(gens);;
282gap> IsInverseSemigroup(s);
283true
284
285# PropertiesTest24
286gap> gens := [
287> Transformation([1, 4, 5, 16, 2, 11, 13, 7, 12, 8, 15, 6, 14, 10, 9, 3,
288>                 17]),
289> Transformation([1, 17, 17, 17, 17, 6, 7, 8, 9, 10, 11, 17, 17, 17, 17,
290>                 16, 17]),
291> Transformation([1, 2, 3, 17, 17, 6, 17, 17, 17, 17, 11, 17, 17, 14, 15,
292>                 16, 17]),
293> Transformation([1, 2, 17, 4, 17, 17, 7, 17, 17, 10, 17, 17, 13, 17, 15,
294>                 16, 17])];;
295gap> s := Semigroup(gens);;
296gap> IsInverseSemigroup(s);
297true
298
299# PropertiesTest25
300gap> gens := [Transformation([1, 2, 10, 4, 5, 13, 7, 8, 15, 3, 11, 16, 6, 14,
301>   9, 12, 17]),
302> Transformation([1, 8, 10, 4, 5, 6, 14, 2, 15, 3, 11, 12, 13, 7, 9, 16,
303>   17]),
304> Transformation([1, 8, 17, 4, 5, 17, 14, 2, 17, 17, 11, 17, 17, 7, 17, 17,
305>   17]),
306> Transformation([1, 2, 17, 4, 8, 17, 7, 5, 17, 17, 14, 17, 17, 11, 17, 17,
307>   17]),
308> Transformation([1, 17, 4, 10, 9, 17, 17, 17, 15, 3, 11, 17, 17, 17, 5, 17,
309>   17]),
310> Transformation([1, 17, 4, 3, 15, 17, 17, 17, 9, 10, 11, 17, 17, 17, 5, 17,
311>   17]),
312> Transformation([1, 17, 17, 17, 5, 6, 7, 17, 9, 17, 17, 17, 13, 14, 15, 17,
313>   17]),
314> Transformation([1, 2, 17, 17, 5, 17, 17, 8, 9, 17, 17, 12, 17, 17, 15, 16,
315>   17]),
316> Transformation([1, 17, 3, 17, 5, 17, 7, 17, 17, 10, 17, 12, 17, 14, 17, 16,
317>   17]),
318> Transformation([1, 17, 17, 4, 5, 6, 17, 17, 17, 17, 11, 12, 13, 17, 17, 16,
319>   17]),
320> Transformation([1, 2, 3, 17, 5, 6, 17, 8, 17, 10, 17, 17, 13, 17, 17, 17,
321>   17])];;
322gap> s := Semigroup(gens);;
323gap> IsInverseSemigroup(s);
324true
325
326# PropertiesTest26
327gap> gens := [Transformation([1, 2, 2]), Transformation([1, 2, 1]),
328>   Transformation([2, 2, 3]), Transformation([3, 2, 3]),
329>   Transformation([1, 3, 3]), Transformation([1, 1, 3])];;
330gap> s := Semigroup(gens);;
331gap> IsIdempotentGenerated(s);
332true
333
334# PropertiesTest27
335gap> gens := [Transformation([2, 6, 1, 8, 5, 3, 8, 8]),
336> Transformation([3, 7, 6, 4, 5, 2, 1, 8])];;
337gap> s := Semigroup(gens);;
338gap> i := MinimalIdeal(s);;
339gap> MultiplicativeZero(s);
340Transformation( [ 8, 8, 8, 8, 5, 8, 8, 8 ] )
341gap> IsLeftZeroSemigroup(i);
342true
343
344# PropertiesTest28
345gap> gens := [Transformation([2, 3, 4, 5, 6, 7, 8, 9, 1]),
346> Transformation([4, 2, 3, 4, 5, 6, 7, 8, 9])];;
347gap> s := Semigroup(gens);;
348gap> i := MinimalIdeal(s);;
349gap> Size(i);
35081
351gap> i := Semigroup(Generators(i), rec(small := true));;
352gap> Size(i);
3533
354gap> IsLeftZeroSemigroup(i);
355false
356gap> IsSimpleSemigroup(i);
357true
358gap> IsRightZeroSemigroup(i);
359false
360gap> MultiplicativeZero(i);
361fail
362gap> One(i);
363fail
364
365# PropertiesTest29
366gap> gens := [
367> Transformation([1, 3, 4, 1]),
368> Transformation([2, 4, 1, 2]),
369> Transformation([3, 1, 1, 3]),
370> Transformation([3, 3, 4, 1])];;
371gap> s := Monoid(gens);;
372gap> s := Semigroup(GeneratorsOfSemigroup(s));;
373gap> IsMonoidAsSemigroup(s);
374true
375gap> IsMonoid(s);
376true
377gap> i := MinimalIdeal(s);;
378gap> Size(i);
3794
380gap> IsLeftZeroSemigroup(i);
381false
382gap> IsRightZeroSemigroup(i);
383true
384gap> IsSynchronizingSemigroup(i, 4);
385true
386
387# PropertiesTest30
388gap> gens := [Transformation([2, 1, 4, 5, 3, 7, 8, 9, 10, 6]),
389> Transformation([1, 2, 4, 3, 5, 6, 7, 8, 9, 10]),
390> Transformation([1, 2, 3, 4, 5, 6, 10, 9, 8, 7]),
391> Transformation([9, 1, 4, 3, 6, 9, 3, 4, 3, 9])];;
392gap> s := Monoid(gens);;
393gap> g := GroupOfUnits(s);;
394
395# PropertiesTest31
396gap> gens := [Transformation([4, 4, 4, 1, 1, 6, 7, 8, 9, 10, 11, 1]),
397> Transformation([6, 6, 6, 7, 7, 1, 4, 8, 9, 10, 11, 7]),
398> Transformation([8, 8, 8, 9, 9, 10, 11, 1, 4, 6, 7, 9]),
399> Transformation([2, 2, 2, 4, 4, 6, 7, 8, 9, 10, 11, 4]),
400> Transformation([1, 1, 1, 5, 5, 6, 7, 8, 9, 10, 11, 5]),
401> Transformation([1, 1, 4, 4, 4, 6, 7, 8, 9, 10, 11, 1]),
402> Transformation([1, 1, 7, 4, 4, 6, 7, 8, 9, 10, 11, 6])];;
403gap> s := Semigroup(gens);;
404gap> IsOrthodoxSemigroup(s);
405true
406
407# PropertiesTest32
408gap> gens := [Transformation([2, 8, 3, 7, 1, 5, 2, 6]),
409>   Transformation([3, 5, 7, 2, 5, 6, 3, 8]),
410>   Transformation([4, 1, 8, 3, 5, 7, 3, 5]),
411>   Transformation([4, 3, 4, 5, 6, 4, 1, 2]),
412>   Transformation([5, 4, 8, 8, 5, 6, 1, 5]),
413>   Transformation([6, 7, 4, 1, 4, 1, 6, 2]),
414>   Transformation([7, 1, 2, 2, 2, 7, 4, 5]),
415>   Transformation([8, 8, 5, 1, 7, 5, 2, 8])];;
416gap> s := Semigroup(gens);;
417gap> IsOrthodoxSemigroup(s);
418false
419
420# PropertiesTest33
421gap> gens := [Transformation([2, 8, 3, 7, 1, 5, 2, 6]),
422>   Transformation([3, 5, 7, 2, 5, 6, 3, 8]),
423>   Transformation([6, 7, 4, 1, 4, 1, 6, 2]),
424>   Transformation([8, 8, 5, 1, 7, 5, 2, 8])];;
425gap> s := Semigroup(gens);;
426gap> IsOrthodoxSemigroup(s);
427false
428
429# PropertiesTest34
430gap> gens := [Transformation([2, 6, 7, 2, 6, 1, 1, 5]),
431>   Transformation([3, 8, 1, 4, 5, 6, 7, 1]),
432>   Transformation([4, 3, 2, 7, 7, 6, 6, 5]),
433>   Transformation([7, 1, 7, 4, 2, 5, 6, 3])];;
434gap> s := Monoid(gens);;
435gap> IsOrthodoxSemigroup(s);
436false
437
438# PropertiesTest35
439gap> gens := [Transformation([3, 4, 1, 2, 1]),
440>   Transformation([4, 2, 1, 5, 5]),
441>   Transformation([4, 2, 2, 2, 4])];;
442gap> s := Semigroup(gens);;
443gap> IsOrthodoxSemigroup(s);
444false
445
446# PropertiesTest36
447gap> gens := [Transformation([1, 3, 2, 3]),
448>  Transformation([1, 4, 1, 2]),
449>  Transformation([3, 4, 2, 2]),
450>  Transformation([4, 1, 2, 1])];;
451gap> s := Monoid(gens);;
452gap> IsOrthodoxSemigroup(s);
453false
454
455# PropertiesTest37
456gap> gens := [Transformation([1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10]),
457> Transformation([2, 4, 4, 2, 10, 5, 11, 11, 11, 6, 7])];;
458gap> s := Monoid(gens);;
459gap> IsOrthodoxSemigroup(s);
460true
461
462# PropertiesTest38
463gap> gens := [Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]),
464> Transformation([3, 8, 7, 4, 1, 4, 3, 3, 7, 2])];;
465gap> s := Monoid(gens);;
466gap> i := MinimalIdeal(s);;
467gap> IsRectangularBand(i);
468true
469
470# PropertiesTest39
471gap> gens := [Transformation([1, 4, 6, 2, 5, 3, 7, 8]),
472>   Transformation([6, 3, 2, 7, 5, 1, 8, 8])];
473[ Transformation( [ 1, 4, 6, 2, 5, 3 ] ),
474  Transformation( [ 6, 3, 2, 7, 5, 1, 8, 8 ] ) ]
475gap> s := Semigroup(gens);;
476gap> i := MinimalIdeal(s);;
477gap> IsRectangularBand(i);
478true
479gap> MultiplicativeZero(i);
480Transformation( [ 8, 8, 8, 8, 5, 8, 8, 8 ] )
481
482# PropertiesTest40
483gap> gens := [Transformation([2, 8, 3, 7, 1, 5, 2, 6]),
484>   Transformation([3, 5, 7, 2, 5, 6, 3, 8]),
485>   Transformation([4, 1, 8, 3, 5, 7, 3, 5]),
486>   Transformation([4, 3, 4, 5, 6, 4, 1, 2]),
487>   Transformation([5, 4, 8, 8, 5, 6, 1, 5]),
488>   Transformation([6, 7, 4, 1, 4, 1, 6, 2]),
489>   Transformation([7, 1, 2, 2, 2, 7, 4, 5]),
490>   Transformation([8, 8, 5, 1, 7, 5, 2, 8])];;
491gap> s := Semigroup(gens);;
492gap> i := MinimalIdeal(s);;
493gap> IsRectangularBand(s);
494false
495gap> IsSimpleSemigroup(s);
496false
497gap> IsRectangularBand(i);
498true
499gap> IsRightZeroSemigroup(i);
500true
501
502# PropertiesTest41
503gap> rms := ReesMatrixSemigroup(Group(()),
504>                               List([1 .. 4], x -> List([1 .. 3], y -> ())));;
505gap> s := IsomorphismTransformationSemigroup(rms);;
506gap> s := Range(s);;
507gap> IsRectangularBand(s);
508true
509gap> IsRegularSemigroup(s);
510true
511
512# PropertiesTest42
513gap> gens := [Transformation([2, 6, 7, 2, 6, 9, 9, 1, 1, 5]),
514>   Transformation([3, 1, 4, 2, 5, 2, 1, 6, 1, 7]),
515>   Transformation([3, 8, 1, 9, 9, 4, 10, 5, 10, 6]),
516>   Transformation([4, 7, 6, 9, 10, 1, 3, 6, 6, 2]),
517>   Transformation([5, 9, 10, 9, 6, 3, 8, 4, 6, 5]),
518>   Transformation([6, 2, 2, 7, 8, 8, 2, 10, 2, 4]),
519>   Transformation([6, 2, 8, 4, 7, 5, 8, 3, 5, 8]),
520>   Transformation([7, 1, 4, 3, 2, 7, 7, 6, 6, 5]),
521>   Transformation([7, 10, 10, 1, 7, 9, 10, 4, 2, 10]),
522>   Transformation([10, 7, 10, 8, 8, 7, 5, 9, 1, 9])];;
523gap> s := Semigroup(gens, rec(acting := true));;
524gap> IsRegularSemigroup(s);
525false
526
527# PropertiesTest43
528gap> gens := [Transformation([2, 1, 4, 5, 3, 7, 8, 9, 10, 6]),
529> Transformation([1, 2, 4, 3, 5, 6, 7, 8, 9, 10]),
530> Transformation([1, 2, 3, 4, 5, 6, 10, 9, 8, 7]),
531> Transformation([9, 1, 4, 3, 6, 9, 3, 4, 3, 9])];;
532gap> s := Monoid(gens);;
533gap> IsRegularSemigroup(s);
534false
535
536# PropertiesTest44
537gap> gens := [Transformation([1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10]),
538> Transformation([2, 4, 4, 2, 10, 5, 11, 11, 11, 6, 7])];;
539gap> s := Monoid(gens);;
540gap> IsInverseSemigroup(s);
541false
542gap> t := Semigroup(Idempotents(s));;
543gap> IsSemilattice(t);
544false
545gap> IsBand(t);
546true
547gap> Size(t);
54810
549gap> IsOrthodoxSemigroup(t);
550true
551
552# PropertiesTest45
553gap> gens := [Transformation([2, 3, 4, 5, 1, 8, 7, 6, 2, 7]),
554> Transformation([2, 3, 4, 5, 6, 8, 7, 1, 2, 2])];;
555gap> s := Monoid(gens);;
556gap> s := Semigroup(Idempotents(Monoid(gens)));;
557gap> IsSemilattice(s);
558false
559gap> IsBand(s);
560true
561
562# PropertiesTest46
563gap> gens := [Transformation([5, 6, 7, 3, 1, 4, 2, 8]),
564>   Transformation([3, 6, 8, 5, 7, 4, 2, 8])];
565[ Transformation( [ 5, 6, 7, 3, 1, 4, 2 ] ),
566  Transformation( [ 3, 6, 8, 5, 7, 4, 2, 8 ] ) ]
567gap> s := Semigroup(Idempotents(Monoid(gens)));;
568gap> Size(s);
56994
570gap> IsSemilattice(s);
571true
572
573# PropertiesTest47
574gap> s := FullTransformationSemigroup(3);;
575gap> j := 0;;
576gap> for f in s do
577> for g in s do
578> if IsSynchronizingSemigroup(Semigroup(f, g), 3) then j := j + 1; fi;
579> od;
580> od;
581gap> j;
582549
583
584# PropertiesTest48
585gap> gens := [Transformation([4, 6, 5, 2, 1, 3]),
586>   Transformation([6, 3, 2, 5, 4, 1]),
587>   Transformation([1, 2, 4, 3, 5, 6]),
588>   Transformation([3, 5, 6, 1, 2, 3]),
589>   Transformation([5, 3, 6, 6, 6, 2]),
590>   Transformation([2, 3, 2, 6, 4, 6]),
591>   Transformation([2, 1, 2, 2, 2, 4]),
592>   Transformation([4, 4, 1, 2, 1, 2])];;
593gap> s := Semigroup(gens);;
594gap> g := Range(IsomorphismPermGroup(GroupOfUnits(s)));;
595gap> IsZeroGroup(Range(InjectionZeroMagma(g)));
596true
597gap> IsZeroGroup(s);
598false
599
600# PropertiesTest49
601gap> gens := List(Tuples([1, 2], 4), x ->
602> TransformationNC(Concatenation([1, 1], x)));;
603gap> s := Semigroup(gens);;
604gap> IsZeroSemigroup(s);
605true
606
607# PropertiesTest50
608gap> gens := [Transformation([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10]),
609>  Transformation([3, 6, 9, 1, 4, 7, 2, 5, 8, 10, 10]),
610>  Transformation([3, 6, 9, 7, 1, 4, 5, 8, 2, 10, 10]),
611>  Transformation([8, 2, 5, 5, 4, 5, 5, 2, 8, 10, 10]),
612>  Transformation([4, 4, 8, 4, 4, 2, 4, 4, 5, 10, 10])];;
613gap> s := Semigroup(gens);;
614gap> MultiplicativeNeutralElement(s);
615Transformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 10 ] )
616
617# PropertiesTest51
618gap> [Transformation([3, 6, 9, 1, 4, 7, 2, 5, 8]),
619>   Transformation([3, 6, 9, 7, 1, 4, 5, 8, 2]),
620>   Transformation([8, 2, 5, 5, 4, 5, 5, 2, 8]),
621>   Transformation([4, 4, 8, 4, 4, 2, 4, 4, 5]),
622>   Transformation([7, 5, 5, 7, 3, 7, 5, 5, 3]),
623>   Transformation([7, 3, 3, 3, 3, 7, 5, 3, 3]),
624>   Transformation([3, 5, 3, 3, 3, 3, 7, 7, 5]),
625>   Transformation([3, 7, 3, 3, 5, 5, 7, 7, 7]),
626>   Transformation([3, 3, 3, 7, 5, 5, 7, 5, 7]),
627>   Transformation([3, 5, 5, 3, 7, 3, 7, 5, 7]),
628>   Transformation([3, 3, 3, 5, 5, 3, 7, 5, 5]),
629>   Transformation([5, 5, 7, 5, 7, 3, 5, 3, 7]),
630>   Transformation([3, 5, 5, 3, 7, 3, 3, 5, 3]),
631>   Transformation([7, 3, 7, 7, 7, 3, 3, 5, 7]),
632>   Transformation([5, 3, 7, 3, 7, 5, 3, 5, 3]),
633>   Transformation([5, 5, 7, 5, 7, 3, 7, 7, 5])];;
634gap> s := Semigroup(last);;
635gap> MultiplicativeNeutralElement(s);
636IdentityTransformation
637
638# PropertiesTest52: Checking E-unitary
639gap> [PartialPerm([1, 2, 3, 4], [3, 1, 2, 5]),
640>  PartialPerm([1, 2, 3, 4], [3, 2, 1, 4])];;
641gap> s := InverseSemigroup(last);;
642gap> IsEUnitaryInverseSemigroup(s);
643true
644gap> [PartialPerm([1, 2, 3, 4, 5], [1, 2, 5, 6, 3]),
645>  PartialPerm([1, 2, 3, 4, 5], [3, 2, 1, 6, 5])];;
646gap> s := InverseSemigroup(last);;
647gap> IsEUnitaryInverseSemigroup(s);
648true
649gap> [PartialPerm([1, 2, 3, 4, 7], [2, 4, 6, 5, 7]),
650>  PartialPerm([1, 2, 3, 4, 5, 6, 7], [6, 4, 7, 2, 3, 1, 8]),
651>  PartialPerm([1, 2, 4, 5, 6, 7], [8, 6, 3, 5, 4, 1]),
652>  PartialPerm([1, 2, 4, 5, 8], [1, 3, 8, 6, 2])];;
653gap> s := InverseSemigroup(last);;
654gap> IsEUnitaryInverseSemigroup(s);
655false
656
657# PropertiesTest53
658
659#gap> gens := [ Transformation( [ 2, 8, 3, 7, 1, 5, 2, 6 ] ),
660#>   Transformation( [ 3, 5, 7, 2, 5, 6, 3, 8 ] ),
661#>   Transformation( [ 4, 1, 8, 3, 5, 7, 3, 5 ] ),
662#>   Transformation( [ 4, 3, 4, 5, 6, 4, 1, 2 ] ),
663#>   Transformation( [ 5, 4, 8, 8, 5, 6, 1, 5 ] ),
664#>   Transformation( [ 6, 7, 4, 1, 4, 1, 6, 2 ] ),
665#>   Transformation( [ 7, 1, 2, 2, 2, 7, 4, 5 ] ),
666#>   Transformation( [ 8, 8, 5, 1, 7, 5, 2, 8 ] ) ];;
667#gap> s:=Semigroup(gens);;
668##gap> IsAbundantSemigroup(s);
669##false
670#
671##
672#gap> gens := [ Transformation( [ 2, 6, 7, 2, 6, 1, 1, 5 ] ),
673#>   Transformation( [ 3, 8, 1, 4, 5, 6, 7, 1 ] ),
674#>   Transformation( [ 4, 3, 2, 7, 7, 6, 6, 5 ] ),
675#>   Transformation( [ 7, 1, 7, 4, 2, 5, 6, 3 ] ) ];;
676#gap> s:=Monoid(gens);;
677##gap> IsAbundantSemigroup(s);
678##false
679#
680##
681#gap> gens := [ Transformation( [ 2, 8, 3, 7, 1, 5, 2, 6 ] ),
682#>   Transformation( [ 3, 5, 7, 2, 5, 6, 3, 8 ] ),
683#>   Transformation( [ 6, 7, 4, 1, 4, 1, 6, 2 ] ),
684#>   Transformation( [ 8, 8, 5, 1, 7, 5, 2, 8 ] ) ];;
685#gap> s:=Semigroup(gens);;
686##gap> IsAbundantSemigroup(s);
687##false
688#
689##
690#gap> gens := [ Transformation( [ 3, 4, 1, 2, 1 ] ),
691#>   Transformation( [ 4, 2, 1, 5, 5 ] ),
692#>   Transformation( [ 4, 2, 2, 2, 4 ] ) ];;
693#gap> s:=Semigroup(gens);;
694#gap> IsAbundantSemigroup(s);
695#true
696#
697##
698#gap> gens := [ Transformation( [ 1, 3, 4, 1 ] ),
699#> Transformation( [ 2, 4, 1, 2 ] ),
700#> Transformation( [ 3, 1, 1, 3 ] ),
701#> Transformation( [ 3, 3, 4, 1 ] ) ];;
702#gap> s:=Monoid(gens);;
703#gap> IsAbundantSemigroup(s);
704#false
705#
706##
707#gap> gens := [ Transformation( [ 1, 3, 2, 3 ] ),
708#>  Transformation( [ 1, 4, 1, 2 ] ),
709#>  Transformation( [ 2, 4, 1, 1 ] ),
710#>  Transformation( [ 3, 4, 2, 2 ] ) ];;
711#gap> s:=Semigroup(gens);;
712#gap> IsAbundantSemigroup(s);
713#true
714#gap> IsRegularSemigroup(s);
715#false
716#
717##
718#gap> gens := [ Transformation( [ 1, 3, 2, 3 ] ),
719#>  Transformation( [ 1, 4, 1, 2 ] ),
720#>  Transformation( [ 3, 4, 2, 2 ] ),
721#>  Transformation( [ 4, 1, 2, 1 ] ) ];;
722#gap> s:=Monoid(gens);;
723#gap> IsAbundantSemigroup(s);
724#true
725#gap> IsRegularSemigroup(s);
726#false
727#
728##
729#gap> gens := [Transformation([2,1,4,5,3,7,8,9,10,6]),
730#> Transformation([1,2,4,3,5,6,7,8,9,10]),
731#> Transformation([1,2,3,4,5,6,10,9,8,7]),
732#> Transformation([9,1,4,3,6,9,3,4,3,9])];;
733#gap> s:=Monoid(gens);;
734#gap> IsAbundantSemigroup(s);
735#true
736#gap> IsRegularSemigroup(s);
737#false
738#
739##
740#gap> gens := [Transformation( [ 1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10 ] ),
741#> Transformation( [ 2, 4, 4, 2, 10, 5, 11, 11, 11, 6, 7 ] )];;
742#gap> s:=Monoid(gens);;
743#gap> IsAdequateSemigroup(s);
744#false
745#gap> gens := [Transformation([2,1,4,5,3,7,8,9,10,6]),
746#> Transformation([1,2,4,3,5,6,7,8,9,10]),
747#> Transformation([1,2,3,4,5,6,10,9,8,7]),
748#> Transformation([9,1,4,3,6,9,3,4,3,9])];;
749#gap> s:=Monoid(gens);;
750#gap> IsAdequateSemigroup(s);
751#false
752#
753# This is still part of PropertiesTest53
754gap> s := Semigroup(
755> [Transformation([1, 2, 3, 2]), Transformation([1, 2, 3, 3]),
756>  Transformation([1, 2, 3, 4, 5, 7, 6]), Transformation([1, 2, 4, 3]),
757>  Transformation([1, 2, 8, 3, 5, 6, 7, 8]),
758>  Transformation([1, 6, 8, 8, 5, 7, 2, 8]),
759>  Transformation([3, 8, 8, 8, 6, 2, 6, 7]),
760>  Transformation([5, 2, 3, 4, 1]),
761>  Transformation([6, 2, 3, 4, 7, 6, 7]),
762>  Transformation([8, 8, 3, 4, 6, 7, 6, 2])]);;
763gap> t := IdempotentGeneratedSubsemigroup(s);;
764gap> Size(t);
765105
766
767# PropertiesTest54
768
769#gap> gens := [ [ [ 2 ], [ 1 ], [ 4 ], [ 2 ], [ 3, 4 ] ],
770#>  [ [ 2, 3 ], [ 1, 2, 3, 4 ], [ 1 ], [ 1, 2, 4 ], [ 5 ] ],
771#>  [ [ 3 ], [ 1, 4 ], [ 1, 2, 3 ], [ 1, 3, 4 ], [ 2, 4, 5 ] ] ];;
772#gap> s:=Semigroup(List(gens, BinaryRelationOnPoints));;
773#gap> SetIsBinaryRelationSemigroup(s, true);;
774#gap> Size(s);
775#180
776#gap> iso:=IsomorphismTransformationSemigroup(s);;
777#gap> inv:=InverseGeneralMapping(iso);; t:=Range(iso);;
778#gap> ForAll(s, x-> (x^iso)^inv=x);
779#true
780#gap> ForAll(t, x-> (x^inv)^iso=x);
781#true
782#gap> RespectsMultiplication(iso);
783#true
784#gap> Size(t);
785#180
786#
787#
788gap> S := Semigroup(Transformation([4, 2, 3, 3, 4]));;
789gap> IsCongruenceFreeSemigroup(S);
790true
791gap> S := Semigroup(
792>  Transformation([2, 2, 4, 4]),
793>  Transformation([5, 3, 4, 4, 6, 6]));;
794gap> IsCongruenceFreeSemigroup(S);
795false
796
797# PropertiesTest55: IsSynchronizingSemigroup
798# for <IdentityTransformation>
799gap> t := Transformation([1]);;
800gap> s := Semigroup(t);
801<trivial transformation group of degree 0 with 1 generator>
802gap> IsSynchronizingSemigroup(s, 2);
803false
804gap> IsSynchronizingSemigroup(s, 1);
805true
806gap> IsSynchronizingSemigroup(s);
807false
808
809# PropertiesTest56: IsZeroSemigroup
810gap> t := Transformation([1]);;
811
812# For a trivial transformation semigroup
813gap> s := Semigroup(t);
814<trivial transformation group of degree 0 with 1 generator>
815gap> IsZeroSemigroup(s);
816true
817
818# For a non-trivial zero semigroup of transformations & an ideal
819gap> t := Transformation([1, 1, 2]);;
820gap> s := Semigroup(t);
821<commutative transformation semigroup of degree 3 with 1 generator>
822gap> I := SemigroupIdeal(s, t ^ 2);;
823gap> HasIsZeroSemigroup(s);
824false
825gap> IsZeroSemigroup(I);  # parent does not know it is zero
826true
827gap> HasIsZeroSemigroup(s);
828false
829gap> IsZeroSemigroup(s);
830true
831gap> I := SemigroupIdeal(s, t);;  # parent does know it is zero
832gap> IsZeroSemigroup(I);
833true
834gap> I := SemigroupIdeal(s, t);;  # parent does know it is zero.
835gap> GeneratorsOfSemigroup(I);;   # ideal now can use normal method
836gap> IsZeroSemigroup(I);
837true
838
839# For a non-trivial transformation group (semigroup without a zero)
840gap> t := Transformation([2, 1]);;
841gap> s := Semigroup(t);
842<commutative transformation semigroup of degree 2 with 1 generator>
843gap> IsZeroSemigroup(s);
844false
845gap> I := SemigroupIdeal(s, Transformation([1, 2]));
846<commutative inverse transformation semigroup ideal of degree 2 with
847  1 generator>
848gap> IsZeroSemigroup(I);  # parent knows that it is not zero
849false
850
851# For a zero-group as a transformation semigroup
852gap> s := Semigroup([
853> Transformation([1, 3, 2, 3]),
854> Transformation([1, 1, 1, 1])]);  # s is a 0-simple semigroup
855<transformation semigroup of degree 4 with 2 generators>
856gap> IsZeroSemigroup(s);
857false
858gap> IsZeroSimpleSemigroup(s);
859true
860
861# For a non-trivial inverse semigroup of partial perms (semigroup with a zero)
862gap> s := InverseSemigroup([
863> PartialPerm([1, 2], [3, 1]),
864> PartialPerm([1, 2, 3], [1, 3, 4])]);
865<inverse partial perm semigroup of rank 4 with 2 generators>
866gap> MultiplicativeZero(s);
867<empty partial perm>
868gap> IsZeroSemigroup(s);
869false
870gap> s := InverseSemigroup(MultiplicativeZero(s));;
871gap> IsZeroSemigroup(s);
872true
873
874# PropertiesTest57:
875# IsZeroSemigroup: for a non-acting semigroup
876# (Rees 0-matrix semigroup) and ideals
877gap> s := ReesZeroMatrixSemigroup(Group(()), [[0]]);
878<Rees 0-matrix semigroup 1x1 over Group(())>
879gap> t := First(s, x -> not x = MultiplicativeZero(s));
880(1,(),1)
881gap> I := SemigroupIdeal(s, t);
882<commutative Rees 0-matrix semigroup ideal with 1 generator>
883gap> IsZeroSemigroup(I);
884true
885gap> HasIsZeroSemigroup(s);
886false
887gap> IsZeroSemigroup(s);
888true
889gap> I := SemigroupIdeal(s, t);;
890gap> IsZeroSemigroup(I);
891true
892gap> s := ReesZeroMatrixSemigroup(Group(()), [[()]]);
893<Rees 0-matrix semigroup 1x1 over Group(())>
894gap> t := First(s, x -> not x = MultiplicativeZero(s));
895(1,(),1)
896gap> I := SemigroupIdeal(s, t);
897<regular Rees 0-matrix semigroup ideal with 1 generator>
898gap> IsZeroSemigroup(I);
899false
900gap> HasIsZeroSemigroup(s);
901false
902gap> IsZeroSemigroup(s);
903false
904gap> I := SemigroupIdeal(s, MultiplicativeZero(s));
905<regular Rees 0-matrix semigroup ideal with 1 generator>
906gap> IsZeroSemigroup(I);
907true
908
909# SEMIGROUPS_UnbindVariables
910gap> Unbind(I);
911gap> Unbind(S);
912gap> Unbind(d);
913gap> Unbind(f);
914gap> Unbind(g);
915gap> Unbind(gens);
916gap> Unbind(i);
917gap> Unbind(inv);
918gap> Unbind(iso);
919gap> Unbind(iter);
920gap> Unbind(j);
921gap> Unbind(rms);
922gap> Unbind(s);
923gap> Unbind(semis);
924gap> Unbind(t);
925
926#
927gap> SEMIGROUPS.StopTest();
928gap> STOP_TEST("Semigroups package: extreme/properties.tst");
929