Sophie

Sophie

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

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

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>GAP (RCWA) - Chapter 3: Residue-Class-Wise Affine Groups</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="text/css" href="manual.css" />
</head>
<body>


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<div class="chlinkprevnexttop">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap2.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap4.html">Next Chapter</a>&nbsp;  </div>

<p><a id="X874A3BB684F0639A" name="X874A3BB684F0639A"></a></p>
<div class="ChapSects"><a href="chap3.html#X874A3BB684F0639A">3. <span class="Heading">Residue-Class-Wise Affine Groups</span></a>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X7D7B075385435151">3.1 <span class="Heading">Constructing residue-class-wise affine groups</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7C0DCF887D324CF9">3.1-1 RCWA</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7BD42D8481300E25">3.1-2 CT</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7EB8A301790290C7">3.1-3 IsomorphismRcwaGroup</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X79CAE48981C11FE8">3.1-4 DirectProduct</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7AEFAB7E7F81444B">3.1-5 <span class="Heading">
    WreathProduct
    (for an rcwa group over Z, with a permutation group
    or (Z,+))
  </span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X852EF2C079E4D7FF">3.1-6 <span class="Heading">
    Restriction (of an rcwa mapping or -group, by an injective rcwa mapping)
  </span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X8709A96C8640E4C2">3.1-7 <span class="Heading">
    Induction (of an rcwa mapping or -group, by an injective rcwa mapping)
  </span></a>
</span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X80C042BE82EE0F9A">3.2 <span class="Heading">
  Basic routines for investigating residue-class-wise affine groups
</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X864A7E3E87F366A8">3.2-1 StructureDescription</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X83527DA37C5CB2C7">3.2-2 EpimorphismFromFpGroup</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X8463E34286344F06">3.2-3 PreImagesRepresentative</a></span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X8151BE577FFDCE87">3.3 <span class="Heading">
  The natural action of an rcwa group on the underlying ring
</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7C046BE97EE53692">3.3-1 <span class="Heading"> Orbit (for an rcwa group and either a point or a set) </span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7B30F7207817D859">3.3-2 DrawOrbitPicture</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X78F145197F63A25D">3.3-3 <span class="Heading">
    ShortOrbits (for rcwa groups) &amp; ShortCycles (for rcwa permutations)
  </span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X805D691083F2FAFC">3.3-4 <span class="Heading">
    Ball (for group, element and radius or group, point, radius and action)
  </span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X87A3462C82FD376E">3.3-5 RepresentativeAction</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7F3CBDD2806ACECF">3.3-6 Projections</a></span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X866843D08213067E">3.3-7 RepresentativeAction</a></span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X781CBEFA7F39B58D">3.4 <span class="Heading">
  Special attributes of tame residue-class-wise affine groups
</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7F523A6B87825AB8">3.4-1 <span class="Heading">
    RespectedPartition (of a tame rcwa group or -permutation)
  </span></a>
</span>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X7A6786727EC1E4BB">3.4-2 <span class="Heading">
    ActionOnRespectedPartition &amp; KernelOfActionOnRespectedPartition
  </span></a>
</span>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X8302BA78810C1DEE">3.5 <span class="Heading">Generating pseudo-random elements of RCWA(R) and CT(R)</span></a>
</div>
<div class="ContSect"><span class="nocss">&nbsp;</span><a href="chap3.html#X86327F6C83D09798">3.6 <span class="Heading">The categories of residue-class-wise affine groups</span></a>
<span class="ContSS"><br /><span class="nocss">&nbsp;&nbsp;</span><a href="chap3.html#X84AFBB997B694A3D">3.6-1 IsRcwaGroup</a></span>
</div>
</div>

<h3>3. <span class="Heading">Residue-Class-Wise Affine Groups</span></h3>

<p>In this chapter, we describe how to construct residue-class-wise affine groups and how to compute with them.</p>

<p><a id="X7D7B075385435151" name="X7D7B075385435151"></a></p>

<h4>3.1 <span class="Heading">Constructing residue-class-wise affine groups</span></h4>

<p>As any other groups in <strong class="pkg">GAP</strong>, residue-class-wise affine groups can be constructed by <code class="code">Group</code>, <code class="code">GroupByGenerators</code> or <code class="code">GroupWithGenerators</code>.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));
&lt;rcwa group over Z with 2 generators&gt;
gap&gt; IsTame(G); Size(G); IsSolvable(G); IsPerfect(G);
true
infinity
false
false

</pre></td></tr></table>

<p>There are methods for the operations <code class="code">View</code>, <code class="code">Display</code>, <code class="code">Print</code> and <code class="code">String</code> which are applicable to rcwa groups. All rcwa groups over a ring R are subgroups of RCWA(R). The group RCWA(R) itself is not finitely generated, thus cannot be constructed as described above. It is handled as a special case:</p>

<p><a id="X7C0DCF887D324CF9" name="X7C0DCF887D324CF9"></a></p>

