
<#GAPDoc Label="IsomorphismTransformationMonoid">
<ManSection>
  <Oper Name="IsomorphismTransformationMonoid" Arg="S"/>
  <Oper Name="IsomorphismTransformationSemigroup" Arg="S"/>
  <Returns>An isomorphism.
  </Returns>
  <Description>
    <C>IsomorphismTransformationSemigroup</C> returns an isomorphism
    from the semigroup <A>S</A> to a semigroup of transformations.<P/>

   <C>IsomorphismTransformationMonoid</C> returns an isomorphism from
   the monoid <A>S</A> to a monoid of transformations. <P/>
   
   We only describe <C>IsomorphismTransformationMonoid</C>,
   the corresponding statements for <C>IsomorphismTransformationSemigroup</C>
   also hold.

   <List>
     <Mark>Partial permutation semigroups</Mark>
     <Item>
       If <A>S</A> is a partial permutation monoid, then this function 
       returns an isomorphism from <A>S</A> to a monoid of partial permutations
       on <C>[1..LargestMovedPoint(<A>S</A>)+1]</C> obtained using 
       <Ref Oper="AsTransformation" BookName="ref"/>. The inverse of this
       isomorphism is obtained using 
       <Ref Func="AsPartialPerm" BookName="ref"/>; see 
     <Ref Attr="LargestMovedPoint" Label="for a partial perm" BookName="ref"/>, 
     <Ref Func="InverseMonoid" BookName="ref"/> and 
     <Ref Func="Monoid" BookName="ref"/>.
     </Item>
     
    <Mark>Permutation groups</Mark>
    <Item>
      If <A>S</A> is a permutation group, then this function returns an
      isomorphism from <A>S</A> to a transformation monoid acting on the set
      <C>[1..NrMovedPoints(<A>S</A>)]</C> obtained using 
      <Ref Oper="AsTransformation" BookName="ref"/>; see 
      <Ref Attr="NrMovedPoints" BookName="ref"/>.
    </Item>

    <Mark>Transformation semigroups</Mark>
    <Item>
      If <A>S</A> is a transformation semigroup satisfying <Ref
      Prop="IsMonoidAsSemigroup"/>, then this function returns an isomorphism
      from <A>S</A> to a transformation monoid. <P/>
    </Item>
  </List>

  <Example>
gap> S:=Semigroup( Transformation( [ 1, 4, 6, 2, 5, 3, 7, 8, 9, 9 ] ),
> Transformation( [ 6, 3, 2, 7, 5, 1, 8, 8, 9, 9 ] ) );;
gap> IsTransformationMonoid(S);
false
gap> IsMonoidAsSemigroup(S);
true
gap> M:=Range(IsomorphismTransformationMonoid(S));
&lt;transformation monoid on 8 pts with 2 generators>
gap> IsTransformationMonoid(M);
true
gap> S:=InverseMonoid(
>  PartialPerm( [ 1, 2, 3 ], [ 4, 2, 3 ] ),
>  PartialPerm( [ 1, 2, 4 ], [ 1, 3, 2 ] ),
>  PartialPerm( [ 1, 2, 4 ], [ 4, 1, 2 ] ) );;
gap> T:=Range(IsomorphismTransformationMonoid(S));
&lt;transformation monoid on 5 pts with 5 generators>
gap> Size(S); Size(T);
117
117</Example>
    </Description>
