  
  [1X3 [33X[0;0YCreating semigroups and monoids[133X[101X
  
  [33X[0;0YIn this chapter we describe the various ways that semigroups and monoids can
  be  created  in  [5XCitrus[105X,  the  options  that  are  available  at the time of
  creation, and describe some standard examples availabl in [5XCitrus[105X.[133X
  
  [33X[0;0YAny  transformation  semigroup created before [5XCitrus[105X has been loaded must be
  recreated  after  [5XCitrus[105X  is loaded so that the options record (described in
  Section [14X3.3[114X) is defined. Almost all of the functions and methods provided by
  [5XCitrus[105X,  including  those  methods  for existing [5XGAP[105X library functions, will
  return  an  error  when applied to a transformation semigroup created before
  [5XCitrus[105X is loaded.[133X
  
  
  [1X3.1 [33X[0;0YSemigroups defined by a generating set[133X[101X
  
  [33X[0;0YIn this section we give details of how to create semigroups and monoids from
  a set of generators. Much of what is described here is syntactic sugar.[133X
  
  [1X3.1-1 InverseMonoid[101X
  
  [29X[2XInverseMonoid[102X( [3Xobj1[103X, [3Xobj2[103X, [3X...[103X[, [3Xopts[103X] ) [32X function
  [29X[2XInverseSemigroup[102X( [3Xobj1[103X, [3Xobj2[103X, [3X...[103X[, [3Xopts[103X] ) [32X function
  [6XReturns:[106X  [33X[0;10YAn inverse semigroup or monoid.[133X
  
  [33X[0;0YIf  [3Xobj1[103X,  [3Xobj2[103X,  ... are (any combination) of partial permutations, partial
  permutation  semigroup, or lists of partial permutations, then [10XInverseMonoid[110X
  or [10XInverseSemigroup[110X returns the inverse monoid or semigroup generated by the
  union  of  [3Xobj1[103X, [3Xobj2[103X, ... which equals the semigroup or monoid generated by
  the union of [3Xobj1[103X, [3Xobj2[103X, ... and their inverses.[133X
  
  [33X[0;0YIf  present,  the optional final argument [3Xopts[103X should be a record containing
  the  values  of  the  options  for  the  inverse semigroup being created, as
  described in Section [14X3.3[114X.[133X
  
  [33X[0;0YAs  an  example  of  how  the  syntax  provided by [5XCitrus[105X can be convenient:
  [10XU:=Semigroup(S,  f, Idempotents(T));[110X, in the example below, returns the same
  value as: [10XU:=Semigroup(Concatenation(Generators(S), [f], Idempotents(T)));[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 4, 6, 8, 9, 10, 11, 13, 14, 16, 17, 18, 20 ], [127X[104X
    [4X[25X>[125X [27X[ 2, 14, 5, 8, 11, 12, 16, 17, 18, 9, 13, 15, 20, 6, 4 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 17 ], [127X[104X
    [4X[25X>[125X [27X[ 2, 14, 8, 19, 5, 1, 3, 16, 6, 9, 10, 17, 12, 20 ] ));;[127X[104X
    [4X[25Xgap>[125X [27Xf:=PartialPermNC( [127X[104X
    [4X[25X>[125X [27X[ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, [127X[104X
    [4X[25X>[125X [27X 18, 20, 22, 23, 25, 26, 30, 31, 32, 33, 34, 39, 40, 42, 43, 45 ], [127X[104X
    [4X[25X>[125X [27X[ 4, 47, 34, 19, 32, 22, 12, 15, 16, 45, 49, 8, 24, 40, 17, [127X[104X
    [4X[25X>[125X [27X 46, 14, 6, 44, 2, 48, 41, 10, 31, 18, 50, 23, 5, 37, 11, 38, 30, 21 ] );;[127X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup(S, f, Idempotents(SymmetricInverseSemigp(10)));[127X[104X
    [4X[28X<inverse semigroup with 1027 generators>[128X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup(S, f, Idempotents(SymmetricInverseSemigp(10)),[127X[104X
    [4X[25X>[125X [27Xrec(small:=true));[127X[104X
    [4X[28X<inverse semigroup with 13 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X17147970[128X[104X
    [4X[25Xgap>[125X [27XS:=InverseMonoid(Generators(S));[127X[104X
    [4X[28X<inverse monoid with 13 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X17147971[128X[104X
  [4X[32X[104X
  
  [1X3.1-2 InverseMonoidByGenerators[101X
  
  [29X[2XInverseMonoidByGenerators[102X( [3Xcoll[103X[, [3Xopts[103X] ) [32X function
  [29X[2XInverseSemigroupByGenerators[102X( [3Xcoll[103X[, [3Xopts[103X] ) [32X function
  [6XReturns:[106X  [33X[0;10YAn inverse monoid or semigroup.[133X
  
  [33X[0;0YIf  [3Xcoll[103X is a partial permutation collection, then [10XInverseMonoidByGenerators[110X
  and  [10XInverseSemigroupByGenerators[110X  return  the  inverse monoid and semigroup
  generated by [3Xcoll[103X, respectively.[133X
  
  [33X[0;0YIf  present, the optional second argument [3Xopts[103X should be a record containing
  the  values  of the options for the semigroup being created, as described in
  Section [14X3.3[114X.[133X
  
  [1X3.1-3 Monoid[101X
  
  [29X[2XMonoid[102X( [3Xobj1[103X, [3Xobj2[103X, [3X...[103X[, [3Xopts[103X] ) [32X function
  [29X[2XSemigroup[102X( [3Xobj1[103X, [3Xobj2[103X, [3X...[103X[, [3Xopts[103X] ) [32X function
  [6XReturns:[106X  [33X[0;10YA monoid or semigroup.[133X
  
  [33X[0;0YIf  [3Xobj1[103X, [3Xobj2[103X, ... are (any combination) of transformations, transformation
  semigroups,  or  lists  of transformations, then [10XMonoid[110X or [10XSemigroup[110X returns
  the monoid or semigroup generated by the union of [3Xobj1[103X, [3Xobj2[103X, ....[133X
  
  [33X[0;0YIf  present,  the optional final argument [3Xopts[103X should be a record containing
  the  values  of the options for the semigroup being created, as described in
  Section [14X3.3[114X.[133X
  
  [33X[0;0YWhen  applied  to  arguments  other  than  transformations or transformation
  collections  these  functions behave precisely as described in the reference
  manual.  Please consult [2XMonoid[102X ([14XReference: Monoid[114X) and [2XSemigroup[102X ([14XReference:
  Semigroup[114X) for further details.[133X
  
  [33X[0;0YAs  an  example  of  how  the  syntax  provided by [5XCitrus[105X can be convenient:
  [10XU:=Semigroup(S,  f, Idempotents(T));[110X, in the example below, returns the same
  value as: [10XU:=Semigroup(Concatenation(Generators(S), [f], Idempotents(T)));[110X.[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 [27Xf:=Transformation( [ 2, 4, 6, 1, 6, 5 ] );;[127X[104X
    [4X[25Xgap>[125X [27XT:=Monoid(Transformation( [ 4, 1, 2, 6, 2, 1 ] ),[127X[104X
    [4X[25X>[125X [27XTransformation( [ 5, 2, 5, 3, 5, 3 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27XU:=Semigroup(S, f, Idempotents(T));[127X[104X
    [4X[28X<semigroup with 14 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(U);[127X[104X
    [4X[28X2182[128X[104X
    [4X[25Xgap>[125X [27XNrRClasses(U);[127X[104X
    [4X[28X53[128X[104X
  [4X[32X[104X
  
  [1X3.1-4 MonoidByGenerators[101X
  
  [29X[2XMonoidByGenerators[102X( [3Xcoll[103X[, [3Xopts[103X] ) [32X method
  [29X[2XSemigroupByGenerators[102X( [3Xcoll[103X[, [3Xopts[103X] ) [32X method
  [6XReturns:[106X  [33X[0;10YA monoid or semigroup.[133X
  
  [33X[0;0YIf   [3Xcoll[103X  is  a  transformation  collection,  then  [10XMonoidByGenerators[110X  and
  [10XSemigroupByGenerators[110X  return  the  monoid  and semigroup generated by [3Xcoll[103X,
  respectively.[133X
  
  [33X[0;0YIf  present, the optional second argument [3Xopts[103X should be a record containing
  the  values  of the options for the semigroup being created, as described in
  Section [14X3.3[114X.[133X
  
  [33X[0;0YWhen  applied  to  arguments  other  than  transformations or transformation
  collections  these  functions behave precisely as described in the reference
  manual.  Please  consult  [2XMonoidByGenerators[102X ([14XReference: MonoidByGenerators[114X)
  and  [2XSemigroupByGenerators[102X  ([14XReference:  SemigroupByGenerators[114X)  for further
  details.[133X
  
  [1X3.1-5 RandomInverseMonoid[101X
  
  [29X[2XRandomInverseMonoid[102X( [3Xm[103X, [3Xn[103X ) [32X function
  [29X[2XRandomInverseSemigroup[102X( [3Xm[103X, [3Xn[103X ) [32X function
  [6XReturns:[106X  [33X[0;10YAn inverse monoid or semigroup.[133X
  
  [33X[0;0YReturns  a  random  inverse monoid or semigroup of partial permutations with
  degree at most [3Xn[103X with [3Xm[103X generators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=RandomInverseSemigroup(10,10);                                [127X[104X
    [4X[28X<inverse semigroup with 10 generators>[128X[104X
    [4X[25Xgap>[125X [27XS:=RandomInverseMonoid(10,10);   [127X[104X
    [4X[28X<inverse monoid with 10 generators>[128X[104X
  [4X[32X[104X
  
  [1X3.1-6 RandomTransformationMonoid[101X
  
  [29X[2XRandomTransformationMonoid[102X( [3Xm[103X, [3Xn[103X ) [32X function
  [29X[2XRandomTransformationSemigroup[102X( [3Xm[103X, [3Xn[103X ) [32X function
  [6XReturns:[106X  [33X[0;10YA transformation semigroup.[133X
  
  [33X[0;0YReturns  a  random  transformation  monoid  or  semigroup of degree [3Xn[103X with [3Xm[103X
  generators.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=RandomTransformationMonoid(5,5);[127X[104X
    [4X[28X<monoid with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27XS:=RandomTransformationSemigroup(5,5);[127X[104X
    [4X[28X<semigroup with 5 generators>[128X[104X
  [4X[32X[104X
  
  
  [1X3.2 [33X[0;0YNew semigroups from old[133X[101X
  
  [1X3.2-1 ClosureInverseSemigroup[101X
  
  [29X[2XClosureInverseSemigroup[102X( [3XS[103X, [3Xcoll[103X[, [3Xopts[103X] ) [32X function
  [6XReturns:[106X  [33X[0;10YAn inverse semigroup or monoid.[133X
  
  [33X[0;0YThis  function  returns  the  inverse  semigroup  or monoid generated by the
  inverse  semigroup  of  partial  permutations  [3XS[103X and the partial permutation
  collection  or  partial permutation [3Xcoll[103X after first removing duplicates and
  partial  permutations  in [3Xcoll[103X that are already in [3XS[103X. In most cases, the new
  semigroups  knows  at  least  as much information about its structure as was
  already known about that of [3XS[103X.[133X
  
  [33X[0;0YIf  present,  the  optional third argument [3Xopts[103X should be a record contiaing
  the  values  of  the  options for the inverse semigroup being created; these
  options are described in Section [14X3.3[114X.[133X
  
  [33X[0;0YUnlike  [2XClosureSemigroup[102X ([14X3.2-2[114X), [10XClosureInverseSemigroup[110X is always at least
  as  efficient  as  (and  often  much  more  than) simply creating an inverse
  semigroup from scratch using [2XInverseSemigroup[102X ([14X3.1-1[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=InverseMonoid([127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 5, 6, 7, 8 ], [ 5, 9, 10, 6, 3, 8, 4 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 4, 7, 8, 9 ], [ 10, 7, 8, 5, 9, 1 ] ) );;[127X[104X
    [4X[25Xgap>[125X [27Xf:=PartialPermNC([127X[104X
    [4X[25X>[125X [27X[ 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 18, 19, 20 ],[127X[104X
    [4X[25X>[125X [27X[ 5, 1, 7, 3, 10, 2, 12, 14, 11, 16, 6, 9, 15 ]);;[127X[104X
    [4X[25Xgap>[125X [27XS:=ClosureInverseSemigroup(S, f);[127X[104X
    [4X[28X<inverse semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X9726[128X[104X
    [4X[25Xgap>[125X [27XT:=Idempotents(SymmetricInverseSemigp(10));;[127X[104X
    [4X[25Xgap>[125X [27XS:=ClosureInverseSemigroup(S, T);[127X[104X
    [4X[28X<inverse semigroup with 858 generators>[128X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup(SmallGeneratingSet(S));[127X[104X
    [4X[28X<inverse semigroup with 14 generators>[128X[104X
  [4X[32X[104X
  
  [1X3.2-2 ClosureSemigroup[101X
  
  [29X[2XClosureSemigroup[102X( [3XS[103X, [3Xcoll[103X[, [3Xopts[103X] ) [32X function
  [6XReturns:[106X  [33X[0;10YA transformation semigroup or monoid.[133X
  
  [33X[0;0YThis   function   returns   the   semigroup   or  monoid  generated  by  the
  transformation   semigroup   [3XS[103X   and   the   transformation   collection  or
  transformation  [3Xcoll[103X  after  removing duplicates and transformations in [3Xcoll[103X
  that  are  already  in [3XS[103X. In some cases, the new semigroup knows at least as
  much information about its structure as was already known about that of [3XS[103X.[133X
  
  [33X[0;0YIf  present,  the optional third argument [3Xopts[103X should be a record containing
  the  values  of  the options for the semigroup being created as described in
  Section  [14X3.3[114X.  For  technical  reasons if the option [10Xschreier[110X is [9Xfalse[109X, then
  [10XClosureSemigroup(S,  coll)[110X  does  exactly  the  same as [2XSemigroup[102X ([14X3.1-3[114X) or
  [2XMonoid[102X  ([14X3.1-3[114X),  in  that  the  new semigroup does not know any information
  about   its  structure  even  if  the  old  semigroup  had  been  completely
  determined.[133X
  
  [33X[0;0YMore  specifically,  if the option [10Xschreier[110X is [9Xfalse[109X, then the new semigroup
  knows the Green's class of any representative of a Green's classes of [3XS[103X that
  was  known  at  the time that [10XClosureSemigroup[110X was called. Consequently, if,
  for  example,  the  number  of  [13XR[113X-classes of [3XS[103X is greater than the number of
  elements  required  to  find  the  [13XR[113X-classes  of  the  new  semigroup,  then
  [10XClosureSemigroup[110X  might  be  less  efficient than creating the new semigroup
  using  the  command [2XSemigroup[102X ([14X3.1-3[114X) or [2XMonoid[102X ([14X3.1-3[114X). It is unlikely that
  you  will  be  able  to  determine  which  of [10XClosureSemigroup[110X and [2XSemigroup[102X
  ([14X3.1-3[114X)  will  be  better  before  calling  these  functions,  except in the
  following  case.  If  the rank of the transformations in [3Xcoll[103X are lower than
  the  ranks  of  the  Green's  classes  containing  the majority of the known
  elements  of  [3XS[103X,  then  [10XClosureSemigroup[110X  should  be  superior  to [2XSemigroup[102X
  ([14X3.1-3[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xgens:=[ Transformation( [ 2, 6, 7, 2, 6, 1, 1, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 3, 8, 1, 4, 5, 6, 7, 1 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 4, 3, 2, 7, 7, 6, 6, 5 ] ), [127X[104X
    [4X[25X>[125X [27X Transformation( [ 7, 1, 7, 4, 2, 5, 6, 3 ] ) ];;[127X[104X
    [4X[25Xgap>[125X [27XS:=Monoid(gens[1], rec(schreier:=false));;[127X[104X
    [4X[25Xgap>[125X [27Xfor i in [2..4] do S:=ClosureSemigroup(S, gens[i]); od;[127X[104X
    [4X[25Xgap>[125X [27XS;[127X[104X
    [4X[28X<monoid with 4 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X233606[128X[104X
  [4X[32X[104X
  
  [1X3.2-3 SubsemigroupByProperty[101X
  
  [29X[2XSubsemigroupByProperty[102X( [3XS[103X, [3Xfunc[103X ) [32X operation
  [29X[2XSubsemigroupByProperty[102X( [3XS[103X, [3Xfunc[103X, [3Xlimit[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA semigroup.[133X
  
  [33X[0;0Y[10XSubsemigroupByProperty[110X   creates  a  subsemigroup  of  the  semigroup  [3XS[103X  of
  transformations   or  partial  permutations  consisting  of  those  elements
  fulfilling  [3Xfunc[103X  (which  should  be a function returning [9Xtrue[109X or [9Xfalse[109X). No
  test is done to check if the property actually defines a subsemigroup.[133X
  
  [33X[0;0YIf the optional third argument [3Xlimit[103X is present and a positive integer, then
  once the subsemigroup has at least [3Xlimit[103X elements the computation stops.[133X
  
  
  [1X3.3 [33X[0;0YOptions when creating semigroups[133X[101X
  
  [33X[0;0YWhen using any of [2XInverseSemigroup[102X ([14X3.1-1[114X), [2XInverseMonoid[102X ([14X3.1-1[114X), [2XSemigroup[102X
  ([14X3.1-3[114X),  [2XMonoid[102X  ([14X3.1-3[114X), [2XSemigroupByGenerators[102X ([14X3.1-4[114X), [2XMonoidByGenerators[102X
  ([14X3.1-4[114X),  [2XClosureInverseSemigroup[102X  ([14X3.2-1[114X)  or  [2XClosureSemigroup[102X  ([14X3.2-2[114X)  a
  record  can  be  given as an optional final argument. The components of this
  record  specify  the  values  of  certain  options  for  the semigroup being
  created. A list of these options and their default values is given below.[133X
  
  [33X[0;0YAssume  that  [3XS[103X is the semigroup created by one of the functions given above
  and that [3XS[103X is generated by the list of transformations [3Xgens[103X.[133X
  
  [8X[10Xhashlen[110X[108X
        [33X[0;6Ythis  component  should be a positive integer, which roughly specifies
        the  lengths of the hash tables used internally by [5XCitrus[105X. [5XCitrus[105X uses
        hash  tables  in  several  fundamental  methods.  The lengths of these
        tables  are  a compromise between performance and memory usage; larger
        tables  provide better performance for large computations but use more
        memory.  Note  that  it is unlikely that you will need to specify this
        option  unless  you  find  that [5XGAP[105X runs out of memory unexpectedly or
        that  the  performance  of [5XCitrus[105X is poorer than expected. If you find
        that  [5XGAP[105X  runs  out of memory unexpectedly, or you plan to do a large
        number of computations with relatively small semigroups (say with tens
        of  thousands of elements), then you might consider setting [10Xhashlen[110X to
        be  less than the default value of [10X25013[110X for each of these semigroups.
        If  you  find  that the performance of [5XCitrus[105X is unexpectedly poor, or
        you  plan  to  do a computation with a very large semigroup (say, more
        than  10 million elements), then you might consider setting [10Xhashlen[110X to
        be greater than the default value of [10X25013[110X.[133X
  
        [33X[0;6YYou  might  find  it  useful  to  set the info level of the info class
        [10XInfoOrb[110X  to 2 or higher since this will indicate when hash tables used
        by [5XCitrus[105X are being grown; see [2XSetInfoLevel[102X ([14XReference: SetInfoLevel[114X).[133X
  
  [8X[10Xschreier[110X[108X
        [33X[0;6Yif  this  component  is  set  to  [9Xtrue[109X, then [5XCitrus[105X will keep track of
        various  pieces  of  information  so  that it is possible to factorize
        elements  of  [3XS[103X  using [2XFactorization[102X ([14X4.1-2[114X). This will cause a slight
        decrease  in  performance  and  an  increase  in memory usage. If this
        component  is  set to [9Xfalse[109X, then it will not be possible to factorize
        the  elements  of [3XS[103X using [2XFactorization[102X ([14X4.1-2[114X). The default value for
        this component is [9Xtrue[109X.[133X
  
  [8X[10Xsmall[110X[108X
        [33X[0;6Yif  this  component  is  set to [9Xtrue[109X, then [5XCitrus[105X will compute a small
        subset  of  [3Xgens[103X  that generates [3XS[103X at the time that [3XS[103X is created. This
        will  increase  the amount of time required to create [3XS[103X substantially,
        but   may   decrease  the  amount  of  time  required  for  subsequent
        calculations  with  [3XS[103X.  If this component is set to [9Xfalse[109X, then [5XCitrus[105X
        will  return  the  semigroup generated by [3Xgens[103X without modifying [3Xgens[103X.
        The default value for this component is [9Xfalse[109X.[133X
  
  [33X[0;0YThe  default  values  of  the options described above are stored in a global
  variable  named  [2XCitrusOptionsRec[102X ([14X3.3-1[114X). If you want to change the default
  values  of  these  options  for  a  single  [5XGAP[105X session, then you can simply
  redefine  the value in [5XGAP[105X. For example, to change the option [10Xsmall[110X from the
  default value of [3Xfalse[103X use:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XCitrusOptionsRec.small:=true;[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [33X[0;0YIf  you  want  to  change  the  default  values  of  the  options  stored in
  [2XCitrusOptionsRec[102X  ([14X3.3-1[114X) for all subsequent [5XGAP[105X sessions, then you can edit
  these values in the file [10Xcitrus/gap/options.g[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=Semigroup(Transformation( [ 1, 2, 3, 3 ] ), rec(schreier:=true,[127X[104X
    [4X[25X>[125X [27Xhashlen:=100003, small:=false));[127X[104X
    [4X[28X<semigroup with 1 generator>[128X[104X
  [4X[32X[104X
  
  [1X3.3-1 CitrusOptionsRec[101X
  
  [29X[2XCitrusOptionsRec[102X[32X global variable
  
  [33X[0;0YThis global variable is a record whose components contain the default values
  of  certain  options  for transformation semigroups created after [5XCitrus[105X has
  been loaded. A description of these options is given above in Section [14X3.3[114X.[133X
  
  [33X[0;0YThe  value  of  [10XCitrusOptionsRec[110X is defined in the file [10Xcitrus/gap/options.g[110X
  as:[133X
  
  [4X[32X  Example  [32X[104X
    [4X[28Xrec( schreier:=true, small:=false,[128X[104X
    [4X[28X         hashlen:=rec(S:=251, M:=6257, L:=25013));[128X[104X
  [4X[32X[104X
  
  
  [1X3.4 [33X[0;0YStandard examples[133X[101X
  
  [33X[0;0YIn this section we describe functions for creating several standard examples
  of semigroups of transformations and partial permutations.[133X
  
  [1X3.4-1 FullMatrixSemigroup[101X
  
  [29X[2XFullMatrixSemigroup[102X( [3Xd[103X, [3Xq[103X ) [32X operation
  [29X[2XGeneralLinearSemigroup[102X( [3Xd[103X, [3Xq[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA matrix semigroup.[133X
  
  [33X[0;0Y[10XFullMatrixSemigroup[110X  and [10XGeneralLinearSemigroup[110X are synonyms for each other.
  They  both  return  the  full matrix semigroup, or if you prefer the general
  linear  semigroup,  of  [3Xd[103X  by  [3Xd[103X matrices with entries over the field with [3Xq[103X
  elements. This semigroup has [10Xq^(d^2)[110X elements.[133X
  
  [33X[0;0Y[12XPlease  note:[112X  there  are  currently  no  special methods for computing with
  matrix   semigroups   in  [5XCitrus[105X  and  so  it  might  be  advisable  to  use
  [2XIsomorphismTransformationSemigroup[102X ([14X4.7-4[114X).[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=FullMatrixSemigroup(3,4);[127X[104X
    [4X[28X<full matrix semigroup 3x3 over GF(2^2)>[128X[104X
    [4X[25Xgap>[125X [27XT:=Range(IsomorphismTransformationSemigroup(S));;[127X[104X
    [4X[25Xgap>[125X [27XSize(T);[127X[104X
    [4X[28X262144[128X[104X
  [4X[32X[104X
  
  [1X3.4-2 IsFullMatrixSemigroup[101X
  
  [29X[2XIsFullMatrixSemigroup[102X( [3XS[103X ) [32X property
  [29X[2XIsGeneralLinearSemigroup[102X( [3XS[103X ) [32X property
  
  [33X[0;0Y[10XIsFullMatrixSemigroup[110X   and  [10XIsGeneralLinearSemigroup[110X  return  [9Xtrue[109X  if  the
  semigroup  [10XS[110X  was  created  using either of the commands [2XFullMatrixSemigroup[102X
  ([14X3.4-1[114X) or [2XGeneralLinearSemigroup[102X ([14X3.4-1[114X) and [9Xfalse[109X otherwise.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=RandomTransformationSemigroup(4,4);;[127X[104X
    [4X[25Xgap>[125X [27XIsFullMatrixSemigroup(S);[127X[104X
    [4X[28Xfalse[128X[104X
    [4X[25Xgap>[125X [27XS:=GeneralLinearSemigroup(3,3);[127X[104X
    [4X[28X<full matrix semigroup 3x3 over GF(3)>[128X[104X
    [4X[25Xgap>[125X [27XIsFullMatrixSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X3.4-3 MunnSemigroup[101X
  
  [29X[2XMunnSemigroup[102X( [3XS[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YThe Munn semigroup of a semilattice.[133X
  
  [33X[0;0YIf  [3XS[103X is a semilattice, then [10XMunnSemigroup([3XS[103X[10X);[110X returns the inverse semigroup
  of partial permutations of isomorphisms of principal ideals of [3XS[103X; called the
  [13XMunn semigroup[113X of [3XS[103X.[133X
  
  [33X[0;0YThis  function  was  written  jointly  by  J.  D. Mitchell, Yann Peresse (St
  Andrews), Yanhui Wang (York).[133X
  
  [33X[0;0Y[12XPlease  note:[112X  the  [5XGrape[105X  package  version  4.5  or  higher should be fully
  installed for this function to work.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=InverseSemigroup([127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 3, 4, 5, 6, 7, 10 ], [ 4, 6, 7, 3, 8, 2, 9, 5 ] ),[127X[104X
    [4X[25X>[125X [27XPartialPermNC( [ 1, 2, 7, 9 ], [ 5, 6, 4, 3 ] ) );[127X[104X
    [4X[28X<inverse semigroup with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XT:=InverseSemigroup(Idempotents(S), rec(small:=true));;[127X[104X
    [4X[25Xgap>[125X [27XM:=MunnSemigroup(T);;[127X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(M);[127X[104X
    [4X[28X60[128X[104X
    [4X[25Xgap>[125X [27XNrIdempotents(S);[127X[104X
    [4X[28X60[128X[104X
  [4X[32X[104X
  
  
  [1X3.4-4 [33X[0;0YMonoids of order preserving functions[133X[101X
  
  [29X[2XOrderEndomorphisms[102X( [3Xn[103X ) [32X operation
  [29X[2XPOI[102X( [3Xn[103X ) [32X operation
  [29X[2XPOPI[102X( [3Xn[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YA  semigroup of transformations or partial permutations related to
            a linear order.[133X
  
  [8X[10XOrderEndomorphisms([3Xn[103X[10X)[110X[108X
        [33X[0;6Y[10XOrderEndomorphisms([3Xn[103X[10X)[110X  returns  the  monoid  of  transformations  that
        preserve  the  usual  order  on  [22X{1,2,...,  n}[122X  where  [3Xn[103X is a positive
        integer.[133X
  
  [8X[10XPOI([3Xn[103X[10X)[110X[108X
        [33X[0;6Y[10XPOI([3Xn[103X[10X)[110X  returns  the  inverse  monoid  of  partial  permutations  that
        preserve  the  usual  order  on  [22X{1,2,...,  n}[122X  where  [3Xn[103X is a positive
        integer.[133X
  
  [8X[10XPOPI([3Xn[103X[10X)[110X[108X
        [33X[0;6Y[10XPOPI([3Xn[103X[10X)[110X  returns  the  inverse  monoid  of  partial  permutation  that
        preserve  the  orientation  of  [22X{1,2,...,  n}[122X  where  [22Xn[122X  is a positive
        integer.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=POPI(10);                                            [127X[104X
    [4X[28X<inverse monoid with 2 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X923781[128X[104X
    [4X[25Xgap>[125X [27X1+5*Binomial(20, 10);[127X[104X
    [4X[28X923781[128X[104X
    [4X[25Xgap>[125X [27XS:=POI(10);[127X[104X
    [4X[28X<inverse monoid with 10 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X184756[128X[104X
    [4X[25Xgap>[125X [27XBinomial(20,10);[127X[104X
    [4X[28X184756[128X[104X
    [4X[25Xgap>[125X [27XIsSubsemigroup(POPI(10), POI(10));[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XS:=OrderEndomorphisms(5);[127X[104X
    [4X[28X<monoid with 5 generators>[128X[104X
    [4X[25Xgap>[125X [27XIsIdempotentGenerated(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XIsRegularSemigroup(S);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XSize(S)=Binomial(2*5-1, 5-1);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X3.4-5 SingularSemigroup[101X
  
  [29X[2XSingularSemigroup[102X( [3Xn[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YThe semigroup of non-invertible transformations.[133X
  
  [33X[0;0YIf  [3Xn[103X is a positive integer, then [10XSingularSemigroup([3Xn[103X[10X)[110X returns the semigroup
  of   non-invertible  transformations,  which  is  generated  by  the  [3Xn(n-1)[103X
  idempotents of degree [3Xn[103X and rank [22Xn-1[122X and has [22Xn^n-n![122X elements.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=SingularSemigroup(5);[127X[104X
    [4X[28X<semigroup with 20 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X3005[128X[104X
  [4X[32X[104X
  
  [1X3.4-6 SymmetricInverseSemigp[101X
  
  [29X[2XSymmetricInverseSemigp[102X( [3Xn[103X ) [32X operation
  [6XReturns:[106X  [33X[0;10YThe symmetric inverse semigroup.[133X
  
  [33X[0;0YIf  [3Xn[103X  is  a  positive  integer, then [10XSymmetricInverseSemigp([3Xn[103X[10X);[110X returns the
  symmetric  inverse  semigroup  consisting of all partial permutations on the
  set [22X{1,..., n}[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XS:=SymmetricInverseSemigp(15);[127X[104X
    [4X[28X<inverse semigroup with 3 generators>[128X[104X
    [4X[25Xgap>[125X [27XSize(S);[127X[104X
    [4X[28X306827170866106[128X[104X
  [4X[32X[104X
  
  
  [1X3.5 [33X[0;0YThe examples directory[133X[101X
  
  [33X[0;0YThe  [10Xexamples[110X  folder of the [5XCitrus[105X package directory contains catalogues of
  some   naturally   occurring   semigroups  of  transformations  and  partial
  permutations.  These files can be read into [5XGAP[105X using [2XReadCitrus[102X ([14X1.6-2[114X) and
  similar files can be created using [2XWriteCitrus[102X ([14X1.6-3[114X).[133X
  
  [33X[0;0YFurther examples can be downloaded from[133X
  
  [33X[0;0Y[7Xhttp://tinyurl.com/jdmitchell/examples.html[107X[133X
  
  [33X[0;0YA  summary  of  the available files, a desciption of their contents, and how
  they were created is given below.[133X
  
  [8XEndomorphisms of graphs[108X
        [33X[0;6Ythe  files  [10Xeul[3Xn[103X[10Xc.citrus.gz[110X  with  [22Xn=3,...,10[122X;  [10Xgraph[3Xn[103X[10Xc.citrus.gz[110X with
        [22Xn=3,...,8[122X;  and  [11Xselfcomp.citrus.gz[111X  contain small generating sets for
        the  endomorphism  monoids  of  all  connected  Eulerian  graphs,  all
        connected  graphs,  and all self complimentary graphs with [22Xn[122X vertices,
        respectively.  These  files  were created using the catalogues of such
        graphs available at:[133X
  
        [33X[0;6Y[7Xhttp://cs.anu.edu.au/~bdm/data/graphs.html[107X[133X
  
        [33X[0;6Ya  C  program  written  by Max Neunhoeffer which produces a relatively
        large  list  of  endomorphisms  containing  a  generating  set for the
        endomorphism    monoid,    [2XSmallGeneratingSet[102X    ([14X4.5-16[114X)   and   then
        [2XIrredundantGeneratingSubset[102X ([14X4.5-9[114X) in [5XCitrus[105X. The monoid generated by
        the  transformations output by [10XReadCitrus("eul7c.citrus.gz", i);[110X, say,
        is the monoid of endomorphisms of the [10Xi[110Xth graph in the file:[133X
  
        [33X[0;6Y[7Xhttp://cs.anu.edu.au/~bdm/data/eul7c.g6[107X[133X
  
  [8XMunn semigroups[108X
        [33X[0;6Ythe   file   [11Xmunn.citrus.gz[111X  contains  generators  for  all  the  Munn
        semigroups of semilattices with 2 to 8 elements. The semilattices were
        obtained from the [5XSmallsemi[105X package using the command:[133X
  
  [4X      [32X  Example  [32X[104X
          [4X[28XAllSmallSemigroups([2..8], IsSemilatticeAsSemigroup, true);[128X[104X
        [4X[32X[104X
  
        [33X[0;6Yand  the  generators  for  the  Munn  semigroups were calculated using
        [2XMunnSemigroup[102X ([14X3.4-3[114X). More information is available at:[133X
  
        [33X[0;6Y[7Xhttp://tinyurl.com/jdmitchell/examples.html[107X[133X
  
  [8XSyntactic semigroups[108X
        [33X[0;6Ythe  files  [11Xsyntactic.citrus.gz[111X  contain  generators for the syntactic
        semigroups  of  word acceptors of certain triangle groups, provided by
        Markus Pfeiffer (St Andrews). A [13Xtriangle group[113X is a group defined by a
        presentation of the form[133X
  
  
              [33X[1;12Y[24X [33X[0;6Y\langle x, y | x^p, y^q, (xy)^r\rangle[133X [124X[133X
  
  
        [33X[0;6Yfor  some  positive  integers [22Xp, q, r[122X. The file contains generators of
        the  syntactic semigroups of word acceptors of triangle groups where [22Xp[122X
        ranges  from  [22X1[122X  to [22X94[122X, [22Xq=3[122X, and [22Xr=2[122X; [22Xp=101[122X, [22Xq[122X ranges from [22X3[122X to [22X99[122X and
        [22Xr=2[122X; [22Xp=101[122X, [22Xq=72[122X, and [22Xr[122X ranges from [22X7[122X to [22X71[122X; and some further randomly
        chosen values of [22Xp,q,r[122X.[133X
  
  [8XEndomorphisms of groups[108X
        [33X[0;6Ythe  files  [10Xnonabelian_groups_[3Xn[103X[10X.citrus.gz[110X  with  [22Xn=6,....,64[122X  contains
        small  generating sets for the endomorphism monoids of all non-abelian
        groups  with  [3Xn[103X  elements.  These  files  were created using the Small
        Groups Library in [5XGAP[105X and the [5XSonata[105X function [10XEndomorphisms[110X.[133X
  
