  
  [1X4 Backtrack search methods[0X
  
  This  chapter  describes  the  methods  for  backtrack  search  in the [5Xgenss[0m
  package.  Note  that  the  code  in  this area is not yet very stable and is
  almost  certainly  going  to  change in subsequent versions of this package.
  This might also concern the interfaces and calling conventions.
  
  
  [1X4.1 Setwise stabilisers[0X
  
  [1X4.1-1 SetwiseStabilizer[0m
  
  [2X> SetwiseStabilizer( [0X[3XG, op, M[0X[2X ) ___________________________________[0Xoperation
  [6XReturns:[0X  a record
  
  This  operation computes the setwise stabiliser of the set [3XM[0m. So [3XG[0m must be a
  group  acting on some set Omega, this action is given by the action function
  [3Xop[0m.  The  set  [3XM[0m must consist of elements Omega. The result is a record with
  the  components [10Xsetstab[0m containing the setwise stabiliser and [10XS[0m containing a
  stabiliser chain for it.
  
  This operation uses backtrack search in a specially crafted stabiliser chain
  for  [3XG[0m  doing  not  much  intelligent  pruning of the search tree, so expect
  possible long delays!
  
  [1X4.1-2 SetwiseStabilizerPartitionBacktrack[0m
  
  [2X> SetwiseStabilizerPartitionBacktrack( [0X[3XG, op, M[0X[2X ) _________________[0Xoperation
  [6XReturns:[0X  a record
  
  This  operation computes the setwise stabiliser of the set [3XM[0m. So [3XG[0m must be a
  group  acting on some set Omega, this action is given by the action function
  [3Xop[0m.  The  set  [3XM[0m must consist of elements Omega. The result is a record with
  the  components [10Xsetstab[0m containing the setwise stabiliser and [10XS[0m containing a
  stabiliser chain for it.
  
  This operation uses backtrack search in a specially crafted stabiliser chain
  for [3XG[0m. It does some ideas coming from partition backtrack but does not (yet)
  implement  a  full  featured partition backtrack, so expect possible longish
  delays!
  
  
  [1X4.2 Generic backtrack search[0X
  
  [1X4.2-1 BacktrackSearchStabilizerChainElement[0m
  
  [2X> BacktrackSearchStabilizerChainElement( [0X[3XS, P, g, pruner[0X[2X ) ________[0Xoperation
  [6XReturns:[0X  [9Xfail[0m or a group element
  
  Let  G be the group described by the stabiliser chain [3XS[0m. The group element [3Xg[0m
  must  be  some  element  in  an overgroup hat Gof G such that the function [3XP[0m
  described below is defined on the whole of hat G
  
  This operation implements a generic backtrack search in the coset G[3Xg[0m looking
  for  an  element x in G such that [3XP[0m(x[3Xg[0m) is [9Xtrue[0m where [3XP[0m is a function on hat
  Gtaking  values [9Xtrue[0m and [9Xfalse[0m. The operation returns the group element x if
  one is found or [9Xfail[0m if none was found.
  
  The search tree is given by the stabiliser chain, each node corresponds to a
  right coset of one of the stabilisers in the chain. The leaves correspond to
  right cosets of the identity group, i.e. to group elements in G[3Xg[0m
  
  To  make this backtrack search efficient some pruning of the search tree has
  to be done. To this end there is the fourth argument [3Xpruner[0m which can either
  be  [9Xfalse[0m (in which case no pruning at all happens) or a [5XGAP[0m function taking
  5  arguments  and  returning  either  [9Xtrue[0m  or [9Xfalse[0m. The function [3Xpruner[0m is
  called  for  every  node  in  the  search  tree  before the backtrack search
  descents  into  the  subtrees.  If  the  [3Xpruner[0m  function returns [9Xfalse[0m, the
  complete  subtree  starting  at  the  current  node is pruned and no further
  search  is  performed  there.  If the result is [9Xtrue[0m (or [3Xpruner[0m was equal to
  [9Xfalse[0m  altogether) then the subtree starting at the current node is searched
  recursively.  Obviously,  the  [3Xpruner[0m  function  needs  to  know the current
  position in the search tree, which it is told by its arguments.
  
  Each  node  in  the search tree corresponds to a coset of some stabiliser of
  the stabiliser chain in its previous one. To set up some notation, let $ G =
  S_0 > S_1 > S_2 > \cdots > S_m > S_{{m+1}} = \{1\} $ be the stabiliser chain
  and  let  $  O_1,  O_2, \ldots, O_m $ be the basic orbits. Then for the node
  corresponding  to the coset S_i t[3Xg[0m for i ge 1 and some transversal element t
  contained  in S_{i-1} the arguments with which the [3Xpruner[0m function is called
  are  the  following:  The  first  argument  is  the  stabiliser chain object
  corresponding to S_{i-1}. The second argument is the index of the element in
  O_i  corresponding  to  the transversal element t. The third argument is the
  group  element t[3Xg[0m and the fourth argument is equal to the actual transversal
  element  t. The fifth argument is a word in the generators used to enumerate
  O_i  expressing  t,  the  word  comes  as  a  list of integers which are the
  generator numbers.
  
  [1X4.2-2 BacktrackSearchStabilizerChainSubgroup[0m
  
  [2X> BacktrackSearchStabilizerChainSubgroup( [0X[3XS, P, pruner[0X[2X ) __________[0Xoperation
  [6XReturns:[0X  [9Xfail[0m or a stabiliser chain
  
  Let  G  be  the  group  described  by the stabiliser chain [3XS[0m. This operation
  implements  a generic backtrack search in the stabiliser chain [3XS[0m looking for
  the  subgroup  H  of  the group G described by [3XS[0m of all elements x for which
  [3XP[0m(x)  is  [9Xtrue[0m, where [3XP[0m is a function on G taking values [9Xtrue[0m or [9Xfalse[0m. Note
  that  of  course [3XP[0m must be such that H is actually a subgroup! The operation
  returns a stabiliser chain describing the group H.
  
  The search tree is given by the stabiliser chain, each node corresponds to a
  right coset of one of the stabilisers in the chain. The leaves correspond to
  right cosets of the identity group, i.e. to group elements in G
  
  To  make this backtrack search efficient some pruning of the search tree has
  to be done. To this end there is the fourth argument [3Xpruner[0m which can either
  be  [9Xfalse[0m (in which case no pruning at all happens) or a [5XGAP[0m function taking
  5  arguments  and  returning  either  [9Xtrue[0m  or [9Xfalse[0m. The function [3Xpruner[0m is
  called  for  every  node  in  the  search  tree  before the backtrack search
  descents  into  the  subtrees.  If  the  [3Xpruner[0m  function returns [9Xfalse[0m, the
  complete  subtree  starting  at  the  current  node is pruned and no further
  search  is  performed  there.  If the result is [9Xtrue[0m (or [3Xpruner[0m was equal to
  [9Xfalse[0m  altogether) then the subtree starting at the current node is searched
  recursively.  Obviously,  the  [3Xpruner[0m  function  needs  to  know the current
  position in the search tree, which it is told by its arguments.
  
  Each  node  in  the search tree corresponds to a coset of some stabiliser of
  the stabiliser chain in its previous one. To set up some notation, let $ G =
  S_0 > S_1 > S_2 > \cdots > S_m > S_{{m+1}} = \{1\} $ be the stabiliser chain
  and  let  $  O_1,  O_2, \ldots, O_m $ be the basic orbits. Then for the node
  corresponding  to the coset S_i t[3Xg[0m for i ge 1 and some transversal element t
  contained  in S_{i-1} the arguments with which the [3Xpruner[0m function is called
  are  the  following:  The  first  argument  is  the  stabiliser chain object
  corresponding to S_{i-1}. The second argument is the index of the element in
  O_i  corresponding  to  the  transversal  element  t.  The  third and fourth
  arguments are the transversal element t. The fifth argument is a word in the
  generators  used  to enumerate O_i expressing t, the word comes as a list of
  integers which are the generator numbers.
  