</ManSection>
<#/GAPDoc>
<!-- the following does not currently exist! -->
<#GAPDoc Label="IsIrredundantGeneratingSet">
  <ManSection>
    <Oper Name="IsIrredundantGeneratingSet" Arg="[S, ]U"/>
    <Description>
      returns <K>true</K> if <C>u</C> is not an element of the subsemigroup 
      generated by <C>U</C> without <C>u</C> for all <C>u</C> in <C>U</C>.<P/>

      If the optional first argument is present, then 
      <C>IsIrredundantGeneratingSet</C> first checks that <C>U</C> generates 
      <A>S</A>.

      <Example></Example>
    </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="Monoid">
  <ManSection>
    <Func Name="Monoid" Arg="obj1, obj2, ... [, opts]"/>
    <Func Name="Semigroup" Arg="obj1, obj2, ... [, opts]"/>
    <Returns>A monoid or semigroup.</Returns>
    <Description>
 
      If <A>obj1</A>, <A>obj2</A>, ... are (any combination) of
      transformations, transformation semigroups, or lists of transformations,
      then <C>Monoid</C> or <C>Semigroup</C> returns the monoid or semigroup
      generated by the union of <A>obj1</A>, <A>obj2</A>, ....  <P/>

      If present, the optional final argument <A>opts</A> should be a record
      containing the values of the options for the semigroup being created, as
      described in Section <Ref Sect="opts"/>.<P/>
      
      When applied to arguments other than transformations or transformation
      collections these functions behave precisely as described in the
      reference manual. Please consult <Ref Func="Monoid" BookName="ref"/> and
      <Ref Func="Semigroup" BookName="ref"/> for further details.<P/> 

      As an example of how the syntax provided by &Semigroups; can be
      convenient:
      <C>U:=Semigroup(S, f, Idempotents(T));</C>, in the example below, returns
      the same value as: <C>U:=Semigroup(Concatenation(Generators(S), [f],
      Idempotents(T)));</C>.

      <Example>
gap> S:=Semigroup(Transformation( [ 1, 3, 4, 1, 3, 5 ] ), 
> Transformation( [ 5, 1, 6, 1, 6, 3 ] ) );;
gap> f:=Transformation( [ 2, 4, 6, 1, 6, 5 ] );;
gap> T:=Monoid(Transformation( [ 4, 1, 2, 6, 2, 1 ] ),
> Transformation( [ 5, 2, 5, 3, 5, 3 ] ) );;
gap> U:=Semigroup(S, f, Idempotents(T));
&lt;semigroup with 14 generators>
gap> Size(U);
2182
gap> NrRClasses(U);
53</Example>
    </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="InverseMonoid">
  <ManSection>
    <Func Name="InverseMonoid"  Arg="obj1, obj2, ... [, opts]"/>
    <Func Name="InverseSemigroup"  Arg="obj1, obj2, ... [, opts]"/>
    <Returns>An inverse semigroup or monoid.</Returns>
    <Description>
      If <A>obj1</A>, <A>obj2</A>, ... are (any combination) of
      partial permutations, partial permutation semigroup, or lists of partial
      permutations, then <C>InverseMonoid</C> or <C>InverseSemigroup</C>
      returns the inverse monoid or semigroup generated by the union of
      <A>obj1</A>, <A>obj2</A>, ... which equals the semigroup or
      monoid generated by the union of <A>obj1</A>, <A>obj2</A>, ... and their
      inverses.<P/>

      If present, the optional final argument <A>opts</A> should be a record
      containing the values of the options for the inverse semigroup being
      created, as described in Section <Ref Sect="opts"/>.<P/>

      As an example of how the syntax provided by &Semigroups; can be
      convenient:
      <C>U:=Semigroup(S, f, Idempotents(T));</C>, in the example below, returns
      the same value as: <C>U:=Semigroup(Concatenation(Generators(S), [f],
        Idempotents(T)));</C>.
      <Example>
