Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 5e1854624d3bc613bdd0dd13d1ef9ac7 > files > 34

gap-system-4.4.12-5mdv2010.0.i586.rpm

<html><head><title>[ext] 8 Stabilizer Chains</title></head>
<body text="#000000" bgcolor="#ffffff">
[<a href="../index.htm">Top</a>] [<a href = "chapters.htm">Up</a>] [<a href ="CHAP007.htm">Previous</a>] [<a href = "theindex.htm">Index</a>]
<h1>8 Stabilizer Chains</h1><p>
<P>
<H3>Sections</H3>
<oL>
<li> <A HREF="CHAP008.htm#SECT001">Generalized Conjugation Technique</a>
<li> <A HREF="CHAP008.htm#SECT002">The General Backtrack Algorithm with Ordered Partitions</a>
<li> <A HREF="CHAP008.htm#SECT003">Stabilizer Chains for Automorphisms Acting on Enumerators</a>
</ol><p>
<p>
This  chapter contains some rather  technical complements to the material
handled in the chapters&nbsp;<a href="../ref/CHAP040.htm">Permutations</a> and <a href="../ref/CHAP041.htm">Permutation Groups</a> of
the reference manual.
<p>
<p>
<h2><a name="SECT001">8.1 Generalized Conjugation Technique</a></h2>
<p><p>
The command <code>ConjugateGroup( </code><var>G</var><code>, </code><var>p</var><code> )</code> (see&nbsp;<a href="../ref/CHAP037.htm#SSEC002.5">ConjugateGroup</a> in the
reference manual) for a  permutation  group  <var>G</var>  with  stabilizer  chain
equips its result also with a stabilizer chain, namely with the chain  of
<var>G</var> conjugate by <var>p</var>. Conjugating a stabilizer chain by a permutation <var>p</var>
means replacing all the points which appear in the <code>orbit</code> components  by
their images under <var>p</var> and replacing every permutation <var>g</var> which  appears
in a <code>labels</code> or <code>transversal</code> component  by  its  conjugate  <i>g</i><sup><i>p</i></sup>.  The
conjugate <i>g</i><sup><i>p</i></sup> acts on the mapped points  exactly  as  <var>g</var>  did  on  the
original points, i.e., (<i>pnt</i>&#183;<i>p</i>)&#183;<i>g</i><sup><i>p</i></sup> = (<i>pnt</i>&#183;<i>g</i>)&#183;<i>p</i>. Since the  entries  in
the <code>translabels</code> components are integers pointing to  positions  of  the
<code>labels</code> list, the <code>translabels</code> lists just have to be  permuted  by  <var>p</var>
for the conjugated stabilizer.  Then  <code>generators</code>  is  reconstructed  as
<code>labels{  genlabels  }</code>  and  <code>transversal{  orbit  }</code>  as  <code>labels{
translabels{ orbit } }</code>.
<p>
<a name = "I0"></a>

This conjugation technique can be generalized. Instead of mapping  points
and  permutations  under  the  same  permutation  <var>p</var>,  it  is  sometimes
desirable (e.g., in the context of permutation  group  homomorphisms)  to
map the points with an arbitrary mapping <var>map</var> and the permutations  with
a homomorphism <var>hom</var> such that the compatibility of the actions is  still
valid:   <i>map</i>(<i>pnt</i>)&#183;<i>hom</i>(<i>g</i>) = <i>map</i>(<i>pnt</i>&#183;<i>g</i>).   (Of   course    the   ordinary
conjugation is a special case  of  this,  with   <i>map</i>(<i>pnt</i>) = <i>pnt</i>&#183;<i>p</i>   and
<i>hom</i>(<i>g</i>) = <i>g</i><sup><i>p</i></sup>.)
<p>
In  the  generalized  case,  the  ``conjugated''  chain  need  not  be  a
stabilizer chain for the image of <var>hom</var>, since the  ``preimage''  of  the
stabilizer of <i>map</i>(<i>b</i>) (where <var>b</var> is a base point) need not fix <var>b</var>,  but
only fixes the preimage <i>map</i><sup>&#8722;1</sup>(<i>map</i>(<i>b</i>)) setwise. Therefore the  method
can be applied only to one level and the next stabilizer must be computed
explicitly. But if <var>map</var> is injective, we have <i>map</i>(<i>b</i>)&#183;<i>hom</i>(<i>g</i>)=<i>map</i>(<i>b</i>) &#8660; <i>b</i>&#183;<i>g</i>=<i>b</i>, and if this holds, then <i>g</i>=<i>w</i>(<i>g</i><sub>1</sub>,&#8230;,<i>g</i><sub><i>n</i></sub>) is a  word  in  the
generators <i>g</i><sub>1</sub>,&#8230;,<i>g</i><sub><i>n</i></sub> of the stabilizer of&nbsp;<var>b</var> and
<i>hom</i>(<i>g</i>) = <sup>*</sup> <i>w</i>(<i>hom</i>(<i>g</i><sub>1</sub>),&#8230;,<i>hom</i>(<i>g</i><sub><i>n</i></sub>))    is    in    the
``conjugated'' stabilizer. If, more generally, <var>hom</var> is a  right  inverse
to  a  homomorphism&nbsp;&#981;  (i.e.,  &#981;(<i>hom</i>(<i>g</i>))=<i>g</i>&nbsp;&#8704;<i>g</i>),
equality * holds modulo <span class="roman">Ker</span>&nbsp;&#981;; in this  case  the
``conjugated'' chain  can  be  made  into  a  real  stabilizer  chain  by
extending  each  level  with  the  generators  <span class="roman">Ker</span>&nbsp;&#981;  and
appending a proper stabilizer chain of&nbsp;<span class="roman">Ker</span>&nbsp;&#981; at  the  end.
These special cases will occur in the algorithms  for  permutation  group
homomorphisms (see&nbsp;<a href="../ref/CHAP038.htm">Group Homomorphisms</a> in the reference manual).
<p>
To ``conjugate'' the  points  (i.e.,  <code>orbit</code>)  and  permutations  (i.e.,
<code>labels</code>) of the Schreier tree, a loop is set up over  the  <code>orbit</code>  list
constructed during the orbit algorithm, and  for  each  vertex  <var>b</var>  with
unique edge <i>a</i>(<i>l</i>)<i>b</i> ending at <var>b</var>, the label <var>l</var> is mapped with <var>hom</var> and
<var>b</var> with <var>map</var>. We assume  that  the  <code>orbit</code>  list  was  built  w.r.t.&nbsp;a
certain ordering of the labels, where <i>l</i>&#8242; &lt; <i>l</i> means that every  point  in
the orbit was mapped with <i>l</i>&#8242; before it was mapped with <var>l</var>. This  shape
of the <code>orbit</code> list is guaranteed if the Schreier tree is  extended  only
by <code>AddGeneratorsExtendSchreierTree</code>, and it is then also guaranteed  for
the ``conjugated'' Schreier tree. (The ordering of the labels  cannot  be
read from the Schreier tree, however.)
<p>
In the generalized case, it can happen that  the  edge  <i>a</i>(<i>l</i>)<i>b</i>  bears  a
label <var>l</var> whose image is ``old'', i.e., equal to the image of an  earlier
label <i>l</i>&#8242; &lt; <i>l</i>. Because of the compatibility of the actions we  then  have
<i>map</i>(<i>b</i>) = <i>map</i>(<i>a</i>)&#183;<i>hom</i>(<i>l</i>)<sup>&#8722;1</sup> = <i>map</i>(<i>a</i>)&#183;<i>hom</i>(<i>l</i>&#8242;)<sup>&#8722;1</sup> = <i>map</i>(<i>a</i><i>l</i>&#8242;<sup>&#8722;1</sup>),
so <i>map</i>(<i>b</i>) is already equal to the image  of  the  vertex  <i>a</i><i>l</i>&#8242;<sup>&#8722;1</sup>.
This vertex must have been  encountered  before  <i>b</i> = <i>al</i><sup>&#8722;1</sup>  because
<i>l</i>&#8242; &lt; <i>l</i>. We conclude that the image of a label can be ``old'' only if the
vertex at the end of the corresponding edge has an  ``old''  image,  too,
but then it need not be ``conjugated'' at all. A similar  remark  applies
to labels which map under <var>hom</var> to the identity.
<p>
<p>
<h2><a name="SECT002">8.2 The General Backtrack Algorithm with Ordered Partitions</a></h2>
<p><p>
Section <a href="../ref/CHAP041.htm#SECT011">Backtrack</a> in the reference manual describes the basic
functions for a backtrack search. The purpose of
this section  is  to document  how  the general   backtrack algorithm  is
implemented in <font face="Gill Sans,Helvetica,Arial">GAP</font> and which  parts you have to modify  if you want to
write your own backtrack routines.
<p>
<p>
<a name = "I1"></a>

<hr>Internal   representation  of  ordered   partitions.&nbsp;<font face="Gill Sans,Helvetica,Arial">GAP</font>
represents  an  ordered  partition  as  a  record  with   the   following
components.
<p>
<dl compact>
<dt><code>points</code> <dd>
        a list  of all points contained in  the  partition, such that the
        points of each cell from lie consecutively,
<p>
<dt><code>cellno</code> <dd>
        a list whose <var>i</var>th entry is the number of the cell which contains
        the point <var>i</var>,
<p>
<dt><code>firsts</code> <dd>
        a list  such that  <code>points[firsts[</code><var>j</var><code>]]</code>  is  the first point  in
        <code>points</code> which is in cell <var>j</var>,
<p>
<dt><code>lengths</code> <dd>
        a list of the  cell lengths.
</dl>
Some of the information is  redundant, e.g., the  <code>lengths</code> could also be
read off the <code>firsts</code> list,  but since this   need not be increasing,  it
would    require some searching. Similar  for    <code>cellno</code>, which could be
replaced by a systematic search  of <code>points</code>, keeping  track of what cell
is currently being  traversed. With the above  components, the <var>m</var>th cell
of   a partition <var>P</var> is   expressed as <code></code><var>P</var><code>.points  [ </code><var>P</var><code>.firsts[</code><var>m</var><code>] ..
</code><var>P</var><code>.firsts[</code><var>m</var><code>] +  </code><var>P</var><code>.lengths[</code><var>m</var><code>]  -  1  ]   </code>. The   most   important
operations, however, to be performed upon <var>P</var> are the splitting of a cell
and the reuniting  of the two parts. Following  the strategy  of J.&nbsp;Leon,
this is done as follows:
<p>
<ol>
<p>
<li>
The points which make up the cell that is to be split are sorted so  that
the ones that remain inside occupy positions <code>[ </code><var>P</var><code>.firsts[</code><var>m</var><code>] .. </code><var>last</var><code>
]</code> in the list <code></code><var>P</var><code>.points</code> (for a suitable value of <var>last</var>).
<p>
<li>
The  points  at  positions  <code>[  </code><var>last</var><code>   +   1   ..   </code><var>P</var><code>.firsts[</code><var>m</var><code>]   +
</code><var>P</var><code>.lengths[</code><var>m</var><code>] - 1 ]</code> will form the additional cell. For this new  cell
requires additional entries are added to the lists <code></code><var>P</var><code>.firsts</code>  (namely,
<code></code><var>last</var><code>+1</code>)    and    <code></code><var>P</var><code>.lengths</code>    (namely,    <code></code><var>P</var><code>.firsts[</code><var>m</var><code>]     +
</code><var>P</var><code>.lengths[</code><var>m</var><code>] - </code><var>last</var><code> - 1</code>).
<p>
<li>
The entries of the sublist <code></code><var>P</var><code>.cellno [ </code><var>last</var><code>+1 ..  </code><var>P</var><code>.firsts[</code><var>m</var><code>]  +
P.lengths[</code><var>m</var><code>]-1 ] </code> must be set to the number of the new cell.
<p>
<li>
The entry <code></code><var>P</var><code>.lengths[</code><var>m</var><code>]</code> must be reduced to <code></code><var>last</var><code> - </code><var>P</var><code>.firsts[</code><var>m</var><code>]
+ 1</code>.
<p>
</ol>
<p>
Then reuniting the  two cells requires  only the reversal of steps&nbsp;2 to&nbsp;4
above. The list <code></code><var>P</var><code>.points</code> need not be rearranged.
<p>
<p>
<hr>Functions for setting up  an R-base.&nbsp;This subsection explains
some  <font face="Gill Sans,Helvetica,Arial">GAP</font>  functions   which   are   local   to   the   library   file
<code>lib/stbcbckt.gi</code> which contains the code for backtracking in permutation
groups. They are mentioned here because you might find them helpful  when
you want  to  implement  you  own  backtracking  function  based  on  the
partition concept. An important argument to most of the functions is  the
R-base &#8476;, which you should regard as a black box. We will tell you how
to set it up, how to maintain it and where to pass it as argument, but it
is not necessary for you to know its internal representation. However, if
you insist to learn the whole story: Here are the record components  from
which an R-base is made up:
<p>
<p>
<dl compact>
<dt><code>domain</code> <dd>
    the set &#8486; on which the group <i>G</i> operates
<p>
<dt><code>base</code> <dd>
    the sequence (<i>a</i><sub>1</sub>,&#8230;,<i>a</i><sub><i>r</i></sub>) of base points
<p>
<dt><code>partition</code> <dd>
    an  ordered  partition, initially  &#928;<sub>0</sub>, this  will be  refined to
    &#928;<sub>1</sub>,&#8230;,&#928;<sub><i>r</i></sub> during the backtrack algorithm
<p>
<dt><code>where</code> <dd>
    a list such that <i>a</i><sub><i>i</i></sub> lies in cell number <code>where[ <i>i</i> ]</code> of &#928;<sub><i>i</i></sub>
<p>
<dt><code>rfm</code> <dd>
    a    list whose <i>i</i>th entry  is   a  list of   refinements which take
    &#931;<sub><i>i</i></sub>  to &#931;<sub><i>i</i>+1</sub>;  the    structure of a  refinement  is
    described below
<p>
<dt><code>chain</code> <dd>
    a (copy of a) stabilizer  chain for <i>G</i> (not  if  <i>G</i> is a  symmetric
    group)
<p>
<dt><code>fix</code> <dd>
    only if  <i>G</i> is a  symmetric group:  a list whose  <i>i</i> entry contains
    <code>Fixcells( &#928;<sub><i>i</i></sub> )</code>
<p>
<dt><code>level</code> <dd>
    initially equal to <code>chain</code>,  this will be changed  to chains  for the
    stabilizers  <i>G</i><sub><i>a</i><sub>1</sub>... <i>a</i><sub><i>i</i></sub></sub>    for  <i>i</i>=1,&#8230;,<i>r</i>  during   the
    backtrack algorithm; if <i>G</i> is a  symmetric group, only the number of
    moved points is stored for each stabilizer
<p>
<dt><code>lev</code> <dd>
    a  list   whose  <i>i</i>th  entry   remembers   the  <code>level</code> entry    for
    <i>G</i><sub><i>a</i><sub>1</sub>&#8230;<i>a</i><sub><i>i</i>&#8722;1</sub></sub>
<p>
<dt><code>level2</code>, <code>lev2</code> <dd>
    a similar  construction   for a second  group  (used  in intersection
    calculations), <code>false</code> otherwise.  This second group <i>H</i> activated if
    the R-base  is constructed as  <code>EmptyRBase(  [ <i>G</i>, <i>H</i>  ], &#8486;,
    &#928;<sub>0</sub> )</code> (if <code><i>G</i> = <i>H</i></code>, <font face="Gill Sans,Helvetica,Arial">GAP</font> sets <code>level2 = true</code> instead).
<p>
<dt><code>nextLevel</code> <dd>
    this is described below
</dl>
<p>
As  our guiding example, we  present  code for the function <code>Centralizer</code>
which calculates the centralizer of an element <i>g</i> in the group <i>G</i>. (The
real code is more general and has a few more subtleties.)
<p>
<code>1 &#928;<sub>0</sub> := TrivialPartition( &#8486; );</code>
<br><code>2 &#8476; := EmptyRBase( <i>G</i>, &#8486;, &#928;<sub>0</sub> );</code>
<br><code>3 &#8476;.nextLevel := function( &#928;, </code><var>rbase</var><code> )</code>
<br><code>4 local  <i>fix</i>,  <i>p</i>,  <i>q</i>,  <i>where</i>;</code>
<br><code>5 &nbsp;NextRBasePoint( &#928;, </code><var>rbase</var><code> );</code>
<br><code>6 &nbsp;<i>fix</i> := Fixcells( &#928; );</code>
<br><code>7 &nbsp;for <i>p</i>  in <i>fix</i>  do</code>
<br><code>8 &nbsp;&nbsp;<i>q</i> := <i>p</i> ^ <i>g</i>;</code>
<br><code>9 &nbsp;&nbsp;<i>where</i> := IsolatePoint( &#928;, <i>q</i> );</code>
<br><code>10 &nbsp;&nbsp;if <i>where</i> &lt;&gt; false  then</code>
<br><code>12 &nbsp;&nbsp;&nbsp;Add( <i>fix</i>, <i>q</i> );</code>
<br><code>13 &nbsp;&nbsp;&nbsp;ProcessFixpoint( &#8476;, <i>q</i> );</code>
<br><code>14 &nbsp;&nbsp;&nbsp;AddRefinement( &#8476;, "Centralizer", [ &#928;.cellno[ <i>p</i> ], <i>q</i>, <i>where</i> ] );</code>
<br><code>15 &nbsp;&nbsp;&nbsp;if &#928;.lengths[ <i>where</i> ] = 1  then</code>
<br><code>16 &nbsp;&nbsp;&nbsp;&nbsp;<i>p</i> := FixpointCellNo( &#928;, <i>where</i> );</code>
<br><code>17 &nbsp;&nbsp;&nbsp;&nbsp;ProcessFixpoint( &#8476;, <i>p</i> );</code>
<br><code>18 &nbsp;&nbsp;&nbsp;&nbsp;AddRefinement( &#8476;, "ProcessFixpoint", [ <i>p</i>, <i>where</i> ] );</code>
<br><code>19 &nbsp;&nbsp;&nbsp;fi;</code>
<br><code>20 &nbsp;&nbsp;fi;</code>
<br><code>21 &nbsp;od;</code>
<br><code>22 end;</code>
<br><code>23 return PartitionBacktrack(</code>
<br><code>24 &nbsp;&nbsp;<i>G</i>,</code>
<br><code>25 &nbsp;&nbsp;<i>c</i> -&gt; <i>g</i> ^ <i>c</i> = <i>g</i>,</code>
<br><code>26 &nbsp;&nbsp;false,</code>
<br><code>27 &nbsp;&nbsp;&#8476;,</code>
<br><code>28 &nbsp;&nbsp;[ &#928;<sub>0</sub>, <i>g</i> ],</code>
<br><code>29 &nbsp;&nbsp;<i>L</i>, <i>R</i> );</code>
<p>
The list numbers below refer to the line numbers of the code above.
<p>
<ol>
<p>
<li>
&#8486; is the set on which <i>G</i> acts and &#928;<sub>0</sub> is the first member  of
the decreasing sequence of partitions mentioned in <a href="../ref/CHAP041.htm#SECT011">Backtrack</a> in the
reference manual.  We  set  &#928;<sub>0</sub>=(&#8486;),  which  is  constructed  as
<code>TrivialPartition( &#8486; )</code>), but we could have started with  a  finer
partition, e.g., into unions of <i>g</i>-cycles of the same length.
<p>
<li>
This statement sets up the R-base in the variable &#8476;.
<p>
<li> -- 21.
&nbsp;These lines define a function <code>&#8476;.nextLevel</code> which  is  called
whenever an additional member in the sequence &#928;<sub>0</sub>  &#8805; &#928;<sub>1</sub>  &#8805; &#8230;
of partitions is needed. If &#928;<sub><i>i</i></sub> does  not  yet  contain  enough  base
points in one-point cells, <font face="Gill Sans,Helvetica,Arial">GAP</font>  will  call  <code>&#8476;.nextLevel(  &#928;<sub><i>i</i></sub>,
&#8476; )</code>, and this function will choose a new base point <i>a</i><sub><i>i</i>+1</sub>, refine
&#928;<sub><i>i</i></sub> to &#928;<sub><i>i</i>+1</sub> (thereby <strong>changing</strong> the first argument) and  store
all necessary information in&nbsp;&#8476;.
<p>
</ol>
<ol type=1 start=5>
<p>
<li>
This statement selects a new base point <i>a</i><sub><i>i</i>+1</sub>, which is not yet in  a
one-point cell of &#928; and still moved by the  stabilizer  <i>G</i><sub><i>a</i><sub>1</sub>&#8230;<i>a</i><sub><i>i</i></sub></sub> of the earlier base points. If certain points  of  &#8486;  should
are preferred as base point (e.g., because they belong to long cycles  of
<i>g</i>), a list of points starting with the most wanted ones, can  be  given
as an optional third argument to <code>NextRBasePoint</code> (actually, this is done
in the real code for <code>Centralizer</code>).
<p>
<li>
<code>Fixcells( &#928; )</code> returns the list of  points  in  one-point  cells  of
&#928; (ordered as the cells are ordered in &#928;).
<p>
<li>
For every point <i>p</i> &#8712; <i>fix</i>, if we know the image <code><i>p</i> ^ <i>g</i></code> under  <i>c</i> &#8712; <i>C</i><sub><i>G</i></sub>(<i>e</i>), we also know <code>( <i>p</i> ^ <i>g</i> ) ^ <i>c</i> = ( <i>p</i> ^ <i>c</i>  )  ^  <i>g</i></code>.  We
therefore want to isolate these extra points in &#928;.
<p>
</ol>
<ol type=1 start=9>
<p>
<li>
This statement puts point <i>q</i> in a cell of its own, returning in  <i>where</i>
the number of the cell of &#928; from which <i>q</i>  was  taken.  If  <i>q</i>  was
already the only point in its cell, <code><i>where</i> = false</code> instead.
<p>
</ol>
<ol type=1 start=12>
<p>
<li>
This command does the necessary bookkeeping for the extra base point <i>q</i>:
It prescribes <i>q</i> as next base in the stabilizer chain for  <i>G</i>  (needed,
e.g., in line&nbsp;5) and  returns  <code>false</code>  if  <i>q</i>  was  already  fixed  the
stabilizer of the earlier base points (and <code>true</code> otherwise; this is  not
used here). Another call to <code>ProcessFixpoint</code> like  this  was  implicitly
made by the function <code>NextRBasePoint</code> to register the chosen base  point.
By contrast, the point <i>q</i> was not chosen this way, so  <code>ProcessFixpoint</code>
must be called explicitly for&nbsp;<i>q</i>.
<p>
<li>
This statement registers the function  which  will  be  used  during  the
backtrack search to perform the corresponding refinements on the  ``image
partition'' &#931;<sub><i>i</i></sub>  (to  yield  the  refined  &#931;<sub><i>i</i>+1</sub>).  After
choosing an image <i>b</i><sub><i>i</i>+1</sub> for the base  point  <i>a</i><sub><i>i</i>+1</sub>,  <font face="Gill Sans,Helvetica,Arial">GAP</font>  will
compute &#931;<sub><i>i</i></sub> &#8743;({<i>b</i><sub><i>i</i>+1</sub>},&#8486;&#8722;{<i>b</i><sub><i>i</i>+1</sub>}) and store this
partition in <code>&#8465;.partition</code>, where &#8465; is a black box similar to &#8476;,
but corresponding to the current ``image  partition''  (hence  it  is  an
``R-image'' in analogy to the R-base). Then <font face="Gill Sans,Helvetica,Arial">GAP</font> will call the function
<code>Refinements.Centralizer( &#8476;, &#8465;, &#928;.cellno[ <i>p</i> ],  <i>p</i>,  <i>where</i>
)</code>,  with  the  then  current  values  of  &#8476;  and  &#8465;,   but   where
<code>&#928;.cellno[ <i>p</i> ]</code>, <i>p</i>, <i>where</i> still have the values  they  have  at
the time of this <code>AddRefinement</code> command. This function call will further
refine <code>&#8465;.partition</code> to yield &#931;<sub><i>i</i>+1</sub> as it  is  programmed  in
the function <code>Refinements.Centralizer</code>, which is  described  below.  (The
global variable <code>Refinements</code> is a record which contains  all  refinement
functions for all backtracking procedures.)
<p>
<li> -- 19.
If the cell from which <i>q</i> was taken out had only two points, we now have
an additional one-point cell. This condition is checked in line&nbsp;13 and if
it is true, this extra fixpoint <i>p</i> is taken  (line&nbsp;15),  processed  like
<i>q</i> before (line&nbsp;16) and is then (line&nbsp;17) passed to  another  refinement
function <code>Refinements.ProcessFixpoint( &#8476;, &#8465;, <i>p</i>, <i>where</i> )</code>, which
is also described below.
<p>
</ol>
<ol type=1 start=22>
<p>
<li> -- 29.
This command  starts  the  backtrack  search.  Its  result  will  be  the
centralizer as a subgroup of <i>G</i>. Its arguments are
<p>
</ol>
<ol type=1 start=24>
  <li> the group we want to run through,
  <li> the property we want to test, as a <font face="Gill Sans,Helvetica,Arial">GAP</font> function,
  <li> <code>false</code> if we are looking for a subgroup, <code>true</code> in the case
    of   a  representative  search    (when  the result   would    be one
    representative),
  <li> the R-base,
  <li> a list  of data, to be stored  in <code>&#8465;.data</code>, which has
    in position&nbsp;1 the first member &#931;<sub>0</sub>  of the decreasing sequence
    of ``image partitions'' mentioned in <a href="../ref/CHAP041.htm#SECT011">Backtrack</a> in the
    reference manual. In the centralizer example, position&nbsp;2 contains the
    element that is  to be centralized. In the  case of  a representative
    search,  i.e.,  a conjugacy test  <code><i>g</i>  ^ <i>c</i> ?= <i>h</i></code>, we
    would  have <i>h</i>   instead of  <i>g</i>   here, and   possibly a &#931;<sub>0</sub>
    different from &#928;<sub>0</sub> (e.g., a  partition into unions of  <i>h</i>-cycles
    of same length).
  <li> two subgroups  <i>L</i> &#8804; <i>C</i><sub><i>G</i></sub>(<i>g</i>)  and  <i>R</i> &#8804; <i>C</i><sub><i>G</i></sub>(<i>h</i>) known  in
    advance (we have <i>L</i>=<i>R</i> in the centralizer case).
</ol>
<p>
<p>
<hr>Refinement  functions   for the  backtrack  search.&nbsp;The last
subsection showed   how the refinement   process leading from  &#928;<sub><i>i</i></sub> to
&#928;<sub><i>i</i>+1</sub>  is coded in the  function  <code>&#8476;.nextLevel</code>, this  has to be
executed once the  base point  <i>a</i><sub><i>i</i>+1</sub>.  The analogous refinement  step
from &#931;<sub><i>i</i></sub> to &#931;<sub><i>i</i>+1</sub> must be performed for each choice of an
image <i>b</i><sub><i>i</i>+1</sub> for  <i>a</i><sub><i>i</i>+1</sub>, and it will  depend  on the corresponding
value of &#931;<sub><i>i</i></sub>&#8743;({<i>b</i><sub><i>i</i>+1</sub>}, &#8486;&#8722;{<i>b</i><sub><i>i</i>+1</sub>}). But  before
we  can continue  our centralizer example,  we  must,  for the interested
reader, document the record components of the other black box &#8465;, as we
did above for the R-base black box &#8476;. Most of the components change as
<font face="Gill Sans,Helvetica,Arial">GAP</font> walks up and down the levels of the search tree.
<p>
<dl compact>
<dt><code>data</code> <dd>
    this will be mentioned below
<p>
<dt><code>depth</code> <dd>
    the level <i>i</i> in the search tree of the current node &#931;<sub><i>i</i></sub>
<p>
<dt><code>bimg</code> <dd>
    a list of images of the points in <code>&#8476;.base</code>
<p>
<dt><code>partition</code> <dd>
    the partition &#931;<sub><i>i</i></sub> of the current node
<p>
<dt><code>level</code> <dd>
    the stabilizer chain <code>&#8476;.lev[ <i>i</i> ]</code> at the current level
<p>
<dt><code>perm</code> <dd>
    a permutation mapping <code>Fixcells(  &#928;<sub><i>i</i></sub> )</code> to <code>Fixcells( &#931;<sub><i>i</i></sub>
    )</code> (this implies mapping (<i>a</i><sub>1</sub>,&#8230;,<i>a</i><sub><i>i</i></sub>) to (<i>b</i><sub>1</sub>,&#8230;,<i>b</i><sub><i>i</i></sub>))
<p>
<dt><code>level2</code>, <code>perm2</code> <dd>
    a  similar construction for    the second stabilizer chain,   <code>false</code>
    otherwise (and <code>true</code> if <code>&#8476;.level2 = true</code>)
</dl>
<p>
As declared in    the above code  for  <code>Centralizer</code>,  the refinement  is
performed   by   the function     <code>Refinement.Centralizer(   &#8476;,  &#8465;,
&#928;.cellno[  <i>p</i>  ],  <i>p</i>,  <i>where</i> )</code>.   The  functions in the  record
<code>Refinement</code> always   take two  additional   arguments  before  the  ones
specified  in  the <code>AddRefinement</code>  call (in  line&nbsp;13 above),  namely the
R-base  &#8476; and  the  current  value  &#8465;  of the ``R-image''.   In our
example,  <i>p</i>   is a   fixpoint  of   &#928; =  &#928;<sub><i>i</i></sub> &#8743;({<i>a</i><sub><i>i</i>+1</sub>}, &#8486;&#8722;{<i>a</i><sub><i>i</i>+1</sub>}) such that <code><i>where</i> = &#928;.cellno[ <i>p</i> ^ <i>g</i> ]</code>. The
<code>Refinement</code>   functions   must  return <code>false</code>    if   the refinement is
unsuccessful (e.g., because it  leads to &#931;<sub><i>i</i>+1</sub> having  different
cell   sizes from  &#928;<sub><i>i</i>+1</sub>)  and  <code>true</code>  otherwise.   Our particular
function looks like this.
<p>
<code>1 Refinements.Centralizer := function( &#8476;, &#8465;, <i>cellno</i>, <i>p</i>, <i>where</i> )</code>
<br><code>2 local  &#931;,  <i>q</i>;</code>
<br><code>3 &nbsp;&#931; := &#8465;.partition;</code>
<br><code>4 &nbsp;<i>q</i> := FixpointCellNo( &#931;, <i>cellno</i> ) ^ &#8465;.data[ 2 ];</code>
<br><code>5 &nbsp;return IsolatePoint( &#931;, <i>q</i> ) = <i>where</i> and ProcessFixpoint( &#8465;, <i>p</i>, <i>q</i> );</code>
<br><code>6 end;</code>
<p>
The list numbers below refer to the line numbers of the code immediately
above.
<p>
<ol type=1 start=3>
<p>
<li>
The current value of &#931;<sub><i>i</i></sub>&#8743;({<i>b</i><sub><i>i</i>+1</sub>}, &#8486;&#8722;{<i>b</i><sub><i>i</i>+1</sub>})
is always found in <code>&#8465;.partition</code>.
<p>
<li>
The image of the only point in cell number  <code><i>cellno</i>  =  &#928;<sub><i>i</i></sub>.cellno[
<i>p</i> ]</code> in &#931; under <code><i>g</i> = &#8465;.data[ 2 ]</code> is calculated.
<p>
<li>
The function returns <code>true</code> only if the  image  <i>q</i>  has  the  same  cell
number in &#931; as <i>p</i> had in &#928; (i.e., <i>where</i>) and if <i>q</i> can  be
prescribed as an  image  for  <i>p</i>  under  the  coset  of  the  stabilizer
<i>G</i><sub><i>a</i><sub>1</sub>&#8230;<i>a</i><sub><i>i</i>+1</sub></sub>&#183;<i>c</i> where <i>c</i> &#8712; <i>G</i>  is  an  (already  constructed)
element mapping the  earlier  base  points  <i>a</i><sub>1</sub>,&#8230;,<i>a</i><sub><i>i</i>+1</sub>  to  the
already chosen images  <i>b</i><sub>1</sub>,&#8230;,<i>b</i><sub><i>i</i>+1</sub>.  This  latter  condition  is
tested by <code>ProcessFixpoint( &#8465;, <i>p</i>, <i>q</i> )</code> which, if successful,  also
does the necessary bookkeeping in &#8465;. In analogy to  the  remark  about
line&nbsp;12 in the program above, the chosen image  <i>b</i><sub><i>i</i>+1</sub>  for  the  base
point <i>a</i><sub><i>i</i>+1</sub> has already been processed  implicitly  by  the  function
<code>PartitionBacktrack</code>, and this processing includes the construction of an
element  <i>c</i> &#8712; <i>G</i>  which  maps  <code>Fixcells(  &#928;<sub><i>i</i></sub>  )</code>  to   <code>Fixcells(
&#931;<sub><i>i</i></sub>  )</code>  and  <i>a</i><sub><i>i</i>+1</sub>  to  <i>b</i><sub><i>i</i>+1</sub>.  By  contrast,  the  extra
fixpoints <i>p</i> and <i>q</i> in &#928;<sub><i>i</i>+1</sub> and &#931;<sub><i>i</i>+1</sub> were  not  chosen
automatically, so they require an  explicit  call  of  <code>ProcessFixpoint</code>,
which replaces the element <i>c</i> by some <i>c</i>&#8242;&#183;<i>c</i> (with  <i>c</i>&#8242; &#8712; <i>G</i><sub><i>a</i><sub>1</sub>&#8230;<i>a</i><sub><i>i</i>+1</sub></sub>) which in addition maps <i>p</i> to <i>q</i>, or returns <code>false</code> if  this
is impossible.
<p>
</ol>
<p>
You should now be able to  guess what <code>Refinements.ProcessFixpoint( &#8476;,
&#8465;, <i>p</i>, <i>where</i>   )</code> does: it  simply returns  <code>ProcessFixpoint( &#8465;,
<i>p</i>, FixpointCellNo( &#8465;.partition, <i>where</i> ) )</code>.
<p>
<p>
<hr>Summary.&nbsp;When you write  your  own backtrack functions using
the  partition technique,  you  have  to  supply  an R-base, including  a
component <code>nextLevel</code>, and   the  functions in the   <code>Refinements</code> record
which  you need. Then  you can start  the backtrack by passing the R-base
and the additional data (for the  <code>data</code> component of the ``R-image'') to
<code>PartitionBacktrack</code>.
<p>
<p>
<hr>Functions  for  meeting    ordered  partitions.&nbsp;A   kind  of
refinement that   occurs  in particular  in   the  normalizer calculation
involves computing  the  meet of &#928;  (cf. lines&nbsp;6ff.  above) with an
arbitrary other partition  &#923;, not just  with one point. To do this
efficiently, <font face="Gill Sans,Helvetica,Arial">GAP</font> uses the following two functions.
<p>
<a name = "SSEC002.1"></a>
<li><code>StratMeetPartition( &#8476;, &#928;, &#923; [, <i>g</i> ] )</code>
<a name = "SSEC002.1"></a>
<li><code>MeetPartitionStrat( &#8476;, &#8465;, &#923;&#8242; [, <i>g</i>&#8242; ], <i>strat</i> )</code>
<p>
<a name = "I2"></a>

Such a  <code>StratMeetPartition</code>   command would   typically appear in    the
function call <code>&#8476;.nextLevel(  &#928;, &#8476; )</code>  (during the refinement of
&#928;<sub><i>i</i></sub>  to  &#928;<sub><i>i</i>+1</sub>). This   command  replaces  &#928;  by &#928;&#8743;&#923; (thereby  <strong>changing</strong> the  second  argument) and returns a ``meet
strategy''  <i>strat</i>. This  is  (for  us) a  black   box which  serves two
purposes:  First, it allows <font face="Gill Sans,Helvetica,Arial">GAP</font> to  calculate faster the corresponding
meet &#931;&#8743;&#923;&#8242;,  which must then  appear in a <code>Refinements</code>
function  (during the refinement of  &#931;<sub><i>i</i></sub> to &#931;<sub><i>i</i>+1</sub>). It is
faster  to compute &#931;&#8743;&#923;&#8242; with  the ``meet strategy'' of
&#928;&#8743;&#923; because  if the refinement  of &#931; is successful
at  all, the  intersection  of a  cell from   the left hand  side of  the
&#8743; sign  with a cell  from the right hand side  must  have the same
size   in both cases  (and  <i>strat</i>  records these   sizes, so  that only
non-empty intersections must  be calculated for &#931;&#8743;&#923;&#8242;).
Second, if  there  is a discrepancy  between  the behaviour prescribed by
<i>strat</i> and the behaviour observed when refining &#931;, the refinement
can immediately be abandoned.
<p>
On  the  other hand, if you  only  want to meet   a  partition &#928; with
&#923;  for  a one-time  use, without recording   a strategy,  you can
simply type <code>StratMeetPartition( &#928;, &#923; )</code>  as in the following
example, which also demonstrates some other partition-related commands.
<p>
<pre>
gap&gt; P := Partition( [[1,2],[3,4,5],[6]] );;  Cells( P );
[ [ 1, 2 ], [ 3, 4, 5 ], [ 6 ] ]
gap&gt; Q := Partition( OnTuplesTuples( last, (1,3,6) ) );;  Cells( Q );
[ [ 3, 2 ], [ 6, 4, 5 ], [ 1 ] ]
gap&gt; StratMeetPartition( P, Q );
[  ]
gap&gt; # The ``meet strategy'' was not recorded, ignore this result.
gap&gt; Cells( P );
[ [ 1 ], [ 5, 4 ], [ 6 ], [ 2 ], [ 3 ] ]
</pre>
<p>
You can even say  <code>StratMeetPartition( &#928;, &#8710; )</code>  where &#8710;
is simple  a subset  of  &#8486;, it   will then  be interpreted as  the
partition (&#8710;,&#8486;&#8722;&#8710;).
<p>
<font face="Gill Sans,Helvetica,Arial">GAP</font> makes use   of  the advantages  of   a ``meet  strategy''  if  the
refinement   function  in <code>Refinements</code>  contains  a <code>MeetPartitionStrat</code>
command where   <i>strat</i>  is   the    ``meet  strategy''  calculated    by
<code>StratMeetPartition</code> before.  Such a command replaces <code>&#8465;.partition</code> by
its meet with &#923;&#8242;, again changing the argument &#8465;. The necessary
reversal of these changes when backtracking from  a node (and prescribing
the next possible image  for a base point) is  automatically done by  the
function <code>PartitionBacktrack</code>.
<p>
In  all cases, an additional  argument <i>g</i> means that the   meet is to be
taken  not with &#923;,   but  instead with &#923;&#183;<i>g</i><sup>&#8722;1</sup>,  where
operation  on ordered partitions is  meant cellwise  (and setwise on each
cell). (Analogously for the primed arguments.)
<p>
<pre>
gap&gt; P := Partition( [[1,2],[3,4,5],[6]] );;
gap&gt; StratMeetPartition( P, P, (1,6,3) );;  Cells( P );
[ [ 1 ], [ 5, 4 ], [ 6 ], [ 2 ], [ 3 ] ]
</pre>
Note that <i>P</i>&#183;(1,3,6) = <i>Q</i>.
<p>
<hr>Avoiding multiplication  of permutations.&nbsp;In the  description
of  the last subsections, the  backtrack  algorithm constructs an element
<i>c</i> &#8712; <i>G</i> mapping  the base points   to the prescribed images  and finally
tests the property in question for that element. During the construction,
<i>c</i> is obtained as a product  of transversal elements from the stabilizer
chain for <i>G</i>,  and so multiplications  of permutations are required  for
every <i>c</i>  submitted to the test,  even if the  test fails (i.e.,  in our
centralizer example, if <code><i>g</i> ^ <i>c</i> &lt;&gt; <i>g</i></code>). Even if the construction of
<i>c</i> stops before images  for all base  points have been chosen, because a
refinement was unsuccessful,  several  multiplications will  already have
been performed by (explicit or implicit) calls of <code>ProcessFixpoint</code>, and,
actually, the general   backtrack procedure implemented in  <font face="Gill Sans,Helvetica,Arial">GAP</font> avoids
this.
<p>
For this purpose, <font face="Gill Sans,Helvetica,Arial">GAP</font> does  not actually multiply the permutations but
rather stores  all the factors of the   product in a  list. Specifically,
instead of carrying out  the multiplication in <i>c</i>&#8594; <i>c</i>&#8242;&#183;<i>c</i>  mentioned
in  the   comment  to  line&nbsp;5 of  the   above  program   --- where <i>c</i>&#8242; &#8712; <i>G</i><sub><i>a</i><sub>1</sub>&#8230;<i>a</i><sub><i>i</i>+1</sub></sub> is a  product  of factorized inverse  transversal
elements, see <a href="../ref/CHAP041.htm#SECT008">Stabilizer chain records</a> in the reference manual  ---
<font face="Gill Sans,Helvetica,Arial">GAP</font> appends the list of these factorized inverse transversal  elements
(giving <i>c</i>&#8242;) to the list of factors already collected for <i>c</i>. Here <i>c</i>&#8242;
is multiplied from the left and is itself  a  product  of  <strong>inverses</strong>  of
strong generators of <i>G</i>, but <font face="Gill Sans,Helvetica,Arial">GAP</font> simply spares itself all the work of
inverting permutations and stores only  a  ``list  of  inverses'',  whose
product is then (<i>c</i>&#8242;&#183;<i>c</i>)<sup>&#8722;1</sup> (which is the new value of  <i>c</i><sup>&#8722;1</sup>).  The
``list of inverses'' is extended this way whenever  <code>ProcessFixpoint</code>  is
called to improve&nbsp;<i>c</i>.
<p>
The  product has to be multiplied  out only when  the property is finally
tested  for  the  element <i>c</i>. But  it  is  often possible  to  delay the
multiplication  even  further, namely  until after   the test, so  that no
multiplication is required in the case of  an unsuccessful test. Then the
test  itself  must be carried   out with the  factorized   version of the
element <i>c</i>.  For  this purpose,  <code>PartitionBacktrack</code> can  be passed its
second argument (the property  in question) in  a different way, not as a
single <font face="Gill Sans,Helvetica,Arial">GAP</font> function, but as a list like in lines 2--4 of the following
alternative excerpt from the code for <code>Centralizer</code>.
<p>
<code>1 return PartitionBacktrack( <i>G</i>,</code>
<br><code>2 &nbsp;[ <i>g</i>, <i>g</i>,</code>
<br><code>3 &nbsp;&nbsp;OnPoints,</code>
<br><code>4 &nbsp;&nbsp;<i>c</i> -&gt; <i>c</i>!.lftObj = <i>c</i>!.rgtObj ],</code>
<br><code>5 &nbsp;false, &#8476;, [ &#928;<sub>0</sub>, <i>g</i> ], <i>L</i>, <i>R</i> );</code>
<p>
The test for <i>c</i> to have the property in question  is of the form <code><i>opr</i>(
<i>left</i>,  <i>c</i>  )  =  <i>right</i></code> where  <i>opr</i>   is an  operation  function as
explained in <a href="../ref/CHAP039.htm#SECT011">External sets</a> in the reference manual. In other words,
<i>c</i> passes the test if and only if it maps a ``left object'' to a ``right
object'' under  a certain operation. In  the centralizer example, we have
<code><i>opr</i> =  OnPoints</code> and <i>left</i> = <i>right</i> = <i>g</i>, but  in a conjugacy test, we
would have <i>right</i> = <i>h</i>.
<p>
<ol type=1 start=2>
<p>
<li>
Two first two entries (here <i>g</i> and <i>g</i>) are the  values  of  <i>left</i>  and
<i>right</i>.
<p>
<li>
The third entry (here <code>OnPoints</code>) is the operation <i>opr</i>.
<p>
<li>
The fourth entry is the test to be performed upon the mapped left  object
<i>left</i> and preimage of the right object <code><i>opr</i>( <i>right</i>, <i>c</i>^-1 )</code>.  Here
<font face="Gill Sans,Helvetica,Arial">GAP</font> operates with the inverse of <i>c</i> because this is  the  product  of
the permutations stored in the ``list  of  inverses''.  The  preimage  of
<i>right</i> under <i>c</i> is then calculated by mapping <i>right</i> with the  factors
of <i>c</i><sup>&#8722;1</sup> one by one, without the need to multiply these factors.  This
mapping  of  <i>right</i>  is  automatically  done  by  the  <code>ProcessFixpoint</code>
function whenever <i>c</i> is extended, the current value of <i>right</i> is always
stored in <code><i>c</i>!.rgtObj</code>. When the test  given  by  the  fourth  entry  is
finally performed, the element <i>c</i>  has  two  components  <code><i>c</i>!.lftObj  =
<i>left</i></code> and <code><i>c</i>!.rgtObj = <i>opr</i>( <i>right</i>, <i>c</i>^-1 )</code>, which must be  used
to express the desired relation as a function of <i>c</i>. In our  centralizer
example, we simply have to test whether they are equal.
<p>
</ol>
<p>
<p>
<h2><a name="SECT003">8.3 Stabilizer Chains for Automorphisms Acting on Enumerators</a></h2>
<p><p>
This section describes a way of representing the automorphism group of a
group as permutation group, following <a href="biblio.htm#Sims97"><cite>Sims97</cite></a>. The code however is
not yet included in the <font face="Gill Sans,Helvetica,Arial">GAP</font> library.
<p>
In this section  we present an example in  which objects we  already know
(namely,  automorphisms  of   solvable  groups)   are  equipped  with the
permutation-like operations <code>^</code> and <code>/</code>  for action on positive integers.
To achieve this, we must  define a new  type of objects which behave like
permutations   but are  represented     as automorphisms  acting  on   an
enumerator.  Our  goal is to  generalize  the Schreier-Sims algorithm for
construction of a stabilizer chain to groups of such new automorphisms.
<p>
<hr>An operation domain for automorphisms.&nbsp;The idea we describe
here is due  to C.&nbsp;Sims. We consider  a group <i>A</i>  of  automorphisms of a
group <i>G</i>, given by generators,  and we would like  to know its order. Of
course we  could   follow the strategy  of  the   Schreier-Sims algorithm
(described  in <a href="../ref/CHAP041.htm#SECT005">Stabilizer chains</a>  in  the reference manual) for <i>A</i>
acting   on   <i>G</i>. This would    involve   a  call  of  <code>StabChainStrong(
EmptyStabChain( [   ],  One( <i>A</i> ) ),   GroupGenerators(  <i>A</i> ) )</code>  where
<code>StabChainStrong</code>  is a function as the  one described in the pseudo-code
below:
<p>
<code>StabChainStrong := function( <i>S</i>, <i>newgens</i> )</code>
<br><code>&nbsp;Extend the Schreier tree of <i>S</i> with <i>newgens</i>.</code>
<br><code>&nbsp;for <i>sch</i>  in Schreier generators  do</code>
<br><code>&nbsp;&nbsp;if <i>sch</i>  &#8713; <i>S</i>.stabilizer  then</code>
<br><code>&nbsp;&nbsp;&nbsp;StabChainStrong( <i>S</i>.stabilizer, [ <i>sch</i> ] );</code>
<br><code>&nbsp;&nbsp;fi;</code>
<br><code>&nbsp;od;</code>
<br><code>end;</code>
<p>
The membership test <code><i>sch</i>  &#8713; <i>S</i>.stabilizer</code> can be performed because
the  stabilizer chain  of <code><i>S</i>.stabilizer</code>  is   already correct at  that
moment. We  even know a base  in advance, namely  any  generating set for
<i>G</i>. Fix such  a generating set  (<i>g</i><sub>1</sub>,&#8230;,<i>g</i><sub><i>d</i></sub>) and observe that this
base  is  generally very   short compared  to   the degree &#124;<i>G</i>&#124;  of  the
operation. The problem with the Schreier-Sims algorithm, however, is then
that the length of the first  basic orbit <i>g</i><sub>1</sub>&#183;<i>A</i>  would already have the
magnitude of &#124;<i>G</i>&#124;,  and the basic orbits at  deeper levels would  not be
much shorter. For the advantage of a short base  we pay the high price of
long basic  orbits, since the  product of  the  (few) basic orbit lengths
must  equal &#124;<i>A</i>&#124;.  Such  long  orbits  make the Schreier-Sims  algorithm
infeasible,   so we have to   look for a  longer base  with shorter basic
orbits.
<p>
Assume that   <i>G</i> is solvable  and  choose  a  characteristic series with
elementary abelian factors. For the sake of  simplicity we assume that <i>N</i>  &lt;  <i>G</i> is an   elementary abelian characteristic subgroup  with elementary
abelian factor group <i>G</i>/<i>N</i>. Since <i>N</i> is characteristic, <i>A</i> also acts as
a group of automorphisms  on the factor  group <i>G</i>/<i>N</i>,  but of course  not
necessarily  faithfully. To retain  a faithful action,  we let <i>A</i> act on
the   disjoint   union   <i>G</i>/<i>N</i>   with   <i>G</i>,   and   choose    as    base
(<i>g</i><sub>1</sub><i>N</i>,&#8230;,<i>g</i><sub><i>d</i></sub><i>N</i>,<i>g</i><sub>1</sub>,&#8230;,<i>g</i><sub><i>d</i></sub>). Now the first <i>d</i> basic  orbits  lie
inside <i>G</i>/<i>N</i> and can have length at most [<i>G</i>:<i>N</i>]. Since the  base
points <i>g</i><sub>1</sub><i>N</i>,&#8230;, <i>g</i><sub><i>d</i></sub><i>N</i>  form  a  generating  set  for  <i>G</i>/<i>N</i>,  their
iterated stabilizer <i>A</i><sup>(<i>d</i>+1)</sup> acts trivially on the factor group <i>G</i>/<i>N</i>,
i.e., it leaves the cosets <i>g</i><sub><i>i</i></sub><i>N</i> invariant. Accordingly,  the  next  <i>d</i>
basic orbits lie inside <i>g</i><sub><i>i</i></sub><i>N</i> (for <i>i</i>=1,&#8230;,<i>d</i>) and can  have  length
at most&nbsp;&#124;<i>N</i>&#124;.
<p>
Generalizing this method to a characteristic series <i>G</i>=<i>N</i><sub>0</sub>  &gt;  <i>N</i><sub>1</sub>  &gt;  &#8230; &gt;  <i>N</i><sub><i>l</i></sub>={1} of length <i>l</i> &gt; 2, we  can always find  a base of length <i>l</i>&#183;<i>d</i>
such that each  basic orbit is  contained in a  coset of a characteristic
factor, i.e. in a set of the form <i>g</i><sub><i>i</i></sub><i>N</i><sub><i>j</i>&#8722;1</sub>/<i>N</i><sub><i>j</i></sub> (where <i>g</i><sub><i>i</i></sub> is one of
the generators  of <i>G</i> and 1 &#8804; <i>j</i> &#8804; <i>l</i>). In particular, the  length of
the basic  orbits   is  bounded   by  the  size  of    the  corresponding
characteristic factors. To implement a Schreier-Sims algorithm for such a
base, we  must  be   able  to  let   automorphisms  act  on   cosets   of
characteristic  factors <i>g</i><sub><i>i</i></sub><i>N</i><sub><i>j</i>&#8722;1</sub>/<i>N</i><sub><i>j</i></sub>, for  varying  <i>i</i>  and <i>j</i>.  We
would    like to    translate each such     action  into  an  action   on
{1,&#8230;,[<i>N</i><sub><i>j</i>&#8722;1</sub>: <i>N</i><sub><i>j</i></sub>]}, because then we need not enumerate
the operation domain
<br clear="all" /><table border="0" width="100%"><tr><td><table align="center" cellspacing="0"  cellpadding="2"><tr><td nowrap="nowrap" align="center"> <i>G</i>/<i>N</i><sub>1</sub> </td><td nowrap="nowrap" align="center"><div class="comp">&#8901;<br /></div><div class="norm">&#8746;<br /></div><div class="comb">&nbsp;</div></td><td nowrap="nowrap" align="center"><i>G</i>/<i>N</i><sub>2</sub> </td><td nowrap="nowrap" align="center"><div class="comp">&#8901;<br /></div><div class="norm">&#8746;<br /></div><div class="comb">&nbsp;</div></td><td nowrap="nowrap" align="center">&#8230;</td><td nowrap="nowrap" align="center"><div class="comp">&#8901;<br /></div><div class="norm">&#8746;<br /></div><div class="comb">&nbsp;</div></td><td nowrap="nowrap" align="center"><i>G</i>/<i>N</i><sub><i>l</i></sub> </td></tr></table></td></tr></table>
as a whole. Enumerating it  as a whole would result  in basic orbits like
<tt>orbit</tt> &#8838; {1001,&#8230;,1100}  with a  <code>transversal</code> list whose
first 1000 entries would be unbound, but  still require 4&nbsp;bytes of memory
each (see&nbsp;<a href="../ref/CHAP041.htm#SECT008">Stabilizer chain records</a> in the reference manual).
<p>
Identifying   each  coset   <i>g</i><sub><i>i</i></sub><i>N</i><sub><i>j</i>&#8722;1</sub>/<i>N</i><sub><i>j</i></sub> into   {1,&#8230;, [<i>N</i><sub><i>j</i>&#8722;1</sub> : <i>N</i><sub><i>j</i></sub>]} of  course means that we have  to change the action  of
the automorphisms on     every  level of   the  stabilizer   chain.  Such
flexibility is not   possible with permutations  because their  effect on
positive  integers  is ``hardwired''  into them,  but  we can install new
operations for automorphisms.
<p>
<hr>Enumerators for cosets of  characteristic factors.&nbsp;So far  we
have  not used the  fact that  the characteristic  factors are elementary
abelian, but we will do so from  here on. Our  first task is to implement
an enumerator (see <a href="../ref/CHAP028.htm#SSEC002.7">AsList</a> and <a href="../ref/CHAP021.htm#SECT023">Enumerators</a>  in  the  reference
manual) for a coset of a characteristic factor in a solvable  group  <i>G</i>.
We assume that such a coset <i>gN</i>/<i>M</i> is given by
<p>
<ol>
<p>
<li>  a pcgs for  the group  <i>G</i> (see  <a href="../ref/CHAP043.htm#SSEC002.1">Pcgs</a> in the  reference
  manual), let <code><i>n</i> = Length( <i>pcgs</i> )</code>;
<p>
<li> a range <code><i>range</i> = [ <i>start</i>  .. <i>stop</i> ]</code> indicating that <code><i>N</i> = &#9001;<i>pcgs</i>{ [ <i>start</i>  .. <i>n</i> ] } &#9002;</code>  and <code><i>M</i> = &#9001;<i>pcgs</i>{  [  <i>stop</i> + 1   .. <i>n</i> ]  } &#9002;</code>,  i.e.,  the cosets of
  <code><i>pcgs</i>{ <i>range</i> }</code> form a base for the vector space <i>N</i>/<i>M</i>;
<p>
<li> the representative <i>g</i>.
<p>
</ol>
<p>
We   first  define a  new representation  for   such enumerators and then
construct them by simply putting these three pieces of data into a record
object. The  enumerator  should  behave as  a   list of  group   elements
(representing cosets modulo <i>M</i>),   consequently, its family will  be the
family of the <i>pcgs</i> itself.
<pre>
IsCosetSolvableFactorEnumeratorRep := NewRepresentation
    ( "isCosetSolvableFactorEnumerator", IsEnumerator,
                                [ "pcgs", "range", "representative" ] );

EnumeratorCosetSolvableFactor := function( pcgs, range, g )
    return Objectify( NewKind( FamilyObj( pcgs ),
                   IsCosetSolvableFactorEnumeratorRep ),
                   rec( pcgs := pcgs,
                       range := range,
              representative := g ) );
end;
</pre>
The definition of the operations <code>Length</code>, <code>\[\]</code> and <code>Position</code> is now
straightforward. The  code has sometimes  been  abbreviated and is  meant
``cum grano salis'',  e.g.,  the declaration of  the local  variables has
been left out.
<pre>
InstallMethod( Length, [ IsCosetSolvableFactorEnumeratorRep ],
    enum -&gt; Product( RelativeOrdersPcgs( enum!.pcgs ){ enum!.range } ) );
</pre>
<p>
<pre>
InstallMethod( \[\], [ IsCosetSolvableFactorEnumeratorRep,
        IsPosRat and IsInt ],
    function( enum, pos )
    elm := ();
    pos := pos - 1;
    for i  in Reversed( enum!.range )  do
        p := RelativeOrderOfPcElement( enum!.pcgs, i );
        elm := enum!.pcgs[ i ] ^ ( pos mod p ) * elm;
        pos := QuoInt( pos, p );
    od;
    return enum!.representative * elm;
end );
</pre>
<p>
<pre>
InstallMethod( Position, [ IsCosetSolvableFactorEnumeratorRep,
        IsObject, IsZeroCyc ],
    function( enum, elm, zero )
    exp := ExponentsOfPcElement( enum!.pcgs,
                   LeftQuotient( enum!.representative, elm ) );
    pos := 0;
    for i  in enum!.range  do
        pos := pos * RelativeOrderOfPcElement( pcgs, i ) + exp[ i ];
    od;
    return pos + 1;
end );
</pre>
<p>
<hr>Making automorphisms act  on such enumerators.&nbsp;Our next task
is to make automorphisms of the  solvable group <code><i>pcgs</i>!.group</code> act on <code>[
1 .. Length( <i>enum</i> )  ]</code> for such an  enumerator <i>enum</i>. We achieve this
by  introducing a new  representation of automorphisms on enumerators and
by putting the enumerator together  with the automorphism into an  object
which behaves like  a permutation. Turning  an ordinary automorphism into
such  a special  automorphism requires  then   the construction of  a new
object which has the new kind. We provide an operation <code>PermOnEnumerator(
<i>model</i>, <i>aut</i> )</code> which constructs such a new object having the same kind
as  <i>model</i>,  but representing the  automorphism  <i>aut</i>. So <i>aut</i>  can be
either an ordinary automorphism or one which already has an enumerator in
its kind, but perhaps  different from the one  we want (i.e. from the one
in <i>model</i>).
<pre>
IsPermOnEnumerator := NewCategory( "IsPermOnEnumerator",
    IsMultiplicativeElementWithInverse and IsPerm );
</pre>
<p>
<pre>
IsPermOnEnumeratorDefaultRep := NewRepresentation
    ( "IsPermOnEnumeratorDefaultRep",
      IsPermOnEnumerator and IsAttributeStoringRep,
      [ "perm" ] );

PermOnEnumerator := NewOperation( "PermOnEnumerator",
    [ IsEnumerator, IsObject ] );
</pre>
<p>
<pre>
InstallMethod( PermOnEnumerator,
        [ IsEnumerator, IsObject ],
    function( enum, a )
    SetFilterObj( a, IsMultiplicativeElementWithInverse );
    a := Objectify( NewKind( PermutationsOnEnumeratorsFamily,
                 IsPermOnEnumeratorDefaultRep ),
                 rec( perm := a ) );
    SetEnumerator( a, enum );
    return a;
end );
</pre>
<p>
<pre>
InstallMethod( PermOnEnumerator,
        [ IsEnumerator, IsPermOnEnumeratorDefaultRep ],
    function( enum, a )
    a := Objectify( TypeObj( a ), rec( perm := a!.perm ) );
    SetEnumerator( a, enum );
    return a;
end );
</pre>
Next we  have to install new  methods for the  operations which calculate
the  product of two automorphisms, because   this product must again have
the    right kind. We    also have to write  a    function which uses the
enumerators to apply such an automorphism to positive integers.
<pre>
InstallMethod( \*, IsIdenticalObj,
        [ IsPermOnEnumeratorDefaultRep, IsPermOnEnumeratorDefaultRep ],
    function( a, b )
    perm := a!.perm * b!.perm;
    SetIsBijective( perm, true );
    return PermOnEnumerator( Enumerator( a ), perm );
end );
</pre>
<p>
<pre>
InstallMethod( \^,
        [ IsPosRat and IsInt, IsPermOnEnumeratorDefaultRep ],
    function( p, a )
    return PositionCanonical( Enumerator( a ),
                   Enumerator( a )[ p ] ^ a!.perm );
end );
</pre>
How the corresponding  methods for <code><i>p</i> /  <i>aut</i></code> and <code><i>aut</i>  ^ <i>n</i></code> look
like is obvious.
<p>
Now we  can  formulate  the recursive procedure   <code>StabChainStrong</code> which
extends  the stabilizer chain by adding  in new  generators <i>newgens</i>. We
content  ourselves again   with pseudo-code, emphasizing  only  the lines
which set the <code>EnumeratorDomainPermutation</code>. We assume that initially <i>S</i>
is a stabilizer chain for the trivial subgroup with a level for each pair
(<i>range</i>,<i>g</i>) characterizing an enumerator  (as  described above). We  also
assume that  the <code>identity</code>  element at each  level already  has the kind
corresponding to that level.
<p>
<code>StabChainStrong := function( <i>S</i>, <i>newgens</i> )</code>
<br><code>&nbsp;for <i>i</i>  in [ 1 .. Length( <i>newgens</i> ) ]  do</code>
<br><code>&nbsp;&nbsp;<i>newgens</i>[ <i>i</i> ] := AutomorphismOnEnumerator( <i>S</i>.identity, <i>newgens</i>[ <i>i</i> ] );</code>
<br><code>&nbsp;od;</code>
<br><code>&nbsp;Extend the Schreier tree of <i>S</i> with <i>newgens</i>.</code>
<br><code>&nbsp;for <i>sch</i>  in Schreier generators  do</code>
<br><code>&nbsp;&nbsp;if <i>sch</i>  &#8713; <i>S</i>.stabilizer  then</code>
<br><code>&nbsp;&nbsp;&nbsp;StabChainStrong( <i>S</i>.stabilizer, [ <i>sch</i> ] );</code>
<br><code>&nbsp;&nbsp;fi;</code>
<br><code>&nbsp;od;</code>
<br><code>end;</code>
<p>
<p>
[<a href="../index.htm">Top</a>] [<a href = "chapters.htm">Up</a>] [<a href ="CHAP007.htm">Previous</a>] [<a href = "theindex.htm">Index</a>]
<P>
<font face="Gill Sans,Helvetica,Arial">GAP 4 manual<br>December 2008
</font></body></html>