GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
1[1X3 [33X[0;0YResidue-Class-Wise Affine Groups[133X[101X23[33X[0;0YIn this chapter, we describe how to construct residue-class-wise affine4groups and how to compute with them.[133X567[1X3.1 [33X[0;0YConstructing residue-class-wise affine groups[133X[101X89[33X[0;0YAs any other groups in [5XGAP[105X, residue-class-wise affine (rcwa-) groups can be10constructed by [10XGroup[110X, [10XGroupByGenerators[110X or [10XGroupWithGenerators[110X.[133X1112[4X[32X Example [32X[104X13[4X[28X[128X[104X14[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));[127X[104X15[4X[28X<rcwa group over Z with 2 generators>[128X[104X16[4X[25Xgap>[125X [27XIsTame(G); Size(G); IsSolvable(G); IsPerfect(G);[127X[104X17[4X[28Xtrue[128X[104X18[4X[28Xinfinity[128X[104X19[4X[28Xfalse[128X[104X20[4X[28Xfalse[128X[104X21[4X[28X[128X[104X22[4X[32X[104X2324[33X[0;0YAn rcwa group isomorphic to a given group can be obtained by taking the25image of a faithful rcwa representation:[133X2627[1X3.1-1 IsomorphismRcwaGroup[101X2829[29X[2XIsomorphismRcwaGroup[102X( [3XG[103X, [3XR[103X ) [32X attribute30[29X[2XIsomorphismRcwaGroup[102X( [3XG[103X ) [32X attribute31[6XReturns:[106X [33X[0;10Ya monomorphism from the group [3XG[103X to RCWA([3XR[103X) or to RCWA(ℤ),32respectively.[133X3334[33X[0;0YThe best-supported case is [3XR[103X = ℤ. Currently there are methods available for35finite groups, for free products of finite groups and for free groups. The36method for free products of finite groups uses the Table-Tennis Lemma (cf.37e.g. Section II.B. in [dlH00]), and the method for free groups uses an38adaptation of the construction given on page 27 in [dlH00] from PSL(2,ℂ) to39RCWA(ℤ).[133X4041[4X[32X Example [32X[104X42[4X[28X[128X[104X43[4X[25Xgap>[125X [27XF := FreeProduct(Group((1,2)(3,4),(1,3)(2,4)),Group((1,2,3)),[127X[104X44[4X[25X>[125X [27X SymmetricGroup(3));[127X[104X45[4X[28X<fp group on the generators [ f1, f2, f3, f4, f5 ]>[128X[104X46[4X[25Xgap>[125X [27XIsomorphismRcwaGroup(F);[127X[104X47[4X[28X[ f1, f2, f3, f4, f5 ] -> [ <rcwa permutation of Z with modulus 12>,[128X[104X48[4X[28X <rcwa permutation of Z with modulus 24>,[128X[104X49[4X[28X <rcwa permutation of Z with modulus 12>,[128X[104X50[4X[28X <rcwa permutation of Z with modulus 72>,[128X[104X51[4X[28X <rcwa permutation of Z with modulus 36> ][128X[104X52[4X[25Xgap>[125X [27XIsomorphismRcwaGroup(FreeGroup(2));[127X[104X53[4X[28X[ f1, f2 ] -> [ <wild rcwa permutation of Z with modulus 8>,[128X[104X54[4X[28X <wild rcwa permutation of Z with modulus 8> ][128X[104X55[4X[25Xgap>[125X [27XF2 := Image(last);[127X[104X56[4X[28X<wild rcwa group over Z with 2 generators>[128X[104X57[4X[28X[128X[104X58[4X[32X[104X5960[33X[0;0YFurther, new rcwa groups can be constructed from given ones by taking direct61products and by taking wreath products with finite groups or with the62infinite cyclic group:[133X6364[1X3.1-2 DirectProduct[101X6566[29X[2XDirectProduct[102X( [3XG1[103X, [3XG2[103X, [3X...[103X ) [32X method67[6XReturns:[106X [33X[0;10Yan rcwa group isomorphic to the direct product of the rcwa groups68over ℤ given as arguments.[133X6970[33X[0;0YThere is certainly no unique or canonical way to embed a direct product of71rcwa groups into RCWA(ℤ). This method chooses to embed the groups [3XG1[103X, [3XG2[103X,72[3XG3[103X ... via restrictions by [22Xn ↦ mn[122X, [22Xn ↦ mn+1[122X, [22Xn ↦ mn+2[122X ... ([22X→[122X [2XRestriction[102X73([14X3.1-6[114X)), where [22Xm[122X denotes the number of groups given as arguments.[133X7475[4X[32X Example [32X[104X76[4X[28X[128X[104X77[4X[25Xgap>[125X [27XF2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;[127X[104X78[4X[25Xgap>[125X [27XF2xF2 := DirectProduct(F2,F2);[127X[104X79[4X[28X<wild rcwa group over Z with 4 generators>[128X[104X80[4X[25Xgap>[125X [27XImage(Projection(F2xF2,1)) = F2;[127X[104X81[4X[28Xtrue[128X[104X82[4X[28X[128X[104X83[4X[32X[104X848586[1X3.1-3 [33X[0;0YWreathProduct (for an rcwa group over Z, with a permutation group or[101X87[1X(ℤ,+))[133X[101X8889[29X[2XWreathProduct[102X( [3XG[103X, [3XP[103X ) [32X method90[29X[2XWreathProduct[102X( [3XG[103X, [3XZ[103X ) [32X method91[6XReturns:[106X [33X[0;10Yan rcwa group isomorphic to the wreath product of the rcwa group [3XG[103X92over ℤ with the finite permutation group [3XP[103X or with the infinite93cyclic group [3XZ[103X, respectively.[133X9495[33X[0;0YThe first-mentioned method embeds the [10XNrMovedPoints([3XP[103X[10X)[110Xth direct power of [3XG[103X96using the method for [10XDirectProduct[110X, and lets the permutation group [3XP[103X act97naturally on the set of residue classes modulo [10XNrMovedPoints([3XP[103X[10X)[110X. The98second-mentioned method restricts ([22X→[122X [2XRestriction[102X ([14X3.1-6[114X)) the group [3XG[103X to the99residue class 3(4), and maps the generator of the infinite cyclic group [3XZ[103X to100[10XClassTransposition(0,2,1,2) * ClassTransposition(0,2,1,4)[110X.[133X101102[4X[32X Example [32X[104X103[4X[28X[128X[104X104[4X[25Xgap>[125X [27XF2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;[127X[104X105[4X[25Xgap>[125X [27XF2wrA5 := WreathProduct(F2,AlternatingGroup(5));;[127X[104X106[4X[25Xgap>[125X [27XEmbedding(F2wrA5,1);[127X[104X107[4X[28X[ <wild rcwa permutation of Z with modulus 8>,[128X[104X108[4X[28X <wild rcwa permutation of Z with modulus 8> ] ->[128X[104X109[4X[28X[ <wild rcwa permutation of Z with modulus 40>,[128X[104X110[4X[28X <wild rcwa permutation of Z with modulus 40> ][128X[104X111[4X[25Xgap>[125X [27XEmbedding(F2wrA5,2);[127X[104X112[4X[28X[ (1,2,3,4,5), (3,4,5) ] -> [ ( 0(5), 1(5), 2(5), 3(5), 4(5) ), [128X[104X113[4X[28X ( 2(5), 3(5), 4(5) ) ][128X[104X114[4X[25Xgap>[125X [27XZwrZ := WreathProduct(Group(ClassShift(0,1)),Group(ClassShift(0,1)));[127X[104X115[4X[28X<wild rcwa group over Z with 2 generators>[128X[104X116[4X[25Xgap>[125X [27XEmbedding(ZwrZ,1);[127X[104X117[4X[28X[ ClassShift( Z ) ] ->[128X[104X118[4X[28X[ <tame rcwa permutation of Z with modulus 4, of order infinity> ][128X[104X119[4X[25Xgap>[125X [27XEmbedding(ZwrZ,2);[127X[104X120[4X[28X[ ClassShift( Z ) ] -> [ <wild rcwa permutation of Z with modulus 4> ][128X[104X121[4X[28X[128X[104X122[4X[32X[104X123124[33X[0;0YAlso, rcwa groups can be obtained as particular extensions of finite125permutation groups:[133X126127[1X3.1-4 MergerExtension[101X128129[29X[2XMergerExtension[102X( [3XG[103X, [3Xpoints[103X, [3Xpoint[103X ) [32X operation130[6XReturns:[106X [33X[0;10Yroughly spoken, an extension of [3XG[103X by an involution which [21Xmerges[121X131[3Xpoints[103X into [3Xpoint[103X.[133X132133[33X[0;0YThe arguments of this operation are a finite permutation group [3XG[103X, a set134[3Xpoints[103X of points moved by [3XG[103X and a single point [3Xpoint[103X moved by [3XG[103X which is not135in [3Xpoints[103X.[133X136137[33X[0;0YLet [22Xn[122X be the largest moved point of [3XG[103X, and let [22XH[122X be the tame subgroup of138CT(ℤ) which respects the partition [22XmathcalP[122X of ℤ into the residue classes139(mod [22Xn[122X), and which acts on [22XmathcalP[122X as [3XG[103X acts on [22X{1, dots, n}[122X. Further140assume that [3Xpoints[103X = [22X{p_1, dots, p_k}[122X and [3Xpoint[103X = [22Xp[122X, and put [22Xr_i := p_i-1, i141= 1, dots, k[122X and [22Xr := p-1[122X. Now let [22Xσ[122X be the product of the class142transpositions [22Xτ_r_i(n),r+(i-1)n(kn), i = 1, dots, k[122X. The group returned by143this operation is the extension of [22XH[122X by the involution [22Xσ[122X. -- On first144reading, this may look a little complicated, but really the code of the145method is only about half as long as this description.[133X146147[4X[32X Example [32X[104X148[4X[28X[128X[104X149[4X[25Xgap>[125X [27X# First example -- a group isomorphic to PSL(2,Z):[127X[104X150[4X[25Xgap>[125X [27XG := MergerExtension(Group((1,2,3)),[1,2],3);[127X[104X151[4X[28X<rcwa group over Z with 2 generators>[128X[104X152[4X[25Xgap>[125X [27XSize(G); [127X[104X153[4X[28Xinfinity[128X[104X154[4X[25Xgap>[125X [27XGeneratorsOfGroup(G);[127X[104X155[4X[28X[ ( 0(3), 1(3), 2(3) ), ( 0(3), 2(6) ) ( 1(3), 5(6) ) ][128X[104X156[4X[25Xgap>[125X [27XB := Ball(G,One(G),6:Spheres);;[127X[104X157[4X[25Xgap>[125X [27XList(B,Length);[127X[104X158[4X[28X[ 1, 3, 4, 6, 8, 12, 16 ][128X[104X159[4X[25Xgap>[125X [27X#[127X[104X160[4X[25Xgap>[125X [27X# Second example -- a group isomorphic to Thompson's group V:[127X[104X161[4X[25Xgap>[125X [27XG := MergerExtension(Group((1,2,3,4),(1,2)),[1,2],3);[127X[104X162[4X[28X<rcwa group over Z with 3 generators>[128X[104X163[4X[25Xgap>[125X [27XSize(G);[127X[104X164[4X[28Xinfinity[128X[104X165[4X[25Xgap>[125X [27XGeneratorsOfGroup(G);[127X[104X166[4X[28X[ ( 0(4), 1(4), 2(4), 3(4) ), ( 0(4), 1(4) ),[128X[104X167[4X[28X ( 0(4), 2(8) ) ( 1(4), 6(8) ) ][128X[104X168[4X[25Xgap>[125X [27XB := Ball(G,One(G),6:Spheres);;[127X[104X169[4X[25Xgap>[125X [27XList(B,Length);[127X[104X170[4X[28X[ 1, 4, 11, 28, 69, 170, 413 ][128X[104X171[4X[25Xgap>[125X [27XG = Group(List([[0,2,1,2],[1,2,2,4],[0,2,1,4],[1,4,2,4]],[127X[104X172[4X[25X>[125X [27X ClassTransposition));[127X[104X173[4X[28Xtrue[128X[104X174[4X[28X[128X[104X175[4X[32X[104X176177[33X[0;0YIt is also possible to build an rcwa group from a list of residue classes:[133X178179[1X3.1-5 GroupByResidueClasses[101X180181[29X[2XGroupByResidueClasses[102X( [3Xclasses[103X ) [32X function182[6XReturns:[106X [33X[0;10Ythe group which is generated by all class transpositions which183interchange disjoint residue classes in [3Xclasses[103X.[133X184185[33X[0;0YThe argument [3Xclasses[103X must be a list of residue classes.[133X186187[33X[0;0YIf the residue classes in [3Xclasses[103X are pairwise disjoint, then the returned188group is the symmetric group on [3Xclasses[103X. If any two residue classes in189[3Xclasses[103X intersect non-trivially, then the returned group is trivial. In many190other cases, the returned group is infinite.[133X191192[4X[32X Example [32X[104X193[4X[28X[128X[104X194[4X[25Xgap>[125X [27XG := GroupByResidueClasses(List([[0,2],[0,4],[1,4],[2,4],[3,4]],[127X[104X195[4X[25X>[125X [27X ResidueClass));[127X[104X196[4X[28X<rcwa group over Z with 8 generators>[128X[104X197[4X[25Xgap>[125X [27XH := Group(List([[0,2,1,2],[1,2,2,4],[0,2,1,4],[1,4,2,4]],[127X[104X198[4X[25X>[125X [27X ClassTransposition)); # Thompson's group V[127X[104X199[4X[28X<(0(2),1(2)),(1(2),2(4)),(0(2),1(4)),(1(4),2(4))>[128X[104X200[4X[25Xgap>[125X [27XG = H;[127X[104X201[4X[28Xtrue[128X[104X202[4X[28X[128X[104X203[4X[32X[104X204205[33X[0;0YVarious ways to construct rcwa groups are based on certain monomorphisms206from the group RCWA([22XR[122X) into itself. Examples are the constructions of direct207products and wreath products described above. The support of the image of208such a monomorphism is the image of a given injective rcwa mapping. For this209reason, these monomorphisms are called [13Xrestriction monomorphisms[113X. The210following operation computes images of rcwa mappings and -groups under these211embeddings of RCWA([22XR[122X) into itself:[133X212213214[1X3.1-6 [33X[0;0YRestriction (of an rcwa mapping or -group, by an injective rcwa[101X215[1Xmapping)[133X[101X216217[29X[2XRestriction[102X( [3Xg[103X, [3Xf[103X ) [32X operation218[29X[2XRestriction[102X( [3XG[103X, [3Xf[103X ) [32X operation219[6XReturns:[106X [33X[0;10Ythe restriction of the rcwa mapping [3Xg[103X (respectively the rcwa group220[3XG[103X) by the injective rcwa mapping [3Xf[103X.[133X221222[33X[0;0YBy definition, the [13Xrestriction[113X [22Xg_f[122X of an rcwa mapping [3Xg[103X by an injective rcwa223mapping [3Xf[103X is the unique rcwa mapping which satisfies the equation [22Xf ⋅ g_f =224g ⋅ f[122X and which fixes the complement of the image of [3Xf[103X pointwise. If [3Xf[103X is225bijective, the restriction of [3Xg[103X by [3Xf[103X is just the conjugate of [3Xg[103X under [3Xf[103X.[133X226227[33X[0;0YThe [13Xrestriction[113X of an rcwa group [3XG[103X by an injective rcwa mapping [3Xf[103X is defined228as the group whose elements are the restrictions of the elements of [3XG[103X by [3Xf[103X.229The restriction of [3XG[103X by [3Xf[103X acts on the image of [3Xf[103X and fixes its complement230pointwise.[133X231232[4X[32X Example [32X[104X233[4X[28X[128X[104X234[4X[25Xgap>[125X [27XF2tilde := Restriction(F2,RcwaMapping([[5,3,1]]));[127X[104X235[4X[28X<wild rcwa group over Z with 2 generators>[128X[104X236[4X[25Xgap>[125X [27XSupport(F2tilde);[127X[104X237[4X[28X3(5)[128X[104X238[4X[28X[128X[104X239[4X[32X[104X240241242[1X3.1-7 [33X[0;0YInduction (of an rcwa mapping or -group, by an injective rcwa mapping)[133X[101X243244[29X[2XInduction[102X( [3Xg[103X, [3Xf[103X ) [32X operation245[29X[2XInduction[102X( [3XG[103X, [3Xf[103X ) [32X operation246[6XReturns:[106X [33X[0;10Ythe induction of the rcwa mapping [3Xg[103X (respectively the rcwa group247[3XG[103X) by the injective rcwa mapping [3Xf[103X.[133X248249[33X[0;0Y[13XInduction[113X is the right inverse of restriction, i.e. it is250[10XInduction(Restriction([3Xg[103X[10X,[3Xf[103X[10X),[3Xf[103X[10X) = [3Xg[103X[10X[110X and [10XInduction(Restriction([3XG[103X[10X,[3Xf[103X[10X),[3Xf[103X[10X) = [3XG[103X[10X[110X. The251mapping [3Xg[103X respectively the group [3XG[103X must not move points outside the image252of [3Xf[103X.[133X253254[4X[32X Example [32X[104X255[4X[28X[128X[104X256[4X[25Xgap>[125X [27XInduction(F2tilde,RcwaMapping([[5,3,1]])) = F2;[127X[104X257[4X[28Xtrue[128X[104X258[4X[28X[128X[104X259[4X[32X[104X260261[33X[0;0YOnce having constructed an rcwa group, it is sometimes possible to obtain a262smaller generating set by the operation [10XSmallGeneratingSet[110X.[133X263264[33X[0;0YThere are methods for the operations [10XView[110X, [10XDisplay[110X, [10XPrint[110X and [10XString[110X which265are applicable to rcwa groups.[133X266267[33X[0;0YBasic attributes of an rcwa group which are derived from the coefficients of268its elements are [10XModulus[110X, [10XMultiplier[110X, [10XDivisor[110X and [10XPrimeSet[110X. The [13Xmodulus[113X of269an rcwa group is the lcm of the moduli of its elements if such an lcm270exists, i.e. if the group is tame, and 0 otherwise. The [13Xmultiplier[113X271respectively [13Xdivisor[113X of an rcwa group is the lcm of the multipliers272respectively divisors of its elements in case such an lcm exists and [22X∞[122X273otherwise. The [13Xprime set[113X of an rcwa group is the union of the prime sets of274its elements. There are shorthands [10XMod[110X, [10XMult[110X and [10XDiv[110X defined for [10XModulus[110X,275[10XMultiplier[110X and [10XDivisor[110X, respectively. An rcwa group is called [13Xclass-wise276translating[113X, [13Xintegral[113X or [13Xclass-wise order-preserving[113X if all of its elements277are so. There are corresponding methods available for278[10XIsClassWiseTranslating[110X, [10XIsIntegral[110X and [10XIsClassWiseOrderPreserving[110X. There is279a property [10XIsSignPreserving[110X, which indicates whether a given rcwa group280over ℤ acts on the set of nonnegative integers. The latter holds for any281subgroup of CT(ℤ) (cf. below).[133X282283[4X[32X Example [32X[104X284[4X[28X[128X[104X285[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,3,2,6),[127X[104X286[4X[25X>[125X [27X ClassReflection(2,4));[127X[104X287[4X[28X<rcwa group over Z with 3 generators>[128X[104X288[4X[25Xgap>[125X [27XList([Modulus,Multiplier,Divisor,PrimeSet,IsClassWiseTranslating,[127X[104X289[4X[25X>[125X [27X IsIntegral,IsClassWiseOrderPreserving,IsSignPreserving],f->f(G));[127X[104X290[4X[28X[ 24, 2, 2, [ 2, 3 ], false, false, false, false ][128X[104X291[4X[28X[128X[104X292[4X[32X[104X293294[33X[0;0YAll rcwa groups over a ring [22XR[122X are subgroups of RCWA([22XR[122X). The group RCWA([22XR[122X)295itself is not finitely generated, thus cannot be constructed as described296above. It is handled as a special case:[133X297298[1X3.1-8 RCWA[101X299300[29X[2XRCWA[102X( [3XR[103X ) [32X function301[6XReturns:[106X [33X[0;10Ythe group RCWA([3XR[103X) of all residue-class-wise affine permutations of302the ring [3XR[103X.[133X303304[4X[32X Example [32X[104X305[4X[28X[128X[104X306[4X[25Xgap>[125X [27XRCWA_Z := RCWA(Integers);[127X[104X307[4X[28XRCWA(Z)[128X[104X308[4X[25Xgap>[125X [27XIsSubgroup(RCWA_Z,G);[127X[104X309[4X[28Xtrue[128X[104X310[4X[28X[128X[104X311[4X[32X[104X312313[33X[0;0YExamples of rcwa permutations can be obtained via [10XRandom(RCWA([3XR[103X[10X))[110X, see314Section [14X3.5[114X. The number of conjugacy classes of RCWA(ℤ) of elements of given315order is known, cf. Corollary 2.7.1 (b) in [Koh05]. It can be determined by316the function [10XNrConjugacyClassesOfRCWAZOfOrder[110X:[133X317318[4X[32X Example [32X[104X319[4X[28X[128X[104X320[4X[25Xgap>[125X [27XList([2,105],NrConjugacyClassesOfRCWAZOfOrder);[127X[104X321[4X[28X[ infinity, 218 ][128X[104X322[4X[28X[128X[104X323[4X[32X[104X324325[33X[0;0YWe denote the group which is generated by all class transpositions of the326ring [22XR[122X by CT([22XR[122X). This group is handled as a special case as well:[133X327328[1X3.1-9 CT[101X329330[29X[2XCT[102X( [3XR[103X ) [32X function331[29X[2XCT[102X( [3XP[103X, [3XIntegers[103X ) [32X function332[6XReturns:[106X [33X[0;10Ythe group CT([3XR[103X) which is generated by all class transpositions of333the ring [3XR[103X, respectively, the group CT([3XP[103X,ℤ) which is generated by334all class transpositions of ℤ which interchange residue classes335whose moduli have only prime factors in the finite set [3XP[103X.[133X336337[4X[32X Example [32X[104X338[4X[28X[128X[104X339[4X[25Xgap>[125X [27XCT_Z := CT(Integers);[127X[104X340[4X[28XCT(Z)[128X[104X341[4X[25Xgap>[125X [27XIsSimple(CT_Z); # One of a number of stored attributes/properties.[127X[104X342[4X[28Xtrue[128X[104X343[4X[25Xgap>[125X [27XV := CT([2],Integers);[127X[104X344[4X[28XCT_[ 2 ](Z)[128X[104X345[4X[25Xgap>[125X [27XGeneratorsOfGroup(V);[127X[104X346[4X[28X[ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 0(2), 1(4) ), ( 1(4), 2(4) ) ][128X[104X347[4X[25Xgap>[125X [27XG := CT([2,3],Integers); [127X[104X348[4X[28XCT_[ 2, 3 ](Z)[128X[104X349[4X[25Xgap>[125X [27XGeneratorsOfGroup(G);[127X[104X350[4X[28X[ ( 0(2), 1(2) ), ( 0(3), 1(3) ), ( 1(3), 2(3) ), ( 0(2), 1(4) ), [128X[104X351[4X[28X ( 0(2), 5(6) ), ( 0(3), 1(6) ) ][128X[104X352[4X[28X[128X[104X353[4X[32X[104X354355[33X[0;0YThe group CT(ℤ) has an outer automorphism which is given by conjugation with356[22Xn ↦ -n - 1[122X. This automorphism can be applied to an rcwa mapping of ℤ or to357an rcwa group over ℤ by the operation [10XMirrored[110X. The group [10XMirrored([110X[3XG[103X[10X)[110X acts358on the nonnegative integers as [3XG[103X acts on the negative integers, and vice359versa.[133X360361[4X[32X Example [32X[104X362[4X[28X[128X[104X363[4X[25Xgap>[125X [27Xct := ClassTransposition(0,2,1,6);[127X[104X364[4X[28X( 0(2), 1(6) )[128X[104X365[4X[25Xgap>[125X [27XMirrored(ct);[127X[104X366[4X[28X( 1(2), 4(6) )[128X[104X367[4X[25Xgap>[125X [27XG := Group(List([[0,2,1,2],[0,3,2,3],[2,4,1,6]],ClassTransposition));;[127X[104X368[4X[25Xgap>[125X [27XShortOrbits(G,[-100..100],100);[127X[104X369[4X[28X[ [ 0, 1, 2, 3, 4, 5 ] ][128X[104X370[4X[25Xgap>[125X [27XShortOrbits(Mirrored(G),[-100..100],100);[127X[104X371[4X[28X[ [ -6, -5, -4, -3, -2, -1 ] ][128X[104X372[4X[28X[128X[104X373[4X[32X[104X374375[33X[0;0YUnder the hypothesis that CT(ℤ) is the setwise stabilizer of [22Xℕ_0[122X in RCWA(ℤ),376the elements of CT(ℤ) with modulus dividing a given positive integer [22Xm[122X are377parametrized by the ordered partitions of ℤ into [22Xm[122X residue classes. The list378of these elements for given [22Xm[122X can be obtained by the function379[10XAllElementsOfCTZWithGivenModulus[110X, and the numbers of such elements for [22Xm ≤38024[122X are stored in the list [10XNrElementsOfCTZWithGivenModulus[110X.[133X381382[4X[32X Example [32X[104X383[4X[28X[128X[104X384[4X[25Xgap>[125X [27XNrElementsOfCTZWithGivenModulus{[1..8]};[127X[104X385[4X[28X[ 1, 1, 17, 238, 4679, 115181, 3482639, 124225680 ][128X[104X386[4X[28X[128X[104X387[4X[32X[104X388389[33X[0;0YThe number of conjugacy classes of CT(ℤ) of elements of given order is also390known under the hypothesis that CT(ℤ) is the setwise stabilizer of [22Xℕ_0[122X in391RCWA(ℤ). It can be determined by the function392[10XNrConjugacyClassesOfCTZOfOrder[110X.[133X393394395[1X3.2 [33X[0;0YBasic routines for investigating residue-class-wise affine groups[133X[101X396397[33X[0;0YIn the previous section we have seen how to construct rcwa groups. The398purpose of this section is to describe how to obtain information on the399structure of an rcwa group and on its action on the underlying ring. The400easiest way to get a little (but really only [13Xa very little[113X!) information on401the group structure is a dedicated method for the operation402[10XStructureDescription[110X:[133X403404[1X3.2-1 StructureDescription[101X405406[29X[2XStructureDescription[102X( [3XG[103X ) [32X method407[6XReturns:[106X [33X[0;10Ya string which sometimes gives a little glimpse of the structure408of the rcwa group [3XG[103X.[133X409410[33X[0;0YThe attribute [10XStructureDescription[110X for finite groups is documented in the411[5XGAP[105X Reference Manual. Therefore we describe here only issues which are412specific to infinite groups, and in particular to rcwa groups.[133X413414[33X[0;0YWreath products are denoted by [10Xwr[110X, and free products are denoted by [10X*[110X. The415infinite cyclic group (ℤ,+) is denoted by [10XZ[110X, the infinite dihedral group is416denoted by [10XD0[110X and free groups of rank [22X2,3,4,dots[122X are denoted by [10XF2[110X, [10XF3[110X,417[10XF4[110X, [22Xdots[122X. While for finite groups the symbol [10X.[110X is used to denote a non-split418extension, for rcwa groups in general it stands for an extension which may419be split or not. For wild groups in most cases it happens that there is a420large section on which no structural information can be obtained. Such421sections of the group with unknown structure are denoted by [10X<unknown>[110X. In422general, the structure of a section denoted by [10X<unknown>[110X can be very423complicated and very difficult to exhibit.[133X424425[4X[32X Example [32X[104X426[4X[28X[128X[104X427[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,4),ClassShift(0,5));;[127X[104X428[4X[25Xgap>[125X [27XStructureDescription(G);[127X[104X429[4X[28X"(Z x Z x Z x Z x Z x Z x Z) . (C2 x S7)"[128X[104X430[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,4),[127X[104X431[4X[25X>[125X [27X ClassShift(2,4),ClassReflection(1,2));;[127X[104X432[4X[25Xgap>[125X [27XStructureDescription(G:short);[127X[104X433[4X[28X"Z^2.((S3xS3):2)"[128X[104X434[4X[25Xgap>[125X [27XF2 := Image(IsomorphismRcwaGroup(FreeGroup(2)));;[127X[104X435[4X[25Xgap>[125X [27XPSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(3),[127X[104X436[4X[25X>[125X [27X CyclicGroup(2))));;[127X[104X437[4X[25Xgap>[125X [27XG := DirectProduct(PSL2Z,F2);[127X[104X438[4X[28X<wild rcwa group over Z with 4 generators>[128X[104X439[4X[25Xgap>[125X [27XStructureDescription(G);[127X[104X440[4X[28X"(C3 * C2) x F2"[128X[104X441[4X[25Xgap>[125X [27XG := WreathProduct(G,CyclicGroup(IsRcwaGroupOverZ,infinity));[127X[104X442[4X[28X<wild rcwa group over Z with 5 generators>[128X[104X443[4X[25Xgap>[125X [27XStructureDescription(G);[127X[104X444[4X[28X"((C3 * C2) x F2) wr Z"[128X[104X445[4X[25Xgap>[125X [27XCollatz := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);;[127X[104X446[4X[25Xgap>[125X [27XG := Group(Collatz,ClassShift(0,1));;[127X[104X447[4X[25Xgap>[125X [27XStructureDescription(G:short);[127X[104X448[4X[28X"<unknown>.Z"[128X[104X449[4X[28X[128X[104X450[4X[32X[104X451452[33X[0;0YThe extent to which the structure of an rcwa group can be exhibited453automatically is severely limited. In general, one can find out much more454about the structure of a given rcwa group in an interactive session using455the functionality described in the rest of this section and elsewhere in456this manual.[133X457458[33X[0;0YThe order of an rcwa group can be computed by the operation [10XSize[110X. An rcwa459group is finite if and only if it is tame and its action on a suitably460chosen respected partition (see [2XRespectedPartition[102X ([14X3.4-1[114X)) is faithful.461Hence the problem of computing the order of an rcwa group reduces to the462problem of deciding whether it is tame, the problem of deciding whether it463acts faithfully on a respected partition and the problem of computing the464order of the finite permutation group induced on the respected partition.[133X465466[4X[32X Example [32X[104X467[4X[28X[128X[104X468[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,3,2,3),[127X[104X469[4X[25X>[125X [27X ClassReflection(0,5));[127X[104X470[4X[28X<rcwa group over Z with 3 generators>[128X[104X471[4X[25Xgap>[125X [27XSize(G);[127X[104X472[4X[28X46080[128X[104X473[4X[28X[128X[104X474[4X[32X[104X475476[33X[0;0YFor a finite rcwa group, an isomorphism to a permutation group can be477computed by [10XIsomorphismPermGroup[110X:[133X478479[4X[32X Example [32X[104X480[4X[28X[128X[104X481[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,2),ClassTransposition(0,3,1,3));;[127X[104X482[4X[25Xgap>[125X [27XIsomorphismPermGroup(G);[127X[104X483[4X[28X[ ( 0(2), 1(2) ), ( 0(3), 1(3) ) ] -> [ (1,2)(3,4)(5,6), (1,2)(4,5) ][128X[104X484[4X[28X[128X[104X485[4X[32X[104X486487[33X[0;0YIn general the membership problem for rcwa groups is algorithmically488unsolvable, see Corollary 4.5 in [Koh10]. A consequence of this is that a489membership test [21X[10Xg in G[110X[121X may run into an infinite loop if the rcwa permutation490[10Xg[110X is not an element of the rcwa group [10XG[110X. For tame rcwa groups however491membership can always be decided. For wild rcwa groups, membership can very492often be decided quite quick as well, but -- as said -- not always. Anyway,493if [10Xg[110X is contained in [10XG[110X, the membership test will eventually always return494[10Xtrue[110X, provided that there are sufficient computing resources available495(memory etc.).[133X496497[33X[0;0YOn Info level 2 of [10XInfoRCWA[110X the membership test provides information on498reasons why the given rcwa permutation is an element of the given rcwa group499or not.[133X500501[33X[0;0YThe membership test [21X[10Xg in G[110X[121X recognizes an option [10XOrbitLengthBound[110X. If this502option is set, it returns [10Xfalse[110X once it has computed balls of size exceeding503[10XOrbitLengthBound[110X about 1 and [10Xg[110X in [10XG[110X, and these balls are still disjoint.504Note however that due to the algorithmic unsolvability of the membership505problem, [5XRCWA[105X has no means to check the correctness of such bound in a given506case. So the correct use of this option has to remain within the full507responsibility of the user.[133X508509[4X[32X Example [32X[104X510[4X[28X[128X[104X511[4X[25Xgap>[125X [27XG := Group(ClassShift(0,3),ClassTransposition(0,3,2,6));;[127X[104X512[4X[25Xgap>[125X [27X ClassShift(2,6)^7 * ClassTransposition(0,3,2,6)[127X[104X513[4X[25X>[125X [27X * ClassShift(0,3)^-3 in G;[127X[104X514[4X[28Xtrue[128X[104X515[4X[25Xgap>[125X [27XClassShift(0,1) in G;[127X[104X516[4X[28Xfalse[128X[104X517[4X[28X[128X[104X518[4X[32X[104X519520[33X[0;0YThe conjugacy problem for rcwa groups is difficult, and [5XRCWA[105X provides only521methods to solve it in some reasonably easy cases.[133X522523[4X[32X Example [32X[104X524[4X[28X[128X[104X525[4X[25Xgap>[125X [27XIsConjugate(RCWA(Integers),[127X[104X526[4X[25X>[125X [27X ClassTransposition(0,2,1,4),ClassShift(0,1));[127X[104X527[4X[28Xfalse[128X[104X528[4X[25Xgap>[125X [27XIsConjugate(CT(Integers),ClassTransposition(0,2,1,6),[127X[104X529[4X[25X>[125X [27X ClassTransposition(1,4,0,8));[127X[104X530[4X[28Xtrue[128X[104X531[4X[25Xgap>[125X [27Xg := RepresentativeAction(CT(Integers),ClassTransposition(0,2,1,6),[127X[104X532[4X[25X>[125X [27X ClassTransposition(1,4,0,8));[127X[104X533[4X[28X<rcwa permutation of Z with modulus 48>[128X[104X534[4X[25Xgap>[125X [27XClassTransposition(0,2,1,6)^g = ClassTransposition(1,4,0,8);[127X[104X535[4X[28Xtrue[128X[104X536[4X[28X[128X[104X537[4X[32X[104X538539[33X[0;0YThere is a property [10XIsTame[110X which indicates whether an rcwa group is tame or540not:[133X541542[4X[32X Example [32X[104X543[4X[28X[128X[104X544[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,4),ClassShift(1,3));;[127X[104X545[4X[25Xgap>[125X [27XH := Group(ClassTransposition(0,2,1,6),ClassShift(1,3));;[127X[104X546[4X[25Xgap>[125X [27XIsTame(G);[127X[104X547[4X[28Xtrue[128X[104X548[4X[25Xgap>[125X [27XIsTame(H);[127X[104X549[4X[28Xfalse[128X[104X550[4X[28X[128X[104X551[4X[32X[104X552553[33X[0;0YFor tame rcwa groups, there are methods for [10XIsSolvable[110X and [10XIsPerfect[110X554available, and usually derived subgroups and subgroup indices can be555computed as well. Linear representations of tame groups over the rationals556can be determined by the operation [10XIsomorphismMatrixGroup[110X. Testing a wild557group for solvability or perfectness is currently not always feasible, and558wild groups have in general no faithful finite-dimensional linear559representations. There is a method for [10XExponent[110X available, which works560basically for any rcwa group.[133X561562[4X[32X Example [32X[104X563[4X[28X[128X[104X564[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,4),ClassShift(1,2));;[127X[104X565[4X[25Xgap>[125X [27XIsPerfect(G);[127X[104X566[4X[28Xfalse[128X[104X567[4X[25Xgap>[125X [27XIsSolvable(G);[127X[104X568[4X[28Xtrue[128X[104X569[4X[25Xgap>[125X [27XD1 := DerivedSubgroup(G);; D2 := DerivedSubgroup(D1);;[127X[104X570[4X[25Xgap>[125X [27XIsAbelian(D2);[127X[104X571[4X[28Xtrue[128X[104X572[4X[25Xgap>[125X [27XIndex(G,D1); Index(D1,D2);[127X[104X573[4X[28Xinfinity[128X[104X574[4X[28X9[128X[104X575[4X[25Xgap>[125X [27XStructureDescription(G); StructureDescription(D1);[127X[104X576[4X[28X"(Z x Z x Z) . S3"[128X[104X577[4X[28X"(Z x Z) . C3"[128X[104X578[4X[25Xgap>[125X [27XQ := D1/D2;[127X[104X579[4X[28XGroup([ (), (1,2,4)(3,5,7)(6,8,9), (1,3,6)(2,5,8)(4,7,9) ])[128X[104X580[4X[25Xgap>[125X [27XStructureDescription(Q); [127X[104X581[4X[28X"C3 x C3"[128X[104X582[4X[25Xgap>[125X [27XExponent(G);[127X[104X583[4X[28Xinfinity[128X[104X584[4X[25Xgap>[125X [27Xphi := IsomorphismMatrixGroup(G);;[127X[104X585[4X[25Xgap>[125X [27XDisplay(Image(phi,ClassTransposition(0,2,1,4)));[127X[104X586[4X[28X[ [ 0, 0, 1/2, -1/2, 0, 0 ], [128X[104X587[4X[28X [ 0, 0, 0, 1, 0, 0 ], [128X[104X588[4X[28X [ 2, 1, 0, 0, 0, 0 ], [128X[104X589[4X[28X [ 0, 1, 0, 0, 0, 0 ], [128X[104X590[4X[28X [ 0, 0, 0, 0, 1, 0 ], [128X[104X591[4X[28X [ 0, 0, 0, 0, 0, 1 ] ][128X[104X592[4X[28X[128X[104X593[4X[32X[104X594595[33X[0;0YWhen investigating a group, a basic task is to find relations among the596generators:[133X597598[1X3.2-2 EpimorphismFromFpGroup[101X599600[29X[2XEpimorphismFromFpGroup[102X( [3XG[103X, [3Xr[103X ) [32X method601[29X[2XEpimorphismFromFpGroup[102X( [3XG[103X, [3Xr[103X, [3Xmaxparts[103X ) [32X method602[6XReturns:[106X [33X[0;10Yan epimorphism from a finitely presented group to the rcwa603group [3XG[103X.[133X604605[33X[0;0YThe argument [3Xr[103X is the [21Xsearch radius[121X, i.e. the radius of the ball around 1606which is scanned for relations. In general, the larger [3Xr[103X is chosen the607smaller the kernel of the returned epimorphism is. If the group [3XG[103X has finite608presentations, the kernel will in principle get trivial provided that [3Xr[103X is609chosen large enough. If the optional argument [3Xmaxparts[103X is given, it limits610the search space to elements with at most [3Xmaxparts[103X affine parts.[133X611612[4X[32X Example [32X[104X613[4X[28X[128X[104X614[4X[25Xgap>[125X [27Xa := ClassTransposition(2,4,3,4);;[127X[104X615[4X[25Xgap>[125X [27Xb := ClassTransposition(4,6,8,12);;[127X[104X616[4X[25Xgap>[125X [27Xc := ClassTransposition(3,4,4,6);;[127X[104X617[4X[25Xgap>[125X [27XG := SparseRep(Group(a,b,c));[127X[104X618[4X[28X<(2(4),3(4)),(4(6),8(12)),(3(4),4(6))>[128X[104X619[4X[25Xgap>[125X [27Xphi := EpimorphismFromFpGroup(G,6);[127X[104X620[4X[28X#I there are 3 generators and 12 relators of total length 330[128X[104X621[4X[28X#I there are 3 generators and 11 relators of total length 312[128X[104X622[4X[28X[ a, b, c ] -> [ ( 2(4), 3(4) ), ( 4(6), 8(12) ), ( 3(4), 4(6) ) ][128X[104X623[4X[25Xgap>[125X [27XRelatorsOfFpGroup(Source(phi));[127X[104X624[4X[28X[ a^2, b^2, c^2, (b*c)^3, (a*b)^6, (a*b*c*b)^3, (a*c*b*c)^3, [128X[104X625[4X[28X (a*b*a*c)^12, ((a*b)^2*a*c)^12, (a*b*(a*c)^2)^12, (a*b*c*a*c*b)^12 ][128X[104X626[4X[28X[128X[104X627[4X[32X[104X628629[33X[0;0YA related very common task is to factor group elements into generators:[133X630631[1X3.2-3 PreImagesRepresentative[101X632633[29X[2XPreImagesRepresentative[102X( [3Xphi[103X, [3Xg[103X ) [32X method634[6XReturns:[106X [33X[0;10Ya representative of the set of preimages of [3Xg[103X under the635epimorphism [3Xphi[103X from a free group to an rcwa group.[133X636637[33X[0;0YThe epimorphism [3Xphi[103X must map the generators of the free group to the638generators of the rcwa group one-by-one.[133X639640[33X[0;0YThis method can be used for factoring elements of rcwa groups into641generators. The implementation is based on [10XRepresentativeActionPreImage[110X, see642[2XRepresentativeAction[102X ([14X3.3-10[114X).[133X643644[33X[0;0YQuite frequently, computing several preimages is not harder than computing645just one, i.e. often several preimages are found simultaneously. The646operation [10XPreImagesRepresentatives[110X takes care of this. It takes the same647arguments as [10XPreImagesRepresentative[110X and returns a list of preimages. If648multiple preimages are found, their quotients give rise to nontrivial649relations among the generators of the image of [3Xphi[103X.[133X650651[4X[32X Example [32X[104X652[4X[28X[128X[104X653[4X[25Xgap>[125X [27Xa := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; SetName(a,"a");[127X[104X654[4X[25Xgap>[125X [27Xb := ClassShift(0,1);; SetName(b,"b");[127X[104X655[4X[25Xgap>[125X [27XG := Group(a,b);; # G = <<Collatz permutation>, n -> n + 1>[127X[104X656[4X[25Xgap>[125X [27Xphi := EpimorphismFromFreeGroup(G);;[127X[104X657[4X[25Xgap>[125X [27Xg := Comm(a^2*b^4,a*b^3); # a sample element to be factored[127X[104X658[4X[28X<rcwa permutation of Z with modulus 8>[128X[104X659[4X[25Xgap>[125X [27XPreImagesRepresentative(phi,g); # -> a factorization of g[127X[104X660[4X[28Xb^-3*(b^-1*a^-1)^2*b^3*a*b^-1*a*b^3[128X[104X661[4X[25Xgap>[125X [27Xg = b^-4*a^-1*b^-1*a^-1*b^3*a*b^-1*a*b^3; # check[127X[104X662[4X[28Xtrue[128X[104X663[4X[25Xgap>[125X [27Xg := Comm(a*b,Comm(a,b^3));[127X[104X664[4X[28X<rcwa permutation of Z with modulus 8>[128X[104X665[4X[25Xgap>[125X [27Xpre := PreImagesRepresentatives(phi,g);[127X[104X666[4X[28X[ (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 ][128X[104X667[4X[25Xgap>[125X [27Xrel := pre[1]/pre[2]; # -> a nontrivial relation[127X[104X668[4X[28X(b^-1*a^-1)^2*b^3*a*b^2*a^-1*b^-2*(b^-1*a)^2*b[128X[104X669[4X[25Xgap>[125X [27Xrel^phi;[127X[104X670[4X[28XIdentityMapping( Integers )[128X[104X671[4X[28X[128X[104X672[4X[32X[104X673674675[1X3.3 [33X[0;0YThe natural action of an rcwa group on the underlying ring[133X[101X676677[33X[0;0YKnowing a natural permutation representation of a group usually helps678significantly in computing in it and in obtaining results on its structure.679This holds particularly for the natural action of an rcwa group on its680underlying ring. In this section we describe [5XRCWA[105X's functionality related to681this action.[133X682683[33X[0;0YThe support, i.e. the set of moved points, of an rcwa group can be684determined by [10XSupport[110X or [10XMovedPoints[110X (these are synonyms). Testing for685transitivity on the underlying ring or on a union of residue classes thereof686is often feasible:[133X687688[4X[32X Example [32X[104X689[4X[28X[128X[104X690[4X[25Xgap>[125X [27XG := Group(ClassTransposition(1,2,0,4),ClassShift(0,2));;[127X[104X691[4X[25Xgap>[125X [27XIsTransitive(G,Integers);[127X[104X692[4X[28Xtrue[128X[104X693[4X[28X[128X[104X694[4X[32X[104X695696[33X[0;0YGroups generated by class transpositions of the integers act on the set of697nonnegative integers. There is a property698[10XIsTransitiveOnNonnegativeIntegersInSupport([3XG[103X[10X)[110X which indicates whether such699group acts transitively on the set of nonnegative integers in its support.700Since such transitivity test is a computationally hard problem, methods may701fail. If [10XIsTransitiveOnNonnegativeIntegersInSupport[110X returns [10Xtrue[110X, an702attribute [10XTransitivityCertificate[110X is set; this is a record containing703components [10Xphi[110X, [10Xwords[110X, [10Xclasses[110X, [10Xsmallpointbound[110X, [10Xstatus[110X and [10Xcomplete[110X as704follows:[133X705706[8X[10Xphi[110X[8X[108X707[33X[0;6Yis an epimorphism from a free group to [3XG[103X which maps generators to708generators.[133X709710[8X[10Xwords[110X[8X, [10Xclasses[110X[8X[108X711[33X[0;6Ytwo lists. -- [10Xwords[i][110X is a preimage under [10Xphi[110X of an element of [3XG[103X712which maps all sufficiently large positive integers in the residue713classes [10Xclasses[i][110X to smaller nonnegative integers.[133X714715[8X[10Xsmallpointbound[110X[8X[108X716[33X[0;6Yin addition to finding a list of group elements [22Xg_i[122X such that for any717large enough integer [22Xn[122X in the support of [3XG[103X there is some [22Xg_i[122X such that718[22Xn^g_i < n[122X, for verifying transitivity it was necessary to check that719all integers less than or equal to [10Xsmallpointbound[110X in the support of [3XG[103X720lie in the same orbit.[133X721722[8X[10Xstatus[110X[8X[108X723[33X[0;6Ythe string [10X"transitive"[110X in case all checks have been completed724successfully.[133X725726[8X[10Xcomplete[110X[8X[108X727[33X[0;6Y[10Xtrue[110X in case all checks have been completed successfully.[133X728729[33X[0;0YParts of this information for possibly intransitive groups can be obtained730by the operation [10XTryToComputeTransitivityCertificate([3XG[103X[10X,[3Xsearchlimit[103X[10X)[110X, where731[3Xsearchlimit[103X is the maximum radius about a point within which smaller points732are searched and taken into consideration. This operation interprets an733option [10Xabortdensity[110X -- if set, the operation returns the data computed so734far once the density of the set of positive integers in the support of [3XG[103X for735which no group element is found which maps them to smaller integers reaches736or drops below [10Xabortdensity[110X. A simplified certificate can be obtained via737[10XSimplifiedCertificate([3Xcert[103X[10X)[110X.[133X738739[4X[32X Example [32X[104X740[4X[28X[128X[104X741[4X[25Xgap>[125X [27XG := Group(List([[0,2,1,2],[0,3,2,3],[1,2,2,4]],[127X[104X742[4X[25X>[125X [27X ClassTransposition));[127X[104X743[4X[28X<(0(2),1(2)),(0(3),2(3)),(1(2),2(4))>[128X[104X744[4X[25Xgap>[125X [27XIsTransitiveOnNonnegativeIntegersInSupport(G);[127X[104X745[4X[28Xtrue[128X[104X746[4X[25Xgap>[125X [27XTransitivityCertificate(G);[127X[104X747[4X[28Xrec( [128X[104X748[4X[28X classes := [ [ 1(2) ], [ 2(6) ], [ 6(12), 10(12) ], [ 0(12) ], [128X[104X749[4X[28X [ 4(12) ] ], complete := true, [128X[104X750[4X[28X phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 0(3), 2(3) ), ( 1(2), 2(4) ) [128X[104X751[4X[28X ], smallpointbound := 4, status := "transitive", [128X[104X752[4X[28X words := [ a, b, c, b*c, a*b ] )[128X[104X753[4X[25Xgap>[125X [27XSimplifiedCertificate(last);[127X[104X754[4X[28Xrec( classes := [ [ 1(2) ], [ 2(4) ], [ 4(12) ], [ 0(12), 8(12) ] ], [128X[104X755[4X[28X complete := true, [128X[104X756[4X[28X phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 0(3), 2(3) ), ( 1(2), 2(4) ) [128X[104X757[4X[28X ], smallpointbound := 4, status := "transitive", [128X[104X758[4X[28X words := [ a, c, a*b, b*c ] )[128X[104X759[4X[25Xgap>[125X [27XG := Group(List([[0,2,1,2],[1,2,2,4],[1,4,2,6]],[127X[104X760[4X[25X>[125X [27X ClassTransposition)); # '3n+1 group'[127X[104X761[4X[28X<(0(2),1(2)),(1(2),2(4)),(1(4),2(6))>[128X[104X762[4X[25Xgap>[125X [27Xcert := TryToComputeTransitivityCertificate(G,10);[127X[104X763[4X[28Xrec([128X[104X764[4X[28X classes := [ [ 1(2) ], [ 2(4) ], [ 4(32) ], [ 8(24), 44(48), 20(96) ], [128X[104X765[4X[28X [ 0(24), 16(24) ] ], complete := false, [128X[104X766[4X[28X phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 1(4), 2(6) ) [128X[104X767[4X[28X ], remaining := [ 12(48), 28(48), 52(96), 84(96) ], [128X[104X768[4X[28X smallpointbound := 42, status := "unclear", [128X[104X769[4X[28X words := [ a, b, (a*c)^2*b*a*b, c, a*c*b ] )[128X[104X770[4X[25Xgap>[125X [27XUnion(Flat(cert.classes));[127X[104X771[4X[28X<union of 90 residue classes (mod 96) (6 classes)>[128X[104X772[4X[25Xgap>[125X [27XDifference(Integers,Union(Flat(cert.classes)));[127X[104X773[4X[28X12(48) U 28(48) U 52(96) U 84(96)[128X[104X774[4X[25Xgap>[125X [27Xcert := TryToComputeTransitivityCertificate(G,20); # try larger bound[127X[104X775[4X[28Xrec([128X[104X776[4X[28X classes := [ [ 1(2) ], [ 2(4) ], [ 4(32) ], [ 8(24), 44(48), 20(96) ], [128X[104X777[4X[28X [ 0(24), 16(24) ], [ 12(768), 268(768) ], [ 28(768), 540(768) ] ], [128X[104X778[4X[28X complete := false, [128X[104X779[4X[28X phi := [ a, b, c ] -> [ ( 0(2), 1(2) ), ( 1(2), 2(4) ), ( 1(4), 2(6) ) [128X[104X780[4X[28X ], [128X[104X781[4X[28X remaining := [ 52(96), 84(96), 60(192), 108(192), 124(192), 172(192), [128X[104X782[4X[28X 76(384), 204(384), 220(384), 348(384), 156(768), 396(768), [128X[104X783[4X[28X 412(768), 652(768) ], smallpointbound := 1074, status := "unclear", [128X[104X784[4X[28X words := [ a, b, (a*c)^2*b*a*b, c, a*c*b, (a*c)^3*b*c*b*a*b, [128X[104X785[4X[28X (a*c)^4*b*a*b*a*b ] )[128X[104X786[4X[25Xgap>[125X [27XDifference(Integers,Union(Flat(cert.classes)));[127X[104X787[4X[28X<union of 44 residue classes (mod 768) (14 classes)>[128X[104X788[4X[25Xgap>[125X [27XIntersection([0..100],last);[127X[104X789[4X[28X[ 52, 60, 76, 84 ][128X[104X790[4X[28X[128X[104X791[4X[32X[104X792793[33X[0;0YFurther, there are methods to compute orbits under the action of an rcwa794group:[133X795796797[1X3.3-1 [33X[0;0YOrbit (for an rcwa group and either a point or a set)[133X[101X798799[29X[2XOrbit[102X( [3XG[103X, [3Xpoint[103X ) [32X method800[29X[2XOrbit[102X( [3XG[103X, [3Xset[103X ) [32X method801[6XReturns:[106X [33X[0;10Ythe orbit of the point [3Xpoint[103X respectively the set [3Xset[103X under the802natural action of the rcwa group [3XG[103X on its underlying ring.[133X803804[33X[0;0YThe second argument can either be an element or a subset of the underlying805ring of the rcwa group [3XG[103X. Since orbits under the action of rcwa groups can806be finite or infinite, and since infinite orbits are not necessarily residue807class unions, the orbit may either be returned in the form of a list, in the808form of a residue class union or in the form of an orbit object. It is809possible to loop over orbits returned as orbit objects, they can be compared810and there is a membership test for them. However note that equality and811membership for such orbits cannot always be decided.[133X812813[4X[32X Example [32X[104X814[4X[28X[128X[104X815[4X[25Xgap>[125X [27XG := Group(ClassShift(0,2),ClassTransposition(0,3,1,3));[127X[104X816[4X[28X<rcwa group over Z with 2 generators>[128X[104X817[4X[25Xgap>[125X [27XOrbit(G,0);[127X[104X818[4X[28XZ \ 5(6)[128X[104X819[4X[25Xgap>[125X [27XOrbit(G,5);[127X[104X820[4X[28X[ 5 ][128X[104X821[4X[25Xgap>[125X [27XOrbit(G,ResidueClass(0,2));[127X[104X822[4X[28X[ 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), [128X[104X823[4X[28X 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), [128X[104X824[4X[28X 1(3) U 2(6) ][128X[104X825[4X[25Xgap>[125X [27XLength(Orbit(G,ResidueClass(0,4)));[127X[104X826[4X[28X80[128X[104X827[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,2),ClassTransposition(0,2,1,4),[127X[104X828[4X[25X>[125X [27X ClassReflection(0,3));[127X[104X829[4X[28X<rcwa group over Z with 3 generators>[128X[104X830[4X[25Xgap>[125X [27Xorb := Orbit(G,2);[127X[104X831[4X[28X<orbit of 2 under <wild rcwa group over Z with 3 generators>>[128X[104X832[4X[25Xgap>[125X [27X1015808 in orb;[127X[104X833[4X[28Xtrue[128X[104X834[4X[25Xgap>[125X [27XFirst(orb,n->ForAll([n,n+2,n+6,n+8,n+30,n+32,n+36,n+38],IsPrime));[127X[104X835[4X[28X-19[128X[104X836[4X[28X[128X[104X837[4X[32X[104X838839[1X3.3-2 GrowthFunctionOfOrbit[101X840841[29X[2XGrowthFunctionOfOrbit[102X( [3XG[103X, [3Xn[103X, [3Xr_max[103X, [3Xsize_max[103X ) [32X operation842[29X[2XGrowthFunctionOfOrbit[102X( [3Xorb[103X, [3Xr_max[103X, [3Xsize_max[103X ) [32X method843[6XReturns:[106X [33X[0;10Ya list whose ([22Xr+1[122X)-th entry is the size of the sphere of radius [22Xr[122X844about [3Xn[103X under the action of the group [3XG[103X, where the argument [3Xr_max[103X845is the largest possible radius to be considered, and the846computation stops once the sphere size exceeds [3Xsize_max[103X.[133X847848[33X[0;0YAn option [10X"small"[110X is interpreted -- see example below. In place of the group849[3XG[103X and the point [3Xn[103X, one can pass as first argument also an rcwa group orbit850object [3Xorb[103X.[133X851852[4X[32X Example [32X[104X853[4X[28X[128X[104X854[4X[25Xgap>[125X [27XG := Group(List([[0,4,1,4],[0,3,5,6],[0,4,5,6]],ClassTransposition));[127X[104X855[4X[28X<(0(4),1(4)),(0(3),5(6)),(0(4),5(6))>[128X[104X856[4X[25Xgap>[125X [27XGrowthFunctionOfOrbit(G,18,100,20);[127X[104X857[4X[28X[ 1, 1, 2, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 5, 5, 6, 8, 6, 5, [128X[104X858[4X[28X 5, 4, 3, 3, 4, 4, 4, 3, 3, 5, 4, 5, 6, 5, 2, 3, 3, 2, 3, 3, 4, 5, 4, [128X[104X859[4X[28X 4, 4, 6, 5, 5, 3, 4, 2, 3, 4, 4, 2, 3, 4, 4, 2, 3, 3, 4, 3, 5, 3, 5, [128X[104X860[4X[28X 4, 5, 6, 5, 3, 4, 5, 6, 5, 4, 3, 5, 4, 5, 5, 4, 4, 5, 5, 3, 4, 5, 3, [128X[104X861[4X[28X 3, 4, 5, 4, 2, 3, 4, 4, 4 ][128X[104X862[4X[25Xgap>[125X [27Xlast = GrowthFunctionOfOrbit(Orbit(G,18),100,20);[127X[104X863[4X[28Xtrue[128X[104X864[4X[25Xgap>[125X [27XGrowthFunctionOfOrbit(G,18,20,20:small:=[0..100]);[127X[104X865[4X[28Xrec( smallpoints := [ 18, 24, 25, 27, 30, 32, 33, 36, 37, 39, 40, 41, [128X[104X866[4X[28X 42, 44, 45, 48, 49, 51, 52, 53, 56, 57, 59, 60, 61, 64, 65, 66, [128X[104X867[4X[28X 68, 69, 71, 75, 76, 77, 80, 81, 83, 88, 89, 92, 93, 95, 100 ], [128X[104X868[4X[28X spheresizes := [ 1, 1, 2, 3, 4, 3, 4, 4, 4, 4, 3, 3, 3, 4, 3, 4, 4, 5, [128X[104X869[4X[28X 5, 6, 8 ] )[128X[104X870[4X[25Xgap>[125X [27XG := Group(List([[0,2,1,2],[1,2,2,4],[1,4,2,6]],ClassTransposition));[127X[104X871[4X[28X<(0(2),1(2)),(1(2),2(4)),(1(4),2(6))>[128X[104X872[4X[25Xgap>[125X [27XGrowthFunctionOfOrbit(G,0,100,10000);[127X[104X873[4X[28X[ 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 4, 5, 7, 6, 7, 9, 12, 14, 19, 21, 28, [128X[104X874[4X[28X 29, 37, 42, 55, 57, 72, 78, 99, 113, 148, 164, 215, 226, 288, 344, [128X[104X875[4X[28X 462, 478, 612, 686, 894, 985, 1284, 1416, 1847, 2018, 2620, 2902, [128X[104X876[4X[28X 3786, 4167, 5432, 5958, 7749, 8568, 11178 ][128X[104X877[4X[28X[128X[104X878[4X[32X[104X879880[33X[0;0YGiven an rcwa group [3XG[103X over ℤ and an integer [3Xn[103X,881[10XDistanceToNextSmallerPointInOrbit([110X[3XG[103X[10X,[110X[3Xn[103X[10X)[110X computes the smallest number [22Xd[122X such882that there is a product [22Xg[122X of [22Xd[122X generators or inverses of generators of [3XG[103X883which maps [3Xn[103X to an integer with absolute value less than |[3Xn[103X|, provided that884the orbit of [3Xn[103X contains such integer. [5XRCWA[105X provides a function to draw885pictures of orbits of rcwa groups on [22Xℤ^2[122X. The pictures are written to files886in bitmap- (bmp-) format. The author has successfully tested this feature887both under Linux and under Windows, and the generated pictures can be888processed further with many common graphics programs:[133X889890[1X3.3-3 DrawOrbitPicture[101X891892[29X[2XDrawOrbitPicture[102X( [3XG[103X, [3Xp0[103X, [3Xbound[103X, [3Xh[103X, [3Xw[103X, [3Xcolored[103X, [3Xpalette[103X, [3Xfilename[103X ) [32X function893[6XReturns:[106X [33X[0;10Ynothing.[133X894895[33X[0;0YDraws a picture of the orbit(s) of the point(s) [3Xp0[103X under the action of the896group [3XG[103X on [22Xℤ^2[122X. The argument [3Xp0[103X is either one point or a list of points. The897argument [3Xbound[103X denotes the bound to which the ball about [3Xp0[103X is to be898computed, in terms of absolute values of coordinates. The size of the899generated picture is [3Xh[103X x [3Xw[103X pixels. The argument [3Xcolored[103X is a boolean which900indicates whether a 24-bit true color picture or a monochrome picture should901be generated. In the former case, [3Xpalette[103X must be a list of triples of902integers in the range [22X0, dots, 255[122X, denoting the RGB values of the colors to903be used. In the latter case, [3Xpalette[103X is not used, and any value can be904passed. The picture is written in bitmap- (bmp-) format to a file named905[3Xfilename[103X. This is done using the utility function [10XSaveAsBitmapPicture[110X from906[5XResClasses[105X.[133X907908[4X[32X Example [32X[104X909[4X[28X[128X[104X910[4X[25Xgap>[125X [27XPSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),[127X[104X911[4X[25X>[125X [27X CyclicGroup(3))));;[127X[104X912[4X[25Xgap>[125X [27XDrawOrbitPicture(PSL2Z,[0,1],2000,512,512,false,fail,"example1.bmp");[127X[104X913[4X[25Xgap>[125X [27XDrawOrbitPicture(PSL2Z,Combinations([1..4],2),2000,512,512,true,[127X[104X914[4X[25X>[125X [27X [[255,0,0],[0,255,0],[0,0,255]],"example2.bmp");[127X[104X915[4X[28X[128X[104X916[4X[32X[104X917918[33X[0;0YThe pictures drawn in the examples are shown on [5XRCWA[105X's webpage.[133X919920[33X[0;0YFinite orbits give rise to finite quotients of a group, and finite cycles921can help to check for conjugacy. Therefore it is important to be able to922determine them:[133X923924925[1X3.3-4 [33X[0;0YShortOrbits (for rcwa groups) & ShortCycles (for rcwa permutations)[133X[101X926927[29X[2XShortOrbits[102X( [3XG[103X, [3XS[103X, [3Xmaxlng[103X ) [32X operation928[29X[2XShortOrbits[102X( [3XG[103X, [3XS[103X, [3Xmaxlng[103X, [3Xmaxn[103X ) [32X operation929[29X[2XShortCycles[102X( [3Xg[103X, [3XS[103X, [3Xmaxlng[103X ) [32X operation930[29X[2XShortCycles[102X( [3Xg[103X, [3XS[103X, [3Xmaxlng[103X, [3Xmaxn[103X ) [32X operation931[29X[2XShortCycles[102X( [3Xg[103X, [3Xmaxlng[103X ) [32X operation932[6XReturns:[106X [33X[0;10Yin the first form a list of all orbits of the rcwa group [3XG[103X of933length at most [3Xmaxlng[103X which intersect non-trivially with the934set [3XS[103X. In the second form a list of all orbits of the rcwa group [3XG[103X935of length at most [3Xmaxlng[103X which intersect non-trivially with the936set [3XS[103X and which, in terms of euclidean norm, do not exceed [3Xmaxn[103X.937In the third form a list of all cycles of the rcwa permutation [3Xg[103X938of length at most [3Xmaxlng[103X which intersect non-trivially with the939set [3XS[103X. In the fourth form a list of all cycles of the rcwa940permutation [3Xg[103X of length at most [3Xmaxlng[103X which intersect941non-trivially with the set [3XS[103X and which, in terms of euclidean942norm, do not exceed [3Xmaxn[103X. In the fifth form a list of all cycles943of the rcwa permutation [3Xg[103X of length at most [3Xmaxlng[103X which do not944correspond to cycles consisting of residue classes.[133X945946[33X[0;0YThe operation [2XShortOrbits[102X recognizes an option [3Xfinite[103X. If this option is947set, it is assumed that all orbits are finite, in order to speed up the948computation. If furthermore [3Xmaxlng[103X is negative, a list of [13Xall[113X orbits which949intersect non-trivially with [3XS[103X is returned.[133X950951[33X[0;0YThere is an operation [10XCyclesOnFiniteOrbit([110X[3XG[103X[10X,[110X[3Xg[103X[10X,[110X[3Xn[103X[10X)[110X which returns a list of all952cycles of the rcwa permutation [3Xg[103X on the orbit of the point [3Xn[103X under the953action of the rcwa group [3XG[103X. Here [3Xg[103X is assumed to be an element of [3XG[103X, and the954orbit of [3Xn[103X is assumed to be finite.[133X955956[4X[32X Example [32X[104X957[4X[28X[128X[104X958[4X[25Xgap>[125X [27XG := Group(ClassTransposition(1,4,2,4)*ClassTransposition(1,4,3,4),[127X[104X959[4X[25X>[125X [27X ClassTransposition(3,9,6,18)*ClassTransposition(1,6,3,9));;[127X[104X960[4X[25Xgap>[125X [27XList(ShortOrbits(G,[-15..15],100),[127X[104X961[4X[25X>[125X [27X orb->StructureDescription(Action(G,orb)));[127X[104X962[4X[28X[ "A15", "A4", "1", "1", "C3", "1", "((C2 x C2 x C2) : C7) : C3", "1", [128X[104X963[4X[28X "1", "C3", "A19" ][128X[104X964[4X[25Xgap>[125X [27XShortCycles(mKnot(7),[1..100],20);[127X[104X965[4X[28X[ [ 1 ], [ 2 ], [ 3 ], [ 4 ], [ 5 ], [ 6 ], [ 7, 8 ], [ 9, 10 ], [128X[104X966[4X[28X [ 11, 12 ], [ 13, 14, 16, 18, 20, 22, 19, 17, 15 ], [ 21, 24 ], [128X[104X967[4X[28X [ 23, 26 ], [ 25, 28, 32, 36, 31, 27, 30, 34, 38, 33, 29 ], [128X[104X968[4X[28X [ 35, 40 ], [ 37, 42, 48, 54, 47, 41, 46, 52, 45, 39, 44, 50, 43 ], [128X[104X969[4X[28X [ 77, 88, 100, 114, 130, 148, 127, 109, 124, 107, 122, 105, 120, 103, [128X[104X970[4X[28X 89 ] ][128X[104X971[4X[25Xgap>[125X [27XG := Group(List([[0,2,1,2],[0,5,4,5],[1,4,0,6]],ClassTransposition));;[127X[104X972[4X[25Xgap>[125X [27XCyclesOnFiniteOrbit(G,G.1*G.2,0);[127X[104X973[4X[28X[ [ 0, 1, 4, 9, 8, 5 ], [ 6, 7 ], [ 10, 11, 14, 19, 18, 15 ], [ 12, 13 ] ][128X[104X974[4X[25Xgap>[125X [27XList(CyclesOnFiniteOrbit(G,G.1*G.2*G.3*G.1*G.3*G.2,32),Length);[127X[104X975[4X[28X[ 3148, 3148 ][128X[104X976[4X[28X[128X[104X977[4X[32X[104X978979980[1X3.3-5 [33X[0;0YShortResidueClassOrbits & ShortResidueClassCycles[133X[101X981982[29X[2XShortResidueClassOrbits[102X( [3XG[103X, [3Xmodulusbound[103X, [3Xmaxlng[103X ) [32X operation983[29X[2XShortResidueClassCycles[102X( [3Xg[103X, [3Xmodulusbound[103X, [3Xmaxlng[103X ) [32X operation984[6XReturns:[106X [33X[0;10Yin the first form a list of all orbits of residue classes under985the action of the rcwa group [3XG[103X which contain a residue class [22Xr(m)[122X986such that [22Xm[122X divides [3Xmodulusbound[103X and which are not longer than987[3Xmaxlng[103X. In the second form a list of all cycles of residue classes988of the rcwa permutation [3Xg[103X which contain a residue class [22Xr(m)[122X such989that [22Xm[122X divides [3Xmodulusbound[103X and which are not longer than [3Xmaxlng[103X.[133X990991[33X[0;0YWe are only talking about a [13Xcycle[113X of residue classes of an rcwa permutation992[22Xg[122X if the restrictions of [22Xg[122X to all contained residue classes are affine.993Similarly we are only talking about an [13Xorbit[113X of residue classes under the994action of an rcwa group [22XG[122X if the restrictions of all elements of [22XG[122X to all995residue classes in the orbit are affine.[133X996997[33X[0;0YThe returned lists may contain additional cycles, resp., orbits, which do998not contain a residue class [22Xr(m)[122X such that [22Xm[122X divides [3Xmodulusbound[103X, but which999happen to be found without additional efforts.[133X10001001[4X[32X Example [32X[104X1002[4X[28X[128X[104X1003[4X[25Xgap>[125X [27Xg := ClassTransposition(0,2,1,2)*ClassTransposition(0,4,1,6);[127X[104X1004[4X[28X<rcwa permutation of Z with modulus 12>[128X[104X1005[4X[25Xgap>[125X [27XShortResidueClassCycles(g,Mod(g)^2,20);[127X[104X1006[4X[28X[ [ 2(12), 3(12) ], [ 10(12), 11(12) ], [ 4(24), 5(24), 7(36), 6(36) ], [128X[104X1007[4X[28X [ 20(24), 21(24), 31(36), 30(36) ], [128X[104X1008[4X[28X [ 8(48), 9(48), 13(72), 19(108), 18(108), 12(72) ], [128X[104X1009[4X[28X [ 40(48), 41(48), 61(72), 91(108), 90(108), 60(72) ], [128X[104X1010[4X[28X [ 16(96), 17(96), 25(144), 37(216), 55(324), 54(324), 36(216), 24(144) [128X[104X1011[4X[28X ], [128X[104X1012[4X[28X [ 80(96), 81(96), 121(144), 181(216), 271(324), 270(324), 180(216), [128X[104X1013[4X[28X 120(144) ] ][128X[104X1014[4X[25Xgap>[125X [27XG := Group(List([[0,6,5,6],[1,4,4,6],[2,4,3,6]],ClassTransposition));[127X[104X1015[4X[28X<(0(6),5(6)),(1(4),4(6)),(2(4),3(6))>[128X[104X1016[4X[25Xgap>[125X [27XShortResidueClassOrbits(G,48,10);[127X[104X1017[4X[28X[ [ 7(12) ], [ 8(12) ], [ 1(24), 4(36) ], [ 2(24), 3(36) ], [128X[104X1018[4X[28X [ 12(24), 17(24), 28(36) ], [ 18(24), 23(24), 27(36) ], [128X[104X1019[4X[28X [ 37(48), 58(72), 87(108) ], [ 38(48), 57(72), 88(108) ], [128X[104X1020[4X[28X [ 0(48), 5(48), 10(72), 15(108) ], [ 6(48), 11(48), 9(72), 16(108) ] ][128X[104X1021[4X[28X[128X[104X1022[4X[32X[104X10231024[1X3.3-6 ComputeCycleLength[101X10251026[29X[2XComputeCycleLength[102X( [3Xg[103X, [3Xn[103X ) [32X function1027[6XReturns:[106X [33X[0;10Ya record containing the length, the largest point and the position1028of the largest point of the cycle of the rcwa permutation [3Xg[103X which1029contains the point [3Xn[103X, provided that this cycle is finite.[133X10301031[33X[0;0YIf the cycle is infinite, the function will run into an infinite loop unless1032the option [10X"abortat"[110X is set to the maximum number of iterates to be tried1033before aborting. Iterates are not stored, to save memory. The function1034interprets an option [10X"notify"[110X, which defaults to 10000; every [21Xnotify[121X1035iterations, the number of binary digits of the latest iterate is printed.1036This output can be suppressed by the option [10Xquiet[110X. The function also1037interprets an option [10X"small"[110X, which may be set to a range within which small1038points are recorded and returned in a component [10Xsmallpoints[110X.[133X10391040[4X[32X Example [32X[104X1041[4X[28X[128X[104X1042[4X[25Xgap>[125X [27Xg := Product(List([[0,5,3,5],[1,2,0,6],[2,4,3,6]],[127X[104X1043[4X[25X>[125X [27X ClassTransposition));[127X[104X1044[4X[28X<rcwa permutation of Z with modulus 180>[128X[104X1045[4X[25Xgap>[125X [27XComputeCycleLength(g,20:small:=[0..1000]);[127X[104X1046[4X[28Xn = 20: after 10000 steps, the iterate has 1919 binary digits.[128X[104X1047[4X[28Xn = 20: after 20000 steps, the iterate has 2908 binary digits.[128X[104X1048[4X[28Xn = 20: after 30000 steps, the iterate has 1531 binary digits.[128X[104X1049[4X[28Xn = 20: after 40000 steps, the iterate has 708 binary digits.[128X[104X1050[4X[28Xrec( aborted := false, g := <rcwa permutation of Z with modulus 180>, [128X[104X1051[4X[28X length := 45961, [128X[104X1052[4X[28X maximum := 180479928411509527091314790144929480041473309862957394384783\[128X[104X1053[4X[28X0525935437431021442346166422201250935268553945158085769924448388724679753\[128X[104X1054[4X[28X5271669245363980744610119632280105994423399614803956244808653465492205657\[128X[104X1055[4X[28X8650363041608376587943180444494842094693691286183613056599672737336761093\[128X[104X1056[4X[28X3101035841077322874883200384115281051837032147150147712534199292886436789\[128X[104X1057[4X[28X7520389780289517825203780151058517520194926468391308525704499649905091899\[128X[104X1058[4X[28X9667529835495635671154681958992898010506577172313321500572646883756736685\[128X[104X1059[4X[28X0158653917532084531267455434808219032998691038943070902228427549279555530\[128X[104X1060[4X[28X6429870190316109419051531138721361826083376315737131067799731181096142797\[128X[104X1061[4X[28X4868525347003646887454985757711743327946232372385342293662007684758208408\[128X[104X1062[4X[28X8635715976464060647431260835037213863991037813998261883899050447111540742\[128X[104X1063[4X[28X5857187943077255493709629738212709349458790098815926920248565399938335540\[128X[104X1064[4X[28X8092502449690267365120996852, maxpos := 19825, n := 20, [128X[104X1065[4X[28X smallpoints := [ 20, 23, 66, 99, 294, 295, 298, 441, 447, 882, 890, [128X[104X1066[4X[28X 893 ] )[128X[104X1067[4X[28X[128X[104X1068[4X[32X[104X10691070[1X3.3-7 CycleRepresentativesAndLengths[101X10711072[29X[2XCycleRepresentativesAndLengths[102X( [3Xg[103X, [3XS[103X ) [32X operation1073[6XReturns:[106X [33X[0;10Ya list of pairs (cycle representative, length of cycle) for all1074cycles of the rcwa permutation [3Xg[103X which have a nontrivial1075intersection with the set [3XS[103X, where fixed points are omitted.[133X10761077[33X[0;0YThe rcwa permutation [3Xg[103X is assumed to have only finite cycles. If [3Xg[103X has an1078infinite cycle which intersects non-trivially with [3XS[103X, this may cause an1079infinite loop unless a cycle length limit is set via the option [10Xabortat[110X. The1080output can be suppressed by the option [10Xquiet[110X.[133X10811082[4X[32X Example [32X[104X1083[4X[28X[128X[104X1084[4X[25Xgap>[125X [27Xg := ClassTransposition(0,2,1,2)*ClassTransposition(0,4,1,6);;[127X[104X1085[4X[25Xgap>[125X [27XCycleRepresentativesAndLengths(g,[0..50]);[127X[104X1086[4X[28X[ [ 2, 2 ], [ 4, 4 ], [ 8, 6 ], [ 10, 2 ], [ 14, 2 ], [ 16, 8 ], [128X[104X1087[4X[28X [ 20, 4 ], [ 22, 2 ], [ 26, 2 ], [ 28, 4 ], [ 32, 10 ], [ 34, 2 ], [128X[104X1088[4X[28X [ 38, 2 ], [ 40, 6 ], [ 44, 4 ], [ 46, 2 ], [ 50, 2 ] ][128X[104X1089[4X[25Xgap>[125X [27Xg := Product(List([[0,5,3,5],[1,2,0,6],[2,4,3,6]],[127X[104X1090[4X[25X>[125X [27X ClassTransposition));[127X[104X1091[4X[28X<rcwa permutation of Z with modulus 180>[128X[104X1092[4X[25Xgap>[125X [27XCycleRepresentativesAndLengths(g,[0..100]:abortat:=100000);[127X[104X1093[4X[28Xn = 20: after 10000 steps, the iterate has 1919 binary digits.[128X[104X1094[4X[28Xn = 20: after 20000 steps, the iterate has 2908 binary digits.[128X[104X1095[4X[28Xn = 20: after 30000 steps, the iterate has 1531 binary digits.[128X[104X1096[4X[28Xn = 20: after 40000 steps, the iterate has 708 binary digits.[128X[104X1097[4X[28Xn = 79: after 10000 steps, the iterate has 1679 binary digits.[128X[104X1098[4X[28Xn = 100: after 10000 steps, the iterate has 712 binary digits.[128X[104X1099[4X[28Xn = 100: after 20000 steps, the iterate has 2507 binary digits.[128X[104X1100[4X[28Xn = 100: after 30000 steps, the iterate has 3311 binary digits.[128X[104X1101[4X[28Xn = 100: after 40000 steps, the iterate has 3168 binary digits.[128X[104X1102[4X[28Xn = 100: after 50000 steps, the iterate has 3947 binary digits.[128X[104X1103[4X[28Xn = 100: after 60000 steps, the iterate has 4793 binary digits.[128X[104X1104[4X[28Xn = 100: after 70000 steps, the iterate has 5325 binary digits.[128X[104X1105[4X[28Xn = 100: after 80000 steps, the iterate has 6408 binary digits.[128X[104X1106[4X[28Xn = 100: after 90000 steps, the iterate has 7265 binary digits.[128X[104X1107[4X[28Xn = 100: after 100000 steps, the iterate has 7918 binary digits.[128X[104X1108[4X[28X[ [ 0, 7 ], [ 5, 3 ], [ 7, 7159 ], [ 11, 9 ], [ 19, 342 ],[128X[104X1109[4X[28X [ 20, 45961 ], [ 25, 3 ], [ 26, 21 ], [ 29, 2 ], [ 31, 3941 ],[128X[104X1110[4X[28X [ 34, 19 ], [ 37, 7 ], [ 40, 5 ], [ 41, 7 ], [ 46, 3 ], [ 49, 2 ],[128X[104X1111[4X[28X [ 59, 564 ], [ 61, 577 ], [ 65, 3 ], [ 67, 23 ], [ 71, 41 ],[128X[104X1112[4X[28X [ 79, 16984 ], [ 80, 5 ], [ 85, 3 ], [ 86, 3 ], [ 89, 2 ], [ 91, 9 ],[128X[104X1113[4X[28X [ 94, 1355 ], [ 97, 7 ], [ 100, fail ] ][128X[104X1114[4X[28X[128X[104X1115[4X[32X[104X11161117[33X[0;0YOften one also wants to know which residue classes an rcwa mapping or an1118rcwa group fixes setwise:[133X11191120[1X3.3-8 FixedResidueClasses[101X11211122[29X[2XFixedResidueClasses[102X( [3Xg[103X, [3Xmaxmod[103X ) [32X operation1123[29X[2XFixedResidueClasses[102X( [3XG[103X, [3Xmaxmod[103X ) [32X operation1124[6XReturns:[106X [33X[0;10Ythe set of residue classes with modulus greater than 1 and less1125than or equal to [3Xmaxmod[103X which the rcwa mapping [3Xg[103X, respectively the1126rcwa group [3XG[103X, fixes setwise.[133X11271128[4X[32X Example [32X[104X1129[4X[28X[128X[104X1130[4X[25Xgap>[125X [27XFixedResidueClasses(ClassTransposition(0,2,1,4),8);[127X[104X1131[4X[28X[ 2(3), 3(4), 4(5), 6(7), 3(8), 7(8) ][128X[104X1132[4X[25Xgap>[125X [27XFixedResidueClasses(Group(ClassTransposition(0,2,1,4),[127X[104X1133[4X[25X>[125X [27X ClassTransposition(0,3,1,3)),12);[127X[104X1134[4X[28X[ 2(3), 8(9), 11(12) ][128X[104X1135[4X[28X[128X[104X1136[4X[32X[104X11371138[33X[0;0YFrequently one needs to compute balls of certain radius around points or1139group elements, be it to estimate the growth of a group, be it to see how an1140orbit looks like, be it to search for a group element with certain1141properties or be it for other purposes:[133X114211431144[1X3.3-9 [33X[0;0YBall (for group, element and radius or group, point, radius and[101X1145[1Xaction)[133X[101X11461147[29X[2XBall[102X( [3XG[103X, [3Xg[103X, [3Xr[103X ) [32X method1148[29X[2XBall[102X( [3XG[103X, [3Xp[103X, [3Xr[103X, [3Xaction[103X ) [32X method1149[29X[2XBall[102X( [3XG[103X, [3Xp[103X, [3Xr[103X ) [32X method1150[6XReturns:[106X [33X[0;10Ythe ball of radius [3Xr[103X around the element [3Xg[103X in the group [3XG[103X,1151respectively the ball of radius [3Xr[103X around the point [3Xp[103X under the1152action [3Xaction[103X of the group [3XG[103X, respectively the ball of radius [3Xr[103X1153around the point [3Xp[103X under the action [10XOnPoints[110X of the group [3XG[103X,[133X11541155[33X[0;0YAll balls are understood with respect to [10XGeneratorsOfGroup([3XG[103X[10X)[110X. As membership1156tests can be expensive, the former method does not check whether [3Xg[103X is indeed1157an element of [3XG[103X. The methods require that element- / point comparisons are1158cheap. They are not only applicable to rcwa groups. If the option [3XSpheres[103X is1159set, the ball is split up and returned as a list of spheres. There is a1160related operation [10XRestrictedBall([3XG[103X[10X,[3Xg[103X[10X,[3Xr[103X[10X,[3Xmodulusbound[103X[10X)[110X specifically for rcwa1161groups which computes only those elements of the ball whose moduli do not1162exceed [3Xmodulusbound[103X, and which can be reached from [3Xg[103X without computing1163intermediate elements whose moduli do exceed [3Xmodulusbound[103X. The latter1164operation interprets an option [10X"boundaffineparts"[110X. -- If this option is set1165and the group [3XG[103X and the element [3Xg[103X are in sparse representation, then1166[3Xmodulusbound[103X is actually taken to be a bound on the number of affine parts1167rather than a bound on the modulus.[133X11681169[4X[32X Example [32X[104X1170[4X[28X[128X[104X1171[4X[25Xgap>[125X [27XPSL2Z := Image(IsomorphismRcwaGroup(FreeProduct(CyclicGroup(2),[127X[104X1172[4X[25X>[125X [27X CyclicGroup(3))));;[127X[104X1173[4X[25Xgap>[125X [27XList([1..10],k->Length(Ball(PSL2Z,[0,1],k,OnTuples)));[127X[104X1174[4X[28X[ 4, 8, 14, 22, 34, 50, 74, 106, 154, 218 ][128X[104X1175[4X[25Xgap>[125X [27XBall(Group((1,2),(2,3),(3,4)),(),2:Spheres);[127X[104X1176[4X[28X[ [ () ], [ (3,4), (2,3), (1,2) ],[128X[104X1177[4X[28X [ (2,3,4), (2,4,3), (1,2)(3,4), (1,2,3), (1,3,2) ] ][128X[104X1178[4X[25Xgap>[125X [27XG := Group(List([[1,2,4,6],[1,3,2,6],[2,3,4,6]],ClassTransposition));;[127X[104X1179[4X[25Xgap>[125X [27XB := RestrictedBall(G,One(G),20,36:Spheres);; # try replacing 36 by 72[127X[104X1180[4X[25Xgap>[125X [27XList(B,Length);[127X[104X1181[4X[28X[ 1, 3, 6, 12, 4, 6, 6, 4, 4, 4, 6, 6, 3, 3, 2, 0, 0, 0, 0, 0, 0 ][128X[104X1182[4X[28X[128X[104X1183[4X[32X[104X11841185[33X[0;0YIt is possible to determine group elements which map a given tuple of1186elements of the underlying ring to a given other tuple, if such elements1187exist:[133X11881189[1X3.3-10 RepresentativeAction[101X11901191[29X[2XRepresentativeAction[102X( [3XG[103X, [3Xsource[103X, [3Xdestination[103X, [3Xaction[103X ) [32X method1192[6XReturns:[106X [33X[0;10Yan element of [3XG[103X which maps [3Xsource[103X to [3Xdestination[103X under the action1193given by [3Xaction[103X.[133X11941195[33X[0;0YIf an element satisfying this condition does not exist, this method either1196returns [10Xfail[110X or runs into an infinite loop. The problem whether [3Xsource[103X and1197[3Xdestination[103X lie in the same orbit under the action [3Xaction[103X of [3XG[103X is hard, and1198in its general form most likely computationally undecidable.[133X11991200[33X[0;0YIn cases where rather a word in the generators of [3XG[103X than the actual group1201element is needed, one should use the operation [10XRepresentativeActionPreImage[110X1202instead. This operation takes five arguments. The first four are the same as1203those of [10XRepresentativeAction[110X, and the fifth is a free group whose1204generators are to be used as letters of the returned word. Note that1205[10XRepresentativeAction[110X calls [10XRepresentativeActionPreImage[110X and evaluates the1206returned word. The evaluation of the word can very well take most of the1207time if [3XG[103X is wild and coefficient explosion occurs.[133X12081209[33X[0;0YThe algorithm is based on computing balls of increasing radius around [3Xsource[103X1210and [3Xdestination[103X until they intersect non-trivially.[133X12111212[4X[32X Example [32X[104X1213[4X[28X[128X[104X1214[4X[25Xgap>[125X [27Xa := RcwaMapping([[2,0,3],[4,-1,3],[4,1,3]]);; SetName(a,"a");[127X[104X1215[4X[25Xgap>[125X [27Xb := ClassShift(1,4:Name:="b");; G := Group(a,b);;[127X[104X1216[4X[25Xgap>[125X [27Xelm := RepresentativeAction(G,[7,4,9],[4,5,13],OnTuples);;[127X[104X1217[4X[25Xgap>[125X [27XDisplay(elm);[127X[104X1218[4X[28X[128X[104X1219[4X[28XRcwa permutation of Z with modulus 12[128X[104X1220[4X[28X[128X[104X1221[4X[28X /[128X[104X1222[4X[28X | n-3 if n in 1(6) U 10(12)[128X[104X1223[4X[28X | n+4 if n in 5(12) U 9(12)[128X[104X1224[4X[28X n |-> < n+1 if n in 4(12)[128X[104X1225[4X[28X | n if n in 0(6) U 2(6) U 3(12) U 11(12)[128X[104X1226[4X[28X |[128X[104X1227[4X[28X \[128X[104X1228[4X[28X[128X[104X1229[4X[25Xgap>[125X [27XList([7,4,9],n->n^elm);[127X[104X1230[4X[28X[ 4, 5, 13 ][128X[104X1231[4X[25Xgap>[125X [27Xelm := RepresentativeAction(G,[6,-3,8],[-9,4,11],OnPoints);;[127X[104X1232[4X[25Xgap>[125X [27XDisplay(elm);[127X[104X1233[4X[28X[128X[104X1234[4X[28XRcwa permutation of Z with modulus 12[128X[104X1235[4X[28X[128X[104X1236[4X[28X /[128X[104X1237[4X[28X | 2n/3 if n in 0(6) U 3(12)[128X[104X1238[4X[28X | (4n+1)/3 if n in 2(6) U 11(12)[128X[104X1239[4X[28X | (4n-1)/3 if n in 4(6) U 7(12)[128X[104X1240[4X[28X n |-> < (2n-8)/3 if n in 1(12)[128X[104X1241[4X[28X | (4n-17)/3 if n in 5(12)[128X[104X1242[4X[28X | (4n-15)/3 if n in 9(12)[128X[104X1243[4X[28X |[128X[104X1244[4X[28X \[128X[104X1245[4X[28X[128X[104X1246[4X[25Xgap>[125X [27X[6,-3,8]^elm; List([6,-3,8],n->n^elm); # `OnPoints' allows reordering[127X[104X1247[4X[28X[ -9, 4, 11 ][128X[104X1248[4X[28X[ 4, -9, 11 ][128X[104X1249[4X[25Xgap>[125X [27XF := FreeGroup("a","b");; phi := EpimorphismByGenerators(F,G);;[127X[104X1250[4X[25Xgap>[125X [27Xw := RepresentativeActionPreImage(G,[10,-4,9,5],[4,5,13,-8],[127X[104X1251[4X[25X>[125X [27X OnTuples,F);[127X[104X1252[4X[28Xa*b^-1*a^-1*(b^-1*a)^2*b*a*b^-2*a*b*a^-1*b[128X[104X1253[4X[25Xgap>[125X [27Xelm := w^phi;[127X[104X1254[4X[28X<rcwa permutation of Z with modulus 324>[128X[104X1255[4X[25Xgap>[125X [27XList([10,-4,9,5],n->n^elm);[127X[104X1256[4X[28X[ 4, 5, 13, -8 ][128X[104X1257[4X[28X[128X[104X1258[4X[32X[104X12591260[33X[0;0YSometimes an rcwa group fixes a certain partition of the underlying ring1261into unions of residue classes. If this happens, then any orbit is clearly a1262subset of exactly one of these parts. Further, such a partition often gives1263rise to proper quotients of the group:[133X12641265[1X3.3-11 ProjectionsToInvariantUnionsOfResidueClasses[101X12661267[29X[2XProjectionsToInvariantUnionsOfResidueClasses[102X( [3XG[103X, [3Xm[103X ) [32X operation1268[6XReturns:[106X [33X[0;10Ythe projections of the rcwa group [3XG[103X to the unions of residue1269classes (mod [3Xm[103X) which it fixes setwise.[133X12701271[33X[0;0YThe corresponding partition of a set of representatives for the residue1272classes (mod [3Xm[103X) can be obtained by the operation [10XOrbitsModulo([3XG[103X[10X,[3Xm[103X[10X)[110X.[133X12731274[4X[32X Example [32X[104X1275[4X[28X[128X[104X1276[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,2),ClassShift(3,4));;[127X[104X1277[4X[25Xgap>[125X [27XProjectionsToInvariantUnionsOfResidueClasses(G,4);[127X[104X1278[4X[28X[ [ ( 0(2), 1(2) ), ClassShift( 3(4) ) ] -> [128X[104X1279[4X[28X [ ( 0(4), 1(4) ), IdentityMapping( Integers ) ], [128X[104X1280[4X[28X [ ( 0(2), 1(2) ), ClassShift( 3(4) ) ] -> [128X[104X1281[4X[28X [ ( 2(4), 3(4) ), <rcwa permutation of Z with modulus 4> ] ][128X[104X1282[4X[25Xgap>[125X [27XList(last,phi->Support(Image(phi)));[127X[104X1283[4X[28X[ 0(4) U 1(4), 2(4) U 3(4) ][128X[104X1284[4X[28X[128X[104X1285[4X[32X[104X12861287[33X[0;0YGiven two partitions of the underlying ring into the same number of unions1288of residue classes, there is always an rcwa permutation which maps the one1289to the other:[133X12901291[1X3.3-12 RepresentativeAction[101X12921293[29X[2XRepresentativeAction[102X( [3XRCWA(R)[103X, [3XP1[103X, [3XP2[103X ) [32X method1294[6XReturns:[106X [33X[0;10Yan element of RCWA([22XR[122X) which maps the partition [3XP1[103X to [3XP2[103X.[133X12951296[33X[0;0YThe arguments [3XP1[103X and [3XP2[103X must be partitions of the underlying ring [22XR[122X into the1297same number of unions of residue classes. The method for [22XR = ℤ[122X recognizes1298the option [10XIsTame[110X, which can be used to demand a tame result. If this option1299is set and there is no tame rcwa permutation which maps [3XP1[103X to [3XP2[103X, the method1300runs into an infinite loop. This happens if the condition in Theorem 2.8.91301in [Koh05] is not satisfied. If the option [10XIsTame[110X is not set and the1302partitions [3XP1[103X and [3XP2[103X both consist entirely of single residue classes, then1303the returned mapping is affine on any residue class in [3XP1[103X.[133X13041305[4X[32X Example [32X[104X1306[4X[28X[128X[104X1307[4X[25Xgap>[125X [27XP1 := AllResidueClassesModulo(3);[127X[104X1308[4X[28X[ 0(3), 1(3), 2(3) ][128X[104X1309[4X[25Xgap>[125X [27XP2 := List([[0,2],[1,4],[3,4]],ResidueClass);[127X[104X1310[4X[28X[ 0(2), 1(4), 3(4) ][128X[104X1311[4X[25Xgap>[125X [27Xelm := RepresentativeAction(RCWA(Integers),P1,P2);[127X[104X1312[4X[28X<rcwa permutation of Z with modulus 3>[128X[104X1313[4X[25Xgap>[125X [27XP1^elm = P2;[127X[104X1314[4X[28Xtrue[128X[104X1315[4X[25Xgap>[125X [27XIsTame(elm);[127X[104X1316[4X[28Xfalse[128X[104X1317[4X[25Xgap>[125X [27Xelm := RepresentativeAction(RCWA(Integers),P1,P2:IsTame);[127X[104X1318[4X[28X<tame rcwa permutation of Z with modulus 24>[128X[104X1319[4X[25Xgap>[125X [27XP1^elm = P2;[127X[104X1320[4X[28Xtrue[128X[104X1321[4X[25Xgap>[125X [27Xelm := RepresentativeAction(RCWA(Integers),[127X[104X1322[4X[25X>[125X [27X [ResidueClass(1,3),[127X[104X1323[4X[25X>[125X [27X ResidueClassUnion(Integers,3,[0,2])],[127X[104X1324[4X[25X>[125X [27X [ResidueClassUnion(Integers,5,[2,4]),[127X[104X1325[4X[25X>[125X [27X ResidueClassUnion(Integers,5,[0,1,3])]);[127X[104X1326[4X[28X<rcwa permutation of Z with modulus 6>[128X[104X1327[4X[25Xgap>[125X [27X[ResidueClass(1,3),ResidueClassUnion(Integers,3,[0,2])]^elm;[127X[104X1328[4X[28X[ 2(5) U 4(5), Z \ 2(5) U 4(5) ][128X[104X1329[4X[28X[128X[104X1330[4X[32X[104X13311332[1X3.3-13 CollatzLikeMappingByOrbitTree[101X13331334[29X[2XCollatzLikeMappingByOrbitTree[102X( [3XG[103X, [3Xn[103X, [3Xmin_r[103X, [3Xmax_r[103X ) [32X operation1335[6XReturns:[106X [33X[0;10Yeither an rcwa mapping [22Xf[122X which maps the sphere of radius [22Xr[122X about [3Xn[103X1336under the action of [3XG[103X into the sphere of radius [22Xr-1[122X about [3Xn[103X for1337every [22Xr[122X ranging from [3Xmin_r[103X to [3Xmax_r[103X, or [10Xfail[110X.[133X13381339[33X[0;0YObviously not for every rcwa group and every root point a mapping [22Xf[122X with1340these properties exists, and if it exists, it usually depends on the choice1341of generators of the group.[133X13421343[4X[32X Example [32X[104X1344[4X[28X[128X[104X1345[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,2,1,2),ClassTransposition(1,2,2,4),[127X[104X1346[4X[25X>[125X [27X ClassTransposition(1,4,2,6));;[127X[104X1347[4X[25Xgap>[125X [27XG := SparseRep(G);;[127X[104X1348[4X[25Xgap>[125X [27Xf := CollatzLikeMappingByOrbitTree(G,0,4,10);[127X[104X1349[4X[28X<rcwa mapping of Z with modulus 4 and 4 affine parts>[128X[104X1350[4X[25Xgap>[125X [27XDisplay(f);[127X[104X1351[4X[28X[128X[104X1352[4X[28XRcwa mapping of Z with modulus 4 and 4 affine parts[128X[104X1353[4X[28X[128X[104X1354[4X[28X /[128X[104X1355[4X[28X | n+1 if n in 0(4)[128X[104X1356[4X[28X | (3n+1)/2 if n in 1(4)[128X[104X1357[4X[28X n |-> < n/2 if n in 2(4)[128X[104X1358[4X[28X | n-1 if n in 3(4)[128X[104X1359[4X[28X |[128X[104X1360[4X[28X \[128X[104X1361[4X[28X[128X[104X1362[4X[25Xgap>[125X [27XB := Ball(G,0,15:Spheres);[127X[104X1363[4X[28X[ [ 0 ], [ 1 ], [ 2 ], [ 3 ], [ 6 ], [ 7 ], [ 14 ], [ 9, 15 ], [ 8, 18, 30 ], [128X[104X1364[4X[28X [ 5, 19, 31 ], [ 4, 10, 38, 62 ], [ 11, 25, 39, 41, 63 ], [128X[104X1365[4X[28X [ 22, 24, 40, 50, 78, 82, 126 ], [ 23, 33, 51, 79, 83, 127 ], [128X[104X1366[4X[28X [ 32, 46, 66, 102, 158, 166, 254 ], [128X[104X1367[4X[28X [ 21, 47, 67, 103, 105, 159, 167, 169, 255 ] ][128X[104X1368[4X[25Xgap>[125X [27XList([3..15],i->IsSubset(B[i-1],B[i]^f));[127X[104X1369[4X[28X[ true, true, true, true, true, true, true, true, true, true, true, true,[128X[104X1370[4X[28X true ][128X[104X1371[4X[25Xgap>[125X [27XTrajectory(f,52,[0,1]);[127X[104X1372[4X[28X[ 52, 53, 80, 81, 122, 61, 92, 93, 140, 141, 212, 213, 320, 321, 482, 241, [128X[104X1373[4X[28X 362, 181, 272, 273, 410, 205, 308, 309, 464, 465, 698, 349, 524, 525, 788, [128X[104X1374[4X[28X 789, 1184, 1185, 1778, 889, 1334, 667, 666, 333, 500, 501, 752, 753, 1130, [128X[104X1375[4X[28X 565, 848, 849, 1274, 637, 956, 957, 1436, 1437, 2156, 2157, 3236, 3237, [128X[104X1376[4X[28X 4856, 4857, 7286, 3643, 3642, 1821, 2732, 2733, 4100, 4101, 6152, 6153, [128X[104X1377[4X[28X 9230, 4615, 4614, 2307, 2306, 1153, 1730, 865, 1298, 649, 974, 487, 486, [128X[104X1378[4X[28X 243, 242, 121, 182, 91, 90, 45, 68, 69, 104, 105, 158, 79, 78, 39, 38, 19, [128X[104X1379[4X[28X 18, 9, 14, 7, 6, 3, 2, 1 ][128X[104X1380[4X[28X[128X[104X1381[4X[32X[104X138213831384[1X3.4 [33X[0;0YSpecial attributes of tame residue-class-wise affine groups[133X[101X13851386[33X[0;0YThere are a couple of attributes which a priori make only sense for tame1387rcwa groups. With their help, various structural information about a given1388such group can be obtained. We have already seen above that there are for1389example methods for [10XIsSolvable[110X, [10XIsPerfect[110X and [10XDerivedSubgroup[110X available for1390tame rcwa groups, while testing wild groups for solvability or perfectness1391is currently not always feasible. The purpose of this section is to describe1392the specific attributes of tame groups which are needed for these1393computations.[133X139413951396[1X3.4-1 [33X[0;0YRespectedPartition (of a tame rcwa group or -permutation)[133X[101X13971398[29X[2XRespectedPartition[102X( [3XG[103X ) [32X attribute1399[29X[2XRespectedPartition[102X( [3Xg[103X ) [32X attribute1400[6XReturns:[106X [33X[0;10Ya shortest and coarsest possible respected partition of the rcwa1401group [3XG[103X / of the rcwa permutation [3Xg[103X.[133X14021403[33X[0;0YA tame element [22Xg[122X [22X∈[122X RCWA([22XR[122X) permutes a partition of [22XR[122X into finitely many1404residue classes on all of which it is affine. Given a tame group1405[22XG[122X [22X<[122X RCWA([22XR[122X), there is a common such partition for all elements of [22XG[122X. We call1406the mentioned partitions [13Xrespected partitions[113X of [22Xg[122X or [22XG[122X, respectively.[133X14071408[33X[0;0YAn rcwa group or an rcwa permutation has a respected partition if and only1409if it is tame. This holds either by definition or by Theorem 2.5.81410in [Koh05], depending on how one introduces the notion of tameness.[133X14111412[33X[0;0YThere is an operation [10XRespectsPartition([3XG[103X[10X,[3XP[103X[10X)[110X / [10XRespectsPartition([3Xg[103X[10X,[3XP[103X[10X)[110X, which1413tests whether [3XG[103X or [3Xg[103X respects a given partition [3XP[103X. The permutation induced1414by [3Xg[103X on [10XP[110X can be computed efficiently by [10XPermutationOpNC([3Xg[103X[10X,P,OnPoints)[110X.[133X14151416[4X[32X Example [32X[104X1417[4X[28X[128X[104X1418[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));[127X[104X1419[4X[28X<rcwa group over Z with 2 generators>[128X[104X1420[4X[25Xgap>[125X [27XIsTame(G);[127X[104X1421[4X[28Xtrue[128X[104X1422[4X[25Xgap>[125X [27XSize(G);[127X[104X1423[4X[28Xinfinity[128X[104X1424[4X[25Xgap>[125X [27XP := RespectedPartition(G);[127X[104X1425[4X[28X[ 0(4), 2(4), 1(6), 3(6), 5(6) ][128X[104X1426[4X[28X[128X[104X1427[4X[32X[104X142814291430[1X3.4-2 [33X[0;0YActionOnRespectedPartition & KernelOfActionOnRespectedPartition[133X[101X14311432[29X[2XActionOnRespectedPartition[102X( [3XG[103X ) [32X attribute1433[29X[2XKernelOfActionOnRespectedPartition[102X( [3XG[103X ) [32X attribute1434[29X[2XRankOfKernelOfActionOnRespectedPartition[102X( [3XG[103X ) [32X attribute1435[6XReturns:[106X [33X[0;10Ythe action of the tame rcwa group [3XG[103X on [10XRespectedPartition([3XG[103X[10X)[110X, the1436kernel of this action or the rank of the latter, respectively.[133X14371438[33X[0;0YThe method for [10XKernelOfActionOnRespectedPartition[110X uses the package1439[5XPolycyclic[105X [EHN13]. The rank of the largest free abelian subgroup of the1440kernel of the action of [3XG[103X on its stored respected partition is1441[10XRankOfKernelOfActionOnRespectedPartition([3XG[103X[10X)[110X.[133X14421443[4X[32X Example [32X[104X1444[4X[28X[128X[104X1445[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));;[127X[104X1446[4X[25Xgap>[125X [27XH := ActionOnRespectedPartition(G);[127X[104X1447[4X[28XGroup([ (1,3), (1,2) ])[128X[104X1448[4X[25Xgap>[125X [27XH = Action(G,P);[127X[104X1449[4X[28Xtrue[128X[104X1450[4X[25Xgap>[125X [27XSize(H);[127X[104X1451[4X[28X6[128X[104X1452[4X[25Xgap>[125X [27XK := KernelOfActionOnRespectedPartition(G);[127X[104X1453[4X[28X<rcwa group over Z with 3 generators>[128X[104X1454[4X[25Xgap>[125X [27XRankOfKernelOfActionOnRespectedPartition(G);[127X[104X1455[4X[28X3[128X[104X1456[4X[25Xgap>[125X [27XIndex(G,K);[127X[104X1457[4X[28X6[128X[104X1458[4X[25Xgap>[125X [27XList(GeneratorsOfGroup(K),Factorization);[127X[104X1459[4X[28X[ [ ClassShift( 0(4) ) ], [ ClassShift( 2(4) ) ], [ ClassShift( 1(6) ) ] ][128X[104X1460[4X[25Xgap>[125X [27XImage(IsomorphismPcpGroup(K));[127X[104X1461[4X[28XPcp-group with orders [ 0, 0, 0 ][128X[104X1462[4X[28X[128X[104X1463[4X[32X[104X14641465[33X[0;0YLet [22XG[122X be a tame rcwa group over ℤ, let [22XmathcalP[122X be a respected partition1466of [22XG[122X and put [22Xm := |mathcalP|[122X. Then there is an rcwa permutation [22Xg[122X which maps1467[22XmathcalP[122X to the partition of ℤ into the residue classes (mod [22Xm[122X), and the1468conjugate [22XG^g[122X of [22XG[122X under such a permutation is integral (cf. [Koh05],1469Theorem 2.5.14).[133X14701471[33X[0;0YThe conjugate [22XG^g[122X can be determined by the operation [10XIntegralConjugate[110X, and1472the conjugating permutation [22Xg[122X can be determined by the operation1473[10XIntegralizingConjugator[110X. Both operations are applicable to rcwa permutations1474as well. Note that a tame rcwa group does not determine its integral1475conjugate uniquely.[133X14761477[4X[32X Example [32X[104X1478[4X[28X[128X[104X1479[4X[25Xgap>[125X [27XG := Group(ClassTransposition(0,4,1,6),ClassShift(0,2));;[127X[104X1480[4X[25Xgap>[125X [27XG^IntegralizingConjugator(G) = IntegralConjugate(G);[127X[104X1481[4X[28Xtrue[128X[104X1482[4X[25Xgap>[125X [27XRespectedPartition(G);[127X[104X1483[4X[28X[ 0(4), 2(4), 1(6), 3(6), 5(6) ][128X[104X1484[4X[25Xgap>[125X [27XRespectedPartition(G)^IntegralizingConjugator(G);[127X[104X1485[4X[28X[ 0(5), 1(5), 2(5), 3(5), 4(5) ][128X[104X1486[4X[25Xgap>[125X [27Xlast = RespectedPartition(IntegralConjugate(G));[127X[104X1487[4X[28Xtrue[128X[104X1488[4X[28X[128X[104X1489[4X[32X[104X149014911492[1X3.5 [33X[0;0YGenerating pseudo-random elements of RCWA(R) and CT(R)[133X[101X14931494[33X[0;0YThere are methods for the operation [10XRandom[110X for RCWA([22XR[122X) and CT([22XR[122X). These1495methods are designed to be suitable for generating interesting examples. No1496particular distribution is guaranteed.[133X14971498[4X[32X Example [32X[104X1499[4X[28X[128X[104X1500[4X[25Xgap>[125X [27Xelm := Random(RCWA(Integers));;[127X[104X1501[4X[25Xgap>[125X [27XDisplay(elm);[127X[104X1502[4X[28X[128X[104X1503[4X[28XRcwa permutation of Z with modulus 180[128X[104X1504[4X[28X[128X[104X1505[4X[28X /[128X[104X1506[4X[28X | 6n+12 if n in 2(10) U 4(10) U 6(10) U 8(10)[128X[104X1507[4X[28X | 3n+3 if n in 1(20) U 5(20) U 9(20) U 17(20)[128X[104X1508[4X[28X | 6n+10 if n in 0(10)[128X[104X1509[4X[28X | (n+1)/2 if n in 15(60) U 27(60) U 39(60) U 51(60)[128X[104X1510[4X[28X | (n+7)/2 if n in 19(60) U 31(60) U 43(60) U 55(60)[128X[104X1511[4X[28X | 3n+1 if n in 13(20)[128X[104X1512[4X[28X | (-n+17)/6 if n in 23(180) U 35(180) U 59(180) U 71(180) U [128X[104X1513[4X[28X n |-> < 95(180) U 131(180) U 143(180) U 179(180)[128X[104X1514[4X[28X | (-n-1)/6 if n in 11(180) U 47(180) U 83(180) U 155(180)[128X[104X1515[4X[28X | (-n+7)/2 if n in 3(60)[128X[104X1516[4X[28X | (n+3)/2 if n in 7(60)[128X[104X1517[4X[28X | (n-17)/6 if n in 107(180)[128X[104X1518[4X[28X | (-n+11)/6 if n in 119(180)[128X[104X1519[4X[28X | (-n+29)/6 if n in 167(180)[128X[104X1520[4X[28X |[128X[104X1521[4X[28X \[128X[104X1522[4X[28X[128X[104X1523[4X[32X[104X15241525[33X[0;0YThe elements which are returned by this method are obtained by multiplying1526class shifts (see [2XClassShift[102X ([14X2.2-1[114X)), class reflections (see1527[2XClassReflection[102X ([14X2.2-2[114X)) and class transpositions (see [2XClassTransposition[102X1528([14X2.2-3[114X)). These factors can be retrieved by factoring:[133X15291530[4X[32X Example [32X[104X1531[4X[28X[128X[104X1532[4X[25Xgap>[125X [27XFactorization(elm);[127X[104X1533[4X[28X[ ClassTransposition(0,2,3,4), ClassTransposition(1,2,4,6), ClassShift(0,2), [128X[104X1534[4X[28X ClassShift(1,3), ClassReflection(2,5), ClassReflection(1,3), [128X[104X1535[4X[28X ClassReflection(1,2) ][128X[104X1536[4X[28X[128X[104X1537[4X[32X[104X153815391540[1X3.6 [33X[0;0YThe categories of residue-class-wise affine groups[133X[101X15411542[1X3.6-1 IsRcwaGroup[101X15431544[29X[2XIsRcwaGroup[102X( [3XG[103X ) [32X filter1545[29X[2XIsRcwaGroupOverZ[102X( [3XG[103X ) [32X filter1546[29X[2XIsRcwaGroupOverZ_pi[102X( [3XG[103X ) [32X filter1547[29X[2XIsRcwaGroupOverGFqx[102X( [3XG[103X ) [32X filter1548[6XReturns:[106X [33X[0;10Y[10Xtrue[110X if [3XG[103X is an rcwa group, an rcwa group over the ring of1549integers, an rcwa group over a semilocalization of the ring of1550integers or an rcwa group over a polynomial ring in one variable1551over a finite field, respectively, and [10Xfalse[110X otherwise.[133X15521553[33X[0;0YOften the same methods can be used for rcwa groups over the ring of integers1554and over its semilocalizations. For this reason there is a category1555[10XIsRcwaGroupOverZOrZ_pi[110X which is the union of [10XIsRcwaGroupOverZ[110X and1556[10XIsRcwaGroupOverZ_pi[110X.[133X15571558[33X[0;0YTo allow distinguishing the groups RCWA([22XR[122X) and CT([22XR[122X) from others, they have1559the characteristic property [10XIsNaturalRCWA[110X or [10XIsNaturalCT[110X, respectively.[133X1560156115621563