gap> S:=InverseSemigroup(
> PartialPerm( [ 1, 2, 3, 4, 6, 8, 9, 10, 11, 13, 14, 16, 17, 18, 20 ], 
> [ 2, 14, 5, 8, 11, 12, 16, 17, 18, 9, 13, 15, 20, 6, 4 ] ),
> PartialPerm( [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 13, 14, 15, 17 ], 
> [ 2, 14, 8, 19, 5, 1, 3, 16, 6, 9, 10, 17, 12, 20 ] ));;
gap> f:=PartialPerm( 
> [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 
>  18, 20, 22, 23, 25, 26, 30, 31, 32, 33, 34, 39, 40, 42, 43, 45 ], 
> [ 4, 47, 34, 19, 32, 22, 12, 15, 16, 45, 49, 8, 24, 40, 17, 
>  46, 14, 6, 44, 2, 48, 41, 10, 31, 18, 50, 23, 5, 37, 11, 38, 30, 21 ] );;
gap> S:=InverseSemigroup(S, f, Idempotents(SymmetricInverseSemigroup(10)));
&lt;inverse semigroup with 1027 generators>
gap> S:=InverseSemigroup(S, f, Idempotents(SymmetricInverseSemigroup(10)),
> rec(small:=true));
&lt;inverse semigroup with 13 generators>
gap> Size(S);
17147970
gap> S:=InverseMonoid(Generators(S));
&lt;inverse monoid with 13 generators>
gap> Size(S);
17147971</Example>
  </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="MonoidByGenerators">
  <ManSection>
    <Meth Name="MonoidByGenerators" Arg="coll[, opts]"/>
    <Meth Name="SemigroupByGenerators" Arg="coll[, opts]"/>
    <Returns>A monoid or semigroup.</Returns>
    <Description>
      If <A>coll</A> is a transformation collection, then
      <C>MonoidByGenerators</C> and <C>SemigroupByGenerators</C> return the
      monoid and semigroup generated by <A>coll</A>, respectively. <P/>

      If present, the optional second argument <A>opts</A> should be a record
      containing the values of the options for the semigroup being created, as
      described in Section <Ref Sect="opts"/>.<P/> 

      When applied to arguments other than transformations or transformation
      collections these functions behave precisely as described in the
      reference manual. Please consult 
      <Ref Func="MonoidByGenerators" BookName="ref"/> and
      <Ref Func="SemigroupByGenerators" BookName="ref"/> for further details.
    </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="UnderlyingSemigroupOfIterator">
  <ManSection>
    <Func Name="UnderlyingSemigroupOfIterator" Arg="iter"/>
    <Returns>
      The underlying semigroup of an iterator <A>iter</A>.
    </Returns>
    <Description>
      If <A>iter</A> satisfies <Ref Prop="IsIterator" BookName="ref"/> and
      <C>IsSemigroupsPkgIterator</C>, then <C>UnderlyingSemigroupOfIterator</C> 
      returns <A>iter!.s</A>, which is set during the creation of the 
      iterator.  
    </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="RandomIdempotent">
  <ManSection><Heading>RandomIdempotent</Heading>
    <Oper Name="RandomIdempotent" Arg="img, m"/>
    <Oper Name="RandomIdempotentNC" Arg="img, m"/>
    <Returns>An idempotent transformation.</Returns>
    <Description>
      Returns a random idempotent with image set <A>img</A> of degree <A>m</A>
      after checking that the maximum value in <A>img</A> is at most <A>m</A>. 
      <P/>

      <C>RandomIdempotentNC</C> returns a random idempotent with image set
      <A>img</A> of degree <A>m</A> without checking that the maximum value in
      <A>img</A> is at most <A>m</A>.

      <Log>
gap> RandomIdempotent([ 1, 2, 3 ], 5);
Transformation( [ 1, 2, 3, 1, 3 ] )
gap> RandomIdempotent([ 1, 2, 3 ], 4);
Transformation( [ 1, 2, 3, 3 ] )
gap> RandomIdempotent([ 1, 2, 3 ], 3);            
Transformation( [ 1, 2, 3 ] )
gap> RandomIdempotent([ 1, 2, 4, 5, 6 ], 10);
Transformation( [ 1, 2, 6, 4, 5, 6, 2, 5, 1, 6 ] )</Log>
    </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="IsRegularTransformation">
  <ManSection>
    <Oper Name="IsRegularTransformation" Arg="S, f"/>
    <Returns><K>true</K> or <K>false</K>.
    </Returns>
    <Description>
      This function returns <K>true</K> if <A>f</A> is a regular element of the 
      transformation semigroup <A>S</A> and <K>false</K> if it is not.<P/> 

      A transformation <A>f</A> is <E>regular</E> in a transformation semigroup
      <A>S</A> if it lies inside a regular &D;-class; see <Ref
      Attr="IsRegularDClass" BookName="ref"/> or <Ref
      Attr="IsRegularClass"/>.  Equivalently <A>f</A> is regular if the orbit
      of the image of <A>f</A> containing a transversal of the kernel of
      <A>f</A>; see <Ref Oper="Transformation" BookName="ref"/> and <Ref
      Attr="ImageSetOfTransformation" BookName="ref"/>.

      <Example>
