  
  [1X4 [33X[0;0YDetermining the structure of a semigroup[133X[101X
  
  [33X[0;0YIn  this chapter we describe the functions in [5XSemigroups[105X for determining the
  structure  of  a  semigroup, in particular for computing Green's classes and
  related properties of semigroups.[133X
  
  
  [1X4.1 [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
  
  [1X4.1-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 ([14X4.1-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 [27Xf:=Transformation( [ 1, 4, 6, 1, 7, 2, 7, 6 ] );;[127X[104X
    [4X[25Xgap>[125X [27XFactorization(S, f);[127X[104X
    [4X[28X[ 4, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(gens, last);[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 [27Xf:=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 [27XFactorization(S, f);[127X[104X
    [4X[28X[ -2, -2, -2, -2, -3, -4, -3, -2, -2, -2, -2, -3, -2, 2, 2, 2, 2, 4, [128X[104X
    [4X[28X  4, 4, 4, 2, 2, 2, 2, 2, 3, 4, -3, -2, -3, -2, -3, -2, 2, 2, 2, 2, [128X[104X
    [4X[28X  2, 3, 4, -3, -2, -3, -2, -3, -2, 2, 2, 2, 2, 2, 3, 4, -3, -2, -3, [128X[104X
    [4X[28X  -2, -3, -2, 2, 2, 2, 2, 2, 3, 4, -3, -2, -3, -2, -3, -2, 2, 2, 2, [128X[104X
    [4X[28X  2, 2, 3, 4, -3, -2, -3, -2, -3, -2, 3, 2, 2, 2, 2, 2, 3, 4, -3, -2, [128X[104X
    [4X[28X  -3, -2, -3, -2, 2, 3, 2, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 3, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(GeneratorsOfSemigroup(S), last); [127X[104X
    [4X[28X[3,7][8,1,2,6,9][10,5][128X[104X
  [4X[32X[104X
  
  [1X4.1-2 Factorization[101X
  
  [29X[2XFactorization[102X( [3XS[103X, [3Xf[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 [3Xf[103X belongs to [3XS[103X, [10XFactorization[110X return a word
        in  the  generators of [3XS[103X that is equal to [3Xf[103X. In this case, a word is a
        list     of    positive    integers    where    [10Xi[110X    corresponds    to
        [10XGeneratorsOfSemigroups(S)[i][110X. More specifically,[133X
  
  [4X      [32X  Example  [32X[104X
          [4X[28XEvaluateWord(GeneratorsOfSemigroup(S), Factorization(S, f))=f;[128X[104X
        [4X[32X[104X
  
  [8Xfor inverse semigroups[108X
        [33X[0;6YWhen [3XS[103X is a inverse semigroup and [3Xf[103X belongs to [3XS[103X, [10XFactorization[110X return
        a word in the generators of [3XS[103X that is equal to [3Xf[103X. In this case, a word
        is   a   list   of   non-zero   integers   where   [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, f))=f;[128X[104X
        [4X[32X[104X
  
  [33X[0;0YNote that [10XFactorization[110X does not return a word of minimum length.[133X
  
  [33X[0;0YSee   also   [2XEvaluateWord[102X   ([14X4.1-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 [27XTransformation( [ 4, 10, 5, 6, 4, 1, 2, 7, 1, 2 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27Xf:=Transformation( [ 1, 10, 2, 10, 1, 2, 7, 10, 2, 7 ] );;[127X[104X
    [4X[25Xgap>[125X [27XFactorization(S, f);[127X[104X
    [4X[28X[ 2, 2, 1, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(gens, last);[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 [27Xf:=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 [27XFactorization(S, f);[127X[104X
    [4X[28X[ -2, -2, -2, -2, -2, -2, -2, 2, 2, 4, 4, 2, 3, 2, 3, -2, -2, -2, 2, [128X[104X
    [4X[28X  3, 2, 3, -2, -2, -2, 2, 3, 2, 3, -2, -2, -2, 3, 2, 3, 2, 3, -2, -2, [128X[104X
    [4X[28X  -2, 3, 2, 3, 2, 3, -2, -2, -2, 2, 3, 2, 3, -2, -2, -2, 2, 3, 2, 3, [128X[104X
    [4X[28X  -2, -2, -2, 2, 3, 2, 3, -2, -2, -2, 2, 3, 2, 3, -2, -2, -2, 3, 2, [128X[104X
    [4X[28X  3, 2, 3, -2, -2, -2, 2, 3, 2, 3, -2, -2, -2, 2, 3, 2, 3, -2, -2, [128X[104X
    [4X[28X  -2, 2, 3, 2, 3, -2, -2, -2, 2, 3, 2, 2, 3, 2, 2, 2, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(GeneratorsOfSemigroup(S), last);[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 [27Xf:=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 [27XFactorization(S, f);[127X[104X
    [4X[28X[ -2, -2, -2, -2, -2, 4, 2 ][128X[104X
    [4X[25Xgap>[125X [27XEvaluateWord(GeneratorsOfSemigroup(S), last);[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
  
  
  [1X4.2 [33X[0;0YCreating Green's classes[133X[101X
  
  
  [1X4.2-1 [33X[0;0YXClassOfYClass[133X[101X
  
  [29X[2XDClassOfHClass[102X( [3Xclass[103X ) [32X method
  [29X[2XDClassOfLClass[102X( [3Xclass[103X ) [32X method
  [29X[2XDClassOfRClass[102X( [3Xclass[103X ) [32X method
  [29X[2XLClassOfHClass[102X( [3Xclass[103X ) [32X method
  [29X[2XRClassOfHClass[102X( [3Xclass[103X ) [32X method
  [6XReturns:[106X  [33X[0;10YA Green's class.[133X
  
  [33X[0;0Y[10XXClassOfYClass[110X  returns the [10XX[110X-class containing the [10XY[110X-class [3Xclass[103X where [10XX[110X and
  [10XY[110X should be replaced by an appropriate choice of [10XD, H, L,[110X and [10XR[110X.[133X
  
  [33X[0;0YNote  that  if  it  is not known to [5XGAP[105X whether or not the representative of
  [3Xclass[103X  is  an  element of the semigroup containing [3Xclass[103X, then no attempt is
  made to check this.[133X
  
  [33X[0;0YThe same result can be produced using:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XFirst(GreensXClasses(S), x-> Representative(x) in class);[128X[104X
  [4X[32X[104X
  
  [33X[0;0Ybut  this  might  be  substantially slower. Note that [10XXClassOfYClass[110X is also
  likely to be faster than[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XGreensXClassOfElement(S, Representative(class));[128X[104X
  [4X[32X[104X
  
  [33X[0;0Y[10XDClass[110X can also be used as a synonym for [10XDClassOfHClass[110X, [10XDClassOfLClass[110X, and
  [10XDClassOfRClass[110X;  [10XLClass[110X  as  a  synonym  for [10XLClassOfHClass[110X; and [10XRClass[110X as a
  synonym  for  [10XRClassOfHClass[110X.  See  also  [2XGreensDClassOfElement[102X  ([14XReference:
  GreensDClassOfElement[114X) and [2XGreensDClassOfElementNC[102X ([14X4.2-3[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 1, 3, 2 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 1, 3 ] ), Transformation( [ 3, 2, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 3, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XR := GreensRClassOfElement(S, Transformation( [ 3, 2, 1 ] ));[127X[104X
    [4X[28X<Green's R-class: Transformation( [ 3, 2, 1 ] )>[128X[104X
    [4X[25Xgap>[125X [27XDClassOfRClass(R);[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 3, 2, 1 ] )>[128X[104X
    [4X[25Xgap>[125X [27XIsGreensDClass(DClassOfRClass(R));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm([ 1, 2, 3, 6, 8, 10 ], [ 2, 6, 7, 9, 1, 5 ]), [127X[104X
    [4X[25X>[125X [27XPartialPerm([ 1, 2, 3, 4, 6, 7, 8, 10 ],[127X[104X
    [4X[25X>[125X [27X[ 3, 8, 1, 9, 4, 10, 5, 6 ]));[127X[104X
    [4X[28X<inverse partial perm semigroup of rank 10 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27Xx := S.1;[127X[104X
    [4X[28X[3,7][8,1,2,6,9][10,5][128X[104X
    [4X[25Xgap>[125X [27XH := HClass(S, x);[127X[104X
    [4X[28X<Green's H-class: [3,7][8,1,2,6,9][10,5]>[128X[104X
    [4X[25Xgap>[125X [27XR := RClassOfHClass(H);[127X[104X
    [4X[28X<Green's R-class: [3,7][8,1,2,6,9][10,5]>[128X[104X
    [4X[25Xgap>[125X [27XL := LClass(H);[127X[104X
    [4X[28X<Green's L-class: <identity partial perm on [ 1, 2, 5, 6, 7, 9 ]>>[128X[104X
    [4X[25Xgap>[125X [27XDClass(R) = DClass(L);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XDClass(H) = DClass(L);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X4.2-2 [33X[0;0YGreensXClassOfElement[133X[101X
  
  [29X[2XGreensDClassOfElement[102X( [3XX[103X, [3Xf[103X ) [32X operation
  [29X[2XDClass[102X( [3XX[103X, [3Xf[103X ) [32X function
  [29X[2XGreensHClassOfElement[102X( [3XX[103X, [3Xf[103X ) [32X operation
  [29X[2XGreensHClassOfElement[102X( [3XR[103X, [3Xi[103X, [3Xj[103X ) [32X operation
  [29X[2XHClass[102X( [3XX[103X, [3Xf[103X ) [32X function
  [29X[2XHClass[102X( [3XR[103X, [3Xi[103X, [3Xj[103X ) [32X function
  [29X[2XGreensLClassOfElement[102X( [3XX[103X, [3Xf[103X ) [32X operation
  [29X[2XLClass[102X( [3XX[103X, [3Xf[103X ) [32X function
  [29X[2XGreensRClassOfElement[102X( [3XX[103X, [3Xf[103X ) [32X operation
  [29X[2XRClass[102X( [3XX[103X, [3Xf[103X ) [32X function
  [6XReturns:[106X  [33X[0;10YA Green's class.[133X
  
  [33X[0;0YThese  functions  produce  essentially  the  same  output as the [5XGAP[105X library
  functions   with  the  same  names;  see  [2XGreensDClassOfElement[102X  ([14XReference:
  GreensDClassOfElement[114X).  The  main difference is that these functions can be
  applied to a wider class of objects:[133X
  
  [8X[10XGreensDClassOfElement[110X and [10XDClass[110X[108X
        [33X[0;6Y[3XX[103X must be a semigroup.[133X
  
  [8X[10XGreensHClassOfElement[110X and [10XHClass[110X[108X
        [33X[0;6Y[3XX[103X can be a semigroup, [13XR[113X-class, [13XL[113X-class, or [13XD[113X-class.[133X
  
        [33X[0;6YIf  [3XR[103X is a [3XIxJ[103X Rees matrix semigroup or a Rees 0-matrix semigroup, and
        [3Xi[103X   and   [3Xj[103X  are  integers  of  the  corresponding  index  sets,  then
        [10XGreensHClassOfElement[110X returns the [13XH[113X-class in row [3Xi[103X and column [3Xj[103X.[133X
  
  [8X[10XGreensLClassOfElement[110X and [10XLClass[110X[108X
        [33X[0;6Y[3XX[103X can be a semigroup or [13XD[113X-class.[133X
  
  [8X[10XGreensRClassOfElement[110X and [10XRClass[110X[108X
        [33X[0;6Y[3XX[103X can be a semigroup or [13XD[113X-class.[133X
  
  [33X[0;0YNote  that  [10XGreensXClassOfElement[110X and [10XXClass[110X are synonyms and have identical
  output. The shorter command is provided for the sake of convenience.[133X
  
  
  [1X4.2-3 [33X[0;0YGreensXClassOfElementNC[133X[101X
  
  [29X[2XGreensDClassOfElementNC[102X( [3XX[103X, [3Xf[103X ) [32X operation
  [29X[2XDClassNC[102X( [3XX[103X, [3Xf[103X ) [32X function
  [29X[2XGreensHClassOfElementNC[102X( [3XX[103X, [3Xf[103X ) [32X operation
  [29X[2XHClassNC[102X( [3XX[103X, [3Xf[103X ) [32X function
  [29X[2XGreensLClassOfElementNC[102X( [3XX[103X, [3Xf[103X ) [32X operation
  [29X[2XLClassNC[102X( [3XX[103X, [3Xf[103X ) [32X function
  [29X[2XGreensRClassOfElementNC[102X( [3XX[103X, [3Xf[103X ) [32X operation
  [29X[2XRClassNC[102X( [3XX[103X, [3Xf[103X ) [32X function
  [6XReturns:[106X  [33X[0;10YA Green's class.[133X
  
  [33X[0;0YThese  functions  are  essentially the same as [2XGreensDClassOfElement[102X ([14X4.2-2[114X)
  except  that  no  effort  is  made  to  verify if [3Xf[103X is an element of [3XX[103X. More
  precisely, [10XGreensXClassOfElementNC[110X and [10XXClassNC[110X first check if [3Xf[103X has already
  been  shown  to  be  an  element  of [3XX[103X. If it is not known to [5XGAP[105X if [3Xf[103X is an
  element of [3XX[103X, then no further attempt to verify this is made.[133X
  
  [33X[0;0YNote  that  [10XGreensXClassOfElementNC[110X  and  [10XXClassNC[110X  are  synonyms  and  have
  identical   output.  The  shorter  command  is  provided  for  the  sake  of
  convenience.[133X
  
  [33X[0;0YIt   can   be   quicker   to   compute   the   class  of  an  element  using
  [10XGreensRClassOfElementNC[110X,  say,  than  using  [10XGreensRClassOfElement[110X  if it is
  known  [13Xa priori[113X that [3Xf[103X is an element of [3XX[103X. On the other hand, if [3Xf[103X is not an
  element of [3XX[103X, then the results of this computation are unpredictable.[133X
  
  [33X[0;0YFor example, if[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28Xx := Transformation( [ 15, 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20 ] );[128X[104X
  [4X[32X[104X
  
  [33X[0;0Yin the semigroup [3XX[103X of order-preserving mappings on 20 points, then[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XGreensRClassOfElementNC(X, x);[128X[104X
  [4X[32X[104X
  
  [33X[0;0Yreturns an answer relatively quickly, whereas[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XGreensRClassOfElement(X, x)[128X[104X
  [4X[32X[104X
  
  [33X[0;0Ycan take a signficant amount of time to return a value.[133X
  
  [33X[0;0YSee   also   [2XGreensRClassOfElement[102X  ([14XReference:  GreensRClassOfElement[114X)  and
  [2XRClassOfHClass[102X ([14X4.2-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := RandomTransformationSemigroup(2,1000);;[127X[104X
    [4X[25Xgap>[125X [27Xx := [ 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1 ];;[127X[104X
    [4X[25Xgap>[125X [27Xx := EvaluateWord(Generators(S), x);;                            [127X[104X
    [4X[25Xgap>[125X [27XR := GreensRClassOfElementNC(S, x);;[127X[104X
    [4X[25Xgap>[125X [27XSize(R);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XL := GreensLClassOfElementNC(S, x);;[127X[104X
    [4X[25Xgap>[125X [27XSize(L);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27Xx := PartialPerm([ 1, 2, 3, 4, 7, 8, 9, 10 ],[127X[104X
    [4X[25X>[125X [27X[ 2, 3, 4, 5, 6, 8, 10, 11 ]);;[127X[104X
    [4X[25Xgap>[125X [27XL := LClass(POI(13), x);[127X[104X
    [4X[28X<Green's L-class: [1,2,3,4,5,6,8,11][7,10]>[128X[104X
    [4X[25Xgap>[125X [27XSize(L);[127X[104X
    [4X[28X1287[128X[104X
  [4X[32X[104X
  
  [1X4.2-4 GroupHClass[101X
  
  [29X[2XGroupHClass[102X( [3Xclass[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA  group [13XH[113X-class of the [13XD[113X-class [3Xclass[103X if it is regular and [9Xfail[109X if
            it is not.[133X
  
  [33X[0;0Y[10XGroupHClass[110X   is   a   synonym   for  [2XGroupHClassOfGreensDClass[102X  ([14XReference:
  GroupHClassOfGreensDClass[114X).[133X
  
  [33X[0;0YSee   also   [2XIsGroupHClass[102X   ([14XReference:   IsGroupHClass[114X),   [2XIsRegularDClass[102X
  ([14XReference: IsRegularDClass[114X), [2XIsRegularClass[102X ([14X4.4-4[114X), and [2XIsRegularSemigroup[102X
  ([14X4.6-14[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 2, 6, 7, 2, 6, 1, 1, 5 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 8, 1, 4, 5, 6, 7, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsRegularSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xiter := IteratorOfDClasses(S);;[127X[104X
    [4X[25Xgap>[125X [27Xrepeat D := NextIterator(iter); until IsRegularDClass(D);   [127X[104X
    [4X[25Xgap>[125X [27XD;[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 6, 1, 1, 6, 1, 2, 2, 6 ] )>[128X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(D);[127X[104X
    [4X[28X12[128X[104X
    [4X[25Xgap>[125X [27XNrRClasses(D);[127X[104X
    [4X[28X8[128X[104X
    [4X[25Xgap>[125X [27XNrLClasses(D);[127X[104X
    [4X[28X4[128X[104X
    [4X[25Xgap>[125X [27XGroupHClass(D);[127X[104X
    [4X[28X<Green's H-class: Transformation( [ 1, 2, 2, 1, 2, 6, 6, 1 ] )>[128X[104X
    [4X[25Xgap>[125X [27XGroupHClassOfGreensDClass(D);[127X[104X
    [4X[28X<Green's H-class: Transformation( [ 1, 2, 2, 1, 2, 6, 6, 1 ] )>[128X[104X
    [4X[25Xgap>[125X [27XStructureDescription(GroupHClass(D));[127X[104X
    [4X[28X"S3"[128X[104X
    [4X[25Xgap>[125X [27Xrepeat D := NextIterator(iter); until not IsRegularDClass(D);[127X[104X
    [4X[25Xgap>[125X [27XD;[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 7, 5, 2, 2, 6, 1, 1, 2 ] )>[128X[104X
    [4X[25Xgap>[125X [27XIsRegularDClass(D);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XGroupHClass(D);[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup( [ PartialPerm( [ 1, 2, 3, 5 ], [ 2, 1, 6, 3 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 6 ], [ 3, 5, 2, 6 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27Xx := PartialPerm([ 1 .. 3 ], [ 6, 3, 1 ]);;[127X[104X
    [4X[25Xgap>[125X [27XFirst(DClasses(S), x-> not IsTrivial(GroupHClass(x)));[127X[104X
    [4X[28X<Green's D-class: <identity partial perm on [ 1, 2 ]>>[128X[104X
    [4X[25Xgap>[125X [27XStructureDescription(GroupHClass(last));[127X[104X
    [4X[28X"C2"[128X[104X
  [4X[32X[104X
  
  
  [1X4.3 [33X[0;0YIterators and enumerators of classes and representatives[133X[101X
  
  
  [1X4.3-1 [33X[0;0YGreensXClasses[133X[101X
  
  [29X[2XGreensDClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XDClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XGreensHClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XHClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XGreensJClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XJClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XGreensLClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XLClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XGreensRClasses[102X( [3Xobj[103X ) [32X method
  [29X[2XRClasses[102X( [3Xobj[103X ) [32X method
  [6XReturns:[106X  [33X[0;10YA list of Green's classes.[133X
  
  [33X[0;0YThese  functions  produce  essentially  the  same  output as the [5XGAP[105X library
  functions    with   the   same   names;   see   [2XGreensDClasses[102X   ([14XReference:
  GreensDClasses[114X).  The main difference is that these functions can be applied
  to a wider class of objects:[133X
  
  [8X[10XGreensDClasses[110X and [10XDClasses[110X[108X
        [33X[0;6Y[3XX[103X should be a semigroup.[133X
  
  [8X[10XGreensHClasses[110X and [10XHClasses[110X[108X
        [33X[0;6Y[3XX[103X can be a semigroup, [13XR[113X-class, [13XL[113X-class, or [13XD[113X-class.[133X
  
  [8X[10XGreensLClasses[110X and [10XLClasses[110X[108X
        [33X[0;6Y[3XX[103X can be a semigroup or [13XD[113X-class.[133X
  
  [8X[10XGreensRClasses[110X and [10XRClasses[110X[108X
        [33X[0;6Y[3XX[103X can be a semigroup or [13XD[113X-class.[133X
  
  [33X[0;0YNote  that  [10XGreensXClasses[110X  and  [10XXClasses[110X  are  synonyms  and have identical
  output. The shorter command is provided for the sake of convenience.[133X
  
  [33X[0;0YSee     also     [2XDClassReps[102X     ([14X4.3-4[114X),    [2XIteratorOfDClassReps[102X    ([14X4.3-2[114X),
  [2XIteratorOfDClasses[102X ([14X4.3-3[114X), and [2XNrDClasses[102X ([14X4.4-6[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 3, 4, 4, 4 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 4, 3, 1, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XGreensDClasses(S);[127X[104X
    [4X[28X[ <Green's D-class: Transformation( [ 3, 4, 4, 4 ] )>, [128X[104X
    [4X[28X  <Green's D-class: Transformation( [ 4, 3, 1, 2 ] )>, [128X[104X
    [4X[28X  <Green's D-class: Transformation( [ 4, 4, 4, 4 ] )> ][128X[104X
    [4X[25Xgap>[125X [27XGreensRClasses(S);[127X[104X
    [4X[28X[ <Green's R-class: Transformation( [ 3, 4, 4, 4 ] )>, [128X[104X
    [4X[28X  <Green's R-class: Transformation( [ 4, 3, 1, 2 ] )>, [128X[104X
    [4X[28X  <Green's R-class: Transformation( [ 4, 4, 4, 4 ] )>, [128X[104X
    [4X[28X  <Green's R-class: Transformation( [ 4, 4, 3, 4 ] )>, [128X[104X
    [4X[28X  <Green's R-class: Transformation( [ 4, 3, 4, 4 ] )>, [128X[104X
    [4X[28X  <Green's R-class: Transformation( [ 4, 4, 4, 3 ] )> ][128X[104X
    [4X[25Xgap>[125X [27XD := GreensDClasses(S)[1];[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 3, 4, 4, 4 ] )>[128X[104X
    [4X[25Xgap>[125X [27XGreensLClasses(D);[127X[104X
    [4X[28X[ <Green's L-class: Transformation( [ 3, 4, 4, 4 ] )>, [128X[104X
    [4X[28X  <Green's L-class: Transformation( [ 1, 2, 2, 2 ] )> ][128X[104X
    [4X[25Xgap>[125X [27XGreensRClasses(D);[127X[104X
    [4X[28X[ <Green's R-class: Transformation( [ 3, 4, 4, 4 ] )>, [128X[104X
    [4X[28X  <Green's R-class: Transformation( [ 4, 4, 3, 4 ] )>, [128X[104X
    [4X[28X  <Green's R-class: Transformation( [ 4, 3, 4, 4 ] )>, [128X[104X
    [4X[28X  <Green's R-class: Transformation( [ 4, 4, 4, 3 ] )> ][128X[104X
    [4X[25Xgap>[125X [27XR := GreensRClasses(D)[1];[127X[104X
    [4X[28X<Green's R-class: Transformation( [ 3, 4, 4, 4 ] )>[128X[104X
    [4X[25Xgap>[125X [27XGreensHClasses(R);[127X[104X
    [4X[28X[ <Green's H-class: Transformation( [ 3, 4, 4, 4 ] )>, [128X[104X
    [4X[28X  <Green's H-class: Transformation( [ 1, 2, 2, 2 ] )> ][128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup( PartialPerm( [ 1, 2, 3 ], [ 2, 4, 1 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4 ], [ 3, 4, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XGreensDClasses(S);[127X[104X
    [4X[28X[ <Green's D-class: <identity partial perm on [ 1, 2, 4 ]>>, [128X[104X
    [4X[28X  <Green's D-class: <identity partial perm on [ 1, 3, 4 ]>>, [128X[104X
    [4X[28X  <Green's D-class: <identity partial perm on [ 2, 4 ]>>, [128X[104X
    [4X[28X  <Green's D-class: <identity partial perm on [ 4 ]>>, [128X[104X
    [4X[28X  <Green's D-class: <empty partial perm>> ][128X[104X
    [4X[25Xgap>[125X [27XGreensLClasses(S);[127X[104X
    [4X[28X[ <Green's L-class: <identity partial perm on [ 1, 2, 4 ]>>, [128X[104X
    [4X[28X  <Green's L-class: [4,2,1,3]>, [128X[104X
    [4X[28X  <Green's L-class: <identity partial perm on [ 1, 3, 4 ]>>, [128X[104X
    [4X[28X  <Green's L-class: <identity partial perm on [ 2, 4 ]>>, [128X[104X
    [4X[28X  <Green's L-class: [2,3][4,1]>, <Green's L-class: [4,2,1]>, [128X[104X
    [4X[28X  <Green's L-class: [4,2,3]>, <Green's L-class: [2,4,3]>, [128X[104X
    [4X[28X  <Green's L-class: [2,1](4)>, [128X[104X
    [4X[28X  <Green's L-class: <identity partial perm on [ 4 ]>>, [128X[104X
    [4X[28X  <Green's L-class: [4,1]>, <Green's L-class: [4,3]>, [128X[104X
    [4X[28X  <Green's L-class: [4,2]>, <Green's L-class: <empty partial perm>> ][128X[104X
    [4X[25Xgap>[125X [27XD := GreensDClasses(S)[3];[127X[104X
    [4X[28X<Green's D-class: <identity partial perm on [ 2, 4 ]>>[128X[104X
    [4X[25Xgap>[125X [27XGreensLClasses(D);[127X[104X
    [4X[28X[ <Green's L-class: <identity partial perm on [ 2, 4 ]>>, [128X[104X
    [4X[28X  <Green's L-class: [2,3][4,1]>, <Green's L-class: [4,2,1]>, [128X[104X
    [4X[28X  <Green's L-class: [4,2,3]>, <Green's L-class: [2,4,3]>, [128X[104X
    [4X[28X  <Green's L-class: [2,1](4)> ][128X[104X
    [4X[25Xgap>[125X [27XGreensRClasses(D);[127X[104X
    [4X[28X[ <Green's R-class: <identity partial perm on [ 2, 4 ]>>, [128X[104X
    [4X[28X  <Green's R-class: [1,4][3,2]>, <Green's R-class: [1,2,4]>, [128X[104X
    [4X[28X  <Green's R-class: [3,2,4]>, <Green's R-class: [3,4,2]>, [128X[104X
    [4X[28X  <Green's R-class: [1,2](4)> ][128X[104X
  [4X[32X[104X
  
  
  [1X4.3-2 [33X[0;0YIteratorOfXClassReps[133X[101X
  
  [29X[2XIteratorOfDClassReps[102X( [3XS[103X ) [32X function
  [29X[2XIteratorOfHClassReps[102X( [3XS[103X ) [32X function
  [29X[2XIteratorOfLClassReps[102X( [3XS[103X ) [32X function
  [29X[2XIteratorOfRClassReps[102X( [3XS[103X ) [32X function
  [6XReturns:[106X  [33X[0;10YAn iterator.[133X
  
  [33X[0;0YReturns  an iterator of the representatives of the Green's classes contained
  in  the  semigroup  [3XS[103X.  See  [14X'Reference:  Iterators'[114X for more information on
  iterators.[133X
  
  [33X[0;0YSee also [2XGreensRClasses[102X ([14XReference: GreensRClasses[114X), [2XGreensRClasses[102X ([14X4.3-1[114X),
  and [2XIteratorOfRClasses[102X ([14X4.3-3[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 3, 2, 1, 5, 4 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 4, 3, 2, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 4, 3, 2, 1 ] ), Transformation( [ 5, 5, 4, 5, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 4, 5, 4, 3, 3 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27Xiter := IteratorOfRClassReps(S);[127X[104X
    [4X[28X<iterator>[128X[104X
    [4X[25Xgap>[125X [27XNextIterator(iter);[127X[104X
    [4X[28XTransformation( [ 3, 2, 1, 5, 4 ] )[128X[104X
    [4X[25Xgap>[125X [27XNextIterator(iter);[127X[104X
    [4X[28XTransformation( [ 5, 5, 4, 5, 1 ] )[128X[104X
    [4X[25Xgap>[125X [27Xiter;[127X[104X
    [4X[28X<iterator>[128X[104X
    [4X[25Xgap>[125X [27Xfile := Concatenation(SemigroupsDir(), "/tst/test.gz");;[127X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup(ReadGenerators(file, 1377));[127X[104X
    [4X[28X<inverse partial perm semigroup of rank 983 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XNrMovedPoints(S);[127X[104X
    [4X[28X983[128X[104X
    [4X[25Xgap>[125X [27Xiter := IteratorOfLClassReps(S);[127X[104X
    [4X[28X<iterator>[128X[104X
    [4X[25Xgap>[125X [27XNextIterator(iter);[127X[104X
    [4X[28X<partial perm on 634 pts with degree 1000, codegree 1000>[128X[104X
  [4X[32X[104X
  
  
  [1X4.3-3 [33X[0;0YIteratorOfXClasses[133X[101X
  
  [29X[2XIteratorOfDClasses[102X( [3XS[103X ) [32X function
  [29X[2XIteratorOfHClasses[102X( [3XS[103X ) [32X function
  [29X[2XIteratorOfLClasses[102X( [3XS[103X ) [32X function
  [29X[2XIteratorOfRClasses[102X( [3XS[103X ) [32X function
  [6XReturns:[106X  [33X[0;10YAn iterator.[133X
  
  [33X[0;0YReturns  an  iterator  of  the  Green's  classes  in  the  semigroup  [3XS[103X. See
  [14X'Reference: Iterators'[114X for more information on iterators.[133X
  
  [33X[0;0YThis function is useful if you are, for example, looking for an [13XR[113X-class of a
  semigroup  with a particular property but do not necessarily want to compute
  all of the [13XR[113X-classes.[133X
  
  [33X[0;0YSee also [2XGreensRClasses[102X ([14X4.3-1[114X), [2XGreensRClasses[102X ([14XReference: GreensRClasses[114X),
  [2XNrRClasses[102X ([14X4.4-6[114X), and [2XIteratorOfRClassReps[102X ([14X4.3-2[114X).[133X
  
  [33X[0;0YThe  transformation semigroup in the example below has 25147892 elements but
  it  only  takes  a  fraction  of a second to find a non-trivial [13XR[113X-class. The
  inverse  semigroup  of  partial  permutations  in the example below has size
  158122047816  but  it  only  takes a fraction of a second to find an [13XR[113X-class
  with more than 1000 elements.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 2, 4, 1, 5, 4, 4, 7, 3, 8, 1 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 3, 2, 8, 8, 4, 4, 8, 6, 5, 7 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 4, 10, 6, 6, 1, 2, 4, 10, 9, 7 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 6, 2, 2, 4, 9, 9, 5, 10, 1, 8 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 6, 4, 1, 6, 6, 8, 9, 6, 2, 2 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 6, 8, 1, 10, 6, 4, 9, 1, 9, 4 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 8, 6, 2, 3, 3, 4, 8, 6, 2, 9 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 9, 1, 2, 8, 1, 5, 9, 9, 9, 5 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 9, 3, 1, 5, 10, 3, 4, 6, 10, 2 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 10, 7, 3, 7, 1, 9, 8, 8, 4, 10 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27Xiter := IteratorOfRClasses(S);[127X[104X
    [4X[28X<iterator>[128X[104X
    [4X[25Xgap>[125X [27Xfor R in iter do[127X[104X
    [4X[25X>[125X [27Xif Size(R)>1 then break; fi;[127X[104X
    [4X[25X>[125X [27Xod;[127X[104X
    [4X[25Xgap>[125X [27XR;[127X[104X
    [4X[28X<Green's R-class: Transformation( [ 6, 4, 1, 6, 6, 8, 9, 6, 2, 2 ] )>[128X[104X
    [4X[25Xgap>[125X [27XSize(R);[127X[104X
    [4X[28X21600[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27X[ PartialPerm( [ 1, 2, 3, 4, 5, 6, 7, 10, 11, 19, 20 ], [127X[104X
    [4X[25X>[125X [27X[ 19, 4, 11, 15, 3, 20, 1, 14, 8, 13, 17 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 6, 7, 8, 14, 15, 16, 17 ], [127X[104X
    [4X[25X>[125X [27X[ 15, 14, 20, 19, 4, 5, 1, 13, 11, 10, 3 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 4, 6, 7, 8, 9, 10, 14, 15, 18 ], [127X[104X
    [4X[25X>[125X [27X[ 7, 2, 17, 10, 1, 19, 9, 3, 11, 16, 18 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 16 ], [127X[104X
    [4X[25X>[125X [27X[ 8, 3, 18, 1, 4, 13, 12, 7, 19, 20, 2, 11 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 5, 6, 7, 9, 11, 15, 16, 17, 20 ], [127X[104X
    [4X[25X>[125X [27X[ 7, 17, 13, 4, 6, 9, 18, 10, 11, 19, 5, 2, 8 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 18 ], [127X[104X
    [4X[25X>[125X [27X[ 10, 20, 11, 7, 13, 8, 4, 9, 2, 18, 17, 6, 15 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 17, 18 ], [127X[104X
    [4X[25X>[125X [27X[ 10, 20, 18, 1, 14, 16, 9, 5, 15, 4, 8, 12, 19, 11 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 15, 16, 19, 20 ], [127X[104X
    [4X[25X>[125X [27X[ 13, 6, 1, 2, 11, 7, 16, 18, 9, 10, 4, 14, 15, 5, 17 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 20 ], [127X[104X
    [4X[25X>[125X [27X[ 5, 3, 12, 9, 20, 15, 8, 16, 13, 1, 17, 11, 14, 10, 2 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 17, 18, 19, 20 ], [127X[104X
    [4X[25X>[125X [27X[ 8, 3, 9, 20, 2, 12, 14, 15, 4, 18, 13, 1, 17, 19, 5 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27Xiter := IteratorOfRClasses(S);[127X[104X
    [4X[28X<iterator>[128X[104X
    [4X[25Xgap>[125X [27Xrepeat r := NextIterator(iter); until Size(r)>1000;[127X[104X
    [4X[25Xgap>[125X [27Xr;[127X[104X
    [4X[28X<Green's R-class: [8,3][11,5][13,1][15,2][17,6][19,7]>[128X[104X
    [4X[25Xgap>[125X [27XSize(r);[127X[104X
    [4X[28X10020240[128X[104X
  [4X[32X[104X
  
  
  [1X4.3-4 [33X[0;0YXClassReps[133X[101X
  
  [29X[2XDClassReps[102X( [3Xobj[103X ) [32X attribute
  [29X[2XHClassReps[102X( [3Xobj[103X ) [32X attribute
  [29X[2XLClassReps[102X( [3Xobj[103X ) [32X attribute
  [29X[2XRClassReps[102X( [3Xobj[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA list of representatives.[133X
  
  [33X[0;0Y[10XXClassReps[110X  returns  a list of the representatives of the Green's classes of
  [3Xobj[103X, which can be a semigroup, [13XD[113X-, [13XL[113X-, or [13XR[113X-class where appropriate.[133X
  
  [33X[0;0YThe same output can be obtained by calling, for example:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XList(GreensXClasses(obj), Representative);[128X[104X
  [4X[32X[104X
  
  [33X[0;0YNote  that  if  the  Green's  classes  themselves  are  not  required,  then
  [10XXClassReps[110X  will  return  an  answer  more quickly than the above, since the
  Green's class objects are not created.[133X
  
  [33X[0;0YSee    also    [2XGreensDClasses[102X    ([14X4.3-1[114X),    [2XIteratorOfDClassReps[102X   ([14X4.3-2[114X),
  [2XIteratorOfDClasses[102X ([14X4.3-3[114X), and [2XNrDClasses[102X ([14X4.4-6[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 3, 4, 4, 4 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 4, 3, 1, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XDClassReps(S);[127X[104X
    [4X[28X[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 3, 1, 2 ] ), [128X[104X
    [4X[28X  Transformation( [ 4, 4, 4, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XLClassReps(S);[127X[104X
    [4X[28X[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ), [128X[104X
    [4X[28X  Transformation( [ 4, 3, 1, 2 ] ), Transformation( [ 4, 4, 4, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 2, 2, 2, 2 ] ), Transformation( [ 3, 3, 3, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 1, 1, 1 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XD := GreensDClasses(S)[1];[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 3, 4, 4, 4 ] )>[128X[104X
    [4X[25Xgap>[125X [27XLClassReps(D);[127X[104X
    [4X[28X[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XRClassReps(D);[127X[104X
    [4X[28X[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 4, 4, 3, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 4, 3, 4, 4 ] ), Transformation( [ 4, 4, 4, 3 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XR := GreensRClasses(D)[1];;[127X[104X
    [4X[25Xgap>[125X [27XHClassReps(R);[127X[104X
    [4X[28X[ Transformation( [ 3, 4, 4, 4 ] ), Transformation( [ 1, 2, 2, 2 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(6);;[127X[104X
    [4X[25Xgap>[125X [27Xe := InverseSemigroup(Idempotents(S));;[127X[104X
    [4X[25Xgap>[125X [27XM := MunnSemigroup(e);;[127X[104X
    [4X[25Xgap>[125X [27XDClassReps(M);[127X[104X
    [4X[28X[ <identity partial perm on [ 51 ]>, [128X[104X
    [4X[28X  <identity partial perm on [ 27, 51 ]>, [128X[104X
    [4X[28X  <identity partial perm on [ 15, 27, 50, 51 ]>, [128X[104X
    [4X[28X  <identity partial perm on [ 8, 15, 26, 27, 49, 50, 51, 64 ]>, [128X[104X
    [4X[28X  <identity partial perm on [128X[104X
    [4X[28X    [ 4, 8, 14, 15, 25, 26, 27, 48, 49, 50, 51, 60, 61, 62, 63, 64 ]>,[128X[104X
    [4X[28X  <identity partial perm on [128X[104X
    [4X[28X    [ 2, 4, 7, 8, 13, 14, 15, 21, 25, 26, 27, 29, 34, 39, 44, 48, 49, \[128X[104X
    [4X[28X50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ]>, [128X[104X
    [4X[28X  <identity partial perm on [128X[104X
    [4X[28X    [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1\[128X[104X
    [4X[28X9, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,\[128X[104X
    [4X[28X 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 5\[128X[104X
    [4X[28X4, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64 ]> ][128X[104X
    [4X[25Xgap>[125X [27XL := LClassNC(M, PartialPerm( [ 51, 63 ], [ 51, 47 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XHClassReps(L);[127X[104X
    [4X[28X[ <identity partial perm on [ 47, 51 ]>, [27,47](51), [50,47](51), [128X[104X
    [4X[28X  [59,47](51), [63,47](51), [64,47](51) ][128X[104X
  [4X[32X[104X
  
  
  [1X4.4 [33X[0;0YAttributes and properties directly related to Green's classes[133X[101X
  
  
  [1X4.4-1 [33X[0;0YLess than for Green's classes[133X[101X
  
  [29X[2X\<[102X( [3Xleft-expr[103X, [3Xright-expr[103X ) [32X method
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YThe  Green's  class  [3Xleft-expr[103X  is  less than or equal to [3Xright-expr[103X if they
  belong  to  the  same  semigroup and the representative of [3Xleft-expr[103X is less
  than  the  representative  of  [3Xright-expr[103X  under  [10X<[110X; see also [2XRepresentative[102X
  ([14XReference: Representative[114X).[133X
  
  [33X[0;0YPlease  note  that  this  is not the usual order on the Green's classes of a
  semigroup   as   defined   in   [14X'Reference:  Green's  Relations'[114X.  See  also
  [2XIsGreensLessThanOrEqual[102X ([14XReference: IsGreensLessThanOrEqual[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := FullTransformationSemigroup(4);;[127X[104X
    [4X[25Xgap>[125X [27XA := GreensRClassOfElement(S, Transformation( [ 2, 1, 3, 1 ] ));[127X[104X
    [4X[28X<Green's R-class: Transformation( [ 2, 1, 3, 1 ] )>[128X[104X
    [4X[25Xgap>[125X [27XB := GreensRClassOfElement(S, Transformation( [ 1, 2, 3, 4 ] ));[127X[104X
    [4X[28X<Green's R-class: IdentityTransformation>[128X[104X
    [4X[25Xgap>[125X [27XA < B;[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XB < A;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(A,B);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(B,A);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(4);;[127X[104X
    [4X[25Xgap>[125X [27XA := GreensJClassOfElement(S, PartialPerm([ 1 .. 3 ], [ 1, 3, 4 ]) );[127X[104X
    [4X[28X<Green's D-class: <identity partial perm on [ 1, 2, 3 ]>>[128X[104X
    [4X[25Xgap>[125X [27XB := GreensJClassOfElement(S, PartialPerm([ 1, 2 ], [ 3, 1 ]) );[127X[104X
    [4X[28X<Green's D-class: <identity partial perm on [ 1, 2 ]>>[128X[104X
    [4X[25Xgap>[125X [27XA < B;[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XB < A;[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(A, B);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(B, A);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.4-2 InjectionPrincipalFactor[101X
  
  [29X[2XInjectionPrincipalFactor[102X( [3XD[103X ) [32X attribute
  [29X[2XIsomorphismReesMatrixSemigroup[102X( [3XD[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA injective mapping.[133X
  
  [33X[0;0YIf  the  [13XD[113X-class  [3XD[103X  is  a subsemigroup of a semigroup [10XS[110X, then the [13Xprincipal
  factor[113X  of  [3XD[103X  is  just  [3XD[103X itself. If [3XD[103X is not a subsemigroup of [10XS[110X, then the
  principal  factor  of [3XD[103X is the semigroup with elements [3XD[103X and a new element [10X0[110X
  with multiplication of [22Xx,y∈ D[122X defined by:[133X
  
  [33X[0;0Y[10Xxy[110X equals the product of [10Xx[110X and [10Xy[110X if it belongs to [3XD[103X and [10X0[110X if it does not.[133X
  
  [33X[0;0Y[10XInjectionPrincipalFactor[110X returns an injective function from the [13XD[113X-class [3XD[103X to
  a  Rees  matrix  semigroup,  which  contains  the principal factor of [3XD[103X as a
  subsemigroup.[133X
  
  [33X[0;0YIf  [3XD[103X  is a subsemigroup of its parent semigroup, then the function returned
  by   [10XInjectionPrincipalFactor[110X   or   [10XIsomorphismReesMatrixSemigroup[110X   is  an
  isomorphism  from  [3XD[103X  to  a  Rees  matrix semigroup; see [2XReesMatrixSemigroup[102X
  ([14XReference: ReesMatrixSemigroup[114X).[133X
  
  [33X[0;0YIf    [3XD[103X    is   not   a   semigroup,   then   the   function   returned   by
  [10XInjectionPrincipalFactor[110X  is an injective function from [3XD[103X to a Rees 0-matrix
  semigroup    isomorphic    to    the    principal    factor    of   [3XD[103X;   see
  [2XReesZeroMatrixSemigroup[102X  ([14XReference: ReesZeroMatrixSemigroup[114X). In this case,
  [10XIsomorphismReesMatrixSemigroup[110X returns an error.[133X
  
  [33X[0;0YSee also [2XPrincipalFactor[102X ([14X4.4-3[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X    gap> S := InverseSemigroup([128X[104X
    [4X[28X    > PartialPerm( [ 1, 2, 3, 6, 8, 10 ], [ 2, 6, 7, 9, 1, 5 ] ),[128X[104X
    [4X[28X    > PartialPerm( [ 1, 2, 3, 4, 6, 7, 8, 10 ], [128X[104X
    [4X[28X    > [ 3, 8, 1, 9, 4, 10, 5, 6 ] ) );;[128X[104X
    [4X[28X    gap> x := PartialPerm([ 1, 2, 5, 6, 7, 9 ], [ 1, 2, 5, 6, 7, 9 ]);;[128X[104X
    [4X[28X    gap> d := GreensDClassOfElement(S, x);[128X[104X
    [4X[28X    <Green's D-class: <identity partial perm on [ 1, 2, 5, 6, 7, 9 ]>>[128X[104X
    [4X[28X    gap> InjectionPrincipalFactor(d);;[128X[104X
    [4X[28X    gap> rms := Range(last);[128X[104X
    [4X[28X    <Rees 0-matrix semigroup 3x3 over Group(())>[128X[104X
    [4X[28X    gap> MatrixOfReesZeroMatrixSemigroup(rms);[128X[104X
    [4X[28X    [ [ (), 0, 0 ], [ 0, (), 0 ], [ 0, 0, () ] ][128X[104X
    [4X[28X    gap> Size(rms);[128X[104X
    [4X[28X    10[128X[104X
    [4X[28X    gap> Size(d);[128X[104X
    [4X[28X    9[128X[104X
    [4X[28X    gap> S := Semigroup([128X[104X
    [4X[28X    > Bipartition( [ [ 1, 2, 3, -3, -5 ], [ 4 ], [ 5, -2 ], [ -1, -4 ] ] ), [128X[104X
    [4X[28X    > Bipartition( [ [ 1, 3, 5 ], [ 2, 4, -3 ], [ -1, -2, -4, -5 ] ] ), [128X[104X
    [4X[28X    > Bipartition( [ [ 1, 5, -2, -4 ], [ 2, 3, 4, -1, -5 ], [ -3 ] ] ), [128X[104X
    [4X[28X    > Bipartition( [ [ 1, 5, -1, -2, -3 ], [ 2, 4, -4 ], [ 3, -5 ] ] ) );;[128X[104X
    [4X[28X    gap> D := DClasses(S)[3];[128X[104X
    [4X[28X    <Green's D-class: <bipartition: [ 1, 5, -2, -4 ], [ 2, 3, 4, -1, -5 ][128X[104X
    [4X[28X       , [ -3 ]>>[128X[104X
    [4X[28X    gap> inj := InjectionPrincipalFactor(D);[128X[104X
    [4X[28X    MappingByFunction( <Green's D-class: <bipartition: [ 1, 5, -2, -4 ], [128X[104X
    [4X[28X      [ 2, 3, 4, -1, -5 ], [ -3 ]>>, <Rees matrix semigroup 1x1 over [128X[104X
    [4X[28X      Group([ (1,2) ])>, function( f ) ... end, function( x ) ... end )[128X[104X
  [4X[32X[104X
  
  [1X4.4-3 PrincipalFactor[101X
  
  [29X[2XPrincipalFactor[102X( [3XD[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA Rees matrix semigroup.[133X
  
  [33X[0;0Y[10XPrincipalFactor([3XD[103X[10X)[110X is just shorthand for [10XRange(InjectionPrincipalFactor([3XD[103X[10X))[110X,
  where  [3XD[103X is a [13XD[113X-class of semigroup; see [2XInjectionPrincipalFactor[102X ([14X4.4-2[114X) for
  more details.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([ PartialPerm( [ 1, 2, 3 ], [ 1, 3, 4 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3 ], [ 2, 5, 3 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4 ], [ 2, 4, 1, 5 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 3, 5 ], [ 5, 1, 3 ] ) ] );;[127X[104X
    [4X[25Xgap>[125X [27XPrincipalFactor(MinimalDClass(S));[127X[104X
    [4X[28X<Rees matrix semigroup 1x1 over Group(())>[128X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28X<empty partial perm>[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, 2, 3, 4, 5, -1, -3 ], [ -2, -5 ], [ -4 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -5 ], [ 2, 3, 4, 5, -1, -3 ], [ -2, -4 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, 5, -4 ], [ 2, 4, -1, -5 ], [ 3, -2, -3 ] ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XD := MinimalDClass(S);    [127X[104X
    [4X[28X<Green's D-class: <bipartition: [ 1, 2, 3, 4, 5, -1, -3 ], [128X[104X
    [4X[28X  [ -2, -5 ], [ -4 ]>>[128X[104X
    [4X[25Xgap>[125X [27XPrincipalFactor(D);[127X[104X
    [4X[28X<Rees matrix semigroup 1x5 over Group(())>[128X[104X
  [4X[32X[104X
  
  [1X4.4-4 IsRegularClass[101X
  
  [29X[2XIsRegularClass[102X( [3Xclass[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YThis  function returns [9Xtrue[109X if [3Xclass[103X is a regular Green's class and [9Xfalse[109X if
  it   is   not.   See   also  [2XIsRegularDClass[102X  ([14XReference:  IsRegularDClass[114X),
  [2XIsGroupHClass[102X    ([14XReference:    IsGroupHClass[114X),    [2XGroupHClassOfGreensDClass[102X
  ([14XReference:  GroupHClassOfGreensDClass[114X),  [2XGroupHClass[102X ([14X4.2-4[114X), [2XNrIdempotents[102X
  ([14X4.5-4[114X),  [2XIdempotents[102X  ([14X4.5-3[114X),  and  [2XIsRegularSemigroupElement[102X  ([14XReference:
  IsRegularSemigroupElement[114X).[133X
  
  [33X[0;0YThe  function  [10XIsRegularDClass[110X  produces  the same output as the [5XGAP[105X library
  functions    with   the   same   name;   see   [2XIsRegularDClass[102X   ([14XReference:
  IsRegularDClass[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Monoid(Transformation( [ 10, 8, 7, 4, 1, 4, 10, 10, 7, 2 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 2, 5, 5, 9, 10, 8, 3, 8, 10 ] ));;[127X[104X
    [4X[25Xgap>[125X [27Xf := Transformation( [ 1, 1, 10, 8, 8, 8, 1, 1, 10, 8 ] );;[127X[104X
    [4X[25Xgap>[125X [27XR := RClass(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XIsRegularClass(R);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := Monoid(Transformation([2,3,4,5,1,8,7,6,2,7]), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 8, 7, 4, 1, 4, 3, 3, 7, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27Xf := Transformation( [ 3, 8, 7, 4, 1, 4, 3, 3, 7, 2 ] );;[127X[104X
    [4X[25Xgap>[125X [27XR := RClass(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XIsRegularClass(R);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(R);[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 2, 1, 3, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 1, 2, 1 ] ), Transformation( [ 4, 2, 3, 3 ] ));;[127X[104X
    [4X[25Xgap>[125X [27Xf := Transformation( [ 4, 2, 3, 3 ] );;[127X[104X
    [4X[25Xgap>[125X [27XL := GreensLClassOfElement(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XIsRegularClass(L);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XR := GreensRClassOfElement(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XIsRegularClass(R);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xg := Transformation( [ 4, 4, 4, 4 ] );;[127X[104X
    [4X[25Xgap>[125X [27XIsRegularSemigroupElement(S, g);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRegularClass(LClass(S, g));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRegularClass(RClass(S, g));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRegularDClass(DClass(S, g));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XDClass(S, g)=RClass(S, g);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.4-5 NrRegularDClasses[101X
  
  [29X[2XNrRegularDClasses[102X( [3XS[103X ) [32X attribute
  [29X[2XRegularDClasses[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA positive integer, or a list.[133X
  
  [33X[0;0Y[10XNrRegularDClasses[110X  returns  the number of regular [13XD[113X-classes of the semigroup
  [3XS[103X.[133X
  
  [33X[0;0Y[10XRegularDClasses[110X returns a list of the regular [13XD[113X-classes of the semigroup [3XS[103X.[133X
  
  [33X[0;0YSee    also   [2XIsRegularClass[102X   ([14X4.4-4[114X)   and   [2XIsRegularDClass[102X   ([14XReference:
  IsRegularDClass[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [ Transformation( [ 1, 3, 4, 1, 3, 5 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 1, 6, 1, 6, 3 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27XNrRegularDClasses(S); [127X[104X
    [4X[28X3[128X[104X
    [4X[25Xgap>[125X [27XNrDClasses(S); [127X[104X
    [4X[28X7[128X[104X
    [4X[25Xgap>[125X [27XRegularDClasses(S);[127X[104X
    [4X[28X[ <Green's D-class: Transformation( [ 1, 4, 1, 1, 4, 3 ] )>, [128X[104X
    [4X[28X  <Green's D-class: Transformation( [ 1, 1, 1, 1, 1, 4 ] )>, [128X[104X
    [4X[28X  <Green's D-class: Transformation( [ 1, 1, 1, 1, 1, 1 ] )> ][128X[104X
  [4X[32X[104X
  
  
  [1X4.4-6 [33X[0;0YNrXClasses[133X[101X
  
  [29X[2XNrDClasses[102X( [3Xobj[103X ) [32X attribute
  [29X[2XNrHClasses[102X( [3Xobj[103X ) [32X attribute
  [29X[2XNrLClasses[102X( [3Xobj[103X ) [32X attribute
  [29X[2XNrRClasses[102X( [3Xobj[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA positive integer.[133X
  
  [33X[0;0Y[10XNrXClasses[110X  returns  the number of Green's classes in [3Xobj[103X where [3Xobj[103X can be a
  semigroup,  [13XD[113X-,  [13XL[113X-,  or  [13XR[113X-class  where  appropriate. If the actual Green's
  classes are not required, then it is more efficient to use[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XNrHClasses(obj)[128X[104X
  [4X[32X[104X
  
  [33X[0;0Ythan[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XLength(HClasses(obj))[128X[104X
  [4X[32X[104X
  
  [33X[0;0Ysince  the  Green's  classes  themselves  are not created when [10XNrXClasses[110X is
  called.[133X
  
  [33X[0;0YSee also [2XGreensRClasses[102X ([14X4.3-1[114X), [2XGreensRClasses[102X ([14XReference: GreensRClasses[114X),
  [2XIteratorOfRClasses[102X ([14X4.3-3[114X), and [2XIteratorOfRClassReps[102X ([14X4.3-2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 1, 2, 5, 4, 3, 8, 7, 6 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 1, 6, 3, 4, 7, 2, 5, 8 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 2, 1, 6, 7, 8, 3, 4, 5 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 3, 2, 3, 6, 1, 6, 1, 2 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 5, 2, 3, 6, 3, 4, 7, 4 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27Xx := Transformation( [ 2, 5, 4, 7, 4, 3, 6, 3 ] );;[127X[104X
    [4X[25Xgap>[125X [27XR := RClass(S, x);[127X[104X
    [4X[28X<Green's R-class: Transformation( [ 2, 5, 4, 7, 4, 3, 6, 3 ] )>[128X[104X
    [4X[25Xgap>[125X [27XNrHClasses(R);[127X[104X
    [4X[28X12[128X[104X
    [4X[25Xgap>[125X [27XD := DClass(R);[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 2, 5, 4, 7, 4, 3, 6, 3 ] )>[128X[104X
    [4X[25Xgap>[125X [27XNrHClasses(D);[127X[104X
    [4X[28X72[128X[104X
    [4X[25Xgap>[125X [27XL := LClass(S, x);[127X[104X
    [4X[28X<Green's L-class: Transformation( [ 2, 5, 4, 7, 4, 3, 6, 3 ] )>[128X[104X
    [4X[25Xgap>[125X [27XNrHClasses(L);[127X[104X
    [4X[28X6[128X[104X
    [4X[25Xgap>[125X [27XNrHClasses(S);[127X[104X
    [4X[28X1555[128X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 4, 6, 5, 2, 1, 3 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 6, 3, 2, 5, 4, 1 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 1, 2, 4, 3, 5, 6 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 3, 5, 6, 1, 2, 3 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 5, 3, 6, 6, 6, 2 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 2, 3, 2, 6, 4, 6 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 2, 1, 2, 2, 2, 4 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 4, 4, 1, 2, 1, 2 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XNrRClasses(S);[127X[104X
    [4X[28X150[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X6342[128X[104X
    [4X[25Xgap>[125X [27Xx := Transformation( [ 1, 3, 3, 1, 3, 5 ] );;[127X[104X
    [4X[25Xgap>[125X [27XD := DClass(S, x);[127X[104X
    [4X[28X<Green's D-class: Transformation( [ 2, 4, 2, 2, 2, 1 ] )>[128X[104X
    [4X[25Xgap>[125X [27XNrRClasses(D);[127X[104X
    [4X[28X87[128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(10);;[127X[104X
    [4X[25Xgap>[125X [27XNrDClasses(S); NrRClasses(S); NrHClasses(S); NrLClasses(S);[127X[104X
    [4X[28X11[128X[104X
    [4X[28X1024[128X[104X
    [4X[28X184756[128X[104X
    [4X[28X1024[128X[104X
    [4X[25Xgap>[125X [27XS := POPI(10);;[127X[104X
    [4X[25Xgap>[125X [27XNrDClasses(S);[127X[104X
    [4X[28X11[128X[104X
    [4X[25Xgap>[125X [27XNrRClasses(S);[127X[104X
    [4X[28X1024[128X[104X
  [4X[32X[104X
  
  [1X4.4-7 PartialOrderOfDClasses[101X
  
  [29X[2XPartialOrderOfDClasses[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe partial order of the [13XD[113X-classes of [3XS[103X.[133X
  
  [33X[0;0YReturns   a   list   [10Xlist[110X   where   [10Xlist[i][110X   contains  every  [10Xj[110X  such  that
  [10XGreensDClasses(S)[j][110X  is  immediately  less than [10XGreensDClasses(S)[i][110X in the
  partial  order of [13XD[113X- classes of [3XS[103X. There might be other indices in [10Xlist[110X, and
  it  may  or  may  not  include  [10Xi[110X.  The  reflexive transitive closure of the
  relation defined by [10Xlist[110X is the partial order of [13XD[113X-classes of [3XS[103X.[133X
  
  [33X[0;0YThe partial order on the [13XD[113X-classes is defined by [22Xx≤ y[122X if and only if [22XS^1xS^1[122X
  is a subset of [22XS^1yS^1[122X.[133X
  
  [33X[0;0YSee also [2XGreensDClasses[102X ([14X4.3-1[114X), [2XGreensDClasses[102X ([14XReference: GreensDClasses[114X),
  [2XIsGreensLessThanOrEqual[102X   ([14XReference:   IsGreensLessThanOrEqual[114X),   and   [2X\<[102X
  ([14X4.4-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 2, 4, 1, 2 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 3, 4, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XPartialOrderOfDClasses(S);[127X[104X
    [4X[28X[ [ 3 ], [ 2, 3 ], [ 3, 4 ], [ 4 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(GreensDClasses(S)[1], GreensDClasses(S)[2]);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(GreensDClasses(S)[2], GreensDClasses(S)[1]);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(GreensDClasses(S)[3], GreensDClasses(S)[1]);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup( PartialPerm( [ 1, 2, 3 ], [ 1, 3, 4 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 5 ], [ 5, 1, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X58[128X[104X
    [4X[25Xgap>[125X [27XPartialOrderOfDClasses(S);              [127X[104X
    [4X[28X[ [ 1, 3 ], [ 2, 3 ], [ 3, 4 ], [ 4, 5 ], [ 5 ] ][128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(GreensDClasses(S)[1], GreensDClasses(S)[2]);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(GreensDClasses(S)[5], GreensDClasses(S)[2]);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(GreensDClasses(S)[3], GreensDClasses(S)[4]);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(GreensDClasses(S)[4], GreensDClasses(S)[3]);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.4-8 SchutzenbergerGroup[101X
  
  [29X[2XSchutzenbergerGroup[102X( [3Xclass[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA group.[133X
  
  [33X[0;0Y[10XSchutzenbergerGroup[110X  returns  the  generalized Schutzenberger group (defined
  below) of the [13XR[113X-, [13XD[113X-, [13XL[113X-, or [13XH[113X-class [3Xclass[103X.[133X
  
  [33X[0;0YIf [10Xf[110X is an element of a semigroup of transformations or partial permutations
  and  [10Xim(f)[110X denotes the image of [10Xf[110X, then the [13Xgeneralized Schutzenberger group[113X
  of [10Xim(f)[110X is the permutation group[133X
  
  [33X[0;0Y{ g|_im(f) : im(f*g)=im(f) }.[133X
  
  [33X[0;0YThe   generalized   Schutzenberger   group   of   the  kernel  [10Xker(f)[110X  of  a
  transformation  [10Xf[110X or the domain [10Xdom(f)[110X of a partial permutation [10Xf[110X is defined
  analogously.[133X
  
  [33X[0;0YThe  generalized  Schutzenberger group of a Green's class is then defined as
  follows.[133X
  
  [8X[13XR[113X-class[108X
        [33X[0;6YThe  generalized  Schutzenberger  group  of  the image or range of the
        representative of the [13XR[113X-class.[133X
  
  [8X[13XL[113X-class[108X
        [33X[0;6YThe  generalized  Schutzenberger  group of the kernel or domain of the
        representative of the [13XL[113X-class.[133X
  
  [8X[13XH[113X-class[108X
        [33X[0;6YThe  intersection  of  the generalized Schutzenberger groups of the [13XR[113X-
        and [13XL[113X-class containing the [13XH[113X-class.[133X
  
  [8X[13XD[113X-class[108X
        [33X[0;6YThe  intersection  of  the generalized Schutzenberger groups of the [13XR[113X-
        and [13XL[113X-class containing the representative of the [13XD[113X-class.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 4, 4, 3, 5, 3 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 1, 1, 4, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 5, 4, 4, 5 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27Xf := Transformation( [ 5, 5, 4, 4, 5 ] );;[127X[104X
    [4X[25Xgap>[125X [27XSchutzenbergerGroup(RClass(S, f));[127X[104X
    [4X[28XGroup([ (4,5) ])[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27X[ PartialPerm([ 1, 2, 3, 7 ], [ 9, 2, 4, 8 ]),[127X[104X
    [4X[25X>[125X [27XPartialPerm([ 1, 2, 6, 7, 8, 9, 10 ], [ 6, 8, 4, 5, 9, 1, 3 ]),[127X[104X
    [4X[25X>[125X [27XPartialPerm([ 1, 2, 3, 5, 6, 7, 8, 9 ], [ 7, 4, 1, 6, 9, 5, 2, 3 ]) ] );;[127X[104X
    [4X[25Xgap>[125X [27XList(DClasses(S), SchutzenbergerGroup);[127X[104X
    [4X[28X[ Group(()), Group(()), Group(()), Group(()), Group([ (1,9,8), (8,[128X[104X
    [4X[28X   9) ]), Group([ (4,9) ]), Group(()), Group(()), Group(()), [128X[104X
    [4X[28X  Group(()), Group(()), Group(()), Group(()), Group(()), Group(()), [128X[104X
    [4X[28X  Group(()), Group([ (2,5)(3,7) ]), Group([ (1,7,5,6,9,3) ]), [128X[104X
    [4X[28X  Group(()), Group(()), Group(()), Group(()), Group(()) ][128X[104X
  [4X[32X[104X
  
  [1X4.4-9 MinimalDClass[101X
  
  [29X[2XMinimalDClass[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe minimal [13XD[113X-class of a semigroup.[133X
  
  [33X[0;0YThe  minimal  ideal  of  a  semigroup  is  the  least  ideal with respect to
  containment.  [10XMinimalDClass[110X returns the [13XD[113X-class corresponding to the minimal
  ideal  of  the  semigroup [3XS[103X. Equivalently, [10XMinimalDClass[110X returns the minimal
  [13XD[113X-class with respect to the partial order of [13XD[113X-classes.[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 [2XPartialOrderOfDClasses[102X ([14X4.4-7[114X), [2XIsGreensLessThanOrEqual[102X ([14XReference:
  IsGreensLessThanOrEqual[114X),          [2XMinimalIdeal[102X         ([14X4.5-10[114X)         and
  [2XRepresentativeOfMinimalIdeal[102X ([14X4.5-11[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XD := MinimalDClass(JonesMonoid(8));[127X[104X
    [4X[28X<Green's D-class: <bipartition: [ 1, 2 ], [ 3, 4 ], [ 5, 6 ], [128X[104X
    [4X[28X  [ 7, 8 ], [ -1, -2 ], [ -3, -4 ], [ -5, -6 ], [ -7, -8 ]>>[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup( [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 5, 7, 8, 9 ], [ 2, 6, 9, 1, 5, 3, 8 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4, 5, 7, 8, 9 ], [ 9, 4, 10, 5, 6, 7, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XMinimalDClass(S);[127X[104X
    [4X[28X<Green's D-class: <empty partial perm>>[128X[104X
  [4X[32X[104X
  
  [1X4.4-10 MaximalDClasses[101X
  
  [29X[2XMaximalDClasses[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe maximal [13XD[113X-classes of a semigroup.[133X
  
  [33X[0;0Y[10XMaximalDClasses[110X  returns  the  maximal [13XD[113X-classes with respect to the partial
  order of [13XD[113X-classes.[133X
  
  [33X[0;0YSee also [2XPartialOrderOfDClasses[102X ([14X4.4-7[114X), [2XIsGreensLessThanOrEqual[102X ([14XReference:
  IsGreensLessThanOrEqual[114X), and [2XMinimalDClass[102X ([14X4.4-9[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XMaximalDClasses(BrauerMonoid(8));[127X[104X
    [4X[28X[ <Green's D-class: <block bijection: [ 1, -1 ], [ 2, -2 ], [128X[104X
    [4X[28X      [ 3, -3 ], [ 4, -4 ], [ 5, -5 ], [ 6, -6 ], [ 7, -7 ], [128X[104X
    [4X[28X      [ 8, -8 ]>> ][128X[104X
    [4X[25Xgap>[125X [27XMaximalDClasses(FullTransformationMonoid(5));[127X[104X
    [4X[28X[ <Green's D-class: IdentityTransformation> ][128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4, 5, 6, 7 ], [ 3, 8, 1, 4, 5, 6, 7 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 6, 8 ], [ 2, 6, 7, 1, 5 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4, 6, 8 ], [ 4, 3, 2, 7, 6, 5 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 4, 5, 6, 7, 8 ], [ 7, 1, 4, 2, 5, 6, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XMaximalDClasses(S);[127X[104X
    [4X[28X[ <Green's D-class: [2,8](1,3)(4)(5)(6)(7)>, [128X[104X
    [4X[28X  <Green's D-class: [8,3](1,7,6,5,2)(4)> ][128X[104X
  [4X[32X[104X
  
  [1X4.4-11 StructureDescriptionSchutzenbergerGroups[101X
  
  [29X[2XStructureDescriptionSchutzenbergerGroups[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YDistinct  structure descriptions of the Schutzenberger groups of a
            semigroup.[133X
  
  [33X[0;0Y[10XStructureDescriptionSchutzenbergerGroups[110X  returns  the  distinct  values  of
  [2XStructureDescription[102X ([14XReference: StructureDescription[114X) when it is applied to
  the Schutzenberger groups of the [13XR[113X-classes of the semigroup [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( PartialPerm( [ 1, 2, 3 ], [ 2, 5, 4 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3 ], [ 4, 1, 2 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3 ], [ 5, 2, 3 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 4, 5 ], [ 2, 1, 4, 3 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 5 ], [ 2, 3, 5 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 5 ], [ 2, 3, 5, 4 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 5 ], [ 4, 2, 5, 1 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 5 ], [ 5, 2, 4, 3 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 5 ], [ 5, 4, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XStructureDescriptionSchutzenbergerGroups(S);            [127X[104X
    [4X[28X[ "1", "C2", "S3" ][128X[104X
    [4X[25Xgap>[125X [27XS := Monoid( [127X[104X
    [4X[25X>[125X [27XBipartition([[ 1, 2, 5, -1, -2 ], [ 3, 4, -3, -5 ], [ -4 ]]), [127X[104X
    [4X[25X>[125X [27XBipartition([[ 1, 2, -2 ], [ 3, -1 ], [ 4 ], [ 5 ], [ -3, -4 ], [ -5 ]]),[127X[104X
    [4X[25X>[125X [27XBipartition([[ 1 ], [ 2, 3, -5 ], [ 4, -3 ], [ 5, -2 ], [ -1, -4 ]]));[127X[104X
    [4X[28X<bipartition monoid of degree 5 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XStructureDescriptionSchutzenbergerGroups(S);[127X[104X
    [4X[28X[ "1", "C2" ][128X[104X
  [4X[32X[104X
  
  [1X4.4-12 StructureDescriptionMaximalSubgroups[101X
  
  [29X[2XStructureDescriptionMaximalSubgroups[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YDistinct  structure  descriptions  of  the  maximal subgroups of a
            semigroup.[133X
  
  [33X[0;0Y[10XStructureDescriptionMaximalSubgroups[110X   returns   the   distinct   values  of
  [2XStructureDescription[102X ([14XReference: StructureDescription[114X) when it is applied to
  the maximal subgroups of the semigroup [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseSemigroup(6);[127X[104X
    [4X[28X<inverse bipartition monoid of degree 6 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XStructureDescriptionMaximalSubgroups(S);[127X[104X
    [4X[28X[ "1", "C2", "S3", "S4", "S5", "S6" ][128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( PartialPerm( [ 1, 3, 4, 5, 8 ], [ 8, 3, 9, 4, 5 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 8 ], [ 10, 4, 1, 9, 6 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 5, 6, 7, 10 ], [ 4, 1, 6, 7, 5, 3, 2, 10 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 6, 8, 10 ], [ 4, 9, 10, 3, 1, 5, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XStructureDescriptionMaximalSubgroups(S);[127X[104X
    [4X[28X[ "1", "C2", "C3", "C4" ][128X[104X
  [4X[32X[104X
  
  [1X4.4-13 MultiplicativeNeutralElement[101X
  
  [29X[2XMultiplicativeNeutralElement[102X( [3XH[103X ) [32X method
  [6XReturns:[106X  [33X[0;10YA semigroup element or [9Xfail[109X.[133X
  
  [33X[0;0YIf   the   [13XH[113X-class   [3XH[103X   of   a  semigroup  [10XS[110X  is  a  subgroup  of  [10XS[110X,  then
  [10XMultiplicativeNeutralElement[110X  returns  the  identity  of  [3XH[103X.  If  [3XH[103X is not a
  subgroup of [10XS[110X, then [9Xfail[109X is returned.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3 ], [ 1, 5, 2 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 3 ], [ 2, 4 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3 ], [ 4, 1, 5 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 3, 5 ], [ 1, 3, 4 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 4, 5 ], [ 1, 2, 3, 5 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 5 ], [ 1, 3, 2, 5 ] ), [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 4, 5 ], [ 5, 4, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XH := HClass(S, PartialPerm( [ 1, 2 ], [ 1, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeNeutralElement(H);[127X[104X
    [4X[28X<identity partial perm on [ 1, 2 ]>[128X[104X
    [4X[25Xgap>[125X [27XH := HClass(S, PartialPerm( [ 1, 2 ], [ 1, 4 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeNeutralElement(H);[127X[104X
    [4X[28Xfail[128X[104X
  [4X[32X[104X
  
  [1X4.4-14 IsGreensClassNC[101X
  
  [29X[2XIsGreensClassNC[102X( [3Xclass[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YA  Green's  class [3Xclass[103X of a semigroup [10XS[110X satisfies [10XIsGreensClassNC[110X if it was
  not known to [5XGAP[105X that the representative of [3Xclass[103X was an element of [10XS[110X at the
  point that [3Xclass[103X was created.[133X
  
  [1X4.4-15 IsTransformationSemigroupGreensClass[101X
  
  [29X[2XIsTransformationSemigroupGreensClass[102X( [3Xclass[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YA   Green's   class   [3Xclass[103X   of   a  semigroup  [10XS[110X  satisfies  the  property
  [10XIsTransformationSemigroupGreensClass[110X  if  and  only  if  [10XS[110X is a semigroup of
  transformations.[133X
  
  [1X4.4-16 IsBipartitionSemigroupGreensClass[101X
  
  [29X[2XIsBipartitionSemigroupGreensClass[102X( [3Xclass[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YA   Green's   class   [3Xclass[103X   of   a  semigroup  [10XS[110X  satisfies  the  property
  [10XIsBipartitionSemigroupGreensClass[110X  if  and  only  if  [10XS[110X  is  a  semigroup of
  bipartitions.[133X
  
  [1X4.4-17 IsPartialPermSemigroupGreensClass[101X
  
  [29X[2XIsPartialPermSemigroupGreensClass[102X( [3Xclass[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YA   Green's   class   [3Xclass[103X   of   a  semigroup  [10XS[110X  satisfies  the  property
  [10XIsPartialPermSemigroupGreensClass[110X if and only if [10XS[110X is a semigroup of partial
  perms.[133X
  
  [1X4.4-18 IsMatrixSemigroupGreensClass[101X
  
  [29X[2XIsMatrixSemigroupGreensClass[102X( [3Xclass[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YA   Green's   class   [3Xclass[103X   of   a  semigroup  [10XS[110X  satisfies  the  property
  [10XIsMatrixSemigroupGreensClass[110X  if  and  only  if [10XS[110X is belongs to the category
  [10XIsMatrixSemigroup[110X.[133X
  
  [1X4.4-19 StructureDescription[101X
  
  [29X[2XStructureDescription[102X( [3Xclass[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA string or [9Xfail[109X.[133X
  
  [33X[0;0Y[10XStructureDescription[110X  returns  the value of [2XStructureDescription[102X ([14XReference:
  StructureDescription[114X)  when it is applied to a group isomorphic to the group
  [13XH[113X-class [3Xclass[103X. If [3Xclass[103X is not a group [13XH[113X-class, then [9Xfail[109X is returned.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4, 6, 7, 8, 9 ], [ 1, 9, 4, 3, 5, 2, 10, 7 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 4, 7, 8, 9 ], [ 6, 2, 4, 9, 1, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XH := HClass(S, [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4, 7, 9 ], [ 1, 7, 3, 4, 9, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XStructureDescription(H);[127X[104X
    [4X[28X"C6"[128X[104X
  [4X[32X[104X
  
  [1X4.4-20 IsGreensDLeq[101X
  
  [29X[2XIsGreensDLeq[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA function.[133X
  
  [33X[0;0Y[10XIsGreensDLeq([3XS[103X[10X)[110X returns a function [10Xfunc[110X such that for any two elements [10Xx[110X and
  [10Xy[110X  of  [3XS[103X, [10Xfunc(x, y)[110X return [9Xtrue[109X if the [13XD[113X-class of [10Xx[110X in [3XS[103X is greater than or
  equal to the [13XD[113X-class of [10Xy[110X in [3XS[103X under the usual ordering of Green's [13XD[113X-classes
  of a semigroup.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [ Transformation( [ 1, 3, 4, 1, 3 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 2, 4, 1, 5, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 2, 5, 3, 5, 3 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 5, 5, 1, 1, 3 ] ) ] );;[127X[104X
    [4X[25Xgap>[125X [27Xreps := ShallowCopy(DClassReps(S));[127X[104X
    [4X[28X[ Transformation( [ 1, 3, 4, 1, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 2, 4, 1, 5, 5 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 4, 1, 1, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 1, 1, 1, 1 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XSort(reps, IsGreensDLeq(S));[127X[104X
    [4X[25Xgap>[125X [27Xreps;[127X[104X
    [4X[28X[ Transformation( [ 2, 4, 1, 5, 5 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 3, 4, 1, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 4, 1, 1, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 1, 1, 1, 1 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(DClass(S, reps[2]), DClass(S, reps[1]));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseMonoid(4);;[127X[104X
    [4X[25Xgap>[125X [27XIsGreensDLeq(S)(S.1, S.3);                      [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGreensDLeq(S)(S.3, S.1);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(DClass(S, S.3), DClass(S, S.1));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGreensLessThanOrEqual(DClass(S, S.1), DClass(S, S.3));[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  
  [1X4.5 [33X[0;0YFurther attributes of semigroups[133X[101X
  
  [33X[0;0YIn  this section we describe the attributes of a semigroup that can be found
  using the [5XSemigroups[105X package.[133X
  
  [1X4.5-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 ([14X3.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
  
  [1X4.5-2 GroupOfUnits[101X
  
  [29X[2XGroupOfUnits[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe group of units of a semigroup.[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
  ([14X2.4-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  ([14X4.6-11[114X),  and [2XMultiplicativeNeutralElement[102X ([14XReference:
  MultiplicativeNeutralElement[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 1, 2, 5, 4, 3, 8, 7, 6 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 1, 6, 3, 4, 7, 2, 5, 8 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 2, 1, 6, 7, 8, 3, 4, 5 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 3, 2, 3, 6, 1, 6, 1, 2 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 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( PartialPerm( [ 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( PartialPerm( [ 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( Bipartition( [ [ 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
  
  [1X4.5-3 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
  ([14X4.4-4[114X) [2XIsGroupHClass[102X ([14XReference: IsGroupHClass[114X), [2XNrIdempotents[102X ([14X4.5-4[114X), and
  [2XGroupHClass[102X ([14X4.2-4[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([ Transformation( [ 2, 3, 4, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 3, 1, 1 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27XIdempotents(S, 1);[127X[104X
    [4X[28X[  ][128X[104X
    [4X[25Xgap>[125X [27XIdempotents(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 [27XIdempotents(S);[127X[104X
    [4X[28X[ IdentityTransformation, Transformation( [ 1, 1, 3, 3 ] ), [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[28X<Green's R-class: Transformation( [ 3, 3, 1, 1 ] )>[128X[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 [27XIdempotents(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[28X<Green's D-class: Transformation( [ 1, 1, 3, 3 ] )>[128X[104X
    [4X[25Xgap>[125X [27XIdempotents(D);[127X[104X
    [4X[28X[ Transformation( [ 1, 1, 3, 3 ] ), Transformation( [ 2, 2, 4, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 4, 2, 2, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XL := GreensLClassOfElement(S, Transformation( [ 3, 1, 1, 3 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XIdempotents(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 [27X[ PartialPerm( [ 1, 2, 3, 4, 5, 7 ], [ 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
  
  [1X4.5-4 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 ([14X4.5-3[114X),
  [2XIsRegularDClass[102X   ([14XReference:   IsRegularDClass[114X),   [2XIsRegularClass[102X   ([14X4.4-4[114X)
  [2XIsGroupHClass[102X ([14XReference: IsGroupHClass[114X), and [2XGroupHClass[102X ([14X4.2-4[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([ Transformation( [ 2, 3, 4, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 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 [27X[ PartialPerm( [ 1, 2, 3, 5, 7, 9, 10 ], [ 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 ], [ 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
  
  [1X4.5-5 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 ([14X4.5-3[114X) and [2XSmallGeneratingSet[102X ([14X4.5-14[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(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[25X>[125X [27XMonoid(Transformation([1, 1]), [127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 1]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 2]), [127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 1]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 2]), [127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 4, 1]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 4, 2]), [127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 4, 4]),[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, 2]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 4, 5, 5]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 4, 5, 7, 7]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 4, 7, 6, 7]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 6, 5, 6]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 3, 7, 5, 6, 7]),[127X[104X
    [4X[25X>[125X [27X       Transformation([1, 2, 8, 4, 5, 6, 7, 8]),[127X[104X
    [4X[25X>[125X [27X       Transformation([2, 2]));[127X[104X
    [4X[28Xtrue[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
  
  [1X4.5-6 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 of degree 10 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 of degree 4 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
  
  [1X4.5-7 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
  
  [33X[0;0Y[12XPlease  note:[112X  the [5XGrape[105X package version 4.5 or higher must be available and
  compiled for this function to work.[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 4 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 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 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
  
  [1X4.5-8 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
  
  [33X[0;0Y[12XPlease  note:[112X  the [5XGrape[105X package version 4.5 or higher must be available and
  compiled  for  this function to work, when the argument [3XR[103X is a Rees 0-matrix
  semigroup.[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
  
  [1X4.5-9 IsMaximalSubsemigroup[101X
  
  [29X[2XIsMaximalSubsemigroup[102X( [3XS[103X, [3XT[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Ytrue or false[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
  
  [1X4.5-10 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  ([14X4.5-11[114X),  [2XPartialOrderOfDClasses[102X
  ([14X4.4-7[114X),  [2XIsGreensLessThanOrEqual[102X  ([14XReference: IsGreensLessThanOrEqual[114X), and
  [2XMinimalDClass[102X ([14X4.4-9[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 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[28X<Green's D-class: Transformation( [ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 ] )>[128X[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
  
  [1X4.5-11 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 ([14X4.5-10[114X) and [2XMinimalDClass[102X ([14X4.4-9[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 [27XTransformation( [ 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
  
  [1X4.5-12 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 [27XTransformation( [ 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 [27XTransformation( [ 3, 5, 7, 2, 5, 6, 3, 8 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 6, 7, 4, 1, 4, 1, 6, 2 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 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( PartialPerm( [ 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
  
  [1X4.5-13 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
  
  [1X4.5-14 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 ([14X4.5-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
  ([14X4.5-6[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 of degree 4 with 96 generators>[128X[104X
    [4X[25Xgap>[125X [27XLength(SmallGeneratingSet(S));       [127X[104X
    [4X[28X13[128X[104X
  [4X[32X[104X
  
  [1X4.5-15 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
  
  [1X4.5-16 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
  
  [1X4.5-17 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[ [ 1, 11, 12, 5, 4, 6, 10, 7, 9 ] ][128X[104X
  [4X[32X[104X
  
  [1X4.5-18 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
  
  [1X4.5-19 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
  
  [1X4.5-20 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
  
  [1X4.5-21 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 ], [ 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
  
  [1X4.5-22 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, 20, 2, 19, 3, 8, 11 ] ][128X[104X
  [4X[32X[104X
  
  [1X4.5-23 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 and the [5Xgenss[105X package is loaded,
        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;6YIf [5Xgenss[105X is not loaded, then this option is ignored.[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 of degree 8 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
  
  [1X4.5-24 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 [27X[ Transformation( [ 1, 4, 11, 11, 7, 2, 6, 2, 5, 5, 10 ] ), [127X[104X
    [4X[25X>[125X [27X  Transformation( [ 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
  
  [1X4.5-25 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
  
  [1X4.5-26 UnderlyingSemigroupOfSemigroupWithAdjoinedZero[101X
  
  [29X[2XUnderlyingSemigroupOfSemigroupWithAdjoinedZero[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA semigroup, or [9Xfail[109X.[133X
  
  [33X[0;0YIf  [3XS[103X  is  a  semigroup  for  which the property [2XIsSemigroupWithAdjoinedZero[102X
  ([14X4.6-17[114X)  is true, (i.e. [3XS[103X has a [2XMultiplicativeZero[102X ([14X4.5-12[114X) and the set [22X[3XS[103X ∖
  {  0 }[122X is a subsemigroup of [3XS[103X), then this method returns the semigroup [22X[3XS[103X ∖ {
  0 }[122X.[133X
  
  [33X[0;0YOtherwise,    if    [3XS[103X    is    a    semigroup   for   which   the   property
  [2XIsSemigroupWithAdjoinedZero[102X  ([14X4.6-17[114X)  is  [9Xfalse[109X,  then  this method returns
  [9Xfail[109X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [[127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 3, 4, 5, 1, 6 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 1, 3, 4, 5, 6 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 6, 6, 6, 6, 6, 6 ] ) ] );[127X[104X
    [4X[28X<transformation semigroup of degree 6 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28XTransformation( [ 6, 6, 6, 6, 6, 6 ] )[128X[104X
    [4X[25Xgap>[125X [27XG := UnderlyingSemigroupOfSemigroupWithAdjoinedZero(S);[127X[104X
    [4X[28X<transformation semigroup of degree 5 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsGroupAsSemigroup(G);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsZeroGroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseMonoid(6);;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28X<empty partial perm>[128X[104X
    [4X[25Xgap>[125X [27XG := UnderlyingSemigroupOfSemigroupWithAdjoinedZero(S);[127X[104X
    [4X[28Xfail[128X[104X
  [4X[32X[104X
  
  
  [1X4.6 [33X[0;0YFurther properties of semigroups[133X[101X
  
  [33X[0;0YIn  this  section  we  describe  the  properties  of a semigroup that can be
  determined using the [5XSemigroups[105X package.[133X
  
  [1X4.6-1 IsBand[101X
  
  [29X[2XIsBand[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsBand[110X returns [9Xtrue[109X if every element of the semigroup [3XS[103X is an idempotent and
  [9Xfalse[109X  if  it  is  not.  An inverse semigroup is band if and only if it is a
  semilattice; see [2XIsSemilattice[102X ([14X4.6-18[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 1, 1, 1, 4, 4, 4, 7, 7, 7, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 2, 2, 5, 5, 5, 8, 8, 8, 2 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 3, 3, 6, 6, 6, 9, 9, 9, 3 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 1, 1, 4, 4, 4, 7, 7, 7, 4 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 1, 1, 4, 4, 4, 7, 7, 7, 7 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsBand(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4, 8, 9 ], [ 5, 8, 7, 6, 9, 1 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4, 7, 8, 9, 10 ], [ 2, 3, 8, 7, 10, 6, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsBand(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsBand(IdempotentGeneratedSubsemigroup(S));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := PartitionMonoid(4);[127X[104X
    [4X[28X<regular bipartition monoid of degree 4 with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XM := MinimalIdeal(S);[127X[104X
    [4X[28X<simple bipartition semigroup ideal of degree 4 with 1 generator>[128X[104X
    [4X[25Xgap>[125X [27XIsBand(M);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-2 IsBlockGroup[101X
  
  [29X[2XIsBlockGroup[102X( [3XS[103X ) [32X property
  [29X[2XIsSemigroupWithCommutingIdempotents[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsBlockGroup[110X  and  [10XIsSemigroupWithCommutingIdempotents[110X  return  [9Xtrue[109X  if the
  semigroup [3XS[103X is a block group and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  semigroup  [3XS[103X  is  a  [13Xblock  group[113X if every [13XL[113X-class and every [13XR[113X-class of [3XS[103X
  contains  at most one idempotent. Every semigroup of partial permutations is
  a block group.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 5, 6, 7, 3, 1, 4, 2, 8 ] ),[127X[104X
    [4X[25X>[125X [27X  Transformation( [ 3, 6, 8, 5, 7, 4, 2, 8 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XIsBlockGroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 2, 1, 10, 4, 5, 9, 7, 4, 8, 4 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 10, 7, 5, 6, 1, 3, 9, 7, 10, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XIsBlockGroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2 ], [ 5, 4 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3 ], [ 1, 2, 5 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3 ], [ 2, 1, 5 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4 ], [ 3, 1, 2 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4, 5 ], [ 5, 4, 3, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XT := Range(IsomorphismBlockBijectionSemigroup(S));[127X[104X
    [4X[28X<bipartition semigroup of degree 6 with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsBlockGroup(T);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsBlockGroup(Range(IsomorphismBipartitionSemigroup(S)));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -2 ], [ 2, -3 ], [ 3, -4 ], [ 4, -1 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -2 ], [ 2, -1 ], [ 3, -3 ], [ 4, -4 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, 2, -3 ], [ 3, -1, -2 ], [ 4, -4 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -1 ], [ 2, -2 ], [ 3, -3 ], [ 4, -4 ] ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsBlockGroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-3 IsCommutativeSemigroup[101X
  
  [29X[2XIsCommutativeSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsCommutativeSemigroup[110X  returns  [9Xtrue[109X  if the semigroup [3XS[103X is commutative and
  [9Xfalse[109X  if  it  is not. The function [2XIsCommutative[102X ([14XReference: IsCommutative[114X)
  can also be used to test if a semigroup is commutative.[133X
  
  [33X[0;0YA semigroup [3XS[103X is [13Xcommutative[113X if [10Xx*y=y*x[110X for all [10Xx,y[110X in [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 2, 4, 5, 3, 7, 8, 6, 9, 1 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 3, 5, 6, 7, 8, 1, 9, 2, 4 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsCommutativeSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCommutative(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup([127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 5, 6 ], [ 2, 5, 1, 3, 9, 6 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 6, 8 ], [ 8, 5, 7, 6, 2, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsCommutativeSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, 2, 3, 6, 7, -1, -4, -6 ], [127X[104X
    [4X[25X>[125X [27X     [ 4, 5, 8, -2, -3, -5, -7, -8 ] ] ), [127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, 2, -3, -4 ], [ 3, -5 ], [ 4, -6 ], [ 5, -7 ], [127X[104X
    [4X[25X>[125X [27X     [ 6, -8 ], [ 7, -1 ], [ 8, -2 ] ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsCommutativeSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-4 IsCompletelyRegularSemigroup[101X
  
  [29X[2XIsCompletelyRegularSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsCompletelyRegularSemigroup[110X  returns [9Xtrue[109X if every element of the semigroup
  [3XS[103X is contained in a subgroup of [3XS[103X.[133X
  
  [33X[0;0YAn  inverse  semigroup is completely regular if and only if it is a Clifford
  semigroup; see [2XIsCliffordSemigroup[102X ([14X4.7-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 1, 2, 4, 3, 6, 5, 4 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 5, 6, 3, 4, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 2, 1, 2, 2, 2, 2, 2 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsCompletelyRegularSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsInverseSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XT := Range(IsomorphismPartialPermSemigroup(S));;[127X[104X
    [4X[25Xgap>[125X [27XIsCompletelyRegularSemigroup(T);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCliffordSemigroup(T);         [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, 3, -4 ], [ 2, 4, -1, -2 ], [ -3 ] ] ), [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -1 ], [ 2, 3, 4, -3 ], [ -2, -4 ] ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsCompletelyRegularSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.6-5 IsCongruenceFreeSemigroup[101X
  
  [29X[2XIsCongruenceFreeSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsCongruenceFreeSemigroup[110X   returns   [9Xtrue[109X   if   the   semigroup   [3XS[103X  is  a
  congruence-free semigroup and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA   semigroup   [3XS[103X  is  [13Xcongruence-free[113X  if  it  has  no  non-trivial  proper
  congruences.[133X
  
  [33X[0;0YA  semigroup with zero is congruence-free if and only if it is isomorphic to
  a  regular  Rees  0-matrix  semigroup  [10XR[110X  whose  underlying semigroup is the
  trivial  group,  no  two  rows  of the matrix of [10XR[110X are identical, and no two
  columns are identical; see Theorem 3.7.1 in [How95].[133X
  
  [33X[0;0YA  semigroup  without  zero is congruence-free if and only if it is a simple
  group or has order 2; see Theorem 3.7.2 in [How95].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 4, 2, 3, 3, 4 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruenceFreeSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 2, 2, 4, 4 ] ),[127X[104X
    [4X[25X>[125X [27X Transformation( [ 5, 3, 4, 4, 6, 6 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsCongruenceFreeSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.6-6 IsGroupAsSemigroup[101X
  
  [29X[2XIsGroupAsSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsGroupAsSemigroup[110X   returns  [9Xtrue[109X  if  and  only  if  the  semigroup  [3XS[103X  is
  mathematically a group.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 2, 4, 5, 3, 7, 8, 6, 9, 1 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 3, 5, 6, 7, 8, 1, 9, 2, 4 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsGroupAsSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XG := SymmetricGroup(5);;[127X[104X
    [4X[25Xgap>[125X [27XS := Range(IsomorphismPartialPermSemigroup(G));[127X[104X
    [4X[28X<inverse partial perm semigroup of rank 5 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsGroupAsSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricGroup([1,2,10]);;[127X[104X
    [4X[25Xgap>[125X [27XT := Range(IsomorphismBlockBijectionSemigroup([127X[104X
    [4X[25X>[125X [27XRange(IsomorphismPartialPermSemigroup(S))));[127X[104X
    [4X[28X<inverse bipartition semigroup of degree 11 with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsGroupAsSemigroup(T);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X4.6-7 [33X[0;0YIsIdempotentGenerated[133X[101X
  
  [29X[2XIsIdempotentGenerated[102X( [3XS[103X ) [32X property
  [29X[2XIsSemiBand[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsIdempotentGenerated[110X  and  [10XIsSemiBand[110X  return  [9Xtrue[109X  if  the semigroup [3XS[103X is
  generated  by  its  idempotents and [9Xfalse[109X if it is not. See also [2XIdempotents[102X
  ([14X4.5-3[114X) and [2XIdempotentGeneratedSubsemigroup[102X ([14X4.5-5[114X).[133X
  
  [33X[0;0YAn  inverse  semigroup  is  idempotent-generated  if  and  only  if  it is a
  semilattice; see [2XIsSemilattice[102X ([14X4.6-18[114X).[133X
  
  [33X[0;0YSemiband and idempotent-generated are synonymous in this context.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SingularTransformationSemigroup(4);[127X[104X
    [4X[28X<regular transformation semigroup ideal of degree 4 with 1 generator>[128X[104X
    [4X[25Xgap>[125X [27XIsIdempotentGenerated(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := SingularBrauerMonoid(5);[127X[104X
    [4X[28X<regular bipartition semigroup ideal of degree 5 with 1 generator>[128X[104X
    [4X[25Xgap>[125X [27XIsIdempotentGenerated(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-8 IsLeftSimple[101X
  
  [29X[2XIsLeftSimple[102X( [3XS[103X ) [32X property
  [29X[2XIsRightSimple[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsLeftSimple[110X  and [10XIsRightSimple[110X returns [9Xtrue[109X if the semigroup [3XS[103X has only one
  [13XL[113X-class  or one [13XR[113X-class, respectively, and returns [9Xfalse[109X if it has more than
  one.[133X
  
  [33X[0;0YAn inverse semigroup is left simple if and only if it is right simple if and
  only if it is a group; see [2XIsGroupAsSemigroup[102X ([14X4.6-6[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 6, 7, 9, 6, 8, 9, 8, 7, 6 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 6, 8, 9, 6, 8, 8, 7, 9, 6 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 6, 8, 9, 7, 8, 8, 7, 9, 6 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 6, 9, 8, 6, 7, 9, 7, 8, 6 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 6, 9, 9, 6, 8, 8, 7, 9, 6 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 6, 9, 9, 7, 8, 8, 6, 9, 7 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 7, 8, 8, 7, 9, 9, 7, 8, 6 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 7, 9, 9, 7, 6, 9, 6, 8, 7 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 8, 7, 6, 9, 8, 6, 8, 7, 9 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 9, 6, 6, 7, 8, 8, 7, 6, 9 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 9, 6, 6, 7, 9, 6, 9, 8, 7 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 9, 6, 7, 9, 6, 6, 9, 7, 8 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 9, 6, 8, 7, 9, 6, 9, 8, 7 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 9, 7, 6, 8, 7, 7, 9, 6, 8 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 9, 7, 7, 8, 9, 6, 9, 7, 8 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 9, 8, 8, 9, 6, 7, 6, 8, 9 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsRightSimple(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsLeftSimple(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGroupAsSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XNrRClasses(S);[127X[104X
    [4X[28X16[128X[104X
    [4X[25Xgap>[125X [27XS := BrauerMonoid(6);;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(RClass(S, Random(MinimalDClass(S))));;[127X[104X
    [4X[25Xgap>[125X [27XIsLeftSimple(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsRightSimple(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-9 IsLeftZeroSemigroup[101X
  
  [29X[2XIsLeftZeroSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsLeftZeroSemigroup[110X returns [9Xtrue[109X if the semigroup [3XS[103X is a left zero semigroup
  and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  semigroup  is  a  [13Xleft  zero  semigroup[113X  if [10Xx*y=x[110X for all [10Xx,y[110X. An inverse
  semigroup is a left zero semigroup if and only if it is trivial.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 2, 1, 4, 3, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 3, 2, 3, 1, 1 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsRightZeroSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xgens := [Transformation( [ 1, 2, 3, 3, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 2, 3, 3, 3 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsLeftZeroSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-10 IsMonogenicSemigroup[101X
  
  [29X[2XIsMonogenicSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsMonogenicSemigroup[110X  returns  [9Xtrue[109X  if  the semigroup [3XS[103X is monogenic and it
  returns [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  semigroup  is  [13Xmonogenic[113X if it is generated by a single element. See also
  [2XIsMonogenicInverseSemigroup[102X    ([14X4.7-7[114X)    and    [2XIndexPeriodOfTransformation[102X
  ([14XReference: IndexPeriodOfTransformation[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XTransformation([ 2, 2, 2, 11, 10, 8, 10, 11, 2, 11, 10, 2, 11, 11, 10 ]),[127X[104X
    [4X[25X>[125X [27XTransformation([ 2, 2, 2, 8, 11, 15, 11, 10, 2, 10, 11, 2, 10, 4, 7 ]), [127X[104X
    [4X[25X>[125X [27XTransformation([ 2, 2, 2, 11, 10, 8, 10, 11, 2, 11, 10, 2, 11, 11, 10 ]),[127X[104X
    [4X[25X>[125X [27XTransformation([ 2, 2, 12, 7, 8, 14, 8, 11, 2, 11, 10, 2, 11, 15, 4 ]));;[127X[104X
    [4X[25Xgap>[125X [27XIsMonogenicSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, -2, -5, -7, -9 ], [127X[104X
    [4X[25X>[125X [27X     [ -1, -10 ], [ -3, -4, -6, -8 ] ] ), [127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, 4, 7, 8, -2 ], [ 2, 3, 5, 10, -5 ], [127X[104X
    [4X[25X>[125X [27X     [ 6, 9, -7, -9 ], [ -1, -10 ], [ -3, -4, -6, -8 ] ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsMonogenicSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-11 IsMonoidAsSemigroup[101X
  
  [29X[2XIsMonoidAsSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsMonoidAsSemigroup[110X  returns  [9Xtrue[109X  if  and  only  if  the  semigroup  [3XS[103X  is
  mathematically   a   monoid,   i.e.   if   and   only   if   it  contains  a
  [2XMultiplicativeNeutralElement[102X ([14XReference: MultiplicativeNeutralElement[114X).[133X
  
  [33X[0;0YIt  is  possible that a semigroup which satisfies [10XIsMonoidAsSemigroup[110X is not
  in  the [5XGAP[105X category [2XIsMonoid[102X ([14XReference: IsMonoid[114X). This is possible if the
  [2XMultiplicativeNeutralElement[102X  ([14XReference: MultiplicativeNeutralElement[114X) of [3XS[103X
  is  not  equal  to the [2XOne[102X ([14XReference: One[114X) of any element in [3XS[103X. Therefore a
  semigroup satisfying [10XIsMonoidAsSemigroup[110X may not possess the attributes of a
  monoid (such as, [2XGeneratorsOfMonoid[102X ([14XReference: GeneratorsOfMonoid[114X)).[133X
  
  [33X[0;0YSee  also [2XOne[102X ([14XReference: One[114X), [2XIsInverseMonoid[102X ([14XReference: IsInverseMonoid[114X)
  and                [2XIsomorphismTransformationMonoid[102X               ([14XReference:
  IsomorphismTransformationMonoid[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( 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 [27XIsMonoidAsSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsMonoid(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XMultiplicativeNeutralElement(S);[127X[104X
    [4X[28XTransformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 9 ] )[128X[104X
    [4X[25Xgap>[125X [27XT := Range(IsomorphismBipartitionSemigroup(S));;[127X[104X
    [4X[25Xgap>[125X [27XIsMonoidAsSemigroup(T);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsMonoid(T);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XOne(T);[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XS := Monoid(Transformation( [ 8, 2, 8, 9, 10, 6, 2, 8, 7, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 9, 2, 6, 3, 6, 4, 5, 5, 3, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XIsMonoidAsSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-12 IsOrthodoxSemigroup[101X
  
  [29X[2XIsOrthodoxSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsOrthodoxSemigroup[110X returns [9Xtrue[109X if the semigroup [3XS[103X is orthodox and [9Xfalse[109X if
  it is not.[133X
  
  [33X[0;0YA  semigroup is [13Xorthodox[113X if it is regular and its idempotent elements form a
  subsemigroup. Every inverse semigroup is also an orthodox semigroup.[133X
  
  [33X[0;0YSee  also  [2XIsRegularSemigroup[102X  ([14X4.6-14[114X)  and  [2XIsRegularSemigroup[102X ([14XReference:
  IsRegularSemigroup[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 1, 1, 1, 4, 5, 4 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 3, 1, 1, 2 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 3, 1, 1, 3 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 5, 5, 5, 5, 5, 5 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsOrthodoxSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(GeneratorsOfSemigroup(DualSymmetricInverseMonoid(5)));;[127X[104X
    [4X[25Xgap>[125X [27XIsOrthodoxSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-13 IsRectangularBand[101X
  
  [29X[2XIsRectangularBand[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsRectangularBand[110X  returns [9Xtrue[109X if the semigroup [3XS[103X is a rectangular band and
  [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA semigroup [3XS[103X is a [13Xrectangular band[113X if for all [22Xx, y, z[122X in [3XS[103X we have that [22Xx^2
  = x[122X and [22Xxyz = xz[122X.[133X
  
  [33X[0;0YEquivalently,  [3XS[103X  is a [13Xrectangular band[113X if [3XS[103X is isomorphic to a semigroup of
  the  form  [22XI  × Λ[122X with multiplication [22X(i,λ)(j,μ) = (i,μ)[122X. In this case, [3XS[103X is
  called an [22X|I| × |Λ|[122X [13Xrectangular band[113X.[133X
  
  [33X[0;0YAn inverse semigroup is a rectangular band if and only if it is a group.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 1, 1, 1, 4, 4, 4, 7, 7, 7, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 2, 2, 5, 5, 5, 8, 8, 8, 2 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 3, 3, 6, 6, 6, 9, 9, 9, 3 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 1, 1, 4, 4, 4, 7, 7, 7, 4 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 1, 1, 4, 4, 4, 7, 7, 7, 7 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsRectangularBand(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRectangularBand(MinimalIdeal(PartitionMonoid(4)));[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-14 IsRegularSemigroup[101X
  
  [29X[2XIsRegularSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsRegularSemigroup[110X  returns  [9Xtrue[109X if the semigroup [3XS[103X is regular and [9Xfalse[109X if
  it is not.[133X
  
  [33X[0;0YA  semigroup  [10XS[110X  is  [13Xregular[113X if for all [10Xx[110X in [10XS[110X there exists [10Xy[110X in [10XS[110X such that
  [10Xx*y*x=x[110X.  Every  inverse  semigroup  is  regular, and a semigroup of partial
  permutations is regular if and only if it is an inverse semigroup.[133X
  
  [33X[0;0YSee   also   [2XIsRegularDClass[102X  ([14XReference:  IsRegularDClass[114X),  [2XIsRegularClass[102X
  ([14X4.4-4[114X),          and          [2XIsRegularSemigroupElement[102X         ([14XReference:
  IsRegularSemigroupElement[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsRegularSemigroup(FullTransformationSemigroup(5));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRegularSemigroup(JonesMonoid(5));[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-15 IsRightZeroSemigroup[101X
  
  [29X[2XIsRightZeroSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsRightZeroSemigroup[110X  returns  [9Xtrue[109X  if  the [3XS[103X is a right zero semigroup and
  [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  semigroup  [10XS[110X  is  a  [13Xright  zero  semigroup[113X if [10Xx*y=y[110X for all [10Xx,y[110X in [10XS[110X. An
  inverse semigroup is a right zero semigroup if and only if it is trivial.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens := [ Transformation( [ 2, 1, 4, 3, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 3, 2, 3, 1, 1 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsRightZeroSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xgens := [Transformation( [ 1, 2, 3, 3, 1 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 2, 4, 4, 1 ] )];;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsRightZeroSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X4.6-16 [33X[0;0YIsXTrivial[133X[101X
  
  [29X[2XIsRTrivial[102X( [3XS[103X ) [32X property
  [29X[2XIsLTrivial[102X( [3XS[103X ) [32X property
  [29X[2XIsHTrivial[102X( [3XS[103X ) [32X property
  [29X[2XIsDTrivial[102X( [3XS[103X ) [32X property
  [29X[2XIsAperiodicSemigroup[102X( [3XS[103X ) [32X property
  [29X[2XIsCombinatorialSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsXTrivial[110X  returns  [9Xtrue[109X  if  Green's  [13XR[113X-relation,  [13XL[113X-relation, [13XH[113X-relation,
  [13XD[113X-relation,  respectively,  on the semigroup [3XS[103X is trivial and [9Xfalse[109X if it is
  not.  These  properties  can also be applied to a Green's class instead of a
  semigroup where applicable.[133X
  
  [33X[0;0YFor  inverse  semigroups,  the  properties  of  being  [13XR[113X-trivial, [13XL[113X-trivial,
  [13XD[113X-trivial, and a semilattice are equivalent; see [2XIsSemilattice[102X ([14X4.6-18[114X).[133X
  
  [33X[0;0YA   semigroup   is  [13Xaperiodic[113X  if  its  contains  no  non-trivial  subgroups
  (equivalently,  all  of its group [13XH[113X-classes are trivial). A finite semigroup
  is aperiodic if and only if it is [13XH[113X-trivial.[133X
  
  [33X[0;0Y[13XCombinatorial[113X is a synonym for aperiodic in this context.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 1, 5, 1, 3, 7, 10, 6, 2, 7, 10 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 4, 4, 5, 6, 7, 7, 7, 4, 3, 10 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsHTrivial(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X108[128X[104X
    [4X[25Xgap>[125X [27XIsRTrivial(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsLTrivial(S);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.6-17 IsSemigroupWithAdjoinedZero[101X
  
  [29X[2XIsSemigroupWithAdjoinedZero[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsSemigroupWithAdjoinedZero[110X returns [9Xtrue[109X if the semigroup [3XS[103X can be expressed
  as  the  disjoint union of subsemigroups [22X[3XS[103X ∖ { 0 }[122X and [22X{ 0 }[122X (where [22X0[122X is the
  [2XMultiplicativeZero[102X ([14X4.5-12[114X) of [3XS[103X).[133X
  
  [33X[0;0YIf  this  is not the case, then either [3XS[103X lacks a multiplicative zero, or the
  set [22X[3XS[103X ∖ { 0 }[122X is not a subsemigroup of [3XS[103X, and so [10XIsSemigroupWithAdjoinedZero[110X
  returns [9Xfalse[109X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [[127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 3, 4, 5, 1, 6 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 1, 3, 4, 5, 6 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 6, 6, 6, 6, 6, 6 ] ) ] );[127X[104X
    [4X[28X<transformation semigroup of degree 6 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsZeroGroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSemigroupWithAdjoinedZero(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := FullTransformationMonoid(4);;[127X[104X
    [4X[25Xgap>[125X [27XIsSemigroupWithAdjoinedZero(S);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.6-18 IsSemilattice[101X
  
  [29X[2XIsSemilattice[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsSemilattice[110X  returns [9Xtrue[109X if the semigroup [3XS[103X is a semilattice and [9Xfalse[109X if
  it is not.[133X
  
  [33X[0;0YA  semigroup  is  a [13Xsemilattice[113X if it is commutative and every element is an
  idempotent. The idempotents of an inverse semigroup form a semilattice.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 2, 5, 1, 7, 3, 7, 7 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 6, 5, 7, 2, 1, 7 ] ) );;                    [127X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X631[128X[104X
    [4X[25Xgap>[125X [27XIsInverseSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XA := Semigroup(Idempotents(S)); [127X[104X
    [4X[28X<transformation semigroup of degree 7 with 32 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsSemilattice(A);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := FactorisableDualSymmetricInverseSemigroup(5);;[127X[104X
    [4X[25Xgap>[125X [27XS := IdempotentGeneratedSubsemigroup(S);;[127X[104X
    [4X[25Xgap>[125X [27XIsSemilattice(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X4.6-19 [33X[0;0YIsSimpleSemigroup[133X[101X
  
  [29X[2XIsSimpleSemigroup[102X( [3XS[103X ) [32X property
  [29X[2XIsCompletelySimpleSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsSimpleSemigroup[110X  returns [9Xtrue[109X if the semigroup [3XS[103X is simple and [9Xfalse[109X if it
  is not.[133X
  
  [33X[0;0YA  semigroup  is  [13Xsimple[113X  if it has no proper 2-sided ideals. A semigroup is
  [13Xcompletely  simple[113X  if  it  is  simple  and possesses minimal left and right
  ideals. A finite semigroup is simple if and only if it is completely simple.
  An inverse semigroup is simple if and only if it is a group.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27X Transformation( [ 2, 2, 4, 4, 6, 6, 8, 8, 10, 10, 12, 12, 2 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 1, 3, 3, 5, 5, 7, 7, 9, 9, 11, 11, 3 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 7, 3, 9, 5, 11, 7, 1, 9, 3, 11, 5, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 7, 7, 9, 9, 11, 11, 1, 1, 3, 3, 5, 5, 7 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsSimpleSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsCompletelySimpleSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsSimpleSemigroup(MinimalIdeal(BrauerMonoid(6)));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XR := Range(IsomorphismReesMatrixSemigroup([127X[104X
    [4X[25X>[125X [27XMinimalIdeal(BrauerMonoid(6))));[127X[104X
    [4X[28X<Rees matrix semigroup 15x15 over Group(())>[128X[104X
  [4X[32X[104X
  
  [1X4.6-20 IsSynchronizingSemigroup[101X
  
  [29X[2XIsSynchronizingSemigroup[102X( [3XS[103X[, [3Xn[103X] ) [32X operation
  [29X[2XIsSynchronizingTransformationCollection[102X( [3Xcoll[103X[, [3Xn[103X] ) [32X operation
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YFor  a  positive  integer  [3Xn[103X,  [10XIsSynchronizingSemigroup[110X  returns [9Xtrue[109X if the
  semigroup of transformations [3XS[103X contains a transformation with constant value
  on [10X[1..[3Xn[103X[10X][110X. Note that this function will return true whenever [10X[3Xn[103X[10X = 1[110X. See also
  [2XConstantTransformation[102X ([14XReference: ConstantTransformation[114X).[133X
  
  [33X[0;0YIf the optional second argument is not specified, then [3Xn[103X will be taken to be
  the      value      of      [2XDegreeOfTransformationSemigroup[102X      ([14XReference:
  DegreeOfTransformationSemigroup[114X) for [3XS[103X.[133X
  
  [33X[0;0YThe  operation  [10XIsSynchronizingTransformationCollection[110X  behaves in the same
  way  as  [10XIsSynchronizingSemigroup[110X  but  can  be applied to any collection of
  transformations and not only semigroups.[133X
  
  [33X[0;0YNote that the semigroup consisting of the identity transformation has degree
  [10X0[110X,  and  for  this  special  case the function [10XIsSynchronizingSemigroup[110X will
  return [9Xfalse[109X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup( Transformation( [ 1, 1, 8, 7, 6, 6, 4, 1, 8, 9 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 5, 8, 7, 6, 10, 8, 7, 6, 9, 7 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsSynchronizingSemigroup(S, 10);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup( Transformation( [ 3, 8, 1, 1, 9, 9, 8, 7, 9, 6 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 7, 6, 8, 7, 5, 6, 8, 7, 8, 9 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsSynchronizingSemigroup(S, 10);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XRepresentative(MinimalIdeal(S));[127X[104X
    [4X[28XTransformation( [ 7, 8, 8, 7, 8, 8, 8, 7, 8, 8 ] )[128X[104X
  [4X[32X[104X
  
  [1X4.6-21 IsZeroGroup[101X
  
  [29X[2XIsZeroGroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsZeroGroup[110X  returns [9Xtrue[109X if the semigroup [3XS[103X is a zero group and [9Xfalse[109X if it
  is not.[133X
  
  [33X[0;0YA  semigroup [10XS[110X is a [13Xzero group[113X if there exists an element [10Xz[110X in [10XS[110X such that [10XS[110X
  without  [10Xz[110X  is  a group and [10Xx*z=z*x=z[110X for all [10Xx[110X in [10XS[110X. Every zero group is an
  inverse semigroup.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 2, 2, 3, 4, 6, 8, 5, 5, 9 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 3, 8, 2, 5, 6, 4, 4, 9 ] ),[127X[104X
    [4X[25X>[125X [27XConstantTransformation(9, 9));;[127X[104X
    [4X[25Xgap>[125X [27XIsZeroGroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XT := Range(IsomorphismPartialPermSemigroup(S));;[127X[104X
    [4X[25Xgap>[125X [27XIsZeroGroup(T);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsZeroGroup(JonesMonoid(2));[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-22 IsZeroRectangularBand[101X
  
  [29X[2XIsZeroRectangularBand[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsZeroRectangularBand[110X  returns [9Xtrue[109X if the semigroup [3XS[103X is a zero rectangular
  band and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  semigroup  is  a  [13X0-rectangular band[113X if it is 0-simple and [13XH[113X-trivial; see
  also  [2XIsZeroSimpleSemigroup[102X  ([14X4.6-24[114X)  and  [2XIsHTrivial[102X  ([14X4.6-16[114X). An inverse
  semigroup  is  a  0-rectangular  band  if  and  only if it is a 0-group; see
  [2XIsZeroGroup[102X ([14X4.6-21[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 3, 7, 9, 1, 12, 13, 1, 15, 9, 1, 18, 1, 1, 13, [127X[104X
    [4X[25X>[125X [27X     1, 1, 21, 1, 1, 1, 1, 1, 25, 26, 1 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 5, 1, 5, 11, 1, 1, 14, 1, 16, 17, 1, 1, 19, 1, [127X[104X
    [4X[25X>[125X [27X     11, 1, 1, 1, 23, 1, 16, 19, 1, 1, 1 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 4, 8, 1, 10, 1, 8, 1, 1, 1, 10, 1, 8, 10, 1, 1, [127X[104X
    [4X[25X>[125X [27X     20, 1, 22, 1, 8, 1, 1, 1, 1, 1 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 6, 6, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 6, 1, 1, [127X[104X
    [4X[25X>[125X [27X     6, 1, 1, 24, 1, 1, 1, 1, 6 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsZeroRectangularBand(Semigroup(Elements(GreensDClasses(S)[7]))); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsZeroRectangularBand(Semigroup(Elements(GreensDClasses(S)[1])));[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.6-23 IsZeroSemigroup[101X
  
  [29X[2XIsZeroSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsZeroSemigroup[110X  returns  [9Xtrue[109X  if  the  semigroup [3XS[103X is a zero semigroup and
  [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  semigroup  [10XS[110X  is  a [13Xzero semigroup[113X if there exists an element [10Xz[110X in [10XS[110X such
  that [10Xx*y=z[110X for all [10Xx,y[110X in [10XS[110X. An inverse semigroup is a zero semigroup if and
  only if it is trivial.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 4, 7, 6, 3, 1, 5, 3, 6, 5, 9 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 3, 5, 1, 9, 3, 8, 7, 4, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsZeroSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 7, 8, 8, 8, 5, 8, 8, 8 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 8, 8, 8, 8, 5, 7, 8, 8 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 8, 7, 8, 8, 5, 8, 8, 8 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 8, 8, 8, 7, 5, 8, 8, 8 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 8, 8, 7, 8, 5, 8, 8, 8 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsZeroSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28XTransformation( [ 8, 8, 8, 8, 5, 8, 8, 8 ] )[128X[104X
  [4X[32X[104X
  
  [1X4.6-24 IsZeroSimpleSemigroup[101X
  
  [29X[2XIsZeroSimpleSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsZeroSimpleSemigroup[110X  returns [9Xtrue[109X if the semigroup [3XS[103X is 0-simple and [9Xfalse[109X
  if it is not.[133X
  
  [33X[0;0YA  semigroup  is  a [13X0-simple[113X if it has no two-sided ideals other than itself
  and  the  set  containing  the  zero  element;  see  also [2XMultiplicativeZero[102X
  ([14X4.5-12[114X).  An  inverse  semigroup  is 0-simple if and only if it is a Brandt
  semigroup; see [2XIsBrandtSemigroup[102X ([14X4.7-2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 17, 17, 17, 17, 17, 17, 17, 17, 17, 5, 17, [127X[104X
    [4X[25X>[125X [27X 17, 17, 17, 17, 17 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 17, 17, 17, 11, 17, 17, 17, 17, 17, 17, 17, [127X[104X
    [4X[25X>[125X [27X 17, 17, 17, 17, 17 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 17, 17, 17, 17, 17, 17, 17, 17, 17, 4, 17, [127X[104X
    [4X[25X>[125X [27X 17, 17, 17, 17, 17 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 1, 17, 17, 5, 17, 17, 17, 17, 17, 17, 17, 17, [127X[104X
    [4X[25X>[125X [27X 17, 17, 17, 17, 17 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XIsZeroSimpleSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := Semigroup([127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 3, 4, 5, 1, 8, 7, 6, 2, 7 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation([ 2, 3, 4, 5, 6, 8, 7, 1, 2, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XIsZeroSimpleSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  
  [1X4.7 [33X[0;0YProperties and attributes of inverse semigroups[133X[101X
  
  [33X[0;0YIn  this  section  we describe properties and attributes specific to inverse
  semigroups that can be determined using [5XSemigroups[105X.[133X
  
  [33X[0;0YThe functions[133X
  
  [30X    [33X[0;6Y[2XIsJoinIrreducible[102X ([14X4.7-5[114X)[133X
  
  [30X    [33X[0;6Y[2XIsMajorantlyClosed[102X ([14X4.7-6[114X)[133X
  
  [30X    [33X[0;6Y[2XJoinIrreducibleDClasses[102X ([14X4.7-8[114X)[133X
  
  [30X    [33X[0;6Y[2XMajorantClosure[102X ([14X4.7-9[114X)[133X
  
  [30X    [33X[0;6Y[2XMinorants[102X ([14X4.7-10[114X)[133X
  
  [30X    [33X[0;6Y[2XRightCosetsOfInverseSemigroup[102X ([14X4.7-12[114X)[133X
  
  [30X    [33X[0;6Y[2XSmallerDegreePartialPermRepresentation[102X ([14X4.7-14[114X)[133X
  
  [30X    [33X[0;6Y[2XVagnerPrestonRepresentation[102X ([14X4.7-15[114X)[133X
  
  [33X[0;0Ywere written by Wilf Wilson and Robert Hancock.[133X
  
  [33X[0;0YThe function [2XCharacterTableOfInverseSemigroup[102X ([14X4.7-16[114X) was written by Jhevon
  Smith and Ben Steinberg.[133X
  
  [1X4.7-1 IsCliffordSemigroup[101X
  
  [29X[2XIsCliffordSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsCliffordSemigroup[110X  returns  [9Xtrue[109X  if  the  semigroup  [3XS[103X is regular and its
  idempotents are central, and [9Xfalse[109X if it is not.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup( Transformation( [ 1, 2, 4, 5, 6, 3, 7, 8 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 3, 4, 5, 6, 2, 7, 8 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 1, 2, 5, 3, 6, 8, 4, 4 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsCliffordSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XT := Range(IsomorphismPartialPermSemigroup(S));;[127X[104X
    [4X[25Xgap>[125X [27XIsCliffordSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseMonoid(5);;[127X[104X
    [4X[25Xgap>[125X [27XT := IdempotentGeneratedSubsemigroup(S);;[127X[104X
    [4X[25Xgap>[125X [27XIsCliffordSemigroup(T);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.7-2 IsBrandtSemigroup[101X
  
  [29X[2XIsBrandtSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsBrandtSemigroup[110X  return  [9Xtrue[109X  if  the  semigroup  [3XS[103X is a 0-simple inverse
  semigroup,  and  [9Xfalse[109X if it is not. See also [2XIsZeroSimpleSemigroup[102X ([14X4.6-24[114X)
  and [2XIsInverseSemigroup[102X ([14XReference: IsInverseSemigroup[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(Transformation( [ 2, 8, 8, 8, 8, 8, 8, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 8, 8, 8, 8, 8, 8, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 8, 3, 8, 8, 8, 8, 8, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 8, 6, 8, 8, 8, 8, 8, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 8, 8, 1, 8, 8, 8, 8, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 8, 8, 8, 1, 8, 8, 8, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 8, 8, 8, 8, 4, 8, 8, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 8, 8, 8, 8, 8, 7, 8, 8 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 8, 8, 8, 8, 8, 8, 2, 8 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XIsBrandtSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XT := Range(IsomorphismPartialPermSemigroup(S));;[127X[104X
    [4X[25Xgap>[125X [27XIsBrandtSemigroup(T);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseMonoid(4);;[127X[104X
    [4X[25Xgap>[125X [27XD := DClasses(S)[3];[127X[104X
    [4X[28X<Green's D-class: <block bijection: [ 1, 2, 3, -1, -2, -3 ], [128X[104X
    [4X[28X  [ 4, -4 ]>>[128X[104X
    [4X[25Xgap>[125X [27XR := InjectionPrincipalFactor(D);;[127X[104X
    [4X[25Xgap>[125X [27XS := Semigroup(PreImages(R, GeneratorsOfSemigroup(Range(R))));;[127X[104X
    [4X[25Xgap>[125X [27XIsBrandtSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.7-3 IsEUnitaryInverseSemigroup[101X
  
  [29X[2XIsEUnitaryInverseSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YAs  described  in  Section  5.9  of  [How95],  an  inverse  semigroup [3XS[103X with
  semilattice of idempotents [3XE[103X is [13XE-unitary[113X if for[133X
  
  [33X[0;0Yfor s in S and e in E, es in E implies s in E.[133X
  
  [33X[0;0YEquivalently,  [3XS[103X  is  [13XE-unitary[113X  if [3XE[103X is closed in the natural partial order
  (see Proposition 5.9.1 in [How95]):[133X
  
  [33X[0;0Yfor s in S and e in E, e less than s implies s in E.[133X
  
  [33X[0;0YThis  condition  is  equivalent  to  [3XE[103X  being  majorantly  closed  in [3XS[103X. See
  [2XIdempotentGeneratedSubsemigroup[102X   ([14X4.5-5[114X)  and  [2XIsMajorantlyClosed[102X  ([14X4.7-6[114X).
  Hence  an  inverse  semigroup  of  partial permutations, block bijections or
  partial  permutation bipartitions is [13XE-unitary[113X if and only if the idempotent
  semilattice is majorantly closed.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup( [ PartialPerm( [ 1, 2, 3, 4 ], [ 2, 3, 1, 6 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 5 ], [ 3, 2, 1, 6 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27XIsEUnitaryInverseSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xe := IdempotentGeneratedSubsemigroup(S);;[127X[104X
    [4X[25Xgap>[125X [27XForAll(Difference(S,e), x->not ForAny(e, y->y*x in e));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XT := InverseSemigroup( [ [127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 3, 4, 6, 8 ], [ 2, 5, 10, 7, 9 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 5, 6, 7, 8 ], [ 5, 8, 9, 2, 10, 1, 3 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 5, 6, 7, 9 ], [ 9, 8, 4, 1, 6, 7, 2 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27XIsEUnitaryInverseSemigroup(T);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XU := InverseSemigroup( [[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 5 ], [ 2, 3, 4, 5, 1 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPerm( [ 1, 2, 3, 4, 5 ], [ 2, 1, 3, 4, 5 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27XIsEUnitaryInverseSemigroup(U);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsGroupAsSemigroup(U);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XStructureDescription(U);[127X[104X
    [4X[28X"S5"[128X[104X
  [4X[32X[104X
  
  [1X4.7-4 IsFactorisableSemigroup[101X
  
  [29X[2XIsFactorisableSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YAn  inverse  monoid  is  [13Xfactorisable[113X  if every element is the product of an
  element  of  the  group  of  units  and an idempotent; see also [2XGroupOfUnits[102X
  ([14X4.5-2[114X)  and  [2XIdempotents[102X  ([14X4.5-3[114X).  Hence  an  inverse semigroup of partial
  permutations  is  factorisable  if and only if each of its generators is the
  restriction of some element in the group of units.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup( PartialPerm( [ 1, 2, 4 ], [ 3, 1, 4 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 5 ], [ 4, 1, 5, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsFactorisableSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsFactorisableSemigroup(SymmetricInverseSemigroup(5)); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsFactorisableSemigroup(DualSymmetricInverseMonoid(5));[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsFactorisableSemigroup(FactorisableDualSymmetricInverseSemigroup(5));[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.7-5 IsJoinIrreducible[101X
  
  [29X[2XIsJoinIrreducible[102X( [3XS[103X, [3Xx[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsJoinIrreducible[110X  determines whether an element [3Xx[103X of an inverse semigroup [3XS[103X
  of   partial   permutations,   block   bijections   or  partial  permutation
  bipartitions is join irreducible.[133X
  
  [33X[0;0YAn  element [3Xx[103X is [13Xjoin irreducible[113X when it is not the least upper bound (with
  respect  to  the  natural  partial  order  [2XNaturalLeqPartialPerm[102X ([14XReference:
  NaturalLeqPartialPerm[114X)) of any subset of [3XS[103X not containing [3Xx[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(3);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 3>[128X[104X
    [4X[25Xgap>[125X [27Xx := PartialPerm([1,2,3]);[127X[104X
    [4X[28X<identity partial perm on [ 1, 2, 3 ]>[128X[104X
    [4X[25Xgap>[125X [27XIsJoinIrreducible(S, x);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XT := InverseSemigroup(PartialPerm([1,2,4,3]), PartialPerm([1]),[127X[104X
    [4X[25X>[125X [27XPartialPerm([0,2]));[127X[104X
    [4X[28X<inverse partial perm semigroup of rank 4 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27Xy := PartialPerm([1,2,3,4]);[127X[104X
    [4X[28X<identity partial perm on [ 1, 2, 3, 4 ]>[128X[104X
    [4X[25Xgap>[125X [27XIsJoinIrreducible(T, y);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XB := InverseSemigroup([[127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, -5 ], [ 2, -2 ], [127X[104X
    [4X[25X>[125X [27X   [ 3, 5, 6, 7, -1, -4, -6, -7 ], [ 4, -3 ] ] ),[127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, -1 ], [ 2, -3 ], [ 3, -4 ], [127X[104X
    [4X[25X>[125X [27X   [ 4, 5, 7, -2, -6, -7 ], [ 6, -5 ] ] ),[127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, -2 ], [ 2, -4 ], [ 3, -6 ], [127X[104X
    [4X[25X>[125X [27X   [ 4, -1 ], [ 5, 7, -3, -7 ], [ 6, -5 ] ] ),[127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, -5 ], [ 2, -1 ], [ 3, -6 ], [127X[104X
    [4X[25X>[125X [27X   [ 4, 5, 7, -2, -4, -7 ], [ 6, -3 ] ] )]);[127X[104X
    [4X[28X<inverse bipartition semigroup of degree 7 with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27Xx := Bipartition( [ [ 1, 2, 3, 5, 6, 7, -2, -3, -4, -5, -6, -7 ], [127X[104X
    [4X[25X>[125X [27X[ 4, -1 ] ] );[127X[104X
    [4X[28X<block bijection: [ 1, 2, 3, 5, 6, 7, -2, -3, -4, -5, -6, -7 ], [128X[104X
    [4X[28X [ 4, -1 ]>[128X[104X
    [4X[25Xgap>[125X [27XIsJoinIrreducible(B, x);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsJoinIrreducible(B, B.1);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.7-6 IsMajorantlyClosed[101X
  
  [29X[2XIsMajorantlyClosed[102X( [3XS[103X, [3XT[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsMajorantlyClosed[110X  determines whether the subset [3XT[103X of the inverse semigroup
  of   partial   permutations,   block   bijections   or  partial  permutation
  bipartitions [3XS[103X is majorantly closed in [3XS[103X. See also [2XMajorantClosure[102X ([14X4.7-9[114X).[133X
  
  [33X[0;0YWe  say  that  [3XT[103X  is [13Xmajorantly closed[113X in [3XS[103X if it contains all elements of [3XS[103X
  which  are  greater  than  or equal to any element of [3XT[103X, with respect to the
  natural     partial    order.    See    [2XNaturalLeqPartialPerm[102X    ([14XReference:
  NaturalLeqPartialPerm[114X).[133X
  
  [33X[0;0YNote that [3XT[103X can be a subset of [3XS[103X or a subsemigroup of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(2);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 2>[128X[104X
    [4X[25Xgap>[125X [27XT := [Elements(S)[2]];[127X[104X
    [4X[28X[ <identity partial perm on [ 1 ]> ][128X[104X
    [4X[25Xgap>[125X [27XIsMajorantlyClosed(S,T);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XU := [Elements(S)[2],Elements(S)[6]];[127X[104X
    [4X[28X[ <identity partial perm on [ 1 ]>, <identity partial perm on [ 1, 2 ][128X[104X
    [4X[28X    > ][128X[104X
    [4X[25Xgap>[125X [27XIsMajorantlyClosed(S,U);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XD := DualSymmetricInverseSemigroup(3);[127X[104X
    [4X[28X<inverse bipartition monoid of degree 3 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27Xx := Bipartition( [ [ 1, -2 ], [ 2, -3 ], [ 3, -1 ] ] );;[127X[104X
    [4X[25Xgap>[125X [27XIsMajorantlyClosed(D, [x]);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xy := Bipartition( [ [ 1, 2, -1, -2 ], [ 3, -3 ] ] );;[127X[104X
    [4X[25Xgap>[125X [27XIsMajorantlyClosed(D, [x,y]);[127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.7-7 IsMonogenicInverseSemigroup[101X
  
  [29X[2XIsMonogenicInverseSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsMonogenicInverseSemigroup[110X  returns  [9Xtrue[109X  if the semigroup [3XS[103X is an inverse
  monogenic semigroup and it returns [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  inverse semigroup is [13Xmonogenic[113X if it is generated as an inverse semigroup
  by   a   single   element.   See   also  [2XIsMonogenicSemigroup[102X  ([14X4.6-10[114X)  and
  [2XIndexPeriodOfTransformation[102X ([14XReference: IndexPeriodOfTransformation[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xf := PartialPerm( [ 1, 2, 3, 6, 8, 10 ], [ 2, 6, 7, 9, 1, 5 ] );;[127X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup(f, f^2, f^3);;[127X[104X
    [4X[25Xgap>[125X [27XIsMonogenicSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsMonogenicInverseSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xx := Random(DualSymmetricInverseMonoid(100));;[127X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup(x, x^2, x^20);;[127X[104X
    [4X[25Xgap>[125X [27XIsMonogenicInverseSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.7-8 JoinIrreducibleDClasses[101X
  
  [29X[2XJoinIrreducibleDClasses[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA list of [13XD[113X-classes.[133X
  
  [33X[0;0Y[10XJoinIrreducibleDClasses[110X  returns a list of the join irreducible [13XD[113X-classes of
  the  inverse  semigroup of partial permutations, block bijections or partial
  permutation bipartitions [3XS[103X.[133X
  
  [33X[0;0YA  [13Xjoin  irreducible  [13XD[113X-class[113X  is a [13XD[113X-class containing only join irreducible
  elements.  See  [2XIsJoinIrreducible[102X  ([14X4.7-5[114X).  If  a [13XD[113X-class contains one join
  irreducible  element,  then  all  of  the  elements  in the [13XD[113X-class are join
  irreducible.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(3);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 3>[128X[104X
    [4X[25Xgap>[125X [27XJoinIrreducibleDClasses(S);[127X[104X
    [4X[28X[ <Green's D-class: <identity partial perm on [ 1 ]>> ][128X[104X
    [4X[25Xgap>[125X [27XT := InverseSemigroup( [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4 ], [ 1, 2, 4, 3 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 2 ], [ 2 ] ) );[127X[104X
    [4X[28X<inverse partial perm semigroup of rank 4 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XJoinIrreducibleDClasses(T);[127X[104X
    [4X[28X[ <Green's D-class: <identity partial perm on [ 1, 2, 3, 4 ]>>, [128X[104X
    [4X[28X  <Green's D-class: <identity partial perm on [ 1 ]>>, [128X[104X
    [4X[28X  <Green's D-class: <identity partial perm on [ 2 ]>> ][128X[104X
    [4X[25Xgap>[125X [27XD := DualSymmetricInverseSemigroup(3);[127X[104X
    [4X[28X<inverse bipartition monoid of degree 3 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XJoinIrreducibleDClasses(D);[127X[104X
    [4X[28X[ <Green's D-class: <block bijection: [ 1, 2, -1, -2 ], [ 3, -3 ]>> ][128X[104X
  [4X[32X[104X
  
  [1X4.7-9 MajorantClosure[101X
  
  [29X[2XMajorantClosure[102X( [3XS[103X, [3XT[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA majorantly closed list of elements.[133X
  
  [33X[0;0Y[10XMajorantClosure[110X  returns  a majorantly closed subset of an inverse semigroup
  of   partial   permutations,   block   bijections   or  partial  permutation
  bipartitions, [3XS[103X, as a list. See [2XIsMajorantlyClosed[102X ([14X4.7-6[114X).[133X
  
  [33X[0;0YThe result contains all elements of [3XS[103X which are greater than or equal to any
  element    of    [3XT[103X    (with   respect   to   the   natural   partial   order
  [2XNaturalLeqPartialPerm[102X  ([14XReference:  NaturalLeqPartialPerm[114X)).  In particular,
  the result is a superset of [3XT[103X.[133X
  
  [33X[0;0YNote that [3XT[103X can be a subset of [3XS[103X or a subsemigroup of [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(4);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 4>[128X[104X
    [4X[25Xgap>[125X [27XT := [PartialPerm([1,0,3,0])];[127X[104X
    [4X[28X[ <identity partial perm on [ 1, 3 ]> ][128X[104X
    [4X[25Xgap>[125X [27XU := MajorantClosure(S,T);[127X[104X
    [4X[28X[ <identity partial perm on [ 1, 3 ]>, [128X[104X
    [4X[28X  <identity partial perm on [ 1, 2, 3 ]>, [2,4](1)(3), [4,2](1)(3), [128X[104X
    [4X[28X  <identity partial perm on [ 1, 3, 4 ]>, [128X[104X
    [4X[28X  <identity partial perm on [ 1, 2, 3, 4 ]>, (1)(2,4)(3) ][128X[104X
    [4X[25Xgap>[125X [27XB := InverseSemigroup([[127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, -2 ], [ 2, -1 ], [ 3, -3 ], [ 4, 5, -4, -5 ] ] ),[127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, -3 ], [ 2, -4 ], [ 3, -2 ], [127X[104X
    [4X[25X>[125X [27X   [ 4, -1 ], [ 5, -5 ] ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27XT := [[127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, -2 ], [ 2, 3, 5, -1, -3, -5 ], [ 4, -4 ] ] ),[127X[104X
    [4X[25X>[125X [27X Bipartition( [ [ 1, -4 ], [ 2, 3, 5, -1, -3, -5 ], [ 4, -2 ] ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XIsMajorantlyClosed(B,T);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XMajorantClosure(B,T);[127X[104X
    [4X[28X[ <block bijection: [ 1, -2 ], [ 2, 3, 5, -1, -3, -5 ], [ 4, -4 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, -4 ], [ 2, 3, 5, -1, -3, -5 ], [ 4, -2 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, -2 ], [ 2, 5, -1, -5 ], [ 3, -3 ], [ 4, -4 ]>[128X[104X
    [4X[28X    , <block bijection: [ 1, -2 ], [ 2, -1 ], [ 3, 5, -3, -5 ], [128X[104X
    [4X[28X     [ 4, -4 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, -4 ], [ 2, 5, -3, -5 ], [ 3, -1 ], [ 4, -2 ]>[128X[104X
    [4X[28X    , <block bijection: [ 1, -4 ], [ 2, -3 ], [ 3, 5, -1, -5 ], [128X[104X
    [4X[28X     [ 4, -2 ]>, <block bijection: [ 1, -4 ], [ 2, -3 ], [ 3, -1 ], [128X[104X
    [4X[28X     [ 4, -2 ], [ 5, -5 ]> ][128X[104X
    [4X[25Xgap>[125X [27XIsMajorantlyClosed(B, last);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.7-10 Minorants[101X
  
  [29X[2XMinorants[102X( [3XS[103X, [3Xf[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA list of elements.[133X
  
  [33X[0;0Y[10XMinorants[110X   takes  an  element  [3Xf[103X  from  an  inverse  semigroup  of  partial
  permutations,  block  bijections  or partial permutation bipartitions [3XS[103X, and
  returns a list of the minorants of [3Xf[103X in [3XS[103X.[133X
  
  [33X[0;0YA  [13Xminorant[113X  of  [3Xf[103X  is  an element of [3XS[103X which is strictly less than [3Xf[103X in the
  natural   partial   order   of   [3XS[103X.  See  [2XNaturalLeqPartialPerm[102X  ([14XReference:
  NaturalLeqPartialPerm[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs := SymmetricInverseSemigroup(3);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 3>[128X[104X
    [4X[25Xgap>[125X [27Xf := Elements(s)[13];[127X[104X
    [4X[28X[1,3](2)[128X[104X
    [4X[25Xgap>[125X [27XMinorants(s,f);[127X[104X
    [4X[28X[ <empty partial perm>, [1,3], <identity partial perm on [ 2 ]> ][128X[104X
    [4X[25Xgap>[125X [27Xf := PartialPerm([3,2,4,0]);[127X[104X
    [4X[28X[1,3,4](2)[128X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup(f);[127X[104X
    [4X[28X<inverse partial perm semigroup of rank 4 with 1 generator>[128X[104X
    [4X[25Xgap>[125X [27XMinorants(S,f);[127X[104X
    [4X[28X[ <identity partial perm on [ 2 ]>, [1,3](2), [3,4](2) ][128X[104X
  [4X[32X[104X
  
  [1X4.7-11 PrimitiveIdempotents[101X
  
  [29X[2XPrimitiveIdempotents[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA list of idempotent partial permutations.[133X
  
  [33X[0;0YAn  idempotent  in an inverse semigroup [3XS[103X is [13Xprimitive[113X if it is non-zero and
  minimal    with    respect    to    the    [2XNaturalPartialOrder[102X   ([14XReference:
  NaturalPartialOrder[114X)   on   [3XS[103X.  [10XPrimitiveIdempotents[110X  returns  the  list  of
  primitive idempotents in the inverse semigroup of partial permutations [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:= InverseMonoid([127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1 ], [ 4 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3 ], [ 2, 1, 3 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3 ], [ 3, 1, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28X<empty partial perm>[128X[104X
    [4X[25Xgap>[125X [27XPrimitiveIdempotents(S);[127X[104X
    [4X[28X[ <identity partial perm on [ 4 ]>, <identity partial perm on [ 1 ]>, [128X[104X
    [4X[28X  <identity partial perm on [ 2 ]>, <identity partial perm on [ 3 ]> ][128X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseMonoid(4);[127X[104X
    [4X[28X<inverse bipartition monoid of degree 4 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XPrimitiveIdempotents(S);[127X[104X
    [4X[28X[ <block bijection: [ 1, 2, 3, -1, -2, -3 ], [ 4, -4 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, 2, 4, -1, -2, -4 ], [ 3, -3 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, -1 ], [ 2, 3, 4, -2, -3, -4 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, 2, -1, -2 ], [ 3, 4, -3, -4 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, 3, 4, -1, -3, -4 ], [ 2, -2 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, 4, -1, -4 ], [ 2, 3, -2, -3 ]>, [128X[104X
    [4X[28X  <block bijection: [ 1, 3, -1, -3 ], [ 2, 4, -2, -4 ]> ][128X[104X
  [4X[32X[104X
  
  [1X4.7-12 RightCosetsOfInverseSemigroup[101X
  
  [29X[2XRightCosetsOfInverseSemigroup[102X( [3XS[103X, [3XT[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA list of lists of elements.[133X
  
  [33X[0;0Y[10XRightCosetsOfInverseSemigroup[110X takes a majorantly closed inverse subsemigroup
  [3XT[103X  of  an  inverse  semigroup  of  partial permutations, block bijections or
  partial  permutation  bipartitions  [3XS[103X.  See  [2XIsMajorantlyClosed[102X ([14X4.7-6[114X). The
  result is a list of the right cosets of [3XT[103X in [3XS[103X.[133X
  
  [33X[0;0YFor  [22Xs  ∈ S[122X, the right coset [22XoverlineTs[122X is defined if and only if [22Xss^-1 ∈ T[122X,
  in  which  case  it is defined to be the majorant closure of the set [22XTs[122X. See
  [2XMajorantClosure[102X ([14X4.7-9[114X). Distinct cosets are disjoint but do not necessarily
  partition [3XS[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(3);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 3>[128X[104X
    [4X[25Xgap>[125X [27XT := InverseSemigroup(MajorantClosure(S,[PartialPerm([1])]));[127X[104X
    [4X[28X<inverse partial perm monoid of rank 3 with 6 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsMajorantlyClosed(S,T);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XRC := RightCosetsOfInverseSemigroup(S,T);[127X[104X
    [4X[28X[ [ <identity partial perm on [ 1 ]>, [128X[104X
    [4X[28X      <identity partial perm on [ 1, 2 ]>, [2,3](1), [3,2](1), [128X[104X
    [4X[28X      <identity partial perm on [ 1, 3 ]>, [128X[104X
    [4X[28X      <identity partial perm on [ 1, 2, 3 ]>, (1)(2,3) ], [128X[104X
    [4X[28X  [ [1,3], [2,1,3], [1,3](2), (1,3), [1,3,2], (1,3,2), (1,3)(2) ], [128X[104X
    [4X[28X  [ [1,2], (1,2), [1,2,3], [3,1,2], [1,2](3), (1,2)(3), (1,2,3) ] ][128X[104X
  [4X[32X[104X
  
  [1X4.7-13 SameMinorantsSubgroup[101X
  
  [29X[2XSameMinorantsSubgroup[102X( [3XH[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA list of elements of the group [13XH[113X-class [3XH[103X.[133X
  
  [33X[0;0YGiven  a  group  [13XH[113X-class  [3XH[103X in an inverse semigroup of partial permutations,
  block     bijections     or     partial    permutation    bipartitions    [10XS[110X,
  [10XSameMinorantsSubgroup[110X  returns  a  list  of the elements of [3XH[103X which have the
  same  strict  minorants as the identity element of [3XH[103X. A [13Xstrict minorant[113X of [10Xx[110X
  in  [3XH[103X  is  an element of [10XS[110X which is less than [10Xx[110X (with respect to the natural
  partial order), but is not equal to [10Xx[110X.[133X
  
  [33X[0;0YThe returned list of elements of [3XH[103X describe a subgroup of [3XH[103X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(3);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 3>[128X[104X
    [4X[25Xgap>[125X [27XH := GroupHClass(GreensDClasses(S)[1]);[127X[104X
    [4X[28X<Green's H-class: <identity partial perm on [ 1, 2, 3 ]>>[128X[104X
    [4X[25Xgap>[125X [27XElements(H);[127X[104X
    [4X[28X[ <identity partial perm on [ 1, 2, 3 ]>, (1)(2,3), (1,2)(3), [128X[104X
    [4X[28X  (1,2,3), (1,3,2), (1,3)(2) ][128X[104X
    [4X[25Xgap>[125X [27XSameMinorantsSubgroup(H);[127X[104X
    [4X[28X[ <identity partial perm on [ 1, 2, 3 ]> ][128X[104X
    [4X[25Xgap>[125X [27XT := InverseSemigroup( [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3, 4 ], [ 1, 2, 4, 3 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1 ], [ 1 ] ), PartialPerm( [ 2 ], [ 2 ] ) );[127X[104X
    [4X[28X<inverse partial perm semigroup of rank 4 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XElements(T);[127X[104X
    [4X[28X[ <empty partial perm>, <identity partial perm on [ 1 ]>, [128X[104X
    [4X[28X  <identity partial perm on [ 2 ]>, [128X[104X
    [4X[28X  <identity partial perm on [ 1, 2, 3, 4 ]>, (1)(2)(3,4) ][128X[104X
    [4X[25Xgap>[125X [27Xx := GroupHClass(GreensDClasses(T)[1]);[127X[104X
    [4X[28X<Green's H-class: <identity partial perm on [ 1, 2, 3, 4 ]>>[128X[104X
    [4X[25Xgap>[125X [27XElements(x);[127X[104X
    [4X[28X[ <identity partial perm on [ 1, 2, 3, 4 ]>, (1)(2)(3,4) ][128X[104X
    [4X[25Xgap>[125X [27XSameMinorantsSubgroup(x);[127X[104X
    [4X[28X[ <identity partial perm on [ 1, 2, 3, 4 ]>, (1)(2)(3,4) ][128X[104X
  [4X[32X[104X
  
  [1X4.7-14 SmallerDegreePartialPermRepresentation[101X
  
  [29X[2XSmallerDegreePartialPermRepresentation[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YAn isomorphism.[133X
  
  [33X[0;0Y[10XSmallerDegreePartialPermRepresentation[110X  attempts to find an isomorphism from
  the inverse semigroup [3XS[103X of partial permutations to another inverse semigroup
  of  partial  permutations with smaller degree. If the function cannot reduce
  the degree, the identity mapping is returned.[133X
  
  [33X[0;0YThere  is  no  guarantee that the smallest possible degree representation is
  returned. For more information see [Sch92].[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := InverseSemigroup(PartialPerm([2, 1, 4, 3, 6, 5, 8, 7]));[127X[104X
    [4X[28X<commutative inverse partial perm semigroup of rank 8 with 1 [128X[104X
    [4X[28X generator>[128X[104X
    [4X[25Xgap>[125X [27XElements(S);[127X[104X
    [4X[28X[ <identity partial perm on [ 1, 2, 3, 4, 5, 6, 7, 8 ]>, [128X[104X
    [4X[28X  (1,2)(3,4)(5,6)(7,8) ][128X[104X
    [4X[25Xgap>[125X [27XT := SmallerDegreePartialPermRepresentation(S);[127X[104X
    [4X[28XMappingByFunction( <partial perm group of size 2, rank 8 with[128X[104X
    [4X[28X  1 generator>, <commutative inverse partial perm semigroup of rank 2 [128X[104X
    [4X[28Xwith 1 generator>, function( x ) ... end, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XR := Range(T);[127X[104X
    [4X[28X<commutative inverse partial perm semigroup of rank 2 with 1 [128X[104X
    [4X[28X generator>[128X[104X
    [4X[25Xgap>[125X [27XElements(R);[127X[104X
    [4X[28X[ <identity partial perm on [ 1, 2 ]>, (1,2) ][128X[104X
    [4X[25Xgap>[125X [27XS := DualSymmetricInverseMonoid(5);;[127X[104X
    [4X[25Xgap>[125X [27XT := Range(IsomorphismPartialPermSemigroup(S));[127X[104X
    [4X[28X<inverse partial perm monoid of rank 6721 with 3 generators>[128X[104X
  [4X[32X[104X
  
  [1X4.7-15 VagnerPrestonRepresentation[101X
  
  [29X[2XVagnerPrestonRepresentation[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YAn isomorphism to an inverse semigroup of partial permutations.[133X
  
  [33X[0;0Y[10XVagnerPrestonRepresentation[110X returns an isomorphism from an inverse semigroup
  [3XS[103X  where  the  elements  of [3XS[103X have a unique semigroup inverse accessible via
  [2XInverse[102X   ([14XReference:   Inverse[114X),   to  the  inverse  semigroup  of  partial
  permutations [3XT[103X of degree equal to the size of [3XS[103X, which is obtained using the
  Vagner-Preston Representation Theorem.[133X
  
  [33X[0;0YMore    precisely,   if   [22Xf:S->   T[122X   is   the   isomorphism   returned   by
  [10XVagnerPrestonRepresentation([3XS[103X[10X)[110X  and  [22Xx[122X  is  in  [3XS[103X,  then [22Xf(x)[122X is the partial
  permutation  with  domain  [22XSx^-1[122X  and  range  [22XSx^-1x[122X defined by [22Xf(x): sx^-1↦
  sx^-1x[122X.[133X
  
  [33X[0;0YIn  many  cases, it is possible to find a smaller degree representation than
  that        provided        by       [10XVagnerPrestonRepresentation[110X       using
  [2XIsomorphismPartialPermSemigroup[102X ([14XReference: IsomorphismPartialPermSemigroup[114X)
  or [2XSmallerDegreePartialPermRepresentation[102X ([14X4.7-14[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseSemigroup(2);[127X[104X
    [4X[28X<symmetric inverse monoid of degree 2>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X7[128X[104X
    [4X[25Xgap>[125X [27Xiso := VagnerPrestonRepresentation(S);[127X[104X
    [4X[28XMappingByFunction( <symmetric inverse monoid of degree 2>, [128X[104X
    [4X[28X<inverse partial perm monoid of rank 7 with 2 generators>[128X[104X
    [4X[28X , function( x ) ... end, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XRespectsMultiplication(iso);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xinv := InverseGeneralMapping(iso);;[127X[104X
    [4X[25Xgap>[125X [27XForAll(S, x-> (x^iso)^inv=x);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XV := InverseSemigroup([[127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -4 ], [ 2, -1 ], [ 3, -5 ], [127X[104X
    [4X[25X>[125X [27X[ 4 ], [ 5 ], [ -2 ], [ -3 ] ] ),[127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -5 ], [ 2, -1 ], [ 3, -3 ], [127X[104X
    [4X[25X>[125X [27X[ 4 ], [ 5 ], [ -2 ], [ -4 ] ] ),[127X[104X
    [4X[25X>[125X [27XBipartition( [ [ 1, -2 ], [ 2, -4 ], [ 3, -5 ], [127X[104X
    [4X[25X>[125X [27X[ 4, -1 ], [ 5, -3 ] ] ) ]);[127X[104X
    [4X[28X<inverse bipartition semigroup of degree 5 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsInverseSemigroup(V);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XVagnerPrestonRepresentation(V);[127X[104X
    [4X[28XMappingByFunction( <inverse bipartition semigroup of size 394, [128X[104X
    [4X[28X degree 5 with 3 generators>, <inverse partial perm semigroup of [128X[104X
    [4X[28X rank 394 with 5 generators>[128X[104X
    [4X[28X , function( x ) ... end, function( x ) ... end )[128X[104X
  [4X[32X[104X
  
  [1X4.7-16 CharacterTableOfInverseSemigroup[101X
  
  [29X[2XCharacterTableOfInverseSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe  character  table  of  the  inverse  semigroup [3XS[103X and a list of
            conjugacy class representatives of [3XS[103X.[133X
  
  [33X[0;0YReturns  a  list with two entries: the first entry being the character table
  of  the inverse semigroup [3XS[103X as a matrix, while the second entry is a list of
  conjugacy class representatives of [3XS[103X.[133X
  
  [33X[0;0YThe  order of the columns in the character table matrix follows the order of
  the  conjugacy class representatives list. The conjugacy representatives are
  grouped by [13XD[113X-class and then sorted by rank. Also, as is typical of character
  tables,  the rows of the matrix correspond to the irreducible characters and
  the columns correspond to the conjugacy classes.[133X
  
  [33X[0;0YThis function was contributed by Jhevon Smith and Ben Steinberg.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS := InverseMonoid( [ PartialPerm( [ 1, 2 ], [ 3, 1 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3 ], [ 1, 3, 4 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 2, 3 ], [ 2, 4, 1 ] ), [127X[104X
    [4X[25X>[125X [27XPartialPerm( [ 1, 3, 4 ], [ 3, 4, 1 ] ) ] );;[127X[104X
    [4X[25Xgap>[125X [27XCharacterTableOfInverseSemigroup(S);[127X[104X
    [4X[28X[ [ [ 1, 0, 0, 0, 0, 0, 0, 0 ], [ 3, 1, 1, 1, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 3, 1, E(3), E(3)^2, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 3, 1, E(3)^2, E(3), 0, 0, 0, 0 ], [ 6, 3, 0, 0, 1, -1, 0, 0 ],[128X[104X
    [4X[28X      [ 6, 3, 0, 0, 1, 1, 0, 0 ], [ 4, 3, 0, 0, 2, 0, 1, 0 ], [128X[104X
    [4X[28X      [ 1, 1, 1, 1, 1, 1, 1, 1 ] ], [128X[104X
    [4X[28X  [ <identity partial perm on [ 1, 2, 3, 4 ]>, [128X[104X
    [4X[28X      <identity partial perm on [ 1, 3, 4 ]>, (1,3,4), (1,4,3), [128X[104X
    [4X[28X      <identity partial perm on [ 1, 3 ]>, (1,3), [128X[104X
    [4X[28X      <identity partial perm on [ 3 ]>, <empty partial perm> ] ][128X[104X
    [4X[25Xgap>[125X [27XS := SymmetricInverseMonoid(4);;[127X[104X
    [4X[25Xgap>[125X [27XCharacterTableOfInverseSemigroup(S);[127X[104X
    [4X[28X[ [ [ 1, -1, 1, 1, -1, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 3, -1, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 2, 0, -1, 2, 0, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 3, 1, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 4, -2, 1, 0, 0, 1, -1, 1, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 8, 0, -1, 0, 0, 2, 0, -1, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 4, 2, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0 ], [128X[104X
    [4X[28X      [ 6, 0, 0, -2, 0, 3, -1, 0, 1, -1, 0, 0 ], [128X[104X
    [4X[28X      [ 6, 2, 0, 2, 0, 3, 1, 0, 1, 1, 0, 0 ], [128X[104X
    [4X[28X      [ 4, 2, 1, 0, 0, 3, 1, 0, 2, 0, 1, 0 ], [128X[104X
    [4X[28X      [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ] ], [128X[104X
    [4X[28X  [ <identity partial perm on [ 1, 2, 3, 4 ]>, (1)(2)(3,4), [128X[104X
    [4X[28X      (1)(2,3,4), (1,2)(3,4), (1,2,3,4), [128X[104X
    [4X[28X      <identity partial perm on [ 1, 2, 3 ]>, (1)(2,3), (1,2,3), [128X[104X
    [4X[28X      <identity partial perm on [ 1, 2 ]>, (1,2), [128X[104X
    [4X[28X      <identity partial perm on [ 1 ]>, <empty partial perm> ] ][128X[104X
  [4X[32X[104X
  
  
  [1X4.8 [33X[0;0YVisualising the structure of a semigroup[133X[101X
  
  [33X[0;0YIn this section, we describe some functions for creating pictures of various
  structures  related to a semigroup of transformations, partial permutations,
  or bipartitions; or a subsemigroup of a Rees 0-matrix semigroup.[133X
  
  [33X[0;0YSeveral  of  the  functions described in this section return a string, which
  can  be written to a file using the function [2XFileString[102X ([14XGAPDoc: FileString[114X)
  or viewed using [2XSplash[102X ([14X4.8-1[114X).[133X
  
  [1X4.8-1 Splash[101X
  
  [29X[2XSplash[102X( [3Xstr[103X[, [3Xopts[103X] ) [32X function
  [6XReturns:[106X  [33X[0;10YNothing.[133X
  
  [33X[0;0YThis  function  attempts  to  convert the string [3Xstr[103X into a pdf document and
  open this document, i.e. to splash it all over your monitor.[133X
  
  [33X[0;0YThe  string  [3Xstr[103X  must  correspond to a valid [10Xdot[110X or [10XLaTeX[110X text file and you
  must have have [10XGraphViz[110X and [10Xpdflatex[110X installed on your computer. For details
  about    these    file   formats,   see   [7Xhttp://www.latex-project.org[107X   and
  [7Xhttp://www.graphviz.org[107X.[133X
  
  [33X[0;0YThis  function  is  provided  to  allow convenient, immediate viewing of the
  pictures  produced  by  the  functions:  [2XTikzBlocks[102X ([14X5.8-2[114X), [2XTikzBipartition[102X
  ([14X5.8-1[114X), [2XDotSemilatticeOfIdempotents[102X ([14X4.8-3[114X), and [2XDotDClasses[102X ([14X4.8-2[114X).[133X
  
  [33X[0;0YThe  optional  second  argument  [3Xopts[103X  should  be  a  record with components
  corresponding to various options, given below.[133X
  
  [8Xpath[108X
        [33X[0;6Ythis  should  be a string representing the path to the directory where
        you  want  [10XSplash[110X  to do its work. The default value of this option is
        [10X"~/"[110X.[133X
  
  [8Xdirectory[108X
        [33X[0;6Ythis should be a string representing the name of the directory in [10Xpath[110X
        where  you  want [10XSplash[110X to do its work. This function will create this
        directory if does not already exist.[133X
  
        [33X[0;6YThe  default  value  of this option is [10X"tmp.viz"[110X if the option [10Xpath[110X is
        present,    and   the   result   of   [2XDirectoryTemporary[102X   ([14XReference:
        DirectoryTemporary[114X) is used otherwise.[133X
  
  [8Xfilename[108X
        [33X[0;6Ythis  should  be  a string representing the name of the file where [3Xstr[103X
        will be written. The default value of this option is [10X"vizpicture"[110X.[133X
  
  [8Xviewer[108X
        [33X[0;6Ythis  should  be  a  string representing the name of the program which
        should open the files produced by [10XGraphViz[110X or [10Xpdflatex[110X.[133X
  
  [8Xtype[108X
        [33X[0;6Ythis  option  can  be  used  to specify that the string [3Xstr[103X contains a
        LaTeX  or [10Xdot[110X document. You can specify this option in [3Xstr[103X directly by
        making  the  first line [10X"%latex"[110X or [10X"//dot"[110X. There is no default value
        for this option, this option must be specified in [3Xstr[103X or in [3Xopt.type[103X.[133X
  
  [8Xfiletype[108X
        [33X[0;6Ythis  should  be  a  string representing the type of file which [10XSplash[110X
        should  produce.  For  LaTeX  files,  this  option  is ignored and the
        default value [10X"pdf"[110X is used.[133X
  
  [33X[0;0YThis  function  was written by Attila Egri-Nagy and Manuel Delgado with some
  minor changes by J. D. Mitchell.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28X        gap> Splash(DotDClasses(FullTransformationMonoid(4)));[128X[104X
  [4X[32X[104X
  
  [1X4.8-2 DotDClasses[101X
  
  [29X[2XDotDClasses[102X( [3XS[103X ) [32X attribute
  [29X[2XDotDClasses[102X( [3XS[103X, [3Xrecord[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA string.[133X
  
  [33X[0;0YThis  function  produces  a graphical representation of the partial order of
  the  [13XD[113X-classes  of  the semigroup [3XS[103X together with the eggbox diagram of each
  [13XD[113X-class.  The  output  is in [10Xdot[110X format (also known as [10XGraphViz[110X) format. For
  details about this file format, and information about how to display or edit
  this format see [7Xhttp://www.graphviz.org[107X.[133X
  
  [33X[0;0YThe  string  returned  by  [10XDotDClasses[110X  can  be  written to a file using the
  command [2XFileString[102X ([14XGAPDoc: FileString[114X).[133X
  
  [33X[0;0YThe  [13XD[113X-classes  are  shown  as  eggbox  diagrams  with [13XL[113X-classes as rows and
  [13XR[113X-classes  as  columns;  group  [13XH[113X-classes  are  shaded  gray  and contain an
  asterisk.   The   [13XD[113X-classes   are  numbered  according  to  their  index  in
  [10XGreensDClasses([3XS[103X[10X)[110X,  so  that  an  [10Xi[110X  appears  next  to the eggbox diagram of
  [10XGreensDClasses([3XS[103X[10X)[i][110X.  A red line from one [13XD[113X-class to another indicates that
  the higher [13XD[113X-class is greater than the lower one in the [13XD[113X-order on [3XS[103X.[133X
  
  [33X[0;0YIf the optional second argument [3Xrecord[103X is present, it can be used to specify
  some options for output.[133X
  
  [8Xnumber[108X
        [33X[0;6Yif  [10X[3Xrecord[103X[10X.number[110X  is [9Xfalse[109X, then the [13XD[113X-classes in the diagram are not
        numbered  according  to their index in the list of [13XD[113X-classes of [3XS[103X. The
        default value for this option is [9Xtrue[109X.[133X
  
  [8Xmaximal[108X
        [33X[0;6Yif [10X[3Xrecord[103X[10X.maximal[110X is [9Xtrue[109X, then the structure description of the group
        [13XH[113X-classes   is   displayed;   see   [2XStructureDescription[102X   ([14XReference:
        StructureDescription[114X).  Setting  this  attribute to [9Xtrue[109X can adversely
        affect  the  performance  of  [10XDotDClasses[110X.  The default value for this
        option is [9Xfalse[109X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=FullTransformationSemigroup(3);[127X[104X
    [4X[28X<full transformation semigroup of degree 3>[128X[104X
    [4X[25Xgap>[125X [27XDotDClasses(S);        [127X[104X
    [4X[28X"digraph  DClasses {\nnode [shape=plaintext]\nedge [color=red,arrowhe\[128X[104X
    [4X[28Xad=none]\n1 [shape=box style=dotted label=<\n<TABLE BORDER=\"0\" CELL\[128X[104X
    [4X[28XBORDER=\"1\" CELLPADDING=\"10\" CELLSPACING=\"0\" PORT=\"1\">\n<TR BO\[128X[104X
    [4X[28XRDER=\"0\"><TD COLSPAN=\"1\" BORDER=\"0\" >1</TD></TR><TR><TD BGCOLOR\[128X[104X
    [4X[28X=\"grey\">*</TD></TR>\n</TABLE>>];\n2 [shape=box style=dotted label=<\[128X[104X
    [4X[28X\n<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLPADDING=\"10\" CELLSPACING\[128X[104X
    [4X[28X=\"0\" PORT=\"2\">\n<TR BORDER=\"0\"><TD COLSPAN=\"3\" BORDER=\"0\" >\[128X[104X
    [4X[28X2</TD></TR><TR><TD BGCOLOR=\"grey\">*</TD><TD BGCOLOR=\"grey\">*</TD>\[128X[104X
    [4X[28X<TD></TD></TR>\n<TR><TD BGCOLOR=\"grey\">*</TD><TD></TD><TD BGCOLOR=\[128X[104X
    [4X[28X\"grey\">*</TD></TR>\n<TR><TD></TD><TD BGCOLOR=\"grey\">*</TD><TD BGC\[128X[104X
    [4X[28XOLOR=\"grey\">*</TD></TR>\n</TABLE>>];\n3 [shape=box style=dotted lab\[128X[104X
    [4X[28Xel=<\n<TABLE BORDER=\"0\" CELLBORDER=\"1\" CELLPADDING=\"10\" CELLSPA\[128X[104X
    [4X[28XCING=\"0\" PORT=\"3\">\n<TR BORDER=\"0\"><TD COLSPAN=\"1\" BORDER=\"0\[128X[104X
    [4X[28X\" >3</TD></TR><TR><TD BGCOLOR=\"grey\">*</TD></TR>\n<TR><TD BGCOLOR=\[128X[104X
    [4X[28X\"grey\">*</TD></TR>\n<TR><TD BGCOLOR=\"grey\">*</TD></TR>\n</TABLE>>\[128X[104X
    [4X[28X];\n1 -> 2\n2 -> 3\n }"[128X[104X
    [4X[25Xgap>[125X [27XFileString(DotDClasses(S), "t3.dot");[127X[104X
    [4X[28Xfail[128X[104X
    [4X[25Xgap>[125X [27XFileString("t3.dot", DotDClasses(S));[127X[104X
    [4X[28X966[128X[104X
  [4X[32X[104X
  
  [1X4.8-3 DotSemilatticeOfIdempotents[101X
  
  [29X[2XDotSemilatticeOfIdempotents[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA string.[133X
  
  [33X[0;0YThis  function produces a graphical representation of the semilattice of the
  idempotents  of an inverse semigroup [3XS[103X where the elements of [3XS[103X have a unique
  semigroup   inverse   accessible   via  [2XInverse[102X  ([14XReference:  Inverse[114X).  The
  idempotents are grouped by the [13XD[113X-class they belong to.[133X
  
  [33X[0;0YThe  output  is  in  [10Xdot[110X format (also known as [10XGraphViz[110X) format. For details
  about  this  file  format, and information about how to display or edit this
  format see [7Xhttp://www.graphviz.org[107X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=DualSymmetricInverseMonoid(4);[127X[104X
    [4X[28X<inverse bipartition monoid of degree 4 with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XDotSemilatticeOfIdempotents(S);[127X[104X
    [4X[28X"graph graphname {\n  node [shape=point]\nranksep=2;\nsubgraph cluste\[128X[104X
    [4X[28Xr_1{\n15 \n}\nsubgraph cluster_2{\n5 11 14 8 12 13 \n}\nsubgraph clus\[128X[104X
    [4X[28Xter_3{\n2 3 10 4 6 9 7 \n}\nsubgraph cluster_4{\n1 \n}\n2 -- 1\n3 -- \[128X[104X
    [4X[28X1\n4 -- 1\n5 -- 2\n5 -- 3\n5 -- 4\n6 -- 1\n7 -- 1\n8 -- 2\n8 -- 6\n8 \[128X[104X
    [4X[28X-- 7\n9 -- 1\n10 -- 1\n11 -- 2\n11 -- 9\n11 -- 10\n12 -- 3\n12 -- 6\n\[128X[104X
    [4X[28X12 -- 9\n13 -- 3\n13 -- 7\n13 -- 10\n14 -- 4\n14 -- 6\n14 -- 10\n15 -\[128X[104X
    [4X[28X- 5\n15 -- 8\n15 -- 11\n15 -- 12\n15 -- 13\n15 -- 14\n }"[128X[104X
  [4X[32X[104X
  
