  
  [1X3 [33X[0;0YGroup recognition[133X[101X
  
  [33X[0;0YThis  chapter describes a generic framework for group recognition. The basic
  problem  is, we want to solve the constructive membership problem: given any
  [22Xg ∈ G[122X, [22XG = ⟨ X ⟩[122X, write a straight line program (SLP) from [22XX[122X to [22Xg[122X, for [22Xg ∉ G[122X
  (in  the situation that [22XG[122X is naturally embedded into some bigger group), the
  algorithm  should  fail.  This  is  usually  done  by constructing some nice
  generators  (and  then  writing  an  SLP  from  the nice generators to [22Xg[122X and
  concatenating  with  an  SLP  from  [22XX[122X  to  the  nice generators). Often, for
  efficiency  reasons, we will just store the nice generators and then only be
  interested  in  the  SLP from those to [22Xg[122X. The framework presented here deals
  with exactly this process.[133X
  
  [33X[0;0YThe  generic  framework  was  designed  having  three  situations  in  mind:
  permutation  groups,  matrix  groups  and  projective  groups.  Although the
  methods  used are quite different for those cases, there is a common pattern
  in   the  procedure  of  recognition.  Namely,  first  we  have  to  find  a
  homomorphism, solve the constructive membership problem recursively in image
  and  kernel, then put it together. The recursion ends in groups where we can
  solve  the  constructive  membership problem directly. The general framework
  reflects  this  idea  and  separates  it  from  the  rest of the recognition
  methods.[133X
  
  [33X[0;0YSolution of the constructive membership problem comes in two stages: first a
  [21Xrecognition  phase[121X  and  then  a  [21Xverification  phase[121X. The recognition phase
  usually  consists  of  randomised  algorithms  with certain error or failure
  probabilities.  The result is some kind of [21Xrecognition information[121X that will
  describe  the  group  already  very  well, but which is not yet proven to be
  correct.  However,  one can already write arbitrary elements in the group as
  product of the given generators. In the verification phase a presentation of
  the  group  is  calculated,  thereby proving that the group generated by the
  given  generators  is  in  fact  isomorphic  to  the  group described by the
  recognition  information.  In many cases the verification phase will be much
  more expensive than the recognition phase.[133X
  
  [33X[0;0YIn  the  following  sections, we describe the generic framework. We begin in
  Section  [14X3.1[114X  with a technical description of the recursive procedure behind
  our  main  function  [2XRecogniseGroup[102X  ([14X3.1-5[114X). In Section [14X3.2[114X we describe the
  return  type  of [2XRecogniseGroup[102X ([14X3.1-5[114X) which we call [21Xrecognition nodes[121X. The
  methods to find homomorphisms are described in Section [14X3.3[114X. Finally, we have
  three  sections  in  which  we  collect  conventions  for the recognition of
  different types of groups.[133X
  
  
  [1X3.1 [33X[0;0YThe recursive procedure[133X[101X
  
  [33X[0;0YAt   the   heart   of   the  recognition  procedure  is  a  function  called
  [2XRecogniseGeneric[102X  ([14X3.1-1[114X)  which  gets  a  [5XGAP[105X  group  object  and returns a
  so-called  [21Xrecognition  node[121X  (see  Subsection  [14X3.2[114X for details). Success or
  failure will be indicated by this record being in the filter [2XIsReady[102X ([14X3.2-5[114X)
  or not.[133X
  
  [33X[0;0YTo  know  how  to find homomorphisms the function gets as another argument a
  database  of  methods  (see  Section  [14X3.3[114X for a description of the setup for
  methods  for  finding homomorphisms and Section [14X4.1[114X in Chapter [14X4[114X for details
  about  method  databases).  This database will be different according to the
  type of group in question.[133X
  
  [33X[0;0YTo  describe  the  algorithm  executed  by [2XRecogniseGeneric[102X ([14X3.1-1[114X) we first
  summarise it in steps:[133X
  
  [31X1[131X   [33X[0;6YCreate a new, empty recognition node.[133X
  
  [31X2[131X   [33X[0;6YUse  the database of [10XFindHomomorphism[110X methods and the method selection
        procedure  described in Chapter [14X4[114X to try to find a homomorphism onto a
        smaller  group  or  an isomorphism onto another known group. Terminate
        with failure if this does not work.[133X
  
  [31X3[131X   [33X[0;6YIf  an  isomorphism  is  found or a method somehow else recognises the
        group  in  question,  such that we can write elements as straight line
        programs in the generators from now on, then make the recognition node
        a leaf of the recognition tree and return success.[133X
  
  [31X4[131X   [33X[0;6YOtherwise  the  function sets up all the data for the homomorphism and
        calls  itself with the image of the homomorphism. Note that this might
        use  another  database of recognition methods because the homomorphism
        might change the representation of the group.[133X
  
  [31X5[131X   [33X[0;6YAfter  successful  recognition of the image group the procedure has to
        recognise  the  kernel of the homomorphism. The first step for this is
        to   find   generators.  If  they  are  not  already  known  from  the
        [10XFindHomomorphism[110X method, they are created by producing random elements
        in the group, mapping them through the homomorphism, writing them as a
        straight  line  program  in  the images of the generators and applying
        this straight line program to the original generators. The quotient of
        the random element and the result of the straight line program lies in
        the  kernel  of  the  homomorphism.  After  creating  20 (FIXME: is 20
        correct?)  random  generators  of  the kernel we assume for the moment
        that they generate the kernel.[133X
  
  [31X6[131X   [33X[0;6YThe  function  [2XRecogniseGeneric[102X  ([14X3.1-1[114X)  can  now call itself for the
        kernel.  After  successful  recognition of the kernel all the data for
        the node is completed and success is returned.[133X
  
  [31X7[131X   [33X[0;6YThe  function  [2XRecogniseGeneric[102X  ([14X3.1-1[114X) now acquires preimages of the
        nice   generators   behind  the  homomorphism  and  appends  the  nice
        generators  of  the kernel. This list of generators is now the list of
        nice generators for the current node.[133X
  
  [33X[0;0YNote  that  with  the collected data one can write arbitrary elements of the
  group as a straight line program in the generators as follows:[133X
  
  [31X1[131X   [33X[0;6YMap the element through the homomorphism.[133X
  
  [31X2[131X   [33X[0;6YWrite  the  element  in  the  image  group  as  a  product of the nice
        generators in the image group.[133X
  
  [31X3[131X   [33X[0;6YApply  the  resulting  straight line program to the preimages of those
        nice  generators and calculate the quotient, which will now lie in the
        kernel.[133X
  
  [31X4[131X   [33X[0;6YWrite  the  kernel  element  as  a straight line program in the kernel
        generators.[133X
  
  [31X5[131X   [33X[0;6YAssemble  both  straight  line  programs  to  one bigger straight line
        program  (which is now in terms of our own nice generators) and return
        it.[133X
  
  [33X[0;0YIf  this  procedure fails in the fourth step, this indicates that our random
  generators  for  the  kernel  did not yet generate the full kernel and makes
  further recognition steps necessary. This will not happen after a successful
  verification phase.[133X
  
  [33X[0;0YThe  latter  procedure  to  write  elements as straight line programs in the
  generators is implemented in the function [2XSLPforElementGeneric[102X ([14X3.3-2[114X) which
  will  be  called  automatically  if  one  calls  the  [2XSLPforElement[102X ([14X3.2-15[114X)
  function of the resulting recognition node (see [2Xslpforelement[102X ([14X3.2-14[114X)).[133X
  
  [33X[0;0YIt  is  now  high time to give you the calling details of the main recursive
  recognition function:[133X
  
  [1X3.1-1 RecogniseGeneric[101X
  
  [33X[1;0Y[29X[2XRecogniseGeneric[102X( [3XH[103X, [3Xmethoddb[103X, [3XdepthString[103X, [3Xknowledge[103X ) [32X function[133X
  [33X[1;0Y[29X[2XRecognizeGeneric[102X( [3XH[103X, [3Xmethoddb[103X, [3XdepthString[103X, [3Xknowledge[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xfail[109X for failure or a recognition node.[133X
  
  [33X[0;0Y[3XH[103X  must  be  a  [5XGAP[105X  group object, [3Xmethoddb[103X must be a method database in the
  sense  of  Section  [14X4.2[114X  containing [10XFindHomomorphism[110X methods in the sense of
  Section  [14X3.3[114X. [3XdepthString[103X is a string whose length measures the depth in the
  recognition  tree. It will be increased by one character for each step we go
  into  the  tree,  namely  by [10XF[110X for a image node, and [10XK[110X for a kernel. The top
  level  begins  with  an  empty  string.  [3Xknowledge[103X is an optional record the
  components  of  which  are  copied  into  the  new recognition node which is
  created  for  the group [3XH[103X. Especially the component [10Xhints[110X can contain a list
  of  additional find homomorphism methods (described by records as in Section
  [14X4.2[114X).  The  methods  in  [10Xhints[110X  and  in  [3Xmethoddb[103X are merged and sorted into
  rank-descending  order.  The  result  is passed to [2XCallMethods[102X ([14X4.3-1[114X). This
  feature  is  intended  to  give hints about prior knowledge about which find
  homomorphism method might succeed.[133X
  
  [33X[0;0YThe  function performs the algorithm described above and returns either [9Xfail[109X
  in case of failure or a recognition node in case of success. For the content
  and definition of recognition nodes see Section [14X3.2[114X.[133X
  
  [33X[0;0YThe  user  will  usually  not  call this function directly, but will use the
  following convenience functions:[133X
  
  [1X3.1-2 RecognisePermGroup[101X
  
  [33X[1;0Y[29X[2XRecognisePermGroup[102X( [3XH[103X ) [32X function[133X
  [33X[1;0Y[29X[2XRecognizePermGroup[102X( [3XH[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xfail[109X for failure or a recognition node.[133X
  
  [33X[0;0Y[3XH[103X   must   be   a   [5XGAP[105X   permutation  group  object.  This  function  calls
  [2XRecogniseGeneric[102X  ([14X3.1-1[114X)  with  the  method  database  used for permutation
  groups, which is stored in the global variable [2XFindHomDbPerm[102X ([14X4.2-2[114X), and no
  prior knowledge.[133X
  
  [1X3.1-3 RecogniseMatrixGroup[101X
  
  [33X[1;0Y[29X[2XRecogniseMatrixGroup[102X( [3XH[103X ) [32X function[133X
  [33X[1;0Y[29X[2XRecognizeMatrixGroup[102X( [3XH[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xfail[109X for failure or a recognition node.[133X
  
  [33X[0;0Y[3XH[103X must be a [5XGAP[105X matrix group object over a finite field. This function calls
  [2XRecogniseGeneric[102X  ([14X3.1-1[114X)  with  the method database used for matrix groups,
  which is stored in the global variable [2XFindHomDbMatrix[102X ([14X4.2-3[114X), and no prior
  knowledge.[133X
  
  [1X3.1-4 RecogniseProjectiveGroup[101X
  
  [33X[1;0Y[29X[2XRecogniseProjectiveGroup[102X( [3XH[103X ) [32X function[133X
  [33X[1;0Y[29X[2XRecognizeProjectiveGroup[102X( [3XH[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xfail[109X for failure or a recognition node.[133X
  
  [33X[0;0Y[3XH[103X  must be a [5XGAP[105X matrix group object over a finite field. Since as of now no
  actual  projective  groups  are implemented in the [5XGAP[105X library we use matrix
  groups  instead.  The  recognition  will  however  view  the  group  as  the
  projective  group,  i.e.  the  matrix group modulo its scalar matrices. This
  function  calls  [2XRecogniseGeneric[102X  ([14X3.1-1[114X) with the method database used for
  projective    groups,    which    is   stored   in   the   global   variable
  [2XFindHomDbProjective[102X ([14X4.2-4[114X), and no prior knowledge.[133X
  
  [1X3.1-5 RecogniseGroup[101X
  
  [33X[1;0Y[29X[2XRecogniseGroup[102X( [3XH[103X ) [32X function[133X
  [33X[1;0Y[29X[2XRecognizeGroup[102X( [3XH[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xfail[109X for failure or a recognition node.[133X
  
  [33X[0;0Y[3XH[103X  must be a [5XGAP[105X group object. This function automatically dispatches to one
  of    the    two   previous   functions   [2XRecognisePermGroup[102X   ([14X3.1-2[114X),   or
  [2XRecogniseMatrixGroup[102X  ([14X3.1-3[114X),  according  to  the type of the group [3XH[103X. Note
  that  since currently there is no implementation of projective groups in the
  [5XGAP[105X  library,  one  cannot  recognise a matrix group [3XH[103X as a projective group
  using this function.[133X
  
  [1X3.1-6 TryFindHomMethod[101X
  
  [33X[1;0Y[29X[2XTryFindHomMethod[102X( [3XH[103X, [3Xmethod[103X, [3Xprojective[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xfail[109X or [9Xfalse[109X or a recognition node.[133X
  
  [33X[0;0YUse this function to try to run a given find homomorphism method [3Xmethod[103X on a
  group  [3XH[103X. Indicate by the boolean [3Xprojective[103X whether or not the method works
  in projective mode. For permutation groups, set this to [9Xfalse[109X. The result is
  either  [9Xfail[109X  or  [9Xfalse[109X if the method fails or a recognition node [10Xri[110X. If the
  method  created  a  leaf  then [10Xri[110X will be a leaf, otherwise it will have the
  attribute  [2XHomom[102X  ([14X3.2-7[114X)  set,  but no image or kernel have been created or
  recognised  yet.  You  can use for example the methods in [2XFindHomMethodsPerm[102X
  ([14X4.4-1[114X)  or [2XFindHomMethodsMatrix[102X ([14X4.4-2[114X) or [2XFindHomMethodsProjective[102X ([14X4.4-3[114X)
  as the [3Xmethod[103X argument.[133X
  
  [33X[0;0YGAP  homomorphisms  are  not required to give a sensible answer when given a
  value  not  in  their source, and in practice often enter the break loop, or
  return an incorrect answer. This causes problems when checking if a value is
  not  in  the  represented  group.  To avoid this problem, [2Xvalidatehomominput[102X
  ([14X3.2-18[114X)  can be set to a function. This function is used to filter possible
  group elements, before they are passed to [2XHomom[102X ([14X3.2-7[114X).[133X
  
  
  [1X3.2 [33X[0;0YRecognition nodes[133X[101X
  
  [33X[0;0YA recognition node is a [5XGAP[105X component object. It is a member of the family[133X
  
  [1X3.2-1 RecogNodeFamily[101X
  
  [33X[1;0Y[29X[2XRecogNodeFamily[102X [32X family[133X
  [33X[0;0Yand is in the category[133X
  
  [1X3.2-2 IsRecogNode[101X
  
  [33X[1;0Y[29X[2XIsRecogNode[102X [32X Category[133X
  [33X[0;0Yand  is  [2XIsAttributeStoringRep[102X ([14XReference: IsAttributeStoringRep[114X), such that
  we  can  define  attributes for it, the values of which are stored once they
  are  known. A recognition node always represents a whole binary tree of such
  records,  see  the  attributes  [2XImageRecogNode[102X  ([14X3.2-10[114X) and [2XKernelRecogNode[102X
  ([14X3.2-11[114X) below.[133X
  
  [33X[0;0YRecognition nodes can be created via:[133X
  
  [1X3.2-3 RecogNode[101X
  
  [33X[1;0Y[29X[2XRecogNode[102X( [3XH[103X[, [3Xprojective[103X][, [3Xr[103X] ) [32X operation[133X
  [33X[1;0Y[29X[2XRecogNode[102X( [3Xr[103X, [3XH[103X, [3Xprojective[103X ) [32X operation[133X
  [6XReturns:[106X  [33X[0;10Ya recognition node.[133X
  
  [33X[0;0YCreate  an  [2XIsRecogNode[102X  ([14X3.2-2[114X)  object  [10Xnode[110X representing the group [3XH[103X. The
  optional  boolean  [3Xprojective[103X  defaults  to false and specifies, in the case
  that  [3XH[103X  is  a  matrix group, whether [3XH[103X is to be interpreted as a projective
  group.  The  optional  record  [3Xr[103X  defaults to an empty record and is used to
  initialize the returned [10Xnode[110X.[133X
  
  [33X[0;0YFor backwards-compatibility, also the order of arguments [10Xr, H, projective[110X is
  accepted.[133X
  
  [33X[0;0YThe following filters are defined for recognition nodes:[133X
  
  [1X3.2-4 IsLeaf[101X
  
  [33X[1;0Y[29X[2XIsLeaf[102X [32X Flag[133X
  
  [33X[0;0YThis  flag indicates, whether or not a recognition node represents a leaf in
  the  recognition  tree.  If  it  is  not  set, one finds at least one of the
  attributes  [2XImageRecogNode[102X ([14X3.2-10[114X) and [2XKernelRecogNode[102X ([14X3.2-11[114X) set for the
  corresponding  node. This flag is normally reset and has to be set by a find
  homomorphism method to indicate a leaf.[133X
  
  [1X3.2-5 IsReady[101X
  
  [33X[1;0Y[29X[2XIsReady[102X [32X Flag[133X
  
  [33X[0;0YThis  flag  is set for a [2XIsRecogNode[102X ([14X3.2-2[114X) object [10Xnode[110X by [2XRecogniseGeneric[102X
  ([14X3.1-1[114X), if recognition of the [13Xsubtree[113X rooted in [10Xnode[110X finished successfully.
  Recognition  of  a  node  is  considered successful, if two conditions hold.
  First,  the  call of [2XCallMethods[102X ([14X4.3-1[114X) for this node reports [9XSuccess[109X, that
  is  a  method  from  the  respective  method  database (see Section [14X4.2[114X) was
  successful.   Secondly,  the  construction  of  the  kernel  generators  was
  successful.[133X
  
  [33X[0;0YThus,  if  the [2XIsReady[102X flag is set, this does not necessarily mean, that the
  result   of  the  recognition  procedure  was  verified  and  proven  to  be
  mathematically correct![133X
  
  [33X[0;0YIn  particular,  any  computations  using  the  datastructure  set up by the
  recognition  procedure,  like  [2XSize[102X  ([14X5.1-3[114X)  and membership testing via [2X\in[102X
  ([14X5.1-2[114X), will error if [2XIsReady[102X is not set.[133X
  
  [33X[0;0YThe following attributes are defined for recognition nodes:[133X
  
  [1X3.2-6 Grp[101X
  
  [33X[1;0Y[29X[2XGrp[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe  value  of  this attribute is the group that is to be recognised by this
  recognition node [3Xri[103X. This attribute is always present during recognition and
  after  completion.  Note that the generators of the group object stored here
  always have a memory attached to them, such that elements that are generated
  from them remember, how they were acquired.[133X
  
  [1X3.2-7 Homom[101X
  
  [33X[1;0Y[29X[2XHomom[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe  value  of  this  attribute  is the homomorphism that was found from the
  group  described  by the recognition node [3Xri[103X as a [5XGAP[105X object. It is set by a
  find   homomorphism  method  that  succeeded  to  find  a  homomorphism  (or
  isomorphism).  It  does  not have to be set in leaf nodes of the recognition
  tree.[133X
  
  [1X3.2-8 NiceGens[101X
  
  [33X[1;0Y[29X[2XNiceGens[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe  value of this attribute must be set for all nodes and contains the nice
  generators.  The  [2XSLPforElement[102X ([14X3.2-15[114X) function of the node will write its
  straight line program in terms of these nice generators. For leaf nodes, the
  find  homomorphism  method  is  responsible to set the value of [2XNiceGens[102X. By
  default,  the original generators of the group at this node are taken. For a
  homomorphism  (or  isomorphism),  the  [2XNiceGens[102X will be the concatenation of
  preimages  of  the  [2XNiceGens[102X of the image group (see [2Xpregensfac[102X ([14X3.2-9[114X)) and
  the  [2XNiceGens[102X of the kernel. A find homomorphism method does not have to set
  [2XNiceGens[102X  if  it  finds  a  homomorphism.  Note  however,  that  such a find
  homomorphism method has to ensure somehow, that preimages of the [2XNiceGens[102X of
  the  image  group  can  be acquired. See [2Xcalcnicegens[102X ([14X3.2-20[114X), [2XCalcNiceGens[102X
  ([14X3.2-23[114X) and [2Xslptonice[102X ([14X3.2-24[114X) for instructions.[133X
  
  [1X3.2-9 pregensfac[101X
  
  [33X[1;0Y[29X[2Xpregensfac[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe value of this attribute is only set for homomorphism nodes. In that case
  it  contains  preimages  of  the  nice  generators  in the image group. This
  attribute is set automatically by the generic recursive recognition function
  using  the  mechanism  described  with  the  attribute [2Xcalcnicegens[102X ([14X3.2-20[114X)
  below. A find homomorphism does not have to touch this attribute.[133X
  
  [1X3.2-10 ImageRecogNode[101X
  
  [33X[1;0Y[29X[2XImageRecogNode[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe  value  of  this  attribute  is the recognition node of the image of the
  homomorphism that was found from the group described by the recognition node
  [3Xri[103X.  It  is set by the generic recursive procedure after a find homomorphism
  method  has  succeeded  to find a homomorphism (or isomorphism). It does not
  have  to  be set in leaf nodes of the recognition tree. This attribute value
  provides the link to the [21Ximage[121X subtree of the recognition tree.[133X
  
  [1X3.2-11 KernelRecogNode[101X
  
  [33X[1;0Y[29X[2XKernelRecogNode[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe  value  of  this  attribute is the recognition node of the kernel of the
  homomorphism that was found from the group described by the recognition node
  [3Xri[103X.  It  is set by the generic recursive procedure after a find homomorphism
  method  has  succeeded  to find a homomorphism (or isomorphism). It does not
  have  to be set in leaf nodes of the recognition tree or if the homomorphism
  is known to be an isomorphism. In the latter case the value of the attribute
  is set to [9Xfail[109X. This attribute value provides the link to the [21Xkernel[121X subtree
  of the recognition tree.[133X
  
  [1X3.2-12 ParentRecogNode[101X
  
  [33X[1;0Y[29X[2XParentRecogNode[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe  value  of  this attribute is the recognition node of the parent of this
  node in the recognition tree. The top node does not have this attribute set.[133X
  
  [1X3.2-13 fhmethsel[101X
  
  [33X[1;0Y[29X[2Xfhmethsel[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe  value  of this attribute is the record returned by the method selection
  (see  Section  [14X4.3[114X) after it ran to find a homomorphism (or isomorphism). It
  is there to be able to see which methods were tried until the recognition of
  the node was completed.[133X
  
  [1X3.2-14 slpforelement[101X
  
  [33X[1;0Y[29X[2Xslpforelement[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YAfter  the  recognition  phase  is  completed  for  the  node  [3Xri[103X, we are by
  definition  able  to write arbitrary elements in the group described by this
  node as a straight line program (SLP) in terms of the nice generators stored
  in  [2XNiceGens[102X  ([14X3.2-8[114X). This attribute value is a function taking the node [3Xri[103X
  and  a  group  element  as  its  arguments and returning the above mentioned
  straight line program. For the case that a find homomorphism method succeeds
  in  finding  a  homomorphism,  the  generic  recursive  function  sets  this
  attribute  to  the  function [2XSLPforElementGeneric[102X ([14X3.3-2[114X) which does the job
  for  the  generic  homomorphism situation. In all other cases the successful
  find  homomorphism  method has to set this attribute to a function doing the
  job.  The  find  homomorphism method is free to store additional data in the
  recognition  node  or  the group object such that the [2XSLPforElement[102X ([14X3.2-15[114X)
  function can work.[133X
  
  [1X3.2-15 SLPforElement[101X
  
  [33X[1;0Y[29X[2XSLPforElement[102X( [3Xri[103X, [3Xx[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya straight line program expressing [3Xx[103X in the nice generators.[133X
  
  [33X[0;0YThis  is  a  wrapper  function  which  extracts  the  value of the attribute
  [2Xslpforelement[102X ([14X3.2-14[114X) and calls that function with the arguments [3Xri[103X and [3Xx[103X.[133X
  
  [1X3.2-16 StdPresentation[101X
  
  [33X[1;0Y[29X[2XStdPresentation[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YAfter  the verification phase, the presentation is stored here. Details have
  still to be decided upon.[133X
  
  [1X3.2-17 methodsforimage[101X
  
  [33X[1;0Y[29X[2Xmethodsforimage[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThis  attribute is initialised at the beginning of the recursive recognition
  function  with  the  database  of find homomorphism methods that was used to
  recognise  the  group corresponding to the recognition node [3Xri[103X. If the found
  homomorphism changes the representation of the group (going for example from
  a  matrix  group  to  a permutation group), the find homomorphism method can
  report  this  by  exchanging the database of find homomorphism methods to be
  used  in  the  recognition  of  the image of the homomorphism by setting the
  value   of   this   attribute   to  something  different.  It  lies  in  the
  responsibility   of   the   find  homomorphism  method  to  do  so,  if  the
  representation changes through the homomorphism.[133X
  
  [1X3.2-18 validatehomominput[101X
  
  [33X[1;0Y[29X[2Xvalidatehomominput[102X( [3Xri[103X, [3Xx[103X ) [32X attribute[133X
  
  [33X[0;0YThe  value  of  this attribute, if there is any, must be a function with two
  arguments:  a  recognition  record  [3Xri[103X,  and an element [3Xx[103X. The function must
  return  a boolean. If it returns [9Xfalse[109X, then this means that [3Xx[103X is not in the
  source  of  the homomorphism returned by [2XHomom[102X ([14X3.2-7[114X). If [9Xtrue[109X is returned,
  then  either  [3Xx[103X  is  in the source of that homomorphism, or passing [3Xx[103X to the
  homomorphism returns [9Xfail[109X.[133X
  
  [33X[0;0YFor example, if [3Xri[103X represents a matrix group that preserves a subspace, then
  the  source  of [2XHomom[102X ([14X3.2-7[114X) will be matrices which preserve that subspace,
  and  passing  matrices  which do not preserve this subspace to [2XHomom[102X ([14X3.2-7[114X)
  may  produce incorrect answers. [2Xvalidatehomominput[102X can be used to filter out
  such  elements.  The  function [2XValidateHomomInput[102X ([14X3.2-19[114X) provides a simple
  wrapper  to  this attribute, which calls [2Xvalidatehomominput[102X unless it is not
  defined, in which case [2XValidateHomomInput[102X ([14X3.2-19[114X) returns [9Xtrue[109X.[133X
  
  [1X3.2-19 ValidateHomomInput[101X
  
  [33X[1;0Y[29X[2XValidateHomomInput[102X( [3Xri[103X, [3Xx[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya boolean.[133X
  
  [33X[0;0YThis  is  a  wrapper  function which calls [2Xvalidatehomominput[102X ([14X3.2-18[114X) of [3Xri[103X
  with [3Xx[103X, or returns [9Xtrue[109X if [3Xri[103X does not define [2Xvalidatehomominput[102X ([14X3.2-18[114X).[133X
  
  [33X[0;0YThe  following  two  attributes  are concerned with the relation between the
  original  generators  and  the  nice generators for a node. They are used to
  transport  this information from a successful find homomorphism method up to
  the recursive recognition function:[133X
  
  [1X3.2-20 calcnicegens[101X
  
  [33X[1;0Y[29X[2Xcalcnicegens[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YTo  make  the  recursion  work,  we  have  to  acquire preimages of the nice
  generators in image groups under the homomorphism found. But we want to keep
  the  information,  how  the  nice generators were found, locally at the node
  where  they  were  found.  This  attribute  solves this problem of acquiring
  preimages  in  the  following  way: Its value must be a function, taking the
  recognition  node  [3Xri[103X as first argument, and a list [3Xoriggens[103X of preimages of
  the original generators of the current node, and has to return corresponding
  preimages of the nice generators. Usually this task can be done by storing a
  straight  line  program writing the nice generators in terms of the original
  generators  and  executing  this with inputs [3Xoriggens[103X. Therefore the default
  value  of  this  attribute  is  the  function  [2XCalcNiceGensGeneric[102X  ([14X3.2-21[114X)
  described below.[133X
  
  [1X3.2-21 CalcNiceGensGeneric[101X
  
  [33X[1;0Y[29X[2XCalcNiceGensGeneric[102X( [3Xri[103X, [3Xoriggens[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya list of preimages of the nice generators[133X
  
  [33X[0;0YThis  is  the default function for leaf nodes for the attribute [2Xcalcnicegens[102X
  ([14X3.2-20[114X)  described  above.  It  does  the  following:  If  the value of the
  attribute [2Xslptonice[102X ([14X3.2-24[114X) is set, then it must be a straight line program
  expressing  the  nice generators in terms of the original generators of this
  node.  In that case, this straight line program is executed with [3Xoriggens[103X as
  inputs  and  the  result is returned. Otherwise, [3Xoriggens[103X is returned as is.
  Therefore  a  leaf  node  just  has to do nothing if the nice generators are
  equal  to  the  original  generators, or can simply store the right straight
  line program into the attribute [2Xslptonice[102X ([14X3.2-24[114X) to fulfill its duties.[133X
  
  [1X3.2-22 CalcNiceGensHomNode[101X
  
  [33X[1;0Y[29X[2XCalcNiceGensHomNode[102X( [3Xri[103X, [3Xoriggens[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya list of preimages of the nice generators[133X
  
  [33X[0;0YThis  is  the  default  function  for  homomorphism  node  for the attribute
  [2Xcalcnicegens[102X  ([14X3.2-20[114X).  It  just  delegates  to  image  and  kernel  of the
  homomorphism, as the nice generators of a homomorphism (or isomorphism) node
  are  just  the  concatenation of the preimages of the nice generators of the
  image  with  the  nice  generators of the kernel. A find homomorphism method
  finding  a  homomorphism  or  isomorphism  does not have to do anything with
  respect to nice generators.[133X
  
  [1X3.2-23 CalcNiceGens[101X
  
  [33X[1;0Y[29X[2XCalcNiceGens[102X( [3Xri[103X, [3Xoriggens[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya list of preimages of the nice generators[133X
  
  [33X[0;0YThis  is  a  wrapper  function  which  extracts  the  value of the attribute
  [2Xcalcnicegens[102X  ([14X3.2-20[114X)  and  calls  that  function with the arguments [3Xri[103X and
  [3Xoriggens[103X.[133X
  
  [1X3.2-24 slptonice[101X
  
  [33X[1;0Y[29X[2Xslptonice[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YAs  described  above,  the  value,  if  set, must be a straight line program
  expressing  the  nice  generators  at  this  node  in  terms of the original
  generators.  This is for leaf nodes, that choose to use the default function
  [2XCalcNiceGensGeneric[102X   ([14X3.2-21[114X)   installed   in  the  [2Xcalcnicegens[102X  ([14X3.2-20[114X)
  attribute.[133X
  
  [33X[0;0YThe  following three attributes are concerned with the administration of the
  kernel of a found homomorphism. Find homomorphism methods use them to report
  to the main recursive recognition function their knowledge about the kernel:[133X
  
  [1X3.2-25 gensN[101X
  
  [33X[1;0Y[29X[2XgensN[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe value of this mutable attribute is a list of generators of the kernel of
  the  homomorphism  found  at the node [3Xri[103X. It is initialised as an empty list
  when the recursive recognition function starts. Successful find homomorphism
  methods  may  append generators of the kernel to this list if they happen to
  stumble   on  them.  After  successful  recognition  of  the  image  of  the
  homomorphism  the  main  recursive recognition function will try to create a
  few  more  generators of the kernel and append them to the list which is the
  value  of  the  attribute [2XgensN[102X. The exact behaviour depends on the value of
  the  attribute  [2XfindgensNmeth[102X  ([14X3.2-26[114X)  below. The list of generators after
  that step is used to recognise the kernel. Note that the generators in [2XgensN[102X
  have  a  memory  attached  to  them,  how they were obtained in terms of the
  original generators of the current node.[133X
  
  [1X3.2-26 findgensNmeth[101X
  
  [33X[1;0Y[29X[2XfindgensNmeth[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThis  attribute  decides  about  how  generators  of  the  kernel of a found
  homomorphism  are  produced.  Its value has to be a record with at least two
  components bound. The first is [10Xmethod[110X which holds a function taking at least
  one  argument [3Xri[103X and possibly more, and does not return anything. The second
  is  [10Xargs[110X  which  holds a list of arguments for the above mentioned function.
  The  real list of arguments is derived by prepending the recognition node to
  the  list  of arguments in [10Xargs[110X. That is, the following code is used to call
  the method:[133X
  
  [4X[32X[104X
    [4X    gensNmeth := findgensNmeth(ri);[104X
    [4X    CallFuncList(gensNmeth.method,Concatenation([ri],gensNmeth.args));[104X
  [4X[32X[104X
  
  [33X[0;0YThe  record  is initialised upon creation of the recognition node to calling
  [2XFindKernelFastNormalClosure[102X  ([14X3.2-29[114X)  with arguments [10X[6, 3][110X (in addition to
  the  first  argument  [3Xri[103X).  See  below  for a choice of possible find kernel
  methods.[133X
  
  [1X3.2-27 FindKernelRandom[101X
  
  [33X[1;0Y[29X[2XFindKernelRandom[102X( [3Xri[103X, [3Xn[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[3Xn[103X random elements are generated, mapped through the homomorphism, written as
  a straight line program in the generators. Then the straight line program is
  executed with the original generators thereby producing elements in the same
  coset.  The  quotients  are then elements of the kernel. The kernel elements
  created  are  stored  in  the attribute [2XgensN[102X ([14X3.2-25[114X). Returns [9Xfalse[109X if the
  generation of the straight line program for some element fails.[133X
  
  [1X3.2-28 FindKernelDoNothing[101X
  
  [33X[1;0Y[29X[2XFindKernelDoNothing[102X( [3Xri[103X, [3Xn1[103X, [3Xn2[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X.[133X
  
  [33X[0;0YDoes  nothing.  This  function is intended to be set as method for producing
  kernel  elements  if the kernel is known to be trivial or if one knows, that
  the  attribute  [2XgensN[102X ([14X3.2-25[114X) already contains a complete set of generators
  for the kernel.[133X
  
  [1X3.2-29 FindKernelFastNormalClosure[101X
  
  [33X[1;0Y[29X[2XFindKernelFastNormalClosure[102X( [3Xri[103X, [3Xn1[103X, [3Xn2[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Y[9Xtrue[109X or [9Xfalse[109X.[133X
  
  [33X[0;0Y[3Xn1[103X  random elements of the kernel are generated by calling FindKernelRandom.
  Then  this function computes a probable generating set of the normal closure
  in [3XG[103X of the group generated by the random elements. The integer [3Xn2[103X indicates
  how  hard  it  should  try.  Returns  [9Xfalse[109X  if the call to [2XFindKernelRandom[102X
  ([14X3.2-27[114X) returns [9Xfalse[109X.[133X
  
  [1X3.2-30 gensNslp[101X
  
  [33X[1;0Y[29X[2XgensNslp[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThe  recursive  recognition function calculates a straight line program that
  computes  the  generators of the kernel stored in [2XgensN[102X ([14X3.2-25[114X) in terms of
  the  generators of the group recognised by [3Xri[103X. This straight line program is
  stored  in  the  value  of this mutable attribute. It is used by the generic
  function [2XSLPforElementGeneric[102X ([14X3.3-2[114X).[133X
  
  [1X3.2-31 immediateverification[101X
  
  [33X[1;0Y[29X[2Ximmediateverification[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YSometimes  a  find homomorphism has information that it will be difficult to
  create generators for the kernel, for example if it is known that the kernel
  will  need  lots of generators. In that case this attribute with the default
  boolean  value [9Xfalse[109X can be set to [9Xtrue[109X. In that case, the generic recursive
  recognition  function will perform an immediate verification phase after the
  kernel  has  been recognised. This is done as follows: A few random elements
  are  created,  mapped  through the homomorphism and written as an SLP in the
  nice  generators  there.  Then  this SLP is executed with preimages of those
  nice  generators.  The quotient lies then in the kernel and is written as an
  SLP  in  terms of the nice generators of the would be kernel. If this is not
  possible,  then  probably the creation of kernel generators was not complete
  and  a  few  more kernel elements are produced and recognition in the kernel
  starts  all  over again. This is for example done in case of the [21XImprimitive[121X
  method  which  maps  onto  the  action  on a block system. In that case, the
  kernel often needs lots of generators.[133X
  
  [33X[0;0YThe  following  attributes  are  used to give a successful find homomorphism
  method   further  possibilities  to  transport  knowledge  about  the  group
  recognised  by  the  current  recognition node to the image or kernel of the
  found homomorphism:[133X
  
  [1X3.2-32 InitialDataForKernelRecogNode[101X
  
  [33X[1;0Y[29X[2XInitialDataForKernelRecogNode[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThis  attribute  is  initialised  to  a record with only the component [10Xhints[110X
  bound  to  an  empty  list  at  the  beginning  of the recursive recognition
  function.  Find  homomorphism  methods  can put acquired knowledge about the
  group  to  be recognised (like for example an invariant subspace of a matrix
  group)  into  this record. When a homomorphism is found and recognition goes
  on  in  its  kernel,  the value of this attribute is taken as initialisation
  data   for  the  newly  created  recognition  node  for  the  kernel.  Thus,
  information  is  transported down to the recognition process for the kernel.
  The  component  [10Xhints[110X  is  special  insofar  as  it  has  to contain records
  describing find homomorphism methods which might be particularly successful.
  They  are  prepended to the find homomorphism method database such that they
  are  called  before  any other methods. This is a means to give hints to the
  recognition  procedure  in the kernel, because often during the finding of a
  homomorphism  knowledge  is acquired which might help the recognition of the
  kernel.[133X
  
  [1X3.2-33 InitialDataForImageRecogNode[101X
  
  [33X[1;0Y[29X[2XInitialDataForImageRecogNode[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThis  attribute  is  initialised  to  a record with only the component [10Xhints[110X
  bound  to  an  empty  list  at  the  beginning  of the recursive recognition
  function.  Find  homomorphism  methods  can put acquired knowledge about the
  group  to  be recognised (like for example an invariant subspace of a matrix
  group)  into  this record. When a homomorphism is found and recognition goes
  on in its image, the value of this attribute is taken as initialisation data
  for  the  newly created recognition node for the image. Thus, information is
  transported  down  to  the  recognition process for the image. The component
  [10Xhints[110X  is  special  insofar  as  it  has  to contain records describing find
  homomorphism  methods  which  might  be  particularly  successful.  They are
  prepended to the find homomorphism method database such that they are called
  before  any  other methods. This is a means to give hints to the recognition
  procedure  in  the image, because often during the finding of a homomorphism
  knowledge is acquired which might help the recognition of the image.[133X
  
  [1X3.2-34 isone[101X
  
  [33X[1;0Y[29X[2Xisone[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThis  attribute  returns a function that tests, whether or not an element of
  the  group  is  equal  to  the  identity  or  not.  Usually this is just the
  operation [2XIsOne[102X ([14XReference: IsOne[114X) but for projective groups it is a special
  function  returning  [9Xtrue[109X  for  scalar matrices. In generic code, one should
  always  use  the  result  of  this  attribute  to  compare an element to the
  identity  such  that  the  code  works  also  for  projective  groups.  Find
  homomorphism methods usually do not have to set this attribute.[133X
  
  [1X3.2-35 isequal[101X
  
  [33X[1;0Y[29X[2Xisequal[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThis  attribute  returns  a function that compares two elements of the group
  being recognised. Usually this is just the operation [2XEQ[102X ([14XReference: equality
  of  records[114X) but for projective groups it is a special function checking for
  equality  up  to a scalar factor. In generic code, one should always use the
  result  of  this  attribute to compare two elements such that the code works
  also for projective groups. Find homomorphism methods usually do not have to
  set this attribute.[133X
  
  [1X3.2-36 OrderFunc[101X
  
  [33X[1;0Y[29X[2XOrderFunc[102X( [3Xri[103X ) [32X attribute[133X
  
  [33X[0;0YThis  attribute  returns a function that computes the order of an element of
  the  group  being  recognised.  Usually  this  is  just  the operation [2XOrder[102X
  ([14XReference:  Order[114X)  but  for projective groups it is a special function. In
  generic  code, one should always use the result of this attribute to compute
  the order of an element such that the code works also for projective groups.
  Find homomorphism methods usually do not have to set this attribute.[133X
  
  
  [1X3.2-37 [33X[0;0YOther components of recognition nodes[133X[101X
  
  [33X[0;0YIn  this  subsection  we describe a few more components of recognition nodes
  that  can  be  queried or set by find homomorphism methods. Not all of these
  components are bound in all cases. See the individual descriptions about the
  conventions. Remember to use the [10X!.[110X notation to access these components of a
  recognition node.[133X
  
  [8X[10XleavegensNuntouched[110X[8X[108X
        [33X[0;6YIf  this component is bound to [9Xtrue[109X by a find homomorphism method or a
        find  kernel  generators  method,  the  generic  mechanism  to  remove
        duplicates and identities in the generator for the kernel is not used.
        This  is  important  if your methods rely on the generating set of the
        kernel being exactly as it was when found.[133X
  
  
  [1X3.3 [33X[0;0YMethods to find homomorphisms[133X[101X
  
  [33X[0;0YA  [21Xfind  homomorphism  method[121X  has the objective to, given a group [22XG[122X, either
  find  a  homomorphism  from [22XG[122X onto a group, or to find an isomorphism, or to
  solve the constructive membership problem directly for [22XG[122X, or to fail.[133X
  
  [33X[0;0YIn  case a homomorphism is found, it has to report that homomorphism back to
  the calling recursive recognition function together with as much information
  about the kernel as possible.[133X
  
  [33X[0;0YIf  a  find  homomorphism  method  determines that the node is a leaf in the
  recognition  tree (by solving the constructive membership problem directly),
  then  it  has  to ensure, that arbitrary elements can be written in terms of
  the  nice  generators of [22XG[122X. It does so by returning a function together with
  possible extra data, that can perform this job.[133X
  
  [33X[0;0YOf  course,  the  find  homomorphism method also has to report, how the nice
  generators were acquired in terms of the original generators.[133X
  
  [33X[0;0YIf  the  find  homomorphism  method  fails, it has to report, whether it has
  failed  forever  or  if  it  possibly makes sense to try to call this method
  again later.[133X
  
  [33X[0;0YFind  homomorphism  methods  have  to  fit  into  the  framework  for method
  selection  described  in  Chapter  [14X4[114X. We now begin to describe the technical
  details  of  how a find homomorphism method has to look like and what it has
  to  do  and  what  it  is  not  allowed  to do. We first explain the calling
  convention by means of a hypothetical function:[133X
  
  [1X3.3-1 FindHomomorphism[101X
  
  [33X[1;0Y[29X[2XFindHomomorphism[102X( [3Xri[103X, [3XG[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YOne  of  the values [9XSuccess[109X, [9XNeverApplicable[109X, [9XTemporaryFailure[109X, or
            [9XNotEnoughInformation[109X.[133X
  
  [33X[0;0YFind  homomorphism  methods  take  two  arguments [3Xri[103X and [3XG[103X, of which [3Xri[103X is a
  recognition node and [3XG[103X is a [5XGAP[105X group object. The return value is one of the
  four  possible  values  in  the  framework for method selection described in
  Chapter [14X4[114X indicating success, failure, or (temporary) non-applicability. The
  above  mentioned  additional information in case of success are all returned
  by  changing  the recognition node [3Xri[103X. For the conventions about what a find
  homomorphism method has to do and return see below.[133X
  
  [33X[0;0YA  failed or not applicable find homomorphism method does not have to report
  or  do  anything  in  the  recognition  node  [3Xri[103X.  However,  it  can collect
  information  and  store  it either in the group object or in the recognition
  node.  Note  that  for  example  it might be that a failed find homomorphism
  method acquires additional information that allows another find homomorphism
  method to become applicable.[133X
  
  [33X[0;0YA  not  applicable  find  homomorphism  method should find out so relatively
  quickly, because otherwise the whole process might be slowed down, because a
  find homomorphism method repeatedly ponders about its applicability. Usually
  no big calculations should be triggered just to decide applicability.[133X
  
  [33X[0;0YA successful find homomorphism method has the following duties:[133X
  
  [8Xfor leaves:[108X
        [33X[0;6YFirst  it  has  to report whether the current node is a leaf or not in
        the recognition tree. That is, in case a leaf was found the method has
        to  do  [10XSetFilterObj(ri,IsLeaf);[110X  thereby  setting  the [2XIsLeaf[102X ([14X3.2-4[114X)
        flag.[133X
  
        [33X[0;6YA  method finding a homomorphism which is not an isomorphism indicates
        so by not touching the flags. [13XFIXME: What does that mean? Which flags?
        The  IsLeaf  filter?  But  then this sounds as if isomorphisms require
        settings some flag.. but which?!? perhaps remove that sentence?[113X[133X
  
  [8Xfor leaves: [2XSLPforElement[102X ([14X3.2-15[114X) function[108X
        [33X[0;6YIf  a  find homomorphism method has produced a leaf in the recognition
        tree,  then  it  has  to set the attribute [2Xslpforelement[102X ([14X3.2-14[114X) to a
        function like [2XSLPforElementGeneric[102X ([14X3.3-2[114X) that can write an arbitrary
        element  in  [3XG[103X as a straight line program in the nice generators of [3XG[103X.
        The  method  may  store  additional data into the recognition node for
        this to work. It does not have to set any other value in [3Xri[103X.[133X
  
  [8Xfor leaves: information about nice generators[108X
        [33X[0;6YIf  a  find homomorphism method has produced a leaf in the recognition
        tree,  then it has to report what are the nice generators of the group
        described  by  the  leaf.  To  this  end,  it has three possibilities:
        Firstly  to  do nothing, which means, that the original generators are
        the  nice  generators.  Secondly  to  store  a  straight  line program
        expressing  the  nice  generators  in terms of the original generators
        into the attribute [2Xslptonice[102X ([14X3.2-24[114X). In that case, the generic frame
        work  takes  care  of  the  rest.  The third possibility is to store a
        function  into  the value of the attribute [2Xcalcnicegens[102X ([14X3.2-20[114X) which
        can  calculate  preimages of the nice generators in terms of preimages
        of  the  original  generators.  See  the  function [2XCalcNiceGensGeneric[102X
        ([14X3.2-21[114X) for an example of such a function.[133X
  
  [8Xfor non-leaves: the homomorphism itself[108X
        [33X[0;6YIf  a  find  homomorphism  method  has found a homomorphism, it has to
        store it as a [5XGAP[105X homomorphism object from [3XG[103X to the image group in the
        attribute  [2XHomom[102X  ([14X3.2-7[114X).  Note that if your homomorphism changes the
        representation  (for  example  going from matrix groups to permutation
        groups),  you  will have to set the attribute [2Xmethodsforimage[102X ([14X3.2-17[114X)
        accordingly.  Also,  [2XValidateHomomInput[102X  ([14X3.2-19[114X)  may  be  set  to  a
        function  which returns [9Xfalse[109X for values which may cause [2XHomom[102X ([14X3.2-7[114X)
        to produce the wrong answer, or error.[133X
  
  [8Xfor non-leaves: kernel generators[108X
        [33X[0;6YIf  a  find  homomorphism  method  has found a homomorphism, it has to
        provide information about already known generators of the kernel. This
        is  done  firstly  by  appending known generators of the kernel to the
        attribute  value of [2XgensN[102X ([14X3.2-25[114X) and secondly by leaving or changing
        the attribute [2XfindgensNmeth[102X ([14X3.2-26[114X) to a record describing the method
        that  should  be used (for details see [2XfindgensNmeth[102X ([14X3.2-26[114X)). If one
        does  not change the default value, the recursive recognition function
        will  generate  20  (FIXME:  is  20 correct?) random elements in [3XG[103X and
        produce  random  generators of the kernel by dividing by a preimage of
        an  image  under  the  homomorphism.  Note  that  generators  in [2XgensN[102X
        ([14X3.2-25[114X)  have to have a memory attached to them that stores, how they
        were acquired from the generators of [3XG[103X.[133X
  
  [8Xadditional information[108X
        [33X[0;6YA  find  homomorphism  method  may  store any data into the attributes
        [2XInitialDataForKernelRecogNode[102X               ([14X3.2-32[114X)               and
        [2XInitialDataForImageRecogNode[102X   ([14X3.2-33[114X),   which   both  are  records.
        Components  in these record that are bound during the recognition will
        be   copied  into  the  recognition  node  of  the  kernel  and  image
        respectively  of  a  found  homomorphism  upon  creation  and thus are
        available  to  all find homomorphism methods called for the kernel and
        image. This feature might be interesting to transport information that
        is  relevant  for  the  recognition  of  the  kernel  or image and was
        acquired during the recognition of [3XG[103X itself.[133X
  
        [33X[0;6YA  special  role is played by the component [10Xhints[110X in both of the above
        records, which can hold a list of records describing find homomorphism
        methods  that  shall  be  tried  first  when recognising the kernel or
        image.[133X
  
        [33X[0;6YIn  addition,  a  find  homomorphism  method  might  set the attribute
        [2Ximmediateverification[102X ([14X3.2-31[114X) to [9Xtrue[109X, if it considers the problem of
        finding kernel generators particularly difficult.[133X
  
  [33X[0;0YTo  explain the calling conventions for [2XSLPforElement[102X ([14X3.2-15[114X) functions and
  for    the    sake   of   completeness   we   present   now   the   function
  [2XSLPforElementGeneric[102X  ([14X3.3-2[114X)  which  is used for the case of a [21Xhomomorphism
  node[121X:[133X
  
  [1X3.3-2 SLPforElementGeneric[101X
  
  [33X[1;0Y[29X[2XSLPforElementGeneric[102X( [3Xri[103X, [3Xx[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10YA [5XGAP[105X straight line program.[133X
  
  [33X[0;0YThis  function  takes as arguments a recognition node [3Xri[103X and a group element
  [3Xx[103X.  It  returns  a [5XGAP[105X straight line program that expresses the element [3Xx[103X in
  terms of the nice generators of the group [22XG[122X recognised by [3Xri[103X.[133X
  
  [33X[0;0YThis  generic  function here does exactly this job for the generic situation
  that we found a homomorphism from [22XG[122X to some other group say [22XH[122X with kernel [22XN[122X.
  It  first  maps  [3Xx[103X  via  the  homomorphism  to  [22XH[122X  and  uses the recognition
  information  there  to  write  it as a straight line program in terms of the
  nice  generators  of  [22XH[122X.  Then  it applies this straight line program to the
  preimages  of those nice generators (see [2Xpregensfac[102X ([14X3.2-9[114X)) thereby finding
  an element [22Xy[122X of [22XG[122X with [22Xx ⋅ y^-1[122X lying in the kernel [22XN[122X.[133X
  
  [33X[0;0YThen the function writes this element as a straight line program in the nice
  generators  of [22XN[122X again using the recursively acquired recognition info about
  [22XN[122X.  In the end a concatenated straight line program for [22Xx[122X is built, which is
  in terms of the nice generators of the current node.[133X
  
