Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

SSL attr.tst   Interaktion und
Portierbarkeitunbekannt

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

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

#@local D, F, G, GR, I, L, R, S, T, acting, an, coll, digraph, foo, gens, inj
#@local inv, iso, map, n, r, s, t, x, y, z
gap> START_TEST("Semigroups package: standard/attributes/attr.tst");
gap> LoadPackage("semigroups", false);;

#
gap> SEMIGROUPS.StartTest();

# AttributesTest1: MultiplicativeZero
# for a transformation semigroup/ideal
gap> t := Transformation([1]);;

# Trivial full transformation monoid T_1
# Previously this crashed: see issue #121 on Bitbucket
gap> s := Semigroup(t);  # with displaying the semigroup
<trivial transformation group of degree 0 with 1 generator>
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true
gap> s := Semigroup(t);;  # not displaying the semigroup
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true
gap> s := FullTransformationMonoid(1);;
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true

# Trivial transformation monoid with different rep.
gap> t := Transformation([2233]);;
gap> s := Semigroup(t);  # with displaying the semigroup
<commutative transformation semigroup of degree 4 with 1 generator>
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true
gap> s := Semigroup(t);;  # not displaying the semigroup
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true

# Issue #121 on Bitbucket (n x 1 rectangular band)
gap> s := Semigroup(Transformation([121]),
>                   Transformation([122]));;
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false
gap> ForAny(s, x -> IsMultiplicativeZero(s, x));
false

# Other transformation semigroups
gap> s := Semigroup(FullTransformationMonoid(10), rec(acting := true));
<transformation monoid of degree 10 with 3 generators>
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false

# Transformation semigroup ideal
gap> s := Semigroup([
> Transformation([2341]),
> Transformation([2134]),
> Transformation([3113])]);
<transformation semigroup of degree 4 with 3 generators>
gap> t := Transformation([1111]);;
gap> I := SemigroupIdeal(s, t);;
gap> HasMultiplicativeZero(s);
false
gap> MultiplicativeZero(I);  # does not know whether parent has a zero
fail
gap> Size(MinimalIdeal(I)) = 1;
false
gap> HasMultiplicativeZero(s);
true
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false
gap> I := SemigroupIdeal(s, t);;
gap> MultiplicativeZero(I);  # does know whether parent has a zero
fail
gap> Size(MinimalIdeal(I)) = 1;
false

# AttributesTest2:
# MultiplicativeZero for a partial perm semigroup/ideal
gap> t := PartialPerm([], []);;

# For S = { <empty mapping> }
gap> s := Semigroup(t);;
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true
gap> s := SymmetricInverseMonoid(1);
<symmetric inverse monoid of degree 1>
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true

# For other trivial partial perm semigroups
gap> t := PartialPerm([24], [24]);;
gap> s := Semigroup(t);;
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true

# For a non-trivial partial perm semigroup
gap> s := Semigroup([PartialPerm([2], [1])]);  # contains < empty pperm >
<commutative partial perm semigroup of rank 1 with 1 generator>
gap> MultiplicativeZero(s);
<empty partial perm>
gap> Size(MinimalIdeal(s)) = 1;
true
gap> s := Semigroup([
> PartialPerm([123], [142]),
> PartialPerm([14], [13])]);  # does not contain <empty pperm>
<partial perm semigroup of rank 4 with 2 generators>
gap> MultiplicativeZero(s);
<identity partial perm on [ 1 ]>
gap> Size(MinimalIdeal(s)) = 1;
true
gap> s := InverseSemigroup([
> PartialPerm([123], [341]),
> PartialPerm([12345], [35124])]);
<inverse partial perm semigroup of rank 5 with 2 generators>
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false

# For a partial perm semigroup ideal
gap> s := Semigroup([
> PartialPerm([1234], [2341]),
> PartialPerm([1234], [2134]),
> PartialPerm([13], [23])]);
<partial perm semigroup of rank 4 with 3 generators>
gap> t := PartialPerm([], []);;
gap> I := SemigroupIdeal(s, t);;
gap> HasMultiplicativeZero(s);
false
gap> MultiplicativeZero(I) = t;  # does not know whether parent has a zero
true
gap> Size(MinimalIdeal(I)) = 1;
true
gap> HasMultiplicativeZero(s);
true
gap> MultiplicativeZero(s) = t;
true
gap> Size(MinimalIdeal(s)) = 1;
true
gap> I := SemigroupIdeal(s, t);;
gap> MultiplicativeZero(I) = t;  # does know whether parent has a zero
true
gap> Size(MinimalIdeal(I)) = 1;
true

# AttributesTest3:
# MultiplicativeZero for a bipartition semigroup/ideal
gap> s := PartitionMonoid(1);
<commutative bipartition monoid of degree 1 with 1 generator>
gap> MultiplicativeZero(s);
<bipartition: [ 1 ], [ -1 ]>
gap> Size(MinimalIdeal(s)) = 1;
true
gap> s := PartitionMonoid(2);
<regular bipartition *-monoid of size 15, degree 2 with 3 generators>
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false
gap> s := PartitionMonoid(3);
<regular bipartition *-monoid of size 203, degree 3 with 4 generators>
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false
gap> s := Semigroup([
> Bipartition([[12345, -2], [-1], [-3], [-4], [-5]]),
> Bipartition([[135, -1], [24, -2], [-3], [-4], [-5]])]);
<bipartition semigroup of degree 5 with 2 generators>
gap> MultiplicativeZero(s);
<bipartition: [ 12345, -2 ], [ -1 ], [ -3 ], [ -4 ], [ -5 ]>
gap> Size(MinimalIdeal(s)) = 1;
true

# Ideals
gap> s := PartitionMonoid(3);;
gap> t := Bipartition([[1, -2], [2], [3, -3], [-1]]);;
gap> I := SemigroupIdeal(s, t);
<regular bipartition *-semigroup ideal of degree 3 with 1 generator>
gap> HasMultiplicativeZero(s);
false
gap> MultiplicativeZero(I);
fail
gap> Size(MinimalIdeal(I)) = 1;
false
gap> HasMultiplicativeZero(s);
true
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false
gap> I := SemigroupIdeal(s, t);;
gap> MultiplicativeZero(I);
fail
gap> Size(MinimalIdeal(I)) = 1;
false
gap> t := Bipartition([[1], [-1]]);;
gap> s := Semigroup([t, Bipartition([[1, -1]])]);;
gap> I := SemigroupIdeal(s, t);;
gap> HasMultiplicativeZero(s);
false
gap> MultiplicativeZero(I);
<bipartition: [ 1 ], [ -1 ]>
gap> Size(MinimalIdeal(I)) = 1;
true
gap> HasMultiplicativeZero(s);
true
gap> MultiplicativeZero(s);
<bipartition: [ 1 ], [ -1 ]>
gap> Size(MinimalIdeal(s)) = 1;
true
gap> I := SemigroupIdeal(s, t);;
gap> MultiplicativeZero(I);
<bipartition: [ 1 ], [ -1 ]>
gap> Size(MinimalIdeal(I)) = 1;
true

# AttributesTest4:
# MultiplicativeZero for a block bijection inverse semigroup/ideal
gap> S := AsSemigroup(IsBlockBijectionSemigroup, SymmetricInverseMonoid(1));
<commutative inverse block bijection monoid of degree 2 with 1 generator>
gap> MultiplicativeZero(S);
<block bijection: [ 12, -1, -2 ]>
gap> Size(MinimalIdeal(S)) = 1;
true
gap> S := AsSemigroup(IsBlockBijectionSemigroup, SymmetricInverseMonoid(4));
<inverse block bijection monoid of degree 5 with 3 generators>
gap> MultiplicativeZero(S);
<block bijection: [ 12345, -1, -2, -3, -4, -5 ]>
gap> Size(MinimalIdeal(S)) = 1;
true
gap> s := InverseSemigroup([
> Bipartition([[1, -3], [2, -4], [3, -1], [456, -2, -5, -6]]),
> Bipartition([[1, -3], [2, -5], [3, -1], [4, -2], [5, -4],
> [6, -6]])]);
<inverse block bijection semigroup of degree 6 with 2 generators>
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false

# Test MultiplicativeZero (for an infinite semigroup)
#gap> S := Semigroup([Matrix(IsMaxPlusMatrix, [[-220], [-100], [1, -31]]),
#>  Matrix(IsMaxPlusMatrix, [[- infinity, 00], [010], [1, -10]])]);;
#gap> MultiplicativeZero(S); 
# FIXME(later) Enters an infinite loop in a library method because S is not finite

# Ideals
gap> s := InverseSemigroup([
> Bipartition([[1, -1], [26, -4, -6], [3, -5], [4, -2],
>  [5, -3]]),
> Bipartition([[1, -5], [2, -4], [3, -3], [4, -2], [5, -1],
>  [6, -6]])]);
<inverse block bijection semigroup of degree 6 with 2 generators>
gap> t := Bipartition(
> [[1, -1], [2, -2], [3, -3], [46, -4, -6], [5, -5]]);;
gap> I := SemigroupIdeal(s, t);
<inverse bipartition semigroup ideal of degree 6 with 1 generator>
gap> HasMultiplicativeZero(s);
false
gap> MultiplicativeZero(I);
fail
gap> Size(MinimalIdeal(I)) = 1;
false
gap> HasMultiplicativeZero(s);
true
gap> MultiplicativeZero(s);
fail
gap> Size(MinimalIdeal(s)) = 1;
false
gap> I := SemigroupIdeal(s, t);;
gap> MultiplicativeZero(I);
fail
gap> Size(MinimalIdeal(I)) = 1;
false

# AttributesTest5:
# MultiplicativeZero where MinimalDClass is known
gap> s := Semigroup(FullTransformationMonoid(10), rec(acting := true));
<transformation monoid of degree 10 with 3 generators>
gap> MinimalDClass(s);;
gap> HasSize(last);
false
gap> MultiplicativeZero(s);
fail
gap> s := Semigroup(s, rec(acting := true));;
gap> HasMinimalDClass(s);
false
gap> Size(MinimalDClass(s));
10
gap> HasMinimalDClass(s) and HasSize(MinimalDClass(s));
true
gap> MultiplicativeZero(s);
fail
gap> gens := [
> Transformation([113114111231111415213]),
> Transformation([31114411131353111414101512]),
> Transformation([513114913812126121181])];;
gap> s := Semigroup(gens);
<transformation semigroup of degree 15 with 3 generators>
gap> HasMinimalDClass(s);
false
gap> MultiplicativeZero(s);
Transformation( [ 444444444444444 ] )
gap> s := Semigroup(gens, rec(acting := true));;
gap> MinimalDClass(s);
<Green's D-class: Transformation( [ 44444444444444,
   4 ] )>
gap> HasSize(MinimalDClass(s));
false
gap> MultiplicativeZero(s);
Transformation( [ 444444444444444 ] )
gap> s := Semigroup(gens, rec(acting := true));;
gap> Size(MinimalDClass(s));
1
gap> MultiplicativeZero(s);
Transformation( [ 444444444444444 ] )

# attr: RightCayleyDigraph
gap> S := Semigroup(PartialPerm([123], [134]),
>                   PartialPerm([123], [253]),
>                   PartialPerm([123], [412]),
>                   PartialPerm([1234], [2415]),
>                   PartialPerm([135], [513]));;
gap> digraph := RightCayleyDigraph(S);;
gap> Length(DigraphStronglyConnectedComponents(digraph).comps) 
> = NrRClasses(S);
true