gap> S:=Monoid(Transformation([2,2,4,4,5,6]),Transformation([5,3,4,4,6,6]));;
gap> f:=Generators(S)[1];;
gap> IsRegularTransformation(S, f);
true
gap> img:=ImageSetOfTransformation(f);
[ 2, 4, 5, 6 ]
gap> o:=Orb(S, img, OnSets);; Enumerate(o);
&lt;closed orbit, 3 points>
gap> ForAny(o, x-> IsInjectiveTransOnList(f, x));
true
gap> IsRegularTransformation(S, Generators(S)[2]);
false
gap> IsRegularTransformation(FullTransformationSemigroup(6), Generators(S)[2]);
true</Example>
    </Description>
  </ManSection>
<#/GAPDoc>


<#GAPDoc Label="IsInjectiveTransOnList">
  <ManSection>
    <Oper Name="IsInjectiveTransOnList" Arg="obj, list"/>
    <Returns><K>true</K> or <K>false</K>.
    </Returns>
    <Description>
      The argument <A>obj</A> should be a transformation or the list of images
      of a transformation and <A>list</A> should be a list of positive
      integers.  If <A>obj</A> is a transformation, then we define
      <C>f:=<A>obj</A></C> and if <A>obj</A> is the image list of a
      transformation we define <C>f:=Transformation(<A>obj</A>)</C>.
      <C>IsInjectiveTransOnList</C> returns <K>true</K> if <C>f</C> is injective
      on <A>list</A> and <K>false</K> if it is not. If <A>list</A> is not
      duplicate free, then <K>false</K> is returned. <P/>

      See also <Ref Attr="ImageListOfTransformation" BookName="ref"/> and 
      <Ref Oper="Transformation" BookName="ref"/>.
      <Example>
gap> f:=Transformation( [ 2, 6, 7, 2, 6, 9, 9, 1, 1, 5 ] );;
gap> IsInjectiveTransOnList(f, [1,5]);
true
gap> IsInjectiveTransOnList(f, [5,1]);
true
gap> IsInjectiveTransOnList(f, [5,1,5,1,1,]);
false
gap> IsInjectiveTransOnList([1,2,3,4,5], [5,1,2,3]);   
true</Example>
    </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="Idempotent">
  <ManSection><Heading>Idempotent</Heading>
    <Func Name="Idempotent" Arg="ker, img"/>
    <Func Name="IdempotentNC" Arg="ker, img"/>
    <Returns>An idempotent transformation.</Returns>
    <Description>
      This function returns an idempotent with <Ref
      Func="CanonicalTransSameKernel"/> equal to <A>ker</A> and image set equal
      to <A>img</A> after first checking that <Ref
      Func="IsInjectiveTransOnList"/> holds with argument <A>ker, img</A>.  <P/>

     <C>IdempotentNC</C> returns an idempotent with 
     <Ref Func="CanonicalTransSameKernel"/>
     equal to <A>ker</A> and image set equal to <A>img</A> without
     checking that <Ref Func="IsInjectiveTransOnList"/> holds.
      <Example>
gap> f:=Transformation( [ 10, 2, 3, 10, 5, 10, 7, 2, 5, 6 ] );;
gap> ker:=CanonicalTransSameKernel(f);
[ 1, 2, 3, 1, 4, 1, 5, 2, 4, 6 ]
gap> img:=ImageSetOfTransformation(f);
[ 2, 3, 5, 6, 7, 10 ]
gap> Idempotent(ker, img);
Transformation( [ 6, 2, 3, 6, 5, 6, 7, 2, 5, 10 ] )</Example>
    </Description>
  </ManSection>
<#/GAPDoc>
<#GAPDoc Label="AsTransformation">
  <ManSection>
    <Oper Name="AsTransformation" Arg="f [, n]"/>
    <Returns>A transformation.</Returns>
    <Description>
      If <A>f</A> is a partial permutation and <C>m</C> is the largest point in
      the union of the domain and range of <A>f</A>, then
      <C>AsTransformation</C> returns the transformation <C>g</C> such that
      <C>i^g=i^f</C> for all <C>i</C> in the domain of <A>f</A> and
      <C>i^g=m+1</C> for all <C>i</C> in <M>\{1,\ldots, m+1\}</M> that is not
      in the domain of <A>f</A>. <P/>

      If the optional second argument <A>n</A> is a positive integer greater
      than the largest point in the union of the domain and range of <A>f</A>,
      then the transformation obtained is defined by replacing <C>m</C> in the
      definition of <C>g</C> in previous paragraph by <C>n</C>. <P/>

      It is also possible to use <C>AsTransformation</C> to convert
      permutations and binary relations into transformations; see 
      <Ref Func="AsTransformation" BookName="ref"/>.

      <Example>
gap> f:=PartialPerm([ 1, 2, 3, 4, 5, 8, 10 ], [ 3, 1, 4, 2, 5, 6, 7 ]);;
gap> AsTransformation(f);
Transformation( [ 3, 1, 4, 2, 5, 11, 11, 6, 11, 7, 11 ] )
gap> AsTransformation(f, 12);
Transformation( [ 3, 1, 4, 2, 5, 12, 12, 6, 12, 7, 12, 12 ] )
gap> AsTransformation(f, 14);
Transformation( [ 3, 1, 4, 2, 5, 14, 14, 6, 14, 7, 14, 14, 14, 14 ] )</Example>
    </Description> 
  </ManSection> 
<#/GAPDoc>
<#GAPDoc Label="AsPermutation">
<ManSection>
<!-- JDM remove transformations --> 
    <Oper Name="AsPermutation" Arg="f  [, set]"/>
    <Returns>A permutation.</Returns>
    <Description>
      If the partial permutation <A>f</A> is a permutation of
      the set of positive integers <A>set</A>, then <C>AsPermutation</C>
      returns this permutation;  see <Ref Func="Permutation"
        BookName="ref"/>.<P/>

      If the optional argument <A>set</A> is not specified, then the image set
      of <A>f</A> is used by default for transformations and the range of
      <A>f</A> is used by default for partial permutations; see 
      <Ref Attr="ImageSetOfTransformation" BookName="ref"/> and 
      <Ref Func="RangeSetOfPartialPerm"/>.

<Example>
gap> f:=Transformation( [ 5, 8, 3, 5, 8, 6, 2, 2, 7, 8 ] );;
gap> AsPermutation(f);
fail
gap> f:=Transformation( [ 8, 2, 10, 2, 4, 4, 7, 6, 9, 10 ] );;
gap> AsPermutation(f);
fail
gap> f:=Transformation( [ 1, 3, 6, 6, 2, 10, 2, 3, 10, 5 ] );;
gap> AsPermutation(f);
(2,3,6,10,5)
gap> f:=Transformation( [ 5, 2, 8, 4, 1, 8, 10, 3, 5, 7 ] );;
gap> AsPermutation(f);       
(1,5)(3,8)(7,10)
gap> AsPermutation(f, [1,5]);
(1,5)
gap> AsPermutation(f, [3,8,7,10]);
(3,8)(7,10)
gap> f:=PartialPerm([ 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 16, 17, 18, 19 ],
> [ 3, 12, 14, 4, 11, 18, 17, 2, 9, 5, 15, 8, 20, 10, 19 ]);;
gap> AsPermutation(f);
fail
gap> AsPermutation(f, [4,5,11]);
(5,11)
gap> f:=RandomPartialPerm(20);;
gap> AsPermutation(f^-1*f);
()</Example>
    </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="NrElementsOfRank">
  <ManSection>
    <Attr Name="NrElementsOfRank" Arg="S, n"/>
    <Returns>the number of elements of a given rank. </Returns>
    <Description><C>NrElementsOfRank</C> returns the number of elements of the
    semigroup <A>S</A> of partial permutations or transformations with rank
    <A>n</A>; see 
    <Ref Func="RankOfPartialPerm" BookName="ref"/> and
    <Ref Attr="RankOfTransformation" BookName="ref"/>.

    <Example>
gap> S:=Semigroup( Transformation( [ 1, 3, 4, 1, 3 ] ), 
> Transformation( [ 2, 4, 1, 5, 5 ] ), 
> Transformation( [ 2, 5, 3, 5, 3 ] ), 
> Transformation( [ 4, 1, 2, 2, 1 ] ), 
>  Transformation( [ 5, 5, 1, 1, 3 ] ) );;
gap> NrElementsOfRank(S, 10);
0
gap> Size(S);
602
gap> List([1..5], x-> NrElementsOfRank(S, x));
[ 5, 260, 336, 1, 0 ]
gap> Sum(last);
602
gap> T:=FullTransformationSemigroup(5);;
gap> List([1..5], x-> NrElementsOfRank(T, x));
[ 5, 300, 1500, 1200, 120 ]
gap> Sum(last);
3125
gap> S:=SymmetricInverseSemigroup(5);;
gap> NrElementsOfRank(S, 4);
600
gap> Binomial(5,4)^2*Factorial(4);
600</Example>
  </Description>
  </ManSection>
