Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/semigroups/tst/standard/greens/   (GAP Algebra Version 4.15.1©)  Datei vom 29.7.2025 mit Größe 56 kB image not shown  

Quelle  generic.tst   Sprache: unbekannt

 
Spracherkennung für: .tst vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

#############################################################################
##
#W  standard/greens/generic.tst
#Y  Copyright (C) 2016-2022                             James D. Mitchell
##
##  Licensing information can be found in the README file of this package.
##
#############################################################################
##

#@local D, DD, DDD, H, J, L, L3, LL, R, RR, RRR, S, S1, T, acting, an, gens, id
#@local iter, m1, m2, x, y
gap> START_TEST("Semigroups package: standard/greens/generic.tst");
gap> LoadPackage("semigroups", false);;

#
gap> SEMIGROUPS.StartTest();

# Test IsXTrivial (for Green's classes)
gap> S := Semigroup(
> [Matrix(GF(5), [[0 * Z(5), Z(5) ^ 3], [Z(5) ^ 2, Z(5) ^ 0]]),
>  Matrix(GF(5), [[Z(5) ^ 0, Z(5)], [Z(5), Z(5) ^ 3]]),
>  Matrix(GF(5), [[Z(5) ^ 0, Z(5) ^ 3], [0 * Z(5), 0 * Z(5)]]),
>  Matrix(GF(5), [[Z(5), Z(5) ^ 0], [0 * Z(5), Z(5) ^ 3]]),
>  Matrix(GF(5), [[Z(5), Z(5) ^ 0], [Z(5) ^ 0, Z(5)]]),
>  Matrix(GF(5), [[Z(5) ^ 20 * Z(5)], [Z(5), 0 * Z(5)]]),
>  Matrix(GF(5), [[Z(5) ^ 2, Z(5)], [0 * Z(5), 0 * Z(5)]])]);;
gap> D := GreensDClassOfElement(S,
> Matrix(GF(5), [[Z(5) ^ 3, Z(5) ^ 2], [Z(5) ^ 3, Z(5)]]));
<Green's D-class: <matrix object of dimensions 2x2 over GF(5)>>
gap> IsHTrivial(D);
false
gap> IsLTrivial(D);
false
gap> IsRTrivial(D);
false

# Test \= (for Green's relations)
gap> S := FullBooleanMatMonoid(3);;
gap> T := FullBooleanMatMonoid(2);;
gap> GreensRRelation(S) = GreensRRelation(T);
false
gap> GreensRRelation(S) = GreensLRelation(S);
false
gap> GreensLRelation(S) = GreensRRelation(S);
false
gap> GreensHRelation(S) = GreensRRelation(S);
false
gap> GreensDRelation(S) = GreensRRelation(S);
false
gap> GreensJRelation(S) = GreensRRelation(S);
false
gap> S := FreeInverseSemigroup(3);;
gap> GreensJRelation(S) = GreensRRelation(S);
false

# Test AsSSortedList, 1/1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> L := LClass(S, PartialPerm([17], [35]));;
gap> AsSet(L);
[ [1,3][2,5], [1,5][2,3], [2,3,5], [2,5](3), [1,3,5], [1,5](3), 
  <identity partial perm on [ 35 ]>, (3,5), [2,3](5), [2,5,3], [1,3](5), 
  [1,5,3], [7,5](3), [7,3,5], [1,3][7,5], [1,5][7,3] ]

# Test \< and \=, 1/1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> L := LClass(S, PartialPerm([17], [35]));;
gap> LL := LClass(S, S.1);;
gap> LL = L;
false
gap> L < L;
false
gap> L < LL;
true
gap> LL < L;
false
gap> D := DClass(L);;
gap> L = D;
false
gap> L < D;
false

# Test \< for H-classes Issue #198
gap> S := FullTropicalMinPlusMonoid(22);
<monoid of 2x2 tropical min-plus matrices with 6 generators>
gap> H := Set(GeneratorsOfSemigroup(S), x -> HClass(S, x));
[ <Green's H-class: Matrix(IsTropicalMinPlusMatrix, [[0, infinity], 
       [infinity, 0]], 2)>, 
  <Green's H-class: Matrix(IsTropicalMinPlusMatrix, [[infinity, 0], [00]], 2
       )>, 
  <Green's H-class: Matrix(IsTropicalMinPlusMatrix, [[infinity, 0], [01]], 2
       )>, 
  <Green's H-class: Matrix(IsTropicalMinPlusMatrix, [[infinity, 0], [02]], 2
       )>, 
  <Green's H-class: Matrix(IsTropicalMinPlusMatrix, [[infinity, 0], 
       [1, infinity]], 2)>, 
  <Green's H-class: Matrix(IsTropicalMinPlusMatrix, [[infinity, 0], 
       [infinity, infinity]], 2)> ]

# Test \< for H-classes Issue #198
gap> gens := [
>  Transformation([1341555]),
>  Transformation([1413555]),
>  Transformation([3312555]),
>  Transformation([4423555]),
>  Transformation([1134556]),
>  Transformation([122]),
>  Transformation([1434]),
>  Transformation([1244])];;
gap> S := Semigroup(gens);
<transformation semigroup of degree 7 with 8 generators>
gap> D := DClass(S, gens[1]);;
gap> ForAll(gens{[1 .. 4]}, x -> x in D);
true
gap>  NrRClasses(D);
6
gap> R := List(gens{[1 .. 3]}, x -> RClass(S, x));;
gap> IsDuplicateFreeList(R);
true
gap> x := Difference(RClasses(D), R);;
gap> Length(x);
3

# Test MultiplicativeNeutralElement, One, for an H-class, 1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> H := HClass(S, S.4);;
gap> MultiplicativeNeutralElement(H);
fail
gap> OneImmutable(H);
<identity partial perm on [ 1234567 ]>
gap> H := HClass(S, PartialPerm([35], [35]));;
gap> MultiplicativeNeutralElement(H);
<identity partial perm on [ 35 ]>
gap> OneImmutable(H);
<identity partial perm on [ 35 ]>

# Test MultiplicativeNeutralElement, One, for an H-class, 2
gap> S := Semigroup([
> Transformation([11324]),
> Transformation([15525]),
> Transformation([41355])]);;
gap> H := HClass(S, S.1);;
gap> MultiplicativeNeutralElement(H);
fail
gap> OneImmutable(H);
IdentityTransformation
gap> H := HClass(S, Transformation([11]));;
gap> MultiplicativeNeutralElement(H);
Transformation( [ 11 ] )
gap> OneImmutable(H);
Transformation( [ 11 ] )

# Test StructureDescription, for an H-class, 1/1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> H := HClass(S, PartialPerm([35], [35]));;
gap> StructureDescription(H);
"C2"
gap> H := HClass(S, S.4);;
gap> StructureDescription(H);
fail

# Test DClassOfLClass, 1/1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> L := LClass(S, PartialPerm([17], [35]));;
gap> Size(L);
16
gap> D := DClass(L);;
gap> Size(D);
128
gap> DD := DClassOfLClass(L);;
gap> DD = D;
true
gap> DDD := DClass(S, Representative(L));;
gap> DDD = DD;
true

# Test DClassOfRClass, 1/1
gap> S := Semigroup([Transformation([221244]),
>  Transformation([266514]), Transformation([325564]),
>  Transformation([35341]), Transformation([423142]),
>  Transformation([442663]), Transformation([555654]),
>  Transformation([631316])]);;
gap> R := RClass(S, Transformation([445444]));;
gap> Size(R);
30
gap> D := DClass(R);;
gap> Size(D);
930
gap> DD := DClassOfRClass(R);;
gap> DD = D;
true
gap> DDD := DClass(S, Representative(R));;
gap> DDD = DD;
true

# Test DClassOfHClass, 1/1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> H := HClass(S, S.4);;
gap> Size(H);
1
gap> D := DClass(H);;
gap> Size(D);
1
gap> DD := DClassOfHClass(H);;
gap> DD = D;
true
gap> DDD := DClass(S, Representative(H));;
gap> DDD = DD;
true

# Test LClassOfHClass, 1/1
gap> S := Monoid(
> [Bipartition([[12345, -1], [6, -5], [-2, -3, -4], [-6]]),
>   Bipartition([[1235, -3, -4, -5], [46, -2], [-1, -6]]),
>   Bipartition([[12, -5, -6], [356, -1, -4], [4, -2, -3]]),
>   Bipartition([[13, -3], [256, -2], [4, -1, -4, -5], [-6]]),
>   Bipartition([[13, -1, -6], [26, -2], [4, -3, -5], [5], [-4]]),
>   Bipartition([[1, -3], [2345, -1, -4], [6, -2, -6], [-5]]),
>   Bipartition([[15, -5, -6], [23, -1, -2, -4], [46, -3]]),
>   Bipartition([[146, -1, -2, -4], [25, -5, -6], [3], [-3]]),
>   Bipartition([[15, -1, -3], [246], [3, -2, -6], [-4, -5]]),
>   Bipartition([[15, -2], [2, -1, -5], [34, -6], [6, -3], [-4]])]);;
gap> H := HClass(S, S.1 * S.5 * S.8);;
gap> Size(H);
1
gap> L := LClass(H);;
gap> Size(L);
26
gap> LL := LClassOfHClass(H);;
gap> LL = L;
true
gap> L3 := LClass(S, Representative(H));;
gap> L3 = LL;
true

# Test RClassOfHClass, 1/1
gap> S := ReesZeroMatrixSemigroup(SymmetricGroup(3), [
> [(), 0000000000000000000000],
> [0, (), 000000000000000000000],
> [00, (), 0, (13), 000000000000000000],
> [000, (), (13), 000000000000000000],
> [00, (13), (23), (), 00000000000000000,
>  0],
> [00000, (), 00000000000000000],
> [000000, (), (23), 000000000000000],
> [000000, (132), (), 00000000000000,
>  0],
> [00000000, (), 00000000000000],
> [000000000, (), (13), 000000000000],
> [0000000000, (), 000000000000],
> [00000000000, (), 0, (12), 000000000],
> [000000000000, (), 0000000000],
> [00000000000, (13), (), (), 000000000],
> [00000000000000, (), (12), 0000000],
> [000000000000000, (), 0000000],
> [0000000000000000, (), 000000],
> [00000000000000000, (), (123), (132),
>  000],
> [000000000000000000, (), 0000],
> [0000000000000000000, (), 000],
> [00000000000000000000, (), (13), 0],
> [000000000000000000000, (), 0],
> [0000000000000000000000, ()]]);;
gap> S := Semigroup(S);
<subsemigroup of 23x23 Rees 0-matrix semigroup with 46 generators>
gap> Size(S);
3175
gap> H := HClass(S, S.1);;
gap> Size(H);
6
gap> R := RClass(H);;
gap> Size(R);
138
gap> RR := RClassOfHClass(H);;
gap> RR = R;
true
gap> RRR := RClass(S, Representative(H));;
gap> RRR = RR;
true

# Test GreensDClassOfElement, fail, 1/1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])], rec(acting := false));;
gap> GreensDClassOfElement(S, PartialPerm([19]));
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)

# Test GreensDClassOfElementNC, 1/1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])], rec(acting := false));;
gap> D := GreensDClassOfElementNC(S, PartialPerm([19]));;
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)

# Test GreensJClassOfElement, 1/1
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])], rec(acting := false));;
gap> J := GreensJClassOfElement(S, S.2);
<Green's D-class: [6,4,7,1,2,5](3)>

# Test GreensL/RClassOfElement, fail, 1/1
gap> S := Semigroup([Transformation([221244]),
>  Transformation([266514]), Transformation([325564]),
>  Transformation([35341]), Transformation([423142]),
>  Transformation([442663]), Transformation([555654]),
>  Transformation([631316])], rec(acting := false));;
gap> RClass(S, ConstantTransformation(77));
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)
gap> LClass(S, ConstantTransformation(77));
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)
gap> HClass(S, ConstantTransformation(77));
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)

# Test GreensL/RClassOfElementNC, 1/1
gap> S := Semigroup([Transformation([221244]),
>  Transformation([266514]), Transformation([325564]),
>  Transformation([35341]), Transformation([423142]),
>  Transformation([442663]), Transformation([555654]),
>  Transformation([631316])], rec(acting := false));;
gap> R := RClassNC(S, S.1);
<Green's R-class: Transformation( [ 221244 ] )>
gap> Size(R);
120
gap> L := LClassNC(S, S.1);
<Green's L-class: Transformation( [ 221244 ] )>
gap> Size(L);
396
gap> H := HClassNC(S, S.1);
<Green's H-class: Transformation( [ 221244 ] )>
gap> Size(H);
6

# Test GreensL/RClassOfElement, for a D-class, 1/1
gap> S := Monoid(
> [Bipartition([[12345, -1], [6, -5], [-2, -3, -4], [-6]]),
>   Bipartition([[1235, -3, -4, -5], [46, -2], [-1, -6]]),
>   Bipartition([[12, -5, -6], [356, -1, -4], [4, -2, -3]]),
>   Bipartition([[13, -3], [256, -2], [4, -1, -4, -5], [-6]]),
>   Bipartition([[13, -1, -6], [26, -2], [4, -3, -5], [5], [-4]]),
>   Bipartition([[1, -3], [2345, -1, -4], [6, -2, -6], [-5]]),
>   Bipartition([[15, -5, -6], [23, -1, -2, -4], [46, -3]]),
>   Bipartition([[146, -1, -2, -4], [25, -5, -6], [3], [-3]]),
>   Bipartition([[15, -1, -3], [246], [3, -2, -6], [-4, -5]]),
>   Bipartition([[15, -2], [2, -1, -5], [34, -6], [6, -3], [-4]])],
> rec(acting := false));;
gap> D := DClass(S, S.4 * S.5);;
gap> Size(D);
12
gap> x := Bipartition([[134, -2], [256, -1, -6],
> [-3, -5], [-4]]);;
gap> R := RClass(D, x);;
gap> Size(R);
12
gap> L := LClass(D, x);;
gap> Size(L);
1
gap> LClass(D, IdentityBipartition(8));
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)
gap> RClass(D, IdentityBipartition(8));
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)
gap> x := Bipartition([[14, -1, -2, -6], [235, -4],
> [6, -3], [-5]]);;
gap> LClassNC(D, x);
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)
gap> RClassNC(D, x);
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)

# Test GreensHClassOfElement, 1/1
gap> S := ReesZeroMatrixSemigroup(SymmetricGroup(3), [
> [(), 0000000000000000000000],
> [0, (), 000000000000000000000],
> [00, (), 0, (13), 000000000000000000],
> [000, (), (13), 000000000000000000],
> [00, (13), (23), (), 00000000000000000,
>  0],
> [00000, (), 00000000000000000],
> [000000, (), (23), 000000000000000],
> [000000, (132), (), 00000000000000,
>  0],
> [00000000, (), 00000000000000],
> [000000000, (), (13), 000000000000],
> [0000000000, (), 000000000000],
> [00000000000, (), 0, (12), 000000000],
> [000000000000, (), 0000000000],
> [00000000000, (13), (), (), 000000000],
> [00000000000000, (), (12), 0000000],
> [000000000000000, (), 0000000],
> [0000000000000000, (), 000000],
> [00000000000000000, (), (123), (132),
>  000],
> [000000000000000000, (), 0000],
> [0000000000000000000, (), 000],
> [00000000000000000000, (), (13), 0],
> [000000000000000000000, (), 0],
> [0000000000000000000000, ()]]);;
gap> S := Semigroup(S, rec(acting := false));;
gap> D := DClass(S, S.4 * S.5);;
gap> H := HClass(D, MultiplicativeZero(S));
<Green's H-class: 0>
gap> H := HClassNC(D, MultiplicativeZero(S));
<Green's H-class: 0>
gap> H := HClass(D, IdentityTransformation);
Error, the 2nd argument (a mult. elt.) does not belong to the source of the 1s\
t argument (a Green's relation)

# Test GreensHClassOfElement(L/R-class, x), 1/1
gap> S := Semigroup([Transformation([221244]),
>  Transformation([266514]), Transformation([325564]),
>  Transformation([35341]), Transformation([423142]),
>  Transformation([442663]), Transformation([555654]),
>  Transformation([631316])], rec(acting := false));;
gap> R := RClass(S, S.3 * S.1 * S.8);;
gap> Size(R);
30
gap> Size(HClass(R, S.3 * S.1 * S.8));
2
gap> L := LClass(S, S.3 * S.1 * S.8);;
gap> Size(L);
62
gap> Size(HClass(L, S.3 * S.1 * S.8));
2

# Test \in, for D-class, 1/4
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> D := DClass(S, S.1);;
gap> ForAll(D, x -> x in D);
true
gap> Size(D);
1
gap> Number(S, x -> x in D);
1

# Test \in, for D-class, 2/4
gap> S := OrderEndomorphisms(5);;
gap> x := Transformation([12245]);;
gap> D := DClass(S, x);;
gap> x in D;
true
gap> Transformation([12145]) in D;
false

# Test \in, for D-class, 3/4
gap> S := ReesZeroMatrixSemigroup(Group([(12)]), [[000, ()], [
> (), 000], [(), (), 00], [0, (), (), 0], [00, (), ()]]);;
gap> S := Semigroup(S);;
gap> D := DClass(S, S.1);;
gap> Size(S);
41
gap> Size(D) = Size(S) - 1;
true
gap> ForAll(D, x -> x in D);
true

# Test \in, for D-class, 4/4
gap> x := Transformation([234155]);;
gap> S := Semigroup(x);
<commutative transformation semigroup of degree 6 with 1 generator>
gap> y := Transformation([213455]);;
gap> D := DClass(S, x);;
gap> y in D;
false

# Test \in, for L-class, 1/5
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> L := LClass(S, S.1);;
gap> ForAll(L, x -> x in L);
true
gap> Size(L);
1
gap> Number(S, x -> x in L);
1

# Test \in, for L-class, 2/5
gap> S := OrderEndomorphisms(5);;
gap> x := Transformation([12245]);;
gap> L := LClass(S, x);;
gap> x in L;
true
gap> Transformation([12145]) in L;
false

# Test \in, for L-class, 3/5
gap> S := ReesZeroMatrixSemigroup(Group([(12)]),
> [[000, ()],
>  [(), 000],
>  [(), (), 00],
>  [0, (), (), 0],
>  [00, (), ()]]);;
gap> S := Semigroup(S);;
gap> L := LClass(S, S.1);;
gap> Size(S);
41
gap> ForAll(L, x -> x in L);
true

# Test \in, for L-class, 4/5
gap> x := Transformation([234155]);;
gap> S := Semigroup(x);
<commutative transformation semigroup of degree 6 with 1 generator>
gap> y := Transformation([213455]);;
gap> L := LClass(S, x);;
gap> y in L;
false

# Test \in, for L-class, 5/5
gap> x := Transformation([113455]);;
gap> S := Semigroup(x);;
gap> y := Transformation([114355]);;
gap> L := LClass(S, x);;
gap> y in L;
false

# Test \in, for R-class, 1/6
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> R := LClass(S, S.1);;
gap> ForAll(R, x -> x in R);
true
gap> Size(R);
1
gap> Number(S, x -> x in R);
1

# Test \in, for R-class, 2/6
gap> x := Transformation([113455]);;
gap> S := Semigroup(x);;
gap> y := Transformation([114355]);;
gap> R := RClass(S, x);;
gap> y in R;
false

# Test \in, for R-class, 3/6
gap> x := Transformation([113455]);;
gap> S := Semigroup(x);;
gap> y := Transformation([113355]);;
gap> R := RClass(S, x);;
gap> y in R;
false

# Test \in, for R-class, 4/6
gap> x := Transformation([113455]);;
gap> S := Semigroup(x);;
gap> y := Transformation([112355]);;
gap> R := RClass(S, x);;
gap> y in R;
false

# Test \in, for R-class, 5/6
gap> S := OrderEndomorphisms(5);;
gap> x := Transformation([12245]);;
gap> R := RClass(S, x);;
gap> x in R;
true
gap> Transformation([12145]) in R;
false

# Test \in, for R-class, 6/6
gap> x := Transformation([234155]);;
gap> S := Semigroup(x);
<commutative transformation semigroup of degree 6 with 1 generator>
gap> y := Transformation([213455]);;
gap> R := RClass(S, x);;
gap> y in R;
false

# Test \in, for H-class, 1/3
gap> x := Transformation([234155]);;
gap> S := Semigroup(x);
<commutative transformation semigroup of degree 6 with 1 generator>
gap> y := Transformation([213455]);;
gap> H := HClass(S, x);;
gap> y in H;
false

# Test \in, for H-class, 2/3
gap> x := Transformation([113455]);;
gap> S := Semigroup(x);;
gap> y := Transformation([112355]);;
gap> H := HClass(S, x);;
gap> y in H;
false

# Test \in, for H-class, 3/3
gap> x := Transformation([113455]);;
gap> S := Semigroup(x);;
gap> H := HClass(S, x);;
gap> ForAll(H, x -> x in H);
true

# Test R-classes/reps, 1/1
gap> S := OrderEndomorphisms(5);;
gap> S := Semigroup(S, rec(acting := false));
<transformation monoid of degree 5 with 5 generators>
gap> RClasses(S);
[ <Green's R-class: Transformation( [ 11111 ] )>, 
  <Green's R-class: Transformation( [ 11112 ] )>, 
  <Green's R-class: Transformation( [ 11133 ] )>, 
  <Green's R-class: Transformation( [ 11123 ] )>, 
  <Green's R-class: Transformation( [ 11333 ] )>, 
  <Green's R-class: Transformation( [ 11334 ] )>, 
  <Green's R-class: Transformation( [ 11244 ] )>, 
  <Green's R-class: Transformation( [ 11234 ] )>, 
  <Green's R-class: Transformation( [ 13333 ] )>, 
  <Green's R-class: Transformation( [ 13334 ] )>, 
  <Green's R-class: Transformation( [ 12244 ] )>, 
  <Green's R-class: Transformation( [ 133 ] )>, 
  <Green's R-class: Transformation( [ 12444 ] )>, 
  <Green's R-class: Transformation( [ 1244 ] )>, 
  <Green's R-class: Transformation( [ 12355 ] )>, 
  <Green's R-class: IdentityTransformation> ]
gap> RClassReps(S);
[ Transformation( [ 11111 ] ), Transformation( [ 11112 ] ), 
  Transformation( [ 11133 ] ), Transformation( [ 11123 ] ), 
  Transformation( [ 11333 ] ), Transformation( [ 11334 ] ), 
  Transformation( [ 11244 ] ), Transformation( [ 11234 ] ), 
  Transformation( [ 13333 ] ), Transformation( [ 13334 ] ), 
  Transformation( [ 12244 ] ), Transformation( [ 133 ] ), 
  Transformation( [ 12444 ] ), Transformation( [ 1244 ] ), 
  Transformation( [ 12355 ] ), IdentityTransformation ]

# Test R-reps, 1/1
gap> S := OrderEndomorphisms(5);;
gap> S := Semigroup(S, rec(acting := false));;
gap> D := DClass(S, S.2 * S.1);
<Green's D-class: Transformation( [ 11234 ] )>
gap> RClassReps(D);
[ Transformation( [ 11234 ] ), Transformation( [ 12234 ] ), 
  Transformation( [ 12334 ] ), Transformation( [ 12344 ] ) ]
gap> LClassReps(D);
[ Transformation( [ 11234 ] ), Transformation( [ 12355 ] ), 
  Transformation( [ 1244 ] ), Transformation( [ 133 ] ), 
  Transformation( [ 22 ] ) ]

# Test H-classes/reps, 1/3
gap> S := Monoid(
> [Transformation([2222222224]),
>  Transformation([2222222424]),
>  Transformation([2222222442]),
>  Transformation([2222222444]),
>  Transformation([2222224422]),
>  Transformation([2222224442]),
>  Transformation([2222242224]),
>  Transformation([2222242244]),
>  Transformation([2222244242]),
>  Transformation([2224222422]),
>  Transformation([2224227424]),
>  Transformation([2234247294]),
>  Transformation([2234262292]),
>  Transformation([2234267224]),
>  Transformation([2234267294]),
>  Transformation([2242222224]),
>  Transformation([2242222422]),
>  Transformation([2242222424]),
>  Transformation([2242224422]),
>  Transformation([2294247224]),
>  Transformation([3222222942]),
>  Transformation([3222222944]),
>  Transformation([3222224942]),
>  Transformation([4222222322]),
>  Transformation([4222222324]),
>  Transformation([4222224322]),
>  Transformation([4242222322]),
>  Transformation([4242222324]),
>  Transformation([4242224322]),
>  Transformation([5555555555])],
>  rec(acting := false));;
gap> HClassReps(S);
[ Transformation( [ 5555555555 ] ), 
  Transformation( [ 2222222222 ] ), 
  Transformation( [ 2222222224 ] ), 
  Transformation( [ 2222222424 ] ), 
  Transformation( [ 2222222442 ] ), 
  Transformation( [ 2222222444 ] ), 
  Transformation( [ 2222224422 ] ), 
  Transformation( [ 2222224442 ] ), 
  Transformation( [ 2222242224 ] ), 
  Transformation( [ 2222242244 ] ), 
  Transformation( [ 2222244242 ] ), 
  Transformation( [ 2224222422 ] ), 
  Transformation( [ 2222224222 ] ), 
  Transformation( [ 2224222424 ] ), 
  Transformation( [ 2224227424 ] ), 
  Transformation( [ 2222222242 ] ), 
  Transformation( [ 2222224242 ] ), 
  Transformation( [ 2224242224 ] ), 
  Transformation( [ 2224247224 ] ), 
  Transformation( [ 2242222222 ] ), 
  Transformation( [ 2294242224 ] ), 
  Transformation( [ 2234242224 ] ), 
  Transformation( [ 2234242294 ] ), 
  Transformation( [ 2242224222 ] ), 
  Transformation( [ 2294247224 ] ), 
  Transformation( [ 2234247224 ] ), 
  Transformation( [ 2234247294 ] ), 
  Transformation( [ 2222242222 ] ), 
  Transformation( [ 2222242242 ] ), 
  Transformation( [ 2224222222 ] ), 
  Transformation( [ 2224242222 ] ), 
  Transformation( [ 2294242222 ] ), 
  Transformation( [ 2234242222 ] ), 
  Transformation( [ 2234242292 ] ), 
  Transformation( [ 2234262222 ] ), 
  Transformation( [ 2234262292 ] ), 
  Transformation( [ 2222244222 ] ), 
  Transformation( [ 2224222224 ] ), 
  Transformation( [ 2224227224 ] ), 
  Transformation( [ 2234262224 ] ), 
  Transformation( [ 2234267224 ] ), 
  Transformation( [ 2234262294 ] ), 
  Transformation( [ 2234267294 ] ), 
  Transformation( [ 2242222224 ] ), 
  Transformation( [ 2242222422 ] ), 
  Transformation( [ 2242222424 ] ), 
  Transformation( [ 2242224422 ] ), 
  Transformation( [ 2222222422 ] ), 
  Transformation( [ 4222222222 ] ), 
  Transformation( [ 9222222242 ] ), 
  Transformation( [ 3222222242 ] ), 
  Transformation( [ 3222222942 ] ), 
  Transformation( [ 2222222244 ] ), 
  Transformation( [ 9222222244 ] ), 
  Transformation( [ 3222222244 ] ), 
  Transformation( [ 3222222944 ] ), 
  Transformation( [ 9222224242 ] ), 
  Transformation( [ 3222224242 ] ), 
  Transformation( [ 3222224942 ] ), 
  Transformation( [ 4222222922 ] ), 
  Transformation( [ 4222222322 ] ), 
  Transformation( [ 4222222224 ] ), 
  Transformation( [ 4222222924 ] ), 
  Transformation( [ 4222222324 ] ), 
  Transformation( [ 4222224222 ] ), 
  Transformation( [ 4222224922 ] ), 
  Transformation( [ 4222224322 ] ), 
  Transformation( [ 4242222222 ] ), 
  Transformation( [ 4242222922 ] ), 
  Transformation( [ 4242222322 ] ), 
  Transformation( [ 4242222224 ] ), 
  Transformation( [ 4242222924 ] ), 
  Transformation( [ 4242222324 ] ), 
  Transformation( [ 4242224222 ] ), 
  Transformation( [ 4242224922 ] ), 
  Transformation( [ 4242224322 ] ), IdentityTransformation ]
gap> HClasses(S);
[ <Green's H-class: Transformation( [ 5555555555 ] )>, 
  <Green's H-class: Transformation( [ 2222222222 ] )>, 
  <Green's H-class: Transformation( [ 2222222224 ] )>, 
  <Green's H-class: Transformation( [ 2222222424 ] )>, 
  <Green's H-class: Transformation( [ 2222222442 ] )>, 
  <Green's H-class: Transformation( [ 2222222444 ] )>, 
  <Green's H-class: Transformation( [ 2222224422 ] )>, 
  <Green's H-class: Transformation( [ 2222224442 ] )>, 
  <Green's H-class: Transformation( [ 2222242224 ] )>, 
  <Green's H-class: Transformation( [ 2222242244 ] )>, 
  <Green's H-class: Transformation( [ 2222244242 ] )>, 
  <Green's H-class: Transformation( [ 2224222422 ] )>, 
  <Green's H-class: Transformation( [ 2222224222 ] )>, 
  <Green's H-class: Transformation( [ 2224222424 ] )>, 
  <Green's H-class: Transformation( [ 2224227424 ] )>, 
  <Green's H-class: Transformation( [ 2222222242 ] )>, 
  <Green's H-class: Transformation( [ 2222224242 ] )>, 
  <Green's H-class: Transformation( [ 2224242224 ] )>, 
  <Green's H-class: Transformation( [ 2224247224 ] )>, 
  <Green's H-class: Transformation( [ 2242222222 ] )>, 
  <Green's H-class: Transformation( [ 2294242224 ] )>, 
  <Green's H-class: Transformation( [ 2234242224 ] )>, 
  <Green's H-class: Transformation( [ 2234242294 ] )>, 
  <Green's H-class: Transformation( [ 2242224222 ] )>, 
  <Green's H-class: Transformation( [ 2294247224 ] )>, 
  <Green's H-class: Transformation( [ 2234247224 ] )>, 
  <Green's H-class: Transformation( [ 2234247294 ] )>, 
  <Green's H-class: Transformation( [ 2222242222 ] )>, 
  <Green's H-class: Transformation( [ 2222242242 ] )>, 
  <Green's H-class: Transformation( [ 2224222222 ] )>, 
  <Green's H-class: Transformation( [ 2224242222 ] )>, 
  <Green's H-class: Transformation( [ 2294242222 ] )>, 
  <Green's H-class: Transformation( [ 2234242222 ] )>, 
  <Green's H-class: Transformation( [ 2234242292 ] )>, 
  <Green's H-class: Transformation( [ 2234262222 ] )>, 
  <Green's H-class: Transformation( [ 2234262292 ] )>, 
  <Green's H-class: Transformation( [ 2222244222 ] )>, 
  <Green's H-class: Transformation( [ 2224222224 ] )>, 
  <Green's H-class: Transformation( [ 2224227224 ] )>, 
  <Green's H-class: Transformation( [ 2234262224 ] )>, 
  <Green's H-class: Transformation( [ 2234267224 ] )>, 
  <Green's H-class: Transformation( [ 2234262294 ] )>, 
  <Green's H-class: Transformation( [ 2234267294 ] )>, 
  <Green's H-class: Transformation( [ 2242222224 ] )>, 
  <Green's H-class: Transformation( [ 2242222422 ] )>, 
  <Green's H-class: Transformation( [ 2242222424 ] )>, 
  <Green's H-class: Transformation( [ 2242224422 ] )>, 
  <Green's H-class: Transformation( [ 2222222422 ] )>, 
  <Green's H-class: Transformation( [ 4222222222 ] )>, 
  <Green's H-class: Transformation( [ 9222222242 ] )>, 
  <Green's H-class: Transformation( [ 3222222242 ] )>, 
  <Green's H-class: Transformation( [ 3222222942 ] )>, 
  <Green's H-class: Transformation( [ 2222222244 ] )>, 
  <Green's H-class: Transformation( [ 9222222244 ] )>, 
  <Green's H-class: Transformation( [ 3222222244 ] )>, 
  <Green's H-class: Transformation( [ 3222222944 ] )>, 
  <Green's H-class: Transformation( [ 9222224242 ] )>, 
  <Green's H-class: Transformation( [ 3222224242 ] )>, 
  <Green's H-class: Transformation( [ 3222224942 ] )>, 
  <Green's H-class: Transformation( [ 4222222922 ] )>, 
  <Green's H-class: Transformation( [ 4222222322 ] )>, 
  <Green's H-class: Transformation( [ 4222222224 ] )>, 
  <Green's H-class: Transformation( [ 4222222924 ] )>, 
  <Green's H-class: Transformation( [ 4222222324 ] )>, 
  <Green's H-class: Transformation( [ 4222224222 ] )>, 
  <Green's H-class: Transformation( [ 4222224922 ] )>, 
  <Green's H-class: Transformation( [ 4222224322 ] )>, 
  <Green's H-class: Transformation( [ 4242222222 ] )>, 
  <Green's H-class: Transformation( [ 4242222922 ] )>, 
  <Green's H-class: Transformation( [ 4242222322 ] )>, 
  <Green's H-class: Transformation( [ 4242222224 ] )>, 
  <Green's H-class: Transformation( [ 4242222924 ] )>, 
  <Green's H-class: Transformation( [ 4242222324 ] )>, 
  <Green's H-class: Transformation( [ 4242224222 ] )>, 
  <Green's H-class: Transformation( [ 4242224922 ] )>, 
  <Green's H-class: Transformation( [ 4242224322 ] )>, 
  <Green's H-class: IdentityTransformation> ]
gap> D := DClass(S, S.1);;
gap> HClassReps(D);
[ Transformation( [ 2222222224 ] ) ]
gap> HClasses(D);
[ <Green's H-class: Transformation( [ 2222222224 ] )> ]
gap> L := LClass(S, S.1);;
gap> HClassReps(L);
[ Transformation( [ 2222222224 ] ) ]
gap> HClasses(L);
[ <Green's H-class: Transformation( [ 2222222224 ] )> ]

# Test H-classes/reps, 2/3
gap> S := Semigroup(FullTransformationMonoid(5), rec(acting := false));;
gap> x := Transformation([11234]);;
gap> L := LClass(S, x);;
gap> GreensHClasses(L);
[ <Green's H-class: Transformation( [ 21342 ] )>, 
  <Green's H-class: Transformation( [ 13422 ] )>, 
  <Green's H-class: Transformation( [ 34221 ] )>, 
  <Green's H-class: Transformation( [ 42213 ] )>, 
  <Green's H-class: Transformation( [ 22134 ] )>, 
  <Green's H-class: Transformation( [ 24213 ] )>, 
  <Green's H-class: Transformation( [ 42132 ] )>, 
  <Green's H-class: Transformation( [ 21324 ] )>, 
  <Green's H-class: Transformation( [ 13242 ] )>, 
  <Green's H-class: Transformation( [ 32421 ] )> ]

# Test NrXClasses, 1/1
gap> S := Semigroup(SymmetricInverseMonoid(5));;
gap> NrRClasses(S);
32
gap> NrDClasses(S);
6
gap> NrLClasses(S);
32
gap> NrHClasses(S);
252

# Test NrXClasses for a D-class, 1/1
gap> S := Semigroup(SymmetricInverseMonoid(5));;
gap> D := DClass(S, S.2);;
gap> NrRClasses(D);
1
gap> NrLClasses(D);
1
gap> R := RClass(S, S.2);;
gap> NrHClasses(R);
1
gap> L := LClass(S, S.2);;
gap> NrHClasses(L);
1

# Test GreensXClasses, for an infinite semigroup, 1/1
gap> S := FreeSemigroup(2);;
gap> GreensLClasses(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `CayleyGraphDualSemigroup' on 1 argument\
s
gap> GreensRClasses(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `CayleyGraphSemigroup' on 1 arguments
gap> GreensHClasses(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `CayleyGraphDualSemigroup' on 1 argument\
s
gap> GreensDClasses(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `CayleyGraphDualSemigroup' on 1 argument\
s

# Test GreensHClasses, fail, 1/1
gap> S := Semigroup(SymmetricInverseMonoid(3));;
gap> H := HClass(S, S.2);;
gap> GreensHClasses(H);
Error, the argument is not a Green's R-, L-, or D-class

# Test PartialOrderOfDClasses, 1/2
gap> S := AsSemigroup(IsTransformationSemigroup, FullBooleanMatMonoid(3));;
gap> S := Semigroup(S, rec(acting := false));;
gap> PartialOrderOfDClasses(S);
<immutable digraph with 11 vertices, 25 edges>

# Test Idempotents, 1/?
gap> S := AsSemigroup(IsTransformationSemigroup, FullPBRMonoid(1));;
gap> S := Semigroup(S, rec(acting := false));;
gap> Idempotents(S);
[ Transformation( [ 18611618138661381313 ] ), 
  Transformation( [ 123210678910 ] ), 
  Transformation( [ 69333661399361313913 ] ), 
  IdentityTransformation, Transformation( [ 71011551271415,
      10111216141516 ] ), 
  Transformation( [ 613666661313136613131313 ] )
    , Transformation( [ 714127712714161412121614,
      1616 ] ), Transformation( [ 186886181386613,
      81313 ] ), Transformation( [ 6939966139936,
      1313913 ] ), Transformation( [ 7101110101271415,
      10111216141516 ] ), 
  Transformation( [ 1215111111121216151511121616,
      1516 ] ), Transformation( [ 12161212121212161616,
      121216161616 ] ), 
  Transformation( [ 613613136613131366131313,
      13 ] ), Transformation( [ 7141214141271416141212,
      16141616 ] ), Transformation( [ 1215111515121216,
      1515111216161516 ] ), 
  Transformation( [ 1216121616121216161612121616,
      1616 ] ) ]

# Test Idempotents, 2/2
gap> S := Semigroup(FullTransformationMonoid(3),
> rec(acting := false));;
gap> RClasses(S);;
gap> Idempotents(S);
[ IdentityTransformation, Transformation( [ 121 ] ), 
  Transformation( [ 122 ] ), Transformation( [ 323 ] ), 
  Transformation( [ 22 ] ), Transformation( [ 133 ] ), 
  Transformation( [ 111 ] ), Transformation( [ 11 ] ), 
  Transformation( [ 222 ] ), Transformation( [ 333 ] ) ]

# Test Idempotents, for a D-class, 1/2
gap> S := Semigroup([Transformation([234515678])]);;
gap> D := DClass(S, S.1);
<Green's D-class: Transformation( [ 234515678 ] )>
gap> IsRegularDClass(D);
false
gap> Idempotents(D);
[  ]
gap> S := Semigroup([Transformation([234515678])]);;
gap> D := DClass(S, S.1);
<Green's D-class: Transformation( [ 234515678 ] )>
gap> Idempotents(S);;
gap> Idempotents(D);
[  ]

# Test Idempotents, for a D-class, 2/2
gap> S := Semigroup([Transformation([234515678])]);;
gap> D := DClass(S, S.1);
<Green's D-class: Transformation( [ 234515678 ] )>
gap> Idempotents(D);
[  ]

# Test Idempotents, for a L-class, 1/3
gap> S := Semigroup(FullTransformationMonoid(5), rec(acting := false));;
gap> x := Transformation([11234]);;
gap> L := LClass(S, x);;
gap> Idempotents(L);
[ Transformation( [ 12342 ] ), Transformation( [ 12341 ] ), 
  Transformation( [ 12344 ] ), Transformation( [ 12343 ] ) ]

# Test Idempotents, for a L-class, 2/3
gap> S := AsSemigroup(IsTransformationSemigroup, FullBooleanMatMonoid(3));
<transformation monoid of degree 8 with 5 generators>
gap> L := LClass(S, Transformation([1112135]));;
gap> IsRegularGreensClass(L);
false
gap> Idempotents(L);
[  ]

# Test Idempotents, for a L-class, 3/3
gap> S := PartitionMonoid(3);;
gap> L := LClass(S, One(S));;
gap> Idempotents(L);
[ <block bijection: [ 1, -1 ], [ 2, -2 ], [ 3, -3 ]> ]

# Test Idempotents, for a H-class, 1/2
gap> S := SingularTransformationSemigroup(4);;
gap> H := HClass(S, S.1);
<Green's H-class: Transformation( [ 1233 ] )>
gap> Idempotents(H);
[ Transformation( [ 1233 ] ) ]

# Test Idempotents, for a H-class, 1/2
gap> S := AsSemigroup(IsTransformationSemigroup, FullBooleanMatMonoid(3));
<transformation monoid of degree 8 with 5 generators>
gap> H := HClass(S, Transformation([1112135]));;
gap> IsGroupHClass(H);
false
gap> Idempotents(H);
[  ]

# Test NrIdempotents, for a semigroup, 1/2
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> NrIdempotents(S);
24

# Test NrIdempotents, for a semigroup, 2/2
gap> S := Semigroup([PartialPerm([13456], [31576]),
>  PartialPerm([123467], [253741]),
>  PartialPerm([124567], [357162]),
>  PartialPerm([1247], [3765])]);;
gap> Idempotents(S);;
gap> NrIdempotents(S);
24

# Test NrIdempotents, for a D-class, 1/2
gap> S := Semigroup([Transformation([234515678])]);;
gap> D := DClass(S, S.1);
<Green's D-class: Transformation( [ 234515678 ] )>
gap> IsRegularDClass(D);
false
gap> NrIdempotents(D);
0

# Test NrIdempotents, for a D-class, 2/2
gap> S := Semigroup([Transformation([234515678])]);;
gap> D := DClass(S, S.1);
<Green's D-class: Transformation( [ 234515678 ] )>
gap> NrIdempotents(D);
0

# Test NrIdempotents, for a L-class, 1/3
gap> S := Semigroup(FullTransformationMonoid(5), rec(acting := false));;
gap> x := Transformation([11234]);;
gap> L := LClass(S, x);;
gap> NrIdempotents(L);
4

# Test NrIdempotents, for a L-class, 2/3
gap> S := AsSemigroup(IsTransformationSemigroup, FullBooleanMatMonoid(3));
<transformation monoid of degree 8 with 5 generators>
gap> L := LClass(S, Transformation([1112135]));;
gap> IsRegularGreensClass(L);
false
gap> NrIdempotents(L);
0

# Test NrIdempotents, for a L-class, 3/3
gap> S := PartitionMonoid(3);;
gap> L := LClass(S, One(S));;
gap> NrIdempotents(L);
1

# Test NrIdempotents, for a H-class, 1/2
gap> S := SingularTransformationSemigroup(4);;
gap> H := HClass(S, S.1);
<Green's H-class: Transformation( [ 1233 ] )>
gap> NrIdempotents(H);
1

# Test NrIdempotents, for a H-class, 1/2
gap> S := AsSemigroup(IsTransformationSemigroup, FullBooleanMatMonoid(3));
<transformation monoid of degree 8 with 5 generators>
gap> H := HClass(S, Transformation([1112135]));;
gap> IsGroupHClass(H);
false
gap> NrIdempotents(H);
0

# Test NrIdempotents, for an R-class, 1/2
gap> S := Semigroup(Transformation([2672699115]),
>                    Transformation([381994105106]));;
gap> R := First(RClasses(S),
> x -> Transformation([910491044336]) in x);;
gap> NrIdempotents(R);
0
gap> IsRegularGreensClass(R);
false

# Test NrIdempotents, for an R-class, 3/3
gap> S := Semigroup(Transformation([2672699115]),
>                    Transformation([381994105106]));;
gap> R := RClass(S, Transformation([6996911226]));;
gap> IsRegularGreensClass(R);
true
gap> NrIdempotents(R);
7

# Test IsRegularGreensClass, for an R-class, 1/1
gap> S := Semigroup(Transformation([2672699115]),
>                    Transformation([381994105106]));;
gap> R := First(RClasses(S),
> x -> Transformation([910491044336]) in x);;
gap> IsRegularGreensClass(R);
false

# Test IsRegularGreensClass, for an R-class in group of units, 1/1
gap> S := Monoid(Transformation([2672699115]),
>                 Transformation([381994105106]));;
gap> S := AsSemigroup(IsBipartitionSemigroup, S);;
gap> R := RClass(S, IdentityBipartition(10));;
gap> IsRegularGreensClass(R);
true

# Test NrRegularDClasses, 1/1
gap> S := Semigroup([Transformation([221244]),
>  Transformation([266514]), Transformation([325564]),
>  Transformation([35341]), Transformation([423142]),
>  Transformation([442663]), Transformation([555654]),
>  Transformation([631316])], rec(acting := false));;
gap> NrRegularDClasses(S);
6

# Test ViewString, PrintString, for Green's relations, 1/1
gap> S := FullTransformationMonoid(3);
<full transformation monoid of degree 3>
gap> GreensRRelation(S);
<Green's R-relation of <full transformation monoid of degree 3>>
gap> GreensLRelation(S);
<Green's L-relation of <full transformation monoid of degree 3>>
gap> GreensHRelation(S);
<Green's H-relation of <full transformation monoid of degree 3>>
gap> GreensDRelation(S);
<Green's D-relation of <full transformation monoid of degree 3>>
gap> GreensJRelation(S);
<Green's D-relation of <full transformation monoid of degree 3>>
gap> PrintString((GreensRRelation(S)));
"\>\>\>GreensRRelation\<(\>\nMonoid( \>[ Transformation( [ 231 ] ), Transf\
ormation( [ 21 ] ), Transformation( [ 121 ] ) ]\<\> )\<\<)\<\<"
gap> PrintString((GreensLRelation(S)));
"\>\>\>GreensLRelation\<(\>\nMonoid( \>[ Transformation( [ 231 ] ), Transf\
ormation( [ 21 ] ), Transformation( [ 121 ] ) ]\<\> )\<\<)\<\<"
gap> PrintString((GreensHRelation(S)));
"\>\>\>GreensHRelation\<(\>\nMonoid( \>[ Transformation( [ 231 ] ), Transf\
ormation( [ 21 ] ), Transformation( [ 121 ] ) ]\<\> )\<\<)\<\<"
gap> PrintString((GreensDRelation(S)));
"\>\>\>GreensDRelation\<(\>\nMonoid( \>[ Transformation( [ 231 ] ), Transf\
ormation( [ 21 ] ), Transformation( [ 121 ] ) ]\<\> )\<\<)\<\<"
gap> PrintObj(GreensDRelation(S)); "This string allows us to test PrintObj";
GreensDRelation(
   Monoid( 
   [ Transformation( [ 231 ] ), Transformation( [ 21 ] ), Transformation\
( [ 121 ] ) ] ))"This string allows us to test PrintObj"

# Test ViewString, PrintString, for Green's classes, 1/1
gap> S := FullBooleanMatMonoid(3);;
gap> PrintString(RClass(S, S.2));
"\>\>\>GreensRClassOfElement\<(\>Monoid( \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\
\>\>[010]\<, \<\>\>[100]\<, \<\>\>[001]\<\<]\<)\<\>\>\>Matrix(\<\>\
IsBooleanMat\<, \>[\>\>[010]\<, \<\>\>[001]\<, \<\>\>[100]\<\<]\<)\
\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\<, \<\>\>[010]\<, \
\<\>\>[101]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\
\<, \<\>\>[010]\<, \<\>\>[000]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBoolean\
Mat\<, \>[\>\>[110]\<, \<\>\>[101]\<, \<\>\>[011]\<\<]\<)\<\<\<\> \
)\<,\< \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[010]\<, \<\>\>[001]\<,\
 \<\>\>[100]\<\<]\<)\<\<)\<\<"
gap> PrintString(LClass(S, S.2));
"\>\>\>GreensLClassOfElement\<(\>Monoid( \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\
\>\>[010]\<, \<\>\>[100]\<, \<\>\>[001]\<\<]\<)\<\>\>\>Matrix(\<\>\
IsBooleanMat\<, \>[\>\>[010]\<, \<\>\>[001]\<, \<\>\>[100]\<\<]\<)\
\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\<, \<\>\>[010]\<, \
\<\>\>[101]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\
\<, \<\>\>[010]\<, \<\>\>[000]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBoolean\
Mat\<, \>[\>\>[110]\<, \<\>\>[101]\<, \<\>\>[011]\<\<]\<)\<\<\<\> \
)\<,\< \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[010]\<, \<\>\>[001]\<,\
 \<\>\>[100]\<\<]\<)\<\<)\<\<"
gap> PrintString(HClass(S, S.2));
"\>\>\>GreensHClassOfElement\<(\>Monoid( \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\
\>\>[010]\<, \<\>\>[100]\<, \<\>\>[001]\<\<]\<)\<\>\>\>Matrix(\<\>\
IsBooleanMat\<, \>[\>\>[010]\<, \<\>\>[001]\<, \<\>\>[100]\<\<]\<)\
\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\<, \<\>\>[010]\<, \
\<\>\>[101]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\
\<, \<\>\>[010]\<, \<\>\>[000]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBoolean\
Mat\<, \>[\>\>[110]\<, \<\>\>[101]\<, \<\>\>[011]\<\<]\<)\<\<\<\> \
)\<,\< \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[010]\<, \<\>\>[001]\<,\
 \<\>\>[100]\<\<]\<)\<\<)\<\<"
gap> PrintString(DClass(S, S.2));
"\>\>\>GreensDClassOfElement\<(\>Monoid( \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\
\>\>[010]\<, \<\>\>[100]\<, \<\>\>[001]\<\<]\<)\<\>\>\>Matrix(\<\>\
IsBooleanMat\<, \>[\>\>[010]\<, \<\>\>[001]\<, \<\>\>[100]\<\<]\<)\
\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\<, \<\>\>[010]\<, \
\<\>\>[101]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[100]\
\<, \<\>\>[010]\<, \<\>\>[000]\<\<]\<)\<\<, \>\>\>Matrix(\<\>IsBoolean\
Mat\<, \>[\>\>[110]\<, \<\>\>[101]\<, \<\>\>[011]\<\<]\<)\<\<\<\> \
)\<,\< \>\>\>Matrix(\<\>IsBooleanMat\<, \>[\>\>[010]\<, \<\>\>[001]\<,\
 \<\>\>[100]\<\<]\<)\<\<)\<\<"
gap> PrintObj(DClass(S, S.2)); "This string allows us to test PrintObj";
GreensDClassOfElement(
  Monoid( Matrix(IsBooleanMat, [[010], [100], [001]])
    Matrix(IsBooleanMat, [[010], [001], [100]]), 
    Matrix(IsBooleanMat, [[100], [010], [101]]), 
    Matrix(IsBooleanMat, [[100], [010], [000]]), 
    Matrix(IsBooleanMat, [[110], [101], [011]]) ), 
  Matrix(IsBooleanMat, [[010], [001], [100]]))
 "This string allows us to test PrintObj"

# Test IsomorphismPermGroup (for an H-class)
gap> S := RegularBooleanMatMonoid(3);
<monoid of 3x3 boolean matrices with 4 generators>
gap> S := AsSemigroup(IsIntegerMatrixSemigroup, S);
<semigroup of 8x8 integer matrices with 5 generators>
gap> D := DClass(S, S.2);;
gap> IsRegularDClass(D);
true
gap> H := GroupHClass(D);;
gap> x := IsomorphismPermGroup(H);;
gap> Source(x) = H;
true
gap> Range(x);
Group([ (1,2)(3,5)(4,6), (1,3,6)(2,4,5) ])
gap> Representative(H) ^ x;
()
gap> y := InverseGeneralMapping(x);;
gap> () ^ y;
<immutable 8x8-matrix over Integers>
gap> () ^ y = Representative(H);
true
gap> Matrix(Integers, [[00, -1, -1331, -1], 
>                             [1, -102750, -1],
>                             [-34020, -100], 
>                             [40001220], 
>                             [-220, -10003],
>                             [020, -1, -2, -212], 
>                             [000, -2, -300, -1], 
>                             [00200012]]) ^ x;
Error, the argument does not belong to the domain of the function
gap> (110) ^ y;
Error, the argument does not belong to the domain of the function
gap> H := HClass(S, Matrix(Integers, 
> [[10000000], 
>  [10000000], 
>  [01000000],
>  [00000100], 
>  [10000000], 
>  [00100000],
>  [01000000], 
>  [00000001]]));;
gap> IsomorphismPermGroup(H);
Error, the argument (a Green's H-class) is not a group

# Test GreensRClassOfElement for infinite semigroup
gap> S := FreeInverseSemigroup(2);;
gap> GreensRClassOfElement(S, S.1);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `GreensRClassOfElement' on 2 arguments
gap> GreensLClassOfElement(S, S.1);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `GreensLClassOfElement' on 2 arguments
gap> GreensHClassOfElement(S, S.1);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `GreensHClassOfElement' on 2 arguments
gap> GreensDClassOfElement(S, S.1);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `GreensDClassOfElement' on 2 arguments

# Test NrL/RClasses for a D-class
gap> S := Semigroup(FullTransformationMonoid(4), rec(acting := false));;
gap> D := DClass(S, S.3);;
gap> NrLClasses(D);
4
gap> NrRClasses(D);
6

# Test NrXClasses for a non-CanUseFroidurePin semigroup
gap> S := Semigroup(SEMIGROUPS.UniversalFakeOne);;
gap> CanUseFroidurePin(S);
false
gap> NrDClasses(S);
1
gap> NrLClasses(S);
1
gap> NrRClasses(S);
1
gap> NrHClasses(S);
1

# Test NrXClassReps for a non-CanUseFroidurePin semigroup
gap> S := Semigroup(SEMIGROUPS.UniversalFakeOne);;
gap> CanUseFroidurePin(S);
false
gap> DClassReps(S);
[ <universal fake one> ]
gap> RClassReps(S);
[ <universal fake one> ]
gap> LClassReps(S);
[ <universal fake one> ]
gap> HClassReps(S);
[ <universal fake one> ]

# Test NrXClassReps for a D-class of a non-CanUseFroidurePin semigroup
gap> S := Semigroup(SEMIGROUPS.UniversalFakeOne);;
gap> CanUseFroidurePin(S);
false
gap> D := DClasses(S)[1];;
gap> RClassReps(D);
[ <universal fake one> ]
gap> LClassReps(D);
[ <universal fake one> ]
gap> HClassReps(D);
[ <universal fake one> ]
gap> NrIdempotents(D);
1
gap> Idempotents(D);
[ <universal fake one> ]

# Test IteratorOfXClasses for a non-CanUseFroidurePin semigroup
gap> S := Semigroup(SEMIGROUPS.UniversalFakeOne);;
gap> CanUseFroidurePin(S);
false
gap> IsFinite(S);
true
gap> iter := IteratorOfDClasses(S);
<iterator>
gap> IsDoneIterator(iter);
false
gap> NextIterator(iter);
<Green's D-class: <object>>
gap> IsDoneIterator(iter);
true
gap> iter := IteratorOfRClasses(S);
<iterator>
gap> IsDoneIterator(iter);
false
gap> NextIterator(iter);
<Green's R-class: <object>>
gap> IsDoneIterator(iter);
true

# Test GreensXClassOfElementNC for a non-CanUseFroidurePin semigroup
gap> S := Semigroup(SEMIGROUPS.UniversalFakeOne);;
gap> IsFinite(S);
true
gap> CanUseFroidurePin(S);
false
gap> GreensRClassOfElementNC(S, S.1);
<Green's R-class: <object>>
gap> GreensLClassOfElementNC(S, S.1);
<Green's L-class: <object>>
gap> GreensDClassOfElementNC(S, S.1);
<Green's D-class: <object>>
gap> GreensHClassOfElementNC(S, S.1);
<Green's H-class: <object>>

# Test XClassOfYClass for a non-CanUseFroidurePin semigroup
gap> S := Semigroup(SEMIGROUPS.UniversalFakeOne);;
gap> IsFinite(S);
true
gap> DClassOfRClass(GreensRClassOfElementNC(S, S.1));
<Green's D-class: <object>>
gap> DClassOfLClass(GreensLClassOfElementNC(S, S.1));
<Green's D-class: <object>>
gap> DClassOfHClass(GreensHClassOfElementNC(S, S.1));
<Green's D-class: <object>>
gap> RClassOfHClass(GreensHClassOfElementNC(S, S.1));
<Green's R-class: <object>>
gap> LClassOfHClass(GreensHClassOfElementNC(S, S.1));
<Green's L-class: <object>>

# Test PartialOrderOfDClasses for a finite non-CanUseFroidurePin,
# non-acting semigroup
gap> S := SemigroupByMultiplicationTable([[11111], 
>                                         [11111], 
>                                         [11112], 
>                                         [11211], 
>                                         [11121]]);;
gap> IsActingSemigroup(S);
false
gap> CanUseFroidurePin(S);
true
gap> PartialOrderOfDClasses(S);
<immutable digraph with 5 vertices, 7 edges>

# Test PartialOrderOfDClasses for a finite non-CanUseFroidurePin,
# non-acting semigroup
gap> D := Digraph([[23], [2], []]);;
gap> S1 := FullTransformationMonoid(2);;
gap> id := IdentityMapping(S1);;
gap> m1 := SemigroupHomomorphismByFunction(S1, S1, x -> Transformation([11]));;
gap> m2 := SemigroupHomomorphismByFunction(S1, S1, x -> Transformation([22]));;
gap> L := [S1, S1, S1];;
gap> H := [[m1, m2], [id], []];;
gap> S := StrongSemilatticeOfSemigroups(D, L, H);
<strong semilattice of 3 semigroups>
gap> IsFinite(S);
true
gap> IsActingSemigroup(S);
false
gap> CanUseFroidurePin(S);
false
gap> PartialOrderOfDClasses(S);
<immutable digraph with 6 vertices, 7 edges>


gap> SEMIGROUPS.StopTest();
gap> STOP_TEST("Semigroups package: standard/greens/generic.tst");

[Dauer der Verarbeitung: 0.40 Sekunden, vorverarbeitet 2026-06-17]