  
  [1X6 Special Classes of Semigroup[0X
  
  In this chapter functions for creating certain semigroups are given.
  
  
  [1X6.1 Some Classes of Semigroup[0X
  
  [1X6.1-1 SingularSemigroup[0m
  
  [2X> SingularSemigroup( [0X[3Xn[0X[2X ) ___________________________________________[0Xfunction
  
  creates  the semigroup of singular transformations of degree [10Xn[0m. That is, the
  semigroup  of all transformations of the [10Xn[0m-element set [10X {1,2,...,n}[0m that are
  non-invertible.
  
  This  semigroup  is  known  to  be  regular, idempotent generated (satisfies
  [2XIsSemiBand[0m ([14X5.2-10[0m)), and has size [10Xn^n-n![0m.
  
  The  generators  used  here  are  the  idempotents of rank [10Xn-1[0m, so there are
  [10Xn(n-1)[0m generators in total.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=SingularSemigroup(6);[0X
    [4X  <semigroup with 30 generators>[0X
    [4X  gap> Size(S);[0X
    [4X  45936[0X
    [4X  gap> IsRegularSemigroup(S);[0X
    [4X  true[0X
    [4X  gap> IsSemiBand(S);[0X
    [4X  true[0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.1-2 OrderPreservingSemigroup[0m
  
  [2X> OrderPreservingSemigroup( [0X[3Xn[0X[2X ) ___________________________________[0Xoperation
  
  returns  the semigroup of order preserving transformations of the [10Xn[0m- element
  set  [10X{1,2,...,n}[0m.  That  is, the mappings [10Xf[0m such that [10Xi[0m is at most [10Xj[0m implies
  [10Xf(i)[0m is at most [10Xf(j)[0m for all [10Xi,j[0m in [10X{1,2,...,n}[0m.
  
  This  semigroup  is  known  to  be  regular, idempotent generated (satisfies
  [2XIsSemiBand[0m  ([14X5.2-10[0m)), and has size [10XBinomial(2*n-1, n-1)[0m. The generators and
  relations  used here are those specified by Aizenstat as given in [AR00] and
  [GH92].   That  is,  [10XOrderPreservingSemigroup(n)[0m  has  the  [10X2n-2[0m  idempotent
  generators
  
  [4X---------------------------  Example  ----------------------------[0X
    [4Xu_2:=Transformation([2,2,3,..,n]), u_3:=Transformation([1,3,3,..,n]), ...[0X
    [4Xv_n-2:=Transformation([1,2,2,...,n]), v_n-3:=Transformation[0X
    [4X([1,2,3,3,...,n]), ...[0X
  [4X------------------------------------------------------------------[0X
  
  and   the   presentation  obtained  using  [2XIsomorphismFpMonoid[0m  ([14X7.7-4[0m)  has
  relations
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  v_n−i u_i = u_i v_n−i+1 (i=2,..., n−1)[0X
    [4X  u_n−i v_i = v_i u_n−i+1 (i=2,...,n−1),[0X
    [4X  v_n−i u_i = u_i (i=1,...,n−1),[0X
    [4X  u_n−i v_i = v_i (i=1,...,n−1),[0X
    [4X  u_i v_j = v_j u_i (i,j=1,...,n−1; not j=n-i, n-i+1),[0X
    [4X  u_1 u_2 u_1 = u_1 u_2,[0X
    [4X  v_1 v_2 v_1 = v_1 v_2. [0X
    [4X  [0X
  [4X------------------------------------------------------------------[0X
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=OrderPreservingSemigroup(5);[0X
    [4X  <monoid with 8 generators>[0X
    [4X  gap> IsSemiBand(S);[0X
    [4X  true[0X
    [4X  gap> IsRegularSemigroup(S);[0X
    [4X  true[0X
    [4X  gap> Size(S)=Binomial(2*5-1, 5-1);[0X
    [4X  true[0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.1-3 KiselmanSemigroup[0m
  
  [2X> KiselmanSemigroup( [0X[3Xn[0X[2X ) __________________________________________[0Xoperation
  
  returns  the  Kiselman  semigroup  with [10Xn[0m generators. That is, the semigroup
  defined in [KM05] with the presentation
  
  
       <a_1, a_2, ... , a_n | a_i^2=a_i (i=1,...n)
       a_ia_ja_i=a_ja_ia_j=a_ja_i (1<=i< j<=n)>.
  
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=KiselmanSemigroup(3);[0X
    [4X  <fp monoid on the generators [ m1, m2, m3 ]>[0X
    [4X  gap> Elements(S);[0X
    [4X  [ <identity ...>, m1, m2, m3, m1*m2, m1*m3, m2*m1, m2*m3, m3*m1, m3*m2, [0X
    [4X    m1*m2*m3, m1*m3*m2, m2*m1*m3, m2*m3*m1, m3*m1*m2, m3*m2*m1, m2*m1*m3*m2, [0X
    [4X    m2*m3*m1*m2 ][0X
    [4X  gap> Idempotents(S);[0X
    [4X  [ 1, m1, m2*m1, m3*m2*m1, m3*m1, m2, m3*m2, m3 ][0X
    [4X  gap> SetInfoLevel(InfoAutos, 0);[0X
    [4X  gap> AutomorphismGroup(Range(IsomorphismTransformationSemigroup(S)));[0X
    [4X  <group of size 1 with 1 generators>[0X
    [4X  [0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X6.2 Zero Groups and Zero Semigroups[0X
  
  [1X6.2-1 ZeroSemigroup[0m
  
  [2X> ZeroSemigroup( [0X[3Xn[0X[2X ) ______________________________________________[0Xoperation
  
  returns the [13Xzero semigroup[0m [10XS[0m of order [10Xn[0m. That is, the unique semigroup up to
  isomorphism  of  order  [10Xn[0m such that there exists an element [10X0[0m in [10XS[0m such that
  [10Xxy=0[0m for all [10Xx,y[0m in [10XS[0m.
  
  A  zero  semigroup is generated by its nonzero elements, has trivial Green's
  relations, and is not regular.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=ZeroSemigroup(10);[0X
    [4X  <zero semigroup with 10 elements>[0X
    [4X  gap> Size(S);[0X
    [4X  10[0X
    [4X  gap> GeneratorsOfSemigroup(S);[0X
    [4X  [ z1, z2, z3, z4, z5, z6, z7, z8, z9 ][0X
    [4X  gap> Idempotents(S);[0X
    [4X  [ 0 ][0X
    [4X  gap> IsZeroSemigroup(S);[0X
    [4X  true[0X
    [4X  gap> GreensRClasses(S);[0X
    [4X  [ {0}, {z1}, {z2}, {z3}, {z4}, {z5}, {z6}, {z7}, {z8}, {z9} ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.2-2 ZeroSemigroupElt[0m
  
  [2X> ZeroSemigroupElt( [0X[3Xn[0X[2X ) ___________________________________________[0Xoperation
  
  returns  the  zero semigroup element [10Xzn[0m where [10Xn[0m is a positive integer and [10Xz0[0m
  is the multiplicative zero.
  
  The zero semigroup element [10Xzn[0m belongs to every zero semigroup with degree at
  least [10Xn[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> ZeroSemigroupElt(0);[0X
    [4X  0[0X
    [4X  gap> ZeroSemigroupElt(4);[0X
    [4X  z4[0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.2-3 ZeroGroup[0m
  
  [2X> ZeroGroup( [0X[3XG[0X[2X ) __________________________________________________[0Xoperation
  
  returns  the  monoid obtained by adjoining a zero element to [10XG[0m. That is, the
  monoid  [10XS[0m obtained by adjoining a zero element [10X0[0m to [10XG[0m with [10Xg0=0g=0[0m for all [10Xg[0m
  in [10XS[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=ZeroGroup(CyclicGroup(10));[0X
    [4X  <zero group with 3 generators>[0X
    [4X  gap> IsRegularSemigroup(S);[0X
    [4X  true[0X
    [4X  gap> Elements(S);[0X
    [4X  [ 0, <identity> of ..., f1, f2, f1*f2, f2^2, f1*f2^2, f2^3, f1*f2^3, f2^4, [0X
    [4X    f1*f2^4 ][0X
    [4X  gap> GreensRClasses(S);[0X
    [4X  [ {<adjoined zero>}, {ZeroGroup(<identity> of ...)} ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.2-4 ZeroGroupElt[0m
  
  [2X> ZeroGroupElt( [0X[3Xg[0X[2X ) _______________________________________________[0Xoperation
  
  returns  the  zero  group  element corresponding to the group element [10Xg[0m. The
  function  [10XZeroGroupElt[0m  is  only  used  to  create  an object in the correct
  category during the creation of a zero group using [2XZeroGroup[0m ([14X6.2-3[0m).
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> ZeroGroupElt(Random(DihedralGroup(10)));;[0X
    [4X  gap> IsZeroGroupElt(last);[0X
    [4X  true[0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.2-5 UnderlyingGroupOfZG[0m
  
  [2X> UnderlyingGroupOfZG( [0X[3XZG[0X[2X ) _______________________________________[0Xattribute
  
  returns the group from which the zero group [10XZG[0m was constructed.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> G:=DihedralGroup(10);;[0X
    [4X  gap> S:=ZeroGroup(G);;[0X
    [4X  gap> UnderlyingGroupOfZG(S)=G;[0X
    [4X  true[0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.2-6 UnderlyingGroupEltOfZGElt[0m
  
  [2X> UnderlyingGroupEltOfZGElt( [0X[3Xg[0X[2X ) __________________________________[0Xattribute
  
  returns  the  group  element  from  which  the  zero  group  element  [10Xg[0m  was
  constructed.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> G:=DihedralGroup(10);;[0X
    [4X  gap> S:=ZeroGroup(G);;[0X
    [4X  gap> Elements(S);[0X
    [4X  [ 0, <identity> of ..., f1, f2, f1*f2, f2^2, f1*f2^2, f2^3, f1*f2^3, f2^4, [0X
    [4X    f1*f2^4 ][0X
    [4X  gap> x:=last[5];[0X
    [4X  f1*f2[0X
    [4X  gap> UnderlyingGroupEltOfZGElt(x);[0X
    [4X  f1*f2[0X
  [4X------------------------------------------------------------------[0X
  
  
  [1X6.3 Random Semigroups[0X
  
  [1X6.3-1 RandomMonoid[0m
  
  [2X> RandomMonoid( [0X[3Xm, n[0X[2X ) _____________________________________________[0Xfunction
  
  returns a random transformation monoid of degree [10Xn[0m with [10Xm[0m generators.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=RandomMonoid(5,5);[0X
    [4X  <semigroup with 5 generators>[0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.3-2 RandomSemigroup[0m
  
  [2X> RandomSemigroup( [0X[3Xm, n[0X[2X ) __________________________________________[0Xfunction
  
  returns a random transformation semigroup of degree [10Xn[0m with [10Xm[0m generators.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=RandomSemigroup(5,5);[0X
    [4X  <semigroup with 5 generators>[0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.3-3 RandomReesMatrixSemigroup[0m
  
  [2X> RandomReesMatrixSemigroup( [0X[3Xi, j, deg[0X[2X ) ___________________________[0Xfunction
  
  returns a random Rees matrix semigroup with an [10Xi[0m by [10Xj[0m sandwich matrix over a
  permutation group with maximum degree [10Xdeg[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=RandomReesMatrixSemigroup(4,5,5);[0X
    [4X  Rees Matrix Semigroup over Group([ (1,5,3,4), (1,3,4,2,5) ])[0X
    [4X  [ [ (), (), (), (), () ], [0X
    [4X  [ (), (1,3,5)(2,4), (1,3,5)(2,4), (1,5,3), (1,5,3) ], [0X
    [4X  [ (), (1,3,5), (1,5,3)(2,4), (), (1,5,3) ], [0X
    [4X  [ (), (), (1,3,5)(2,4), (2,4), (2,4) ] ][0X
  [4X------------------------------------------------------------------[0X
  
  [1X6.3-4 RandomReesZeroMatrixSemigroup[0m
  
  [2X> RandomReesZeroMatrixSemigroup( [0X[3Xi, j, deg[0X[2X ) _______________________[0Xfunction
  
  returns a random Rees [10X0[0m-matrix semigroup with an [10Xi[0m by [10Xj[0m sandwich matrix over
  a permutation group with maximum degree [10Xdeg[0m.
  
  [4X---------------------------  Example  ----------------------------[0X
    [4X  gap> S:=RandomReesZeroMatrixSemigroup(2,3,2);[0X
    [4X  Rees Zero Matrix Semigroup over <zero group with 2 generators>[0X
    [4X  gap> SandwichMatrixOfReesZeroMatrixSemigroup(S);[0X
    [4X  [ [ 0, (), 0 ], [ 0, 0, 0 ] ][0X
  [4X------------------------------------------------------------------[0X
  
