GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
<!-- #################################################################### -->1<!-- ## ## -->2<!-- ## rcwagrp.xml RCWA documentation Stefan Kohl ## -->3<!-- ## ## -->4<!-- #################################################################### -->56<Chapter Label="ch:RcwaGroups">7<Heading>Residue-Class-Wise Affine Groups</Heading>89<Ignore Remark="settings for the example tester">10<Example>11<![CDATA[12gap> SizeScreen([75,24]);;13gap> SetAssertionLevel(0);14]]>15</Example>16</Ignore>1718In this chapter, we describe how to construct residue-class-wise affine19groups and how to compute with them.2021<!-- #################################################################### -->2223<Section Label="sec:ContructingRcwaGroups">24<Heading>Constructing residue-class-wise affine groups</Heading>2526<Index Key="Group"><C>Group</C></Index>27<Index Key="GroupByGenerators"><C>GroupByGenerators</C></Index>28<Index Key="GroupWithGenerators"><C>GroupWithGenerators</C></Index>2930As any other groups in &GAP;, residue-class-wise affine (rcwa-) groups31can be constructed by <C>Group</C>, <C>GroupByGenerators</C> or32<C>GroupWithGenerators</C>.3334<Example>35<![CDATA[36gap> G := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));37<rcwa group over Z with 2 generators>38gap> IsTame(G); Size(G); IsSolvable(G); IsPerfect(G);39true40infinity41false42false43]]>44</Example>4546An rcwa group isomorphic to a given group can be obtained by taking47the image of a faithful rcwa representation:4849<ManSection>50<Attr Name="IsomorphismRcwaGroup"51Arg="G, R" Label="for a group, over a given ring"/>52<Attr Name="IsomorphismRcwaGroup"53Arg="G" Label="for a group"/>54<Returns>55a monomorphism from the group <A>G</A> to RCWA(<A>R</A>)56or to RCWA(&ZZ;), respectively.57</Returns>58<Description>59The best-supported case is <A>R</A> = &ZZ;.60Currently there are methods available for finite groups, for61free products of finite groups and for free groups. The method for62free products of finite groups uses the Table-Tennis Lemma63(cf. e.g. Section II.B. in <Cite Key="LaHarpe00"/>), and the64method for free groups uses an adaptation of the construction given65on page 27 in <Cite Key="LaHarpe00"/> from PSL(2,&CC;)66to RCWA(&ZZ;). <P/>67<Example>68<![CDATA[69gap> F := FreeProduct(Group((1,2)(3,4),(1,3)(2,4)),Group((1,2,3)),70> SymmetricGroup(3));71<fp group on the generators [ f1, f2, f3, f4, f5 ]>72gap> IsomorphismRcwaGroup(F);73[ f1, f2, f3, f4, f5 ] -> [ <rcwa permutation of Z with modulus 12>,74<rcwa permutation of Z with modulus 24>,75<rcwa permutation of Z with modulus 12>,76<rcwa permutation of Z with modulus 72>,77<rcwa permutation of Z with modulus 36> ]78gap> IsomorphismRcwaGroup(FreeGroup(2));79[ f1, f2 ] -> [ <wild rcwa permutation of Z with modulus 8>,80<wild rcwa permutation of Z with modulus 8> ]81gap> F2 := Image(last);82<wild rcwa group over Z with 2 generators>83]]>84</Example>85</Description>86</ManSection>8788Further, new rcwa groups can be constructed from given ones by89taking direct products and by taking wreath products with finite90groups or with the infinite cyclic group:9192<ManSection>93<Meth Name="DirectProduct"94Arg="G1, G2, ..." Label="for rcwa groups over Z"/>95<Returns>96an rcwa group isomorphic to the direct product of the rcwa groups97over &ZZ; given as arguments.98</Returns>99<Description>100There is certainly no unique or canonical way to embed a direct101product of rcwa groups into RCWA(&ZZ;).102This method chooses to embed the groups <A>G1</A>, <A>G2</A>,103<A>G3</A> ... via restrictions by <M>n \mapsto mn</M>,104<M>n \mapsto mn+1</M>, <M>n \mapsto mn+2</M> ...105(<M>\rightarrow</M> <Ref Oper="Restriction"106Label="of an rcwa group, by an injective rcwa mapping"/>),107where <M>m</M> denotes the number of groups given as arguments.108<Example>109<![CDATA[110gap> F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;111gap> F2xF2 := DirectProduct(F2,F2);112<wild rcwa group over Z with 4 generators>113gap> Image(Projection(F2xF2,1)) = F2;114true115]]>116</Example>117</Description>118</ManSection>119120<ManSection>121<Heading>122WreathProduct123(for an rcwa group over Z, with a permutation group or (&ZZ;,+))124</Heading>125<Meth Name="WreathProduct" Arg="G, P"126Label="for an rcwa group over Z and a permutation group"/>127<Meth Name="WreathProduct" Arg="G, Z"128Label="for an rcwa group over Z and the infinite cyclic group"/>129<Returns>130an rcwa group isomorphic to the wreath product of the rcwa131group <A>G</A> over &ZZ; with the finite permutation132group <A>P</A> or with the infinite cyclic group <A>Z</A>,133respectively.134</Returns>135<Description>136The first-mentioned method embeds the <C>NrMovedPoints(<A>P</A>)</C>th137direct power of <A>G</A> using the method for <C>DirectProduct</C>,138and lets the permutation group <A>P</A> act naturally on the set of139residue classes modulo <C>NrMovedPoints(<A>P</A>)</C>.140The second-mentioned method restricts141(<M>\rightarrow</M> <Ref Oper="Restriction"142Label="of an rcwa group, by an injective rcwa mapping"/>)143the group <A>G</A> to the residue class 3(4), and maps the144generator of the infinite cyclic group <A>Z</A>145to <C>ClassTransposition(0,2,1,2) * ClassTransposition(0,2,1,4)</C>.146<Example>147<![CDATA[148gap> F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;149gap> F2wrA5 := WreathProduct(F2,AlternatingGroup(5));;150gap> Embedding(F2wrA5,1);151[ <wild rcwa permutation of Z with modulus 8>,152<wild rcwa permutation of Z with modulus 8> ] ->153[ <wild rcwa permutation of Z with modulus 40>,154<wild rcwa permutation of Z with modulus 40> ]155gap> Embedding(F2wrA5,2);156[ (1,2,3,4,5), (3,4,5) ] -> [ ( 0(5), 1(5), 2(5), 3(5), 4(5) ),157( 2(5), 3(5), 4(5) ) ]158gap> ZwrZ := WreathProduct(Group(ClassShift(0,1)),Group(ClassShift(0,1)));159<wild rcwa group over Z with 2 generators>160gap> Embedding(ZwrZ,1);161[ ClassShift( Z ) ] ->162[ <tame rcwa permutation of Z with modulus 4, of order infinity> ]163gap> Embedding(ZwrZ,2);164[ ClassShift( Z ) ] -> [ <wild rcwa permutation of Z with modulus 4> ]165]]>166</Example>167</Description>168</ManSection>169170Also, rcwa groups can be obtained as particular extensions of finite171permutation groups:172173<ManSection>174<Oper Name="MergerExtension"175Arg="G, points, point" Label="for finite permutation groups"/>176<Returns>177roughly spoken, an extension of <A>G</A> by an involution178which <Q>merges</Q> <A>points</A> into <A>point</A>.179</Returns>180<Description>181The arguments of this operation are a finite permutation182group <A>G</A>, a set <A>points</A> of points moved by <A>G</A>183and a single point <A>point</A> moved by <A>G</A> which is not in184<A>points</A>. <P/>185186Let <M>n</M> be the largest moved point of <A>G</A>, and let187<M>H</M> be the tame subgroup of CT(&ZZ;) which respects the188partition <M>\mathcal{P}</M> of &ZZ; into the residue classes189(mod <M>n</M>), and which acts on <M>\mathcal{P}</M>190as <A>G</A> acts on <M>\{1, \dots, n\}</M>.191Further assume that <A>points</A> = <M>\{p_1, \dots, p_k\}</M> and192<A>point</A> = <M>p</M>, and put <M>r_i := p_i-1, \ i = 1, \dots, k</M>193and <M>r := p-1</M>. Now let <M>\sigma</M> be the product of the194class transpositions <M>\tau_{r_i(n),r+(i-1)n(kn)}, \ i = 1, \dots, k</M>.195The group returned by this operation is the extension of <M>H</M>196by the involution <M>\sigma</M>. --197On first reading, this may look a little complicated, but really the198code of the method is only about half as long as this description.199<Example>200<![CDATA[201gap> # First example -- a group isomorphic to PSL(2,Z):202gap> G := MergerExtension(Group((1,2,3)),[1,2],3);203<rcwa group over Z with 2 generators>204gap> Size(G);205infinity206gap> GeneratorsOfGroup(G);207[ ( 0(3), 1(3), 2(3) ), ( 0(3), 2(6) ) ( 1(3), 5(6) ) ]208gap> B := Ball(G,One(G),6:Spheres);;209gap> List(B,Length);210[ 1, 3, 4, 6, 8, 12, 16 ]211gap> #212gap> # Second example -- a group isomorphic to Thompson's group V:213gap> G := MergerExtension(Group((1,2,3,4),(1,2)),[1,2],3);214<rcwa group over Z with 3 generators>215gap> Size(G);216infinity217gap> GeneratorsOfGroup(G);218[ ( 0(4), 1(4), 2(4), 3(4) ), ( 0(4), 1(4) ),219( 0(4), 2(8) ) ( 1(4), 6(8) ) ]220gap> B := Ball(G,One(G),6:Spheres);;221gap> List(B,Length);222[ 1, 4, 11, 28, 69, 170, 413 ]223gap> G = Group(List([[0,2,1,2],[1,2,2,4],[0,2,1,4],[1,4,2,4]],224> ClassTransposition));225true226]]>227</Example>228</Description>229</ManSection>230231It is also possible to build an rcwa group from a list of residue classes:232233<ManSection>234<Func Name="GroupByResidueClasses" Arg="classes"235Label="the group `permuting a given list of residue classes'"/>236<Returns>237the group which is generated by all class transpositions which238interchange disjoint residue classes in <A>classes</A>.239</Returns>240<Description>241The argument <A>classes</A> must be a list of residue classes. <P/>242243If the residue classes in <A>classes</A> are pairwise244disjoint, then the returned group is the symmetric group on245<A>classes</A>. If any two residue classes in <A>classes</A>246intersect non-trivially, then the returned group is trivial.247In many other cases, the returned group is infinite.248<Example>249<![CDATA[250gap> G := GroupByResidueClasses(List([[0,2],[0,4],[1,4],[2,4],[3,4]],251> ResidueClass));252<rcwa group over Z with 8 generators>253gap> H := Group(List([[0,2,1,2],[1,2,2,4],[0,2,1,4],[1,4,2,4]],254> ClassTransposition)); # Thompson's group V255<(0(2),1(2)),(1(2),2(4)),(0(2),1(4)),(1(4),2(4))>256gap> G = H;257true258]]>259</Example>260</Description>261</ManSection>262263Various ways to construct rcwa groups are based on certain264monomorphisms from the group RCWA(<M>R</M>) into itself.265Examples are the constructions of direct products and wreath products266described above. The support of the image of such a monomorphism is267the image of a given injective rcwa mapping. For this reason,268these monomorphisms are called <E>restriction monomorphisms</E>.269The following operation computes images of rcwa mappings and -groups270under these embeddings of RCWA(<M>R</M>) into itself:271272<ManSection>273<Heading>274Restriction (of an rcwa mapping or -group, by an injective rcwa mapping)275</Heading>276<Oper Name="Restriction"277Arg="g, f" Label="of an rcwa mapping, by an injective rcwa mapping"/>278<Oper Name="Restriction"279Arg="G, f" Label="of an rcwa group, by an injective rcwa mapping"/>280<Returns>281the restriction of the rcwa mapping <A>g</A> (respectively the282rcwa group <A>G</A>) by the injective rcwa mapping <A>f</A>.283</Returns>284<Description>285By definition, the <E>restriction</E> <M>g_f</M> of an rcwa mapping286<A>g</A> by an injective rcwa mapping <A>f</A> is the unique rcwa287mapping which satisfies the equation <M>f \cdot g_f = g \cdot f</M>288and which fixes the complement of the image of <A>f</A> pointwise.289If <A>f</A> is bijective, the restriction of <A>g</A> by <A>f</A>290is just the conjugate of <A>g</A> under <A>f</A>. <P/>291292The <E>restriction</E> of an rcwa group <A>G</A> by an injective293rcwa mapping <A>f</A> is defined as the group whose elements are294the restrictions of the elements of <A>G</A> by <A>f</A>.295The restriction of <A>G</A> by <A>f</A> acts on the296image of <A>f</A> and fixes its complement pointwise.297<Example>298<![CDATA[299gap> F2tilde := Restriction(F2,RcwaMapping([[5,3,1]]));300<wild rcwa group over Z with 2 generators>301gap> Support(F2tilde);3023(5)303]]>304</Example>305</Description>306</ManSection>307308<ManSection>309<Heading>310Induction (of an rcwa mapping or -group, by an injective rcwa mapping)311</Heading>312<Oper Name ="Induction"313Arg="g, f" Label="of an rcwa mapping, by an injective rcwa mapping"/>314<Oper Name ="Induction"315Arg="G, f" Label="of an rcwa group, by an injective rcwa mapping"/>316<Returns>317the induction of the rcwa mapping <A>g</A> (respectively the rcwa318group <A>G</A>) by the injective rcwa mapping <A>f</A>.319</Returns>320<Description>321<E>Induction</E> is the right inverse of restriction, i.e. it is322<C>Induction(Restriction(<A>g</A>,<A>f</A>),<A>f</A>) = <A>g</A></C> and323<C>Induction(Restriction(<A>G</A>,<A>f</A>),<A>f</A>) = <A>G</A></C>.324The mapping <A>g</A> respectively the group <A>G</A> must not325move points outside the image of <A>f</A>.326<Example>327<![CDATA[328gap> Induction(F2tilde,RcwaMapping([[5,3,1]])) = F2;329true330]]>331</Example>332</Description>333</ManSection>334335<Index Key="SmallGeneratingSet"><C>SmallGeneratingSet</C></Index>336337Once having constructed an rcwa group, it is sometimes possible338to obtain a smaller generating set by the operation339<C>SmallGeneratingSet</C>. <P/>340341<Index Key="View" Subkey="for an rcwa group"><C>View</C></Index>342<Index Key="Display" Subkey="for an rcwa group"><C>Display</C></Index>343<Index Key="Print" Subkey="for an rcwa group"><C>Print</C></Index>344<Index Key="String" Subkey="for an rcwa group"><C>String</C></Index>345346There are methods for the operations <C>View</C>, <C>Display</C>,347<C>Print</C> and <C>String</C> which are applicable to rcwa groups. <P/>348349<Index Key="rcwa group" Subkey="modulus">rcwa group</Index>350<Index Key="rcwa group" Subkey="multiplier">rcwa group</Index>351<Index Key="rcwa group" Subkey="divisor">rcwa group</Index>352<Index Key="rcwa group" Subkey="prime set">rcwa group</Index>353<Index Key="rcwa group" Subkey="class-wise translating">rcwa group</Index>354<Index Key="rcwa group" Subkey="integral">rcwa group</Index>355<Index Key="rcwa group" Subkey="class-wise order-preserving">356rcwa group357</Index>358<Index Key="rcwa group" Subkey="sign-preserving">rcwa group</Index>359360<Index Key="Modulus" Subkey="of an rcwa group"><C>Modulus</C></Index>361<Index Key="Mod" Subkey="for an rcwa group"><C>Mod</C></Index>362<Index Key="ModulusOfRcwaMonoid" Subkey="for an rcwa group">363<C>ModulusOfRcwaMonoid</C>364</Index>365<Index Key="Multiplier" Subkey="of an rcwa group"><C>Multiplier</C></Index>366<Index Key="Mult" Subkey="for an rcwa group"><C>Mult</C></Index>367<Index Key="Divisor" Subkey="of an rcwa group"><C>Divisor</C></Index>368<Index Key="Div" Subkey="for an rcwa group"><C>Div</C></Index>369<Index Key="PrimeSet" Subkey="of an rcwa group"><C>PrimeSet</C></Index>370<Index Key="IsClassWiseTranslating" Subkey="for an rcwa group">371<C>IsClassWiseTranslating</C>372</Index>373<Index Key="IsIntegral" Subkey="for an rcwa group"><C>IsIntegral</C></Index>374<Index Key="IsClassWiseOrderPreserving" Subkey="for an rcwa group">375<C>IsClassWiseOrderPreserving</C>376</Index>377<Index Key="IsSignPreserving" Subkey="for an rcwa group">378<C>IsSignPreserving</C>379</Index>380381Basic attributes of an rcwa group which are derived from the coefficients382of its elements are <C>Modulus</C>, <C>Multiplier</C>, <C>Divisor</C> and383<C>PrimeSet</C>.384The <E>modulus</E> of an rcwa group is the lcm of the moduli of its385elements if such an lcm exists, i.e. if the group is tame, and 0 otherwise.386The <E>multiplier</E> respectively <E>divisor</E> of an rcwa group is the387lcm of the multipliers respectively divisors of its elements in case such388an lcm exists and <M>\infty</M> otherwise.389The <E>prime set</E> of an rcwa group is the union of the prime sets of390its elements.391There are shorthands <C>Mod</C>, <C>Mult</C> and <C>Div</C> defined for392<C>Modulus</C>, <C>Multiplier</C> and <C>Divisor</C>, respectively.393An rcwa group is called <E>class-wise translating</E>, <E>integral</E>394or <E>class-wise order-preserving</E> if all of its elements are so.395There are corresponding methods available for <C>IsClassWiseTranslating</C>,396<C>IsIntegral</C> and <C>IsClassWiseOrderPreserving</C>. There is a property397<C>IsSignPreserving</C>, which indicates whether a given rcwa group398over &ZZ; acts on the set of nonnegative integers.399The latter holds for any subgroup of CT(&ZZ;) (cf. below).400401<Example>402<![CDATA[403gap> G := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,3,2,6),404> ClassReflection(2,4));405<rcwa group over Z with 3 generators>406gap> List([Modulus,Multiplier,Divisor,PrimeSet,IsClassWiseTranslating,407> IsIntegral,IsClassWiseOrderPreserving,IsSignPreserving],f->f(G));408[ 24, 2, 2, [ 2, 3 ], false, false, false, false ]409]]>410</Example>411412All rcwa groups over a ring <M>R</M> are subgroups of RCWA(<M>R</M>).413The group RCWA(<M>R</M>) itself is not finitely generated, thus cannot414be constructed as described above. It is handled as a special case:415416<ManSection>417<Func Name="RCWA" Arg="R"418Label="the group formed by all rcwa permutations of a ring"/>419<Returns>420the group RCWA(<A>R</A>) of all residue-class-wise affine421permutations of the ring <A>R</A>.422</Returns>423<Description>424<Example>425<![CDATA[426gap> RCWA_Z := RCWA(Integers);427RCWA(Z)428gap> IsSubgroup(RCWA_Z,G);429true430]]>431</Example>432</Description>433</ManSection>434435Examples of rcwa permutations can be obtained via436<C>Random(RCWA(<A>R</A>))</C>, see Section <Ref Label="sec:Random"/>.437438<Index Key="NrConjugacyClassesOfRCWAZOfOrder">439<C>NrConjugacyClassesOfRCWAZOfOrder</C>440</Index>441442The number of conjugacy classes of RCWA(&ZZ;) of elements of443given order is known, cf. Corollary 2.7.1 (b)444in <Cite Key="Kohl05"/>. It can be determined by the function445<C>NrConjugacyClassesOfRCWAZOfOrder</C>:446447<Example>448<![CDATA[449gap> List([2,105],NrConjugacyClassesOfRCWAZOfOrder);450[ infinity, 218 ]451]]>452</Example>453454We denote the group which is generated by all455class transpositions of the ring <M>R</M> by CT(<M>R</M>).456This group is handled as a special case as well:457458<ManSection>459<Func Name="CT" Arg="R"460Label="the group generated by all class transpositions of a ring"/>461<Func Name="CT" Arg="P, Integers"462Label="subgroup of CT(Z)"/>463<Returns>464the group CT(<A>R</A>) which is generated by all465class transpositions of the ring <A>R</A>, respectively,466the group CT(<A>P</A>,&ZZ;) which is generated by all467class transpositions of &ZZ; which interchange residue classes468whose moduli have only prime factors in the finite set <A>P</A>.469</Returns>470<Description>471<Example>472<![CDATA[473gap> CT_Z := CT(Integers);474CT(Z)475gap> IsSimple(CT_Z); # One of a number of stored attributes/properties.476true477gap> V := CT([2],Integers);478CT_[ 2 ](Z)479gap> GeneratorsOfGroup(V);480[ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 0(2), 1(4) ), ( 1(4), 2(4) ) ]481gap> G := CT([2,3],Integers);482CT_[ 2, 3 ](Z)483gap> GeneratorsOfGroup(G);484[ ( 0(2), 1(2) ), ( 0(3), 1(3) ), ( 1(3), 2(3) ), ( 0(2), 1(4) ),485( 0(2), 5(6) ), ( 0(3), 1(6) ) ]486]]>487</Example>488</Description>489</ManSection>490491<Index Key="Mirrored"> <C>Mirrored</C> </Index>492493The group CT(&ZZ;) has an outer automorphism which is given by conjugation494with <M>n \mapsto -n - 1</M>. This automorphism can be applied to an495rcwa mapping of &ZZ; or to an rcwa group over &ZZ; by the operation496<C>Mirrored</C>. The group <C>Mirrored(</C><A>G</A><C>)</C> acts on the497nonnegative integers as <A>G</A> acts on the negative integers, and vice498versa.499500<Example>501<![CDATA[502gap> ct := ClassTransposition(0,2,1,6);503( 0(2), 1(6) )504gap> Mirrored(ct);505( 1(2), 4(6) )506gap> G := Group(List([[0,2,1,2],[0,3,2,3],[2,4,1,6]],ClassTransposition));;507gap> ShortOrbits(G,[-100..100],100);508[ [ 0, 1, 2, 3, 4, 5 ] ]509gap> ShortOrbits(Mirrored(G),[-100..100],100);510[ [ -6, -5, -4, -3, -2, -1 ] ]511]]>512</Example>513514<Index Key="AllElementsOfCTZWithGivenModulus">515<C>AllElementsOfCTZWithGivenModulus</C>516</Index>517<Index Key="NrElementsOfCTZWithGivenModulus">518<C>NrElementsOfCTZWithGivenModulus</C>519</Index>520521Under the hypothesis that CT(&ZZ;) is the setwise522stabilizer of <M>&NN;_0</M> in RCWA(&ZZ;), the elements of CT(&ZZ;) with523modulus dividing a given positive integer <M>m</M> are parametrized by524the ordered partitions of &ZZ; into <M>m</M> residue classes.525The list of these elements for given <M>m</M> can be obtained by526the function <C>AllElementsOfCTZWithGivenModulus</C>, and the numbers527of such elements for <M>m \leq 24</M> are stored in the list528<C>NrElementsOfCTZWithGivenModulus</C>.529530<Example>531<![CDATA[532gap> NrElementsOfCTZWithGivenModulus{[1..8]};533[ 1, 1, 17, 238, 4679, 115181, 3482639, 124225680 ]534]]>535</Example>536537<Index Key="NrConjugacyClassesOfRCWAZOfOrder">538<C>NrConjugacyClassesOfCTZOfOrder</C>539</Index>540541The number of conjugacy classes of CT(&ZZ;) of elements of542given order is also known under the hypothesis that CT(&ZZ;) is the setwise543stabilizer of <M>&NN;_0</M> in RCWA(&ZZ;). It can be determined by the544function <C>NrConjugacyClassesOfCTZOfOrder</C>.545546</Section>547548<!-- #################################################################### -->549550<Section Label="sec:InvestigatingRcwaGroups">551<Heading>552Basic routines for investigating residue-class-wise affine groups553</Heading>554555In the previous section we have seen how to construct rcwa groups.556The purpose of this section is to describe how to obtain information on557the structure of an rcwa group and on its action on the underlying ring.558The easiest way to get a little (but really only <E>a very little</E>!)559information on the group structure is a dedicated method for the operation560<C>StructureDescription</C>:561562<ManSection>563<Meth Name="StructureDescription" Arg="G" Label="for an rcwa group"/>564<Returns>565a string which sometimes gives a little glimpse of the structure566of the rcwa group <A>G</A>.567</Returns>568<Description>569The attribute <C>StructureDescription</C> for finite groups is570documented in the &GAP; Reference Manual. Therefore we describe here571only issues which are specific to infinite groups, and in particular572to rcwa groups. <P/>573574Wreath products are denoted by <C>wr</C>, and free products575are denoted by <C>*</C>. The infinite cyclic group (&ZZ;,+) is576denoted by <C>Z</C>, the infinite dihedral group is denoted577by <C>D0</C> and free groups of rank <M>2,3,4,\dots</M>578are denoted by <C>F2</C>, <C>F3</C>, <C>F4</C>, <M>\dots</M>.579While for finite groups the symbol <C>.</C> is used to denote a580non-split extension, for rcwa groups in general it stands for an581extension which may be split or not.582For wild groups in most cases it happens that there is a large section583on which no structural information can be obtained. Such sections of the584group with unknown structure are denoted by <C><unknown></C>.585In general, the structure of a section denoted by <C><unknown></C>586can be very complicated and very difficult to exhibit.587<Example>588<![CDATA[589gap> G := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));;590gap> StructureDescription(G);591"(Z x Z x Z x Z x Z x Z x Z) . (C2 x S7)"592gap> G := Group(ClassTransposition(0,2,1,4),593> ClassShift(2,4),ClassReflection(1,2));;594gap> StructureDescription(G:short);595"Z^2.((S3xS3):2)"596gap> F2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;597gap> PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(3),598> CyclicGroup(2))));;599gap> G := DirectProduct(PSL2Z,F2);600<wild rcwa group over Z with 4 generators>601gap> StructureDescription(G);602"(C3 * C2) x F2"603gap> G := WreathProduct(G,CyclicGroup(IsRcwaGroupOverZ,infinity));604<wild rcwa group over Z with 5 generators>605gap> StructureDescription(G);606"((C3 * C2) x F2) wr Z"607gap> Collatz := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);;608gap> G := Group(Collatz,ClassShift(0,1));;609gap> StructureDescription(G:short);610"<unknown>.Z"611]]>612</Example>613</Description>614</ManSection>615616The extent to which the structure of an rcwa group can be exhibited617automatically is severely limited. In general, one can find out much more618about the structure of a given rcwa group in an interactive session using619the functionality described in the rest of this section and elsewhere in620this manual. <P/>621622<Index Key="Size" Subkey="for an rcwa group"><C>Size</C></Index>623624The order of an rcwa group can be computed by the operation <C>Size</C>.625An rcwa group is finite if and only if it is tame and its action on a626suitably chosen respected partition (see <Ref Attr="RespectedPartition"627Label="of a tame rcwa group"/>) is faithful.628Hence the problem of computing the order of an rcwa group reduces to629the problem of deciding whether it is tame, the problem of deciding whether630it acts faithfully on a respected partition and the problem of computing the631order of the finite permutation group induced on the respected partition.632633<Example>634<![CDATA[635gap> G := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,3,2,3),636> ClassReflection(0,5));637<rcwa group over Z with 3 generators>638gap> Size(G);63946080640]]>641</Example>642643<Index Key="IsomorphismPermGroup" Subkey="for a finite rcwa group">644<C>IsomorphismPermGroup</C>645</Index>646647For a finite rcwa group, an isomorphism to a permutation group can be648computed by <C>IsomorphismPermGroup</C>:649650<Example>651<![CDATA[652gap> G := Group(ClassTransposition(0,2,1,2),ClassTransposition(0,3,1,3));;653gap> IsomorphismPermGroup(G);654[ ( 0(2), 1(2) ), ( 0(3), 1(3) ) ] -> [ (1,2)(3,4)(5,6), (1,2)(4,5) ]655]]>656</Example>657658<Index Key="rcwa group" Subkey="membership test">rcwa group</Index>659<Index Key="OrbitLengthBound"><C>OrbitLengthBound</C></Index>660661In general the membership problem for rcwa groups is algorithmically662unsolvable, see Corollary 4.5 in <Cite Key="Kohl09"/>.663A consequence of this is that a membership test <Q><C>g in G</C></Q> may664run into an infinite loop if the rcwa permutation <C>g</C> is not an665element of the rcwa group <C>G</C>. For tame rcwa groups however666membership can always be decided. For wild rcwa groups, membership can667very often be decided quite quick as well, but -- as said -- not always.668Anyway, if <C>g</C> is contained in <C>G</C>, the membership test will669eventually always return <C>true</C>, provided that there are sufficient670computing resources available (memory etc.). <P/>671672On Info level 2 of <C>InfoRCWA</C> the membership test provides673information on reasons why the given rcwa permutation is an element of674the given rcwa group or not. <P/>675676The membership test <Q><C>g in G</C></Q> recognizes an option677<C>OrbitLengthBound</C>. If this option is set, it returns <C>false</C>678once it has computed balls of size exceeding <C>OrbitLengthBound</C>679about 1 and <C>g</C> in <C>G</C>, and these balls are still disjoint.680Note however that due to the algorithmic unsolvability of the membership681problem, &RCWA; has no means to check the correctness of such bound682in a given case. So the correct use of this option has to remain within683the full responsibility of the user.684685<Example>686<![CDATA[687gap> G := Group(ClassShift(0,3),ClassTransposition(0,3,2,6));;688gap> ClassShift(2,6)^7 * ClassTransposition(0,3,2,6)689> * ClassShift(0,3)^-3 in G;690true691gap> ClassShift(0,1) in G;692false693]]>694</Example>695696<Index Key="rcwa group" Subkey="conjugacy problem">rcwa group</Index>697<Index Key="IsConjugate" Subkey="for elements of RCWA(R)">698<C>IsConjugate</C>699</Index>700<Index Key="IsConjugate" Subkey="for elements of CT(R)">701<C>IsConjugate</C>702</Index>703704The conjugacy problem for rcwa groups is difficult, and &RCWA; provides705only methods to solve it in some reasonably easy cases.706707<Example>708<![CDATA[709gap> IsConjugate(RCWA(Integers),710> ClassTransposition(0,2,1,4),ClassShift(0,1));711false712gap> IsConjugate(CT(Integers),ClassTransposition(0,2,1,6),713> ClassTransposition(1,4,0,8));714true715gap> g := RepresentativeAction(CT(Integers),ClassTransposition(0,2,1,6),716> ClassTransposition(1,4,0,8));717<rcwa permutation of Z with modulus 48>718gap> ClassTransposition(0,2,1,6)^g = ClassTransposition(1,4,0,8);719true720]]>721</Example>722723<Index Key="IsTame" Subkey="for an rcwa group"><C>IsTame</C></Index>724There is a property <C>IsTame</C> which indicates whether an rcwa group725is tame or not:726727<Example>728<![CDATA[729gap> G := Group(ClassTransposition(0,2,1,4),ClassShift(1,3));;730gap> H := Group(ClassTransposition(0,2,1,6),ClassShift(1,3));;731gap> IsTame(G);732true733gap> IsTame(H);734false735]]>736</Example>737738<Index Key="IsSolvable" Subkey="for an rcwa group"><C>IsSolvable</C></Index>739<Index Key="IsPerfect" Subkey="for an rcwa group"><C>IsPerfect</C></Index>740<Index Key="DerivedSubgroup" Subkey="of an rcwa group">741<C>DerivedSubgroup</C>742</Index>743<Index Key="Index" Subkey="for rcwa groups"><C>Index</C></Index>744<Index Key="IsomorphismMatrixGroup" Subkey="for an rcwa group">745<C>IsomorphismMatrixGroup</C>746</Index>747<Index Key="Exponent" Subkey="of an rcwa group"><C>Exponent</C></Index>748749For tame rcwa groups, there are methods for <C>IsSolvable</C> and750<C>IsPerfect</C> available, and usually derived subgroups and subgroup751indices can be computed as well. Linear representations of tame groups752over the rationals can be determined by the operation753<C>IsomorphismMatrixGroup</C>. Testing a wild group for solvability754or perfectness is currently not always feasible, and wild groups755have in general no faithful finite-dimensional linear representations.756There is a method for <C>Exponent</C> available, which works basically757for any rcwa group.758759<Example>760<![CDATA[761gap> G := Group(ClassTransposition(0,2,1,4),ClassShift(1,2));;762gap> IsPerfect(G);763false764gap> IsSolvable(G);765true766gap> D1 := DerivedSubgroup(G);; D2 := DerivedSubgroup(D1);;767gap> IsAbelian(D2);768true769gap> Index(G,D1); Index(D1,D2);770infinity7719772gap> StructureDescription(G); StructureDescription(D1);773"(Z x Z x Z) . S3"774"(Z x Z) . C3"775gap> Q := D1/D2;776Group([ (), (1,2,4)(3,5,7)(6,8,9), (1,3,6)(2,5,8)(4,7,9) ])777gap> StructureDescription(Q);778"C3 x C3"779gap> Exponent(G);780infinity781gap> phi := IsomorphismMatrixGroup(G);;782gap> Display(Image(phi,ClassTransposition(0,2,1,4)));783[ [ 0, 0, 1/2, -1/2, 0, 0 ],784[ 0, 0, 0, 1, 0, 0 ],785[ 2, 1, 0, 0, 0, 0 ],786[ 0, 1, 0, 0, 0, 0 ],787[ 0, 0, 0, 0, 1, 0 ],788[ 0, 0, 0, 0, 0, 1 ] ]789]]>790</Example>791792When investigating a group, a basic task is to find relations among793the generators:794795<ManSection>796<Meth Name="EpimorphismFromFpGroup"797Arg="G, r" Label="for an rcwa group and a search radius"/>798<Meth Name="EpimorphismFromFpGroup"799Arg="G, r, maxparts"800Label="for rcwa group, search radius and bound on number of affine parts"/>801<Returns>802an epimorphism from a finitely presented group to the803rcwa group <A>G</A>.804</Returns>805<Description>806The argument <A>r</A> is the <Q>search radius</Q>, i.e. the807radius of the ball around 1 which is scanned for relations.808In general, the larger <A>r</A> is chosen the smaller the kernel809of the returned epimorphism is. If the group <A>G</A> has810finite presentations, the kernel will in principle get trivial811provided that <A>r</A> is chosen large enough.812If the optional argument <A>maxparts</A> is given, it limits the813search space to elements with at most <A>maxparts</A> affine parts.814<Example>815<![CDATA[816gap> a := ClassTransposition(2,4,3,4);;817gap> b := ClassTransposition(4,6,8,12);;818gap> c := ClassTransposition(3,4,4,6);;819gap> G := SparseRep(Group(a,b,c));820<(2(4),3(4)),(4(6),8(12)),(3(4),4(6))>821gap> phi := EpimorphismFromFpGroup(G,6);822#I there are 3 generators and 12 relators of total length 330823#I there are 3 generators and 11 relators of total length 312824[ a, b, c ] -> [ ( 2(4), 3(4) ), ( 4(6), 8(12) ), ( 3(4), 4(6) ) ]825gap> RelatorsOfFpGroup(Source(phi));826[ a^2, b^2, c^2, (b*c)^3, (a*b)^6, (a*b*c*b)^3, (a*c*b*c)^3,827(a*b*a*c)^12, ((a*b)^2*a*c)^12, (a*b*(a*c)^2)^12, (a*b*c*a*c*b)^12 ]828]]>829</Example>830</Description>831</ManSection>832833A related very common task is to factor group elements into generators:834835<ManSection>836<Meth Name ="PreImagesRepresentative" Arg="phi, g"837Label="for an epi. from a free group to an rcwa group"/>838<Returns>839a representative of the set of preimages of <A>g</A> under840the epimorphism <A>phi</A> from a free group to an rcwa group.841</Returns>842<Description>843The epimorphism <A>phi</A> must map the generators of the free844group to the generators of the rcwa group one-by-one. <P/>845846This method can be used for factoring elements of rcwa groups847into generators. The implementation is based on848<C>RepresentativeActionPreImage</C>, see849<Ref Oper="RepresentativeAction"850Label="G, source, destination, action"/>. <P/>851852<Index Key="PreImagesRepresentatives"853Subkey="for an epi. from a free group to an rcwa group">854<C>PreImagesRepresentatives</C>855</Index>856857Quite frequently, computing several preimages is not harder than858computing just one, i.e. often several preimages are found859simultaneously. The operation <C>PreImagesRepresentatives</C>860takes care of this. It takes the same arguments as861<C>PreImagesRepresentative</C> and returns a list of preimages.862If multiple preimages are found, their quotients give rise to nontrivial863relations among the generators of the image of <A>phi</A>.864<Example>865<![CDATA[866gap> a := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; SetName(a,"a");867gap> b := ClassShift(0,1);; SetName(b,"b");868gap> G := Group(a,b);; # G = <<Collatz permutation>, n -> n + 1>869gap> phi := EpimorphismFromFreeGroup(G);;870gap> g := Comm(a^2*b^4,a*b^3); # a sample element to be factored871<rcwa permutation of Z with modulus 8>872gap> PreImagesRepresentative(phi,g); # -> a factorization of g873b^-3*(b^-1*a^-1)^2*b^3*a*b^-1*a*b^3874gap> g = b^-4*a^-1*b^-1*a^-1*b^3*a*b^-1*a*b^3; # check875true876gap> g := Comm(a*b,Comm(a,b^3));877<rcwa permutation of Z with modulus 8>878gap> pre := PreImagesRepresentatives(phi,g);879[ (b^-1*a^-1)^2*b^2*(b*a)^2*b^-2, b^-1*(a^-1*b)^2*b^2*(a*b^-1)^2*b^-1 ]880gap> rel := pre[1]/pre[2]; # -> a nontrivial relation881(b^-1*a^-1)^2*b^3*a*b^2*a^-1*b^-2*(b^-1*a)^2*b882gap> rel^phi;883IdentityMapping( Integers )884]]>885</Example>886</Description>887</ManSection>888889</Section>890891<!-- #################################################################### -->892893<Section Label="sec:ActionOnR">894<Heading>895The natural action of an rcwa group on the underlying ring896</Heading>897898Knowing a natural permutation representation of a group usually helps899significantly in computing in it and in obtaining results on its structure.900This holds particularly for the natural action of an rcwa group on its901underlying ring. In this section we describe &RCWA;'s functionality902related to this action. <P/>903904<Index Key="Support" Subkey="of an rcwa group"><C>Support</C></Index>905<Index Key="MovedPoints" Subkey="of an rcwa group"><C>MovedPoints</C></Index>906<Index Key="IsTransitive" Subkey="for an rcwa group, on its underlying ring">907<C>IsTransitive</C>908</Index>909910The support, i.e. the set of moved points, of an rcwa group can be911determined by <C>Support</C> or <C>MovedPoints</C> (these are synonyms).912Testing for transitivity on the underlying ring or on a union of residue913classes thereof is often feasible:914915<Example>916<![CDATA[917gap> G := Group(ClassTransposition(1,2,0,4),ClassShift(0,2));;918gap> IsTransitive(G,Integers);919true920]]>921</Example>922923<Alt Only="LaTeX">924<Index Key="IsTransitiveOnNonnegativeIntegersInSupport"925Subkey="for an rcwa group over Z">926<C>IsTransitiveOnNonnegativeIntegersIn- Support</C>927</Index>928<Index Key="TryIsTransitiveOnNonnegativeIntegersInSupport"929Subkey="for an rcwa group over Z and a search limit">930<C>TryIsTransitiveOnNonnegativeIntegers- InSupport</C>931</Index>932</Alt>933<Alt Not="LaTeX">934<Index Key="IsTransitiveOnNonnegativeIntegersInSupport"935Subkey="for an rcwa group over Z">936<C>IsTransitiveOnNonnegativeIntegersInSupport</C>937</Index>938<Index Key="TryIsTransitiveOnNonnegativeIntegersInSupport"939Subkey="for an rcwa group over Z and a search limit">940<C>TryIsTransitiveOnNonnegativeIntegersInSupport</C>941</Index>942</Alt>943<Index Key="TransitivityCertificate"944Subkey="for an rcwa group over Z and a search limit">945<C>TransitivityCertificate</C>946</Index>947<Index Key="TryToComputeTransitivityCertificate"948Subkey="for an rcwa group over Z and a search limit">949<C>TryToComputeTransitivityCertificate</C>950</Index>951<Index Key="SimplifiedCertificate"952Subkey="for a transitivity certificate of an rcwa groups over Z">953<C>SimplifiedCertificate</C>954</Index>955956Groups generated by class transpositions of the integers act on the set of957nonnegative integers. There is a property958<C>IsTransitiveOnNonnegativeIntegersInSupport(<A>G</A>)</C> which indicates959whether such group acts transitively on the set of nonnegative integers in960its support. Since such transitivity test is a computationally hard problem,961methods may fail. If <C>IsTransitiveOnNonnegativeIntegersInSupport</C>962returns <C>true</C>, an attribute <C>TransitivityCertificate</C> is set;963this is a record containing components <C>phi</C>, <C>words</C>,964<C>classes</C>, <C>smallpointbound</C>, <C>status</C> and <C>complete</C>965as follows:966<List>967968<Mark><C>phi</C></Mark>969<Item>970is an epimorphism from a free group to <A>G</A> which maps generators971to generators.972</Item>973974<Mark><C>words</C>, <C>classes</C></Mark>975<Item>976two lists. -- <C>words[i]</C> is a preimage under <C>phi</C> of977an element of <A>G</A> which maps all sufficiently large positive978integers in the residue classes <C>classes[i]</C> to smaller979nonnegative integers.980</Item>981982<Mark><C>smallpointbound</C></Mark>983<Item>984in addition to finding a list of group elements <M>g_i</M> such that985for any large enough integer <M>n</M> in the support of <A>G</A> there986is some <M>g_i</M> such that <M>n^{g_i} < n</M>, for verifying987transitivity it was necessary to check that all integers less than or988equal to <C>smallpointbound</C> in the support of <A>G</A> lie in the989same orbit.990</Item>991992<Mark><C>status</C></Mark>993<Item>994the string <C>"transitive"</C> in case all checks have been completed995successfully.996</Item>997998<Mark><C>complete</C></Mark>999<Item>1000<C>true</C> in case all checks have been completed successfully.1001</Item>10021003</List>1004Parts of this information for possibly intransitive groups can be1005obtained by the operation1006<C>TryToComputeTransitivityCertificate(<A>G</A>,<A>searchlimit</A>)</C>,1007where <A>searchlimit</A> is the maximum radius about a point within1008which smaller points are searched and taken into consideration.1009This operation interprets an option <C>abortdensity</C> -- if set,1010the operation returns the data computed so far once the density of1011the set of positive integers in the support of <A>G</A> for which no1012group element is found which maps them to smaller integers reaches1013or drops below <C>abortdensity</C>. A simplified certificate can be1014obtained via <C>SimplifiedCertificate(<A>cert</A>)</C>.1015<Example>1016<![CDATA[1017gap> G := Group(List([[0,2,1,2],[0,3,2,3],[1,2,2,4]],1018> ClassTransposition));1019<(0(2),1(2)),(0(3),2(3)),(1(2),2(4))>1020gap> IsTransitiveOnNonnegativeIntegersInSupport(G);1021true1022gap> TransitivityCertificate(G);1023rec(1024classes := [ [ 1(2) ], [ 2(6) ], [ 6(12), 10(12) ], [ 0(12) ],1025[ 4(12) ] ], complete := true,1026phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 0(3), 2(3) ), ( 1(2), 2(4) )1027], smallpointbound := 4, status := "transitive",1028words := [ a, b, c, b*c, a*b ] )1029gap> SimplifiedCertificate(last);1030rec( classes := [ [ 1(2) ], [ 2(4) ], [ 4(12) ], [ 0(12), 8(12) ] ],1031complete := true,1032phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 0(3), 2(3) ), ( 1(2), 2(4) )1033], smallpointbound := 4, status := "transitive",1034words := [ a, c, a*b, b*c ] )1035gap> G := Group(List([[0,2,1,2],[1,2,2,4],[1,4,2,6]],1036> ClassTransposition)); # '3n+1 group'1037<(0(2),1(2)),(1(2),2(4)),(1(4),2(6))>1038gap> cert := TryToComputeTransitivityCertificate(G,10);1039rec(1040classes := [ [ 1(2) ], [ 2(4) ], [ 4(32) ], [ 8(24), 44(48), 20(96) ],1041[ 0(24), 16(24) ] ], complete := false,1042phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 1(4), 2(6) )1043], remaining := [ 12(48), 28(48), 52(96), 84(96) ],1044smallpointbound := 42, status := "unclear",1045words := [ a, b, (a*c)^2*b*a*b, c, a*c*b ] )1046gap> Union(Flat(cert.classes));1047<union of 90 residue classes (mod 96) (6 classes)>1048gap> Difference(Integers,Union(Flat(cert.classes)));104912(48) U 28(48) U 52(96) U 84(96)1050gap> cert := TryToComputeTransitivityCertificate(G,20); # try larger bound1051rec(1052classes := [ [ 1(2) ], [ 2(4) ], [ 4(32) ], [ 8(24), 44(48), 20(96) ],1053[ 0(24), 16(24) ], [ 12(768), 268(768) ], [ 28(768), 540(768) ] ],1054complete := false,1055phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 1(4), 2(6) )1056],1057remaining := [ 52(96), 84(96), 60(192), 108(192), 124(192), 172(192),105876(384), 204(384), 220(384), 348(384), 156(768), 396(768),1059412(768), 652(768) ], smallpointbound := 1074, status := "unclear",1060words := [ a, b, (a*c)^2*b*a*b, c, a*c*b, (a*c)^3*b*c*b*a*b,1061(a*c)^4*b*a*b*a*b ] )1062gap> Difference(Integers,Union(Flat(cert.classes)));1063<union of 44 residue classes (mod 768) (14 classes)>1064gap> Intersection([0..100],last);1065[ 52, 60, 76, 84 ]1066]]>1067</Example>10681069Further, there are methods to compute orbits under the1070action of an rcwa group:10711072<ManSection>1073<Heading> Orbit (for an rcwa group and either a point or a set) </Heading>1074<Meth Name="Orbit" Arg="G, point" Label="for an rcwa group and a point"/>1075<Meth Name="Orbit" Arg="G, set" Label="for an rcwa group and a set"/>1076<Returns>1077the orbit of the point <A>point</A> respectively the1078set <A>set</A> under the natural action of the rcwa1079group <A>G</A> on its underlying ring.1080</Returns>1081<Description>1082The second argument can either be an element or a subset of1083the underlying ring of the rcwa group <A>G</A>.1084Since orbits under the action of rcwa groups can be finite1085or infinite, and since infinite orbits are not necessarily1086residue class unions, the orbit may either be returned in1087the form of a list, in the form of a residue class union1088or in the form of an orbit object. It is possible to loop over1089orbits returned as orbit objects, they can be compared and1090there is a membership test for them. However note that equality1091and membership for such orbits cannot always be decided.1092<Example>1093<![CDATA[1094gap> G := Group(ClassShift(0,2),ClassTransposition(0,3,1,3));1095<rcwa group over Z with 2 generators>1096gap> Orbit(G,0);1097Z \ 5(6)1098gap> Orbit(G,5);1099[ 5 ]1100gap> Orbit(G,ResidueClass(0,2));1101[ 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),11021(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),11031(3) U 2(6) ]1104gap> Length(Orbit(G,ResidueClass(0,4)));1105801106gap> G := Group(ClassTransposition(0,2,1,2),ClassTransposition(0,2,1,4),1107> ClassReflection(0,3));1108<rcwa group over Z with 3 generators>1109gap> orb := Orbit(G,2);1110<orbit of 2 under <wild rcwa group over Z with 3 generators>>1111gap> 1015808 in orb;1112true1113gap> First(orb,n->ForAll([n,n+2,n+6,n+8,n+30,n+32,n+36,n+38],IsPrime));1114-191115]]>1116</Example>1117</Description>1118</ManSection>11191120<ManSection>1121<Oper Name="GrowthFunctionOfOrbit" Arg="G, n, r_max, size_max"1122Label="for an rcwa group, a point and bounds on radius and sphere size"/>1123<Meth Name="GrowthFunctionOfOrbit" Arg="orb, r_max, size_max"1124Label="for an rcwa group orbit and bounds on radius and sphere size"/>1125<Returns>1126a list whose (<M>r+1</M>)-th entry is the size of the sphere of1127radius <M>r</M> about <A>n</A> under the action of the group <A>G</A>,1128where the argument <A>r_max</A> is the largest possible radius to be1129considered, and the computation stops once the sphere size exceeds1130<A>size_max</A>.1131</Returns>1132<Description>1133An option <C>"small"</C> is interpreted -- see example below.1134In place of the group <A>G</A> and the point <A>n</A>, one can pass as1135first argument also an rcwa group orbit object <A>orb</A>.1136<Example>1137<![CDATA[1138gap> G := Group(List([[0,4,1,4],[0,3,5,6],[0,4,5,6]],ClassTransposition));1139<(0(4),1(4)),(0(3),5(6)),(0(4),5(6))>1140gap> GrowthFunctionOfOrbit(G,18,100,20);1141[ 1, 1, 2, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 5, 5, 6, 8, 6, 5,11425, 4, 3, 3, 4, 4, 4, 3, 3, 5, 4, 5, 6, 5, 2, 3, 3, 2, 3, 3, 4, 5, 4,11434, 4, 6, 5, 5, 3, 4, 2, 3, 4, 4, 2, 3, 4, 4, 2, 3, 3, 4, 3, 5, 3, 5,11444, 5, 6, 5, 3, 4, 5, 6, 5, 4, 3, 5, 4, 5, 5, 4, 4, 5, 5, 3, 4, 5, 3,11453, 4, 5, 4, 2, 3, 4, 4, 4 ]1146gap> last = GrowthFunctionOfOrbit(Orbit(G,18),100,20);1147true1148gap> GrowthFunctionOfOrbit(G,18,20,20:small:=[0..100]);1149rec( smallpoints := [ 18, 24, 25, 27, 30, 32, 33, 36, 37, 39, 40, 41,115042, 44, 45, 48, 49, 51, 52, 53, 56, 57, 59, 60, 61, 64, 65, 66,115168, 69, 71, 75, 76, 77, 80, 81, 83, 88, 89, 92, 93, 95, 100 ],1152spheresizes := [ 1, 1, 2, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 5,11535, 6, 8 ] )1154gap> G := Group(List([[0,2,1,2],[1,2,2,4],[1,4,2,6]],ClassTransposition));1155<(0(2),1(2)),(1(2),2(4)),(1(4),2(6))>1156gap> GrowthFunctionOfOrbit(G,0,100,10000);1157[ 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 4, 5, 7, 6, 7, 9, 12, 14, 19, 21, 28,115829, 37, 42, 55, 57, 72, 78, 99, 113, 148, 164, 215, 226, 288, 344,1159462, 478, 612, 686, 894, 985, 1284, 1416, 1847, 2018, 2620, 2902,11603786, 4167, 5432, 5958, 7749, 8568, 11178 ]1161]]>1162</Example>1163</Description>1164</ManSection>11651166<Index Key="DistanceToNextSmallerPointInOrbit">1167<C>DistanceToNextSmallerPointInOrbit</C>1168</Index>11691170Given an rcwa group <A>G</A> over &ZZ; and an integer <A>n</A>,1171<C>DistanceToNextSmallerPointInOrbit(</C><A>G</A><C>,</C><A>n</A><C>)</C>1172computes the smallest number <M>d</M> such that there is a product <M>g</M>1173of <M>d</M> generators or inverses of generators of <A>G</A> which maps1174<A>n</A> to an integer with absolute value less than |<A>n</A>|, provided1175that the orbit of <A>n</A> contains such integer.11761177&RCWA; provides a function to draw pictures of orbits of rcwa groups1178on <M>&ZZ;^2</M>. The pictures are written to files in bitmap-1179(bmp-) format. The author has successfully tested this feature both under1180Linux and under Windows, and the generated pictures can be processed1181further with many common graphics programs:11821183<ManSection>1184<Func Name="DrawOrbitPicture"1185Arg="G, p0, bound, h, w, colored, palette, filename"1186Label="G, p0, bound, h, w, colored, palette, filename"/>1187<Returns> nothing. </Returns>1188<Description>1189Draws a picture of the orbit(s) of the point(s) <A>p0</A> under the1190action of the group <A>G</A> on <M>&ZZ;^2</M>.1191The argument <A>p0</A> is either one point or a list of points.1192The argument <A>bound</A> denotes the bound to which the ball about1193<A>p0</A> is to be computed, in terms of absolute values of coordinates.1194The size of the generated picture is <A>h</A> x <A>w</A> pixels.1195The argument <A>colored</A> is a boolean which indicates whether a 24-bit1196true color picture or a monochrome picture should be generated.1197In the former case, <A>palette</A> must be a list of triples of integers1198in the range <M>0, \dots, 255</M>, denoting the RGB values of the colors1199to be used. In the latter case, <A>palette</A> is not used, and any value1200can be passed. The picture is written in bitmap- (bmp-) format to a file1201named <A>filename</A>. This is done using the utility function1202<C>SaveAsBitmapPicture</C> from &ResClasses;.1203<Log>1204<![CDATA[1205gap> PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),1206> CyclicGroup(3))));;1207gap> DrawOrbitPicture(PSL2Z,[0,1],2000,512,512,false,fail,"example1.bmp");1208gap> DrawOrbitPicture(PSL2Z,Combinations([1..4],2),2000,512,512,true,1209> [[255,0,0],[0,255,0],[0,0,255]],"example2.bmp");1210]]>1211</Log>1212</Description>1213</ManSection>12141215The pictures drawn in the examples are shown on &RCWA;'s webpage. <P/>12161217Finite orbits give rise to finite quotients of a group, and finite cycles1218can help to check for conjugacy. Therefore it is important to be able1219to determine them:12201221<ManSection>1222<Heading>1223ShortOrbits (for rcwa groups) & ShortCycles (for rcwa permutations)1224</Heading>1225<Oper Name="ShortOrbits" Arg="G, S, maxlng"1226Label="for rcwa group, set of points and bound on length"/>1227<Oper Name="ShortOrbits" Arg="G, S, maxlng, maxn"1228Label="for rcwa group, set of points and bounds on length and points"/>1229<Oper Name="ShortCycles" Arg="g, S, maxlng"1230Label="for rcwa permutation, set of points and bound on length"/>1231<Oper Name="ShortCycles" Arg="g, S, maxlng, maxn"1232Label="for rcwa permutation, set of points and bounds on length and points"/>1233<Oper Name="ShortCycles" Arg="g, maxlng"1234Label="for rcwa permutation and bound on length"/>1235<Returns>1236in the first form a list of all orbits of the rcwa group <A>G</A>1237of length at most <A>maxlng</A> which intersect non-trivially with the1238set <A>S</A>.1239In the second form a list of all orbits of the rcwa group <A>G</A>1240of length at most <A>maxlng</A> which intersect non-trivially with1241the set <A>S</A> and which, in terms of euclidean norm, do not1242exceed <A>maxn</A>.1243In the third form a list of all cycles of the rcwa permutation <A>g</A>1244of length at most <A>maxlng</A> which intersect non-trivially with1245the set <A>S</A>.1246In the fourth form a list of all cycles of the rcwa permutation <A>g</A>1247of length at most <A>maxlng</A> which intersect non-trivially with1248the set <A>S</A> and which, in terms of euclidean norm, do not1249exceed <A>maxn</A>.1250In the fifth form a list of all cycles of the rcwa permutation <A>g</A>1251of length at most <A>maxlng</A> which do not correspond to cycles1252consisting of residue classes.1253</Returns>1254<Description>1255The operation <Ref Oper="ShortOrbits"1256Label="for rcwa group, set of points and bound on length"/> recognizes1257an option <A>finite</A>. If this option is set, it is assumed that all1258orbits are finite, in order to speed up the computation. If furthermore1259<A>maxlng</A> is negative, a list of <E>all</E> orbits which intersect1260non-trivially with <A>S</A> is returned. <P/>12611262<Index Key="CyclesOnFiniteOrbit"><C>CyclesOnFiniteOrbit</C></Index>12631264There is an operation1265<C>CyclesOnFiniteOrbit(</C><A>G</A><C>,</C><A>g</A><C>,</C><A>n</A><C>)</C>1266which returns a list of all cycles of the rcwa permutation <A>g</A> on the1267orbit of the point <A>n</A> under the action of the rcwa group <A>G</A>.1268Here <A>g</A> is assumed to be an element of <A>G</A>, and the orbit1269of <A>n</A> is assumed to be finite.1270<Example>1271<![CDATA[1272gap> G := Group(ClassTransposition(1,4,2,4)*ClassTransposition(1,4,3,4),1273> ClassTransposition(3,9,6,18)*ClassTransposition(1,6,3,9));;1274gap> List(ShortOrbits(G,[-15..15],100),1275> orb->StructureDescription(Action(G,orb)));1276[ "A15", "A4", "1", "1", "C3", "1", "((C2 x C2 x C2) : C7) : C3", "1",1277"1", "C3", "A19" ]1278gap> ShortCycles(mKnot(7),[1..100],20);1279[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7, 8 ], [ 9, 10 ],1280[ 11, 12 ], [ 13, 14, 16, 18, 20, 22, 19, 17, 15 ], [ 21, 24 ],1281[ 23, 26 ], [ 25, 28, 32, 36, 31, 27, 30, 34, 38, 33, 29 ],1282[ 35, 40 ], [ 37, 42, 48, 54, 47, 41, 46, 52, 45, 39, 44, 50, 43 ],1283[ 77, 88, 100, 114, 130, 148, 127, 109, 124, 107, 122, 105, 120, 103,128489 ] ]1285gap> G := Group(List([[0,2,1,2],[0,5,4,5],[1,4,0,6]],ClassTransposition));;1286gap> CyclesOnFiniteOrbit(G,G.1*G.2,0);1287[ [ 0, 1, 4, 9, 8, 5 ], [ 6, 7 ], [ 10, 11, 14, 19, 18, 15 ], [ 12, 13 ] ]1288gap> List(CyclesOnFiniteOrbit(G,G.1*G.2*G.3*G.1*G.3*G.2,32),Length);1289[ 3148, 3148 ]1290]]>1291</Example>1292</Description>1293</ManSection>12941295<ManSection>1296<Heading>1297ShortResidueClassOrbits & ShortResidueClassCycles1298</Heading>1299<Oper Name="ShortResidueClassOrbits" Arg="G, modulusbound, maxlng"1300Label="for rcwa group and bounds on modulus and length"/>1301<Oper Name="ShortResidueClassCycles" Arg="g, modulusbound, maxlng"1302Label="for rcwa permutation and bounds on modulus and length"/>1303<Returns>1304in the first form a list of all orbits of residue classes under the1305action of the rcwa group <A>G</A> which contain a residue class1306<M>r(m)</M> such that <M>m</M> divides <A>modulusbound</A> and1307which are not longer than <A>maxlng</A>.1308In the second form a list of all cycles of residue classes of the1309rcwa permutation <A>g</A> which contain a residue class1310<M>r(m)</M> such that <M>m</M> divides <A>modulusbound</A> and1311which are not longer than <A>maxlng</A>.1312</Returns>1313<Description>1314We are only talking about a <E>cycle</E> of residue classes of1315an rcwa permutation <M>g</M> if the restrictions of <M>g</M> to all1316contained residue classes are affine.1317Similarly we are only talking about an <E>orbit</E> of residue1318classes under the action of an rcwa group <M>G</M> if the1319restrictions of all elements of <M>G</M> to all residue classes1320in the orbit are affine. <P/>13211322The returned lists may contain additional cycles, resp., orbits,1323which do not contain a residue class <M>r(m)</M> such that <M>m</M>1324divides <A>modulusbound</A>, but which happen to be found without1325additional efforts.1326<Example>1327<![CDATA[1328gap> g := ClassTransposition(0,2,1,2)*ClassTransposition(0,4,1,6);1329<rcwa permutation of Z with modulus 12>1330gap> ShortResidueClassCycles(g,Mod(g)^2,20);1331[ [ 2(12), 3(12) ], [ 10(12), 11(12) ], [ 4(24), 5(24), 7(36), 6(36) ],1332[ 20(24), 21(24), 31(36), 30(36) ],1333[ 8(48), 9(48), 13(72), 19(108), 18(108), 12(72) ],1334[ 40(48), 41(48), 61(72), 91(108), 90(108), 60(72) ],1335[ 16(96), 17(96), 25(144), 37(216), 55(324), 54(324), 36(216), 24(144)1336],1337[ 80(96), 81(96), 121(144), 181(216), 271(324), 270(324), 180(216),1338120(144) ] ]1339gap> G := Group(List([[0,6,5,6],[1,4,4,6],[2,4,3,6]],ClassTransposition));1340<(0(6),5(6)),(1(4),4(6)),(2(4),3(6))>1341gap> ShortResidueClassOrbits(G,48,10);1342[ [ 7(12) ], [ 8(12) ], [ 1(24), 4(36) ], [ 2(24), 3(36) ],1343[ 12(24), 17(24), 28(36) ], [ 18(24), 23(24), 27(36) ],1344[ 37(48), 58(72), 87(108) ], [ 38(48), 57(72), 88(108) ],1345[ 0(48), 5(48), 10(72), 15(108) ], [ 6(48), 11(48), 9(72), 16(108) ] ]1346]]>1347</Example>1348</Description>1349</ManSection>13501351<ManSection>1352<Func Name="ComputeCycleLength"1353Arg="g, n" Label="for an rcwa permutation and a point"/>1354<Returns>1355a record containing the length, the largest point and the position of the1356largest point of the cycle of the rcwa permutation <A>g</A> which contains1357the point <A>n</A>, provided that this cycle is finite.1358</Returns>1359<Description>1360If the cycle is infinite, the function will run into an infinite loop1361unless the option <C>"abortat"</C> is set to the maximum number of iterates1362to be tried before aborting. Iterates are not stored, to save memory.1363The function interprets an option <C>"notify"</C>, which defaults to 10000;1364every <Q>notify</Q> iterations, the number of binary digits of the latest1365iterate is printed. This output can be suppressed by the option <C>quiet</C>.1366The function also interprets an option <C>"small"</C>, which may be set to1367a range within which small points are recorded and returned in a component1368<C>smallpoints</C>.1369<Example>1370<![CDATA[1371gap> g := Product(List([[0,5,3,5],[1,2,0,6],[2,4,3,6]],1372> ClassTransposition));1373<rcwa permutation of Z with modulus 180>1374gap> ComputeCycleLength(g,20:small:=[0..1000]);1375n = 20: after 10000 steps, the iterate has 1919 binary digits.1376n = 20: after 20000 steps, the iterate has 2908 binary digits.1377n = 20: after 30000 steps, the iterate has 1531 binary digits.1378n = 20: after 40000 steps, the iterate has 708 binary digits.1379rec( aborted := false, g := <rcwa permutation of Z with modulus 180>,1380length := 45961,1381maximum := 180479928411509527091314790144929480041473309862957394384783\13820525935437431021442346166422201250935268553945158085769924448388724679753\13835271669245363980744610119632280105994423399614803956244808653465492205657\13848650363041608376587943180444494842094693691286183613056599672737336761093\13853101035841077322874883200384115281051837032147150147712534199292886436789\13867520389780289517825203780151058517520194926468391308525704499649905091899\13879667529835495635671154681958992898010506577172313321500572646883756736685\13880158653917532084531267455434808219032998691038943070902228427549279555530\13896429870190316109419051531138721361826083376315737131067799731181096142797\13904868525347003646887454985757711743327946232372385342293662007684758208408\13918635715976464060647431260835037213863991037813998261883899050447111540742\13925857187943077255493709629738212709349458790098815926920248565399938335540\13938092502449690267365120996852, maxpos := 19825, n := 20,1394smallpoints := [ 20, 23, 66, 99, 294, 295, 298, 441, 447, 882, 890,1395893 ] )1396]]>1397</Example>1398</Description>1399</ManSection>14001401<ManSection>1402<Oper Name="CycleRepresentativesAndLengths" Arg="g, S"1403Label="for rcwa permutation and set of seed points"/>1404<Returns>1405a list of pairs (cycle representative, length of cycle) for all1406cycles of the rcwa permutation <A>g</A> which have a nontrivial1407intersection with the set <A>S</A>, where fixed points are omitted.1408</Returns>1409<Description>1410The rcwa permutation <A>g</A> is assumed to have only finite1411cycles. If <A>g</A> has an infinite cycle which intersects1412non-trivially with <A>S</A>, this may cause an infinite loop1413unless a cycle length limit is set via the option <C>abortat</C>.1414The output can be suppressed by the option <C>quiet</C>.1415<Example>1416<![CDATA[1417gap> g := ClassTransposition(0,2,1,2)*ClassTransposition(0,4,1,6);;1418gap> CycleRepresentativesAndLengths(g,[0..50]);1419[ [ 2, 2 ], [ 4, 4 ], [ 8, 6 ], [ 10, 2 ], [ 14, 2 ], [ 16, 8 ],1420[ 20, 4 ], [ 22, 2 ], [ 26, 2 ], [ 28, 4 ], [ 32, 10 ], [ 34, 2 ],1421[ 38, 2 ], [ 40, 6 ], [ 44, 4 ], [ 46, 2 ], [ 50, 2 ] ]1422gap> g := Product(List([[0,5,3,5],[1,2,0,6],[2,4,3,6]],1423> ClassTransposition));1424<rcwa permutation of Z with modulus 180>1425gap> CycleRepresentativesAndLengths(g,[0..100]:abortat:=100000);1426n = 20: after 10000 steps, the iterate has 1919 binary digits.1427n = 20: after 20000 steps, the iterate has 2908 binary digits.1428n = 20: after 30000 steps, the iterate has 1531 binary digits.1429n = 20: after 40000 steps, the iterate has 708 binary digits.1430n = 79: after 10000 steps, the iterate has 1679 binary digits.1431n = 100: after 10000 steps, the iterate has 712 binary digits.1432n = 100: after 20000 steps, the iterate has 2507 binary digits.1433n = 100: after 30000 steps, the iterate has 3311 binary digits.1434n = 100: after 40000 steps, the iterate has 3168 binary digits.1435n = 100: after 50000 steps, the iterate has 3947 binary digits.1436n = 100: after 60000 steps, the iterate has 4793 binary digits.1437n = 100: after 70000 steps, the iterate has 5325 binary digits.1438n = 100: after 80000 steps, the iterate has 6408 binary digits.1439n = 100: after 90000 steps, the iterate has 7265 binary digits.1440n = 100: after 100000 steps, the iterate has 7918 binary digits.1441[ [ 0, 7 ], [ 5, 3 ], [ 7, 7159 ], [ 11, 9 ], [ 19, 342 ],1442[ 20, 45961 ], [ 25, 3 ], [ 26, 21 ], [ 29, 2 ], [ 31, 3941 ],1443[ 34, 19 ], [ 37, 7 ], [ 40, 5 ], [ 41, 7 ], [ 46, 3 ], [ 49, 2 ],1444[ 59, 564 ], [ 61, 577 ], [ 65, 3 ], [ 67, 23 ], [ 71, 41 ],1445[ 79, 16984 ], [ 80, 5 ], [ 85, 3 ], [ 86, 3 ], [ 89, 2 ], [ 91, 9 ],1446[ 94, 1355 ], [ 97, 7 ], [ 100, fail ] ]1447]]>1448</Example>1449</Description>1450</ManSection>14511452Often one also wants to know which residue classes an rcwa mapping1453or an rcwa group fixes setwise:14541455<ManSection>1456<Oper Name="FixedResidueClasses" Arg="g, maxmod"1457Label="for rcwa mapping and bound on modulus"/>1458<Oper Name="FixedResidueClasses" Arg="G, maxmod"1459Label="for rcwa group and bound on modulus"/>1460<Returns>1461the set of residue classes with modulus greater than 1 and less1462than or equal to <A>maxmod</A> which the rcwa mapping <A>g</A>,1463respectively the rcwa group <A>G</A>, fixes setwise.1464</Returns>1465<Description>1466<Example>1467<![CDATA[1468gap> FixedResidueClasses(ClassTransposition(0,2,1,4),8);1469[ 2(3), 3(4), 4(5), 6(7), 3(8), 7(8) ]1470gap> FixedResidueClasses(Group(ClassTransposition(0,2,1,4),1471> ClassTransposition(0,3,1,3)),12);1472[ 2(3), 8(9), 11(12) ]1473]]>1474</Example>1475</Description>1476</ManSection>14771478Frequently one needs to compute balls of certain radius around points or1479group elements, be it to estimate the growth of a group, be it to see how1480an orbit looks like, be it to search for a group element with certain1481properties or be it for other purposes:14821483<ManSection>1484<Heading>1485Ball (for group, element and radius or group, point, radius and action)1486</Heading>1487<Meth Name ="Ball" Arg="G, g, r"1488Label="for group, element and radius"/>1489<Meth Name ="Ball" Arg="G, p, r, action"1490Label="for group, point, radius and action"/>1491<Meth Name ="Ball" Arg="G, p, r"1492Label="for group, point and radius"/>1493<Returns>1494the ball of radius <A>r</A> around the element <A>g</A> in1495the group <A>G</A>, respectively1496the ball of radius <A>r</A> around the point <A>p</A> under1497the action <A>action</A> of the group <A>G</A>, respectively1498the ball of radius <A>r</A> around the point <A>p</A> under1499the action <C>OnPoints</C> of the group <A>G</A>,1500</Returns>1501<Description>1502All balls are understood with respect to1503<C>GeneratorsOfGroup(<A>G</A>)</C>.1504As membership tests can be expensive, the former method does not check1505whether <A>g</A> is indeed an element of <A>G</A>.1506The methods require that element- / point comparisons are cheap.1507They are not only applicable to rcwa groups.1508If the option <A>Spheres</A> is set, the ball is split up and1509returned as a list of spheres. There is a related operation1510<C>RestrictedBall(<A>G</A>,<A>g</A>,<A>r</A>,<A>modulusbound</A>)</C>1511specifically for rcwa groups which computes only those elements of the1512ball whose moduli do not exceed <A>modulusbound</A>, and which can be1513reached from <A>g</A> without computing intermediate elements whose1514moduli do exceed <A>modulusbound</A>. The latter operation interprets1515an option <C>"boundaffineparts"</C>. -- If this option is set and the1516group <A>G</A> and the element <A>g</A> are in sparse representation,1517then <A>modulusbound</A> is actually taken to be a bound on the number1518of affine parts rather than a bound on the modulus.15191520<Index Key="RestrictedBall" Subkey="G, g, r, modulusbound">1521<C>RestrictedBall</C>1522</Index>15231524<Example>1525<![CDATA[1526gap> PSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),1527> CyclicGroup(3))));;1528gap> List([1..10],k->Length(Ball(PSL2Z,[0,1],k,OnTuples)));1529[ 4, 8, 14, 22, 34, 50, 74, 106, 154, 218 ]1530gap> Ball(Group((1,2),(2,3),(3,4)),(),2:Spheres);1531[ [ () ], [ (3,4), (2,3), (1,2) ],1532[ (2,3,4), (2,4,3), (1,2)(3,4), (1,2,3), (1,3,2) ] ]1533gap> G := Group(List([[1,2,4,6],[1,3,2,6],[2,3,4,6]],ClassTransposition));;1534gap> B := RestrictedBall(G,One(G),20,36:Spheres);; # try replacing 36 by 721535gap> List(B,Length);1536[ 1, 3, 6, 12, 4, 6, 6, 4, 4, 4, 6, 6, 3, 3, 2, 0, 0, 0, 0, 0, 0 ]1537]]>1538</Example>1539</Description>1540</ManSection>15411542It is possible to determine group elements which map a given tuple of elements1543of the underlying ring to a given other tuple, if such elements exist:15441545<ManSection>1546<Meth Name="RepresentativeAction" Arg="G, source, destination, action"1547Label="G, source, destination, action"/>1548<Returns>1549an element of <A>G</A> which maps <A>source</A>1550to <A>destination</A> under the action given by <A>action</A>.1551</Returns>1552<Description>1553If an element satisfying this condition does not exist, this method1554either returns <C>fail</C> or runs into an infinite loop.1555The problem whether <A>source</A> and <A>destination</A> lie in1556the same orbit under the action <A>action</A> of <A>G</A> is hard,1557and in its general form most likely computationally undecidable. <P/>15581559<Index Key="RepresentativeActionPreImage"1560Subkey="G, source, destination, action, F">1561<C>RepresentativeActionPreImage</C>1562</Index>15631564In cases where rather a word in the generators of <A>G</A> than1565the actual group element is needed, one should use the operation1566<C>RepresentativeActionPreImage</C> instead. This operation takes1567five arguments. The first four are the same as those of1568<C>RepresentativeAction</C>, and the fifth is a free group whose1569generators are to be used as letters of the returned word. Note that1570<C>RepresentativeAction</C> calls <C>RepresentativeActionPreImage</C>1571and evaluates the returned word. The evaluation of the word can very1572well take most of the time if <A>G</A> is wild and coefficient1573explosion occurs. <P/>15741575The algorithm is based on computing balls of increasing radius1576around <A>source</A> and <A>destination</A> until they intersect1577non-trivially.1578<Example>1579<![CDATA[1580gap> a := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; SetName(a,"a");1581gap> b := ClassShift(1,4:Name:="b");; G := Group(a,b);;1582gap> elm := RepresentativeAction(G,[7,4,9],[4,5,13],OnTuples);;1583gap> Display(elm);15841585Rcwa permutation of Z with modulus 1215861587/1588| n-3 if n in 1(6) U 10(12)1589| n+4 if n in 5(12) U 9(12)1590n |-> < n+1 if n in 4(12)1591| n if n in 0(6) U 2(6) U 3(12) U 11(12)1592|1593\15941595gap> List([7,4,9],n->n^elm);1596[ 4, 5, 13 ]1597gap> elm := RepresentativeAction(G,[6,-3,8],[-9,4,11],OnPoints);;1598gap> Display(elm);15991600Rcwa permutation of Z with modulus 1216011602/1603| 2n/3 if n in 0(6) U 3(12)1604| (4n+1)/3 if n in 2(6) U 11(12)1605| (4n-1)/3 if n in 4(6) U 7(12)1606n |-> < (2n-8)/3 if n in 1(12)1607| (4n-17)/3 if n in 5(12)1608| (4n-15)/3 if n in 9(12)1609|1610\16111612gap> [6,-3,8]^elm; List([6,-3,8],n->n^elm); # `OnPoints' allows reordering1613[ -9, 4, 11 ]1614[ 4, -9, 11 ]1615gap> F := FreeGroup("a","b");; phi := EpimorphismByGenerators(F,G);;1616gap> w := RepresentativeActionPreImage(G,[10,-4,9,5],[4,5,13,-8],1617> OnTuples,F);1618a*b^-1*a^-1*(b^-1*a)^2*b*a*b^-2*a*b*a^-1*b1619gap> elm := w^phi;1620<rcwa permutation of Z with modulus 324>1621gap> List([10,-4,9,5],n->n^elm);1622[ 4, 5, 13, -8 ]1623]]>1624</Example>1625</Description>1626</ManSection>16271628Sometimes an rcwa group fixes a certain partition of the underlying ring1629into unions of residue classes. If this happens, then any orbit is clearly1630a subset of exactly one of these parts. Further, such a partition often1631gives rise to proper quotients of the group:16321633<ManSection>1634<Oper Name ="ProjectionsToInvariantUnionsOfResidueClasses"1635Arg="G, m" Label="for rcwa group and modulus"/>1636<Returns>1637the projections of the rcwa group <A>G</A> to the unions of1638residue classes (mod <A>m</A>) which it fixes setwise.1639</Returns>1640<Description>1641The corresponding partition of a set of representatives for1642the residue classes (mod <A>m</A>) can be obtained by the1643operation <C>OrbitsModulo(<A>G</A>,<A>m</A>)</C>.1644<Index Key="OrbitsModulo" Subkey="for an rcwa group and a modulus">1645<C>OrbitsModulo</C>1646</Index>1647<Example>1648<![CDATA[1649gap> G := Group(ClassTransposition(0,2,1,2),ClassShift(3,4));;1650gap> ProjectionsToInvariantUnionsOfResidueClasses(G,4);1651[ [ ( 0(2), 1(2) ), ClassShift( 3(4) ) ] ->1652[ ( 0(4), 1(4) ), IdentityMapping( Integers ) ],1653[ ( 0(2), 1(2) ), ClassShift( 3(4) ) ] ->1654[ ( 2(4), 3(4) ), <rcwa permutation of Z with modulus 4> ] ]1655gap> List(last,phi->Support(Image(phi)));1656[ 0(4) U 1(4), 2(4) U 3(4) ]1657]]>1658</Example>1659</Description>1660</ManSection>16611662Given two partitions of the underlying ring into the same number of1663unions of residue classes, there is always an rcwa permutation which1664maps the one to the other:16651666<ManSection>1667<Meth Name="RepresentativeAction" Arg="RCWA(R), P1, P2"1668Label="for RCWA(R) and 2 partitions of R into residue classes"/>1669<Returns>1670an element of RCWA(<M>R</M>) which maps the partition <A>P1</A>1671to <A>P2</A>.1672</Returns>1673<Description>1674The arguments <A>P1</A> and <A>P2</A> must be partitions of the1675underlying ring <M>R</M> into the same number of unions of residue1676classes.1677The method for <M>R = &ZZ;</M> recognizes the option <C>IsTame</C>,1678which can be used to demand a tame result. If this option is set and1679there is no tame rcwa permutation which maps <A>P1</A> to <A>P2</A>,1680the method runs into an infinite loop. This happens if the condition1681in Theorem 2.8.9 in <Cite Key="Kohl05"/> is not satisfied.1682If the option <C>IsTame</C> is not set and the partitions <A>P1</A>1683and <A>P2</A> both consist entirely of single residue classes, then1684the returned mapping is affine on any residue class in <A>P1</A>.1685<Example>1686<![CDATA[1687gap> P1 := AllResidueClassesModulo(3);1688[ 0(3), 1(3), 2(3) ]1689gap> P2 := List([[0,2],[1,4],[3,4]],ResidueClass);1690[ 0(2), 1(4), 3(4) ]1691gap> elm := RepresentativeAction(RCWA(Integers),P1,P2);1692<rcwa permutation of Z with modulus 3>1693gap> P1^elm = P2;1694true1695gap> IsTame(elm);1696false1697gap> elm := RepresentativeAction(RCWA(Integers),P1,P2:IsTame);1698<tame rcwa permutation of Z with modulus 24>1699gap> P1^elm = P2;1700true1701gap> elm := RepresentativeAction(RCWA(Integers),1702> [ResidueClass(1,3),1703> ResidueClassUnion(Integers,3,[0,2])],1704> [ResidueClassUnion(Integers,5,[2,4]),1705> ResidueClassUnion(Integers,5,[0,1,3])]);1706<rcwa permutation of Z with modulus 6>1707gap> [ResidueClass(1,3),ResidueClassUnion(Integers,3,[0,2])]^elm;1708[ 2(5) U 4(5), Z \ 2(5) U 4(5) ]1709]]>1710</Example>1711</Description>1712</ManSection>17131714<ManSection>1715<Oper Name="CollatzLikeMappingByOrbitTree" Arg="G, n, min_r, max_r"1716Label="for rcwa group, root point and range of radii"/>1717<Returns>1718either an rcwa mapping <M>f</M> which maps the sphere of radius1719<M>r</M> about <A>n</A> under the action of <A>G</A> into the sphere1720of radius <M>r-1</M> about <A>n</A> for every <M>r</M> ranging from1721<A>min_r</A> to <A>max_r</A>, or <C>fail</C>.1722</Returns>1723<Description>1724Obviously not for every rcwa group and every root point a mapping1725<M>f</M> with these properties exists, and if it exists, it1726usually depends on the choice of generators of the group.1727<Example>1728<![CDATA[1729gap> G := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,2,2,4),1730> ClassTransposition(1,4,2,6));;1731gap> G := SparseRep(G);;1732gap> f := CollatzLikeMappingByOrbitTree(G,0,4,10);1733<rcwa mapping of Z with modulus 4 and 4 affine parts>1734gap> Display(f);17351736Rcwa mapping of Z with modulus 4 and 4 affine parts17371738/1739| n+1 if n in 0(4)1740| (3n+1)/2 if n in 1(4)1741n |-> < n/2 if n in 2(4)1742| n-1 if n in 3(4)1743|1744\17451746gap> B := Ball(G,0,15:Spheres);1747[ [ 0 ], [ 1 ], [ 2 ], [ 3 ], [ 6 ], [ 7 ], [ 14 ], [ 9, 15 ], [ 8, 18, 30 ],1748[ 5, 19, 31 ], [ 4, 10, 38, 62 ], [ 11, 25, 39, 41, 63 ],1749[ 22, 24, 40, 50, 78, 82, 126 ], [ 23, 33, 51, 79, 83, 127 ],1750[ 32, 46, 66, 102, 158, 166, 254 ],1751[ 21, 47, 67, 103, 105, 159, 167, 169, 255 ] ]1752gap> List([3..15],i->IsSubset(B[i-1],B[i]^f));1753[ true, true, true, true, true, true, true, true, true, true, true, true,1754true ]1755gap> Trajectory(f,52,[0,1]);1756[ 52, 53, 80, 81, 122, 61, 92, 93, 140, 141, 212, 213, 320, 321, 482, 241,1757362, 181, 272, 273, 410, 205, 308, 309, 464, 465, 698, 349, 524, 525, 788,1758789, 1184, 1185, 1778, 889, 1334, 667, 666, 333, 500, 501, 752, 753, 1130,1759565, 848, 849, 1274, 637, 956, 957, 1436, 1437, 2156, 2157, 3236, 3237,17604856, 4857, 7286, 3643, 3642, 1821, 2732, 2733, 4100, 4101, 6152, 6153,17619230, 4615, 4614, 2307, 2306, 1153, 1730, 865, 1298, 649, 974, 487, 486,1762243, 242, 121, 182, 91, 90, 45, 68, 69, 104, 105, 158, 79, 78, 39, 38, 19,176318, 9, 14, 7, 6, 3, 2, 1 ]1764]]>1765</Example>1766</Description>1767</ManSection>17681769</Section>17701771<!-- #################################################################### -->17721773<Section Label="sec:MethodsForTameGroups">1774<Heading>1775Special attributes of tame residue-class-wise affine groups1776</Heading>17771778There are a couple of attributes which a priori make only sense for tame1779rcwa groups. With their help, various structural information about a given1780such group can be obtained.1781We have already seen above that there are for example methods for1782<C>IsSolvable</C>, <C>IsPerfect</C> and <C>DerivedSubgroup</C> available1783for tame rcwa groups, while testing wild groups for solvability or1784perfectness is currently not always feasible. The purpose of this section1785is to describe the specific attributes of tame groups which are needed for1786these computations.17871788<ManSection>1789<Heading>1790RespectedPartition (of a tame rcwa group or -permutation)1791</Heading>1792<Attr Name="RespectedPartition"1793Arg="G" Label="of a tame rcwa group"/>1794<Attr Name="RespectedPartition"1795Arg="g" Label="of a tame rcwa permutation"/>1796<Returns>1797a shortest and coarsest possible respected partition1798of the rcwa group <A>G</A> / of the rcwa permutation <A>g</A>.1799</Returns>1800<Description>1801A tame element <M>g</M> <M>\in</M> RCWA(<M>R</M>) permutes a1802partition of <M>R</M> into finitely many residue classes on all of1803which it is affine.1804Given a tame group <M>G</M> <M><</M> RCWA(<M>R</M>),1805there is a common such partition for all elements of <M>G</M>.1806We call the mentioned partitions <E>respected partitions</E>1807of <M>g</M> or <M>G</M>, respectively. <P/>18081809An rcwa group or an rcwa permutation has a respected partition1810if and only if it is tame. This holds either by definition or by1811Theorem 2.5.8 in <Cite Key="Kohl05"/>, depending on how1812one introduces the notion of tameness. <P/>18131814<Index Key="RespectsPartition" Subkey="for an rcwa group">1815<C>RespectsPartition</C>1816</Index>1817<Index Key="RespectsPartition" Subkey="for an rcwa permutation">1818<C>RespectsPartition</C>1819</Index>1820There is an operation <C>RespectsPartition(<A>G</A>,<A>P</A>)</C> /1821<C>RespectsPartition(<A>g</A>,<A>P</A>)</C>, which tests whether1822<A>G</A> or <A>g</A> respects a given partition <A>P</A>.1823The permutation induced by <A>g</A> on <C>P</C> can be computed1824efficiently by <C>PermutationOpNC(<A>g</A>,P,OnPoints)</C>.1825<Index Key="PermutationOpNC" Subkey="g, P, OnPoints">1826<C>PermutationOpNC</C>1827</Index>1828<Example>1829<![CDATA[1830gap> G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));1831<rcwa group over Z with 2 generators>1832gap> IsTame(G);1833true1834gap> Size(G);1835infinity1836gap> P := RespectedPartition(G);1837[ 0(4), 2(4), 1(6), 3(6), 5(6) ]1838]]>1839</Example>1840</Description>1841</ManSection>18421843<ManSection>1844<Heading>1845ActionOnRespectedPartition & KernelOfActionOnRespectedPartition1846</Heading>1847<Attr Name="ActionOnRespectedPartition"1848Arg="G" Label="for a tame rcwa group"/>1849<Attr Name="KernelOfActionOnRespectedPartition"1850Arg="G" Label="for a tame rcwa group"/>1851<Attr Name="RankOfKernelOfActionOnRespectedPartition"1852Arg="G" Label="for a tame rcwa group"/>1853<Returns>1854the action of the tame rcwa group <A>G</A> on1855<C>RespectedPartition(<A>G</A>)</C>, the kernel of1856this action or the rank of the latter, respectively.1857</Returns>1858<Description>1859The method for <C>KernelOfActionOnRespectedPartition</C> uses the1860package <Package>Polycyclic</Package> <Cite Key="Polycyclic"/>.18611862The rank of the largest free abelian subgroup of the kernel of the1863action of <A>G</A> on its stored respected partition is1864<C>RankOfKernelOfActionOnRespectedPartition(<A>G</A>)</C>.1865<Example>1866<![CDATA[1867gap> G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));;1868gap> H := ActionOnRespectedPartition(G);1869Group([ (1,3), (1,2) ])1870gap> H = Action(G,P);1871true1872gap> Size(H);187361874gap> K := KernelOfActionOnRespectedPartition(G);1875<rcwa group over Z with 3 generators>1876gap> RankOfKernelOfActionOnRespectedPartition(G);187731878gap> Index(G,K);187961880gap> List(GeneratorsOfGroup(K),Factorization);1881[ [ ClassShift( 0(4) ) ], [ ClassShift( 2(4) ) ], [ ClassShift( 1(6) ) ] ]1882gap> Image(IsomorphismPcpGroup(K));1883Pcp-group with orders [ 0, 0, 0 ]1884]]>1885</Example>1886</Description>1887</ManSection>18881889Let <M>G</M> be a tame rcwa group over &ZZ;, let <M>\mathcal{P}</M>1890be a respected partition of <M>G</M> and put <M>m := |\mathcal{P}|</M>.1891Then there is an rcwa permutation <M>g</M> which maps <M>\mathcal{P}</M>1892to the partition of &ZZ; into the residue classes (mod <M>m</M>),1893and the conjugate <M>G^g</M> of <M>G</M> under such a permutation1894is integral (cf. <Cite Key="Kohl05"/>, Theorem 2.5.14). <P/>18951896<Index Key="IntegralConjugate" Subkey="of a tame rcwa group">1897<C>IntegralConjugate</C>1898</Index>1899<Index Key="IntegralConjugate" Subkey="of a tame rcwa permutation">1900<C>IntegralConjugate</C>1901</Index>1902<Index Key="IntegralizingConjugator" Subkey="of a tame rcwa group">1903<C>IntegralizingConjugator</C>1904</Index>1905<Index Key="IntegralizingConjugator" Subkey="of a tame rcwa permutation">1906<C>IntegralizingConjugator</C>1907</Index>19081909The conjugate <M>G^g</M> can be determined by the operation1910<C>IntegralConjugate</C>, and the conjugating permutation <M>g</M>1911can be determined by the operation <C>IntegralizingConjugator</C>.1912Both operations are applicable to rcwa permutations as well.1913Note that a tame rcwa group does not determine its integral conjugate1914uniquely.19151916<Example>1917<![CDATA[1918gap> G := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));;1919gap> G^IntegralizingConjugator(G) = IntegralConjugate(G);1920true1921gap> RespectedPartition(G);1922[ 0(4), 2(4), 1(6), 3(6), 5(6) ]1923gap> RespectedPartition(G)^IntegralizingConjugator(G);1924[ 0(5), 1(5), 2(5), 3(5), 4(5) ]1925gap> last = RespectedPartition(IntegralConjugate(G));1926true1927]]>1928</Example>19291930</Section>19311932<!-- #################################################################### -->19331934<Section Label="sec:Random">1935<Heading>Generating pseudo-random elements of RCWA(R) and CT(R)</Heading>19361937<Index Key="Random" Subkey="RCWA(R)"><C>Random</C></Index>1938<Index Key="Random" Subkey="CT(R)"><C>Random</C></Index>1939There are methods for the operation <C>Random</C> for RCWA(<M>R</M>)1940and CT(<M>R</M>). These methods are designed to be suitable for generating1941interesting examples. No particular distribution is guaranteed.19421943<Log>1944<![CDATA[1945gap> elm := Random(RCWA(Integers));;1946gap> Display(elm);19471948Rcwa permutation of Z with modulus 18019491950/1951| 6n+12 if n in 2(10) U 4(10) U 6(10) U 8(10)1952| 3n+3 if n in 1(20) U 5(20) U 9(20) U 17(20)1953| 6n+10 if n in 0(10)1954| (n+1)/2 if n in 15(60) U 27(60) U 39(60) U 51(60)1955| (n+7)/2 if n in 19(60) U 31(60) U 43(60) U 55(60)1956| 3n+1 if n in 13(20)1957| (-n+17)/6 if n in 23(180) U 35(180) U 59(180) U 71(180) U1958n |-> < 95(180) U 131(180) U 143(180) U 179(180)1959| (-n-1)/6 if n in 11(180) U 47(180) U 83(180) U 155(180)1960| (-n+7)/2 if n in 3(60)1961| (n+3)/2 if n in 7(60)1962| (n-17)/6 if n in 107(180)1963| (-n+11)/6 if n in 119(180)1964| (-n+29)/6 if n in 167(180)1965|1966\1967]]>1968</Log>19691970The elements which are returned by this method are obtained by1971multiplying class shifts (see <Ref Func="ClassShift" Label="r, m"/>),1972class reflections (see <Ref Func="ClassReflection" Label="r, m"/>) and1973class transpositions (see <Ref Func="ClassTransposition"1974Label="r1, m1, r2, m2"/>).1975These factors can be retrieved by factoring:19761977<Log>1978<![CDATA[1979gap> Factorization(elm);1980[ ClassTransposition(0,2,3,4), ClassTransposition(1,2,4,6), ClassShift(0,2),1981ClassShift(1,3), ClassReflection(2,5), ClassReflection(1,3),1982ClassReflection(1,2) ]1983]]>1984</Log>19851986</Section>19871988<!-- #################################################################### -->19891990<Section Label="sec:CategoriesOfRcwaGroups">1991<Heading>The categories of residue-class-wise affine groups</Heading>19921993<ManSection>1994<Filt Name="IsRcwaGroup" Arg="G"/>1995<Filt Name="IsRcwaGroupOverZ" Arg="G"/>1996<Filt Name="IsRcwaGroupOverZ_pi" Arg="G"/>1997<Filt Name="IsRcwaGroupOverGFqx" Arg="G"/>1998<Returns>1999<C>true</C> if <A>G</A> is an rcwa group,2000an rcwa group over the ring of integers,2001an rcwa group over a semilocalization of the ring of integers or2002an rcwa group over a polynomial ring in one variable over a finite field,2003respectively, and <C>false</C> otherwise.2004</Returns>2005<Description>20062007<Index Key="IsRcwaGroupOverZOrZ_pi">2008<C>IsRcwaGroupOverZOrZ&uscore;pi</C>2009</Index>20102011Often the same methods can be used for rcwa groups over the ring of2012integers and over its semilocalizations. For this reason there is2013a category <C>IsRcwaGroupOverZOrZ&uscore;pi</C> which is the union of2014<C>IsRcwaGroupOverZ</C> and <C>IsRcwaGroupOverZ&uscore;pi</C>. <P/>20152016<Index Key="IsNaturalRCWA"><C>IsNaturalRCWA</C></Index>2017<Index Key="IsNaturalCT"><C>IsNaturalCT</C></Index>20182019To allow distinguishing the groups RCWA(<M>R</M>) and CT(<M>R</M>) from2020others, they have the characteristic property <C>IsNaturalRCWA</C> or2021<C>IsNaturalCT</C>, respectively.20222023</Description>2024</ManSection>20252026</Section>20272028<!-- #################################################################### -->20292030</Chapter>20312032<!-- #################################################################### -->203320342035