<#/GAPDoc>
<#GAPDoc Label="GradedImagesOfTransSemigroup">
  <ManSection><Heading>Graded images and kernels</Heading>
  <Attr Name="GradedImagesOfTransSemigroup" Arg="S"/>
  <Attr Name="GradedKernelsOfTransSemigroup" Arg="S"/>
  <Returns>A list of images or kernels.</Returns>
  <Description>
  <C>GradedImagesOfTransSemigroup</C> returns a list where the <C>i</C>th 
  entry is a list of all the images of transformations in the
  transformation semigroup <A>S</A> with size 
  <C>i</C>.  
  <P/>
  
  <C>GradedKernelsOfTransSemigroup</C> returns a list where the <C>i</C>th 
  entry is a list of the values of <Ref Func="CanonicalTransSameKernel"/> for
  all transformations in <A>S</A> with rank <C>i</C>.
  <P/>

  See also <Ref Attr="ImagesOfTransSemigroup"/> and 
  <Ref Attr="KernelsOfTransSemigroup"/>.
  <Example>
gap> S:=Semigroup(Transformation( [ 1, 5, 1, 1, 1 ] ), 
> Transformation( [ 4, 4, 5, 2, 2 ] ));;
gap> GradedImagesOfTransSemigroup(S);
[ [ [ 1 ], [ 4 ], [ 2 ], [ 5 ] ], [ [ 1, 5 ], [ 2, 4 ] ], [ [ 2, 4, 5 ] ], 
  [  ], [  ] ]
gap> GradedKernelsOfTransSemigroup(S);
[ [ [ 1, 1, 1, 1, 1 ] ], [ [ 1, 2, 1, 1, 1 ], [ 1, 1, 1, 2, 2 ] ], 
  [ [ 1, 1, 2, 3, 3 ] ], [  ], [  ] ]</Example> 
  </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="ImagesOfTransSemigroup">
  <ManSection><Heading>Images and kernels</Heading>
  <Attr Name="ImagesOfTransSemigroup" Arg="S[, n]"/>
  <Attr Name="KernelsOfTransSemigroup" Arg="S[, n]"/>
  <Returns>An orbit.</Returns>
  <Description>
  The argument <A>S</A> should be a transformation semigroup and the optional
  second argument <A>n</A> should be a positive integer not greater than the
  degree of <A>S</A>.  <C>ImagesOfTransSemigroup</C> returns the  <Ref
    Func="Orb" BookName="orb"/> object: 
  <Log>Orb(S, [1..Degree(S)], OnSets);</Log> which contains the image sets of
  all the transformations belonging to <A>S</A>.  <P/>
  
  <C>KernelsOfTransSemigroup</C> returns the <Ref Func="Orb" BookName="orb"/>
  object: <Log>Orb(S, [1,..Degree(S)], OnKernelsAntiAction);</Log> <P/> If the
  optional second argument <A>n</A> (a positive integer) is present, then only
  the images or kernels of size at least <A>n</A> are found.<P/>
 
  Note that the image/kernel <C>[1..Degree(S)]</C> always occurs in both orbits
  even if there is no element of <A>S</A> with image/kernel equal to
  <C>[1..Degree(S)]</C>.<P/>

  See also <Ref Func="GradedImagesOfTransSemigroup"/>,
  <Ref Func="GradedKernelsOfTransSemigroup"/>,
  <Ref Func="OnKernelsAntiAction"/>, and 
  <Ref Func="CanonicalTransSameKernel"/>
  <Example>