<h5>3.1-1 RCWA</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RCWA</code>( <var class="Arg">R</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>The group RCWA(<var class="Arg">R</var>) of all residue-class-wise affine permutations of the ring <var class="Arg">R</var>.</p>


<table class="example">
<tr><td><pre>

gap&gt; RCWA_Z := RCWA(Integers);
RCWA(Z)
gap&gt; IsSubgroup(RCWA_Z,G);
true

</pre></td></tr></table>

<p>Examples of rcwa permutations can be obtained via <code class="code">Random(RCWA(<var class="Arg">R</var>))</code>, see Section <a href="chap3.html#X8302BA78810C1DEE"><b>3.5</b></a>.</p>

<p>We denote the group which is generated by all class transpositions of the ring R by CT(R). This group is handled as a special case as well:</p>

<p><a id="X7BD42D8481300E25" name="X7BD42D8481300E25"></a></p>

<h5>3.1-2 CT</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; CT</code>( <var class="Arg">R</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>The group CT(<var class="Arg">R</var>) which is generated by all class transpositions of the ring R.</p>


<table class="example">
<tr><td><pre>

gap&gt; CT_Z := CT(Integers);
CT(Z)
gap&gt; IsSimple(CT_Z); # One of a longer list of stored attributes/properties.
true
gap&gt; IsSubgroup(CT_Z,G);
false

</pre></td></tr></table>

<p>Another way of constructing an rcwa group is taking the image of an rcwa representation:</p>

<p><a id="X7EB8A301790290C7" name="X7EB8A301790290C7"></a></p>

<h5>3.1-3 IsomorphismRcwaGroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; IsomorphismRcwaGroup</code>( <var class="Arg">G, R</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; IsomorphismRcwaGroup</code>( <var class="Arg">G</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p><b>Returns: </b>A monomorphism from the group <var class="Arg">G</var> to RCWA(<var class="Arg">R</var>) or to RCWA(Z), respectively.</p>

<p>The best-supported case is <var class="Arg">R</var> = Z. Currently there are methods available for finite groups, for free products of finite groups and for free groups. The method for free products of finite groups uses the Table-Tennis Lemma (cf. e.g. Section II.B. in <a href="chapBib.html#biBLaHarpe00">[dlH00]</a>), and the method for free groups uses an adaptation of the construction given on page 27 in <a href="chapBib.html#biBLaHarpe00">[dlH00]</a> from PSL(2,C) to RCWA(Z).</p>


<table class="example">
<tr><td><pre>

gap&gt; F := FreeProduct(Group((1,2)(3,4),(1,3)(2,4)),Group((1,2,3)),
&gt;                     SymmetricGroup(3));
&lt;fp group on the generators [ f1, f2, f3, f4, f5 ]&gt;
gap&gt; IsomorphismRcwaGroup(F);
[ f1, f2, f3, f4, f5 ] -&gt;
[ &lt;bijective rcwa mapping of Z with modulus 12&gt;,
  &lt;bijective rcwa mapping of Z with modulus 24&gt;,
  &lt;bijective rcwa mapping of Z with modulus 12&gt;,
  &lt;bijective rcwa mapping of Z with modulus 72&gt;,
  &lt;bijective rcwa mapping of Z with modulus 36&gt; ]
gap&gt; IsomorphismRcwaGroup(FreeGroup(2));
[ f1, f2 ] -&gt; [ &lt;wild bijective rcwa mapping of Z with modulus 8&gt;,
  &lt;wild bijective rcwa mapping of Z with modulus 8&gt; ]
gap&gt; F2 := Image(last);
&lt;wild rcwa group over Z with 2 generators&gt;

</pre></td></tr></table>

<p>The class of groups which can faithfully be represented as rcwa groups over the integers is closed under taking direct products, under taking wreath products with finite groups and under taking wreath products with the infinite cyclic group (Z,+). Therefore these operations can be used to build rcwa groups as well:</p>

<p><a id="X79CAE48981C11FE8" name="X79CAE48981C11FE8"></a></p>

<h5>3.1-4 DirectProduct</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; DirectProduct</code>( <var class="Arg">G1, G2, ...</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>An rcwa group isomorphic to the direct product of the rcwa groups over Z given as arguments.</p>

<p>There is certainly no unique or canonical way to embed a direct product of rcwa groups into RCWA(Z). This method chooses to embed the groups <var class="Arg">G1</var>, <var class="Arg">G2</var>, <var class="Arg">G3</var> ... via restrictions by n -&gt; mn, n -&gt; mn+1, n -&gt; mn+2 ... (-&gt; <code class="func">Restriction</code> (<a href="chap3.html#X852EF2C079E4D7FF"><b>3.1-6</b></a>)), where m denotes the number of groups given as arguments.</p>


<table class="example">
<tr><td><pre>

gap&gt; F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;
gap&gt; F2xF2 := DirectProduct(F2,F2);
&lt;wild rcwa group over Z with 4 generators&gt;
gap&gt; Image(Projection(F2xF2,1)) = F2;
true

</pre></td></tr></table>

<p><a id="X7AEFAB7E7F81444B" name="X7AEFAB7E7F81444B"></a></p>

<h5>3.1-5 <span class="Heading">
    WreathProduct
    (for an rcwa group over Z, with a permutation group
    or (Z,+))
  </span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; WreathProduct</code>( <var class="Arg">G, P</var> )</td><td class="tdright">( method )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; WreathProduct</code>( <var class="Arg">G, Z</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>An rcwa group isomorphic to the wreath product of the rcwa group <var class="Arg">G</var> over Z with the finite permutation group <var class="Arg">P</var> or with the infinite cyclic group <var class="Arg">Z</var>, respectively.</p>

<p>The first-mentioned method embeds the <code class="code">DegreeAction(<var class="Arg">P</var>)</code>th direct power of <var class="Arg">G</var> using the method for <code class="code">DirectProduct</code>, and lets the permutation group <var class="Arg">P</var> act naturally on the set of residue classes modulo <code class="code">DegreeAction(<var class="Arg">P</var>)</code>. The second-mentioned method restricts (-&gt; <code class="func">Restriction</code> (<a href="chap3.html#X852EF2C079E4D7FF"><b>3.1-6</b></a>)) the group <var class="Arg">G</var> to the residue class 3(4), and maps the generator of the infinite cyclic group <var class="Arg">Z</var> to <code class="code">ClassTransposition(0,2,1,2) * ClassTransposition(0,2,1,4)</code>.</p>


<table class="example">
<tr><td><pre>

gap&gt; F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;
gap&gt; F2wrA5 := WreathProduct(F2,AlternatingGroup(5));;
gap&gt; Embedding(F2wrA5,1);
[ &lt;wild bijective rcwa mapping of Z with modulus 8&gt;,
  &lt;wild bijective rcwa mapping of Z with modulus 8&gt; ] -&gt;
[ &lt;wild bijective rcwa mapping of Z with modulus 40&gt;,
  &lt;wild bijective rcwa mapping of Z with modulus 40&gt; ]
gap&gt; Embedding(F2wrA5,2);
[ (1,2,3,4,5), (3,4,5) ] -&gt;
[ &lt;bijective rcwa mapping of Z with modulus 5, of order 5&gt;,
  &lt;bijective rcwa mapping of Z with modulus 5, of order 3&gt; ]
gap&gt; ZwrZ := WreathProduct(Group(ClassShift(0,1)),Group(ClassShift(0,1)));
&lt;wild rcwa group over Z with 2 generators&gt;
gap&gt; Embedding(ZwrZ,1);
[ ClassShift(0,1) ] -&gt;
[ &lt;tame bijective rcwa mapping of Z with modulus 4, of order infinity&gt; ]
gap&gt; Embedding(ZwrZ,2);
[ ClassShift(0,1) ] -&gt;
[ &lt;wild bijective rcwa mapping of Z with modulus 4&gt; ]

</pre></td></tr></table>

<p>Many of the above group constructions are based on certain monomorphisms from the group RCWA(R) into itself. The support of the image of such a monomorphism is the image of a given injective rcwa mapping. For this reason, these monomorphisms are called <em>restriction monomorphisms</em>. The following operation computes images of rcwa mappings and -groups under them:</p>

<p><a id="X852EF2C079E4D7FF" name="X852EF2C079E4D7FF"></a></p>

<h5>3.1-6 <span class="Heading">
    Restriction (of an rcwa mapping or -group, by an injective rcwa mapping)
  </span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Restriction</code>( <var class="Arg">g, f</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Restriction</code>( <var class="Arg">G, f</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><b>Returns: </b>The restriction of the rcwa mapping <var class="Arg">g</var> (respectively the rcwa group <var class="Arg">G</var>) by the injective rcwa mapping <var class="Arg">f</var>.</p>

<p>By definition, the <em>restriction</em> g_f of an rcwa mapping <var class="Arg">g</var> by an injective rcwa mapping <var class="Arg">f</var> is the unique rcwa mapping which satisfies the equation f * g_f = g * f and which fixes the complement of the image of <var class="Arg">f</var> pointwise. If <var class="Arg">f</var> is bijective, the restriction of <var class="Arg">g</var> by <var class="Arg">f</var> is just the conjugate of <var class="Arg">g</var> under <var class="Arg">f</var>.</p>

<p>The <em>restriction</em> of an rcwa group <var class="Arg">G</var> by an injective rcwa mapping <var class="Arg">f</var> is defined as the group whose elements are the restrictions of the elements of <var class="Arg">G</var> by <var class="Arg">f</var>. The restriction of <var class="Arg">G</var> by <var class="Arg">f</var> acts on the image of <var class="Arg">f</var> and fixes its complement pointwise.</p>


<table class="example">
<tr><td><pre>

gap&gt; F2tilde := Restriction(F2,RcwaMapping([[5,3,1]]));
&lt;wild rcwa group over Z with 2 generators&gt;
gap&gt; Support(F2tilde);
3(5)

</pre></td></tr></table>

<p><a id="X8709A96C8640E4C2" name="X8709A96C8640E4C2"></a></p>

<h5>3.1-7 <span class="Heading">
    Induction (of an rcwa mapping or -group, by an injective rcwa mapping)
  </span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Induction</code>( <var class="Arg">g, f</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Induction</code>( <var class="Arg">G, f</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><b>Returns: </b>The induction of the rcwa mapping <var class="Arg">g</var> (respectively the rcwa group <var class="Arg">G</var>) by the injective rcwa mapping <var class="Arg">f</var>.</p>

<p><em>Induction</em> is the right inverse of restriction, i.e. it is <code class="code">Induction(Restriction(<var class="Arg">g</var>,<var class="Arg">f</var>),<var class="Arg">f</var>) = <var class="Arg">g</var></code> and <code class="code">Induction(Restriction(<var class="Arg">G</var>,<var class="Arg">f</var>),<var class="Arg">f</var>) = <var class="Arg">G</var></code>. The mapping <var class="Arg">g</var> respectively the group <var class="Arg">G</var> must not move points outside the image of <var class="Arg">f</var>.</p>


<table class="example">
<tr><td><pre>

gap&gt; Induction(F2tilde,RcwaMapping([[5,3,1]])) = F2;
true

</pre></td></tr></table>

<p>Basic attributes of an rcwa group which are derived from the coefficients of its elements are <code class="code">Modulus</code>, <code class="code">Multiplier</code>, <code class="code">Divisor</code> and <code class="code">PrimeSet</code>. The <em>modulus</em> of an rcwa group is the lcm of the moduli of its elements if such an lcm exists, i.e. if the group is tame, and 0 otherwise. The <em>multiplier</em> respectively <em>divisor</em> of an rcwa group is the lcm of the multipliers respectively divisors of its elements in case such an lcm exists and infty otherwise. The <em>prime set</em> of an rcwa group is the union of the prime sets of its elements. There are shorthands <code class="code">Mod</code>, <code class="code">Mult</code> and <code class="code">Div</code> defined for <code class="code">Modulus</code>, <code class="code">Multiplier</code> and <code class="code">Divisor</code>, respectively. An rcwa group is called <em>integral</em> respectively <em>class-wise order-preserving</em> if all of its elements are so. There are corresponding methods available for <code class="code">IsIntegral</code> and <code class="code">IsClassWiseOrderPreserving</code>. There is a property <code class="code">IsSignPreserving</code>, which indicates whether a given rcwa group over Z acts on the set of nonnegative integers. The latter holds for any subgroup of CT(Z).</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,3,2,6),
&gt;               ClassReflection(2,4));
&lt;rcwa group over Z with 3 generators&gt;
gap&gt; List([Modulus,Multiplier,Divisor,PrimeSet,IsIntegral,
&gt;          IsClassWiseOrderPreserving,IsSignPreserving],f-&gt;f(G));
[ 24, 2, 2, [ 2, 3 ], false, false, false ]

</pre></td></tr></table>

<p><a id="X80C042BE82EE0F9A" name="X80C042BE82EE0F9A"></a></p>

<h4>3.2 <span class="Heading">
  Basic routines for investigating residue-class-wise affine groups
</span></h4>

<p>In the previous section we have seen how to construct rcwa groups. The purpose of this section is to describe how to obtain information on the structure of an rcwa group and on its action on the underlying ring. The easiest way to get some information on the group structure is a dedicated method for the operation <code class="code">StructureDescription</code>:</p>

<p><a id="X864A7E3E87F366A8" name="X864A7E3E87F366A8"></a></p>

<h5>3.2-1 StructureDescription</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; StructureDescription</code>( <var class="Arg">G</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>A string which describes the structure of the rcwa group <var class="Arg">G</var> to some extent.</p>

<p>The attribute <code class="code">StructureDescription</code> for finite groups is documented in the <strong class="pkg">GAP</strong> Reference Manual. Therefore we describe here only issues which are specific to infinite groups, and in particular to rcwa groups.</p>

<p>Wreath products are denoted by <code class="code">wr</code>, and free products are denoted by <code class="code">*</code>. The infinite cyclic group (Z,+) is denoted by <code class="code">Z</code>, the infinite dihedral group is denoted by <code class="code">D0</code> and free groups of rank 2,3,4,dots are denoted by <code class="code">F2</code>, <code class="code">F3</code>, <code class="code">F4</code>, dots. While for finite groups the symbol <code class="code">.</code> is used to denote a non-split extension, for rcwa groups in general it stands for an extension which may be split or not. For wild groups in most cases it happens that there is a large section on which no structural information can be obtained. Such sections of the group with unknown structure are denoted by <code class="code">&lt;unknown&gt;</code>. In general, the structure of a section denoted by <code class="code">&lt;unknown&gt;</code> can be very complicated and very difficult to exhibit. While for isomorphic finite groups always the same structure description is computed, this cannot be guaranteed for isomorphic rcwa groups.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));;
gap&gt; StructureDescription(G);
"(Z x Z x Z x Z x Z x Z x Z) . (C2 x S7)"
gap&gt; G := Group(ClassTransposition(0,2,1,4),
&gt;               ClassShift(2,4),ClassReflection(1,2));;
gap&gt; StructureDescription(G:short);
"Z^2.((S3xS3):2)"
gap&gt; F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;
gap&gt; PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(3),
&gt;                                                    CyclicGroup(2))));;
gap&gt; G := DirectProduct(PSL2Z,F2);
&lt;wild rcwa group over Z with 4 generators&gt;
gap&gt; StructureDescription(G);
"(C3 * C2) x F2"
gap&gt; G := WreathProduct(G,CyclicGroup(IsRcwaGroupOverZ,infinity));
&lt;wild rcwa group over Z with 5 generators&gt;
gap&gt; StructureDescription(G);
"((C3 * C2) x F2) wr Z"
gap&gt; Collatz := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);;
gap&gt; G := Group(Collatz,ClassShift(0,1));;
gap&gt; StructureDescription(G:short);
"&lt;unknown&gt;.Z"

</pre></td></tr></table>

<p>However the extent to which the structure of an rcwa group can be exhibited automatically is certainly limited. In general, one can find out much more about the structure of a given rcwa group in an interactive session using the functionality described in the rest of this section and elsewhere in this manual.</p>

<p>The order of an rcwa group can be computed by the operation <code class="code">Size</code>. An rcwa group is finite if and only if it is tame and its action on a suitably chosen respected partition (see <code class="func">RespectedPartition</code> (<a href="chap3.html#X7F523A6B87825AB8"><b>3.4-1</b></a>)) is faithful. Hence the problem of computing the order of an rcwa group reduces to the problem of deciding whether it is tame, the problem of deciding whether it acts faithfully on a respected partition and the problem of computing the order of the finite permutation group induced on the respected partition.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,3,2,3),
&gt;               ClassReflection(0,5));
&lt;rcwa group over Z with 3 generators&gt;
gap&gt; Size(G);
46080

</pre></td></tr></table>

<p>For a finite rcwa group, an isomorphism to a permutation group can be computed by <code class="code">IsomorphismPermGroup</code>:</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,2,1,2),ClassTransposition(0,3,1,3));;
gap&gt; IsomorphismPermGroup(G);
[ ClassTransposition(0,2,1,2), ClassTransposition(0,3,1,3) ] -&gt; 
[ (1,2)(3,4)(5,6), (1,2)(4,5) ]

