  
  [1X15 [33X[0;0YAttributes and operations for semigroups[133X[101X
  
  [33X[0;0YIn  this chapter we decribe the methods that are available in [5XSemigroups[105X for
  determining  the  attributes of a semigroup, and the operations which can be
  applied to a semigroup.[133X
  
  
  [1X15.1 [33X[0;0YRandom elements of a semigroup[133X[101X
  
  [1X15.1-1 Random[101X
  
  [29X[2XRandom[102X( [3XS[103X ) [32X method
  [6XReturns:[106X  [33X[0;10YA random element.[133X
  
  [33X[0;0YThis  function  returns a random element of the semigroup [3XS[103X. If the elements
  of  [3XS[103X have been calculated, then one of these is chosen randomly. Otherwise,
  if  the  data  structure for [3XS[103X is known, then a random element of a randomly
  chosen  [13XR[113X-class  is  returned.  If  the  data  structure  for [3XS[103X has not been
  calculated,     then     a     short     product     (at     most     [10X2    *
  Length(GeneratorsOfSemigroup([3XS[103X[10X))[110X) of generators is returned.[133X
  
  
  [1X15.2 [33X[0;0YExpressing semigroup elements as words in generators[133X[101X
  
  [33X[0;0YIt  is  possible  to  express  an  element  of  a semigroup as a word in the
  generators  of that semigroup. This section describes how to accomplish this
  in [5XSemigroups[105X.[133X
  
  [1X15.2-1 EvaluateWord[101X
  
  [29X[2XEvaluateWord[102X( [3Xgens[103X, [3Xw[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA semigroup element.[133X
  
  [33X[0;0YThe  argument  [3Xgens[103X  should be a collection of generators of a semigroup and
  the  argument  [3Xw[103X should be a list of positive integers less than or equal to
  the  length  of  [3Xgens[103X. This operation evaluates the word [3Xw[103X in the generators
  [3Xgens[103X. More precisely, [10XEvaluateWord[110X returns the equivalent of:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XProduct(List(w, i -> gens[i]));[128X[104X
  [4X[32X[104X
  
  [33X[0;0Ysee also [2XFactorization[102X ([14X15.2-2[114X).[133X
  
  [8Xfor elements of a semigroup[108X
        [33X[0;6YWhen  [3Xgens[103X  is  a  list  of elements of a semigroup and [3Xw[103X is a list of
        positive  integers  less  than  or  equal  to the length of [3Xgens[103X, this
        operation  returns  the  product  [10Xgens[w[1]]  *  gens[w[2]]  *  .. . *
        gens[w[n]][110X when the length of [3Xw[103X is [10Xn[110X.[133X
  
  [8Xfor elements of an inverse semigroup[108X
        [33X[0;6YWhen  [3Xgens[103X  is  a list of elements with a semigroup inverse and [3Xw[103X is a
        list  of  non-zero  integers  whose absolute value does not exceed the
        length  of [3Xgens[103X, this operation returns the product [10Xgens[AbsInt(w[1])]
        ^ SignInt(w[1]) * .. . * gens[AbsInt(w[n])] ^ SignInt(w[n])[110X where [10Xn[110X is
        the length of [3Xw[103X.[133X
  
  [33X[0;0YNote  that  [10XEvaluateWord([3Xgens[103X[10X,  [])[110X returns [10XOne([3Xgens[103X[10X)[110X if [3Xgens[103X belongs to the
  category              [2XIsMultiplicativeElementWithOne[102X             ([14XReference:
  IsMultiplicativeElementWithOne[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [Transformation([2, 4, 4, 6, 8, 8, 6, 6]), [127X[104X
    [4X[25X>[125X [27XTransformation([2, 7, 4, 1, 4, 6, 5, 2]), [127X[104X
    [4X[25X>[125X [27XTransformation([3, 6, 2, 4, 2, 2, 2, 8]), [127X[104X
    [4X[25X>[125X [27XTransformation([4, 3, 6, 4, 2, 1, 2, 6]), [127X[104X
    [4X[25X>[125X [27XTransformation([4, 5, 1, 3, 8, 5, 8, 2])];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27Xx := Transformation([1, 4, 6, 1, 7, 2, 7, 6]);;[127X[104X
    [4X[25Xgap>[125X [27Xword := Factorization(S, x);[127X[104X
    [4X[28X[ 4, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(gens, word);[127X[104X
    [4X[28XTransformation( [ 1, 4, 6, 1, 7, 2, 7, 6 ] )[128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseMonoid(10);;[127X[104X
    [4X[25Xgap>[125X [27Xx := PartialPerm([1, 2, 3, 6, 8, 10], [2, 6, 7, 9, 1, 5]);[127X[104X
    [4X[28X[3,7][8,1,2,6,9][10,5][128X[104X
    [4X[25Xgap>[125X [27Xword := Factorization(S, x);[127X[104X
    [4X[28X[ -2, -2, -2, -2, -3, -2, -2, -2, -2, -2, 5, 2, 5, 5, 2, 5, 2, 2, 2, [128X[104X
    [4X[28X  2, -3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(GeneratorsOfSemigroup(S), word); [127X[104X
    [4X[28X[3,7][8,1,2,6,9][10,5][128X[104X
  [4X[32X[104X
  
  [1X15.2-2 Factorization[101X
  
  [29X[2XFactorization[102X( [3XS[103X, [3Xx[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA word in the generators.[133X
  
  [8Xfor semigroups[108X
        [33X[0;6YWhen  [3XS[103X is a semigroup and [3Xx[103X belongs to [3XS[103X, [10XFactorization[110X return a word
        in  the  generators of [3XS[103X that is equal to [3Xx[103X. In this case, a word is a
        list   of   positive   integers   where  an  entry  [10Xi[110X  corresponds  to
        [10XGeneratorsOfSemigroups(S)[i][110X. More specifically,[133X
  
  [4X      [32X  Example  [32X[104X
          [4X[28XEvaluateWord(GeneratorsOfSemigroup(S), Factorization(S, x)) = x;[128X[104X
        [4X[32X[104X
  
  [8Xfor inverse semigroups[108X
        [33X[0;6YWhen [3XS[103X is a inverse semigroup and [3Xx[103X belongs to [3XS[103X, [10XFactorization[110X return
        a word in the generators of [3XS[103X that is equal to [3Xx[103X. In this case, a word
        is  a  list  of  non-zero  integers  where  an  entry [10Xi[110X corresponds to
        [10XGeneratorsOfSemigroup(S)[i][110X       and      [10X-i[110X      corresponds      to
        [10XGeneratorsOfSemigroup(S)[i] ^ -1[110X. As in the previous case,[133X
  
  [4X      [32X  Example  [32X[104X
          [4X[28XEvaluateWord(GeneratorsOfSemigroup(S), Factorization(S, x)) = x;[128X[104X
        [4X[32X[104X
  
  [33X[0;0YNote that [10XFactorization[110X does not always return a word of minimum length; see
  [2XMinimalFactorization[102X ([14X15.2-3[114X).[133X
  
  [33X[0;0YSee   also   [2XEvaluateWord[102X  ([14X15.2-1[114X)  and  [2XGeneratorsOfSemigroup[102X  ([14XReference:
  GeneratorsOfSemigroup[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [Transformation([2, 2, 9, 7, 4, 9, 5, 5, 4, 8]), [127X[104X
    [4X[25X>[125X [27X            Transformation([4, 10, 5, 6, 4, 1, 2, 7, 1, 2])];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27Xx := Transformation([1, 10, 2, 10, 1, 2, 7, 10, 2, 7]);;[127X[104X
    [4X[25Xgap>[125X [27Xword := Factorization(S, x);[127X[104X
    [4X[28X[ 2, 2, 1, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(gens, word);[127X[104X
    [4X[28XTransformation( [ 1, 10, 2, 10, 1, 2, 7, 10, 2, 7 ] )[128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseMonoid(8);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 8>[128X[104X
    [4X[25Xgap>[125X [27Xx := PartialPerm( [ 1, 2, 3, 4, 5, 8 ], [ 7, 1, 4, 3, 2, 6 ] );[127X[104X
    [4X[28X[5,2,1,7][8,6](3,4)[128X[104X
    [4X[25Xgap>[125X [27Xword := Factorization(S, x);[127X[104X
    [4X[28X[ -2, -2, -2, -2, -2, -2, 2, 4, 4, 2, 3, 2, -3, -2, -2, 3, 2, -3, -2, [128X[104X
    [4X[28X  -2, 4, -3, -4, 2, 2, 3, -2, -3, 4, -3, -4, 2, 2, 3, -2, -3, 2, 2, [128X[104X
    [4X[28X  3, -2, -3, 2, 2, 3, -2, -3, 4, -3, -4, 3, 2, -3, -2, -2, 3, 2, -3, [128X[104X
    [4X[28X  -2, -2, 4, 3, -4, 3, 2, -3, -2, -2, 3, 2, -3, -2, -2, 3, 2, 2, 3, [128X[104X
    [4X[28X  2, 2, 2, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(GeneratorsOfSemigroup(S), word);[127X[104X
    [4X[28X[5,2,1,7][8,6](3,4)[128X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseMonoid(6);;[127X[104X
    [4X[25Xgap>[125X [27Xx := S.1 * S.2 * S.3 * S.2 * S.1;[127X[104X
    [4X[28X<block bijection: [ 1, 6, -4 ], [ 2, -2, -3 ], [ 3, -5 ], [ 4, -6 ], [128X[104X
    [4X[28X [ 5, -1 ]>[128X[104X
    [4X[25Xgap>[125X [27Xword := Factorization(S, x);[127X[104X
    [4X[28X[ -2, -2, -2, -2, -2, 4, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(GeneratorsOfSemigroup(S), word);[127X[104X
    [4X[28X<block bijection: [ 1, 6, -4 ], [ 2, -2, -3 ], [ 3, -5 ], [ 4, -6 ], [128X[104X
    [4X[28X [ 5, -1 ]>[128X[104X
  [4X[32X[104X
  
  [1X15.2-3 MinimalFactorization[101X
  
  [29X[2XMinimalFactorization[102X( [3XS[103X, [3Xx[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA minimal word in the generators.[133X
  
  [33X[0;0YThis  operation  returns  a  minimal  length  word  in the generators of the
  semigroup  [3XS[103X  that  equals  the element [3Xx[103X. In this case, a word is a list of
  positive     integers     where     an     entry     [10Xi[110X     corresponds    to
  [10XGeneratorsOfSemigroups([3XS[103X[10X)[i][110X. More specifically,[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XEvaluateWord(GeneratorsOfSemigroup(S), MinimalFactorization(S, x)) = x;[128X[104X
  [4X[32X[104X
  
  [33X[0;0Y[10XMinimalFactorization[110X involves exhaustively enumerating [3XS[103X until the element [3Xx[103X
  is   found,   and   so  [10XMinimalFactorization[110X  may  be  less  efficient  than
  [2XFactorization[102X ([14X15.2-2[114X) for some semigroups.[133X
  
  [33X[0;0YUnlike  [2XFactorization[102X  ([14X15.2-2[114X)  this operation does not distinguish between
  semigroups  and  inverse  semigroups.  See  also  [2XEvaluateWord[102X  ([14X15.2-1[114X) and
  [2XGeneratorsOfSemigroup[102X ([14XReference: GeneratorsOfSemigroup[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation([2, 2, 9, 7, 4, 9, 5, 5, 4, 8]), [127X[104X
    [4X[25X>[125X [27X                  Transformation([4, 10, 5, 6, 4, 1, 2, 7, 1, 2]));[127X[104X
    [4X[28X<transformation semigroup of degree 10 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27Xx := Transformation( [ 8, 8, 2, 2, 9, 2, 8, 8, 9, 9 ] );[127X[104X
    [4X[28XTransformation( [ 8, 8, 2, 2, 9, 2, 8, 8, 9, 9 ] )[128X[104X
    [4X[25Xgap>[125X [27XFactorization(S, x);[127X[104X
    [4X[28X[ 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1 ][128X[104X
    [4X[25Xgap>[125X [27XMinimalFactorization(S, x);[127X[104X
    [4X[28X[ 1, 2, 1, 1, 1, 1, 2, 2, 1 ][128X[104X
  [4X[32X[104X
  
  
  [1X15.3 [33X[0;0YGenerating sets[133X[101X
  
  [1X15.3-1 Generators[101X
  
  [29X[2XGenerators[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA list of generators.[133X
  
  [33X[0;0Y[10XGenerators[110X returns a generating set that can be used to define the semigroup
  [3XS[103X. The generators of a monoid or inverse semigroup [3XS[103X, say, can be defined in
  several  ways,  for  example,  including  or excluding the identity element,
  including  or  not  the  inverses  of  the  generators.  [10XGenerators[110X uses the
  definition that returns the least number of generators. If no generating set
  for [3XS[103X is known, then [10XGeneratorsOfSemigroup[110X is used by default.[133X
  
  [8Xfor a group[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X   is   a   synonym   for  [2XGeneratorsOfGroup[102X  ([14XReference:
        GeneratorsOfGroup[114X).[133X
  
  [8Xfor an ideal of semigroup[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X is a synonym for [2XGeneratorsOfSemigroupIdeal[102X ([14X7.2-1[114X).[133X
  
  [8Xfor a semigroup[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X  is  a  synonym  for  [2XGeneratorsOfSemigroup[102X  ([14XReference:
        GeneratorsOfSemigroup[114X).[133X
  
  [8Xfor a monoid[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X   is   a   synonym  for  [2XGeneratorsOfMonoid[102X  ([14XReference:
        GeneratorsOfMonoid[114X).[133X
  
  [8Xfor an inverse semigroup[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X    is   a   synonym   for   [2XGeneratorsOfInverseSemigroup[102X
        ([14XReference: GeneratorsOfInverseSemigroup[114X).[133X
  
  [8Xfor an inverse monoid[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X  is  a synonym for [2XGeneratorsOfInverseMonoid[102X ([14XReference:
        GeneratorsOfInverseMonoid[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XM := Monoid(Transformation([1, 4, 6, 2, 5, 3, 7, 8, 9, 9]),[127X[104X
    [4X[25X>[125X [27XTransformation([6, 3, 2, 7, 5, 1, 8, 8, 9, 9]));;[127X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfSemigroup(M);[127X[104X
    [4X[28X[ IdentityTransformation, [128X[104X
    [4X[28X  Transformation( [ 1, 4, 6, 2, 5, 3, 7, 8, 9, 9 ] ), [128X[104X
    [4X[28X  Transformation( [ 6, 3, 2, 7, 5, 1, 8, 8, 9, 9 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfMonoid(M);[127X[104X
    [4X[28X[ Transformation( [ 1, 4, 6, 2, 5, 3, 7, 8, 9, 9 ] ), [128X[104X
    [4X[28X  Transformation( [ 6, 3, 2, 7, 5, 1, 8, 8, 9, 9 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XGenerators(M);[127X[104X
    [4X[28X[ Transformation( [ 1, 4, 6, 2, 5, 3, 7, 8, 9, 9 ] ), [128X[104X
    [4X[28X  Transformation( [ 6, 3, 2, 7, 5, 1, 8, 8, 9, 9 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Generators(M));;[127X[104X
    [4X[25Xgap>[125X [27XGenerators(S);[127X[104X
    [4X[28X[ Transformation( [ 1, 4, 6, 2, 5, 3, 7, 8, 9, 9 ] ), [128X[104X
    [4X[28X  Transformation( [ 6, 3, 2, 7, 5, 1, 8, 8, 9, 9 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfSemigroup(S);[127X[104X
    [4X[28X[ Transformation( [ 1, 4, 6, 2, 5, 3, 7, 8, 9, 9 ] ), [128X[104X
    [4X[28X  Transformation( [ 6, 3, 2, 7, 5, 1, 8, 8, 9, 9 ] ) ][128X[104X
  [4X[32X[104X
  
  [1X15.3-2 SmallGeneratingSet[101X
  
  [29X[2XSmallGeneratingSet[102X( [3Xcoll[103X ) [32X attribute
  [29X[2XSmallSemigroupGeneratingSet[102X( [3Xcoll[103X ) [32X attribute
  [29X[2XSmallMonoidGeneratingSet[102X( [3Xcoll[103X ) [32X attribute
  [29X[2XSmallInverseSemigroupGeneratingSet[102X( [3Xcoll[103X ) [32X attribute
  [29X[2XSmallInverseMonoidGeneratingSet[102X( [3Xcoll[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA small generating set for a semigroup.[133X
  
  [33X[0;0YThe  attributes  [10XSmallXGeneratingSet[110X  return  a  relatively small generating
  subset  of  the  collection of elements [3Xcoll[103X, which can also be a semigroup.
  The  returned  value  of  [10XSmallXGeneratingSet[110X,  where  applicable,  has  the
  property that[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X      X(SmallXGeneratingSet(coll))=X(coll);[128X[104X
    [4X[28X    [128X[104X
  [4X[32X[104X
  
  [33X[0;0Ywhere  [10XX[110X  is  any  of  [2XSemigroup[102X  ([14XReference: Semigroup[114X), [2XMonoid[102X ([14XReference:
  Monoid[114X),  [2XInverseSemigroup[102X  ([14XReference:  InverseSemigroup[114X), or [2XInverseMonoid[102X
  ([14XReference: InverseMonoid[114X).[133X
  
  [33X[0;0YIf  the  number  of generators for [3XS[103X is already relatively small, then these
  functions will often return the original generating set. These functions may
  return different results in different [5XGAP[105X sessions.[133X
  
  [33X[0;0Y[10XSmallGeneratingSet[110X   returns   the   smallest  of  the  returned  values  of
  [10XSmallXGeneratingSet[110X which is applicable to [3Xcoll[103X; see [2XGenerators[102X ([14X15.3-1[114X).[133X
  
  [33X[0;0YAs  neither  irredundancy,  nor  minimal  length are proven, these functions
  usually  return an answer much more quickly than [2XIrredundantGeneratingSubset[102X
  ([14X15.3-3[114X).  These  functions  can  be used whenever a small generating set is
  desired which does not necessarily needs to be minimal.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 1, 2, 3, 2, 4 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 5, 4, 3, 2 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 1, 4, 2, 2 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 4, 4, 2, 1 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 1, 4, 3, 2 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 2, 3, 4, 1 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 4, 4, 3, 3, 5 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 1, 5, 5, 3 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 4, 3, 5, 2 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 5, 4, 5, 5 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XSmallGeneratingSet(S);                  [127X[104X
    [4X[28X[ Transformation( [ 1, 5, 4, 3, 2 ] ), Transformation( [ 3, 2, 3, 4, 1 ] ), [128X[104X
    [4X[28X  Transformation( [ 5, 4, 3, 5, 2 ] ), Transformation( [ 1, 2, 3, 2, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 4, 4, 3, 3, 5 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XS := RandomInverseMonoid(10000,10);;[127X[104X
    [4X[25Xgap>[125X [27XSmallGeneratingSet(S);[127X[104X
    [4X[28X[ [ 1 .. 10 ] -> [ 3, 2, 4, 5, 6, 1, 7, 10, 9, 8 ], [128X[104X
    [4X[28X  [ 1 .. 10 ] -> [ 5, 10, 8, 9, 3, 2, 4, 7, 6, 1 ], [128X[104X
    [4X[28X  [ 1, 3, 4, 5, 6, 7, 8, 9, 10 ] -> [ 1, 6, 4, 8, 2, 10, 7, 3, 9 ] ][128X[104X
    [4X[25Xgap>[125X [27XM := MathieuGroup(24);;[127X[104X
    [4X[25Xgap>[125X [27Xmat := List([1..1000], x-> Random(G));;[127X[104X
    [4X[25Xgap>[125X [27XAppend(mat, [1..1000]*0);[127X[104X
    [4X[25Xgap>[125X [27Xmat := List([1..138], x-> List([1..57], x-> Random(mat)));;[127X[104X
    [4X[25Xgap>[125X [27XR := ReesZeroMatrixSemigroup(G, mat);;[127X[104X
    [4X[25Xgap>[125X [27XU := Semigroup(List([1..200], x-> Random(R)));[127X[104X
    [4X[28X<subsemigroup of 57x138 Rees 0-matrix semigroup with 100 generators>[128X[104X
    [4X[25Xgap>[125X [27XLength(SmallGeneratingSet(U));[127X[104X
    [4X[28X84[128X[104X
    [4X[25Xgap>[125X [27XS := RandomBipartitionSemigroup(100,4);[127X[104X
    [4X[28X<bipartition semigroup on 4 pts with 96 generators>[128X[104X
    [4X[25Xgap>[125X [27XLength(SmallGeneratingSet(S));       [127X[104X
    [4X[28X13[128X[104X
  [4X[32X[104X
  
  [1X15.3-3 IrredundantGeneratingSubset[101X
  
  [29X[2XIrredundantGeneratingSubset[102X( [3Xcoll[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA list of irredundant generators.[133X
  
  [33X[0;0YIf  [3Xcoll[103X  is  a  collection  of  elements of a semigroup, then this function
  returns  a  subset  [10XU[110X  of [3Xcoll[103X such that no element of [10XU[110X is generated by the
  other elements of [10XU[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 5, 1, 4, 6, 2, 3 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 2, 3, 4, 5, 6 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 4, 6, 3, 4, 2, 5 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 4, 6, 3, 1, 3 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 2, 6, 5, 4, 3 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 5, 5, 1, 2, 4 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 6, 5, 1, 3, 3, 4 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 3, 4, 3, 2, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIrredundantGeneratingSubset(S);[127X[104X
    [4X[28X[ Transformation( [ 1, 3, 4, 3, 2, 1 ] ), [128X[104X
    [4X[28X  Transformation( [ 2, 2, 6, 5, 4, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 3, 5, 5, 1, 2, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 5, 1, 4, 6, 2, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 5, 4, 6, 3, 1, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 6, 5, 1, 3, 3, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XS := RandomInverseMonoid(1000,10);[127X[104X
    [4X[28X<inverse partial perm monoid on 10 pts with 1000 generators>[128X[104X
    [4X[25Xgap>[125X [27XSmallGeneratingSet(S);[127X[104X
    [4X[28X[ [ 1 .. 10 ] -> [ 6, 5, 1, 9, 8, 3, 10, 4, 7, 2 ], [128X[104X
    [4X[28X  [ 1 .. 10 ] -> [ 1, 4, 6, 2, 8, 5, 7, 10, 3, 9 ], [128X[104X
    [4X[28X  [ 1, 2, 3, 4, 6, 7, 8, 9 ] -> [ 7, 5, 10, 1, 8, 4, 9, 6 ][128X[104X
    [4X[28X  [ 1 .. 9 ] -> [ 4, 3, 5, 7, 10, 9, 1, 6, 8 ] ][128X[104X
    [4X[25Xgap>[125X [27XIrredundantGeneratingSubset(last);[127X[104X
    [4X[28X[ [ 1 .. 9 ] -> [ 4, 3, 5, 7, 10, 9, 1, 6, 8 ], [128X[104X
    [4X[28X  [ 1 .. 10 ] -> [ 1, 4, 6, 2, 8, 5, 7, 10, 3, 9 ], [128X[104X
    [4X[28X  [ 1 .. 10 ] -> [ 6, 5, 1, 9, 8, 3, 10, 4, 7, 2 ] ][128X[104X
    [4X[25Xgap>[125X [27XS := RandomBipartitionSemigroup(1000,4);[127X[104X
    [4X[28X<bipartition semigroup on 4 pts with 749 generators>[128X[104X
    [4X[25Xgap>[125X [27XSmallGeneratingSet(S);[127X[104X
    [4X[28X[ <bipartition: [ 1, -3 ], [ 2, -2 ], [ 3, -1 ], [ 4, -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, 3, -2 ], [ 2, -1, -3 ], [ 4, -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -4 ], [ 2, 4, -1, -3 ], [ 3, -2 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -1, -3 ], [ 2, -4 ], [ 3, 4, -2 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -2, -4 ], [ 2 ], [ 3, -3 ], [ 4, -1 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -2 ], [ 2, -1, -3 ], [ 3, 4, -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, 3, -1 ], [ 2, -3 ], [ 4, -2, -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -1 ], [ 2, 4, -4 ], [ 3, -2, -3 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, 3, -1 ], [ 2, -2 ], [ 4, -3, -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, 2, -2 ], [ 3, -1, -4 ], [ 4, -3 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -2, -3 ], [ 2, -4 ], [ 3 ], [ 4, -1 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -1 ], [ 2, 4, -3 ], [ 3, -2 ], [ -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -3 ], [ 2, -1 ], [ 3, 4, -4 ], [ -2 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, 2, -4 ], [ 3, -1 ], [ 4, -2 ], [ -3 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -3 ], [ 2, -4 ], [ 3, -1, -2 ], [ 4 ]> ][128X[104X
    [4X[25Xgap>[125X [27XIrredundantGeneratingSubset(last);[127X[104X
    [4X[28X[ <bipartition: [ 1, 2, -4 ], [ 3, -1 ], [ 4, -2 ], [ -3 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, 3, -1 ], [ 2, -2 ], [ 4, -3, -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, 3, -2 ], [ 2, -1, -3 ], [ 4, -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -1 ], [ 2, 4, -3 ], [ 3, -2 ], [ -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -3 ], [ 2, -1 ], [ 3, 4, -4 ], [ -2 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -3 ], [ 2, -2 ], [ 3, -1 ], [ 4, -4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -3 ], [ 2, -4 ], [ 3, -1, -2 ], [ 4 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -2, -3 ], [ 2, -4 ], [ 3 ], [ 4, -1 ]>, [128X[104X
    [4X[28X  <bipartition: [ 1, -2, -4 ], [ 2 ], [ 3, -3 ], [ 4, -1 ]> ][128X[104X
  [4X[32X[104X
  
  
  [1X15.4 [33X[0;0YMinimal ideals and multiplicative zeros[133X[101X
  
  [33X[0;0YIn  this section we describe the attributes of a semigroup that can be found
  using the [5XSemigroups[105X package.[133X
  
  [1X15.4-1 MinimalIdeal[101X
  
  [29X[2XMinimalIdeal[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe minimal ideal of a semigroup.[133X
  
  [33X[0;0YThe  minimal  ideal  of  a  semigroup  is  the  least  ideal with respect to
  containment.[133X
  
  [33X[0;0YIt  is significantly easier to find the minimal [13XD[113X-class of a semigroup, than
  to find its [13XD[113X-classes.[133X
  
  [33X[0;0YSee   also   [2XRepresentativeOfMinimalIdeal[102X  ([14X15.4-2[114X),  [2XPartialOrderOfDClasses[102X
  ([14X14.1-10[114X), [2XIsGreensLessThanOrEqual[102X ([14XReference: IsGreensLessThanOrEqual[114X), and
  [2XMinimalDClass[102X ([14X14.1-6[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 4, 1, 3, 6, 3, 4, 6, 10, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 8, 2, 3, 8, 4, 1, 3, 4, 9, 7 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XMinimalIdeal(S);[127X[104X
    [4X[28X<simple transformation semigroup ideal of degree 10 with 1 generator>[128X[104X
    [4X[25Xgap>[125X [27XElements(MinimalIdeal(S));[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ), [128X[104X
    [4X[28X  Transformation( [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6 ] ), [128X[104X
    [4X[28X  Transformation( [ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ] ) ][128X[104X
    [4X[25Xgap>[125X [27Xx := Transformation( [ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ] );;[127X[104X
    [4X[25Xgap>[125X [27XD := DClass(S, x);;[127X[104X
    [4X[25Xgap>[125X [27XForAll(GreensDClasses(S), x-> IsGreensLessThanOrEqual(D, x));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XMinimalIdeal(POI(10));[127X[104X
    [4X[28X<partial perm group of rank 10>[128X[104X
    [4X[25Xgap>[125X [27XMinimalIdeal(BrauerMonoid(6));[127X[104X
    [4X[28X<simple bipartition semigroup ideal of degree 6 with 1 generator>[128X[104X
  [4X[32X[104X
  
  [1X15.4-2 RepresentativeOfMinimalIdeal[101X
  
  [29X[2XRepresentativeOfMinimalIdeal[102X( [3XS[103X ) [32X attribute
  [29X[2XRepresentativeOfMinimalDClass[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YAn element of the minimal ideal of a semigroup.[133X
  
  [33X[0;0YThe  minimal  ideal  of  a  semigroup  is  the  least  ideal with respect to
  containment.[133X
  
  [33X[0;0YThis  method  returns  a  representative  element  of the minimal ideal of [3XS[103X
  without  having to create the minimal ideal itself. In general, beyond being
  a  member  of  the  minimal ideal, the returned element is not guaranteed to
  have  any  special  properties.  However, the element will coincide with the
  zero element of [3XS[103X if one exists.[133X
  
  [33X[0;0YThis  method  works particularly well if [3XS[103X is a semigroup of transformations
  or partial permutations.[133X
  
  [33X[0;0YSee also [2XMinimalIdeal[102X ([14X15.4-1[114X) and [2XMinimalDClass[102X ([14X14.1-6[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(10);;[127X[104X
    [4X[25Xgap>[125X [27XRepresentativeOfMinimalIdeal(S);[127X[104X
    [4X[28X<empty partial perm>[128X[104X
    [4X[25Xgap>[125X [27XB := Semigroup([[127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, 2 ], [ 3, 6, -2 ], [ 4, 5, -3, -4 ],[127X[104X
    [4X[25X>[125X [27X [ -1, -6 ], [ -5 ] ] ),[127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -1 ], [ 2 ], [ 3 ], [ 4, -3 ], [127X[104X
    [4X[25X>[125X [27X [ 5, 6, -5, -6 ], [ -2, -4 ] ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27XRepresentativeOfMinimalIdeal(B);[127X[104X
    [4X[28X<bipartition: [ 1, 2 ], [ 3, 6 ], [ 4, 5 ], [ -1, -5, -6 ], [128X[104X
    [4X[28X [ -2, -4 ], [ -3 ]>[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 5, 1, 6, 2, 2, 4 ] ),[127X[104X
    [4X[25X>[125X [27X                  Transformation( [ 3, 5, 5, 1, 6, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XRepresentativeOfMinimalDClass(S);[127X[104X
    [4X[28XTransformation( [ 1, 2, 2, 5, 5, 1 ] )[128X[104X
    [4X[25Xgap>[125X [27XMinimalDClass(S);[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 1, 2, 2, 5, 5, 1 ] )>[128X[104X
  [4X[32X[104X
  
  [1X15.4-3 MultiplicativeZero[101X
  
  [29X[2XMultiplicativeZero[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe zero element of a semigroup.[133X
  
  [33X[0;0Y[10XMultiplicativeZero[110X  returns the zero element of the semigroup [3XS[103X if it exists
  and   [9Xfail[109X   if   it  does  not.  See  also  [2XMultiplicativeZero[102X  ([14XReference:
  MultiplicativeZero[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 1, 4, 2, 6, 6, 5, 2 ] ), [127X[104X
    [4X[25X>[125X [27X                   Transformation( [ 1, 6, 3, 6, 2, 1, 6 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28XTransformation( [ 1, 1, 1, 1, 1, 1, 1 ] )[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 2, 8, 3, 7, 1, 5, 2, 6 ] ), [127X[104X
    [4X[25X>[125X [27X                  Transformation( [ 3, 5, 7, 2, 5, 6, 3, 8 ] ), [127X[104X
    [4X[25X>[125X [27X                  Transformation( [ 6, 7, 4, 1, 4, 1, 6, 2 ] ), [127X[104X
    [4X[25X>[125X [27X                  Transformation( [ 8, 8, 5, 1, 7, 5, 2, 8 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4 ], [ 5, 3, 1 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4 ], [ 4, 3, 1, 2 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4, 5 ], [ 2, 4, 5, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28X<empty partial perm>[128X[104X
    [4X[25Xgap>[125X [27XS := PartitionMonoid(6);[127X[104X
    [4X[28X<regular bipartition monoid of degree 6 with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseMonoid(6);[127X[104X
    [4X[28X<inverse bipartition monoid of degree 6 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28X<block bijection: [ 1, 2, 3, 4, 5, 6, -1, -2, -3, -4, -5, -6 ]>[128X[104X
  [4X[32X[104X
  
  
  [1X15.5 [33X[0;0YGroup of units and identity elements[133X[101X
  
  [1X15.5-1 GroupOfUnits[101X
  
  [29X[2XGroupOfUnits[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe group of units of a semigroup or [9Xfail[109X.[133X
  
  [33X[0;0Y[10XGroupOfUnits[110X returns the group of units of the semigroup [3XS[103X as a subsemigroup
  of  [3XS[103X if it exists and returns [9Xfail[109X if it does not. Use [2XIsomorphismPermGroup[102X
  ([14X6.5-2[114X) if you require a permutation representation of the group of units.[133X
  
  [33X[0;0YIf  a semigroup [3XS[103X has an identity [10Xe[110X, then the [13Xgroup of units[113X of [3XS[103X is the set
  of those [10Xs[110X in [3XS[103X such that there exists [10Xt[110X in [3XS[103X where [10Xs*t=t*s=e[110X. Equivalently,
  the group of units is the [13XH[113X-class of the identity of [3XS[103X.[133X
  
  [33X[0;0YSee    also    [2XGreensHClassOfElement[102X   ([14XReference:   GreensHClassOfElement[114X),
  [2XIsMonoidAsSemigroup[102X  ([14X17.1-11[114X), and [2XMultiplicativeNeutralElement[102X ([14XReference:
  MultiplicativeNeutralElement[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 2, 5, 4, 3, 8, 7, 6 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 6, 3, 4, 7, 2, 5, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 1, 6, 7, 8, 3, 4, 5 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 2, 3, 6, 1, 6, 1, 2 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 2, 3, 6, 3, 4, 7, 4 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X5304[128X[104X
    [4X[25Xgap>[125X [27XStructureDescription(GroupOfUnits(S));[127X[104X
    [4X[28X"C2 x S4"[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup( [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ], [127X[104X
    [4X[25X>[125X [27X             [ 2, 4, 5, 3, 6, 7, 10, 9, 8, 1 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4, 5, 6, 7, 8, 10 ], [127X[104X
    [4X[25X>[125X [27X             [ 8, 2, 3, 1, 4, 5, 10, 6, 9 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XStructureDescription(GroupOfUnits(S));[127X[104X
    [4X[28X"C8"[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4 ], [ 4, 3, 5 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 5 ], [ 3, 1, 5, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XGroupOfUnits(S);[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, 2, 3, -1, -3 ], [ -2 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -1 ], [ 2, 3, -2, -3 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -2 ], [ 2, -3 ], [ 3, -1 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1 ], [ 2, 3, -2 ], [ -1, -3 ] ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XStructureDescription(GroupOfUnits(S));[127X[104X
    [4X[28X"C3"[128X[104X
  [4X[32X[104X
  
  
  [1X15.6 [33X[0;0YIdempotents[133X[101X
  
  [1X15.6-1 Idempotents[101X
  
  [29X[2XIdempotents[102X( [3Xobj[103X[, [3Xn[103X] ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA list of idempotents.[133X
  
  [33X[0;0YThe  argument  [3Xobj[103X  should  be  a  semigroup,  [13XD[113X-class, [13XH[113X-class, [13XL[113X-class, or
  [13XR[113X-class.[133X
  
  [33X[0;0YIf  the optional second argument [3Xn[103X is present and [3Xobj[103X is a semigroup, then a
  list  of  the  idempotents  in  [3Xobj[103X  of  rank [3Xn[103X is returned. If you are only
  interested  in  the  idempotents of a given rank, then the second version of
  the  function  will  probably  be  faster.  However,  if the optional second
  argument  is  present,  then  nothing is stored in [3Xobj[103X and so every time the
  function is called the computation must be repeated.[133X
  
  [33X[0;0YThis  functions  produce  essentially  the  same  output  as the [5XGAP[105X library
  function  with  the same name; see [2XIdempotents[102X ([14XReference: Idempotents[114X). The
  main  difference  is  that  this function can be applied to a wider class of
  objects as described above.[133X
  
  [33X[0;0YSee   also   [2XIsRegularDClass[102X  ([14XReference:  IsRegularDClass[114X),  [2XIsRegularClass[102X
  ([14X14.3-2[114X)  [2XIsGroupHClass[102X  ([14XReference: IsGroupHClass[114X), [2XNrIdempotents[102X ([14X15.6-2[114X),
  and [2XGroupHClass[102X ([14X14.4-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation([2, 3, 4, 1]), [127X[104X
    [4X[25X>[125X [27X                  Transformation([3, 3, 1, 1]));;[127X[104X
    [4X[25Xgap>[125X [27XIdempotents(S, 1);[127X[104X
    [4X[28X[  ][128X[104X
    [4X[25Xgap>[125X [27XAsSet(Idempotents(S, 2));[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 3, 3, 1 ] ), [128X[104X
    [4X[28X  Transformation( [ 2, 2, 4, 4 ] ), Transformation( [ 4, 2, 2, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XAsSet(Idempotents(S));[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 3, 3 ] ), IdentityTransformation, [128X[104X
    [4X[28X  Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 2, 2, 4, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 4, 2, 2, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27Xx := Transformation([2, 2, 4, 4]);;[127X[104X
    [4X[25Xgap>[125X [27XR := GreensRClassOfElement(S, x);;[127X[104X
    [4X[25Xgap>[125X [27XIdempotents(R);[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 2, 2, 4, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27Xx := Transformation([4, 2, 2, 4]);;[127X[104X
    [4X[25Xgap>[125X [27XL := GreensLClassOfElement(S, x);;[127X[104X
    [4X[25Xgap>[125X [27XAsSet(Idempotents(L));[127X[104X
    [4X[28X[ Transformation( [ 2, 2, 4, 4 ] ), Transformation( [ 4, 2, 2, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XD := DClassOfLClass(L);;[127X[104X
    [4X[25Xgap>[125X [27XAsSet(Idempotents(D));[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 3, 3, 1 ] ), [128X[104X
    [4X[28X  Transformation( [ 2, 2, 4, 4 ] ), Transformation( [ 4, 2, 2, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XL := GreensLClassOfElement(S, Transformation([3, 1, 1, 3]));;[127X[104X
    [4X[25Xgap>[125X [27XAsSet(Idempotents(L));[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 1, 3, 3, 1 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XH := GroupHClass(D);[127X[104X
    [4X[28X<Green's H-class: Transformation( [ 1, 1, 3, 3 ] )>[128X[104X
    [4X[25Xgap>[125X [27XIdempotents(H);[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 3, 3 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 3, 4, 5, 7], [127X[104X
    [4X[25X>[125X [27X            [10, 6, 3, 4, 9, 1]),[127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 3, 4, 5, 6, 7, 8], [127X[104X
    [4X[25X>[125X [27X            [6, 10, 7, 4, 8, 2, 9, 1]));;[127X[104X
    [4X[25Xgap>[125X [27XIdempotents(S, 1);[127X[104X
    [4X[28X[ <identity partial perm on [ 4 ]> ][128X[104X
    [4X[25Xgap>[125X [27XIdempotents(S, 0);[127X[104X
    [4X[28X[  ][128X[104X
  [4X[32X[104X
  
  [1X15.6-2 NrIdempotents[101X
  
  [29X[2XNrIdempotents[102X( [3Xobj[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA positive integer.[133X
  
  [33X[0;0YThis  function  returns  the number of idempotents in [3Xobj[103X where [3Xobj[103X can be a
  semigroup,  [13XD[113X-,  [13XL[113X-,  [13XH[113X-,  or  [13XR[113X-class.  If  the  actual idempotents are not
  required,   then  it  is  more  efficient  to  use  [10XNrIdempotents(obj)[110X  than
  [10XLength(Idempotents(obj))[110X  since  the  idempotents themselves are not created
  when [10XNrIdempotents[110X is called.[133X
  
  [33X[0;0YSee  also  [2XIdempotents[102X  ([14XReference:  Idempotents[114X)  and [2XIdempotents[102X ([14X15.6-1[114X),
  [2XIsRegularDClass[102X   ([14XReference:   IsRegularDClass[114X),   [2XIsRegularClass[102X  ([14X14.3-2[114X)
  [2XIsGroupHClass[102X ([14XReference: IsGroupHClass[114X), and [2XGroupHClass[102X ([14X14.4-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation([2, 3, 4, 1]), [127X[104X
    [4X[25X>[125X [27X                  Transformation([3, 3, 1, 1]));;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(S);   [127X[104X
    [4X[28X5[128X[104X
    [4X[25Xgap>[125X [27Xf := Transformation([2, 2, 4, 4]);;[127X[104X
    [4X[25Xgap>[125X [27XR := GreensRClassOfElement(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(R);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27Xf := Transformation([4, 2, 2, 4]);;[127X[104X
    [4X[25Xgap>[125X [27XL := GreensLClassOfElement(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(L);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XD := DClassOfLClass(L);;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(D);[127X[104X
    [4X[28X4[128X[104X
    [4X[25Xgap>[125X [27XL := GreensLClassOfElement(S, Transformation([3, 1, 1, 3]));;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(L);[127X[104X
    [4X[28X2[128X[104X
    [4X[25Xgap>[125X [27XH := GroupHClass(D);;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(H);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 3, 5, 7, 9, 10], [127X[104X
    [4X[25X>[125X [27X             [6, 7, 2, 9, 1, 5, 3]),[127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 3, 5, 6, 7, 9, 10], [127X[104X
    [4X[25X>[125X [27X            [8, 1, 9, 4, 10, 5, 6, 7]));;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(S);[127X[104X
    [4X[28X236[128X[104X
    [4X[25Xgap>[125X [27Xf := PartialPerm([2, 3, 7, 9, 10], [127X[104X
    [4X[25X>[125X [27X                    [7, 2, 1, 5, 3]);;[127X[104X
    [4X[25Xgap>[125X [27XD := DClassNC(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(D);[127X[104X
    [4X[28X13[128X[104X
  [4X[32X[104X
  
  [1X15.6-3 IdempotentGeneratedSubsemigroup[101X
  
  [29X[2XIdempotentGeneratedSubsemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA semigroup.[133X
  
  [33X[0;0Y[10XIdempotentGeneratedSubsemigroup[110X  returns the subsemigroup of the semigroup [3XS[103X
  generated by the idempotents of [3XS[103X.[133X
  
  [33X[0;0YSee also [2XIdempotents[102X ([14X15.6-1[114X) and [2XSmallGeneratingSet[102X ([14X15.3-2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 1 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 2, 1 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 2 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 3, 4, 5, 1 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 3, 4, 5, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 3, 4, 6, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 3, 5, 4 ] ),[127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 3, 7, 4, 5, 7 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 4, 8, 8, 3, 8, 7 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 8, 4, 5, 6, 7, 8 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 7, 7, 7, 4, 5, 6, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIdempotentGeneratedSubsemigroup(S);[127X[104X
    [4X[28X<transformation monoid of degree 8 with 19 generators>[128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(5);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 5>[128X[104X
    [4X[25Xgap>[125X [27XIdempotentGeneratedSubsemigroup(S);[127X[104X
    [4X[28X<inverse partial perm monoid of rank 5 with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseSemigroup(5); [127X[104X
    [4X[28X<inverse bipartition monoid of degree 5 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XIdempotentGeneratedSubsemigroup(S);[127X[104X
    [4X[28X<inverse bipartition monoid of degree 5 with 10 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsSemilattice(last);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X15.7 [33X[0;0YMaximal subsemigroups[133X[101X
  
  [1X15.7-1 MaximalSubsemigroups[101X
  
  [29X[2XMaximalSubsemigroups[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe maximal subsemigroups of [3XS[103X.[133X
  
  [33X[0;0YIf [3XS[103X is a semigroup, then [10XMaximalSubsemigroups[110X returns a list of the maximal
  subsemigroups of [3XS[103X.[133X
  
  [33X[0;0YA [13Xmaximal subsemigroup[113X of [3XS[103X is a proper subsemigroup of [3XS[103X which is contained
  in no other proper subsemigroups of [3XS[103X.[133X
  
  [33X[0;0YThe method for this function are based on [GGR68].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := FullTransformationSemigroup(4);[127X[104X
    [4X[28X<full transformation monoid of degree 4>[128X[104X
    [4X[25Xgap>[125X [27XMaximalSubsemigroups(S);[127X[104X
    [4X[28X[ <transformation semigroup of degree 4 with 3 generators>, [128X[104X
    [4X[28X  <transformation semigroup of degree 4 with 5 generators>, [128X[104X
    [4X[28X  <transformation semigroup of degree 4 with 4 generators>, [128X[104X
    [4X[28X  <transformation semigroup of degree 4 with 4 generators>, [128X[104X
    [4X[28X  <transformation semigroup of degree 4 with 5 generators>, [128X[104X
    [4X[28X  <transformation semigroup of degree 4 with 5 generators>, [128X[104X
    [4X[28X  <transformation semigroup of degree 4 with 5 generators>, [128X[104X
    [4X[28X  <transformation semigroup of degree 4 with 5 generators>, [128X[104X
    [4X[28X  <transformation semigroup of degree 4 with 4 generators> ][128X[104X
    [4X[25Xgap>[125X [27XD := DClass(S, Transformation([2, 2]));[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 2, 3, 1, 2 ] )>[128X[104X
    [4X[25Xgap>[125X [27XR := PrincipalFactor(D);[127X[104X
    [4X[28X<Rees 0-matrix semigroup 6x4 over Group([ (1,2,3), (1,2) ])>[128X[104X
    [4X[25Xgap>[125X [27XMaximalSubsemigroups(R);                                       [127X[104X
    [4X[28X[ <Rees 0-matrix semigroup 6x3 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 6x3 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 6x3 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 6x3 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 5x4 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 5x4 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 5x4 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 5x4 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 5x4 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <Rees 0-matrix semigroup 5x4 over Group([ (1,2,3), (1,2) ])>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 23 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 23 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 21 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 23 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 21 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 21 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 23 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 21 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 21 generators>, [128X[104X
    [4X[28X  <subsemigroup of 6x4 Rees 0-matrix semigroup with 21 generators> ][128X[104X
  [4X[32X[104X
  
  [1X15.7-2 MaximalSubsemigroups[101X
  
  [29X[2XMaximalSubsemigroups[102X( [3XR[103X, [3XH[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YThe   maximal   subsemigroups   of  a  Rees  (0)-matrix  semigroup
            corresponding to a maximal subgroup of the underlying group.[133X
  
  [33X[0;0YSuppose that [3XR[103X is a regular Rees (0-)matrix semigroup of the form [12XM[112X[22X[G; I, J;
  P][122X  where  [22XG[122X is a group and [22XP[122X is a [22X|J|[122X by [22X|I|[122X matrix with entries in [22XG[122X union
  [22X0[122X.  If  [3XH[103X is a maximal subgroup of [22XG[122X, then this function returns the maximal
  subsemigroups of [3XR[103X which are isomorphic to [12XM[112X[22X[H; I, J; P][122X.[133X
  
  [33X[0;0YThe method used in this function is based on Remark 1 of [GGR68].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR := ReesZeroMatrixSemigroup(Group([(1, 2), (3, 4)]), [127X[104X
    [4X[25X>[125X [27X[ [ (), (1,2) ], [ (), (1,2) ] ]);[127X[104X
    [4X[28X<Rees 0-matrix semigroup 2x2 over Group([ (1,2), (3,4) ])>[128X[104X
    [4X[25Xgap>[125X [27XG := UnderlyingSemigroup(R);[127X[104X
    [4X[28XGroup([ (1,2), (3,4) ])[128X[104X
    [4X[25Xgap>[125X [27XH := Group((1,2));  [127X[104X
    [4X[28XGroup([ (1,2) ])[128X[104X
    [4X[25Xgap>[125X [27Xmax := MaximalSubsemigroups(R, H);[127X[104X
    [4X[28X[ <subsemigroup of 2x2 Rees 0-matrix semigroup with 6 generators> ][128X[104X
    [4X[25Xgap>[125X [27XIsMaximalSubsemigroup(R, max[1]);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X15.7-3 IsMaximalSubsemigroup[101X
  
  [29X[2XIsMaximalSubsemigroup[102X( [3XS[103X, [3XT[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YIf  [3XS[103X  and  [3XT[103X are semigroups, then [10XIsMaximalSubsemigroup[110X returns true if and
  only if [3XT[103X is a maximal subsemigroup of [3XS[103X.[133X
  
  [33X[0;0YA  proper subsemigroup [3XT[103X of a semigroup [3XS[103X is a [13Xmaximal[113X if [3XT[103X is not contained
  in any other proper subsemigroups of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := FullTransformationSemigroup(4);                              [127X[104X
    [4X[28X<full transformation monoid of degree 4>[128X[104X
    [4X[25Xgap>[125X [27XT := Semigroup(Transformation([3, 4, 1, 2]),[127X[104X
    [4X[25X>[125X [27X                  Transformation([1, 4, 2, 3]),[127X[104X
    [4X[25X>[125X [27X                  Transformation([2, 1, 1, 3]));[127X[104X
    [4X[28X<transformation semigroup of degree 4 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsMaximalSubsemigroup(S, T);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XR := Semigroup(Transformation([3, 4, 1, 2]),[127X[104X
    [4X[25X>[125X [27X                  Transformation([1, 4, 2, 2]),[127X[104X
    [4X[25X>[125X [27X                  Transformation([2, 1, 1, 3]));[127X[104X
    [4X[28X<transformation semigroup of degree 4 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsMaximalSubsemigroup(S, R); [127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  
  [1X15.8 [33X[0;0YThe normalizer of a semigroup[133X[101X
  
  [1X15.8-1 Normalizer[101X
  
  [29X[2XNormalizer[102X( [3XG[103X, [3XS[103X[, [3Xopts[103X] ) [32X operation
  [29X[2XNormalizer[102X( [3XS[103X[, [3Xopts[103X] ) [32X operation
  [6XReturns:[106X  [33X[0;10YA permutation group.[133X
  
  [33X[0;0YIn   its   first   form,   this  function  returns  the  normalizer  of  the
  transformation,  partial perm, or bipartition semigroup [3XS[103X in the permutation
  group  [3XG[103X.  In its second form, the normalizer of [3XS[103X in the symmetric group on
  [10X[1 .. n][110X where [10Xn[110X is the degree of [3XS[103X is returned.[133X
  
  [33X[0;0YThe  [12Xnormalizer[112X  of a transformation semigroup [3XS[103X in a permutation group [3XG[103X in
  the  subgroup [10XH[110X of [3XG[103X consisting of those elements in [10Xg[110X in [3XG[103X conjugating [3XS[103X to
  [3XS[103X, i.e. [10X[3XS[103X[10X ^ g = [3XS[103X[10X[110X.[133X
  
  [33X[0;0YAnalogous  definitions  can  be  given  for  a  partial perm and bipartition
  semigroups.[133X
  
  [33X[0;0YThe method used by this operation is based on Section 3 in [ABMN10].[133X
  
  [33X[0;0YThe  optional  final  argument  [3Xopts[103X  allows you to specify various options,
  which  determine  how  the  normalizer  is  calculated.  The values of these
  options  can  dramatically  change  the  time it takes for this operation to
  complete.   In   different  situations,  different  options  give  the  best
  performance.[133X
  
  [33X[0;0YThe argument [3Xopts[103X should be a record, and the available options are:[133X
  
  [8Xrandom[108X
        [33X[0;6YIf  this  option  has  the  value  [9Xtrue[109X,  then  the  non-deterministic
        algorithms  in  [5Xgenss[105X are used in [10XNormalizer[110X. So, there is some chance
        that  [10XNormalizer[110X  will  return  an  incorrect result in this case, but
        these   methods  can  also  be  much  faster  than  the  deterministic
        algorithms which are used if this option is [9Xfalse[109X.[133X
  
        [33X[0;6YThe default value for this option is [9Xfalse[109X.[133X
  
  [8Xlambdastab[108X
        [33X[0;6YIf this option has the value [9Xtrue[109X, then [10XNormalizer[110X initially finds the
        setwise  stabilizer  of the images or right blocks of the semigroup [3XS[103X.
        Sometimes this improves the performance of [10XNormalizer[110X and sometimes it
        does not. If this option in [9Xfalse[109X, then this setwise stabilizer is not
        found.[133X
  
        [33X[0;6YThe default value for this option is [9Xtrue[109X.[133X
  
  [8Xrhostab[108X
        [33X[0;6YIf this option has the value [9Xtrue[109X, then [10XNormalizer[110X initially finds the
        setwise  stabilizer  of  the  kernels,  domains, or left blocks of the
        semigroup [3XS[103X. Sometimes this improves the performance of [10XNormalizer[110X and
        sometimes  it  does  not.  If  this  option is [9Xfalse[109X, the this setwise
        stabilizer is not found.[133X
  
        [33X[0;6YIf [3XS[103X is an inverse semigroup, then this option is ignored.[133X
  
        [33X[0;6YThe default value for this option is [9Xtrue[109X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := BrauerMonoid(8);[127X[104X
    [4X[28X<regular bipartition monoid on 8 pts with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XStructureDescription(Normalizer(S));[127X[104X
    [4X[28X"S8"[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 3, 4, 5], [2, 5, 6, 3, 8]), [127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 4, 7, 8], [3, 6, 2, 5, 7]));;[127X[104X
    [4X[25Xgap>[125X [27XNormalizer(S, rec(random:=true, lambdastab:=false));[127X[104X
    [4X[28X#I  Have 33389 points.[128X[104X
    [4X[28X#I  Have 40136 points in new orbit.[128X[104X
    [4X[28XGroup(())[128X[104X
  [4X[32X[104X
  
  
  [1X15.9 [33X[0;0YAttributes of transformation semigroups[133X[101X
  
  [1X15.9-1 ComponentRepsOfTransformationSemigroup[101X
  
  [29X[2XComponentRepsOfTransformationSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe representatives of components of a transformation semigroup.[133X
  
  [33X[0;0YThis function returns the representatives of the components of the action of
  the  transformation  semigroup [3XS[103X on the set of positive integers not greater
  than the degree of [3XS[103X.[133X
  
  [33X[0;0YThe representatives are the least set of points such that every point can be
  reached from some representative under the action of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XTransformation([11, 11, 9, 6, 4, 1, 4, 1, 6, 7, 12, 5]), [127X[104X
    [4X[25X>[125X [27XTransformation([12, 10, 7, 10, 4, 1, 12, 9, 11, 9, 1, 12]));;[127X[104X
    [4X[25Xgap>[125X [27XComponentRepsOfTransformationSemigroup(S);[127X[104X
    [4X[28X[ 2, 3, 8 ][128X[104X
  [4X[32X[104X
  
  [1X15.9-2 ComponentsOfTransformationSemigroup[101X
  
  [29X[2XComponentsOfTransformationSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe components of a transformation semigroup.[133X
  
  [33X[0;0YThis  function  returns  the  components of the action of the transformation
  semigroup  [3XS[103X  on the set of positive integers not greater than the degree of
  [3XS[103X; the components of [3XS[103X partition this set.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XTransformation([11, 11, 9, 6, 4, 1, 4, 1, 6, 7, 12, 5]), [127X[104X
    [4X[25X>[125X [27XTransformation([12, 10, 7, 10, 4, 1, 12, 9, 11, 9, 1, 12]));;[127X[104X
    [4X[25Xgap>[125X [27XComponentsOfTransformationSemigroup(S);[127X[104X
    [4X[28X[ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ] ][128X[104X
  [4X[32X[104X
  
  [1X15.9-3 CyclesOfTransformationSemigroup[101X
  
  [29X[2XCyclesOfTransformationSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe cycles of a transformation semigroup.[133X
  
  [33X[0;0YThis  function  returns the cycles, or strongly connected components, of the
  action of the transformation semigroup [3XS[103X on the set of positive integers not
  greater than the degree of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XTransformation([11, 11, 9, 6, 4, 1, 4, 1, 6, 7, 12, 5]), [127X[104X
    [4X[25X>[125X [27XTransformation([12, 10, 7, 10, 4, 1, 12, 9, 11, 9, 1, 12]));;[127X[104X
    [4X[25Xgap>[125X [27XCyclesOfTransformationSemigroup(S);[127X[104X
    [4X[28X[ [ 12 ], [ 1, 11 ], [ 1, 11, 12, 5, 4, 6 ], [128X[104X
    [4X[28X  [ 1, 11, 12, 5, 4, 10, 9, 6 ], [ 1, 12, 5, 4, 6 ], [128X[104X
    [4X[28X  [ 1, 12, 5, 4, 10, 9, 6 ], [ 1, 12, 5, 4, 10, 9, 11 ], [128X[104X
    [4X[28X  [ 11, 12, 5, 4, 10, 9 ], [ 12, 5, 4, 10, 7 ], [ 4, 10, 7 ] ][128X[104X
  [4X[32X[104X
  
  [1X15.9-4 IsTransitive[101X
  
  [29X[2XIsTransitive[102X( [3XS[103X[, [3XX[103X] ) [32X operation
  [29X[2XIsTransitive[102X( [3XS[103X[, [3Xn[103X] ) [32X operation
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YA  transformation semigroup [3XS[103X is [13Xtransitive[113X or [13Xstrongly connected[113X on the set
  [3XX[103X if for every [10Xi, j[110X in [3XX[103X there is an element [10Xs[110X in [3XS[103X such that [10Xi ^ s = j[110X.[133X
  
  [33X[0;0YIf  the  optional second argument is a positive integer [3Xn[103X, then [10XIsTransitive[110X
  returns [9Xtrue[109X if [3XS[103X is transitive on [10X[1 .. [3Xn[103X[10X][110X, and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YIf  the  optional  second  argument is not provided, then the degree of [3XS[103X is
  used    by    default;   see   [2XDegreeOfTransformationSemigroup[102X   ([14XReference:
  DegreeOfTransformationSemigroup[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([Bipartition([[1, 2], [3, 6, -2], [127X[104X
    [4X[25X>[125X [27X[4, 5, -3, -4], [-1, -6], [-5]]), [127X[104X
    [4X[25X>[125X [27XBipartition([[1, -4], [2, 3, 4, 5], [6], [-1, -6], [127X[104X
    [4X[25X>[125X [27X[-2, -3], [-5]])]);[127X[104X
    [4X[28X<bipartition semigroup of degree 6 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XAsTransformationSemigroup(S);[127X[104X
    [4X[28X<transformation semigroup of degree 12 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsTransitive(last);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsTransitive(AsSemigroup(Group((1,2,3))));[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X15.9-5 SmallestElementSemigroup[101X
  
  [29X[2XSmallestElementSemigroup[102X( [3XS[103X ) [32X attribute
  [29X[2XLargestElementSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA transformation.[133X
  
  [33X[0;0YThese   attributes   return   the   smallest  and  largest  element  of  the
  transformation  semigroup  [3XS[103X, respectively. Smallest means the first element
  in the sorted set of elements of [3XS[103X and largest means the last element in the
  set of elements.[133X
  
  [33X[0;0YIt  is  not necessary to find the elements of the semigroup to determine the
  smallest  or  largest  element,  and  this  function has considerable better
  performance than the equivalent [10XElements([3XS[103X[10X)[1][110X and [10XElements([3XS[103X[10X)[Size([3XS[103X[10X)][110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Monoid([127X[104X
    [4X[25X>[125X [27XTransformation([1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10]), [127X[104X
    [4X[25X>[125X [27XTransformation([2, 4, 4, 2, 10, 5, 11, 11, 11, 6, 7]));[127X[104X
    [4X[28X<transformation monoid of degree 11 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XSmallestElementSemigroup(S);[127X[104X
    [4X[28XIdentityTransformation[128X[104X
    [4X[25Xgap>[125X [27XLargestElementSemigroup(S);[127X[104X
    [4X[28XTransformation( [ 11, 11, 10, 10, 7, 6, 5, 6, 2, 2, 4 ] )[128X[104X
  [4X[32X[104X
  
  [1X15.9-6 GeneratorsSmallest[101X
  
  [29X[2XGeneratorsSmallest[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA generating set of transformations.[133X
  
  [33X[0;0Y[10XGeneratorsSmallest[110X  returns  the  lexicographically  least  collection  [10XX[110X of
  transformations such that [3XS[103X is generated by [10XX[110X and each [10XX[i][110X is not generated
  by [10XX[1], X[2], ..., X[i-1][110X.[133X
  
  [33X[0;0YNote  that  it  can be difficult to find this set of generators, and that it
  might contain a substantial proportion of the elements of the semigroup.[133X
  
  [33X[0;0YThe  comparison  of  two  transformation  semigroups  via  the lexicographic
  comparison   of  their  sets  of  elements  is  the  same  relation  as  the
  lexicographic  comparison  of  their [10XGeneratorsSmallest[110X. However, due to the
  complexity  of  determining  the  [10XGeneratorsSmallest[110X, this is not the method
  used by the [5XSemigroups[105X package when comparing transformation semigroups.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Monoid([127X[104X
    [4X[25X>[125X [27XTransformation([1, 3, 4, 1]), Transformation([2, 4, 1, 2]), [127X[104X
    [4X[25X>[125X [27XTransformation([3, 1, 1, 3]), Transformation([3, 3, 4, 1]));[127X[104X
    [4X[28X<transformation monoid of degree 4 with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XGeneratorsSmallest(S);[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 1, 1 ] ), Transformation( [ 1, 1, 1, 2 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 1, 1, 3 ] ), Transformation( [ 1, 1, 1 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 1, 2, 1 ] ), Transformation( [ 1, 1, 2, 2 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 1, 3, 1 ] ), Transformation( [ 1, 1, 3, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 1 ] ), Transformation( [ 1, 1, 4, 1 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 2, 1, 1 ] ), Transformation( [ 1, 2, 2, 1 ] ), [128X[104X
    [4X[28X  IdentityTransformation, Transformation( [ 1, 3, 1, 1 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 3, 4, 1 ] ), Transformation( [ 2, 1, 1, 2 ] ), [128X[104X
    [4X[28X  Transformation( [ 2, 2, 2 ] ), Transformation( [ 2, 4, 1, 2 ] ), [128X[104X
    [4X[28X  Transformation( [ 3, 3, 3 ] ), Transformation( [ 3, 3, 4, 1 ] ) ][128X[104X
  [4X[32X[104X
  
  
  [1X15.10 [33X[0;0YAttributes of partial perm semigroups[133X[101X
  
  [1X15.10-1 ComponentRepsOfPartialPermSemigroup[101X
  
  [29X[2XComponentRepsOfPartialPermSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe representatives of components of a partial perm semigroup.[133X
  
  [33X[0;0YThis function returns the representatives of the components of the action of
  the  partial  perm  semigroup  [3XS[103X on the set of positive integers where it is
  defined.[133X
  
  [33X[0;0YThe representatives are the least set of points such that every point can be
  reached from some representative under the action of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 3, 5, 6, 7, 8, 11, 12, 16, 19], [127X[104X
    [4X[25X>[125X [27X    [9, 18, 20, 11, 5, 16, 8, 19, 14, 13, 1]), [127X[104X
    [4X[25X>[125X [27X PartialPerm([1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 16, 18, 19, 20], [127X[104X
    [4X[25X>[125X [27X    [13, 1, 8, 5, 4, 14, 11, 12, 9, 20, 2, 18, 7, 3, 19]));;[127X[104X
    [4X[25Xgap>[125X [27XComponentRepsOfPartialPermSemigroup(S);[127X[104X
    [4X[28X[ 1, 4, 6, 10, 15, 17 ][128X[104X
  [4X[32X[104X
  
  [1X15.10-2 ComponentsOfPartialPermSemigroup[101X
  
  [29X[2XComponentsOfPartialPermSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe components of a partial perm semigroup.[133X
  
  [33X[0;0YThis  function  returns  the  components  of  the action of the partial perm
  semigroup  [3XS[103X  on  the  set  of  positive  integers  where it is defined; the
  components of [3XS[103X partition this set.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 3, 5, 6, 7, 8, 11, 12, 16, 19], [127X[104X
    [4X[25X>[125X [27X    [9, 18, 20, 11, 5, 16, 8, 19, 14, 13, 1]), [127X[104X
    [4X[25X>[125X [27X PartialPerm([1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 16, 18, 19, 20], [127X[104X
    [4X[25X>[125X [27X    [13, 1, 8, 5, 4, 14, 11, 12, 9, 20, 2, 18, 7, 3, 19]));;[127X[104X
    [4X[25Xgap>[125X [27XComponentsOfPartialPermSemigroup(S);[127X[104X
    [4X[28X[ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 18, 19, 20 ], [128X[104X
    [4X[28X  [ 15 ], [ 17 ] ][128X[104X
  [4X[32X[104X
  
  [1X15.10-3 CyclesOfPartialPerm[101X
  
  [29X[2XCyclesOfPartialPerm[102X( [3Xx[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe cycles of a partial perm.[133X
  
  [33X[0;0YThis  function  returns the cycles, or strongly connected components, of the
  action  of  the  partial  perm [3Xx[103X on the set of positive integers where it is
  defined.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xx := PartialPerm([1, 2, 3, 4, 5, 8, 10], [127X[104X
    [4X[25X>[125X [27X                     [3, 1, 4, 2, 5, 6, 7]);[127X[104X
    [4X[28X[8,6][10,7](1,3,4,2)(5)[128X[104X
    [4X[25Xgap>[125X [27XCyclesOfPartialPerm(x);[127X[104X
    [4X[28X[ [ 3, 4, 2, 1 ], [ 5 ] ][128X[104X
  [4X[32X[104X
  
  [1X15.10-4 CyclesOfPartialPermSemigroup[101X
  
  [29X[2XCyclesOfPartialPermSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe cycles of a partial perm semigroup.[133X
  
  [33X[0;0YThis  function  returns the cycles, or strongly connected components, of the
  action of the partial perm semigroup [3XS[103X on the set of positive integers where
  it is defined.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm([1, 2, 3, 5, 6, 7, 8, 11, 12, 16, 19], [127X[104X
    [4X[25X>[125X [27X    [9, 18, 20, 11, 5, 16, 8, 19, 14, 13, 1]), [127X[104X
    [4X[25X>[125X [27X PartialPerm([1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 14, 16, 18, 19, 20], [127X[104X
    [4X[25X>[125X [27X    [13, 1, 8, 5, 4, 14, 11, 12, 9, 20, 2, 18, 7, 3, 19]));;[127X[104X
    [4X[25Xgap>[125X [27XCyclesOfPartialPermSemigroup(S);[127X[104X
    [4X[28X[ [ 1, 9, 12, 14, 2, 20, 19, 3, 8, 11 ] ][128X[104X
  [4X[32X[104X
  
  
  [1X15.11 [33X[0;0YAttributes of Rees (0-)matrix semigroups[133X[101X
  
  [1X15.11-1 RZMSDigraph[101X
  
  [29X[2XRZMSDigraph[102X( [3XR[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA digraph.[133X
  
  [33X[0;0YIf  [3XR[103X  is  an  [22Xn[122X  by  [22Xm[122X Rees 0-matrix semigroup [22XM^0[I, T, Λ; P][122X (so that [22XI =
  {1,2,...,n}[122X  and  [22XΛ  =  {1,2,...,m}[122X)  then  [10XRZMSDigraph[110X  returns a symmetric
  bipartite  digraph  with  [22Xn+m[122X  vertices.  An  index [22Xi ∈ I[122X corresponds to the
  vertex [22Xi[122X and an index [22Xj ∈ Λ[122X corresponds to the vertex [22Xj + n[122X.[133X
  
  [33X[0;0YTwo vertices [22Xv[122X and [22Xw[122X in [10XRZMSDigraph([110X[3XR[103X[10X)[110X are adjacent if and only if [22Xv∈ I[122X, [22Xw -
  n∈ Λ[122X, and [10XP[w - n][v][110X [22X≠ 0[122X.[133X
  
  [33X[0;0YThis digraph is commonly called the [13XGraham-Houghton graph[113X of [3XR[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR := PrincipalFactor([127X[104X
    [4X[25X>[125X [27XDClass(FullTransformationMonoid(5),[127X[104X
    [4X[25X>[125X [27X       Transformation( [ 2, 4, 1, 5, 5 ] )));[127X[104X
    [4X[28X<Rees 0-matrix semigroup 10x5 over Group([ (1,2,3,4), (1,2) ])>[128X[104X
    [4X[25Xgap>[125X [27Xgr := RZMSDigraph(R);[127X[104X
    [4X[28X<digraph with 15 vertices, 40 edges>[128X[104X
    [4X[25Xgap>[125X [27Xe := DigraphEdges(gr)[1];[127X[104X
    [4X[28X[ 1, 11 ][128X[104X
    [4X[25Xgap>[125X [27XMatrix(R)[e[2] - 10][e[1]] <> 0;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X15.11-2 RZMSConnectedComponents[101X
  
  [29X[2XRZMSConnectedComponents[102X( [3XR[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe connected components of a Rees 0-matrix semigroup.[133X
  
  [33X[0;0YIf  [3XR[103X  is  an  [22Xn[122X  by  [22Xm[122X Rees 0-matrix semigroup [22XM^0[I, T, Λ; P][122X (so that [22XI =
  {1,2,...,n}[122X  and  [22XΛ  = {1,2,...,m}[122X) then [10XRZMSConnectedComponents[110X returns the
  connected components of [3XR[103X.[133X
  
  [33X[0;0Y[13XConnectedness[113X   is  an  equivalence  relation  on  the  indices  of  [3XR[103X:  the
  equivalence  classes  of the relation are called the [13Xconnected components[113X of
  [3XR[103X, and two indices in [22XI ∪ Λ[122X are connected if and only if their corresponding
  vertices  in  [10XRZMSDigraph([110X[3XR[103X[10X)[110X are connected (see [2XRZMSDigraph[102X ([14X15.11-1[114X)). If [3XR[103X
  has  [22Xn[122X connected components, then [10XRZMSConnectedComponents[110X will return a list
  of pairs:[133X
  
  [33X[0;0Y[10X[ [ [110X[22XI_1, Λ_1[122X[10X ], [110X[22X...[122X[10X, [ [110X[22XI_k, Λ_k[122X[10X ] ][110X[133X
  
  [33X[0;0Ywhere  [22XI  = I_1 ⊔ ⋯ ⊔ I_k[122X, [22XΛ = Λ_1 ⊔ ⋯ ⊔ Λ_k[122X, and for each [22Xl[122X the set [22XI_l∪Λ_l[122X
  is  a  connected  component  of  [3XR[103X.  Note that at most one of [22XI_l[122X and [22XΛ_l[122X is
  possibly  empty.  The  ordering of the connected components in the result in
  unspecified.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR := ReesZeroMatrixSemigroup(SymmetricGroup(5),[127X[104X
    [4X[25X>[125X [27X[ [ (), 0, (1,3), (4,5), 0 ],[127X[104X
    [4X[25X>[125X [27X  [ 0, (), 0, 0, (1,3,4,5) ],[127X[104X
    [4X[25X>[125X [27X  [ 0, 0, (1,5)(2,3), 0, 0 ],[127X[104X
    [4X[25X>[125X [27X  [ 0, (2,3)(1,4), 0, 0, 0 ] ]);[127X[104X
    [4X[28X<Rees 0-matrix semigroup 5x4 over Sym( [ 1 .. 5 ] )>[128X[104X
    [4X[25Xgap>[125X [27XRZMSConnectedComponents(R);[127X[104X
    [4X[28X[ [ [ 1, 3, 4 ], [ 1, 3 ] ], [ [ 2, 5 ], [ 2, 4 ] ] ][128X[104X
  [4X[32X[104X
  
  [1X15.11-3 RZMSNormalization[101X
  
  [29X[2XRZMSNormalization[102X( [3XR[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YAn isomorphism.[133X
  
  [33X[0;0YIf  [3XR[103X  is  an  [22Xn[122X  by  [22Xm[122X  Rees  0-matrix  semigroup  [22XM^0[I,  T,  Λ;  P][122X  then
  [10XRZMSNormalization[110X returns an isomorphism from [3XR[103X to a Rees 0-matrix semigroup
  [22XS  =  M^0[I,  T,  Λ; Q][122X. The structure matrix [22XQ[122X is obtained by [13Xnormalizing[113X [22XP[122X
  (see [2XMatrix[102X ([14XReference: Matrix[114X)) and has the following properties:[133X
  
  [30X    [33X[0;6YThe  matrix [22XQ[122X is in block diagonal form, and the blocks are ordered by
        decreasing  size  along  the  leading  diagonal.  The  blocks  are the
        [2XRZMSConnectedComponents[102X ([14X15.11-2[114X) of [3XS[103X.[133X
  
  [30X    [33X[0;6YIf [22XQ[122X has any rows/columns consisting entries of zeroes, then they will
        be the final rows/columns of [22XQ[122X.[133X
  
  [30X    [33X[0;6YIf  [22XT[122X is a group, then the first non-zero entry of every row and every
        column is equal to [22X1_T[122X.[133X
  
  [30X    [33X[0;6YThe  first  non-zero  entry  of  a row occurs no sooner than the first
        non-zero entry of the previous row.[133X
  
  [30X    [33X[0;6YThe  first  non-zero entry of a column occurs no sooner than the first
        non-zero entry of the previous column.[133X
  
  [33X[0;0YIf  [22XT[122X is a group, then the non-zero entries of [22XQ[122X are chosen so that [22XS[122X has an
  additional  property.  Let the index sets [22XI[122X and [22XΛ[122X be decomposed according to
  the  [2XRZMSConnectedComponents[102X  ([14X15.11-2[114X) of [22XS[122X, giving that [22XI=I_1⊔...⊔ I_k[122X and
  [22XΛ=Λ_1⊔...⊔Λ_k[122X.  For each [22Xr[122X let [22XQ_r[122X be the sub-matrix of [22XQ[122X defined by [22XI_r[122X and
  [22XΛ_r[122X,  and  let [22XT_r[122X be the subgroup of [22XT[122X generated by the non-zero entries of
  [22XQ_r[122X. Then the idempotent generated subsemigroup of [22XS[122X is equal to:[133X
  
  [30X    [33X[0;6Y[22X⋃_r  =  1^k  M^0[I_r,  T_r,  Λ_r, Q_r][122X, where the zeroes of these Rees
        0-matrix semigroups are all identified with the zero of [22XS[122X.[133X
  
  [33X[0;0YThe  normalization  given  by  [10XRZMSNormalization[110X  is  based  on Theorem 2 of
  [Gra68]  and  is  sometimes  called [13XGraham normal form[113X. Note that isomorphic
  Rees 0-matrix semigroups can have normalizations which are not equal.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR := ReesZeroMatrixSemigroup(Group(()),[127X[104X
    [4X[25X>[125X [27X[ [ 0, (), 0 ],[127X[104X
    [4X[25X>[125X [27X  [ (), 0, 0 ],[127X[104X
    [4X[25X>[125X [27X  [ 0, 0, () ] ]);[127X[104X
    [4X[28X<Rees 0-matrix semigroup 3x3 over Group(())>[128X[104X
    [4X[25Xgap>[125X [27Xiso := RZMSNormalization(R);[127X[104X
    [4X[28XMappingByFunction( <Rees 0-matrix semigroup 3x3 over Group(())>, [128X[104X
    [4X[28X<Rees 0-matrix semigroup 3x3 over Group(())>[128X[104X
    [4X[28X , function( x ) ... end, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XS := Range(iso);[127X[104X
    [4X[28X<Rees 0-matrix semigroup 3x3 over Group(())>[128X[104X
    [4X[25Xgap>[125X [27XMatrix(S);[127X[104X
    [4X[28X[ [ (), 0, 0 ], [ 0, (), 0 ], [ 0, 0, () ] ][128X[104X
    [4X[25Xgap>[125X [27XR := ReesZeroMatrixSemigroup(SymmetricGroup(4),[127X[104X
    [4X[25X>[125X [27X[ [ 0, 0, 0, (1,3,2) ],[127X[104X
    [4X[25X>[125X [27X  [ (2,3), 0, 0, 0 ],[127X[104X
    [4X[25X>[125X [27X  [ 0, 0, (1,3), (1,2) ],[127X[104X
    [4X[25X>[125X [27X  [ 0, (4,1,2,3), 0, 0 ] ]);[127X[104X
    [4X[28X<Rees 0-matrix semigroup 4x4 over Sym( [ 1 .. 4 ] )>[128X[104X
    [4X[25Xgap>[125X [27XS := Range(RZMSNormalization(R));[127X[104X
    [4X[28X<Rees 0-matrix semigroup 4x4 over Sym( [ 1 .. 4 ] )>[128X[104X
    [4X[25Xgap>[125X [27XMatrix(S);[127X[104X
    [4X[28X[ [ (), (), 0, 0 ], [ 0, (), 0, 0 ], [ 0, 0, (), 0 ], [ 0, 0, 0, () ] [128X[104X
    [4X[28X ][128X[104X
  [4X[32X[104X
  
  [1X15.11-4 RMSNormalization[101X
  
  [29X[2XRMSNormalization[102X( [3XR[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YAn isomorphism.[133X
  
  [33X[0;0YIf  [3XR[103X  is  a  Rees  matrix  semigroup  over a group [10XG[110X, then [10XRMSNormalization[110X
  returns  an  isomorphism from [3XR[103X to a [13Xnormalized[113X Rees matrix semigroup [10XS[110X over
  [10XG[110X.[133X
  
  [33X[0;0YThe  semigroup [10XS[110X is normalized in the sense that the first entry of each row
  and column of the [2XMatrix[102X ([14XReference: Matrix[114X) of [10XS[110X is the identity of [10XG[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XR := ReesMatrixSemigroup(SymmetricGroup(4),[127X[104X
    [4X[25X>[125X [27X[ [ (1,2), (2,4,3), (2,1,4) ],[127X[104X
    [4X[25X>[125X [27X  [ (1,3,2), (1,2)(3,4), () ],[127X[104X
    [4X[25X>[125X [27X  [ (2,3), (1,3,2,4), (2,3) ] ]);[127X[104X
    [4X[28X<Rees matrix semigroup 3x3 over Sym( [ 1 .. 4 ] )>[128X[104X
    [4X[25Xgap>[125X [27Xiso := RMSNormalization(R);[127X[104X
    [4X[28XMappingByFunction( <Rees matrix semigroup 3x3 over Sym( [ 1 .. 4 ] )>[128X[104X
    [4X[28X , <Rees matrix semigroup 3x3 over Sym( [ 1 .. 4 ] )>[128X[104X
    [4X[28X , function( x ) ... end, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XS := Range(iso);[127X[104X
    [4X[28X<Rees matrix semigroup 3x3 over Sym( [ 1 .. 4 ] )>[128X[104X
    [4X[25Xgap>[125X [27XMatrix(S);[127X[104X
    [4X[28X[ [ (), (), () ], [ (), (1,2), (1,4,2,3) ], [ (), (1,4,2,3), (2,4) ] ][128X[104X
  [4X[32X[104X
  