# attr: RightCayleyDigraph, infinite
gap> RightCayleyDigraph(FreeSemigroup(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `RightCayleyDigraph' on 1 arguments

# attr: LeftCayleyDigraph
gap> S := Monoid(BooleanMat([[11111], [10100],
>                              [11010], [11111],
>                              [11000]]),
>                BooleanMat([[00100], [10110],
>                              [10111], [01110],
>                              [01110]]),
>                BooleanMat([[00011], [00110],
>                              [00110], [11010],
>                              [10101]]),
>                BooleanMat([[01110], [00010],
>                              [11101], [10100],
>                              [10110]]),
>                BooleanMat([[10001], [10001],
>                              [00001], [01101],
>                              [11101]]));;
gap> digraph := LeftCayleyDigraph(S);;
gap> Length(DigraphStronglyConnectedComponents(digraph).comps) 
> = NrLClasses(S);
true

# attr: RightCayleyDigraph, infinite
gap> LeftCayleyDigraph(FreeInverseSemigroup(2));
Error, the argument (a semigroup) is not finite

# attr: IsomorphismReesMatrixSemigroup
gap> D := GreensDClassOfElement(Semigroup(
> Bipartition([[123, -3], [4, -4, -5], [5, -1], [-2]]),
> Bipartition([[14, -2, -3], [235, -5], [-1, -4]]),
> Bipartition([[15], [24, -3, -5], [3, -1, -2], [-4]]),
> Bipartition([[1], [2], [35, -1, -2], [4, -3], [-4, -5]]),
> Bipartition([[1], [2], [3], [4, -1, -4], [5], [-2, -3], [-5]])),
> Bipartition([[1], [2], [3], [4, -1, -4], [5], [-2, -3], [-5]]));;
gap> PrincipalFactor(D);
<Rees 0-matrix semigroup 12x15 over Group(())>

# attr: IsomorphismReesMatrixSemigroup, error, 1/1
gap> S := FullTransformationMonoid(3);;
gap> D := DClass(S, Transformation([121]));;
gap> IsomorphismReesMatrixSemigroup(D);
Error, the argument (a Green's D-class) is not a semigroup
gap> D := MinimalDClass(S);;
gap> IsomorphismReesMatrixSemigroup(D);
MappingByFunction( <Green's D-class: Transformation( [ 111 ] )>, 
<Rees matrix semigroup 1x3 over Group(())>
 , function( x ) ... end, function( x ) ... end )

# attr: IrredundantGeneratingSubset, for a collection of elements
gap> G := CyclicGroup(3);;
gap> R := GF(2);;
gap> GR := GroupRing(R, G);;
gap> iso := IsomorphismTransformationSemigroup(GR);;
gap> S := Range(iso);;
gap> S := Semigroup(IrredundantGeneratingSubset(SmallGeneratingSet(S)));;

# attr: IrredundantGeneratingSubset: for a semigroup
gap> S := RandomMonoid(IsBooleanMatMonoid, 103);;
gap> T := Semigroup(IrredundantGeneratingSubset(S));;
gap> S = T;
true

# attr: IrredundantGeneratingSubset: for a set with one element, 1
gap> IrredundantGeneratingSubset([RandomTransformation(10)]);;

# attr: IrredundantGeneratingSubset: for a set with one element, 2
gap> S := Monoid([Transformation([11]), Transformation([21]),
>  Transformation([22])], rec(acting := true));
<transformation monoid of degree 2 with 3 generators>
gap> Size(IrredundantGeneratingSubset(S));
2

# attr: IrredundantGeneratingSubset: for a set with a single repeated
# element
gap> S := Semigroup([Transformation([11]), Transformation([11])]);
<transformation semigroup of degree 2 with 2 generators>
gap> Size(IrredundantGeneratingSubset(S));
1

# attr: IrredundantGeneratingSubset: for a set containing identity and 
# a single generator, generators defined separately
gap> gens := [Transformation([21]), IdentityTransformation];;
gap> Size(IrredundantGeneratingSubset(gens));
1

# attr: IrredundantGeneratingSubset: for a set containing identity and 
# a single generator, generators given directly
gap> IrredundantGeneratingSubset([Transformation([21]), IdentityTransformation]);;

# attr: IrredundantGeneratingSubset: for a set containing elements
# of a cyclic semigroup along with a generator, generators defined separately
gap> gens := [Transformation([1131]),
> Transformation([3313])];;
gap> Size(IrredundantGeneratingSubset(gens));
1

# attr: IrredundantGeneratingSubset: for a set containing elements
# of a cyclic semigroup along with a generator, generators given directly
gap> IrredundantGeneratingSubset([Transformation([1131]),
> Transformation([3313])]);;

# attr: IrredundantGeneratingSubset: test info statements
gap> S := MonogenicSemigroup(IsTransformationSemigroup, 41);;
gap> S := Semigroup(Elements(S));
<transformation semigroup of degree 5 with 4 generators>
gap> x := InfoLevel(InfoSemigroups);;
gap> SetInfoLevel(InfoSemigroups, 3);
gap> IrredundantGeneratingSubset(S);
at  1 of  4 with  0 redundant,  0 non-redundant
at  2 of  4 with  0 redundant,  1 non-redundant
at  3 of  4 with  1 redundant,  1 non-redundant
at  4 of  4 with  2 redundant,  1 non-redundant

[ Transformation( [ 11234 ] ) ]
gap> SetInfoLevel(InfoSemigroups, x);

# attr: PrincipalFactor: for a D-class
gap> D := GreensDClassOfElement(
>  Semigroup(
>    BooleanMat([[011010], [010100], [111000],
>                [011111], [101001], [101011]]),
>    BooleanMat([[111110], [000010], [010110],
>                [101110], [111001], [110000]])),
>  BooleanMat([[111111], [111111], [111111],
>              [111111], [111111], [111111]]));;
gap> PrincipalFactor(D);
<Rees matrix semigroup 1x1 over Group(())>

# attr: SmallSemigroupGeneratingSet: for a collection with > 1 elements
gap> SmallSemigroupGeneratingSet([
> Transformation([11114]), Transformation([12211]),
> Transformation([12544]), Transformation([13351]),
> Transformation([22124]), Transformation([32332]),
> Transformation([35244]), Transformation([35454]),
> Transformation([44255]), Transformation([52352])]);;

# attr: SmallSemigroupGeneratingSet: for a collection with 1 elements
gap> SmallSemigroupGeneratingSet([BooleanMat([[0100], [0110], [0,
100], [1011]])]);
[ Matrix(IsBooleanMat, [[0100], [0110], [0100], 
      [1011]]) ]

# attr: SmallSemigroupGeneratingSet: for a semigroup
gap> S := Semigroup([PartialPerm([12], [32]),
> PartialPerm([123], [234]),
> PartialPerm([123], [253]),
> PartialPerm([14], [13]),
> PartialPerm([1234], [3512]),
> PartialPerm([1234], [5421]),
> PartialPerm([135], [142]),
> PartialPerm([1245], [3251]),
> PartialPerm([1245], [3512]),
> PartialPerm([135], [431])]);;
gap> SmallSemigroupGeneratingSet(S);;

# attr: SmallMonoidGeneratingSet: for a singleton set 1/2
gap> SmallMonoidGeneratingSet([IdentityTransformation]);
[ IdentityTransformation ]

# attr: SmallMonoidGeneratingSet: for a singleton set 2/2
gap> SmallMonoidGeneratingSet([Transformation([212])]);
[ Transformation( [ 212 ] ) ]

# attr: SmallMonoidGeneratingSet: for a 0 generator monoid, 1
gap> S := Monoid(Bipartition([[1, -1]]));;
gap> SmallMonoidGeneratingSet(S);
[ <block bijection: [ 1, -1 ]> ]

# attr: SmallMonoidGeneratingSet: for a 0 generator monoid, 2
gap> S := FreeMonoid(0);;
gap> SmallMonoidGeneratingSet(S);
[  ]

# attr: SmallInverseSemigroupGeneratingSet: for collection > 1 element 
gap> SmallInverseSemigroupGeneratingSet(
> [PartialPerm([12], [41]),
>  PartialPerm([12], [52]), PartialPerm([123], [321]),
>  PartialPerm([123], [324]),
>  PartialPerm([1234], [1235]),
>  PartialPerm([134], [321]), PartialPerm([124], [312]),
>  PartialPerm([12345], [31542]),
>  PartialPerm([1235], [5423])]);;

# attr: SmallInverseSemigroupGeneratingSet: for collection 1 element 
gap> SmallInverseSemigroupGeneratingSet([PartialPerm([1237910,
1112], [468125913])]);
[ [2,6][7,12,3,8][10,9,5][11,1,4] ]

# attr: SmallInverseSemigroupGeneratingSet: for an inverse semigroup
gap> S :=
> InverseSemigroup([PartialPerm([12], [12]),
>   PartialPerm([124], [231]), PartialPerm([134], [324]),
>   PartialPerm([1245], [1354]),
>   PartialPerm([1245], [2135]),
>   PartialPerm([135], [312]),
>   PartialPerm([1235], [3125]),
>   PartialPerm([12345], [35124]),
>   PartialPerm([135], [432]),
>   PartialPerm([1235], [4123])]);;
gap> SmallInverseSemigroupGeneratingSet(S);;

# attr: SmallInverseMonoidGeneratingSet: for 0 generators, 1
gap> S := InverseMonoid(PartialPerm([123]));
<trivial partial perm group of rank 3 with 1 generator>
gap> SmallInverseMonoidGeneratingSet(S);
[ <identity partial perm on [ 123 ]> ]

# attr: SmallInverseMonoidGeneratingSet: for 0 generators, 2
gap> S := Group(IdentityTransformation);;
gap> IsTransformationSemigroup(S) and IsGroup(S) and IsGroupAsSemigroup(S) 
> and IsTrivial(S);
true
gap> S := Subgroup(S, []);
<trivial transformation group of degree 0 with 0 generators>
gap> IsInverseMonoid(S) and IsGeneratorsOfInverseSemigroup(S);
true
gap> SmallInverseMonoidGeneratingSet(S);
[  ]

# attr: SmallInverseMonoidGeneratingSet: for > 0 generators 1/2
gap> S := InverseMonoid([PartialPerm([13], [23]),
> PartialPerm([13], [31]),
> PartialPerm([123], [324]),
> PartialPerm([14], [13])]);;
gap> SmallInverseMonoidGeneratingSet(S);;

# attr: SmallInverseMonoidGeneratingSet: for > 0 generators 2/2
gap> Set(SmallInverseMonoidGeneratingSet(DualSymmetricInverseMonoid(3)));
[ <block bijection: [ 12, -3 ], [ 3, -1, -2 ]>, 
  <block bijection: [ 1, -2 ], [ 2, -1 ], [ 3, -3 ]>, 
  <block bijection: [ 1, -2 ], [ 2, -3 ], [ 3, -1 ]> ]

# attr: SmallInverseSemigroupGeneratingSet: for a collection
gap> coll := [Bipartition([[1, -1], [2, -2], [3, -3], [4, -4], [5, -5]]),
> Bipartition([[1, -1], [2, -4], [3, -3], [4], [5], [-2], [-5]]),
> Bipartition([[1, -2], [2, -4], [3, -3], [4], [5], [-1], [-5]]),
> Bipartition([[1, -3], [2, -4], [3], [4, -1], [5], [-2], [-5]]),
> Bipartition([[1, -1], [2, -2], [3], [4, -4], [5, -3], [-5]]),
> Bipartition([[1, -1], [2, -5], [3, -4], [4], [5, -2], [-3]]),
> Bipartition([[1, -3], [2], [3, -5], [4, -2], [5, -4], [-1]]),
> Bipartition([[1, -3], [2, -1], [3, -5], [4], [5, -2], [-4]]),
> Bipartition([[1, -4], [2], [3], [4, -1], [5, -5], [-2], [-3]]),
> Bipartition([[1, -5], [2], [3, -1], [4, -2], [5, -3], [-4]]),
> Bipartition([[1, -5], [2, -3], [3], [4, -4], [5, -1], [-2]]),
> Bipartition([[1, -1], [2], [3, -3], [4, -2], [5], [-4], [-5]]),
> Bipartition([[1], [2, -1], [3, -3], [4, -2], [5], [-4], [-5]]),
> Bipartition([[1, -4], [2], [3, -1], [4, -2], [5], [-3], [-5]]),
> Bipartition([[1, -1], [2, -2], [3, -5], [4, -4], [5], [-3]]),
> Bipartition([[1, -1], [2, -5], [3], [4, -3], [5, -2], [-4]]),
> Bipartition([[1], [2, -4], [3, -1], [4, -5], [5, -3], [-2]]),
> Bipartition([[1, -3], [2, -4], [3, -5], [4], [5, -1], [-2]]),
> Bipartition([[1, -5], [2], [3, -2], [4, -4], [5, -1], [-3]])];;
gap> SmallInverseSemigroupGeneratingSet(coll);;

# attr: SmallInverseMonoidGeneratingSet: for a collection
gap> coll := [PartialPerm([12345], [12345]),
> PartialPerm([12], [14]), PartialPerm([123], [142]),
> PartialPerm([123], [352]),
> PartialPerm([1234], [1542]),
> PartialPerm([124], [231]), PartialPerm([134], [324]),
> PartialPerm([1234], [5234]),
> PartialPerm([1245], [1354]),
> PartialPerm([135], [312]),
> PartialPerm([1245], [5321]), PartialPerm([14], [12]),
> PartialPerm([124], [132]), PartialPerm([235], [312]),
> PartialPerm([1245], [1432]),
> PartialPerm([123], [412]), PartialPerm([234], [314]),
> PartialPerm([2345], [2341]),
> PartialPerm([1345], [1254]),
> PartialPerm([123], [351]),
> PartialPerm([1235], [5421])];;
gap> SmallInverseMonoidGeneratingSet(coll);;

# attr: SmallInverseMonoidGeneratingSet: for a collection of 1 element
gap> SmallInverseMonoidGeneratingSet([PartialPerm([124])]);
[ [3,4](1)(2) ]

# attr: SmallInverseSemigroupGeneratingSet: for non-inverse-op elements
gap> SmallInverseSemigroupGeneratingSet([RandomTransformation(10)]);
Error, the argument (a mult. elt. coll.) does not satisfy IsGeneratorsOfInvers\
eSemigroup

# attr: SmallInverseMonoidGeneratingSet: for non-inverse-op elements
gap> SmallInverseMonoidGeneratingSet([RandomMatrix(IsBooleanMat, 10)]);
Error, the argument (a mult. elt. coll.) do not satisfy IsGeneratorsOfInverseS\
emigroup

# attr: SmallInverseMonoidGeneratingSet: for One
gap> SmallInverseMonoidGeneratingSet([PartialPerm([123])]);
[  ]

# attr: SmallGeneratingSet: for an ideal
gap> S := SemigroupIdeal(Semigroup(
>     BooleanMat([[010], [100], [001]]),
>     BooleanMat([[010], [001], [100]]),
>     BooleanMat([[100], [010], [101]]),
>     BooleanMat([[100], [010], [000]])),
>     BooleanMat([[100], [000], [110]]));;
gap> SmallGeneratingSet(S);
[ Matrix(IsBooleanMat, [[100], [000], [110]]) ]

# attr: SmallGeneratingSet: for a group
gap> S := Group(IdentityTransformation);;
gap> IsTransformationSemigroup(S) and IsGroup(S) and IsGroupAsSemigroup(S) 
> and IsTrivial(S);
true
gap> SmallGeneratingSet(S);
[ IdentityTransformation ]

# attr: SmallGeneratingSet: for an inverse monoid
gap> S := InverseMonoid([PartialPerm([12], [32]),
> PartialPerm([124], [231]), PartialPerm([124], [342]),
> PartialPerm([14], [42])]);;
gap> SmallGeneratingSet(S);;

# attr: SmallGeneratingSet: for an inverse semigroup
gap> S := InverseSemigroup([PartialPerm([12], [23]),
>                             PartialPerm([13], [31]),
>                             PartialPerm([123], [432])]);;
gap> SmallGeneratingSet(S);;

# attr: SmallGeneratingSet: for a semigroup 
gap> S := Semigroup([Transformation([31413]),
>                    Transformation([35324])]);;
gap> SmallGeneratingSet(S);;

# attr: StructureDescription for a Brandt semigroup
gap> S := SemigroupIdeal(
> InverseSemigroup([
>   PartialPermNC([1234], [4126]),
>   PartialPermNC([124], [523]),
>   PartialPermNC([1236], [1345]),
>   PartialPermNC([12346], [24615]),
>   PartialPermNC([1236], [5163])]),
> [PartialPermNC([2], [2])]);;
gap> IsBrandtSemigroup(S);
true
gap> StructureDescription(S);
"B(16)"

# attr: StructureDescription for a group as semigroup 1/3
gap> S := AsSemigroup(IsTransformationSemigroup, AlternatingGroup(5));;
gap> IsGroupAsSemigroup(S);
true
gap> StructureDescription(S);
"A5"

# attr: StructureDescription for a group as semigroup 2/3
gap> S := Semigroup(Transformation([211]));
<commutative transformation semigroup of degree 3 with 1 generator>
gap> IsGroupAsSemigroup(S);
true
gap> StructureDescription(S);
"C2"

# attr: StructureDescription for a group as semigroup 3/3
gap> S := SymmetricGroup(3);;
gap> StructureDescription(S);
"S3"

# Test StructureDescription for a group as semigroup
gap> S := Monoid(IdentityTransformation);;
gap> StructureDescription(S);
"1"

# Issue 393: StructureDescription method in Semigroups inappropriately selected
gap> F := FreeGroup("r", "s");;
gap> r := F.1;;
gap> s := F.2;;
gap> G := F / [s * r * s ^ (- 1) * r ^ (- 1)];;
gap> StructureDescription(G) in ["C0 x C0", "Z x Z"];
true

# attr: IsGreensDGreaterThanFunc
gap> S := RegularBooleanMatMonoid(3);;
gap> foo := IsGreensDGreaterThanFunc(S);
function( x, y ) ... end
gap> x := BooleanMat([[101], [110], [101]]);;
gap> y := BooleanMat([[101], [000], [100]]);;
gap> foo(x, y);
true
gap> foo(y, x);
false
gap> z := RepresentativeOfMinimalIdeal(S);
Matrix(IsBooleanMat, [[000], [000], [000]])
gap> foo(x, z);
true
gap> foo(z, x);
false
gap> foo(z, y);
false
gap> foo(y, z);
true
gap> foo(z, z);
false

# Test IsGreensDGreaterThanFunc for an infinite CanUseFroidurePin semigroup
gap> S := Semigroup([Matrix(IsMaxPlusMatrix,
>                           [[-220], [-100], [1, -31]]),
>                    Matrix(IsMaxPlusMatrix,
>                           [[-infinity, 00], [010], [1, -10]])]);;
gap> IsGreensDGreaterThanFunc(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `IsGreensDGreaterThanFunc' on 1 argument\
s

# attr: IsGreensDGreaterThanFunc, error
gap> IsGreensDGreaterThanFunc(FreeSemigroup(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `IsGreensDGreaterThanFunc' on 1 argument\
s

# attr: MaximalDClasses
gap> S := RegularBooleanMatMonoid(3);
<monoid of 3x3 boolean matrices with 4 generators>
gap> MaximalDClasses(S);
[ <Green's D-class: Matrix(IsBooleanMat, [[100], [010], [001]])> ]
gap> S := SingularTransformationMonoid(4);
<regular transformation semigroup ideal of degree 4 with 1 generator>
gap> x := MaximalDClasses(S);;
gap> Length(x) = 1 and x[1] = DClass(S, Transformation([1233]));
true
gap> S := ReesMatrixSemigroup(Group(()), [[()]]);;
gap> MaximalDClasses(S);
[ <Green's D-class: (1,(),1)> ]
gap> S := ReesZeroMatrixSemigroup(Group(()), [[()]]);;
gap> MaximalDClasses(S);
[ <Green's D-class: (1,(),1)> ]

# attr: StructureDescriptionMaximalSubgroups
gap> S := RegularBooleanMatMonoid(3);;
gap> StructureDescriptionMaximalSubgroups(S);
[ "1", "C2", "S3" ]

# attr: IdempotentGeneratedSubsemigroup, 1
gap> S := RegularBooleanMatMonoid(3);;
gap> T := IdempotentGeneratedSubsemigroup(S);;
gap> HasIsIdempotentGenerated(T) and IsIdempotentGenerated(T);
true
gap> Size(T);
381

# attr: IdempotentGeneratedSubsemigroup, 2
gap> S := SymmetricInverseMonoid(3);;
gap> T := IdempotentGeneratedSubsemigroup(S);;
gap> HasIsSemilattice(T) and IsSemilattice(T);
true
gap> S := AsSemigroup(IsTransformationSemigroup, S);;
gap> IsInverseSemigroup(S);
true
gap> T := IdempotentGeneratedSubsemigroup(S);;
gap> HasIsSemilattice(T) and IsSemilattice(T);
true
gap> S := Semigroup([
>  PartialPerm([13], [54]),
>  PartialPerm([125], [145]),
>  PartialPerm([134], [345])]);;
gap> T := IdempotentGeneratedSubsemigroup(S);;
gap> IsInverseSemigroup(S);
false
gap> HasIsSemilattice(T) and IsSemilattice(T);
true

# attr: InjectionPrincipalFactor
gap> S := Monoid([BooleanMat([[101], [010], [001]]),
>   BooleanMat([[100], [011], [001]]),
>   BooleanMat([[100], [010], [101]]),
>   BooleanMat([[100], [010], [011]]),
>   BooleanMat([[100], [110], [001]]),
>   BooleanMat([[110], [010], [001]]),
>   BooleanMat([[110], [000], [011]]),
>   BooleanMat([[101], [010], [000]]),
>   BooleanMat([[100], [001], [001]]),
>   BooleanMat([[000], [010], [001]]),
>   BooleanMat([[100], [000], [001]]),
>   BooleanMat([[100], [010], [000]])]);;
gap> D := DClass(S, BooleanMat([[101], [111], [101]]));;
gap> map := InjectionPrincipalFactor(D);
MappingByFunction( <Green's D-class: Matrix(IsBooleanMat, 
  [[101], [111], [101]])>, <Rees 0-matrix semigroup 12x12 over 
  Group(())>, function( x ) ... end, function( x ) ... end )
gap> inv := InverseGeneralMapping(map);;
gap> ForAll(D, x -> (x ^ map) ^ inv = x);
true
gap> MultiplicativeZero(Range(map)) ^ inv;
fail
gap> x := BooleanMat([[000], [110], [000]]);;
gap> x ^ map;
fail
gap> D := First(DClasses(S), x -> not IsRegularGreensClass(x));
<Green's D-class: Matrix(IsBooleanMat, [[101], [110], [001]])>
gap> InjectionPrincipalFactor(D);
Error, the argument (a Green's D-class) is not regular

# attr: MultiplicativeNeutralElement
gap> S := Semigroup([BooleanMat([[001], [001], [011]]),
>  BooleanMat([[100], [110], [011]])]);;
gap> MultiplicativeNeutralElement(S);
fail
gap> S := Semigroup(AsBooleanMat(Transformation([212]), 3));;
gap> Display(MultiplicativeNeutralElement(S));
1 0 0
0 1 0
1 0 0
gap> S := RegularBooleanMatMonoid(2);
<monoid of 2x2 boolean matrices with 3 generators>
gap> MultiplicativeNeutralElement(S);
Matrix(IsBooleanMat, [[10], [01]])
gap> S := Semigroup([Transformation([123355]),
> Transformation([335353])]);
<transformation semigroup of degree 6 with 2 generators>
gap> MultiplicativeNeutralElement(S);
fail
gap> S := Semigroup(Transformation([45138582]),
>                   Transformation([42328286]),
>                   Transformation([68422826]),
>                   Transformation([42628286]),
>                   Transformation([28642824]),
>                   Transformation([4662464]),
>                   Transformation([26282228]),
>                   Transformation([54458855]),
>                   Transformation([22686668]),
>                   Transformation([28868866]),
>                   rec(acting := false));;
>  # acting := false is required to test a particular bit of code
gap> MultiplicativeNeutralElement(S);
fail

# attr: GroupOfUnits, for a finite semigroup 1/2
gap> S := RegularBooleanMatMonoid(3);
<monoid of 3x3 boolean matrices with 4 generators>
gap> GroupOfUnits(S);
<group of 3x3 boolean matrices with 2 generators>
gap> StructureDescription(last);
"S3"

# attr: GroupOfUnits, fail 2/2
gap> S := Semigroup(
> BooleanMat([[1101], [0110], [1101], [1101]]),
> BooleanMat([[1101], [0111], [0111], [0110]]));;
gap> GroupOfUnits(S);
fail

# attr: GroupOfUnits, infinite 1/1
gap> GroupOfUnits(FreeInverseSemigroup(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `GroupOfUnits' on 1 arguments

# attr: NrIdempotents, C++ 1/1
gap> S := RegularBooleanMatMonoid(3);
<monoid of 3x3 boolean matrices with 4 generators>
gap> NrIdempotents(S);
123

# attr: NrIdempotents, non-C++ 1/1
gap> S := FreeBand(2);;
gap> NrIdempotents(S);
6

# attr: NrIdempotents, infinite 1/1
gap> NrIdempotents(FreeSemigroup(2));
Error, resulting list would be too large (length infinity)

# attr: RepresentativeOfMinimalIdeal, simple, 1/1
gap> S := MinimalIdeal(FreeBand(2));
<simple semigroup ideal with 1 generator>
gap> RepresentativeOfMinimalIdeal(S);
x1x2

# attr: MinimalIdeal, infinite, 1/1
gap> MinimalIdeal(FreeMonoid(3));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `MinimalIdeal' on 1 arguments

# attr: IdempotentGeneratedSubsemigroup, inverse op 1/1
gap> S := DualSymmetricInverseMonoid(2);;
gap> T := IdempotentGeneratedSubsemigroup(S);
<commutative inverse block bijection monoid of degree 2 with 1 generator>
gap> HasIsIdempotentGenerated(T) and IsIdempotentGenerated(T);
true

# attr: MultiplicativeZero, infinite, 1
#gap> MultiplicativeZero(FreeMonoid(2)); 
#FIXME(later) this causes an infinite loop in the GAP library code

# attr: MultiplicativeZero, infinite, 2
gap> F := FreeSemigroup(2);;
gap> x := [[F.1 * F.1, F.1], [F.1 * F.2, F.1], [F.2 * F.1, F.1]];;
gap> T := F / x;
<fp semigroup with 2 generators and 3 relations of length 11>
gap> IsFinite(T);
false
gap> MultiplicativeZero(T);
s1

# attr: MaximalDClasses, infinite 1/1
gap> MaximalDClasses(FreeMonoid(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `MaximalDClasses' on 1 arguments

# attr: StructureDescriptionMaximalSubgroups, infinite 1/1
gap> StructureDescriptionMaximalSubgroups(FreeMonoid(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `StructureDescriptionMaximalSubgroups' o\
1 arguments

# attr: IdempotentGeneratedSubsemigroup, infinite 1/1
gap> IdempotentGeneratedSubsemigroup(FreeMonoid(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `IdempotentGeneratedSubsemigroup' on 1 a\
rguments

# attr: IdempotentGeneratedSubsemigroup, infinite, inverse-op 1/1
gap> IdempotentGeneratedSubsemigroup(FreeInverseSemigroup(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 4th choice method found for `IdempotentGeneratedSubsemigroup' on 1 a\
rguments

# attr: MultiplicativeNeutralElement, infinite, 1
gap> MultiplicativeNeutralElement(FreeSemigroup(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `MultiplicativeNeutralElement' on 1 argu\
ments

# attr: MultiplicativeNeutralElement, infinite, 2
gap> S := Semigroup([
> Matrix(IsMaxPlusMatrix, [[-22], [0, -1]]),
> Matrix(IsMaxPlusMatrix, [[00], [1, -3]])]);
<semigroup of 2x2 max-plus matrices with 2 generators>
gap> MultiplicativeNeutralElement(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `MultiplicativeNeutralElement' on 1 argu\
ments

# attr: MultiplicativeNeutralElement, One, 1
gap> S := Semigroup(Transformation([132]));
<commutative transformation semigroup of degree 3 with 1 generator>
gap> MultiplicativeNeutralElement(S);
IdentityTransformation

# attr: MultiplicativeNeutralElement, One, 2
gap> S := Semigroup(Transformation([313]));
<commutative transformation semigroup of degree 3 with 1 generator>
gap> MultiplicativeNeutralElement(S);
fail

# attr: MultiplicativeNeutralElement, One, 3
gap> S := Semigroup(
> [BooleanMat([[true, false, false], [true, false, true], [true, true, true]]),
>  BooleanMat([[true, false, false], [true, true, true], [true, true, false]]),
>  BooleanMat([[false, true, false], [false, true, true], [true, true, true]]),
>  BooleanMat([[true, true, false], [true, true, true], [true, false, false]]),
>  BooleanMat([[false, true, false], [true, true, false], [true, true, true]]),
>  BooleanMat([[false, false, true], [true, false, true], [true, true, true]]),
>  BooleanMat([[true, true, false], [true, false, false], [true, true, true]]),
>  BooleanMat([[false, false, true], [false, true, true], [true, true, true]]),
>  BooleanMat([[true, true, true], [true, false, false], [true, true, false]]),
>  BooleanMat([[true, true, true], [true, true, false], [true, false, false]]),
>  BooleanMat([[true, false, false],
>              [true, true, false],
>              [false, false, false]])]);;
gap> MultiplicativeNeutralElement(S);
fail

# attr: MultiplicativeNeutralElement, One, 4
gap> S := Semigroup([PBR([[-2], [-1]], [[1], [2]])]);
<commutative pbr semigroup of degree 2 with 1 generator>
gap>  MultiplicativeNeutralElement(S);
PBR([ [ -1 ], [ -2 ] ], [ [ 1 ], [ 2 ] ])

# attr: RepresentativeOfMinimalIdeal, infinite 1/1
gap> RepresentativeOfMinimalIdeal(FreeSemigroup(2));
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `RepresentativeOfMinimalIdeal' on 1 argu\
ments

# attr: RepresentativeOfMinimalIdeal, simple 1/1
gap> S := Semigroup(AsBooleanMat((12)));
<commutative semigroup of 2x2 boolean matrices with 1 generator>
gap> IsSimpleSemigroup(S);
true
gap> RepresentativeOfMinimalIdeal(S);
Matrix(IsBooleanMat, [[01], [10]])

# attribute: NilpotencyDegree, 1/4
gap> S := Semigroup([
>  PartialPerm([2], [1]), PartialPerm([12], [31]),
>  PartialPerm([12], [41]), PartialPerm([12], [51]),
>  PartialPerm([3], [5]), PartialPerm([23], [35]),
>  PartialPerm([13], [35]), PartialPerm([123], [315]),
>  PartialPerm([123], [345]), PartialPerm([34], [53]),
>  PartialPerm([24], [45]), PartialPerm([234], [453]),
>  PartialPerm([124], [315]), PartialPerm([124], [415]),
>  PartialPerm([1234], [4153])]);
<partial perm semigroup of rank 4 with 15 generators>
gap> NilpotencyDegree(S);
5

# attribute: NilpotencyDegree, 2/4
gap> S := SymmetricGroup(2);
Sym( [ 1 .. 2 ] )
gap> NilpotencyDegree(S);
fail

# attribute: NilpotencyDegree, 3/4
gap> S := FullTransformationMonoid(1);
<full transformation monoid of degree 0>
gap> NilpotencyDegree(S);
1

# attribute: NilpotencyDegree, 4/4 
gap> S := Semigroup([
> Transformation([52536646]),
> Transformation([62575377]),
> Transformation([84645681])]);
<transformation semigroup of degree 8 with 3 generators>
gap> NilpotencyDegree(S);
fail

# attribute: LengthOfLongestDClassChain, 1/4
gap> S := FreeSemigroup(1);
<free semigroup on the generators [ s1 ]>
gap> LengthOfLongestDClassChain(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `LengthOfLongestDClassChain' on 1 argume\
nts

# attribute: LengthOfLongestDClassChain, 2/4
gap> S := MonogenicSemigroup(85);
<commutative non-regular transformation semigroup of size 12, degree 13 with 
 1 generator>
gap> LengthOfLongestDClassChain(S);
7

# attribute: LengthOfLongestDClassChain, 3/4
gap> S := Semigroup([
>  PartialPerm([2], [1]), PartialPerm([12], [31]),
>  PartialPerm([12], [41]), PartialPerm([12], [51]),
>  PartialPerm([3], [5]), PartialPerm([23], [35]),
>  PartialPerm([13], [35]), PartialPerm([123], [315]),
>  PartialPerm([123], [345]), PartialPerm([34], [53]),
>  PartialPerm([24], [45]), PartialPerm([234], [453]),
>  PartialPerm([124], [315]), PartialPerm([124], [415]),
>  PartialPerm([1234], [4153])]);
<partial perm semigroup of rank 4 with 15 generators>
gap> NilpotencyDegree(S);
5

# attribute: LengthOfLongestDClassChain, 4/4
gap> S := SymmetricGroup(5);
Sym( [ 1 .. 5 ] )
gap> LengthOfLongestDClassChain(S);
0

# attribute: NormalizedPrincipalFactor, 1
gap> S := FullTransformationMonoid(4);
<full transformation monoid of degree 4>
gap> S := NormalizedPrincipalFactor(DClass(S,
> Transformation([4423])));;
gap> Rows(S);
1 .. 6 ]
gap> Columns(S);
1 .. 4 ]
gap> StructureDescription(UnderlyingSemigroup(S));
"S3"

# attribute: InjectionNormalizedPrincipalFactor, 1
gap> S := ReesZeroMatrixSemigroup(Group(()), [[(), 0], [0, ()]]);
<Rees 0-matrix semigroup 2x2 over Group(())>
gap> InjectionNormalizedPrincipalFactor(DClass(S, RMSElement(S, 1, (), 1)));
MappingByFunction( <Green's D-class: (1,(),1)>, 
<Rees 0-matrix semigroup 2x2 over Group(())>
 , function( x ) ... end, function( x ) ... end )

# attribute: InjectionNormalizedPrincipalFactor, 2
gap> S := SymmetricInverseMonoid(4);
<symmetric inverse monoid of degree 4>
gap> InjectionNormalizedPrincipalFactor(DClass(S,
> PartialPerm([], [])));
MappingByFunction( <Green's D-class: <empty partial perm>>, 
<Rees matrix semigroup 1x1 over Group(())>
 , function( x ) ... end, function( x ) ... end )

# attribute: InjectionNormalizedPrincipalFactor, 2
gap> S := MonogenicSemigroup(42);
<commutative non-regular transformation semigroup of size 5, degree 6 with 1 
 generator>
gap> InjectionNormalizedPrincipalFactor(DClass(S, S.1));
Error, the argument (a Green's D-class) is not regular

# attrTest6:
# UnderlyingSemigroupOfSemigroupWithAdjoinedZero
gap> S := FullTransformationMonoid(10);;
gap> UnderlyingSemigroupOfSemigroupWithAdjoinedZero(S);
fail
gap> S := FullTransformationMonoid(4);;
gap> SetIsSemigroupWithAdjoinedZero(S, false);
gap> UnderlyingSemigroupOfSemigroupWithAdjoinedZero(S);
fail
gap> S := SymmetricInverseMonoid(5);;
gap> UnderlyingSemigroupOfSemigroupWithAdjoinedZero(S);
fail
gap> S := MonogenicSemigroup(41);
<commutative non-regular transformation semigroup of size 4, degree 5 with 1 
 generator>
gap> UnderlyingSemigroupOfSemigroupWithAdjoinedZero(S);
fail
gap> S := Semigroup(Elements(S));
<transformation semigroup of degree 5 with 4 generators>
gap> UnderlyingSemigroupOfSemigroupWithAdjoinedZero(S);
fail
gap> S := Semigroup([PartialPerm([]), PartialPerm([1])]);
<partial perm monoid of rank 1 with 2 generators>
gap> UnderlyingSemigroupOfSemigroupWithAdjoinedZero(S);
<trivial partial perm group of rank 1 with 1 generator>

# attr: IrredundantGeneratingSubset: for a set with a single repeated
# element
gap> S := Semigroup([Transformation([11]), Transformation([11])]);
<transformation semigroup of degree 2 with 2 generators>
gap> Size(IrredundantGeneratingSubset(S));
1

# attr: Size: for a monogenic semigroup of special type with minimal
# generating set
gap> S := Semigroup(Transformation([10846453882]));
<commutative transformation semigroup of degree 10 with 1 generator>
gap> Size(S);
5
gap> S := Semigroup(PBR([
> [-3, -23], [-4, -23], [-4, -3, -212], [-4234]],
> [[-3, -2, -1234], [-3, -1134], [-4, -223], [-4123]]));;
gap> Size(S);
2
gap> S := Semigroup(Transformation([2541632]));
<commutative transformation semigroup of degree 7 with 1 generator>
gap> Size(S);
6
gap> S := Semigroup(Bipartition([[1], [2, -4], [3, -5], [4, -6], [5, -1],
> [6, -2], [-3]]));
<commutative bipartition semigroup of degree 6 with 1 generator>
gap> Size(S);
5
gap> S := Semigroup(Matrix(GF(2 ^ 2),
> [[Z(2 ^ 2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2)],
>  [Z(2 ^ 2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2)],
>  [0 * Z(2), Z(2) ^ 00 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2)],
>  [0 * Z(2), 0 * Z(2), Z(2) ^ 00 * Z(2), 0 * Z(2), 0 * Z(2)],
>  [0 * Z(2), 0 * Z(2), 0 * Z(2), Z(2) ^ 00 * Z(2), 0 * Z(2)],
>  [0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2)]]));;
gap> Size(S);
6
gap> S := Semigroup(PartialPerm(
> [123457810111213141820212223252629],
> [22096151210321175113711241942230]));
<commutative partial perm semigroup of rank 20 with 1 generator>
gap> Size(S);
8

# attr: Size: for a monogenic monoid with minimal generating set
gap> S := Monoid(Transformation([78135246]));
<commutative transformation monoid of degree 8 with 1 generator>
gap> Size(S);
12
gap> S := Monoid(Transformation([56213477]));
<commutative transformation monoid of degree 8 with 1 generator>
gap> Size(S);
7
gap> S := Monoid(Transformation([45571743]));
<commutative transformation monoid of degree 8 with 1 generator>
gap> Size(S);
6
gap> S := Monoid(Bipartition([[1], [2, -4], [3, -5], [4, -6], [5, -1],
> [6, -2], [-3]]));
<commutative bipartition monoid of degree 6 with 1 generator>
gap> Size(S);
6
gap> S := Monoid(Matrix(GF(2 ^ 2),
> [[Z(2 ^ 2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2)],
>  [Z(2 ^ 2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2)],
>  [0 * Z(2), Z(2) ^ 00 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2)],
>  [0 * Z(2), 0 * Z(2), Z(2) ^ 00 * Z(2), 0 * Z(2), 0 * Z(2)],
>  [0 * Z(2), 0 * Z(2), 0 * Z(2), Z(2) ^ 00 * Z(2), 0 * Z(2)],
>  [0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2), 0 * Z(2)]]));;
gap> Size(S);
7
gap> S := Monoid(PartialPerm(
> [123457810111213141820212223252629],
> [22096151210321175113711241942230]));
<commutative partial perm monoid of rank 27 with 1 generator>
gap> Size(S);
9

# attr: Size: for a monogenic semigroup/monoid of a type which does not
# have a special IndexPeriodOfSemigroup method
gap> x := PBR(
>  [[-75, -62, -55, -2415506166],
>      [-61, -59, -54, -51, -32, -271617184967],
>      [-30519296267],
>      [-72, -63, -46, -28, -10, -7, -29597374],
>      [-65, -38, -31, -26, -24, -174485761],
>      [-69, -67, -62, -4, -31252650],
>      [-73, -1952655576263], [-26, -5945],
>      [-75, -71, -59, -53, -102029626469],
>      [-66, -59, -35, -325234166],
>      [-48, -47, -1324314653],
>      [-75, -47, -34, -22, -14, -710],
>      [-54, -49, -29, -26, -15, -8315356772],
>      [-68, -41, -40, -38, -16395368], [-73, -62, -42054],
>      [-44, -791329323943454763],
>      [-56, -45, -1112242841],
>      [-72, -60, -38, -13, -111642515969],
>      [-6124445763], [-70, -52, -2021383961],
>      [-63, -39, -31283575],
>      [-73, -58, -53, -36, -1125485469],
>      [-75, -43, -32, -22, -2467], [-321027],
>      [-75, -66, -61, -36, -32, -27, -6, -2321375769],
>      [-46533], [-73, -52, -26, -25, -36172],
>      [-46, -38, -10, -134356],
>      [-26, -20, -12, -33244536061], [-37, -16, -8213943],
>      [-75, -36, -321732465464], [-6045515456],
>      [-66, -24, -15122137536272], [-50, -314969],
>      [-69, -62, -412932], [266067], [-52, -37, -25, -2619],
>      [-65, -44, -42, -35, -211464], [-53, -51, -36, -25, -144563],
>      [-72, -51, -21, -762061], [-67, -62, -420],
>      [-28, -17, -136817364171],
>      [-71, -57, -54, -43, -32, -1221562646667],
>      [-56, -3737384550566369], [-40, -3211324851],
>      [-66, -60, -41233265], [-72, -43, -4137414355],
>      [-63, -61, -59, -8, -6782737445772],
>      [-47, -45, -31117194557],
>      [-72, -51, -2172429415963],
>      [-11, -3, -17826485664], [-56, -46, -221011],
>      [65], [-69, -52, -44, -27, -25, -24, -11, -61036],
>      [-62, -512276163], [-63, -34, -1819294460],
>      [-57327555864], [-17, -16, -1581014376873],
>      [-13252131435373],
>      [-51, -47, -42, -35, -18, -13, -12313660],
>      [-72, -71, -38, -32, -945], [-68, -35, -2415185070],
>      [-47, -38, -22, -144857], [-42, -34, -33, -15314663],
>      [-74, -58927], [-59, -53, -37, -32, -1614346062],
>      [-55, -30, -27, -22, -19637445253],
>      [-75, -57, -20, -1427817], [-47, -44, -3613],
>      [-69, -47, -4341117415657], [-48, -35535],
>      [-28, -9912173033], [-42, -15, -14, -12, -10],
>      [-68, -62, -48, -12340566873],
>      [-73, -55, -45, -33, -9214958]],
>  [[-64, -63, -26, -2476374], [-74, -65, -51, -181719],
>      [-72, -67, -66, -48, -7, -58212635],
>      [-54624424968], [-71, -51, -37, -17, -422],
>      [-73, -69, -33, -32, -7, -5192831],
>      [-68, -61, -58, -222673],
>      [-59, -53, -51018283435555660],
>      [-67, -64, -51, -53139526171],
>      [-70, -63, -60, -1334515973],
>      [-61, -56, -1417182024414267], [-52, -39, -23],
>      [-63, -30, -14, -101225060616972],
>      [-75, -62, -41121930586671], [-66, -31, -31326],
>      [-75, -69, -67, -46, -32, -23, -1024313649],
>      [-68, -56, -14, -238],
>      [-75, -63, -50, -41, -22, -5910304352],
>      [-46, -39, -3611364569], [-70, -60, -58, -48, -36333],
>      [-71, -64, -60, -54, -53, -52, -41, -37, -14, -10182439],
>      [-57, -55, -49, -45, -26, -20, -8916192127],
>      [-61, -50, -36, -31, -281228375051], [-73, -50, -46, -42],
>      [-755255], [-62, -54, -123448516169],
>      [-67, -60, -10, -210152252], [-63, -46130314252],
>      [-16, -6, -216265868], [-62, -20721333753],
>      [-71, -43, -192425526568], [-13475263],
>      [-68, -65, -51, -42, -17121555], [-72, -71, -81464],
>      [-74, -69, -56, -55, -36, -1511132043], [-5828],
>      [-74, -71, -63, -49, -44, -11315060],
>      [-65, -59, -58, -31, -224192769],
>      [-63, -57, -44, -31, -14, -88263538466162],
>      [-69, -61, -51, -2513252756],
>      [-67, -45, -31, -19, -1792962], [-33, -20, -17, -23360],
>      [-74, -72, -51, -38, -27],
>      [-31, -3303137445562646572],
>      [-66, -64, -59, -57, -51, -452304867],
>      [-75, -71, -59, -45, -30, -115866],
>      [-73, -71, -64, -44, -42, -3536061], [-69, -45, -1141],
>      [-67, -46, -45, -44, -35, -31, -28, -271333],
>      [-74, -69, -59, -42, -26, -1212631344249546372],
>      [-47, -44, -23182230], [-60, -56, -38, -102],
>      [-29, -22, -11, -912],
>      [-63, -36, -20313273340525565],
>      [-64, -56, -14, -6, -426223747525673],
>      [-50, -183572], [-56, -51, -43, -22, -1860],
>      [-71, -55, -47, -8, -3735697475], [-63, -49365561],
>      [-75, -11, -812325636575],
>      [-69, -56, -13, -10, -613314973],
>      [-20, -15, -9516263], [-31, -75434449],
>      [-74, -64, -60, -50, -47, -218455466],
>      [-74, -3837384257], [-73, -5034626367],
>      [-54, -50, -15, -23194874],
>      [-75, -51, -44, -3324344461], [-70, -49263555],
>      [-15, -8611203467], [-54, -51, -3047],
>      [-64, -20, -5223462], [-56, -39, -37, -1919223056],
>      [-64, -57, -41, -10, -781029],
>      [-34, -13, -1212515762]]);;
gap> Size(Semigroup(x));
3
gap> Size(Monoid(x));
4

# Test for Issue 218
gap> S := Semigroup(PlanarPartitionMonoid(5),
> AsBipartition((12345)), rec(acting := true));;
gap> D := DClasses(S)[2];;
gap> x := Bipartition([[1, -1], [2, -2], [3, -3], [4, -4, -5], [5]]);;
gap> x in D;
true
gap> inj := InjectionPrincipalFactor(D);;
gap> x ^ inj;
(3,(1,2,3,4),4)

# Test GeneratorsSmallest
gap> S := Semigroup(IdentityTransformation);;
gap> GeneratorsSmallest(S);
[ IdentityTransformation ]
gap> S := FullBooleanMatMonoid(2);;
gap> GeneratorsSmallest(S);
[ Matrix(IsBooleanMat, [[00], [00]]), 
  Matrix(IsBooleanMat, [[00], [01]]), 
  Matrix(IsBooleanMat, [[00], [10]]), 
  Matrix(IsBooleanMat, [[00], [11]]), 
  Matrix(IsBooleanMat, [[01], [00]]), 
  Matrix(IsBooleanMat, [[01], [01]]), 
  Matrix(IsBooleanMat, [[01], [10]]), 
  Matrix(IsBooleanMat, [[01], [11]]) ]
gap> S = Semigroup(GeneratorsSmallest(S));
true
gap> IsSet(GeneratorsSmallest(S));
true

# GeneratorsSmallest for CanUseGapFroidurePin
gap> S := FreeBand(3);
<free band on the generators [ x1, x2, x3 ]>
gap> Size(S);
159
gap> GeneratorsSmallest(S);
[ x1, x2x1x2, x3x2x3x1x3x2x3, x3x2x3x1x3x2, x3x2x3x1x2x3, x3x2x3x1x2x3x2, 
  x3x2x3x1x2x3x1x3, x3x2x3x1x2x1x3, x3x2x1x3x2x3, x3x1x3, x2x3x1x3x2x3, 
  x2x3x2x1x3x2x3, x2, x3x2x3, x3 ]

# Test SmallestElementSemigroup (for a semigroup)
gap> S := Semigroup([Matrix(IsBooleanMat, [[001], [011], [100]]),
>  Matrix(IsBooleanMat, [[100], [101], [111]])]);;
gap> SmallestElementSemigroup(S);
Matrix(IsBooleanMat, [[001], [011], [100]])
gap> S := Semigroup([Matrix(IsMaxPlusMatrix,
>                           [[-220], [-100], [1, -31]]),
>                    Matrix(IsMaxPlusMatrix,
>                           [[-infinity, 00], [010], [1, -10]])]);;
gap> SmallestElementSemigroup(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `SmallestElementSemigroup' on 1 argument\
s

# Test LargestElementSemigroup (for a semigroup)
gap> S := Semigroup([Matrix(IsBooleanMat, [[001], [011], [100]]),
>  Matrix(IsBooleanMat, [[100], [101], [111]])]);;
gap> LargestElementSemigroup(S);
Matrix(IsBooleanMat, [[111], [111], [111]])
gap> S := Semigroup([Matrix(IsMaxPlusMatrix,
>                           [[-220], [-100], [1, -31]]),
>                    Matrix(IsMaxPlusMatrix,
>                           [[-infinity, 00], [010], [1, -10]])]);;
gap> LargestElementSemigroup(S);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 3rd choice method found for `LargestElementSemigroup' on 1 arguments

# attr: InversesOfSemigroupElement, for a group as semigroup
gap> S := Semigroup(Transformation([23133]));;
gap> IsGroupAsSemigroup(S);
true
gap> InversesOfSemigroupElement(S, S.1);
[ Transformation( [ 31211 ] ) ]
gap> Inverse(S.1);
fail
gap> S := Semigroup(PartialPerm([231]), rec(acting := false));;
gap> IsGroupAsSemigroup(S);
true
gap> InversesOfSemigroupElement(S, S.1);
[ (1,3,2) ]
gap> S := SymmetricGroup(3);
Sym( [ 1 .. 3 ] )
gap> InversesOfSemigroupElement(S, (132));
[ (1,2,3) ]

# attr: InversesOfSemigroupElement, for a semigroup
gap> S := Semigroup([
>  Matrix(IsMaxPlusMatrix, [[-220], [-100], [1, -31]]),
>  Matrix(IsMaxPlusMatrix, [[- infinity, 00], [010], [1, -10]])]);;
gap> InversesOfSemigroupElement(S, S.1);
Error, the argument (a semigroup) is not finite
gap> S := Semigroup(Transformation([23133]));;
gap> InversesOfSemigroupElement(S, Transformation([132]));
Error, the 2nd argument (a mult. element) must belong to the 1st argument (a s\
emigroup)
gap> S := Semigroup([Matrix(IsBooleanMat, [[001], [011], [100]]),
>  Matrix(IsBooleanMat, [[100], [101], [111]])]);;
gap> InversesOfSemigroupElement(S, S.1);
[  ]
gap> InversesOfSemigroupElement(S, S.1 * S.2 * S.1);
[ Matrix(IsBooleanMat, [[111], [111], [001]]) ]

# InversesOfSemigroupElement, for an infinite semigroup, 1
gap> S := FreeSemigroup(1);
<free semigroup on the generators [ s1 ]>
gap> InversesOfSemigroupElement(S, IdentityTransformation);
Error, usage: the 2nd argument must be an element of the 1st,
gap> InversesOfSemigroupElementNC(S, S.1);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 1st choice method found for `InversesOfSemigroupElementNC' on 2 argu\
ments

# attr: OneInverseOfSemigroupElement, for a semigroup
gap> S := Semigroup([
>  Matrix(IsMaxPlusMatrix, [[-220], [-100], [1, -31]]),
>  Matrix(IsMaxPlusMatrix, [[- infinity, 00], [010], [1, -10]])]);;
gap> OneInverseOfSemigroupElement(S, S.1);
Error, the semigroup is not finite
gap> S := Semigroup(Transformation([23133]));;
gap> OneInverseOfSemigroupElement(S, Transformation([132]));
Error, the 2nd argument (a mult. element) must belong to the 1st argument (a s\
emigroup)
gap> S := Semigroup([Matrix(IsBooleanMat, [[001], [011], [100]]),
>  Matrix(IsBooleanMat, [[100], [101], [111]])]);;
gap> OneInverseOfSemigroupElement(S, S.1);
fail
gap> OneInverseOfSemigroupElement(S, S.1 * S.2 * S.1);
Matrix(IsBooleanMat, [[111], [111], [001]])

# OneInverseOfSemigroupElement, for a semigroup that cannot use Froidure-Pin
gap> S := Semigroup(SEMIGROUPS.UniversalFakeOne);;
gap> OneInverseOfSemigroupElement(S, S.1);
<universal fake one>

# OneInverseOfSemigroupElement, for an infinite semigroup, 1
gap> S := FreeSemigroup(1);
<free semigroup on the generators [ s1 ]>
gap> OneInverseOfSemigroupElementNC(S, S.1);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `OneInverseOfSemigroupElementNC' on 2 ar\
guments

# attr: IdempotentGeneratedSubsemigroup, 2
gap> S := FullTransformationMonoid(3);;
gap> I := IdempotentGeneratedSubsemigroup(S);;
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true

# attr: IdempotentGeneratedSubsemigroup, for an Rees matrix semigroup, 1
# TryNextMethod()

# Error: infinite
gap> S := FreeSemigroup(1);
<free semigroup on the generators [ s1 ]>
gap> R := ReesMatrixSemigroup(S, [[S.1]]);
<Rees matrix semigroup 1x1 over <free semigroup on the generators [ s1 ]>>
gap> IdempotentGeneratedSubsemigroup(R);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 4th choice method found for `IdempotentGeneratedSubsemigroup' on 1 a\
rguments

# not a Rees matrix semigroup
gap> x := Transformation([22]);;
gap> R := ReesMatrixSemigroup(FullTransformationMonoid(2),
>                             [[IdentityTransformation, x],
>                              [x, x]]);
<Rees matrix semigroup 2x2 over <full transformation monoid of degree 2>>
gap> S := Semigroup(RMSElement(R, 1, IdentityTransformation, 1),
>                   RMSElement(R, 2, IdentityTransformation, 2));
<subsemigroup of 2x2 Rees matrix semigroup with 2 generators>
gap> IsReesMatrixSubsemigroup(S);
true
gap> IsReesMatrixSemigroup(S);
false
gap> I := IdempotentGeneratedSubsemigroup(S);;
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true
gap> Size(I) = 5;
true
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true

# not over a group
gap> x := Transformation([22]);;
gap> R := ReesMatrixSemigroup(FullTransformationMonoid(2),
>                             [[IdentityTransformation, x],
>                              [x, x]]);
<Rees matrix semigroup 2x2 over <full transformation monoid of degree 2>>
gap> I := IdempotentGeneratedSubsemigroup(R);;
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true
gap> Size(I) = 9;
true
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true

# attr: IdempotentGeneratedSubsemigroup, for an Rees matrix semigroup, 2

# Rectangular bands
gap> R := RectangularBand(IsReesMatrixSemigroup, 11);
<Rees matrix semigroup 1x1 over Group(())>
gap> I := IdempotentGeneratedSubsemigroup(R);
<subsemigroup of 1x1 Rees matrix semigroup with 1 generator>
gap> I = R;
true
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> R := RectangularBand(IsReesMatrixSemigroup, 31);
<Rees matrix semigroup 3x1 over Group(())>
gap> I := IdempotentGeneratedSubsemigroup(R);
<subsemigroup of 3x1 Rees matrix semigroup with 3 generators>
gap> I = R;
true
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> R := RectangularBand(IsReesMatrixSemigroup, 13);
<Rees matrix semigroup 1x3 over Group(())>
gap> I := IdempotentGeneratedSubsemigroup(R);
<subsemigroup of 1x3 Rees matrix semigroup with 3 generators>
gap> I = R;
true
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> R := RectangularBand(IsReesMatrixSemigroup, 22);
<Rees matrix semigroup 2x2 over Group(())>
gap> I := IdempotentGeneratedSubsemigroup(R);
<subsemigroup of 2x2 Rees matrix semigroup with 2 generators>
gap> I = R;
true
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true

# Subsemigroup, giving non-standard matrix
gap> x := [[(235), (124)(35), (13524)],
>          [(1354), (2354), (135)(24)],
>          [(235), (15432), ()],
>          [(1425), (12)(35), (15324)],
>          [(14)(235), (12)(45), (13425)]];;
gap> G := SymmetricGroup(5);;
gap> R := ReesMatrixSemigroup(G, x);
<Rees matrix semigroup 3x5 over Sym( [ 1 .. 5 ] )>
gap> S := ReesMatrixSubsemigroup(R, [2], G, [4]);
<Rees matrix semigroup 1x1 over Sym( [ 1 .. 5 ] )>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 3x5 Rees matrix semigroup with 1 generator>
gap> GeneratorsOfSemigroup(I);
[ (2,(1,2)(3,5),4) ]
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> S := ReesMatrixSubsemigroup(R, [2], G, [345]);
<Rees matrix semigroup 1x3 over Sym( [ 1 .. 5 ] )>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 3x5 Rees matrix semigroup with 3 generators>
gap> GeneratorsOfSemigroup(I);
[ (2,(1,2,3,4,5),3), (2,(1,2)(3,5),4), (2,(1,2)(4,5),5) ]
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> S := ReesMatrixSubsemigroup(R, [23], G, [4]);
<Rees matrix semigroup 2x1 over Sym( [ 1 .. 5 ] )>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 3x5 Rees matrix semigroup with 2 generators>
gap> GeneratorsOfSemigroup(I);
[ (2,(1,2)(3,5),4), (3,(1,4,2,3,5),4) ]
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> S := ReesMatrixSubsemigroup(R, [23], G, [45]);
<Rees matrix semigroup 2x2 over Sym( [ 1 .. 5 ] )>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 3x5 Rees matrix semigroup with 2 generators>
gap> GeneratorsOfSemigroup(I);
[ (2,(1,2)(3,5),4), (3,(1,5,2,4,3),5) ]
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true

# attr: IdempotentGeneratedSubsemigroup, for an Rees 0-matrix semigroup, 1
# TryNextMethod()

# Error: infinite
gap> S := FreeSemigroup(1);
<free semigroup on the generators [ s1 ]>
gap> R := ReesZeroMatrixSemigroup(S, [[S.1]]);
<Rees 0-matrix semigroup 1x1 over <free semigroup on the generators [ s1 ]>>
gap> IdempotentGeneratedSubsemigroup(R);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 4th choice method found for `IdempotentGeneratedSubsemigroup' on 1 a\
rguments

# not a Rees matrix semigroup
gap> x := Transformation([22]);;
gap> R := ReesZeroMatrixSemigroup(FullTransformationMonoid(2),
>                                 [[IdentityTransformation, 0],
>                                  [0, x]]);
<Rees 0-matrix semigroup 2x2 over <full transformation monoid of degree 2>>
gap> S := Semigroup(RMSElement(R, 1, IdentityTransformation, 1),
>                   RMSElement(R, 2, IdentityTransformation, 2));
<subsemigroup of 2x2 Rees 0-matrix semigroup with 2 generators>
gap> IsReesZeroMatrixSubsemigroup(S);
true
gap> IsReesZeroMatrixSemigroup(S);
false
gap> I := IdempotentGeneratedSubsemigroup(S);;
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true
gap> Size(I) = 3;
true
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true

# not over a group
gap> x := Transformation([22]);;
gap> R := ReesZeroMatrixSemigroup(FullTransformationMonoid(2),
>                                 [[IdentityTransformation, 0],
>                                  [x, x]]);
<Rees 0-matrix semigroup 2x2 over <full transformation monoid of degree 2>>
gap> I := IdempotentGeneratedSubsemigroup(R);;
gap> HasIsIdempotentGenerated(I);
true
gap> IsIdempotentGenerated(I);
true
gap> Size(I) = 10;
true
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true

# attr: IdempotentGeneratedSubsemigroup, for an Rees 0-matrix semigroup, 2

# Subsemigroup, giving non-standard matrix, 1
gap> R := ReesZeroMatrixSemigroup(Group(()), [[(), ()], [(), ()]]);
<Rees 0-matrix semigroup 2x2 over Group(())>
gap> S := Semigroup(RMSElement(R, 2, (), 2), MultiplicativeZero(R));
<subsemigroup of 2x2 Rees 0-matrix semigroup with 2 generators>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 2x2 Rees 0-matrix semigroup with 2 generators>
gap> I = S;
true
gap> Elements(I);
0, (2,(),2) ]

# Subsemigroup, giving non-standard matrix, 2
gap> x := [[(135)(24), (14325), (135)(24)],
>          [(2453), 0, (1453)],
>          [(354), 0, (145)(23)],
>          [00, (1342)],
>          [(234), (12543), (153)(24)]];;
gap> G := SymmetricGroup(5);;
gap> R := ReesZeroMatrixSemigroup(G, x);
<Rees 0-matrix semigroup 3x5 over Sym( [ 1 .. 5 ] )>
gap> S := ReesZeroMatrixSubsemigroup(R, [2], G, [4]);
<Rees 0-matrix semigroup 1x1 over Sym( [ 1 .. 5 ] )>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 3x5 Rees 0-matrix semigroup with 1 generator>
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> I = Semigroup(Idempotents(S));
true
gap> S := ReesZeroMatrixSubsemigroup(R, [2], G, [345]);
<Rees 0-matrix semigroup 1x3 over Sym( [ 1 .. 5 ] )>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 3x5 Rees 0-matrix semigroup with 2 generators>
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> I = Semigroup(Idempotents(S));
true
gap> S := ReesZeroMatrixSubsemigroup(R, [23], G, [4]);
<Rees 0-matrix semigroup 2x1 over Sym( [ 1 .. 5 ] )>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 3x5 Rees 0-matrix semigroup with 2 generators>
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> I = Semigroup(Idempotents(S));
true
gap> S := ReesZeroMatrixSubsemigroup(R, [23], G, [45]);
<Rees 0-matrix semigroup 2x2 over Sym( [ 1 .. 5 ] )>
gap> I := IdempotentGeneratedSubsemigroup(S);
<subsemigroup of 3x5 Rees 0-matrix semigroup with 3 generators>
gap> ForAll(GeneratorsOfSemigroup(I), IsIdempotent);
true
gap> I = Semigroup(Idempotents(S));
true

# IdempotentGeneratedSubsemigroup, for R(Z)MS where new method is much better

# RZMS: 2241 generators -> 384 generators
gap> R := PrincipalFactor(
>  DClass(FullTransformationMonoid(7),
>  Transformation([1134541])));;
gap> Length(Rows(R));
350
gap> Length(Columns(R));
35
gap> IdempotentGeneratedSubsemigroup(R);
<subsemigroup of 350x35 Rees 0-matrix semigroup with 384 generators>

# RMS: 7200 generators -> 90 generators
gap> R := RectangularBand(IsReesMatrixSemigroup, 8090);
<Rees matrix semigroup 80x90 over Group(())>
gap> IdempotentGeneratedSubsemigroup(R);
<subsemigroup of 80x90 Rees matrix semigroup with 90 generators>

#  IndecomposableElements
gap> S := FullTransformationMonoid(3);
<full transformation monoid of degree 3>
gap> S := Semigroup(GeneratorsOfMonoid(S));
<transformation semigroup of degree 3 with 3 generators>
gap> HasIsSurjectiveSemigroup(S);
false
gap> IndecomposableElements(S);
[  ]
gap> S := Semigroup(S);
<transformation semigroup of degree 3 with 3 generators>
gap> IsMonoidAsSemigroup(S);
true
gap> HasIsSurjectiveSemigroup(S) and IsSurjectiveSemigroup(S);
true
gap> HasIndecomposableElements(S);
false
gap> IndecomposableElements(S);
[  ]
gap> S := MonogenicSemigroup(32);;
gap> IndecomposableElements(S) = [S.1];
true

#  MinimalSemigroupGeneratingSet: for a monogenic semigroup, 1
gap> S := MonogenicSemigroup(IsTransformationSemigroup, 45);
<commutative non-regular transformation semigroup of size 8, degree 9 with 1 
 generator>
gap> MinimalSemigroupGeneratingSet(S);
[ Transformation( [ 234515678 ] ) ]
gap> x := MinimalSemigroupGeneratingSet(S)[1];
Transformation( [ 234515678 ] )
gap> S := Semigroup(x, x ^ 2);
<transformation semigroup of degree 9 with 2 generators>
gap> x := MinimalSemigroupGeneratingSet(S);
[ Transformation( [ 234515678 ] ) ]
gap> Length(x);
1
gap> S = Semigroup(x);
true

#  MinimalSemigroupGeneratingSet: for a 2-generated semigroup, 1
gap> S := SymmetricInverseMonoid(1);
<symmetric inverse monoid of degree 1>
gap> x := MinimalSemigroupGeneratingSet(S);
[ <empty partial perm>, <identity partial perm on [ 1 ]> ]
gap> Length(x);
2
gap> S = Semigroup(x);
true

#  MinimalSemigroupGeneratingSet: for a semigroup with identity adjoined, 1
gap> S := Monoid(RectangularBand(IsBipartitionSemigroup, 22));
<bipartition monoid of degree 2 with 2 generators>
gap> x := MinimalSemigroupGeneratingSet(S);;
gap> Length(x);
3
gap> S = Semigroup(x);
true

#  MinimalSemigroupGeneratingSet: for a semigroup with zero adjoined, 1
gap> S := ReesZeroMatrixSemigroup(Group(()), [[(), ()]]);
<Rees 0-matrix semigroup 2x1 over Group(())>
gap> x := MinimalSemigroupGeneratingSet(S);
0, (1,(),1), (2,(),1) ]
gap> Length(x);
3
gap> S = Semigroup(x);
true

#  MinimalSemigroupGeneratingSet: decomposable elements, 1
gap> S := Semigroup(ZeroSemigroup(IsPartialPermSemigroup, 4));
<partial perm semigroup of rank 3 with 3 generators>
gap> x := MinimalSemigroupGeneratingSet(S);
[ [1,2], [3,4], [5,6] ]
gap> Length(x);
3
gap> S = Semigroup(x);
true
gap> S := Semigroup(Elements(S));
<partial perm semigroup of rank 3 with 4 generators>
gap> x := MinimalSemigroupGeneratingSet(S);
[ [1,2], [3,4], [5,6] ]
gap> Length(x);
3

#  MinimalSemigroupGeneratingSet: decomposable elements, 2
gap> S := Monoid([
>  Transformation([1112]),
>  Transformation([1121]),
>  Transformation([1122]),
>  Transformation([111165])]);
<transformation monoid of degree 6 with 4 generators>
gap> x := MinimalSemigroupGeneratingSet(S);
[ IdentityTransformation, Transformation( [ 111165 ] ), 
  Transformation( [ 1112 ] ), Transformation( [ 1121 ] ), 
  Transformation( [ 1122 ] ) ]
gap> Length(x);
5
gap> S = Semigroup(x);
true

#  MinimalSemigroupGeneratingSet: for a group as semigroup, 1
gap> S = Semigroup(x);
true
gap> S := Semigroup([
>  Transformation([1321]),
>  Transformation([2132]),
>  Transformation([3123])]);
<transformation semigroup of degree 4 with 3 generators>
gap> x := MinimalSemigroupGeneratingSet(S);;
gap> Length(x);
2
gap> S = Semigroup(x);
true

#  MinimalSemigroupGeneratingSet: for a monoid, 1
gap> S := FullTransformationMonoid(4);
<full transformation monoid of degree 4>
gap> x := MinimalSemigroupGeneratingSet(S);;
gap> Length(x);
3
gap> S = Semigroup(x);
true

#  MinimalSemigroupGeneratingSet: for a trivial semigroup, 1
gap> S := FreeSemigroup(1);;
gap> S := S / [[S.1 ^ 2, S.1]];
<fp semigroup with 1 generator and 1 relation of length 4>
gap> MinimalSemigroupGeneratingSet(S);
[ s1 ]

#  MinimalSemigroupGeneratingSet: for a D-trivial semigroup, 1
gap> n := 3;;
gap> S := UnitriangularBooleanMatMonoid(n);
<monoid of 3x3 boolean matrices with 3 generators>
gap> x := MinimalSemigroupGeneratingSet(S);;
gap> Length(x);
4
gap> S = Semigroup(x);
true

#  MinimalSemigroupGeneratingSet: not yet implemented, 1
gap> S := PartitionMonoid(4);
<regular bipartition *-monoid of size 4140, degree 4 with 4 generators>
gap> x := MinimalSemigroupGeneratingSet(S);
Error, no further methods for computing minimal generating sets are implemente\
d

#  MinimalMonoidGeneratingSet: for a trivial monoid, 1
gap> S := FreeMonoid(1);;
gap> S := S / [[S.1, S.1 ^ 0]];
<fp monoid with 1 generator and 1 relation of length 2>
gap> MinimalMonoidGeneratingSet(S);
[ <identity ...> ]

#  MinimalMonoidGeneratingSet: for a monoid, 1
gap> S := FullTransformationMonoid(3);;
gap> x := MinimalMonoidGeneratingSet(S);;
gap> Length(x);
3
gap> Monoid(x) = S;
true

#  MinimalMonoidGeneratingSet: for a monoid, 2
gap> S := SymmetricInverseMonoid(2);
<symmetric inverse monoid of degree 2>
gap> MinimalMonoidGeneratingSet(S);
[ <identity partial perm on [ 1 ]>, (1,2) ]
gap> S := AsSemigroup(IsBlockBijectionSemigroup, S);;
gap> MinimalMonoidGeneratingSet(S);
[ <block bijection: [ 1, -1 ], [ 23, -2, -3 ]>, 
  <block bijection: [ 1, -2 ], [ 2, -1 ], [ 3, -3 ]> ]

#  MinimalMonoidGeneratingSet: for a monoid, 2
gap> S := SymmetricInverseMonoid(1);
<symmetric inverse monoid of degree 1>
gap> MinimalMonoidGeneratingSet(S);
[ <empty partial perm>, <identity partial perm on [ 1 ]> ]
gap> S := AsSemigroup(IsBlockBijectionSemigroup, S);;
gap> MinimalMonoidGeneratingSet(S);
[ <block bijection: [ 12, -1, -2 ]> ]

#  MinimalMonoidGeneratingSet: for a monoid, 3
gap> x := Bipartition([[13, -1, -2], [2, -3]]);;
gap> S := Monoid(x, x ^ 2);
<block bijection monoid of degree 3 with 2 generators>
gap> MinimalMonoidGeneratingSet(S) = [x];
true

#  NambooripadPartialOrder
gap> S := Semigroup([Transformation([3441]),
> Transformation([4121]), Transformation([3331]),
> Transformation([2141])]);;
gap> s := NambooripadPartialOrder(S);
[ [  ], [ 132 ], [ 147 ], [ 178 ], [ 132 ], [ 147 ], [ 178 ], 
  [ 132 ], [ 132 ], [ 132 ], [ 149102432336578 ], 
  [ 178102432346678 ], [ 147 ], [ 147 ], [ 147 ], 
  [ 1414152447487078 ], [ 1713152447497178 ], 
  [ 178 ], [ 1510182432367378 ], 
  [ 1615182447517478 ], [ 178 ], 
  [ 1210212432387678 ], [ 1315212447537778 ], 
  [ 178 ], [ 132 ], [ 132 ], [ 1425263233395878 ], 
  [ 132 ], [ 1725283234396178 ], [ 132 ], [ 132 ], 
  [  ], [ 3278 ], [ 3278 ], [ 11825303236397278 ], 
  [ 3278 ], [ 12125313238397578 ], [ 3278 ], [ 3278 ], 
  [ 147 ], [ 147 ], [ 1440414748545878 ], [ 147 ], 
  [ 1740434749546178 ], [ 147 ], [ 147 ], [  ], 
  [ 4778 ], [ 4778 ], [ 11840454751547278 ], [ 4778 ], 
  [ 12140464753547578 ], [ 4778 ], [ 4778 ], [ 178 ], 
  [ 1226325558647678 ], [ 1341475558697778 ], 
  [ 178 ], [ 1528325561647378 ], 
  [ 1643475561697478 ], [ 178 ], 
  [ 1830325564667278 ], [ 1931325564657578 ], 
  [ 3278 ], [ 3278 ], [ 3278 ], [ 11345475569717278 ], 
  [ 11446475569707578 ], [ 4778 ], [ 4778 ], [ 4778 ], 
  [ 178 ], [ 3278 ], [ 4778 ], [ 178 ], [ 3278 ], [ 4778 ], [  ] ]
gap> GR := Digraph(s);
<immutable digraph with 78 vertices, 316 edges>
gap> IsPartialOrderDigraph(DigraphReflexiveTransitiveClosure(GR));
true
gap> S := FullTransformationMonoid(4);;
gap> s := NambooripadPartialOrder(S);
[ [  ], [ 186 ], [ 1171 ], [ 1256 ], [ 186 ], [ 186 ], 
  [ 1356118687167171 ], [ 1456168688248256 ], 
  [ 1171 ], [ 1269118690170171 ], [ 1171 ], 
  [ 1491116171172252256 ], [ 1256 ], 
  [ 12613168694254256 ], 
  [ 13111316171175255256 ], [ 1256 ], [ 186 ], [ 186 ], 
  [ 131718358687155171 ], 
  [ 141718528688224256 ], [ 186 ], [ 186 ], 
  [ 132122438687151171 ], 
  [ 142122648688216256 ], 
  [ 191721418690155171 ], 
  [ 191822438690154171 ], 
  [ 1111722438691155171 ], 
  [ 14911121617182021222425262732414344
      526064868890919296154155156171172188216
      220224236252256 ], [ 1131721618694224256 ], 
  [ 1131822648694222256 ], 
  [ 131113151617181921222327293032354347
      616364868791949596151155159171175191222
      223224239255256 ], [ 1161722648696224256 ], 
  [ 1171 ], [ 1218333586102170171 ], [ 1171 ], 
  [ 14333552171172240256 ], 
  [ 1521334186102167171 ], 
  [ 1622334386102166171 ], 
  [ 1522354386103167171 ], 
  [ 145681621222433353637383941434448
      5256648688102103104120166167168171172176
      216232236240248256 ], [ 1171 ], 
  [ 1222414386106170171 ], [ 1171 ], 
  [ 14414364171172236256 ], 
  [ 113334161171175240256 ], 
  [ 12613141618223033343538414243454748
      6162648694102106110126166170171174175176
      222238239240254256 ], 
  [ 113354364171175239256 ], 
  [ 116334364171176240256 ], [ 1256 ], 
  [ 1218495286118254256 ], 
  [ 13354952171187255256 ], [ 1256 ], 
  [ 1521496186118248256 ], 
  [ 1622496486118246256 ], 
  [ 135671121222335394349515253545659
      6163648687103118119120151167171183187191
      246247248251255256 ], [ 1522526486120248256 ],
  [ 19414961171187252256 ], 
  [ 1269101118222641424349505254575960
      6162648690106118122126154170171186187188
      246250251252254256 ], 
  [ 111434964171187251256 ], 
  [ 19435264171188252256 ], [ 1256 ], 
  [ 1222616486126254256 ], 
  [ 13436164171191255256 ], [ 1256 ], [ 186 ], [ 186 ], 
  [ 1365668687107131171 ], 
  [ 1465668688128196256 ], [ 186 ], [ 186 ], 
  [ 1369708687103139171 ], 
  [ 1469708688120208256 ], 
  [ 1965698690107137171 ], 
  [ 1966708690106139171 ], 
  [ 11165708691107139171 ], 
  [ 14911121665666869707273747580868890
      919296106107108120124128137139140171172188
      196204208236252256 ], [ 11365698694128205256 ]
    , [ 11366708694126208256 ], 
  [ 131113151665666769707175777880868791
      949596103107111126127128131139143171175191
      205207208239255256 ], [ 11665708696128208256 ]
    , [ 186 ], [ 186 ], [ 138182868791163171 ], 
  [ 148182868896244256 ], [ 186 ], [  ], [ 86171 ], 
  [ 86256 ], [ 198185869091169171 ], [ 86171 ], 
  [ 86171 ], [ 8688909196171172252256 ], 
  [ 1138185869496253256 ], [ 86256 ], 
  [ 8687919496171175255256 ], [ 86256 ], 
  [ 133658186102107161171 ], 
  [ 133668286102106163171 ], 
  [ 135658286103107163171 ], 
  [ 1433353652656668818284868896979899
      102103104106107108112116120128161163164171
      172176196228236240244256 ], 
  [ 133698586102103169171 ], [ 86171 ], [ 86171 ], 
  [ 8688102103120171172240256 ], 
  [ 141658586106107169171 ], [ 86171 ], [ 86171 ], 
  [ 8688106107128171172236256 ], 
  [ 1133341456165697781858693949697101102
      103105106107110111112125126128161169171173
      175176205237239240253256 ], 
  [ 8694102106126171175240256 ], 
  [ 8694103107128171175239256 ], 
  [ 8696102107128171176240256 ], 
  [ 149658186118128241256 ], 
  [ 149668286118126244256 ], 
  [ 133549515265666781828386879199103107
      113114116118119120123126127128131163171179
      187191241243244251255256 ], 
  [ 152658286120128244256 ], 
  [ 149698586118120253256 ], [ 86256 ], 
  [ 8687103118120171187255256 ], [ 86256 ], 
  [ 1941495761656973818586899091105106107
      113117118120122123124125126128137169171185
      187188241249251252253256 ], 
  [ 8690106118126171187252256 ], 
  [ 8691107118128171187251256 ], 
  [ 8690107120128171188252256 ], 
  [ 161658586126128253256 ], [ 86256 ], 
  [ 8687107126128171191255256 ], [ 86256 ], [ 1171 ], 
  [ 126686129131150170171 ], [ 1171 ], 
  [ 14129131171172192196256 ], 
  [ 156986129137150167171 ], 
  [ 167086129139150166171 ], 
  [ 157086131139151167171 ], 
  [ 14568166970728688120129131132133134135
      137139140144150151152166167168171172176184
      188192196200208216248256 ], [ 1171 ], 
  [ 127086137139154170171 ], [ 1171 ], 
  [ 14137139171172188208256 ], 
  [ 113129137171175192205256 ], 
  [ 1261314166670788694126129130131134137
      138139141143144150154158166170171174175176
      190191192205206208222254256 ], 
  [ 113131139171175191208256 ], 
  [ 116129139171176192208256 ], 
  [ 1178186129150155161171 ], 
  [ 1188286129150154163171 ], 
  [ 1178286131151155163171 ], 
  [ 1417182052818284868896129131132145146
      147150151152154155156160161163164171172176
      180188192196212216224244256 ], 
  [ 1218586129150151169171 ], [ 86171 ], [ 86171 ], 
  [ 8688150151171172192216256 ], 
  [ 1178586137154155169171 ], [ 86171 ], [ 86171 ], 
  [ 8688154155171172188224256 ], 
  [ 11317212961818586939496129137141145149
      150151153154155158159160161169171173175176
      189191192205221222224253256 ], 
  [ 8694150154171175192222256 ], 
  [ 8694151155171175191224256 ], 
  [ 8696150155171176192224256 ], [ 1171 ], 
  [ 128286161163166170171 ], [ 1171 ], 
  [ 14161163171172176244256 ], 
  [ 158586161166167169171 ], [ 86171 ], [ 86171 ], 
  [ 8688166167171172176248256 ], [ 1171 ], [ 86171 ], 
  [  ], [ 171256 ], [ 113161169171175176253256 ], 
  [ 8694166170171175176254256 ], [ 171256 ], [ 171256 ], 
  [ 149129161171187192241256 ], 
  [ 1218495052668286114118126129130131146150
      154161162163166170171177179180182186187188
      190191192241242244246254256 ], 
  [ 149131163171187191244256 ], 
  [ 152129163171188192244256 ], 
  [ 1521495361698586117118120129133137149150
      151161165166167169171177182183184185187188
      189191192241245246248253256 ], 
  [ 86118150166171187192246256 ], 
  [ 86118151167171187191248256 ], 
  [ 86120150167171188192248256 ], 
  [ 149137169171187188253256 ], 
  [ 86118154170171187188254256 ], [ 171256 ], [ 171256 ], 
  [ 161129169171191192253256 ], 
  [ 86126150170171191192254256 ], [ 171256 ], [ 171256 ], 
  [ 1256 ], [ 126686193196214254256 ], 
  [ 13131171193196235255256 ], [ 1256 ], 
  [ 156986193205214248256 ], 
  [ 167086193208214246256 ], 
  [ 13567116970718687103131135139151167171
      193195196197198200203205207208214215216231
      235239246247248251255256 ], 
  [ 157086196208216248256 ], 
  [ 19137171193205235252256 ], 
  [ 126910116670748690106137138139154170
      171193194196198201203204205206208214218222
      234235236246250251252254256 ], 
  [ 111139171193208235251256 ], 
  [ 19139171196208236252256 ], [ 1256 ], 
  [ 127086205208222254256 ], 
  [ 13139171205208239255256 ], [ 1256 ], 
  [ 1178186193214224241256 ], 
  [ 1188286193214222244256 ], 
  [ 1317181935818283868791131147151155163
      171193195196209210212214215216219222223224
      227235239241243244251255256 ], 
  [ 1178286196216224244256 ], 
  [ 1218586193214216253256 ], [ 86256 ], 
  [ 8687151171214216235255256 ], [ 86256 ], 
  [ 1917212541818586899091137153154155169
      171193201205209213214216218219220221222224
      233235236241249251252253256 ], 
  [ 8690154171214222235252256 ], 
  [ 8691155171214224235251256 ], 
  [ 8690155171216224236252256 ], 
  [ 1178586205222224253256 ], [ 86256 ], 
  [ 8687155171222224239255256 ], [ 86256 ], 
  [ 133161171193235240241256 ], 
  [ 121833343566828698102106161162163166170
      171193194196210214222225227228230234235236
      238239240241242244246254256 ], 
  [ 135163171193235239244256 ], 
  [ 133163171196236240244256 ], 
  [ 1521333741698586101102103161165166167169
      171193197205213214216225230231232233235236
      237239240241245246248253256 ], 
  [ 86102166171214235240246256 ], 
  [ 86103167171214235239248256 ], 
  [ 86102167171216236240248256 ], 
  [ 141169171193235236253256 ], 
  [ 86106170171214235236254256 ], [ 171256 ], [ 171256 ], 
  [ 133169171205239240253256 ], 
  [ 86102170171222239240254256 ], [ 171256 ], [ 171256 ], 
  [ 1256 ], [ 128286241244246254256 ], 
  [ 13163171241244251255256 ], [ 1256 ], 
  [ 158586241246248253256 ], [ 86256 ], 
  [ 8687167171246248251255256 ], [ 86256 ], 
  [ 19169171241251252253256 ], 
  [ 8690170171246251252254256 ], [ 171256 ], [ 171256 ], 
  [ 1256 ], [ 86256 ], [ 171256 ], [  ] ]
gap> S := InverseSemigroup([Bipartition([[1, -3], [2, -1], [34, -2, -4]]),
> Bipartition([[1, -1], [2, -3], [3, -2], [4, -4]])]);
<inverse block bijection semigroup of degree 4 with 2 generators>
gap> s := NambooripadPartialOrder(S);
[ [  ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], 
  [ 128 ], [ 138 ], [ 149 ], [ 1410 ], [ 168 ], 
  [ 158 ], [ 179 ], [ 1710 ], [ 12681115 ], 
  [ 13581216 ] ]
gap> s = NaturalPartialOrder(S);
true
gap> NambooripadLeqRegularSemigroup(S) = NaturalLeqInverseSemigroup(S);
true
gap> S := FreeSemigroup(3);;
gap> NambooripadPartialOrder(S);
Error, the argument (a semigroup) is not finite
gap> NambooripadLeqRegularSemigroup(S);
Error, the argument (a semigroup) is not finite
gap> S := ZeroSemigroup(5);;
gap> NambooripadPartialOrder(S);
Error, the argument (a semigroup) is not regular
gap> NambooripadLeqRegularSemigroup(S);
Error, the argument (a semigroup) is not regular

# Left/RightIdentity
gap> S := Semigroup(Transformation([2434]), 
>                   Transformation([33233]),
>                   Transformation([55544]), 
>                   Transformation([51411]),
>                   Transformation([53345]));;
gap> ForAll(S, x -> RightIdentity(S, x) = fail or x * RightIdentity(S, x) = x);
true
gap> ForAll(S, x -> RightIdentity(S, x) = fail or RightIdentity(S, x) in S);
true
gap> ForAll(S, x -> LeftIdentity(S, x) = fail or LeftIdentity(S, x) * x = x);
true
gap> ForAll(S, x -> LeftIdentity(S, x) = fail or LeftIdentity(S, x) in S);
true
gap> L := Filtered(S, x -> LeftIdentity(S, x) = fail);
[ Transformation( [ 2434 ] ), Transformation( [ 55544 ] ), 
  Transformation( [ 51411 ] ), Transformation( [ 52422 ] ), 
  Transformation( [ 54444 ] ), Transformation( [ 53433 ] ) ]
gap> Length(L) = 6;
true
gap> ForAll(L, y -> ForAll(S, x -> x * y <> y));
true
gap> ForAll(L, y -> ForAll(S, x -> x * y <> y));
true
gap> R := Filtered(S, x -> RightIdentity(S, x) = fail);
[ Transformation( [ 2434 ] ), Transformation( [ 51411 ] ), 
  Transformation( [ 52422 ] ) ]
gap> Length(R) = 3;
true
gap> ForAll(R, y -> ForAll(S, x -> y * x <> y));
true

# Non-acting example
gap> S := Semigroup(
> [Matrix(IsBooleanMat, [[01000], [00010], [00100], [00010],
>       [00001]]),
>  Matrix(IsBooleanMat, [[00100], [00100], [01000],
>       [00100], [00100]]),
>  Matrix(IsBooleanMat, [[00001], [00001], [00001], [00010],
>       [00010]]),
>  Matrix(IsBooleanMat, [[00001], [10000], [00010],
>       [10000], [10000]]),
>  Matrix(IsBooleanMat, [[00001], [00100], [00100], [00010],
>       [00001]])]);
<semigroup of 5x5 boolean matrices with 5 generators>
gap> ForAll(S, x -> RightIdentity(S, x) = fail or x * RightIdentity(S, x) = x);
true
gap> ForAll(S, x -> RightIdentity(S, x) = fail or RightIdentity(S, x) in S);
true
gap> ForAll(S, x -> LeftIdentity(S, x) = fail or LeftIdentity(S, x) * x = x);
true
gap> ForAll(S, x -> LeftIdentity(S, x) = fail or LeftIdentity(S, x) in S);
true
gap> L := Filtered(S, x -> LeftIdentity(S, x) = fail);
[ Matrix(IsBooleanMat, [[01000], [00010], [00100], 
      [00010], [00001]]), 
  Matrix(IsBooleanMat, [[00001], [00001], [00001], 
      [00010], [00010]]), 
  Matrix(IsBooleanMat, [[00001], [10000], [00010], 
      [10000], [10000]]), 
  Matrix(IsBooleanMat, [[00001], [01000], [00010], 
      [01000], [01000]]), 
  Matrix(IsBooleanMat, [[00001], [00010], [00010], 
      [00010], [00010]]), 
  Matrix(IsBooleanMat, [[00001], [00100], [00010], 
      [00100], [00100]]) ]
gap> Length(L) = 6;
true
gap> ForAll(L, y -> ForAll(S, x -> x * y <> y));
true
gap> ForAll(L, y -> ForAll(S, x -> x * y <> y));
true
gap> R := Filtered(S, x -> RightIdentity(S, x) = fail);
[ Matrix(IsBooleanMat, [[01000], [00010], [00100], 
      [00010], [00001]]), 
  Matrix(IsBooleanMat, [[00001], [10000], [00010], 
      [10000], [10000]]), 
  Matrix(IsBooleanMat, [[00001], [01000], [00010], 
      [01000], [01000]]) ]
gap> Length(R) = 3;
true
gap> ForAll(R, y -> ForAll(S, x -> y * x <> y));
true
gap> x := Matrix(IsBooleanMat, 
> [[00100], 
>  [01101], 
>  [10010], 
>  [01000], 
>  [11111]]);
Matrix(IsBooleanMat, [[00100], [01101], [10010], 
  [01000], [11111]])
gap> RightIdentity(S, x);
Error, the 2nd argument (a mult. elt.) does not belong to the 1st argument (a \
semigroup)
gap> LeftIdentity(S, x);
Error, the 2nd argument (a mult. elt.) does not belong to the 1st argument (a \
semigroup)
gap> S := Monoid(S);
<monoid of 5x5 boolean matrices with 5 generators>
gap> LeftIdentity(S, S.1) = One(S);
true
gap> RightIdentity(S, S.1) = One(S);
true
gap> S := Semigroup(Transformation([1233]), Transformation([2311]));;
gap> S := AsSemigroup(IsBooleanMatSemigroup, S);
<semigroup of 4x4 boolean matrices with 2 generators>
gap> IsMonoidAsSemigroup(S);
true
gap> RightIdentity(S, Matrix(IsBooleanMat, [[0010], [1000], [0100], [0100]])) = MultiplicativeNeutralElement(S);
true
gap> LeftIdentity(S, Matrix(IsBooleanMat, [[0010], [1000], [0100], [0100]])) = MultiplicativeNeutralElement(S);
true

# MaximalL/RClasses
gap> S := LeftZeroSemigroup(3);
<transformation semigroup of degree 4 with 3 generators>
gap> MaximalLClasses(S);
[ <Green's L-class: Transformation( [ 1211 ] )> ]
gap> MaximalRClasses(S);
[ <Green's R-class: Transformation( [ 1211 ] )>, 
  <Green's R-class: Transformation( [ 1212 ] )>, 
  <Green's R-class: Transformation( [ 1221 ] )> ]
gap> S := RightZeroSemigroup(3);
<transformation semigroup of degree 3 with 3 generators>
gap> MaximalLClasses(S);
[ <Green's L-class: Transformation( [ 111 ] )>, 
  <Green's L-class: Transformation( [ 222 ] )>, 
  <Green's L-class: Transformation( [ 333 ] )> ]
gap> MaximalRClasses(S);
[ <Green's R-class: Transformation( [ 111 ] )> ]
gap> S := FullPBRMonoid(1);
<pbr monoid of degree 1 with 4 generators>
gap> MaximalLClasses(S);
[ <Green's L-class: PBR([ [ -1 ] ], [ [ 1 ] ])> ]
gap> MaximalRClasses(S);
[ <Green's R-class: PBR([ [ -1 ] ], [ [ 1 ] ])> ]

# Issue 868 - IsMonoidAsSemigroup assumed HasMultiplicativeNeutralElement
gap> S := SemigroupByMultiplicationTable(
> [[111156],
>  [111256],
>  [333356],
>  [123456],
>  [555555],
>  [666666]]);;
gap> S := AsMonoid(IsFpMonoid, S);
<fp monoid with 5 generators and 25 relations of length 80>

# MinimalFaithfulTransformationDegree
gap> MinimalFaithfulTransformationDegree(RightZeroSemigroup(10));
7
gap> MinimalFaithfulTransformationDegree(LeftZeroSemigroup(10));
6

#
gap> SEMIGROUPS.StopTest();
gap> STOP_TEST("Semigroups package: standard/attributes/attr.tst");

[Verzeichnis aufwärts0.85unsichere VerbindungÜbersetzung europäischer Sprachen durch Browser2026-06-17]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik