<!-- 

afterrecog.xml          recogbase package documentation
                                                               Max Neunhoeffer
                                                                   Ákos Seress

         Copyright (C) 2005-2008 by the authors.

This chapter shows what one can do after a successful recognition.

-->

<Chapter Label="afterrecog">
<Heading>After successful recognition</Heading>

This chapter explains, what one can do with recognition info records
after a successful recognition (and possibly verification).<P/>

Of course, one can inspect the whole tree of recognition info records
just by looking at the stored attribute values. Moreover, constructive
membership tests can be performed using the function 
<Ref Func="SLPforElement"/>, thereby writing an arbitrary element
in terms of the nice generators, which are stored in the attribute
<Ref Attr="NiceGens"/>. If <C>fail</C> is returned, then the
element in question does not lie in the recognised group or
the recognition made an error.<P/>

Here is an example of a successful recognition tree:

<Log>
<![CDATA[gap> g := DirectProduct(SymmetricGroup(12),SymmetricGroup(5));
Group([ (1,2,3,4,5,6,7,8,9,10,11,12), (1,2), (13,14,15,16,17), (13,14) ])
gap> ri := RecogniseGroup(g);
#I  Finished rank 90 method "NonTransitive": success.
#I  Going to the factor (depth=0, try=1).
#I  Finished rank 95 method "VeryFewPoints": success.
#I  Back from factor (depth=0).
#I  Calculating preimages of nice generators.
#I  Creating 20 random generators for kernel.
....................
#I  Going to the kernel (depth=0).
#I  Finished rank 80 method "Giant": success.
#I  Back from kernel (depth=0).
<recoginfo NonTransitive
 F:<recoginfo VeryFewPoints Size=120>
 K:<recoginfo Giant Size=479001600>>]]>
</Log>

One sees that the recursive process runs, first it finds that the 
permutation action is not transitive, a homomorphism is found by mapping
onto the action on one of the orbits. The image is recognised to permute 
only a few points. The kernel is recognised to be a full symmetric group 
in its natural action on at least 10 points (recognised as <Q>Giant</Q>).
<P/>

After this, we can write arbitrary group elements in the group <C>g</C>
in terms of the nice generators:

<Log>
<![CDATA[
gap> x := PseudoRandom(g);
(1,12)(2,5,9,11,10,3,4)(7,8)(13,14,16,15,17)
gap> slp := SLPforElement(ri,x);
<straight line program>
gap> ResultOfStraightLineProgram(slp,NiceGens(ri));
(1,12)(2,5,9,11,10,3,4)(7,8)(13,14,16,15,17)]]>
</Log>

Note that this example only works by using also the
<Package>recog</Package> package which contains the necessary recognition
methods.

<Section>
    <Heading>Functions and methods for recognition info records</Heading>

If you need an element explicitly written in terms of the original
generators, you can use the following function:

<ManSection>
<Func Name="SLPforNiceGens" Arg="ri"/>
<Returns>an SLP expressing the nice generators in the original ones</Returns>
<Description>
    This function assembles a possibly quite large straight line program
    expressing the nice generators in terms of the original ones by using
    the locally stored information in the recognition tree recursively.<P/>
    You can concatenate straight line programs in the nice generators with
    the result of this function to explicitly write an element in terms
    of the original generators.
</Description>
</ManSection>

<ManSection>
<Meth Name="\in" Arg="x, ri"/>
<Returns><C>true</C> or <C>false</C></Returns>
<Description>
    This method tests, whether the element <A>x</A> lies in the group
    recognised by the recognition info record <A>ri</A>. Note that
    this is only a convenience method, in fact <Ref
        Func="SLPforElement"/> is used and the resulting straight line
    program is thrown away.
</Description>
</ManSection>

<ManSection>
<Meth Name="Size" Arg="ri"/>
<Returns>the size of the recognised group</Returns>
<Description>
    This method calculates the size of the recognised group
    by multiplying the size of the factor and the kernel recursively.
    It is assumed that leaf nodes know already or can calculate the
    size of their group.
</Description>
</ManSection>

<ManSection>
<Func Name="DisplayCompositionFactors" Arg="ri"/>
<Returns>nothing</Returns>
<Description>
    This function displays a composition series by using the recursive
    recognition tree. It only works, if the usual operation
    <Ref Oper="CompositionSeries" BookName="ref"/> works for all
    leaves. THIS DOES CURRENTLY NOT WORK FOR PROJECTIVE GROUPS AND
    THUS FOR MATRIX GROUPS!
</Description>
</ManSection>

</Section>

<!-- ############################################################ -->

</Chapter>