gap>  S:=Semigroup( Transformation( [ 6, 4, 4, 4, 6, 1 ] ), 
> Transformation( [ 6, 5, 1, 6, 2, 2 ] ) );;
gap> o:=ImagesOfTransSemigroup(S, 6); Enumerate(o); AsList(o);
&lt;open orbit, 1 points with Schreier tree with grading>
&lt;closed orbit, 1 points with Schreier tree with grading>
[ [ 1 .. 6 ] ]
gap> o:=ImagesOfTransSemigroup(S, 5); Enumerate(o); AsList(o);
&lt;open orbit, 1 points with Schreier tree with grading>
&lt;closed orbit, 1 points with Schreier tree with grading>
[ [ 1 .. 6 ] ]
gap> o:=ImagesOfTransSemigroup(S, 4); Enumerate(o); AsList(o);
&lt;open orbit, 1 points with Schreier tree with grading>
&lt;closed orbit, 2 points with Schreier tree with grading>
[ [ 1 .. 6 ], [ 1, 2, 5, 6 ] ]
gap> o:=ImagesOfTransSemigroup(S, 3); Enumerate(o); AsList(o);
&lt;open orbit, 1 points with Schreier tree with grading>
&lt;closed orbit, 4 points with Schreier tree with grading>
[ [ 1 .. 6 ], [ 1, 4, 6 ], [ 1, 2, 5, 6 ], [ 2, 5, 6 ] ]
gap> o:=ImagesOfTransSemigroup(S, 2); Enumerate(o); AsList(o);
&lt;open orbit, 1 points with Schreier tree with grading>
&lt;closed orbit, 8 points with Schreier tree with grading>
[ [ 1 .. 6 ], [ 1, 4, 6 ], [ 1, 2, 5, 6 ], [ 2, 6 ], [ 2, 5, 6 ], [ 1, 4 ],
  [ 2, 5 ], [ 4, 6 ] ]
gap> o:=ImagesOfTransSemigroup(S, 1); Enumerate(o); AsList(o);
&lt;open orbit, 1 points with Schreier tree with grading>
&lt;closed orbit, 13 points with Schreier tree with grading>
[ [ 1 .. 6 ], [ 1, 4, 6 ], [ 1, 2, 5, 6 ], [ 2, 6 ], [ 2, 5, 6 ], [ 1, 4 ],
  [ 2, 5 ], [ 4, 6 ], [ 6 ], [ 1 ], [ 2 ], [ 4 ], [ 5 ] ]
gap> o:=ImagesOfTransSemigroup(S); Enumerate(o); AsList(o);
&lt;open orbit, 1 points with Schreier tree>
&lt;closed orbit, 13 points with Schreier tree>
[ [ 1 .. 6 ], [ 1, 4, 6 ], [ 1, 2, 5, 6 ], [ 2, 6 ], [ 2, 5, 6 ], [ 1, 4 ],
  [ 2, 5 ], [ 4, 6 ], [ 6 ], [ 1 ], [ 2 ], [ 4 ], [ 5 ] ]</Example>
  </Description>
  </ManSection>
<#/GAPDoc>

<#GAPDoc Label="OnKernelsAntiAction">
  <ManSection> 
    <Func Name="OnKernelsAntiAction" Arg="ker, f"/>
    <Returns>
      A list of positive integers. 
    </Returns>
    <Description>
    The argument <A>ker</A> should equal <C>CanonicalTransSameKernel(g);</C>
    for some transformation <C>g</C> with degree equal to the degree of the
    transformation <A>f</A>. 

    <C>OnKernelsAntiAction</C> returns <C>CanonicalTransSameKernel(f*g)</C>.
    See also <Ref Func="CanonicalTransSameKernel"/>.

    <Example>
gap> f:=Transformation( [ 3, 6, 9, 2, 4, 2, 2, 2, 8, 2 ] );;
gap> g:=Transformation( [ 7, 1, 4, 3, 2, 7, 7, 6, 6, 5 ] );;
gap> ker:=CanonicalTransSameKernel(f);
[ 1, 2, 3, 4, 5, 4, 4, 4, 6, 4 ]
gap> OnKernelsAntiAction(ker, g);
[ 1, 2, 1, 3, 4, 1, 1, 1, 1, 5 ]
gap> CanonicalTransSameKernel(g*f);
[ 1, 2, 1, 3, 4, 1, 1, 1, 1, 5 ]</Example>
    </Description>
  </ManSection>
<#/GAPDoc>
