<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 <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 <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>·<i>p</i>)·<i>g</i><sup><i>p</i></sup> = (<i>pnt</i>·<i>g</i>)·<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>)·<i>hom</i>(<i>g</i>) = <i>map</i>(<i>pnt</i>·<i>g</i>). (Of course the ordinary conjugation is a special case of this, with <i>map</i>(<i>pnt</i>) = <i>pnt</i>·<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>−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>)·<i>hom</i>(<i>g</i>)=<i>map</i>(<i>b</i>) ⇔ <i>b</i>·<i>g</i>=<i>b</i>, and if this holds, then <i>g</i>=<i>w</i>(<i>g</i><sub>1</sub>,…,<i>g</i><sub><i>n</i></sub>) is a word in the generators <i>g</i><sub>1</sub>,…,<i>g</i><sub><i>n</i></sub> of the stabilizer of <var>b</var> and <i>hom</i>(<i>g</i>) = <sup>*</sup> <i>w</i>(<i>hom</i>(<i>g</i><sub>1</sub>),…,<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 ϕ (i.e., ϕ(<i>hom</i>(<i>g</i>))=<i>g</i> ∀<i>g</i>), equality * holds modulo <span class="roman">Ker</span> ϕ; 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> ϕ and appending a proper stabilizer chain of <span class="roman">Ker</span> ϕ at the end. These special cases will occur in the algorithms for permutation group homomorphisms (see <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. a certain ordering of the labels, where <i>l</i>′ < <i>l</i> means that every point in the orbit was mapped with <i>l</i>′ 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>′ < <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>)·<i>hom</i>(<i>l</i>)<sup>−1</sup> = <i>map</i>(<i>a</i>)·<i>hom</i>(<i>l</i>′)<sup>−1</sup> = <i>map</i>(<i>a</i><i>l</i>′<sup>−1</sup>), so <i>map</i>(<i>b</i>) is already equal to the image of the vertex <i>a</i><i>l</i>′<sup>−1</sup>. This vertex must have been encountered before <i>b</i> = <i>al</i><sup>−1</sup> because <i>l</i>′ < <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. <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. 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 2 to 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. 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 ℜ, 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 Ω on which the group <i>G</i> operates <p> <dt><code>base</code> <dd> the sequence (<i>a</i><sub>1</sub>,…,<i>a</i><sub><i>r</i></sub>) of base points <p> <dt><code>partition</code> <dd> an ordered partition, initially Π<sub>0</sub>, this will be refined to Π<sub>1</sub>,…,Π<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 Π<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 Σ<sub><i>i</i></sub> to Σ<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( Π<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,…,<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>…<i>a</i><sub><i>i</i>−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> ], Ω, Π<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 Π<sub>0</sub> := TrivialPartition( Ω );</code> <br><code>2 ℜ := EmptyRBase( <i>G</i>, Ω, Π<sub>0</sub> );</code> <br><code>3 ℜ.nextLevel := function( Π, </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 NextRBasePoint( Π, </code><var>rbase</var><code> );</code> <br><code>6 <i>fix</i> := Fixcells( Π );</code> <br><code>7 for <i>p</i> in <i>fix</i> do</code> <br><code>8 <i>q</i> := <i>p</i> ^ <i>g</i>;</code> <br><code>9 <i>where</i> := IsolatePoint( Π, <i>q</i> );</code> <br><code>10 if <i>where</i> <> false then</code> <br><code>12 Add( <i>fix</i>, <i>q</i> );</code> <br><code>13 ProcessFixpoint( ℜ, <i>q</i> );</code> <br><code>14 AddRefinement( ℜ, "Centralizer", [ Π.cellno[ <i>p</i> ], <i>q</i>, <i>where</i> ] );</code> <br><code>15 if Π.lengths[ <i>where</i> ] = 1 then</code> <br><code>16 <i>p</i> := FixpointCellNo( Π, <i>where</i> );</code> <br><code>17 ProcessFixpoint( ℜ, <i>p</i> );</code> <br><code>18 AddRefinement( ℜ, "ProcessFixpoint", [ <i>p</i>, <i>where</i> ] );</code> <br><code>19 fi;</code> <br><code>20 fi;</code> <br><code>21 od;</code> <br><code>22 end;</code> <br><code>23 return PartitionBacktrack(</code> <br><code>24 <i>G</i>,</code> <br><code>25 <i>c</i> -> <i>g</i> ^ <i>c</i> = <i>g</i>,</code> <br><code>26 false,</code> <br><code>27 ℜ,</code> <br><code>28 [ Π<sub>0</sub>, <i>g</i> ],</code> <br><code>29 <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> Ω is the set on which <i>G</i> acts and Π<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 Π<sub>0</sub>=(Ω), which is constructed as <code>TrivialPartition( Ω )</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 ℜ. <p> <li> -- 21. These lines define a function <code>ℜ.nextLevel</code> which is called whenever an additional member in the sequence Π<sub>0</sub> ≥ Π<sub>1</sub> ≥ … of partitions is needed. If Π<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>ℜ.nextLevel( Π<sub><i>i</i></sub>, ℜ )</code>, and this function will choose a new base point <i>a</i><sub><i>i</i>+1</sub>, refine Π<sub><i>i</i></sub> to Π<sub><i>i</i>+1</sub> (thereby <strong>changing</strong> the first argument) and store all necessary information in ℜ. <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 Π and still moved by the stabilizer <i>G</i><sub><i>a</i><sub>1</sub>…<i>a</i><sub><i>i</i></sub></sub> of the earlier base points. If certain points of Ω 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( Π )</code> returns the list of points in one-point cells of Π (ordered as the cells are ordered in Π). <p> <li> For every point <i>p</i> ∈ <i>fix</i>, if we know the image <code><i>p</i> ^ <i>g</i></code> under <i>c</i> ∈ <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 Π. <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 Π 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 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 <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'' Σ<sub><i>i</i></sub> (to yield the refined Σ<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 Σ<sub><i>i</i></sub> ∧({<i>b</i><sub><i>i</i>+1</sub>},Ω−{<i>b</i><sub><i>i</i>+1</sub>}) and store this partition in <code>ℑ.partition</code>, where ℑ is a black box similar to ℜ, 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( ℜ, ℑ, Π.cellno[ <i>p</i> ], <i>p</i>, <i>where</i> )</code>, with the then current values of ℜ and ℑ, but where <code>Π.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>ℑ.partition</code> to yield Σ<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 13 and if it is true, this extra fixpoint <i>p</i> is taken (line 15), processed like <i>q</i> before (line 16) and is then (line 17) passed to another refinement function <code>Refinements.ProcessFixpoint( ℜ, ℑ, <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>ℑ.data</code>, which has in position 1 the first member Σ<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 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 Σ<sub>0</sub> different from Π<sub>0</sub> (e.g., a partition into unions of <i>h</i>-cycles of same length). <li> two subgroups <i>L</i> ≤ <i>C</i><sub><i>G</i></sub>(<i>g</i>) and <i>R</i> ≤ <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. The last subsection showed how the refinement process leading from Π<sub><i>i</i></sub> to Π<sub><i>i</i>+1</sub> is coded in the function <code>ℜ.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 Σ<sub><i>i</i></sub> to Σ<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 Σ<sub><i>i</i></sub>∧({<i>b</i><sub><i>i</i>+1</sub>}, Ω−{<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 ℑ, as we did above for the R-base black box ℜ. 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 Σ<sub><i>i</i></sub> <p> <dt><code>bimg</code> <dd> a list of images of the points in <code>ℜ.base</code> <p> <dt><code>partition</code> <dd> the partition Σ<sub><i>i</i></sub> of the current node <p> <dt><code>level</code> <dd> the stabilizer chain <code>ℜ.lev[ <i>i</i> ]</code> at the current level <p> <dt><code>perm</code> <dd> a permutation mapping <code>Fixcells( Π<sub><i>i</i></sub> )</code> to <code>Fixcells( Σ<sub><i>i</i></sub> )</code> (this implies mapping (<i>a</i><sub>1</sub>,…,<i>a</i><sub><i>i</i></sub>) to (<i>b</i><sub>1</sub>,…,<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>ℜ.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( ℜ, ℑ, Π.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 13 above), namely the R-base ℜ and the current value ℑ of the ``R-image''. In our example, <i>p</i> is a fixpoint of Π = Π<sub><i>i</i></sub> ∧({<i>a</i><sub><i>i</i>+1</sub>}, Ω−{<i>a</i><sub><i>i</i>+1</sub>}) such that <code><i>where</i> = Π.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 Σ<sub><i>i</i>+1</sub> having different cell sizes from Π<sub><i>i</i>+1</sub>) and <code>true</code> otherwise. Our particular function looks like this. <p> <code>1 Refinements.Centralizer := function( ℜ, ℑ, <i>cellno</i>, <i>p</i>, <i>where</i> )</code> <br><code>2 local Σ, <i>q</i>;</code> <br><code>3 Σ := ℑ.partition;</code> <br><code>4 <i>q</i> := FixpointCellNo( Σ, <i>cellno</i> ) ^ ℑ.data[ 2 ];</code> <br><code>5 return IsolatePoint( Σ, <i>q</i> ) = <i>where</i> and ProcessFixpoint( ℑ, <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 Σ<sub><i>i</i></sub>∧({<i>b</i><sub><i>i</i>+1</sub>}, Ω−{<i>b</i><sub><i>i</i>+1</sub>}) is always found in <code>ℑ.partition</code>. <p> <li> The image of the only point in cell number <code><i>cellno</i> = Π<sub><i>i</i></sub>.cellno[ <i>p</i> ]</code> in Σ under <code><i>g</i> = ℑ.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 Σ as <i>p</i> had in Π (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>…<i>a</i><sub><i>i</i>+1</sub></sub>·<i>c</i> where <i>c</i> ∈ <i>G</i> is an (already constructed) element mapping the earlier base points <i>a</i><sub>1</sub>,…,<i>a</i><sub><i>i</i>+1</sub> to the already chosen images <i>b</i><sub>1</sub>,…,<i>b</i><sub><i>i</i>+1</sub>. This latter condition is tested by <code>ProcessFixpoint( ℑ, <i>p</i>, <i>q</i> )</code> which, if successful, also does the necessary bookkeeping in ℑ. In analogy to the remark about line 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> ∈ <i>G</i> which maps <code>Fixcells( Π<sub><i>i</i></sub> )</code> to <code>Fixcells( Σ<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 Π<sub><i>i</i>+1</sub> and Σ<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>′·<i>c</i> (with <i>c</i>′ ∈ <i>G</i><sub><i>a</i><sub>1</sub>…<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( ℜ, ℑ, <i>p</i>, <i>where</i> )</code> does: it simply returns <code>ProcessFixpoint( ℑ, <i>p</i>, FixpointCellNo( ℑ.partition, <i>where</i> ) )</code>. <p> <p> <hr>Summary. 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. A kind of refinement that occurs in particular in the normalizer calculation involves computing the meet of Π (cf. lines 6ff. above) with an arbitrary other partition Λ, 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( ℜ, Π, Λ [, <i>g</i> ] )</code> <a name = "SSEC002.1"></a> <li><code>MeetPartitionStrat( ℜ, ℑ, Λ′ [, <i>g</i>′ ], <i>strat</i> )</code> <p> <a name = "I2"></a> Such a <code>StratMeetPartition</code> command would typically appear in the function call <code>ℜ.nextLevel( Π, ℜ )</code> (during the refinement of Π<sub><i>i</i></sub> to Π<sub><i>i</i>+1</sub>). This command replaces Π by Π∧Λ (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 Σ∧Λ′, which must then appear in a <code>Refinements</code> function (during the refinement of Σ<sub><i>i</i></sub> to Σ<sub><i>i</i>+1</sub>). It is faster to compute Σ∧Λ′ with the ``meet strategy'' of Π∧Λ because if the refinement of Σ is successful at all, the intersection of a cell from the left hand side of the ∧ 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 Σ∧Λ′). Second, if there is a discrepancy between the behaviour prescribed by <i>strat</i> and the behaviour observed when refining Σ, the refinement can immediately be abandoned. <p> On the other hand, if you only want to meet a partition Π with Λ for a one-time use, without recording a strategy, you can simply type <code>StratMeetPartition( Π, Λ )</code> as in the following example, which also demonstrates some other partition-related commands. <p> <pre> gap> P := Partition( [[1,2],[3,4,5],[6]] );; Cells( P ); [ [ 1, 2 ], [ 3, 4, 5 ], [ 6 ] ] gap> Q := Partition( OnTuplesTuples( last, (1,3,6) ) );; Cells( Q ); [ [ 3, 2 ], [ 6, 4, 5 ], [ 1 ] ] gap> StratMeetPartition( P, Q ); [ ] gap> # The ``meet strategy'' was not recorded, ignore this result. gap> Cells( P ); [ [ 1 ], [ 5, 4 ], [ 6 ], [ 2 ], [ 3 ] ] </pre> <p> You can even say <code>StratMeetPartition( Π, ∆ )</code> where ∆ is simple a subset of Ω, it will then be interpreted as the partition (∆,Ω−∆). <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>ℑ.partition</code> by its meet with Λ′, again changing the argument ℑ. 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 Λ, but instead with Λ·<i>g</i><sup>−1</sup>, where operation on ordered partitions is meant cellwise (and setwise on each cell). (Analogously for the primed arguments.) <p> <pre> gap> P := Partition( [[1,2],[3,4,5],[6]] );; gap> StratMeetPartition( P, P, (1,6,3) );; Cells( P ); [ [ 1 ], [ 5, 4 ], [ 6 ], [ 2 ], [ 3 ] ] </pre> Note that <i>P</i>·(1,3,6) = <i>Q</i>. <p> <hr>Avoiding multiplication of permutations. In the description of the last subsections, the backtrack algorithm constructs an element <i>c</i> ∈ <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> <> <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>→ <i>c</i>′·<i>c</i> mentioned in the comment to line 5 of the above program --- where <i>c</i>′ ∈ <i>G</i><sub><i>a</i><sub>1</sub>…<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>′) to the list of factors already collected for <i>c</i>. Here <i>c</i>′ 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>′·<i>c</i>)<sup>−1</sup> (which is the new value of <i>c</i><sup>−1</sup>). The ``list of inverses'' is extended this way whenever <code>ProcessFixpoint</code> is called to improve <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 [ <i>g</i>, <i>g</i>,</code> <br><code>3 OnPoints,</code> <br><code>4 <i>c</i> -> <i>c</i>!.lftObj = <i>c</i>!.rgtObj ],</code> <br><code>5 false, ℜ, [ Π<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>−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. The idea we describe here is due to C. 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> Extend the Schreier tree of <i>S</i> with <i>newgens</i>.</code> <br><code> for <i>sch</i> in Schreier generators do</code> <br><code> if <i>sch</i> ∉ <i>S</i>.stabilizer then</code> <br><code> StabChainStrong( <i>S</i>.stabilizer, [ <i>sch</i> ] );</code> <br><code> fi;</code> <br><code> od;</code> <br><code>end;</code> <p> The membership test <code><i>sch</i> ∉ <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>,…,<i>g</i><sub><i>d</i></sub>) and observe that this base is generally very short compared to the degree |<i>G</i>| 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>·<i>A</i> would already have the magnitude of |<i>G</i>|, 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 |<i>A</i>|. 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> < <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>,…,<i>g</i><sub><i>d</i></sub><i>N</i>,<i>g</i><sub>1</sub>,…,<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>,…, <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,…,<i>d</i>) and can have length at most |<i>N</i>|. <p> Generalizing this method to a characteristic series <i>G</i>=<i>N</i><sub>0</sub> > <i>N</i><sub>1</sub> > … > <i>N</i><sub><i>l</i></sub>={1} of length <i>l</i> > 2, we can always find a base of length <i>l</i>·<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>−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 ≤ <i>j</i> ≤ <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>−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,…,[<i>N</i><sub><i>j</i>−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">⋅<br /></div><div class="norm">∪<br /></div><div class="comb"> </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">⋅<br /></div><div class="norm">∪<br /></div><div class="comb"> </div></td><td nowrap="nowrap" align="center">…</td><td nowrap="nowrap" align="center"><div class="comp">⋅<br /></div><div class="norm">∪<br /></div><div class="comb"> </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> ⊆ {1001,…,1100} with a <code>transversal</code> list whose first 1000 entries would be unbound, but still require 4 bytes of memory each (see <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>−1</sub>/<i>N</i><sub><i>j</i></sub> into {1,…, [<i>N</i><sub><i>j</i>−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. 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> = 〈<i>pcgs</i>{ [ <i>start</i> .. <i>n</i> ] } 〉</code> and <code><i>M</i> = 〈<i>pcgs</i>{ [ <i>stop</i> + 1 .. <i>n</i> ] } 〉</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 -> 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. 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> for <i>i</i> in [ 1 .. Length( <i>newgens</i> ) ] do</code> <br><code> <i>newgens</i>[ <i>i</i> ] := AutomorphismOnEnumerator( <i>S</i>.identity, <i>newgens</i>[ <i>i</i> ] );</code> <br><code> od;</code> <br><code> Extend the Schreier tree of <i>S</i> with <i>newgens</i>.</code> <br><code> for <i>sch</i> in Schreier generators do</code> <br><code> if <i>sch</i> ∉ <i>S</i>.stabilizer then</code> <br><code> StabChainStrong( <i>S</i>.stabilizer, [ <i>sch</i> ] );</code> <br><code> fi;</code> <br><code> 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>