</pre></td></tr></table>

<p>Next we say a few words about the membership test for rcwa groups. For tame rcwa groups, membership or non-membership can always be decided. For wild groups, membership or non-membership can very often be decided quite quick as well, but not always. On Info level 2 of <code class="code">InfoRCWA</code> the membership test provides information on reasons why the given rcwa permutation is an element of the given rcwa group or not.</p>

<p>The direct product of two free groups of rank 2 can faithfully be represented as an rcwa group. According to <a href="chapBib.html#biBMihailova58">[Mih58]</a> this implies that in general the membership problem for rcwa groups is algorithmically undecidable.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassShift(0,3),ClassTransposition(0,3,2,6));;
gap&gt;  ClassShift(2,6)^7 * ClassTransposition(0,3,2,6)
&gt;   * ClassShift(0,3)^-3 in G;
true
gap&gt; ClassShift(0,1) in G;
false

</pre></td></tr></table>

<p>The conjugacy problem for rcwa groups is difficult, and <strong class="pkg">RCWA</strong> provides only methods to solve it in some reasonably easy cases.</p>


<table class="example">
<tr><td><pre>

gap&gt; IsConjugate(RCWA(Integers),
&gt;                ClassTransposition(0,2,1,4),ClassShift(0,1));
false
gap&gt; IsConjugate(CT(Integers),ClassTransposition(0,2,1,6),
&gt;                             ClassTransposition(1,4,0,8));
true
gap&gt; g := RepresentativeAction(CT(Integers),ClassTransposition(0,2,1,6),
&gt;                                           ClassTransposition(1,4,0,8));
&lt;bijective rcwa mapping of Z with modulus 48&gt;
gap&gt; ClassTransposition(0,2,1,6)^g = ClassTransposition(1,4,0,8);
true

