  
  [1X4 [33X[0;0YDetermining the structure of a semigroup[133X[101X
  
  [33X[0;0YIn  this  chapter  we  describe  the functions in [5XCitrus[105X for determining the
  structure  of  a  semigroup  of  transformations or partial permutations, 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;0YIn  some  cases  it  is possible to express the elements of a transformation
  semigroup  as  a  word  in  the  generators.  This  section describes how to
  accomplish this in [5XCitrus[105X.[133X
  
  [33X[0;0YNote that at present it is not possible to factorize elements in a semigroup
  of partial permutations.[133X
  
  [1X4.1-1 EvaluateWord[101X
  
  [29X[2XEvaluateWord[102X( [3Xgens[103X, [3Xw[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA transformation.[133X
  
  [33X[0;0YThe  argument  [3Xgens[103X  should  be a list of transformations 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
  
  [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[32X[104X
  
  [1X4.1-2 Factorization[101X
  
  [29X[2XFactorization[102X( [3XS[103X, [3Xf[103X ) [32X method
  [6XReturns:[106X  [33X[0;10YA word in the generators.[133X
  
  [33X[0;0YIf [3XS[103X is a transformation semigroup and [3Xf[103X is a transformation belonging to [3XS[103X,
  then [10XFactorization[110X returns a word in the generators of [3XS[103X that is equal to [3Xf[103X.
  Here,  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
  
  [33X[0;0YNote  that  [10XFactorization[110X does not return a word of minimum length. An empty
  list  is  evaluated  to the identity transformation with degree equal to the
  degree  of [3XS[103X regardless of whether this transformation is an element of [3XS[103X or
  not.[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[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{Transformation( [ 1, 2, 3 ] )}[128X[104X
    [4X[25Xgap>[125X [27XDClassOfRClass(R);[127X[104X
    [4X[28X{Transformation( [ 1, 2, 3 ] )}[128X[104X
    [4X[25Xgap>[125X [27XIsGreensDClass(DClassOfRClass(R));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup(PartialPermNC([ 1, 2, 3, 6, 8, 10 ],[127X[104X
    [4X[25X>[125X [27X[ 2, 6, 7, 9, 1, 5 ]), PartialPermNC([ 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 semigroup with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27Xf:=Generators(S)[1];[127X[104X
    [4X[28X[ 1, 2, 3, 6, 8, 10 ] -> [ 2, 6, 7, 9, 1, 5 ][128X[104X
    [4X[25Xgap>[125X [27Xh:=HClass(S, f);[127X[104X
    [4X[28X{[ 1, 2, 3, 6, 8, 10 ] -> [ 2, 6, 7, 9, 1, 5 ]}[128X[104X
    [4X[25Xgap>[125X [27Xr:=RClassOfHClass(h);[127X[104X
    [4X[28X{<identity on [ 1, 2, 3, 6, 8, 10 ]>}[128X[104X
    [4X[25Xgap>[125X [27Xl:=LClass(h);[127X[104X
    [4X[28X{[ 1, 2, 3, 6, 8, 10 ] -> [ 2, 6, 7, 9, 1, 5 ]}[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[2XHClass[102X( [3XX[103X, [3Xf[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 of transformations or partial permutations.[133X
  
  [8X[10XGreensHClassOfElement[110X and [10XHClass[110X[108X
        [33X[0;6Y[3XX[103X  can  be  a  semigroup  of  transformations or partial permutations,
        [13XR[113X-class, [13XL[113X-class, or [13XD[113X-class.[133X
  
  [8X[10XGreensLClassOfElement[110X and [10XLClass[110X[108X
        [33X[0;6Y[3XX[103X  can  be  a semigroup of transformations or partial permutations, or
        [13XD[113X-class.[133X
  
  [8X[10XGreensRClassOfElement[110X and [10XRClass[110X[108X
        [33X[0;6Y[3XX[103X  can  be  a semigroup of transformations or partial permutations, 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[28Xf:=Transformation( [ 15, 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, [128X[104X
    [4X[28X      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, f);;[128X[104X
  [4X[32X[104X
  
  [33X[0;0Yreturns an answer relatively quickly, whereas [10XGreensRClassOfElement[110X can 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 [27Xf:=[ 1, 1, 2, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 2, 1 ];;[127X[104X
    [4X[25Xgap>[125X [27Xf:=EvaluateWord(Generators(S), f);;                            [127X[104X
    [4X[25Xgap>[125X [27XR:=GreensRClassOfElementNC(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XSize(R);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27XL:=GreensLClassOfElementNC(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XSize(L);[127X[104X
    [4X[28X1 [128X[104X
    [4X[25Xgap>[125X [27Xf:=PartialPermNC([ 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), f);[127X[104X
    [4X[28X{[ 1, 2, 3, 4, 7, 8, 9, 10 ] -> [ 2, 3, 4, 5, 6, 8, 10, 11 ]}[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),      [2XIsRegularDClass[102X     ([14X4.4-6[114X),     and
  [2XIsRegularSemigroup[102X ([14X4.6-19[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{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{Transformation( [ 6, 1, 1, 6, 1, 2, 2, 6 ] )}[128X[104X
    [4X[25Xgap>[125X [27XGroupHClassOfGreensDClass(D);[127X[104X
    [4X[28X{Transformation( [ 6, 1, 1, 6, 1, 2, 2, 6 ] )}[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{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( [ PartialPermNC( [ 1, 2, 3, 5 ], [ 2, 1, 6, 3 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 6 ], [ 3, 5, 2, 6 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27Xf:=PartialPermNC([ 1 .. 3 ], [ 6, 3, 1 ]);;[127X[104X
    [4X[25Xgap>[125X [27XFirst(DClasses(s), x-> not IsTrivial(GroupHClass(x)));[127X[104X
    [4X[28X{<identity 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 of transformations or partial permutations.[133X
  
  [8X[10XGreensHClasses[110X and [10XHClasses[110X[108X
        [33X[0;6Y[3XX[103X  can  be  a  semigroup  of  transformations or partial permutations,
        [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 of transformations or partial permutations, or
        [13XD[113X-class.[133X
  
  [8X[10XGreensRClasses[110X and [10XRClasses[110X[108X
        [33X[0;6Y[3XX[103X  can  be  a semigroup of transformations or partial permutations, 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-8[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[ {Transformation( [ 1, 2, 3, 4 ] )}, {Transformation( [ 3, 4, 4, 4 ] )}, [128X[104X
    [4X[28X  {Transformation( [ 4, 4, 4, 4 ] )} ][128X[104X
    [4X[25Xgap>[125X [27XGreensRClasses(S);[127X[104X
    [4X[28X[ {Transformation( [ 1, 2, 3, 4 ] )}, {Transformation( [ 3, 4, 4, 4 ] )}, [128X[104X
    [4X[28X  {Transformation( [ 4, 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 [27XD:=GreensDClasses(S)[2];[127X[104X
    [4X[28X{Transformation( [ 3, 4, 4, 4 ] )}[128X[104X
    [4X[25Xgap>[125X [27XGreensLClasses(D);[127X[104X
    [4X[28X[ {Transformation( [ 3, 4, 4, 4 ] )}, {Transformation( [ 1, 2, 2, 2 ] )} ][128X[104X
    [4X[25Xgap>[125X [27XGreensRClasses(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[28X{Transformation( [ 3, 4, 4, 4 ] )}[128X[104X
    [4X[25Xgap>[125X [27XGreensHClasses(R);[127X[104X
    [4X[28X[ {Transformation( [ 3, 4, 4, 4 ] )}, {Transformation( [ 1, 2, 2, 2 ] )} ][128X[104X
    [4X[25Xgap>[125X [27Xs:=InverseSemigroup( PartialPermNC( [ 1, 2, 3 ], [ 2, 4, 1 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 3, 4 ], [ 3, 4, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XGreensDClasses(s);[127X[104X
    [4X[28X[ {<identity on [ 1, 2, 4 ]>}, {<identity on [ 1, 3, 4 ]>},[128X[104X
    [4X[28X  {<identity on [ 2, 4 ]>}, {<identity on [ 4 ]>}, {<empty mapping>} ][128X[104X
    [4X[25Xgap>[125X [27XGreensLClasses(s);[127X[104X
    [4X[28X[ {<identity on [ 1, 2, 4 ]>}, {[ 1, 2, 4 ] -> [ 3, 1, 2 ]},[128X[104X
    [4X[28X  {<identity on [ 1, 3, 4 ]>}, {<identity on [ 2, 4 ]>},[128X[104X
    [4X[28X  {[ 2, 4 ] -> [ 3, 1 ]}, {[ 2, 4 ] -> [ 1, 2 ]}, {[ 2, 4 ] -> [ 3, 2 ]},[128X[104X
    [4X[28X  {[ 2, 4 ] -> [ 4, 3 ]}, {[ 2, 4 ] -> [ 1, 4 ]}, {<identity on [ 4 ]>},[128X[104X
    [4X[28X  {[ 4 ] -> [ 1 ]}, {[ 4 ] -> [ 3 ]}, {[ 4 ] -> [ 2 ]}, {<empty mapping>} ][128X[104X
    [4X[25Xgap>[125X [27XD:=GreensDClasses(s)[3];[127X[104X
    [4X[28X{<identity on [ 2, 4 ]>}[128X[104X
    [4X[25Xgap>[125X [27XGreensLClasses(D);[127X[104X
    [4X[28X[ {<identity on [ 2, 4 ]>}, {[ 2, 4 ] -> [ 3, 1 ]}, {[ 2, 4 ] -> [ 1, 2 ]},[128X[104X
    [4X[28X  {[ 2, 4 ] -> [ 3, 2 ]}, {[ 2, 4 ] -> [ 4, 3 ]}, {[ 2, 4 ] -> [ 1, 4 ]} ][128X[104X
    [4X[25Xgap>[125X [27XGreensRClasses(D);[127X[104X
    [4X[28X[ {<identity on [ 2, 4 ]>}, {[ 1, 3 ] -> [ 4, 2 ]}, {[ 1, 2 ] -> [ 2, 4 ]},[128X[104X
    [4X[28X  {[ 2, 3 ] -> [ 4, 2 ]}, {[ 3, 4 ] -> [ 4, 2 ]}, {[ 1, 4 ] -> [ 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  of  transformations  or  partial  permutations  [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
  
  [33X[0;0YIn  the  display of an [10XIteratorOfRClassReps[110X, for a transformation semigroup,
  the  total  number  of  elements in the orbit of the semigroup acting on its
  [13XR[113X-class  representatives  by  multiplication  on  the  left  is given (every
  [13XR[113X-class  representative occurs in this orbit), the number of elements of the
  semigroup  that  have  so  far  been  computed  is  given, and the number of
  distinct  [13XR[113X-classes  that  have been found is given. Note that these numbers
  depend on the state of the semigroup and not of the iterator.[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 of R-class reps, 6 candidates, 0 elements, 0 R-classes>[128X[104X
    [4X[25Xgap>[125X [27XNextIterator(iter);[127X[104X
    [4X[28XTransformation( [ 1, 2, 3, 4, 5 ] )[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 of R-class reps, 10 candidates, 20 elements, 2 R-classes>[128X[104X
    [4X[25Xgap>[125X [27Xfile:=Concatenation(CitrusDir(), "/examples/inverse.citrus.gz");;[127X[104X
    [4X[25Xgap>[125X [27Xs:=InverseSemigroup(ReadCitrus(file, 8));[127X[104X
    [4X[28X<inverse semigroup 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 of L-class reps>[128X[104X
    [4X[25Xgap>[125X [27XNextIterator(iter);[127X[104X
    [4X[28X<partial perm on 634 pts>[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  of
  transformations  or  partial  permutations [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-8[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 of R-classes>[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{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[ PartialPermNC( [ 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 PartialPermNC( [ 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 PartialPermNC( [ 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 PartialPermNC( [ 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 PartialPermNC( [ 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 PartialPermNC( [ 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 PartialPermNC( [ 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 PartialPermNC( [ 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 PartialPermNC( [ 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 PartialPermNC( [ 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 of R-classes>[128X[104X
    [4X[25Xgap>[125X [27Xrepeat r:=NextIterator(iter); until Size(r)>1000;[127X[104X
    [4X[25Xgap>[125X [27Xr;[127X[104X
    [4X[28X{<identity on [ 8, 11, 13, 15, 17, 19 ]>}[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 transformations.[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 of transformations or partial permutations,
  [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-8[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( [ 1, 2, 3, 4 ] ), Transformation( [ 3, 4, 4, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 4, 4, 4, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XLClassReps(S);[127X[104X
    [4X[28X[ Transformation( [ 1, 2, 3, 4 ] ), Transformation( [ 3, 4, 4, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 2, 2, 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)[2];[127X[104X
    [4X[28X{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:=SymmetricInverseSemigp(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[ <partial perm on 64 pts>, <identity on [ 51 ]>, <identity on [ 27, 51 ]>, [128X[104X
    [4X[28X  <identity on [ 15, 27, 50, 51 ]>, [128X[104X
    [4X[28X  <identity on [ 8, 15, 26, 27, 49, 50, 51, 64 ]>, [128X[104X
    [4X[28X  <identity on [ 4, 8, 14, 15, 25, 26, 27, 48, 49, 50, 51, 60, 61, 62, 63, 64 [128X[104X
    [4X[28X     ]>, <partial perm on 32 pts> ][128X[104X
    [4X[25Xgap>[125X [27XL:=LClassNC(M, PartialPermNC( [ 51, 63 ] , [ 51, 47 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XHClassReps(L);[127X[104X
    [4X[28X[ [ 27, 51 ] -> [ 47, 51 ], <identity on [ 47, 51 ]>, [128X[104X
    [4X[28X  [ 50, 51 ] -> [ 47, 51 ], [ 51, 59 ] -> [ 51, 47 ], [128X[104X
    [4X[28X  [ 51, 63 ] -> [ 51, 47 ], [ 51, 64 ] -> [ 51, 47 ] ][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), and Sections [14X2.6[114X and [14X2.7[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{Transformation( [ 2, 1, 3, 1 ] )}[128X[104X
    [4X[25Xgap>[125X [27XB:=GreensRClassOfElement(S, Transformation( [ 1, 2, 3, 4 ] ));[127X[104X
    [4X[28X{Transformation( [ 1, 2, 3, 4 ] )}[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:=SymmetricInverseSemigp(4);;[127X[104X
    [4X[25Xgap>[125X [27XA:=GreensJClassOfElement(s, PartialPermNC([ 1 .. 3 ], [ 1, 3, 4 ]) );[127X[104X
    [4X[28X{<identity on [ 1 .. 3 ]>}[128X[104X
    [4X[25Xgap>[125X [27XB:=GreensJClassOfElement(s, PartialPermNC([ 1, 2 ], [ 3, 1 ]) );[127X[104X
    [4X[28X{<identity 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;0YThe  argument  [3XD[103X  should  be  a [13XD[113X-class of a semigroup of transformations or
  partial permutations. If [3XD[103X is a subsemigroup of [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[25Xgap>[125X [27XS:=InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 6, 8, 10 ], [ 2, 6, 7, 9, 1, 5 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 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[25Xgap>[125X [27Xf:=PartialPermNC([ 1, 2, 5, 6, 7, 9 ], [ 1, 2, 5, 6, 7, 9 ]);;[127X[104X
    [4X[25Xgap>[125X [27Xd:=GreensDClassOfElement(S, f);[127X[104X
    [4X[28X{<identity on [ 1, 2, 5, 6, 7, 9 ]>}[128X[104X
    [4X[25Xgap>[125X [27XInjectionPrincipalFactor(d);[127X[104X
    [4X[28XMappingByFunction( {<identity on [ 1, 2, 5, 6, 7, 9 [128X[104X
    [4X[28X ]>}, Rees Zero Matrix Semigroup over <zero group with [128X[104X
    [4X[28X2 generators>, function( f ) ... end, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27Xrms:=Range(last);[127X[104X
    [4X[28XRees Zero Matrix Semigroup over <zero group with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XSandwichMatrixOfReesZeroMatrixSemigroup(rms);[127X[104X
    [4X[28X[ [ (), 0, 0 ], [ 0, (), 0 ], [ 0, 0, () ] ][128X[104X
    [4X[25Xgap>[125X [27XSize(rms);[127X[104X
    [4X[28X10[128X[104X
    [4X[25Xgap>[125X [27XSize(d);[127X[104X
    [4X[28X9[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;
  see [2XInjectionPrincipalFactor[102X ([14X4.4-2[114X) for more details.[133X
  
  [1X4.4-4 IsGreensClassOfTransSemigp[101X
  
  [29X[2XIsGreensClassOfTransSemigp[102X( [3Xobj[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsGreensClassOfTransSemigp[110X  return [9Xtrue[109X if the object [3Xobj[103X is a Green's class
  of a transformation semigroup and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YThis property is required so that a Green's class knows that it belongs to a
  transformation semigroup, so that the methods defined in the [5XCitrus[105X are used
  in preference to those in the library.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup(Transformation( [ 2, 1, 4, 5, 6, 3 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 3, 1, 5, 4, 1 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XL:=GreensLClassOfElement(S, GeneratorsOfSemigroup(S)[1]);[127X[104X
    [4X[28X{Transformation( [ 2, 1, 4, 5, 6, 3 ] )}[128X[104X
    [4X[25Xgap>[125X [27XIsGreensClassOfTransSemigp(L);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.4-5 IsGreensClassOfPartialPermSemigp[101X
  
  [29X[2XIsGreensClassOfPartialPermSemigp[102X( [3Xobj[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsGreensClassOfPartialPermSemigp[110X  return [9Xtrue[109X if the object [3Xobj[103X is a Green's
  class of a semigroup of partial permutations and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YThis property is required so that a Green's class knows that it belongs to a
  semigroup of partial permutations, so that the methods defined in the [5XCitrus[105X
  are used in preference to those in the library.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup( PartialPermNC( [ 1, 3 ], [ 4, 3 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3 ], [ 4, 1, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XD:=GreensDClassOfElement(S, PartialPermNC( [ 1, 3 ], [ 4, 3 ] ) );        [127X[104X
    [4X[28X{<identity on [ 1, 3 ]>}[128X[104X
    [4X[25Xgap>[125X [27XIsGreensClassOfPartPermSemigroup(D);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X4.4-6 [33X[0;0YIsRegularXClass[133X[101X
  
  [29X[2XIsRegularDClass[102X( [3Xclass[103X ) [32X property
  [29X[2XIsRegularLClass[102X( [3Xclass[103X ) [32X property
  [29X[2XIsRegularRClass[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-7[114X), [2XIdempotents[102X ([14X4.5-6[114X), and [2XIsRegularTransformation[102X ([14X2.4-5[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 [27XIsRegularRClass(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 [27XIsRegularRClass(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 [27XIsRegularLClass(L);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XR:=GreensRClassOfElement(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XIsRegularRClass(R);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27Xg:=Transformation( [ 4, 4, 4, 4 ] );;[127X[104X
    [4X[25Xgap>[125X [27XIsRegularTransformation(S, g);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRegularLClass(LClass(S, g));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRegularLClass(RClass(S, g));[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsRegularRClass(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-7 NrRegularDClasses[101X
  
  [29X[2XNrRegularDClasses[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA positive integer.[133X
  
  [33X[0;0Y[10XNrRegularDClasses[110X  returns  the number of regular [13XD[113X-classes of the semigroup
  of  transformations  or  partial  permutations  [3XS[103X.  See also [2XIsRegularDClass[102X
  ([14X4.4-6[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[32X[104X
  
  
  [1X4.4-8 [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  of transformations or partial permutations, [13XD[113X-, [13XL[113X-, or [13XR[113X-class of
  a  semigroup of transformations or partial permutations (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 [27Xf:=Transformation( [ 2, 5, 4, 7, 4, 3, 6, 3 ] );;[127X[104X
    [4X[25Xgap>[125X [27XR:=RClass(S, f);[127X[104X
    [4X[28X{Transformation( [ 5, 2, 3, 6, 3, 4, 7, 4 ] )}[128X[104X
    [4X[25Xgap>[125X [27XNrHClasses(R);[127X[104X
    [4X[28X12[128X[104X
    [4X[25Xgap>[125X [27XD:=DClass(R);[127X[104X
    [4X[28X{Transformation( [ 5, 2, 3, 6, 3, 4, 7, 4 ] )}[128X[104X
    [4X[25Xgap>[125X [27XNrHClasses(D);[127X[104X
    [4X[28X72[128X[104X
    [4X[25Xgap>[125X [27XL:=LClass(S, f);[127X[104X
    [4X[28X{Transformation( [ 5, 2, 3, 6, 3, 4, 7, 4 ] )}[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 [27Xf:=Transformation( [ 1, 3, 3, 1, 3, 5 ] );;[127X[104X
    [4X[25Xgap>[125X [27XD:=DClass(S, f);[127X[104X
    [4X[28X{Transformation( [ 2, 1, 1, 2, 1, 4 ] )}[128X[104X
    [4X[25Xgap>[125X [27XNrRClasses(D);[127X[104X
    [4X[28X87[128X[104X
    [4X[25Xgap>[125X [27Xs:=SymmetricInverseSemigp(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-9 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 [10Xl[110X where [10Xj[110X is in [10Xl[i][110X if and only if [10XGreensDClasses(S)[j][110X is
  immediately  less  than  [10XGreensDClasses(S)[i][110X  in  the  partial  order of [13XD[113X-
  classes of [3XS[103X. The transitive closure of the relation [22X{(j,i): j∈ l[i]}[122X 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( PartialPermNC( [ 1, 2, 3 ], [ 1, 3, 4 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 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-10 SchutzenbergerGroup[101X
  
  [29X[2XSchutzenbergerGroup[102X( [3Xclass[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA permutation 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 of a semigroup of transformations
  or partial permutations.[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[ PartialPermNC([ 1, 2, 3, 7 ], [ 9, 2, 4, 8 ]),[127X[104X
    [4X[25X>[125X [27XPartialPermNC([ 1, 2, 6, 7, 8, 9, 10 ], [ 6, 8, 4, 5, 9, 1, 3 ]),[127X[104X
    [4X[25X>[125X [27XPartialPermNC([ 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,9) ]), [128X[104X
    [4X[28X  Group([ (4,9) ]), Group(()), Group(()), Group(()), Group(()), Group(()), [128X[104X
    [4X[28X  Group(()), Group(()), Group(()), Group(()), Group(()), [128X[104X
    [4X[28X  Group([ (2,5)(3,7) ]), Group([ (1,7,5,6,9,3) ]), Group(()), Group(()), [128X[104X
    [4X[28X  Group(()), Group(()), Group(()) ][128X[104X
  [4X[32X[104X
  
  
  [1X4.5 [33X[0;0YFurther attributes of semigroups[133X[101X
  
  [33X[0;0YIn  this  section  we  describe  the  attributes  [14X'Reference: Attributes'[114X of
  arbitrary  semigroups of transformations or partial permutations that can be
  found using [5XCitrus[105X.[133X
  
  [33X[0;0YIn  addition  to  those  functions  described in this section, the operation
  [2XDegree[102X  ([14X2.4-6[114X)  is  also  relevant  for  transformation semigroups; and the
  following   operations   are   also   relevant   to  semigroups  of  partial
  permutations:  [2XMovedPoints[102X ([14X2.5-6[114X), [2XNrMovedPoints[102X ([14X2.5-7[114X), [2XLargestMovedPoint[102X
  ([14X2.5-8[114X), [2XSmallestMovedPoint[102X ([14X2.5-9[114X), [2XDegree[102X ([14X2.5-12[114X).[133X
  
  [1X4.5-1 DomainOfPartialPermSemigroup[101X
  
  [29X[2XDomainOfPartialPermSemigroup[102X( [3XS[103X ) [32X operation
  [29X[2XPoints[102X( [3XS[103X ) [32X operation
  [29X[2XPoints[102X( [3XC[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10Ya set of positive integers.[133X
  
  [33X[0;0Y[10XPoints[110X  returns the points acted on by the semigroup of partial permutations
  [3XS[103X   or   the  partial  permutation  collection  [3XC[103X,  respectively.  See  also
  [2XMovedPoints[102X ([14X2.5-6[114X).[133X
  
  [33X[0;0Y[10XDomainOfPartialPermSemigroup[110X is a synonym of [10XPoints[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup( PartialPermNC( [ 1, 2, 3 ], [ 1, 3, 2 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3 ], [ 1, 2, 20 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XMovedPoints(S);[127X[104X
    [4X[28X[ 2, 3, 20 ][128X[104X
    [4X[25Xgap>[125X [27XPoints(S);[127X[104X
    [4X[28X[ 1, 2, 3, 20 ][128X[104X
  [4X[32X[104X
  
  [1X4.5-2 GeneratorsOfInverseSemigroup[101X
  
  [29X[2XGeneratorsOfInverseSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya list of partial permutations.[133X
  
  [33X[0;0YIf   [3XS[103X   is   an   inverse   semigroup   of   partial   permutations,   then
  [10XGeneratorsOfInverseSemigroup[110X  returns  the list of partial permutations used
  to define [3XS[103X, that is, an inverse semigroup generating set for [3XS[103X. Note that [3XS[103X
  is   then   the   semigroup   generated   by  the  partial  permutations  in
  [10XGeneratorsOfInverseSemigroup([3XS[103X[10X)[110X and their inverses.[133X
  
  [33X[0;0YIf  [3XS[103X  is  an  inverse monoid, then [10XGeneratorsOfInverseSemigroup[110X returns the
  list  of  partial permutations used to define [3XS[103X (as described above) and the
  identity of [3XS[103X; see [2XOne[102X ([14X2.2-3[114X).[133X
  
  [33X[0;0YSee also [2XInverseSemigroup[102X ([14X3.1-1[114X) and [2XGenerators[102X ([14X4.5-4[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=InverseMonoid([127X[104X
    [4X[25X>[125X [27X PartialPermNC( [ 1, 2 ], [ 1, 4 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPermNC( [ 1, 2, 4 ], [ 3, 4, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfSemigroup(S);[127X[104X
    [4X[28X[ <identity on [ 1 .. 4 ]>, [ 1, 2 ] -> [ 1, 4 ], [ 1, 2, 4 ] -> [ 3, 4, 1 ], [128X[104X
    [4X[28X  [ 1, 4 ] -> [ 1, 2 ], [ 1, 3, 4 ] -> [ 4, 1, 2 ] ][128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfInverseSemigroup(S);[127X[104X
    [4X[28X[ <identity on [ 1 .. 4 ]>, [ 1, 2 ] -> [ 1, 4 ], [ 1, 2, 4 ] -> [ 3, 4, 1 ] ][128X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfMonoid(S);[127X[104X
    [4X[28X[ [ 1, 2 ] -> [ 1, 4 ], [ 1, 2, 4 ] -> [ 3, 4, 1 ], [ 1, 4 ] -> [ 1, 2 ], [128X[104X
    [4X[28X  [ 1, 3, 4 ] -> [ 4, 1, 2 ] ][128X[104X
  [4X[32X[104X
  
  [1X4.5-3 GeneratorsOfInverseMonoid[101X
  
  [29X[2XGeneratorsOfInverseMonoid[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ya list of partial permutations.[133X
  
  [33X[0;0YIf    [3XS[103X    is    an   inverse   monoid   of   partial   permutations,   then
  [10XGeneratorsOfInverseMonoid[110X  returns  the list of partial permutations used to
  define  [3XS[103X,  that  is, an inverse monoid generating set for [3XS[103X. Note that [3XS[103X is
  then    the   semigroup   generated   by   the   partial   permutations   in
  [10XGeneratorsOfInverseSemigroup([3XS[103X[10X)[110X,  their inverses, and the identity of [3XS[103X; see
  [2XOne[102X ([14X2.2-3[114X). See also [2XInverseMonoid[102X ([14X3.1-1[114X) and [2XGenerators[102X ([14X4.5-4[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=InverseMonoid([127X[104X
    [4X[25X>[125X [27X PartialPermNC( [ 1, 2 ], [ 1, 4 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPermNC( [ 1, 2, 4 ], [ 3, 4, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XGeneratorsOfInverseMonoid(S);[127X[104X
    [4X[28X[ [ 1, 2 ] -> [ 1, 4 ], [ 1, 2, 4 ] -> [ 3, 4, 1 ] ][128X[104X
  [4X[32X[104X
  
  [1X4.5-4 Generators[101X
  
  [29X[2XGenerators[102X( [3XS[103X ) [32X function
  [6XReturns:[106X  [33X[0;10YA list of transformations or partial permutations.[133X
  
  [33X[0;0Y[10XGenerators[110X  returns  the  generating  set  used to define the semigroup [3XS[103X of
  transformations  or  partial  permutations.  The  generators  of a monoid or
  inverse  semigroup  [3XS[103X can be defined in several ways, for example, including
  or  excluding  the  identity  element,  including or not the inverses of the
  generators.  [10XGenerators([3XS[103X[10X)[110X uses the definition that returns the least number
  of  generators.  Nothing  new is computed when [10XGenerators[110X is called and this
  function should not be confused with [2XSmallGeneratingSet[102X ([14X4.5-16[114X).[133X
  
  [8XTransformation semigroup[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X  is  a  synonym  for  [2XGeneratorsOfSemigroup[102X  ([14XReference:
        GeneratorsOfSemigroup[114X).[133X
  
  [8XTransformation monoid[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X   is   a   synonym  for  [2XGeneratorsOfMonoid[102X  ([14XReference:
        GeneratorsOfMonoid[114X).[133X
  
  [8XInverse semigroup[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X is a synonym for [2XGeneratorsOfInverseSemigroup[102X ([14X4.5-2[114X).[133X
  
  [8XInverse monoid[108X
        [33X[0;6Y[10XGenerators([3XS[103X[10X)[110X is a synonym for [2XGeneratorsOfInverseMonoid[102X ([14X4.5-3[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[ Transformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ] ), [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-5 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 of transformations
  or  partial  permutations  [3XS[103X as a subsemigroup of [3XS[103X if it exists and returns
  [9Xfail[109X  if  it  does  not.  Use  [2XIsomorphismPermGroup[102X ([14X4.7-3[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-15[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( PartialPermNC( [ 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 [27XPartialPermNC( [ 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( PartialPermNC( [ 1, 3, 4 ], [ 4, 3, 5 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 5 ], [ 3, 1, 5, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XGroupOfUnits(S);[127X[104X
    [4X[28Xfail[128X[104X
  [4X[32X[104X
  
  [1X4.5-6 Idempotents[101X
  
  [29X[2XIdempotents[102X( [3Xobj[103X[, [3Xn[103X] ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA list of idempotents.[133X
  
  [33X[0;0Y[3Xobj[103X  should  be  a  semigroup  of  transformations  or partial permutations,
  [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 of
  transformations  or  partial permutations, 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),  [2XIsRegularDClass[102X
  ([14X4.4-6[114X) [2XIsGroupHClass[102X ([14XReference: IsGroupHClass[114X), [2XNrIdempotents[102X ([14X4.5-7[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( [ 2, 2, 4, 4 ] ), [128X[104X
    [4X[28X  Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 4, 2, 2, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XIdempotents(S);[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[28X  Transformation( [ 1, 2, 3, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27Xf:=Transformation( [ 2, 2, 4, 4 ] );;[127X[104X
    [4X[25Xgap>[125X [27XR:=GreensRClassOfElement(S, f);[127X[104X
    [4X[28X{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 [27Xf:=Transformation( [ 4, 2, 2, 4 ] );;[127X[104X
    [4X[25Xgap>[125X [27XL:=GreensLClassOfElement(S, f);;[127X[104X
    [4X[25Xgap>[125X [27XIdempotents(L);[127X[104X
    [4X[28X[ Transformation( [ 4, 2, 2, 4 ] ), Transformation( [ 2, 2, 4, 4 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XD:=DClassOfLClass(L);[127X[104X
    [4X[28X{Transformation( [ 1, 3, 3, 1 ] )}[128X[104X
    [4X[25Xgap>[125X [27XIdempotents(D);[127X[104X
    [4X[28X[ Transformation( [ 1, 3, 3, 1 ] ), Transformation( [ 1, 1, 3, 3 ] ), [128X[104X
    [4X[28X  Transformation( [ 4, 2, 2, 4 ] ), Transformation( [ 2, 2, 4, 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, 3, 3, 1 ] ), Transformation( [ 1, 1, 3, 3 ] ) ][128X[104X
    [4X[25Xgap>[125X [27XH:=GroupHClass(D);[127X[104X
    [4X[28X{Transformation( [ 3, 1, 1, 3 ] )}[128X[104X
    [4X[25Xgap>[125X [27XIdempotents(H);[127X[104X
    [4X[28X[ Transformation( [ 1, 3, 3, 1 ] ) ][128X[104X
    [4X[25Xgap>[125X [27Xs:=InverseSemigroup([127X[104X
    [4X[25X>[125X [27X[ PartialPermNC( [ 1, 2, 3, 4, 5, 7 ], [ 10, 6, 3, 4, 9, 1 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 4, 5, 6, 7, 8 ], [ 6, 10, 7, 4, 8, 2, 9, 1 ] ) ]);;[127X[104X
    [4X[25Xgap>[125X [27XIdempotents(s, 1);[127X[104X
    [4X[28X[ <identity on [ 4 ]> ][128X[104X
    [4X[25Xgap>[125X [27XIdempotents(s, 0);[127X[104X
    [4X[28X[  ][128X[104X
  [4X[32X[104X
  
  [1X4.5-7 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 of transformations or partial permutations, [13XD[113X-, [13XL[113X-, [13XH[113X-, or [13XR[113X-class
  of  a  semigroup  of  transformations or partial permutations. 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-6[114X),
  [2XIsRegularDClass[102X   ([14XReference:   IsRegularDClass[114X),   [2XIsRegularDClass[102X  ([14X4.4-6[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[ PartialPermNC( [ 1, 2, 3, 5, 7, 9, 10 ], [ 6, 7, 2, 9, 1, 5, 3 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 5, 6, 7, 9, 10 ], [ 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:=PartialPermNC([ 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-8 IdempotentGeneratedSubsemigp[101X
  
  [29X[2XIdempotentGeneratedSubsemigp[102X( [3XS[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA semigroup.[133X
  
  [33X[0;0Y[10XIdempotentGeneratedSubsemigp[110X  returns  the  subsemigroup of the semigroup of
  transformations or partial permutations [3XS[103X generated by the idempotents of [3XS[103X.[133X
  
  [33X[0;0YSee also [2XIdempotents[102X ([14X4.5-6[114X) and [2XSmallGeneratingSet[102X ([14X4.5-16[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xfile:=Concatenation(CitrusDir(), "/examples/graph8c.citrus.gz");;[127X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup(ReadCitrus(file, 13));;[127X[104X
    [4X[25Xgap>[125X [27XIdempotentGeneratedSubsemigp(S);[127X[104X
    [4X[28X<monoid with 20 generators>[128X[104X
    [4X[25Xgap>[125X [27XS:=SymmetricInverseSemigp(5);[127X[104X
    [4X[28X<inverse semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XIdempotentGeneratedSubsemigp(S);[127X[104X
    [4X[28X<inverse semigroup with 6 generators>[128X[104X
  [4X[32X[104X
  
  [1X4.5-9 IrredundantGeneratingSubset[101X
  
  [29X[2XIrredundantGeneratingSubset[102X( [3Xcoll[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA list of transformations or partial permutations.[133X
  
  [33X[0;0YIf  [3Xcoll[103X  is  a  transformation or partial permutation collection, then this
  function returns a subset [10XU[110X of [3Xcoll[103X or [10XGenerators([3Xcoll[103X[10X)[110X such that no element
  of [10XU[110X is generated by the other elements of [10XU[110X.[133X
  
  [33X[0;0YSee   also   [2XGenerators[102X   ([14X4.5-4[114X),   [2XIsTransformationCollection[102X  ([14XReference:
  IsTransformationCollection[114X), and [2XSmallGeneratingSet[102X ([14X4.5-16[114X).[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 monoid 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[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;0YCurrently,  [10XMinimalIdeal[110X  returns  a  semigroup  with  as many generators as
  elements. There are plans to improve this in future versions of [5XCitrus[105X.[133X
  
  [33X[0;0YNote that [10XMinimalIdeal[110X is significantly faster than finding the [13XD[113X-class with
  minimum  rank  representative  (which  is  also the minimal ideal). See also
  [2XPartialOrderOfDClasses[102X   ([14X4.4-9[114X)   and  [2XIsGreensLessThanOrEqual[102X  ([14XReference:
  IsGreensLessThanOrEqual[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<semigroup with 5 generators>[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 [27Xf:=Transformation( [ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8 ] );;[127X[104X
    [4X[25Xgap>[125X [27XD:=DClass(S, f);[127X[104X
    [4X[28X{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 [27XS:=POI(10);                  [127X[104X
    [4X[28X<inverse monoid with 10 generators>[128X[104X
    [4X[25Xgap>[125X [27XMinimalIdeal(S);[127X[104X
    [4X[28X<inverse semigroup with 1 generator>[128X[104X
  [4X[32X[104X
  
  [1X4.5-11 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  of
  transformations  or  partial  permutations if it has one 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( PartialPermNC( [ 1, 3, 4 ], [ 5, 3, 1 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 4 ], [ 4, 3, 1, 2 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 3, 4, 5 ], [ 2, 4, 5, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28X<empty mapping>[128X[104X
  [4X[32X[104X
  
  [1X4.5-12 NaturalPartialOrder[101X
  
  [29X[2XNaturalPartialOrder[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YThe natural partial order on an inverse semigroup.[133X
  
  [33X[0;0YThe  [13Xnatural  partial order[113X [22X≤[122X on an inverse semigroup [22XS[122X is defined by [22Xs≤[122X[22Xt[122X if
  there  exists  an  idempotent  [22Xe[122X  in  [22XS[122X such that [22Xs=et[122X. Hence if [3Xf[103X and [3Xg[103X are
  partial  permutations,  then [3Xf[103X[22X≤[122X[3Xg[103X if and only if [3Xf[103X is a restriction of [3Xg[103X; see
  [2XRestrictedPartialPerm[102X ([14X2.2-2[114X).[133X
  
  [33X[0;0Y[10XNaturalPartialOrder[110X  returns  the  natural  partial  order  on  the  inverse
  semigroup  of  partial permutations [3XS[103X as a list of sets of positive integers
  where  entry  [10Xi[110X  in  [10XNaturalPartialOrder([3XS[103X[10X)[110X  is  the  set  of  positions  in
  [10XElements([3XS[103X[10X)[110X    of    elements    less    than   [10XElements([3XS[103X[10X)[i][110X.   See   also
  [2XNaturalLeqPartialPerm[102X ([14X2.7-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup([ PartialPermNC( [ 1, 3 ], [ 1, 3 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2 ], [ 3, 2 ] ) ] );[127X[104X
    [4X[28X<inverse semigroup with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X11[128X[104X
    [4X[25Xgap>[125X [27XNaturalPartialOrder(S);[127X[104X
    [4X[28X[ [  ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1 ], [ 1, 2, 4 ], [ 1, 3, 4 ],[128X[104X
    [4X[28X  [ 1, 2, 6 ], [ 1, 4, 5 ], [ 1, 4, 6 ] ][128X[104X
    [4X[25Xgap>[125X [27XNaturalLeqPartialPerm(Elements(S)[4], Elements(S)[10]);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XNaturalLeqPartialPerm(Elements(S)[4], Elements(S)[9]); [127X[104X
    [4X[28Xfalse[128X[104X
  [4X[32X[104X
  
  [1X4.5-13 NrElementsOfRank[101X
  
  [29X[2XNrElementsOfRank[102X( [3XS[103X, [3Xn[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10Ythe number of elements of a given rank.[133X
  
  [33X[0;0Y[10XNrElementsOfRank[110X  returns  the  number  of  elements  of  the semigroup [3XS[103X of
  partial  permutations  or  transformations  with  rank  [3Xn[103X; see [2XRank[102X ([14X2.4-7[114X),
  [2XRankOfPartialPerm[102X     ([14X2.5-11[114X)    and    [2XRankOfTransformation[102X    ([14XReference:
  RankOfTransformation[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup( Transformation( [ 1, 3, 4, 1, 3 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 4, 1, 5, 5 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 2, 5, 3, 5, 3 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 4, 1, 2, 2, 1 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 5, 5, 1, 1, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XNrElementsOfRank(S, 10);[127X[104X
    [4X[28X0[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X602[128X[104X
    [4X[25Xgap>[125X [27XList([1..5], x-> NrElementsOfRank(S, x));[127X[104X
    [4X[28X[ 5, 260, 336, 1, 0 ][128X[104X
    [4X[25Xgap>[125X [27XSum(last);[127X[104X
    [4X[28X602[128X[104X
    [4X[25Xgap>[125X [27XT:=FullTransformationSemigroup(5);;[127X[104X
    [4X[25Xgap>[125X [27XList([1..5], x-> NrElementsOfRank(T, x));[127X[104X
    [4X[28X[ 5, 300, 1500, 1200, 120 ][128X[104X
    [4X[25Xgap>[125X [27XSum(last);[127X[104X
    [4X[28X3125[128X[104X
    [4X[25Xgap>[125X [27XS:=SymmetricInverseSemigp(5);;[127X[104X
    [4X[25Xgap>[125X [27XNrElementsOfRank(S, 4);[127X[104X
    [4X[28X600[128X[104X
    [4X[25Xgap>[125X [27XBinomial(5,4)^2*Factorial(4);[127X[104X
    [4X[28X600[128X[104X
  [4X[32X[104X
  
  [1X4.5-14 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   ([14X4.5-12[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 [27XPartialPermNC( [ 1 ], [ 4 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3 ], [ 2, 1, 3 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3 ], [ 3, 1, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XMultiplicativeZero(S);[127X[104X
    [4X[28X<empty mapping>[128X[104X
    [4X[25Xgap>[125X [27XPrimitiveIdempotents(S);[127X[104X
    [4X[28X[ <identity on [ 4 ]>, <identity on [ 1 ]>, <identity on [ 2 ]>, [128X[104X
    [4X[28X  <identity on [ 3 ]> ][128X[104X
  [4X[32X[104X
  
  [1X4.5-15 Random[101X
  
  [29X[2XRandom[102X( [3XS[103X ) [32X method
  [6XReturns:[106X  [33X[0;10YA transformation or a partial permutation.[133X
  
  [33X[0;0YThis  function  returns a random element of the semigroup of transformations
  or  partial  permutations  [3XS[103X.  If  the  [13XR[113X-class  structure of [3XS[103X has not been
  calculated,       then       a       short       product       (at      most
  [10X2*Length(GeneratorsOfSemigroup([3XS[103X[10X))[110X)   of  generators  is  returned.  If  the
  [13XR[113X-class  structure of [3XS[103X is known, then a random element of a randomly chosen
  [13XR[113X-class is returned.[133X
  
  [1X4.5-16 SmallGeneratingSet[101X
  
  [29X[2XSmallGeneratingSet[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA small generating set for a semigroup.[133X
  
  [33X[0;0Y[10XSmallGeneratingSet[110X  returns  a relatively small generating subset of the set
  of generators of the semigroup [3XS[103X of transformations or partial permutations;
  see  [2XGenerators[102X  ([14X4.5-4[114X).  If  the  number  of  generators  for [3XS[103X is already
  relatively  small,  then  this  function  will  often  return  the  original
  generating set.[133X
  
  [33X[0;0YAs  neither  irredundancy, nor minimal length are proven, [10XSmallGeneratingSet[110X
  usually  returns  an  answer  much  faster  than [2XIrredundantGeneratingSubset[102X
  ([14X4.5-9[114X).  It  can  be  used whenever a small generating set is desired which
  does   not   necessarily  needs  to  be  optimal.  [10XSmallGeneratingSet[110X  works
  particularly well for inverse semigroups of partial permutations.[133X
  
  [33X[0;0YNote  that  [10XSmallGeneratingSet[110X may return different results in different [5XGAP[105X
  sessions.[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 ] ), Transformation( [ 2, 4, 4, 2, 1 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 1, 4, 3, 2 ] ), Transformation( [ 3, 2, 3, 4, 1 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 4, 4, 3, 3, 5 ] ), Transformation( [ 5, 1, 5, 5, 3 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 4, 3, 5, 2 ] ), Transformation( [ 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[32X[104X
  
  
  [1X4.5-17 [33X[0;0YGraded images and kernels[133X[101X
  
  [29X[2XGradedImagesOfTransSemigroup[102X( [3XS[103X ) [32X attribute
  [29X[2XGradedKernelsOfTransSemigroup[102X( [3XS[103X ) [32X attribute
  [6XReturns:[106X  [33X[0;10YA list of images or kernels.[133X
  
  [33X[0;0Y[10XGradedImagesOfTransSemigroup[110X returns a list where the [10Xi[110Xth entry is a list of
  all  the  images  of  transformations in the transformation semigroup [3XS[103X with
  size [10Xi[110X.[133X
  
  [33X[0;0Y[10XGradedKernelsOfTransSemigroup[110X  returns  a list where the [10Xi[110Xth entry is a list
  of the values of [2XCanonicalTransSameKernel[102X ([14X2.4-1[114X) for all transformations in
  [3XS[103X with rank [10Xi[110X.[133X
  
  [33X[0;0YSee   also   [2XImagesOfTransSemigroup[102X   ([14X4.5-18[114X)  and  [2XKernelsOfTransSemigroup[102X
  ([14X4.5-18[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup(Transformation( [ 1, 5, 1, 1, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 4, 4, 5, 2, 2 ] ));;[127X[104X
    [4X[25Xgap>[125X [27XGradedImagesOfTransSemigroup(S);[127X[104X
    [4X[28X[ [ [ 1 ], [ 4 ], [ 2 ], [ 5 ] ], [ [ 1, 5 ], [ 2, 4 ] ], [ [ 2, 4, 5 ] ], [128X[104X
    [4X[28X  [  ], [  ] ][128X[104X
    [4X[25Xgap>[125X [27XGradedKernelsOfTransSemigroup(S);[127X[104X
    [4X[28X[ [ [ 1, 1, 1, 1, 1 ] ], [ [ 1, 2, 1, 1, 1 ], [ 1, 1, 1, 2, 2 ] ], [128X[104X
    [4X[28X  [ [ 1, 1, 2, 3, 3 ] ], [  ], [  ] ][128X[104X
  [4X[32X[104X
  
  
  [1X4.5-18 [33X[0;0YImages and kernels[133X[101X
  
  [29X[2XImagesOfTransSemigroup[102X( [3XS[103X[, [3Xn[103X] ) [32X attribute
  [29X[2XKernelsOfTransSemigroup[102X( [3XS[103X[, [3Xn[103X] ) [32X attribute
  [6XReturns:[106X  [33X[0;10YAn orbit.[133X
  
  [33X[0;0YThe  argument [3XS[103X should be a transformation semigroup and the optional second
  argument  [3Xn[103X  should  be a positive integer not greater than the degree of [3XS[103X.
  [10XImagesOfTransSemigroup[110X returns the [2XOrb[102X ([14Xorb: orb[114X) object:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XOrb(S, [1..Degree(S)], OnSets);[128X[104X
  [4X[32X[104X
  
  [33X[0;0Ywhich contains the image sets of all the transformations belonging to [3XS[103X.[133X
  
  [33X[0;0Y[10XKernelsOfTransSemigroup[110X returns the [2XOrb[102X ([14Xorb: orb[114X) object:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28XOrb(S, [1,..Degree(S)], OnKernelsAntiAction);[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIf the optional second argument [3Xn[103X (a positive integer) is present, then only
  the images or kernels of size at least [3Xn[103X are found.[133X
  
  [33X[0;0YNote  that the image/kernel [10X[1..Degree(S)][110X always occurs in both orbits even
  if there is no element of [3XS[103X with image/kernel equal to [10X[1..Degree(S)][110X.[133X
  
  [33X[0;0YSee           also           [2XGradedImagesOfTransSemigroup[102X          ([14X4.5-17[114X),
  [2XGradedKernelsOfTransSemigroup[102X  ([14X4.5-17[114X),  [2XOnKernelsAntiAction[102X  ([14X2.9-1[114X),  and
  [2XCanonicalTransSameKernel[102X ([14X2.4-1[114X)[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27X S:=Semigroup( Transformation( [ 6, 4, 4, 4, 6, 1 ] ), [127X[104X
    [4X[25X>[125X [27XTransformation( [ 6, 5, 1, 6, 2, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27Xo:=ImagesOfTransSemigroup(S, 6); Enumerate(o); AsList(o);[127X[104X
    [4X[28X<open orbit, 1 points with Schreier tree with grading>[128X[104X
    [4X[28X<closed orbit, 1 points with Schreier tree with grading>[128X[104X
    [4X[28X[ [ 1 .. 6 ] ][128X[104X
    [4X[25Xgap>[125X [27Xo:=ImagesOfTransSemigroup(S, 5); Enumerate(o); AsList(o);[127X[104X
    [4X[28X<open orbit, 1 points with Schreier tree with grading>[128X[104X
    [4X[28X<closed orbit, 1 points with Schreier tree with grading>[128X[104X
    [4X[28X[ [ 1 .. 6 ] ][128X[104X
    [4X[25Xgap>[125X [27Xo:=ImagesOfTransSemigroup(S, 4); Enumerate(o); AsList(o);[127X[104X
    [4X[28X<open orbit, 1 points with Schreier tree with grading>[128X[104X
    [4X[28X<closed orbit, 2 points with Schreier tree with grading>[128X[104X
    [4X[28X[ [ 1 .. 6 ], [ 1, 2, 5, 6 ] ][128X[104X
    [4X[25Xgap>[125X [27Xo:=ImagesOfTransSemigroup(S, 3); Enumerate(o); AsList(o);[127X[104X
    [4X[28X<open orbit, 1 points with Schreier tree with grading>[128X[104X
    [4X[28X<closed orbit, 4 points with Schreier tree with grading>[128X[104X
    [4X[28X[ [ 1 .. 6 ], [ 1, 4, 6 ], [ 1, 2, 5, 6 ], [ 2, 5, 6 ] ][128X[104X
    [4X[25Xgap>[125X [27Xo:=ImagesOfTransSemigroup(S, 2); Enumerate(o); AsList(o);[127X[104X
    [4X[28X<open orbit, 1 points with Schreier tree with grading>[128X[104X
    [4X[28X<closed orbit, 8 points with Schreier tree with grading>[128X[104X
    [4X[28X[ [ 1 .. 6 ], [ 1, 4, 6 ], [ 1, 2, 5, 6 ], [ 2, 6 ], [ 2, 5, 6 ], [ 1, 4 ],[128X[104X
    [4X[28X  [ 2, 5 ], [ 4, 6 ] ][128X[104X
    [4X[25Xgap>[125X [27Xo:=ImagesOfTransSemigroup(S, 1); Enumerate(o); AsList(o);[127X[104X
    [4X[28X<open orbit, 1 points with Schreier tree with grading>[128X[104X
    [4X[28X<closed orbit, 13 points with Schreier tree with grading>[128X[104X
    [4X[28X[ [ 1 .. 6 ], [ 1, 4, 6 ], [ 1, 2, 5, 6 ], [ 2, 6 ], [ 2, 5, 6 ], [ 1, 4 ],[128X[104X
    [4X[28X  [ 2, 5 ], [ 4, 6 ], [ 6 ], [ 1 ], [ 2 ], [ 4 ], [ 5 ] ][128X[104X
    [4X[25Xgap>[125X [27Xo:=ImagesOfTransSemigroup(S); Enumerate(o); AsList(o);[127X[104X
    [4X[28X<open orbit, 1 points with Schreier tree>[128X[104X
    [4X[28X<closed orbit, 13 points with Schreier tree>[128X[104X
    [4X[28X[ [ 1 .. 6 ], [ 1, 4, 6 ], [ 1, 2, 5, 6 ], [ 2, 6 ], [ 2, 5, 6 ], [ 1, 4 ],[128X[104X
    [4X[28X  [ 2, 5 ], [ 4, 6 ], [ 6 ], [ 1 ], [ 2 ], [ 4 ], [ 5 ] ][128X[104X
  [4X[32X[104X
  
  
  [1X4.6 [33X[0;0YFurther properties of semigroups[133X[101X
  
  [33X[0;0YIn this section we describe several properties [14X'Reference: Properties'[114X of an
  arbitrary  semigroup  of transformations or partial permutations that can be
  determined using [5XCitrus[105X.[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 of transformations or
  partial  permutations  [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
  [2XIsSemilatticeAsSemigroup[102X ([14X4.6-22[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 [27XPartialPermNC( [ 1, 2, 3, 4, 8, 9 ], [ 5, 8, 7, 6, 9, 1 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 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(IdempotentGeneratedSubsemigp(S));[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 of transformations or partial permutations 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[32X[104X
  
  [1X4.6-3 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 of transformations or partial
  permutations  is  a  0-simple inverse semigroup, and [9Xfalse[109X if it is not. See
  also [2XIsZeroSimpleSemigroup[102X ([14X4.6-28[114X) and [2XIsInverseSemigroup[102X ([14X4.6-10[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[32X[104X
  
  [1X4.6-4 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 of transformations or
  partial permutations [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[32X[104X
  
  [1X4.6-5 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 of transformations or
  partial  permutations  [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 PartialPermNC( [ 1, 2, 3, 4, 5, 6 ], [ 2, 5, 1, 3, 9, 6 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPermNC( [ 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[32X[104X
  
  [1X4.6-6 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
  of  transformations  or partial permutations [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.6-4[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[32X[104X
  
  [1X4.6-7 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-5[114X)  and  [2XIdempotents[102X  ([14X4.5-6[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( PartialPermNC( [ 1, 2, 4 ], [ 3, 1, 4 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 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(SymmetricInverseSemigp(5)); [127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-8 IsGroupAsSemigroup[101X
  
  [29X[2XIsGroupAsSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YIf  the semigroup of transformations or partial permutations [3XS[103X is actually a
  group,  then  [10XIsGroupAsSemigroup[110X  returns  [9Xtrue[109X.  If it is not a group, then
  [9Xfalse[109X is returned.[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 semigroup with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsGroupAsSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X4.6-9 [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  of
  transformations  or  partial  permutations [3XS[103X is generated by its idempotents
  and   [9Xfalse[109X   if   it   is   not.   See   also   [2XIdempotents[102X   ([14X4.5-6[114X)   and
  [2XIdempotentGeneratedSubsemigp[102X ([14X4.5-8[114X).[133X
  
  [33X[0;0YAn  inverse  semigroup  is  idempotent-generated  if  and  only  if  it is a
  semilattice; see [2XIsSemilatticeAsSemigroup[102X ([14X4.6-22[114X).[133X
  
  [33X[0;0YSemiband and idempotent-generated are synonymous in this context.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=SingularSemigroup(4);[127X[104X
    [4X[28X<semigroup with 12 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsIdempotentGenerated(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-10 IsInverseSemigroup[101X
  
  [29X[2XIsInverseSemigroup[102X( [3XS[103X ) [32X property
  [29X[2XIsInverseMonoid[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0YIf  [3XS[103X  is  a  semigroup  of  transformations  or  partial permutations, then
  [10XIsInverseSemigroup[110X returns [9Xtrue[109X if [3XS[103X is an inverse semigroup and [9Xfalse[109X if it
  is  not.  If  [3XS[103X  is  monoid of transformations or partial permutations, then
  [10XIsInverseMonoid[110X  returns  [9Xtrue[109X  if [3XS[103X is an inverse monoid and [9Xfalse[109X if it is
  not.[133X
  
  [33X[0;0YA  semigroup  is  an  [13Xinverse  semigroup[113X  if  every  element  [10Xx[110X has a unique
  semigroup  inverse,  that  is,  a  unique  element  [10Xy[110X  such that [10Xx*y*x=x[110X and
  [10Xy*x*y=y[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens:=[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 [27XS:=Semigroup(gens);;[127X[104X
    [4X[25Xgap>[125X [27XIsInverseSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-11 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  of
  transformations  or  partial  permutations  [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-8[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[32X[104X
  
  [1X4.6-12 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 of transformations or
  partial permutations 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-13 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 of transformations or
  partial permutations 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.6-14[114X)    and   [2XIndexPeriodOfTransformation[102X
  ([14X2.4-2[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[32X[104X
  
  [1X4.6-14 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   of
  transformations  or  partial  permutations 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-13[114X)  and
  [2XIndexPeriodOfTransformation[102X ([14X2.4-2[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xf:=PartialPermNC( [ 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[32X[104X
  
  [1X4.6-15 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  the  semigroup of transformations or
  partial  permutations  [3XS[103X  is a monoid and [9Xfalse[109X if it is not. It is possible
  that  [3XS[103X  is a monoid but does not satisfy [2XIsMonoid[102X ([14XReference: IsMonoid[114X) and
  so   [3XS[103X   does   not   possess   the   attributes   of  a  monoid  (such  as,
  [2XGeneratorsOfMonoid[102X ([14XReference: GeneratorsOfMonoid[114X)).[133X
  
  [33X[0;0YA  semigroup of transformations satisfies [10XIsMonoidAsSemigroup[110X if and only if
  it  satisfies  [2XIsTransformationMonoid[102X ([14XReference: IsTransformationMonoid[114X). A
  semigroup  of partial permutations satisfies [10XIsMonoidAsSemigroup[110X if and only
  if it satisfies [2XIsPartialPermMonoid[102X ([14X4.6-16[114X).[133X
  
  [33X[0;0YSee    also    [2XOne[102X    ([14XReference:   One[114X),   [2XIsInverseMonoid[102X   ([14X4.6-10[114X)   and
  [2XIsomorphismTransformationMonoid[102X ([14X4.7-4[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 [27XMultiplicativeNeutralElement(S);[127X[104X
    [4X[28XTransformation( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 9 ] )[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-16 IsPartialPermSemigroup[101X
  
  [29X[2XIsPartialPermSemigroup[102X( [3XS[103X ) [32X property
  [29X[2XIsPartialPermMonoid[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsPartialPermSemigroup[110X   returns  [9Xtrue[109X  if  [3XS[103X  is  a  semigroup  of  partial
  permutations  and  [9Xfalse[109X if it is not. [10XIsPartialPermMonoid[110X returns [9Xtrue[109X if [3XS[103X
  is  a  monoid  of  partial  permutations and [9Xfalse[109X if it is not. Note that a
  semigroup  [3XS[103X  satisfies  [10XIsPartialPermMonoid[110X  if  and only if it contains an
  identity  but  [3XS[103X  may or may not satisfy [2XIsMonoid[102X ([14XReference: IsMonoid[114X); see
  [2XIsMonoidAsSemigroup[102X ([14X4.6-15[114X).[133X
  
  [1X4.6-17 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 of transformations or
  partial permutations 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-19[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[32X[104X
  
  [1X4.6-18 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 of transformations or
  partial permutations 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 [10Xx,y,z[110X in [3XS[103X we have that [10Xx^2=x[110X
  and  [10Xxyz=xz[110X. An 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[32X[104X
  
  [1X4.6-19 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  of transformations or
  partial permutations [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),  [2XIsRegularDClass[102X
  ([14X4.4-6[114X), and [2XIsRegularTransformation[102X ([14X2.4-5[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XIsRegularSemigroup(FullTransformationSemigroup(5));[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X4.6-20 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 semigroup of transformations or
  partial permutations [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-21 [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 of transformations or partial
  permutations  [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 [2XIsSemilatticeAsSemigroup[102X
  ([14X4.6-22[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-22 IsSemilatticeAsSemigroup[101X
  
  [29X[2XIsSemilatticeAsSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsSemilatticeAsSemigroup[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<semigroup with 32 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsSemilatticeAsSemigroup(A);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  
  [1X4.6-23 [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  of  transformations or
  partial permutations [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 [27Xgens:=[ 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 [27XS:=Semigroup(gens);;[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[32X[104X
  
  [1X4.6-24 IsSynchronizingSemigroup[101X
  
  [29X[2XIsSynchronizingSemigroup[102X( [3XS[103X ) [32X property
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[10XIsSynchronizingSemigroup[110X  returns [9Xtrue[109X if the semigroup of transformations [3XS[103X
  contains a constant transformation. See also [2XConstantTransformation[102X ([14X2.1-1[114X).[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);[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);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XRepresentative(MinimalIdeal(S));[127X[104X
    [4X[28XTransformation( [ 7, 7, 8, 7, 7, 7, 8, 7, 8, 7 ] )[128X[104X
  [4X[32X[104X
  
  [1X4.6-25 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 of transformations or partial
  permutations [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[32X[104X
  
  [1X4.6-26 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 of transformations or
  partial permutations [3XS[103X is a zero rectangular band and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  semigroup  is a [13Xzero rectangular band[113X if it is zero simple and [13XH[113X-trivial;
  see  also [2XIsZeroSimpleSemigroup[102X ([14X4.6-28[114X) and [2XIsHTrivial[102X ([14X4.6-21[114X). An inverse
  semigroup  is a zero rectangular band if and only if it is a zero group; see
  [2XIsZeroGroup[102X ([14X4.6-25[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, 1, 1, [127X[104X
    [4X[25X>[125X [27X     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, 11, 1,[127X[104X
    [4X[25X>[125X [27X     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, 20, 1,[127X[104X
    [4X[25X>[125X [27X     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, 6, 1,[127X[104X
    [4X[25X>[125X [27X     1, 24, 1, 1, 1, 1, 6 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsZeroRectangularBand(Semigroup(Elements(GreensDClasses(S)[9]))); [127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsZeroRectangularBand(Semigroup(Elements(GreensDClasses(S)[3])));[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-27 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 of transformations or partial
  permutations [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-28 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 of transformations or
  partial permutations [3XS[103X is a zero simple semigroup and [9Xfalse[109X if it is not.[133X
  
  [33X[0;0YA  semigroup  is a [13Xzero simple semigroup[113X if it has no two-sided ideals other
  than   itself   and   the   set   containing  the  zero  element;  see  also
  [2XMultiplicativeZero[102X ([14X4.5-11[114X). An inverse semigroup is zero simple if and only
  if it is a Brandt semigroup; see [2XIsBrandtSemigroup[102X ([14X4.6-3[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;0YChanging the representation of a semigroup[133X[101X
  
  [1X4.7-1 AntiIsomorphismTransformationSemigroup[101X
  
  [29X[2XAntiIsomorphismTransformationSemigroup[102X( [3XS[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YAn anti-isomorphism.[133X
  
  [33X[0;0YIf  [3XS[103X is a semigroup, then [10XAntiIsomorphismTransformationSemigroup[110X returns an
  anti-isomorphism  from  [3XS[103X  to  a  transformation  semigroup. At present, the
  degree  of  the resulting transformation semigroup equals the size of [3XS[103X plus
  [22X1[122X, and, consequently, this function is of limited use.[133X
  
  [33X[0;0YSee        also        [2XIsomorphismTransformationSemigroup[102X        ([14XReference:
  IsomorphismTransformationSemigroup[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xfile:=Concatenation(CitrusDir(), "/examples/selfcomp.citrus.gz");;[127X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup(ReadCitrus(file, 34));;[127X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X1016[128X[104X
    [4X[25Xgap>[125X [27XAntiIsomorphismTransformationSemigroup(S); [127X[104X
    [4X[28XMappingByFunction( <semigroup with 7 generators>, <semigroup with [128X[104X
    [4X[28X7 generators>, function( a ) ... end )[128X[104X
  [4X[32X[104X
  
  [1X4.7-2 IsomorphismPartialPermMonoid[101X
  
  [29X[2XIsomorphismPartialPermMonoid[102X( [3XS[103X ) [32X operation
  [29X[2XIsomorphismPartialPermSemigroup[102X( [3XS[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YAn isomorphism.[133X
  
  [33X[0;0Y[10XIsomorphismPartialPermSemigroup([3XS[103X[10X)[110X  returns  an isomorphism from the inverse
  semigroup or group [3XS[103X to an inverse semigroup of partial permutations.[133X
  
  [33X[0;0Y[10XIsomorphismPartialPermMonoid([3XS[103X[10X)[110X  returns  an  isomorphism  from  the inverse
  monoid or group [3XS[103X to an inverse monoid of partial permutations.[133X
  
  [33X[0;0YWe  only describe [10XIsomorphismPartialPermMonoid[110X, the corresponding statements
  for [10XIsomorphismPartialPermSemigroup[110X also hold.[133X
  
  [8XPartial permutation semigroups[108X
        [33X[0;6YIf [3XS[103X is a partial permutation semigroup that does not satisfy [2XIsMonoid[102X
        ([14XReference:  IsMonoid[114X)  but does satisfy [2XIsMonoidAsSemigroup[102X ([14X4.6-15[114X),
        then  [10XIsomorphismPartialPermMonoid([3XS[103X[10X)[110X returns an isomorphism from [3XS[103X to
        an inverse monoid of partial permutations; see [2XInverseMonoid[102X ([14X3.1-1[114X).[133X
  
  [8XPermutation groups[108X
        [33X[0;6YIf [3XS[103X is a permutation group, then [10XIsomorphismPartialPermMonoid[110X returns
        an  isomorphism from [3XS[103X to an inverse monoid of partial permutations on
        the  set  [10XMovedPoints([3XS[103X[10X)[110X  obtained  using  [2XAsPartialPerm[102X  ([14X2.8-3[114X). The
        inverse  of  this isomorphism is obtained using [2XAsPermutation[102X ([14X2.8-2[114X);
        see [2XMovedPoints[102X ([14XReference: MovedPoints (for a permutation)[114X).[133X
  
  [8XTransformation semigroups[108X
        [33X[0;6YIf   [3XS[103X   is  a  transformation  semigroup  satisfying  [2XIsInverseMonoid[102X
        ([14X4.6-10[114X),  then  [10XIsomorphismPartialPermMonoid[110X  returns  an isomorphism
        from  [3XS[103X  to  an  inverse monoid of partial permutations on a subset of
        [10X[1..DegreeOfTransformationSemigroup([3XS[103X[10X)][110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xs:=InverseSemigroup( [127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 4, 5 ], [ 4, 2, 3, 1, 5 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 4, 5 ], [ 3, 1, 4, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsMonoid(s); [127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsMonoidAsSemigroup(s);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xiso:=IsomorphismPartialPermMonoid(s);[127X[104X
    [4X[28XMappingByFunction( <inverse semigroup with [128X[104X
    [4X[28X2 generators>, <inverse monoid with [128X[104X
    [4X[28X2 generators>, function( x ) ... end, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XSize(s);[127X[104X
    [4X[28X508[128X[104X
    [4X[25Xgap>[125X [27XSize(Range(iso));[127X[104X
    [4X[28X508[128X[104X
    [4X[25Xgap>[125X [27Xg:=Group((1,2)(3,8)(4,6)(5,7), (1,3,4,7)(2,5,6,8), (1,4)(2,6)(3,7)(5,8));;[127X[104X
    [4X[25Xgap>[125X [27XIsomorphismPartialPermSemigroup(g);[127X[104X
    [4X[28XMappingByFunction( Group([ (1,2)(3,8)(4,6)(5,7), (1,3,4,7)(2,5,6,8),[128X[104X
    [4X[28X  (1,4)(2,6)(3,7)(5,8) ]), <inverse semigroup with[128X[104X
    [4X[28X3 generators>, function( p ) ... end, function( f ) ... end )[128X[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 [27Xiso:=IsomorphismPartialPermMonoid(s);[127X[104X
    [4X[28XMappingByFunction( <inverse monoid with 2 generators>, <inverse monoid with [128X[104X
    [4X[28X2 generators>, function( f ) ... end, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XMovedPoints(Range(iso));[127X[104X
    [4X[28X[ 1, 2, 3, 5, 6 ][128X[104X
  [4X[32X[104X
  
  [1X4.7-3 IsomorphismPermGroup[101X
  
  [29X[2XIsomorphismPermGroup[102X( [3XS[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YAn isomorphism.[133X
  
  [33X[0;0YIf  the  semigroup  of  transformations  or partial permutations [3XS[103X satisfies
  [2XIsGroupAsSemigroup[102X ([14X4.6-8[114X), then [10XIsomorphismPermGroup[110X returns an isomorphism
  to a permutation group.[133X
  
  [33X[0;0YIf [3XS[103X does not satisfy [2XIsGroupAsSemigroup[102X ([14X4.6-8[114X), then an error is given.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup( Transformation( [ 2, 2, 3, 4, 6, 8, 5, 5 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 3, 3, 8, 2, 5, 6, 4, 4 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XIsGroupAsSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsomorphismPermGroup(S); [127X[104X
    [4X[28XMappingByFunction( <semigroup with 2 generators>, Group([ (5,6,8), (2,3,8,4) [128X[104X
    [4X[28X ]), <Operation "AsPermutation">, function( x ) ... end )[128X[104X
    [4X[25Xgap>[125X [27XStructureDescription(Range(IsomorphismPermGroup(S)));[127X[104X
    [4X[28X"S6"[128X[104X
    [4X[25Xgap>[125X [27Xs:=Range(IsomorphismPartialPermSemigroup(SymmetricGroup(4)));[127X[104X
    [4X[28X<inverse semigroup with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsomorphismPermGroup(s);[127X[104X
    [4X[28XMappingByFunction( <inverse semigroup with 2 generators>, Group([128X[104X
    [4X[28X[ (1,2,3,4), (1,2) ]), <Operation "AsPermutation">, function( x ) ... end )[128X[104X
  [4X[32X[104X
  
  [1X4.7-4 IsomorphismTransformationMonoid[101X
  
  [29X[2XIsomorphismTransformationMonoid[102X( [3XS[103X ) [32X operation
  [29X[2XIsomorphismTransformationSemigroup[102X( [3XS[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YAn isomorphism.[133X
  
  [33X[0;0Y[10XIsomorphismTransformationSemigroup([3XS[103X[10X)[110X   returns   an  isomorphism  from  the
  semigroup [3XS[103X to a semigroup of transformations.[133X
  
  [33X[0;0Y[10XIsomorphismTransformationMonoid([3XS[103X[10X)[110X  returns an isomorphism from the monoid [3XS[103X
  to a monoid of transformations.[133X
  
  [33X[0;0YWe   only   describe   [10XIsomorphismTransformationMonoid[110X,   the  corresponding
  statements for [10XIsomorphismTransformationSemigroup[110X also hold.[133X
  
  [8XPartial permutation semigroups[108X
        [33X[0;6YIf     [3XS[103X     is     a     partial     permutation     monoid,     then
        [10XIsomorphismTransformationMonoid([3XS[103X[10X)[110X  returns an isomorphism from [3XS[103X to a
        monoid of partial permutations on [10X[1..LargestMovedPoint([3XS[103X[10X)+1][110X obtained
        using  [2XAsTransformation[102X  ([14X2.8-4[114X).  The  inverse of this isomorphism is
        obtained  using  [2XAsPartialPerm[102X ([14X2.8-3[114X); see [2XLargestMovedPoint[102X ([14X2.5-8[114X),
        [2XInverseMonoid[102X ([14X3.1-1[114X) and [2XMonoid[102X ([14XReference: Monoid[114X).[133X
  
  [8XPermutation groups[108X
        [33X[0;6YIf  [3XS[103X  is  a  permutation  group, then [10XIsomorphismTransformationMonoid[110X
        returns an isomorphism from [3XS[103X to a transformation monoid acting on the
        set [10X[1..NrMovedPoints([3XS[103X[10X)][110X obtained using [2XAsTransformation[102X ([14X2.8-4[114X); see
        [2XNrMovedPoints[102X ([14XReference: NrMovedPoints (for a permutation)[114X).[133X
  
  [8XTransformation semigroups[108X
        [33X[0;6YIf  [3Xobj[103X  is  a transformation semigroup satisfying [2XIsMonoidAsSemigroup[102X
        ([14X4.6-15[114X),  then  this  function  returns  an isomorphism from [3Xobj[103X to a
        transformation monoid.[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 [27XIsTransformationMonoid(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XIsMonoidAsSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XM:=Range(IsomorphismTransformationMonoid(S));[127X[104X
    [4X[28X<monoid with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsTransformationMonoid(M);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xs:=InverseMonoid([127X[104X
    [4X[25X>[125X [27X PartialPermNC( [ 1, 2, 3 ], [ 4, 2, 3 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPermNC( [ 1, 2, 4 ], [ 1, 3, 2 ] ),[127X[104X
    [4X[25X>[125X [27X PartialPermNC( [ 1, 2, 4 ], [ 4, 1, 2 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27Xt:=Range(IsomorphismTransformationMonoid(s));[127X[104X
    [4X[28X<monoid with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(s); Size(t);[127X[104X
    [4X[28X117[128X[104X
    [4X[28X117[128X[104X
  [4X[32X[104X
  