</pre></td></tr></table>

<p>The number of conjugacy classes of RCWA(Z) of elements of given order is known, cf. Corollary 2.7.1 (b) in <a href="chapBib.html#biBKohl05">[Koh05]</a>. It can be determined by the function <code class="code">NrConjugacyClassesOfRCWAZOfOrder</code>:</p>


<table class="example">
<tr><td><pre>

gap&gt; List([2,105],NrConjugacyClassesOfRCWAZOfOrder);
[ infinity, 218 ]

</pre></td></tr></table>

<p>There is a property <code class="code">IsTame</code> which indicates whether an rcwa group is tame or not:</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,2,1,4),ClassShift(1,3));;
gap&gt; H := Group(ClassTransposition(0,2,1,6),ClassShift(1,3));;
gap&gt; IsTame(G);
true
gap&gt; IsTame(H);
false

</pre></td></tr></table>

<p>For tame rcwa groups, there are methods for <code class="code">IsSolvable</code> and <code class="code">IsPerfect</code> available, and usually derived subgroups and subgroup indices can be computed as well. Linear representations of tame groups over the rationals can be determined by the operation <code class="code">IsomorphismMatrixGroup</code>. Testing a wild group for solvability or perfectness is currently not always feasible, and wild groups have in general no faithful finite-dimensional linear representations. There is a method for <code class="code">Exponent</code> available, which works basically for any rcwa group.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,2,1,4),ClassShift(1,2));;
gap&gt; IsPerfect(G);
false
gap&gt; IsSolvable(G);
true
gap&gt; D1 := DerivedSubgroup(G);; D2 := DerivedSubgroup(D1);;
gap&gt; IsAbelian(D2);
true
gap&gt; Index(G,D1); Index(D1,D2);
infinity
9
gap&gt; StructureDescription(G); StructureDescription(D1);
"(Z x Z x Z) . S3"
"(Z x Z) . C3"
gap&gt; Q := D1/D2;
Group([ (), (1,2,4)(3,5,7)(6,8,9), (1,3,6)(2,5,8)(4,7,9) ])
gap&gt; StructureDescription(Q); 
"C3 x C3"
gap&gt; Exponent(G);
infinity
gap&gt; phi := IsomorphismMatrixGroup(G);;
gap&gt; Display(Image(phi,ClassTransposition(0,2,1,4)));
[ [     0,     0,   1/2,  -1/2,     0,     0 ], 
  [     0,     0,     0,     1,     0,     0 ], 
  [     2,     1,     0,     0,     0,     0 ], 
  [     0,     1,     0,     0,     0,     0 ], 
  [     0,     0,     0,     0,     1,     0 ], 
  [     0,     0,     0,     0,     0,     1 ] ]

</pre></td></tr></table>

<p>When investigating a group, a basic task is to find relations among the generators:</p>

<p><a id="X83527DA37C5CB2C7" name="X83527DA37C5CB2C7"></a></p>

<h5>3.2-2 EpimorphismFromFpGroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; EpimorphismFromFpGroup</code>( <var class="Arg">G, r</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>An epimorphism from a finitely presented group to the rcwa group <var class="Arg">G</var>.</p>

<p>The argument <var class="Arg">r</var> is the "search radius", i.e. the radius of the ball around 1 which is scanned for relations. In general, the larger <var class="Arg">r</var> is chosen the smaller the kernel of the returned epimorphism is. If the group <var class="Arg">G</var> has finite presentations, the kernel will in principle get trivial provided that <var class="Arg">r</var> is chosen large enough.</p>

<p>Both the performance and the returned epimorphism depend on whether the package <strong class="pkg">FR</strong> <a href="chapBib.html#biBFR">[Bar07]</a> is present or not.</p>


<table class="example">
<tr><td><pre>

gap&gt; a := ClassTransposition(2,4,3,4 :Name:="a");;
gap&gt; b := ClassTransposition(4,6,8,12:Name:="b");;
gap&gt; c := ClassTransposition(3,4,4,6 :Name:="c");;
gap&gt; G := Group(a,b,c);
&lt;rcwa group over Z with 3 generators&gt;
gap&gt; phi := EpimorphismFromFpGroup(G,6);
[ a, b, c ] -&gt; [ a, b, c ]
gap&gt; RelatorsOfFpGroup(Source(phi));
[ a^2, b^2, c^2, c*b*c*b*c*b, c*b*c*a*c*b*c*a*c*b*c*a, 
  b*a*b*a*b*a*b*a*b*a*b*a ]

</pre></td></tr></table>

<p>A related very common task is to factor group elements into generators:</p>

<p><a id="X8463E34286344F06" name="X8463E34286344F06"></a></p>

<h5>3.2-3 PreImagesRepresentative</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; PreImagesRepresentative</code>( <var class="Arg">phi, g</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>A representative of the set of preimages of <var class="Arg">g</var> under the epimorphism <var class="Arg">phi</var> from a free group to an rcwa group.</p>

<p>The epimorphism <var class="Arg">phi</var> must map the generators of the free group to the generators of the rcwa group one-by-one.</p>

<p>This method can be used for factoring elements of rcwa groups into generators. The implementation is based on <code class="code">RepresentativeActionPreImage</code>, see <code class="func">RepresentativeAction</code> (<a href="chap3.html#X87A3462C82FD376E"><b>3.3-5</b></a>).</p>

<p>Quite frequently, computing several preimages is not harder than computing just one, i.e. often several preimages are found simultaneously. The operation <code class="code">PreImagesRepresentatives</code> takes care of this. It takes the same arguments as <code class="code">PreImagesRepresentative</code> and returns a list of preimages. If multiple preimages are found, their quotients give rise to nontrivial relations among the generators of the image of <var class="Arg">phi</var>.</p>


<table class="example">
<tr><td><pre>

gap&gt; a := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; SetName(a,"a");
gap&gt; b := ClassShift(0,1:Name:="b");;
gap&gt; G := Group(a,b);; # G = &lt;&lt;Collatz permutation&gt;, n -&gt; n + 1&gt;
gap&gt; phi := EpimorphismFromFreeGroup(G);;
gap&gt; g := Comm(a^2*b^4,a*b^3); # a sample element to be factored
&lt;bijective rcwa mapping of Z with modulus 8&gt;
gap&gt; PreImagesRepresentative(phi,g); # -&gt; a factorization of g
b^-4*a^-1*b^-1*a^-1*b^3*a*b^-1*a*b^3
gap&gt; g = b^-4*a^-1*b^-1*a^-1*b^3*a*b^-1*a*b^3; # check
true
gap&gt; g := Comm(a*b,Comm(a,b^3));
&lt;bijective rcwa mapping of Z with modulus 8&gt;
gap&gt; pre := PreImagesRepresentatives(phi,g);
[ b^-1*a^-1*b^-1*a^-1*b^3*a*b*a*b^-2, b^-1*a^-1*b*a^-1*b^3*a*b^-1*a*b^-2 ]
gap&gt; rel := CyclicallyReducedWord(pre[1]/pre[2]); # -&gt; a nontriv. relation
b^-1*a^-1*b^3*a*b^2*a^-1*b^-3*a*b^-1
gap&gt; rel^phi;
IdentityMapping( Integers )

</pre></td></tr></table>

<p><a id="X8151BE577FFDCE87" name="X8151BE577FFDCE87"></a></p>

<h4>3.3 <span class="Heading">
  The natural action of an rcwa group on the underlying ring
</span></h4>

<p>Knowing a natural permutation representation of a group usually helps significantly in computing in it and in obtaining results on its structure. This holds particularly for the natural action of an rcwa group on its underlying ring. In this section we describe <strong class="pkg">RCWA</strong>'s functionality related to this action.</p>

<p>The support, i.e. the set of moved points, of an rcwa group can be determined by <code class="code">Support</code> or <code class="code">MovedPoints</code> (these are synonyms). Testing for transitivity on the underlying ring is often feasible:</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(1,2,0,4),ClassShift(0,2));;
gap&gt; IsTransitive(G,Integers);
true

</pre></td></tr></table>

<p>There are methods to compute orbits under the action of an rcwa group:</p>

<p><a id="X7C046BE97EE53692" name="X7C046BE97EE53692"></a></p>

<h5>3.3-1 <span class="Heading"> Orbit (for an rcwa group and either a point or a set) </span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Orbit</code>( <var class="Arg">G, point</var> )</td><td class="tdright">( method )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Orbit</code>( <var class="Arg">G, set</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>The orbit of the point <var class="Arg">point</var> respectively the set <var class="Arg">set</var> under the natural action of the rcwa group <var class="Arg">G</var> on its underlying ring.</p>

<p>The second argument can either be an element or a subset of the underlying ring of the rcwa group <var class="Arg">G</var>. Since orbits under the action of rcwa groups can be finite or infinite, and since infinite orbits are not necessarily residue class unions, the orbit may either be returned in the form of a list, in the form of a residue class union or in the form of an orbit object. It is possible to loop over orbits returned as orbit objects, they can be compared and there is a membership test for them. However note that equality and membership for such orbits cannot always be decided.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassShift(0,2),ClassTransposition(0,3,1,3));
&lt;rcwa group over Z with 2 generators&gt;
gap&gt; Orbit(G,0);
Z \ 5(6)
gap&gt; Orbit(G,5);
[ 5 ]
gap&gt; Orbit(G,ResidueClass(0,2));
[ 0(2), 1(6) U 2(6) U 3(6), 1(3) U 3(6), 0(3) U 1(6), 0(3) U 4(6), 
  1(3) U 0(6), 0(3) U 2(6), 0(6) U 1(6) U 2(6), 2(6) U 3(6) U 4(6), 
  1(3) U 2(6) ]
gap&gt; G := Group(ClassTransposition(0,2,1,2),ClassTransposition(0,2,1,4),
&gt;               ClassReflection(0,3));
&lt;rcwa group over Z with 3 generators&gt;
gap&gt; orb := Orbit(G,2);
&lt;orbit of 2 under &lt;wild rcwa group over Z with 3 generators&gt;&gt;
gap&gt; 1015808 in orb;
true
gap&gt; First(orb,n-&gt;ForAll([n,n+2,n+6,n+8,n+30,n+32,n+36,n+38],IsPrime));
-19

</pre></td></tr></table>

<p><strong class="pkg">RCWA</strong> permits drawing pictures of orbits of rcwa groups on Z^2. The pictures are written to files in bitmap- (bmp-) format. The author has successfully tested this feature both under Linux and under Windows, and the produced pictures can be processed further with many common graphics programs:</p>

<p><a id="X7B30F7207817D859" name="X7B30F7207817D859"></a></p>

<h5>3.3-2 DrawOrbitPicture</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; DrawOrbitPicture</code>( <var class="Arg">G, p0, r, h, w, colored, palette, filename</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p><b>Returns: </b>Nothing.</p>

<p>Draws a picture of the orbit(s) of the point(s) <var class="Arg">p0</var> under the action of the group <var class="Arg">G</var> on Z^2. The argument <var class="Arg">p0</var> is either one point or a list of points. The argument <var class="Arg">r</var> denotes the radius of the ball around <var class="Arg">p0</var> to be computed. The size of the created picture is <var class="Arg">h</var> x <var class="Arg">w</var> pixels. The argument <var class="Arg">colored</var> is a boolean which indicates whether a 24-bit True-Color picture or a monochrome picture should be drawn. In the former case, <var class="Arg">palette</var> must be a list of triples of integers in the range 0, dots, 255, denoting the RGB values of colors to be used. In the latter case, <var class="Arg">palette</var> is not used, and any value can be passed. The picture is written in bitmap- (bmp-) format to a file named <var class="Arg">filename</var>. This is done using the utility function <code class="func">SaveAsBitmapPicture</code> (<a href="chap7.html#X81DE1E838615C214"><b>7.6-1</b></a>).</p>


<table class="example">
<tr><td><pre>

gap&gt; PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),
&gt;                                                    CyclicGroup(3))));;
gap&gt; DrawOrbitPicture(PSL2Z,[0,1],20,512,512,false,fail,"example1.bmp");
gap&gt; DrawOrbitPicture(PSL2Z,Combinations([1..4],2),20,512,512,true,
&gt;                     [[255,0,0],[0,255,0],[0,0,255]],"example2.bmp");

</pre></td></tr></table>

<p>The pictures drawn in the examples are shown on <strong class="pkg">RCWA</strong>'s webpage.</p>

<p>Finite orbits give rise to finite quotients of a group, and finite cycles can help to check for conjugacy. Therefore it is important to be able to determine them:</p>

<p><a id="X78F145197F63A25D" name="X78F145197F63A25D"></a></p>

<h5>3.3-3 <span class="Heading">
    ShortOrbits (for rcwa groups) &amp; ShortCycles (for rcwa permutations)
  </span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; ShortOrbits</code>( <var class="Arg">G, S, maxlng</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; ShortCycles</code>( <var class="Arg">g, S, maxlng</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; ShortCycles</code>( <var class="Arg">g, maxlng</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><b>Returns: </b>In the first form a list of all finite orbits of the rcwa group <var class="Arg">G</var> of length at most <var class="Arg">maxlng</var> which intersect nontrivially with the set <var class="Arg">S</var>.</p>

<p>In the second form a list of all cycles of the rcwa permutation <var class="Arg">g</var> of length at most <var class="Arg">maxlng</var> which intersect nontrivially with the set <var class="Arg">S</var>.</p>

<p>In the third form a list of all cycles of the rcwa permutation <var class="Arg">g</var> of length at most <var class="Arg">maxlng</var> which do not correspond to cycles consisting of residue classes.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(1,4,2,4)*ClassTransposition(1,4,3,4),
&gt;               ClassTransposition(3,9,6,18)*ClassTransposition(1,6,3,9));;
gap&gt; List(ShortOrbits(G,[-15..15],100),
&gt;         orb-&gt;StructureDescription(Action(G,orb)));
[ "A15", "A4", "1", "1", "C3", "1", "((C2 x C2 x C2) : C7) : C3", "1", 
  "1", "C3", "A19" ]
gap&gt; ShortCycles(mKnot(7),[1..100],20);
[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7, 8 ], [ 9, 10 ], 
  [ 11, 12 ], [ 13, 14, 16, 18, 20, 22, 19, 17, 15 ], [ 21, 24 ], 
  [ 23, 26 ], [ 25, 28, 32, 36, 31, 27, 30, 34, 38, 33, 29 ], 
  [ 35, 40 ], [ 37, 42, 48, 54, 47, 41, 46, 52, 45, 39, 44, 50, 43 ], 
  [ 77, 88, 100, 114, 130, 148, 127, 109, 124, 107, 122, 105, 120, 103, 
      89 ] ]

</pre></td></tr></table>

<p>Frequently one needs to compute balls of certain radius around points or group elements, be it to estimate the growth of a group, be it to see how an orbit looks like, be it to search for a group element with certain properties or be it for other purposes:</p>

<p><a id="X805D691083F2FAFC" name="X805D691083F2FAFC"></a></p>

<h5>3.3-4 <span class="Heading">
    Ball (for group, element and radius or group, point, radius and action)
  </span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Ball</code>( <var class="Arg">G, g, r</var> )</td><td class="tdright">( method )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Ball</code>( <var class="Arg">G, p, r, action</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>The ball of radius <var class="Arg">r</var> around the element <var class="Arg">g</var> in the group <var class="Arg">G</var>, respectively the ball of radius <var class="Arg">r</var> around the point <var class="Arg">p</var> under the action <var class="Arg">action</var> of the group <var class="Arg">G</var>.</p>

<p>All balls are understood with respect to <code class="code">GeneratorsOfGroup(<var class="Arg">G</var>)</code>. As membership tests can be expensive, the former method does not check whether <var class="Arg">g</var> is indeed an element of <var class="Arg">G</var>. The methods require that element- / point comparisons are cheap. They are not only applicable to rcwa groups. If the option <var class="Arg">Spheres</var> is set, the ball is splitted up and returned as a list of spheres.</p>


<table class="example">
<tr><td><pre>

gap&gt; PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),
&gt;                                                    CyclicGroup(3))));;
gap&gt; List([1..10],k-&gt;Length(Ball(PSL2Z,[0,1],k,OnTuples)));
[ 4, 8, 14, 22, 34, 50, 74, 106, 154, 218 ]
gap&gt; Ball(Group((1,2),(2,3),(3,4)),(),2:Spheres);
[ [ () ], [ (3,4), (2,3), (1,2) ],
  [ (2,3,4), (2,4,3), (1,2)(3,4), (1,2,3), (1,3,2) ] ]

</pre></td></tr></table>

<p>It is possible to determine group elements which map a given tuple of elements of the underlying ring to a given other tuple, if such elements exist:</p>

<p><a id="X87A3462C82FD376E" name="X87A3462C82FD376E"></a></p>

<h5>3.3-5 RepresentativeAction</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RepresentativeAction</code>( <var class="Arg">G, source, destination, action</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>An element of <var class="Arg">G</var> which maps <var class="Arg">source</var> to <var class="Arg">destination</var> under the action given by <var class="Arg">action</var>.</p>

<p>If an element satisfying this condition does not exist, this method either returns <code class="code">fail</code> or runs into an infinite loop. The problem whether <var class="Arg">source</var> and <var class="Arg">destination</var> lie in the same orbit under the action <var class="Arg">action</var> of <var class="Arg">G</var> is hard, and in its general form most likely computationally undecidable.</p>

<p>In cases where rather a word in the generators of <var class="Arg">G</var> than the actual group element is needed, one should use the operation <code class="code">RepresentativeActionPreImage</code> instead. This operation takes five arguments. The first four are the same as those of <code class="code">RepresentativeAction</code>, and the fifth is a free group whose generators are to be used as letters of the returned word. Note that <code class="code">RepresentativeAction</code> calls <code class="code">RepresentativeActionPreImage</code> and evaluates the returned word. The evaluation of the word can very well take most of the time if <var class="Arg">G</var> is wild and coefficient explosion occurs.</p>

<p>The algorithm is based on computing balls of increasing radius around <var class="Arg">source</var> and <var class="Arg">destination</var> until they intersect nontrivially.</p>


<table class="example">
<tr><td><pre>

gap&gt; a := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; SetName(a,"a");
gap&gt; b := ClassShift(1,4:Name:="b");; G := Group(a,b);;
gap&gt; elm := RepresentativeAction(G,[7,4,9],[4,5,13],OnTuples);;
gap&gt; Display(elm);

Bijective rcwa mapping of Z with modulus 12

              n mod 12              |                n^f
------------------------------------+------------------------------------
   0  2  3  6  8 11                 | n
   1  7 10                          | n - 3
   4                                | n + 1
   5  9                             | n + 4

gap&gt; List([7,4,9],n-&gt;n^elm);
[ 4, 5, 13 ]
gap&gt; elm := RepresentativeAction(G,[6,-3,8],[-9,4,11],OnPoints);;
gap&gt; Display(elm);

Bijective rcwa mapping of Z with modulus 12

              n mod 12              |                n^f
------------------------------------+------------------------------------
   0  3  6                          | 2n/3
   1                                | (2n - 8)/3
   2  8 11                          | (4n + 1)/3
   4  7 10                          | (4n - 1)/3
   5                                | (4n - 17)/3
   9                                | (4n - 15)/3

gap&gt; [6,-3,8]^elm; List([6,-3,8],n-&gt;n^elm); # `OnPoints' allows reordering
[ -9, 4, 11 ]
[ 4, -9, 11 ]
gap&gt; F := FreeGroup("a","b");; phi := EpimorphismByGenerators(F,G);;
gap&gt; w := RepresentativeActionPreImage(G,[10,-4,9,5],[4,5,13,-8],
&gt;                                      OnTuples,F);
a*b^-1*a^-1*b^-1*a*b^-1*a*b*a*b^-2*a*b*a^-1*b
gap&gt; elm := w^phi;
&lt;bijective rcwa mapping of Z with modulus 324&gt;
gap&gt; List([10,-4,9,5],n-&gt;n^elm);
[ 4, 5, 13, -8 ]

</pre></td></tr></table>

<p>Sometimes an rcwa group fixes a certain partition of the underlying ring into unions of residue classes. If this happens, then any orbit is clearly a subset of exactly one of these parts. Further, such a partition often gives rise to proper quotients of the group:</p>

<p><a id="X7F3CBDD2806ACECF" name="X7F3CBDD2806ACECF"></a></p>

<h5>3.3-6 Projections</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; Projections</code>( <var class="Arg">G, m</var> )</td><td class="tdright">( operation )</td></tr></table></div>
<p><b>Returns: </b>The projections of the rcwa group <var class="Arg">G</var> to the unions of residue classes (mod <var class="Arg">m</var>) which it fixes setwise.</p>

<p>The corresponding partition of a set of representatives for the residue classes (mod <var class="Arg">m</var>) can be obtained by the operation <code class="code">OrbitsModulo(<var class="Arg">G</var>,<var class="Arg">m</var>)</code>.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,2,1,2),ClassShift(3,4));;
gap&gt; Projections(G,4);
[ [ ClassTransposition(0,2,1,2), ClassShift(3,4) ] -&gt;
    [ &lt;bijective rcwa mapping of Z with modulus 4&gt;,
      IdentityMapping( Integers ) ],
  [ ClassTransposition(0,2,1,2), ClassShift(3,4) ] -&gt;
    [ &lt;bijective rcwa mapping of Z with modulus 4&gt;,
      &lt;bijective rcwa mapping of Z with modulus 4&gt; ] ]
gap&gt; List(last,phi-&gt;Support(Image(phi)));
[ 0(4) U 1(4), 2(4) U 3(4) ]

</pre></td></tr></table>

<p>Given two partitions of the underlying ring into the same number of unions of residue classes, there is always an rcwa permutation which maps the one to the other:</p>

<p><a id="X866843D08213067E" name="X866843D08213067E"></a></p>

<h5>3.3-7 RepresentativeAction</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RepresentativeAction</code>( <var class="Arg">RCWA(R), P1, P2</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p><b>Returns: </b>An element of RCWA(R) which maps the partition <var class="Arg">P1</var> to <var class="Arg">P2</var>.</p>

<p>The arguments <var class="Arg">P1</var> and <var class="Arg">P2</var> must be partitions of the underlying ring R into the same number of unions of residue classes. The method for R = Z recognizes the option <code class="code">IsTame</code>, which can be used to demand a tame result. If this option is set and there is no tame rcwa permutation which maps <var class="Arg">P1</var> to <var class="Arg">P2</var>, the method runs into an infinite loop. This happens if the condition in Theorem 2.8.9 in <a href="chapBib.html#biBKohl05">[Koh05]</a> is not satisfied. If the option <code class="code">IsTame</code> is not set and the partitions <var class="Arg">P1</var> and <var class="Arg">P2</var> both consist entirely of single residue classes, then the returned mapping is affine on any residue class in <var class="Arg">P1</var>.</p>


<table class="example">
<tr><td><pre>

gap&gt; P1 := AllResidueClassesModulo(3);
[ 0(3), 1(3), 2(3) ]
gap&gt; P2 := List([[0,2],[1,4],[3,4]],ResidueClass);
[ 0(2), 1(4), 3(4) ]
gap&gt; elm := RepresentativeAction(RCWA(Integers),P1,P2);
&lt;bijective rcwa mapping of Z with modulus 3&gt;
gap&gt; P1^elm = P2;
true
gap&gt; IsTame(elm);
false
gap&gt; elm := RepresentativeAction(RCWA(Integers),P1,P2:IsTame);
&lt;tame bijective rcwa mapping of Z with modulus 24&gt;
gap&gt; P1^elm = P2;
true
gap&gt; elm := RepresentativeAction(RCWA(Integers),
&gt;             [ResidueClass(1,3),
&gt;              ResidueClassUnion(Integers,3,[0,2])],
&gt;             [ResidueClassUnion(Integers,5,[2,4]),
&gt;              ResidueClassUnion(Integers,5,[0,1,3])]);
&lt;bijective rcwa mapping of Z with modulus 6&gt;
gap&gt; [ResidueClass(1,3),ResidueClassUnion(Integers,3,[0,2])]^elm;
[ 2(5) U 4(5), Z \ 2(5) U 4(5) ]

</pre></td></tr></table>

<p><a id="X781CBEFA7F39B58D" name="X781CBEFA7F39B58D"></a></p>

<h4>3.4 <span class="Heading">
  Special attributes of tame residue-class-wise affine groups
</span></h4>

<p>There are a couple of attributes which a priori make only sense for tame rcwa groups. With their help, various structural information about a given such group can be obtained. We have already seen above that there are for example methods for <code class="code">IsSolvable</code>, <code class="code">IsPerfect</code> and <code class="code">DerivedSubgroup</code> available for tame rcwa groups, while testing wild groups for solvability or perfectness is currently not always feasible. The purpose of this section is to describe the specific attributes of tame groups which are needed for these computations.</p>

<p><a id="X7F523A6B87825AB8" name="X7F523A6B87825AB8"></a></p>

<h5>3.4-1 <span class="Heading">
    RespectedPartition (of a tame rcwa group or -permutation)
  </span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RespectedPartition</code>( <var class="Arg">G</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; RespectedPartition</code>( <var class="Arg">g</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p><b>Returns: </b>A respected partition of the rcwa group <var class="Arg">G</var> / of the rcwa permutation <var class="Arg">g</var>.</p>

<p>A tame element g in RCWA(R) permutes a partition of R into finitely many residue classes on all of which it is affine. Given a tame group G &lt; RCWA(R), there is a common such partition for all elements of G. We call the mentioned partitions <em>respected partitions</em> of g or G, respectively.</p>

<p>An rcwa group or an rcwa permutation has a respected partition if and only if it is tame. This holds either by definition or by Theorem 2.5.8 in <a href="chapBib.html#biBKohl05">[Koh05]</a>, depending on how one introduces the notion of tameness.</p>

<p>Related attributes are <code class="code">RespectedPartitionShort</code> and <code class="code">RespectedPartitionLong</code>. The first of these denotes a respected partition consisting of residue classes r(m) where m divides the modulus of <var class="Arg">G</var> or <var class="Arg">g</var>, respectively. The second denotes a respected partition consisting of residue classes r(m) where the modulus of <var class="Arg">G</var> (respectively <var class="Arg">g</var>) divides m.</p>

<p>There is an operation <code class="code">RespectsPartition(<var class="Arg">G</var>,<var class="Arg">P</var>)</code> / <code class="code">RespectsPartition(<var class="Arg">g</var>,<var class="Arg">P</var>)</code>, which tests whether <var class="Arg">G</var> or <var class="Arg">g</var> respects a given partition <var class="Arg">P</var>. The permutation induced by <var class="Arg">g</var> on <code class="code">P</code> can be computed efficiently by <code class="code">PermutationOpNC(<var class="Arg">g</var>,P,OnPoints)</code>.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));
&lt;rcwa group over Z with 2 generators&gt;
gap&gt; IsTame(G);
true
gap&gt; Size(G);
infinity
gap&gt; P := RespectedPartition(G);
[ 3(6), 5(6), 0(8), 2(8), 4(8), 6(8), 1(12), 7(12) ]

</pre></td></tr></table>

<p><a id="X7A6786727EC1E4BB" name="X7A6786727EC1E4BB"></a></p>

<h5>3.4-2 <span class="Heading">
    ActionOnRespectedPartition &amp; KernelOfActionOnRespectedPartition
  </span></h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; ActionOnRespectedPartition</code>( <var class="Arg">G</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; KernelOfActionOnRespectedPartition</code>( <var class="Arg">G</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p><b>Returns: </b>The action of the tame rcwa group <var class="Arg">G</var> on <code class="code">RespectedPartition(<var class="Arg">G</var>)</code> or the kernel of this action, respectively.</p>

<p>The method for <code class="code">KernelOfActionOnRespectedPartition</code> uses the package <strong class="pkg">Polycyclic</strong> <a href="chapBib.html#biBPolycyclic">[EN06]</a>. The rank of the largest free abelian subgroup of the kernel of the action of <var class="Arg">G</var> on its stored respected partition can be computed by <code class="code">RankOfKernelOfActionOnRespectedPartition(<var class="Arg">G</var>)</code>.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));;
gap&gt; H := ActionOnRespectedPartition(G);
Group([ (3,7)(5,8), (3,4,5,6) ])
gap&gt; H = Action(G,P);
true
gap&gt; Size(H);
48
gap&gt; K := KernelOfActionOnRespectedPartition(G);
&lt;rcwa group over Z with 3 generators&gt;
gap&gt; RankOfKernelOfActionOnRespectedPartition(G);
3
gap&gt; Index(G,K);
48
gap&gt; List(GeneratorsOfGroup(K),Factorization);
[ [ ClassShift(0,4)^2 ], [ ClassShift(2,4)^2 ], [ ClassShift(1,6)^2 ] ]
gap&gt; Image(IsomorphismPcpGroup(K));
Pcp-group with orders [ 0, 0, 0 ]

</pre></td></tr></table>

<p>Let G be a tame rcwa group over Z, let mathcalP be a respected partition of G and put m := |mathcalP|. Then there is an rcwa permutation g which maps mathcalP to the partition of Z into the residue classes (mod m), and the conjugate G^g of G under such a permutation is integral (cf. <a href="chapBib.html#biBKohl05">[Koh05]</a>, Theorem 2.5.14).</p>

<p>The conjugate G^g can be determined by the operation <code class="code">IntegralConjugate</code>, and the conjugating permutation g can be determined by the operation <code class="code">IntegralizingConjugator</code>. Both operations are applicable to rcwa permutations as well. Note that a tame rcwa group does not determine its integral conjugate uniquely.</p>


<table class="example">
<tr><td><pre>

gap&gt; G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));;
gap&gt; G^IntegralizingConjugator(G) = IntegralConjugate(G);
true
gap&gt; RespectedPartition(G);
[ 3(6), 5(6), 0(8), 2(8), 4(8), 6(8), 1(12), 7(12) ]
gap&gt; RespectedPartition(G)^IntegralizingConjugator(G);
[ 0(8), 1(8), 2(8), 3(8), 4(8), 5(8), 6(8), 7(8) ]
gap&gt; last = RespectedPartition(IntegralConjugate(G));
true

</pre></td></tr></table>

<p><a id="X8302BA78810C1DEE" name="X8302BA78810C1DEE"></a></p>

<h4>3.5 <span class="Heading">Generating pseudo-random elements of RCWA(R) and CT(R)</span></h4>

<p>There are methods for the operation <code class="code">Random</code> for RCWA(R) and CT(R). These methods are designed to be suitable for generating interesting examples. No particular distribution is guaranteed.</p>


<table class="example">
<tr><td><pre>

gap&gt; elm := Random(RCWA(Integers));;
gap&gt; Display(elm);

Bijective rcwa mapping of Z with modulus 12

              n mod 12              |                n^f
------------------------------------+------------------------------------
   0  2  4  6  8 10                 | 3n + 2
   1  5  9                          | -n + 2
   3  7                             | (n - 7)/2
  11                                | (-n + 20)/3


</pre></td></tr></table>

<p>The elements which are returned by this method are obtained by multiplying class shifts (see <code class="func">ClassShift</code> (<a href="chap2.html#X86B611BD7EED62A1"><b>2.2-1</b></a>)), class reflections (see <code class="func">ClassReflection</code> (<a href="chap2.html#X7896C5417E3692B4"><b>2.2-2</b></a>)) and class transpositions (see <code class="func">ClassTransposition</code> (<a href="chap2.html#X8716A75F7DD1C46B"><b>2.2-3</b></a>)). These factors can be retrieved by factoring:</p>


<table class="example">
<tr><td><pre>

gap&gt; Factorization(elm);
[ ClassTransposition(0,2,3,4), ClassTransposition(3,4,4,6),
  ClassShift(0,2)^-1, ClassReflection(3,4), ClassReflection(1,4) ]

</pre></td></tr></table>

<p>There is an auxiliary function <code class="code">ClassPairs([<var class="Arg">R</var>,] <var class="Arg">m</var>)</code>, which is used in this context. In its one-argument form, this function returns a list of 4-tuples (r_1,m_1,r_2,m_2) of integers corresponding to the unordered pairs of disjoint residue classes r_1(m_1) and r_2(m_2) with m_1, m_2 &lt;= m. In its two-argument form, it does "the equivalent" for the ring <var class="Arg">R</var>.</p>


<table class="example">
<tr><td><pre>

gap&gt; List(ClassPairs(4),ClassTransposition);
[ ClassTransposition(0,2,1,2), ClassTransposition(0,2,1,4),
  ClassTransposition(0,2,3,4), ClassTransposition(0,3,1,3),
  ClassTransposition(0,3,2,3), ClassTransposition(0,4,1,4),
  ClassTransposition(0,4,2,4), ClassTransposition(0,4,3,4),
  ClassTransposition(1,2,0,4), ClassTransposition(1,2,2,4),
  ClassTransposition(1,3,2,3), ClassTransposition(1,4,2,4),
  ClassTransposition(1,4,3,4), ClassTransposition(2,4,3,4) ]
gap&gt; List(last,TransposedClasses);
[ [ 0(2), 1(2) ], [ 0(2), 1(4) ], [ 0(2), 3(4) ], [ 0(3), 1(3) ],
  [ 0(3), 2(3) ], [ 0(4), 1(4) ], [ 0(4), 2(4) ], [ 0(4), 3(4) ],
  [ 1(2), 0(4) ], [ 1(2), 2(4) ], [ 1(3), 2(3) ], [ 1(4), 2(4) ],
  [ 1(4), 3(4) ], [ 2(4), 3(4) ] ]

</pre></td></tr></table>

<p><a id="X86327F6C83D09798" name="X86327F6C83D09798"></a></p>

<h4>3.6 <span class="Heading">The categories of residue-class-wise affine groups</span></h4>

<p><a id="X84AFBB997B694A3D" name="X84AFBB997B694A3D"></a></p>

<h5>3.6-1 IsRcwaGroup</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; IsRcwaGroup</code>( <var class="Arg">G</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; IsRcwaGroupOverZ</code>( <var class="Arg">G</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; IsRcwaGroupOverZ_pi</code>( <var class="Arg">G</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&gt; IsRcwaGroupOverGFqx</code>( <var class="Arg">G</var> )</td><td class="tdright">( filter )</td></tr></table></div>
<p><b>Returns: </b><code class="code">true</code> if <var class="Arg">G</var> is an rcwa group, an rcwa group over the ring of integers, an rcwa group over a semilocalization of the ring of integers or an rcwa group over a polynomial ring in one variable over a finite field, respectively, and <code class="code">false</code> otherwise.</p>

<p>Often the same methods can be used for rcwa groups over the ring of integers and over its semilocalizations. For this reason there is a category <code class="code">IsRcwaGroupOverZOrZ_pi</code> which is the union of <code class="code">IsRcwaGroupOverZ</code> and <code class="code">IsRcwaGroupOverZ_pi</code>.</p>

<p>To allow distinguishing the groups RCWA(R) and CT(R) from others, they have the characteristic property <code class="code">IsNaturalRCWA</code> or <code class="code">IsNaturalCT</code>, respectively.</p>


<div class="chlinkprevnextbot">&nbsp;<a href="chap0.html">Top of Book</a>&nbsp;  &nbsp;<a href="chap2.html">Previous Chapter</a>&nbsp;  &nbsp;<a href="chap4.html">Next Chapter</a>&nbsp;  </div>


<div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a>  <a href="chap1.html">1</a>  <a href="chap2.html">2</a>  <a href="chap3.html">3</a>  <a href="chap4.html">4</a>  <a href="chap5.html">5</a>  <a href="chap6.html">6</a>  <a href="chap7.html">7</a>  <a href="chapBib.html">Bib</a>  <a href="chapInd.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>