GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
<!-- #################################################################### -->1<!-- ## ## -->2<!-- ## zxz.xml RCWA documentation Stefan Kohl ## -->3<!-- ## ## -->4<!-- #################################################################### -->56<Chapter Label="ch:ZxZ">7<Heading>8Residue-Class-Wise Affine Mappings, Groups and Monoids over <M>&ZZ;^2</M>9</Heading>1011<Ignore Remark="set screen width to 75, for the example tester">12<Example>13<![CDATA[14gap> SizeScreen([75,24]);;15]]>16</Example>17</Ignore>1819This chapter describes how to compute with residue-class-wise affine mappings20of <M>&ZZ;^2</M> and with groups and monoids formed by them. <P/>2122The rings on which we have defined residue-class-wise affine mappings so23far have all been principal ideal domains, and it has been crucial that all24nontrivial principal ideals had finite index. However, the rings25<M>&ZZ;^d</M>, <M>d > 1</M> are not principal ideal domains. Furthermore,26their principal ideals have infinite index. Therefore as moduli of27residue-class-wise affine mappings we can only use lattices of full rank,28for these are precisely the ideals of <M>&ZZ;^d</M> of finite index.29However, on the other hand we can also be more permissive and look at30<M>&ZZ;^d</M> not as a ring, but rather as a free &ZZ;-module.31The consequence of this is that then an affine mapping of <M>&ZZ;^d</M>32is not just given by <M>v \mapsto (av+b)/c</M> for some33<M>a, b, c \in &ZZ;^d</M>, but rather by <M>v \mapsto (vA+b)/c</M>,34where <M>A \in &ZZ;^{d \times d}</M>. Also for technical reasons concerning35the implementation in &GAP;, looking at <M>&ZZ;^d</M> as a free &ZZ;-module36is preferable -- in &GAP;, <C>Integers^d</C> is not a ring, and37multiplying lists of integers means forming their scalar product.3839<!-- #################################################################### -->4041<Section Label="sec:DefinitionOfRcwaMappingsOfZxZ">42<Heading>43The definition of residue-class-wise affine mappings of <M>&ZZ;^d</M>44</Heading>4546<Index Key="rcwa mapping" Subkey="of Z x Z, definition">rcwa mapping</Index>4748Let <M>d \in &NN;</M>. We call a mapping <M>f: &ZZ;^d \rightarrow &ZZ;^d</M>49<E>residue-class-wise affine</E> if there is a lattice <M>L = &ZZ;^d M</M>50where <M>M \in &ZZ;^{d \times d}</M> is a matrix of full rank, such that the51restrictions of <M>f</M> to the residue classes <M>r + L \in &ZZ;^d/L</M>52are all affine.53This means that for any residue class <M>r + L \in &ZZ;^d/L</M>,54there is a matrix <M>A_{r+L} \in &ZZ;^{d \times d}</M>, a vector55<M>b_{r+L} \in &ZZ;^d</M> and a positive integer <M>c_{r+L}</M>56such that the restriction of <M>f</M> to <M>r + L</M> is given by57<M>f|_{r + L}: \ r + L \ \rightarrow \ &ZZ;^d, \ \58v \ \mapsto \ (v \cdot A_{r+L} + b_{r+L})/c_{r+L}</M>.59For reasons of uniqueness, we assume that <M>L</M> is chosen maximal with60respect to inclusion, and that no prime factor of <M>c_{r+L}</M> divides all61coefficients of <M>A_{r+L}</M> and <M>b_{r+L}</M>. <P/>6263<Index Key="rcwa mapping" Subkey="modulus">rcwa mapping</Index>64<Index Key="rcwa mapping" Subkey="class-wise translating">65rcwa mapping66</Index>67<Index Key="class-wise translating" Subkey="definition">68class-wise translating69</Index>70<Index Key="prime set" Subkey="definition">prime set</Index>7172We call the lattice <M>L</M> the <E>modulus</E> of <M>f</M>,73written Mod(<M>f</M>).74Further we define the <E>prime set</E> of <M>f</M> as the set of75all primes which divide the determinant of at least one of the coefficients76<M>A_{r+L}</M> or which divide the determinant of <M>M</M>, and77we call the mapping <M>f</M> <E>class-wise translating</E> if all78coefficients <M>A_{r+L}</M> are identity matrices and all79coefficients <M>c_{r+L}</M> are equal to 1. <P/>8081For the sake of simplicity, we identify a lattice with the Hermite normal82form of the matrix by whose rows it is spanned.8384</Section>8586<!-- #################################################################### -->8788<Section Label="sec:EnteringRcwaMappingsOfZxZ">89<Heading>90Entering residue-class-wise affine mappings of <M>&ZZ;^2</M>91</Heading>9293Residue-class-wise affine mappings of <M>&ZZ;^2</M> can be entered94using the general constructor95<Ref Meth="RcwaMapping" Label="by ring, modulus and list of coefficients"/>96or the more specialized functions97<Ref Func="ClassTransposition" Label="r1, m1, r2, m2"/>,98<Ref Func="ClassRotation" Label="cl, u"/> and99<Ref Func="ClassShift" Label="cl"/>. The arguments differ only slightly.100101<ManSection>102<Heading>103RcwaMapping (the general constructor; methods for <M>&ZZ;^2</M>)104</Heading>105<Meth Name="RcwaMapping" Arg="R, L, coeffs"106Label="by ring = Z x Z, modulus and coefficients"/>107<Meth Name="RcwaMapping" Arg="P1, P2"108Label="by two partitions of Z x Z into residue classes"/>109<Meth Name="RcwaMapping" Arg="cycles"110Label="of Z x Z, by residue class cycles"/>111<Meth Name="RcwaMapping" Arg="f, g"112Label="of Z x Z, by projections to coordinates"/>113<Returns> an rcwa mapping of <M>&ZZ;^2</M>. </Returns>114<Description>115The above methods return116<List>117<Mark>(a)</Mark>118<Item>119the rcwa mapping of <C><A>R</A> = Integers^2</C>120with modulus <A>L</A> and coefficients <A>coeffs</A>,121</Item>122<Mark>(b)</Mark>123<Item>124an rcwa permutation which induces a bijection between125the partitions <A>P1</A> and <A>P2</A> of <M>&ZZ;^2</M>126into residue classes and which is affine on the elements127of <A>P1</A>,128</Item>129<Mark>(c)</Mark>130<Item>131an rcwa permutation with <Q>residue class cycles</Q> given132by a list <A>cycles</A> of lists of pairwise disjoint residue classes133of <M>&ZZ;^2</M> each of which it permutes cyclically, and134</Item>135<Mark>(d)</Mark>136<Item>137the rcwa mapping of <M>&ZZ;^2</M> whose projections to the138coordinates are given by <A>f</A> and <A>g</A>,139</Item>140</List>141respectively. <P/>142143The modulus of an rcwa mapping of <M>&ZZ;^2</M> is a lattice of full144rank. It is represented by a matrix <A>L</A> in Hermite normal form,145whose rows are the spanning vectors. <P/>146147A coefficient list for an rcwa mapping of <M>&ZZ;^2</M> with148modulus <A>L</A> consists of <M>|\det(<A>L</A>)|</M> coefficient149triples <C>[</C><M>A_{r+&ZZ;^2<A>L</A>}</M>, <M>b_{r+&ZZ;^2<A>L</A>}</M>,150<M>c_{r+&ZZ;^2<A>L</A>}</M><C>]</C>.151The entries <M>A_{r+&ZZ;^2<A>L</A>}</M> are <M>2 \times 2</M> integer152matrices, the <M>b_{r+&ZZ;^2<A>L</A>}</M> are elements of <M>&ZZ;^2</M>,153i.e. lists of two integers, and the <M>c_{r+&ZZ;^2<A>L</A>}</M> are154integers.155The ordering of the coefficient triples is determined by the ordering of156the representatives of the residue classes <M>r+&ZZ;^2<A>L</A></M> in157the sorted list returned by <C>AllResidues(Integers^2,<A>L</A>)</C>. <P/>158159The methods for the operation <C>RcwaMapping</C> perform a number of160argument checks, which can be skipped by using <C>RcwaMappingNC</C>161instead. <P/>162163Last but not least, regarding Method (d) it should be mentioned164that only very special rcwa mappings of <M>&ZZ;^2</M> have165projections to coordinates.166<Example>167<![CDATA[168gap> R := Integers^2;;169gap> twice := RcwaMapping(R,[[1,0],[0,1]],170> [[[[2,0],[0,2]],[0,0],1]]); # method (a)171Rcwa mapping of Z^2: (m,n) -> (2m,2n)172gap> [4,5]^twice;173[ 8, 10 ]174gap> twice1 := RcwaMapping(R,[[1,0],[0,1]],175> [[[[2,0],[0,1]],[0,0],1]]); # method (a)176Rcwa mapping of Z^2: (m,n) -> (2m,n)177gap> [4,5]^twice1;178[ 8, 5 ]179gap> Image(twice1);180(0,0)+(2,0)Z+(0,1)Z181gap> hyperbolic := RcwaMapping(R,[[1,0],[0,2]],182> [[[[4,0],[0,1]],[0, 0],2],183> [[[4,0],[0,1]],[2,-1],2]]); # method (a)184<rcwa mapping of Z^2 with modulus (1,0)Z+(0,2)Z>185gap> IsBijective(hyperbolic);186true187gap> Display(hyperbolic);188189Rcwa permutation of Z^2 with modulus (1,0)Z+(0,2)Z190191/192| (2m,n/2) if (m,n) in (0,0)+(1,0)Z+(0,2)Z193(m,n) |-> < (2m+1,(n-1)/2) if (m,n) in (0,1)+(1,0)Z+(0,2)Z194|195\196197gap> Trajectory(hyperbolic,[0,10000],20);198[ [ 0, 10000 ], [ 0, 5000 ], [ 0, 2500 ], [ 0, 1250 ], [ 0, 625 ],199[ 1, 312 ], [ 2, 156 ], [ 4, 78 ], [ 8, 39 ], [ 17, 19 ], [ 35, 9 ],200[ 71, 4 ], [ 142, 2 ], [ 284, 1 ], [ 569, 0 ], [ 1138, 0 ],201[ 2276, 0 ], [ 4552, 0 ], [ 9104, 0 ], [ 18208, 0 ] ]202gap> P1 := AllResidueClassesModulo(R,[[2,1],[0,2]]);203[ (0,0)+(2,1)Z+(0,2)Z, (0,1)+(2,1)Z+(0,2)Z, (1,0)+(2,1)Z+(0,2)Z,204(1,1)+(2,1)Z+(0,2)Z ]205gap> P2 := AllResidueClassesModulo(R,[[1,0],[0,4]]);206[ (0,0)+(1,0)Z+(0,4)Z, (0,1)+(1,0)Z+(0,4)Z, (0,2)+(1,0)Z+(0,4)Z,207(0,3)+(1,0)Z+(0,4)Z ]208gap> g := RcwaMapping(P1,P2); # method (b)209<rcwa permutation of Z^2 with modulus (2,1)Z+(0,2)Z>210gap> P1^g = P2;211true212gap> Display(g:AsTable);213214Rcwa permutation of Z^2 with modulus (2,1)Z+(0,2)Z215216[m,n] mod (2,1)Z+(0,2)Z | Image of [m,n]217-----------------------------+-------------------------------------------218[0,0] | [m/2,-m+2n]219[0,1] | [m/2,-m+2n-1]220[1,0] | [(m-1)/2,-m+2n+3]221[1,1] | [(m-1)/2,-m+2n+2]222223gap> classes := List([[[0,0],[[2,1],[0,2]]],[[1,0],[[2,1],[0,4]]],224> [[1,1],[[4,2],[0,4]]]],ResidueClass);225[ (0,0)+(2,1)Z+(0,2)Z, (1,0)+(2,1)Z+(0,4)Z, (1,1)+(4,2)Z+(0,4)Z ]226gap> g := RcwaMapping([classes]); # method (c)227<rcwa permutation of Z^2 with modulus (4,2)Z+(0,4)Z, of order 3>228gap> Permutation(g,classes);229(1,2,3)230gap> Support(g);231(0,0)+(2,1)Z+(0,2)Z U (1,0)+(2,1)Z+(0,4)Z U (1,1)+(4,2)Z+(0,4)Z232gap> Display(g);233234Rcwa permutation of Z^2 with modulus (4,2)Z+(0,4)Z, of order 3235236/237| (m+1,(-m+4n)/2) if (m,n) in (0,0)+(2,1)Z+(0,2)Z238| (2m-1,(m+2n+1)/2) if (m,n) in (1,0)+(2,1)Z+(0,4)Z239(m,n) |-> < ((m-1)/2,(n-1)/2) if (m,n) in (1,1)+(4,2)Z+(0,4)Z240| (m,n) otherwise241|242\243244gap> g := RcwaMapping(ClassTransposition(0,2,1,2),245> ClassReflection(0,2)); # method (d)246<rcwa mapping of Z^2 with modulus (2,0)Z+(0,2)Z>247gap> Display(g);248249Rcwa mapping of Z^2 with modulus (2,0)Z+(0,2)Z250251/252| (m+1,-n) if (m,n) in (0,0)+(2,0)Z+(0,2)Z253| (m+1,n) if (m,n) in (0,1)+(2,0)Z+(0,2)Z254(m,n) |-> < (m-1,-n) if (m,n) in (1,0)+(2,0)Z+(0,2)Z255| (m-1,n) if (m,n) in (1,1)+(2,0)Z+(0,2)Z256|257\258259gap> g^2;260IdentityMapping( ( Integers^2 ) )261gap> List(ProjectionsToCoordinates(g),Factorization);262[ [ ( 0(2), 1(2) ) ], [ ClassReflection( 0(2) ) ] ]263]]>264</Example>265</Description>266</ManSection>267268<ManSection>269<Heading> ClassTransposition (for <M>&ZZ;^2</M>) </Heading>270<Func Name="ClassTransposition" Arg="r1, L1, r2, L2"271Label="r1, L1, r2, L2 (for Z x Z)"/>272<Func Name="ClassTransposition" Arg="cl1, cl2"273Label="cl1, cl2 (for Z x Z)"/>274<Returns>275the class transposition <M>\tau_{r_1+&ZZ;^2L_1,r_2+&ZZ;^2L_2}</M>.276</Returns>277<Description>278Let <M>d \in &NN;</M>, and let <M>L_1, L_2 \in &ZZ;^{d \times d}</M> be279matrices of full rank which are in Hermite normal form. Further let280<M>r_1 + &ZZ;^d L_1</M> and <M>r_2 + &ZZ;^d L_2</M> be disjoint residue281classes, and assume that the representatives <M>r_1</M> and <M>r_2</M>282are reduced modulo <M>&ZZ;^d L_1</M> and <M>&ZZ;^d L_2</M>,283respectively. Then we define the <E>class transposition</E>284<M>\tau_{r_1+&ZZ;^d L_1, r_2+&ZZ;^d L_2} \in {\rm Sym}(&ZZ;^d)</M> as the285involution which interchanges <M>r_1 + k L_1</M> and <M>r_2 + k L_2</M>286for all <M>k \in &ZZ;^d</M>. <P/>287288The class transposition <M>\tau_{r_1+&ZZ;^d L_1, r_2+&ZZ;^d L_2}</M>289interchanges the residue classes <M>r_1+&ZZ;^d L_1</M> and290<M>r_2+&ZZ;^d L_2</M>, and fixes the complement of their union pointwise.291The set of all class transpositions of <M>&ZZ;^d</M> generates the292simple group CT(<M>&ZZ;^d</M>) (cf. <Cite Key="Kohl13"/>). <P/>293294<Index Key="TransposedClasses"295Subkey="of a class transposition of Z x Z">296<C>TransposedClasses</C>297</Index>298299In the four-argument form, the arguments <A>r1</A>, <A>L1</A>,300<A>r2</A> and <A>L2</A> stand for <M>r_1</M>, <M>L_1</M>,301<M>r_2</M> and <M>L_2</M>, respectively.302In the two-argument form, the arguments <A>cl1</A> and <A>cl2</A>303stand for the residue classes <M>r_1+&ZZ;^2 L_1</M>304and <M>r_2+&ZZ;^2 L_2</M>, respectively.305Enclosing the argument list in list brackets is permitted.306The residue classes <M>r_1+&ZZ;^2 L_1</M> and <M>r_2+&ZZ;^2 L_2</M>307are stored as an attribute <C>TransposedClasses</C>. <P/>308309<Index Key="SplittedClassTransposition"310Subkey="for a class transposition of Z x Z">311<C>SplittedClassTransposition</C>312</Index>313314There is also a method for <C>SplittedClassTransposition</C> available315for class transpositions of <M>&ZZ;^2</M>. This method takes as first316argument the class transposition, and as second argument a list of317two integers. These integers are the numbers of parts into which the318class transposition is to be sliced in each dimension. Note that the319product of the returned class transpositions is not always equal to320the class transposition passed as first argument. However this equality321holds if the first entry of the second argument is 1. <P/>322<Example>323<![CDATA[324gap> ct := ClassTransposition([0,0],[[2,1],[0,2]],[1,0],[[2,1],[0,4]]);325( (0,0)+(2,1)Z+(0,2)Z, (1,0)+(2,1)Z+(0,4)Z )326gap> Display(ct);327328Rcwa permutation of Z^2 with modulus (2,1)Z+(0,4)Z, of order 2329330/331| (m+1,(-m+4n)/2) if (m,n) in (0,0)+(2,1)Z+(0,2)Z332(m,n) |-> < (m-1,(m+2n-1)/4) if (m,n) in (1,0)+(2,1)Z+(0,4)Z333| (m,n) otherwise334\335336gap> TransposedClasses(ct);337[ (0,0)+(2,1)Z+(0,2)Z, (1,0)+(2,1)Z+(0,4)Z ]338gap> ct = ClassTransposition(last);339true340gap> SplittedClassTransposition(ct,[1,2]);341[ ( (0,0)+(2,1)Z+(0,4)Z, (1,0)+(2,1)Z+(0,8)Z ),342( (0,2)+(2,1)Z+(0,4)Z, (1,4)+(2,1)Z+(0,8)Z ) ]343gap> Product(last) = ct;344true345gap> SplittedClassTransposition(ct,[2,1]);346[ ( (0,0)+(4,0)Z+(0,2)Z, (1,0)+(4,2)Z+(0,4)Z ),347( (2,1)+(4,0)Z+(0,2)Z, (3,1)+(4,2)Z+(0,4)Z ) ]348gap> Product(last) = ct;349false350]]>351</Example>352</Description>353</ManSection>354355<ManSection>356<Heading> ClassRotation (for <M>&ZZ;^2</M>) </Heading>357<Func Name="ClassRotation" Arg="r, L, u" Label="r, L, u; for Z x Z"/>358<Func Name="ClassRotation" Arg="cl, u" Label="cl, u; for Z x Z"/>359<Returns> the class rotation <M>\rho_{r(m),u}</M>. </Returns>360<Description>361Let <M>d \in &NN;</M>. Given a residue class <M>r+&ZZ;^dL</M>362and a matrix <M>u \in {\rm GL}(d,&ZZ;)</M>, the <E>class rotation</E>363<M>\rho_{r+&ZZ;^dL,u}</M> is the rcwa mapping which maps364<M>v \in r+&ZZ;^dL</M> to <M>vu + r(1-u)</M>365and which fixes <M>&ZZ;^d \setminus r+&ZZ;^dL</M> pointwise.366367<Index Key="RotationFactor" Subkey="of a class rotation of Z x Z">368<C>RotationFactor</C>369</Index>370371In the two-argument form, the argument <A>cl</A> stands for the372residue class <M>r+&ZZ;^dL</M>. Enclosing the argument list in list373brackets is permitted. The argument <A>u</A> is stored as an attribute374<C>RotationFactor</C>.375<Example>376<![CDATA[377gap> interchange := ClassRotation([0,0],[[1,0],[0,1]],[[0,1],[1,0]]);378ClassRotation( Z^2, [ [ 0, 1 ], [ 1, 0 ] ] )379gap> Display(interchange);380Rcwa permutation of Z^2: (m,n) -> (n,m)381gap> classes := AllResidueClassesModulo(Integers^2,[[2,1],[0,3]]);382[ (0,0)+(2,1)Z+(0,3)Z, (0,1)+(2,1)Z+(0,3)Z, (0,2)+(2,1)Z+(0,3)Z,383(1,0)+(2,1)Z+(0,3)Z, (1,1)+(2,1)Z+(0,3)Z, (1,2)+(2,1)Z+(0,3)Z ]384gap> transvection := ClassRotation(classes[5],[[1,1],[0,1]]);385ClassRotation((1,1)+(2,1)Z+(0,3)Z,[[1,1],[0,1]])386gap> Display(transvection);387388Tame rcwa permutation of Z^2 with modulus (2,1)Z+(0,3)Z, of order infinity389390/391| (m,(3m+2n-3)/2) if (m,n) in (1,1)+(2,1)Z+(0,3)Z392(m,n) |-> < (m,n) otherwise393|394\395]]>396</Example>397</Description>398</ManSection>399400<ManSection>401<Heading> ClassShift (for <M>&ZZ;^2</M>) </Heading>402<Func Name="ClassShift" Arg="r, L, k" Label="r, L, k; for Z x Z"/>403<Func Name="ClassShift" Arg="cl, k" Label="cl, k; for Z x Z"/>404<Returns> the class shift <M>\nu_{r+&ZZ;^dL,k}</M>. </Returns>405<Description>406Let <M>d \in &NN;</M>. Given a residue class <M>r+&ZZ;^dL</M> and407an integer <M>k \in \{1, \dots, d\}</M>, the <E>class shift</E>408<M>\nu_{r+&ZZ;^dL,k}</M> is the rcwa mapping which maps409<M>v \in r+&ZZ;^dL</M> to <M>v + L_k</M> and which fixes410<M>&ZZ;^d \setminus r+&ZZ;^dL</M> pointwise.411Here <M>L_k</M> denotes the <M>k</M>th row of <M>L</M>. <P/>412413In the two-argument form, the argument <A>cl</A> stands for the414residue class <M>r+&ZZ;^dL</M>. Enclosing the argument list in415list brackets is permitted.416<Example>417<![CDATA[418gap> shift1 := ClassShift([0,0],[[1,0],[0,1]],1);419ClassShift( Z^2, 1 )420gap> Display(shift1);421Tame rcwa permutation of Z^2: (m,n) -> (m+1,n)422gap> s := ClassShift(ResidueClass([1,1],[[2,1],[0,2]]),2);423ClassShift((1,1)+(2,1)Z+(0,2)Z,2)424gap> Display(s);425426Tame rcwa permutation of Z^2 with modulus (2,1)Z+(0,2)Z, of order infinity427428/429| (m,n+2) if (m,n) in (1,1)+(2,1)Z+(0,2)Z430(m,n) |-> < (m,n) if (m,n) in (0,0)+(2,0)Z+(0,1)Z U431| (1,0)+(2,1)Z+(0,2)Z432\433]]>434</Example>435</Description>436</ManSection>437438<Index Key="IsClassTransposition" Subkey="for an rcwa mapping of Z x Z">439<C>IsClassTransposition</C>440</Index>441<Index Key="IsClassRotation" Subkey="for an rcwa mapping of Z x Z">442<C>IsClassRotation</C>443</Index>444<Index Key="IsClassShift" Subkey="for an rcwa mapping of Z x Z">445<C>IsClassShift</C>446</Index>447448As for other rings, class transpositions, class rotations and449class shifts of <M>&ZZ;^2</M> have the distinguishing properties450<C>IsClassTransposition</C>, <C>IsClassRotation</C>451and <C>IsClassShift</C>.452453</Section>454455<!-- #################################################################### -->456457<Section Label="sec:MethodsForRcwaMappingsOfZxZ">458<Heading>459Methods for residue-class-wise affine mappings of <M>&ZZ;^2</M>460</Heading>461462There are methods available for rcwa mappings of <M>&ZZ;^2</M> for the463following general operations:464465<Index Key="View" Subkey="for an rcwa mapping of Z x Z">466<C>View</C>467</Index>468<Index Key="Display" Subkey="for an rcwa mapping of Z x Z">469<C>Display</C>470</Index>471<Index Key="Print" Subkey="for an rcwa mapping of Z x Z">472<C>Print</C>473</Index>474<Index Key="String" Subkey="for an rcwa mapping of Z x Z">475<C>String</C>476</Index>477<Index Key="LaTeXStringRcwaMapping" Subkey="for an rcwa mapping of Z x Z">478<C>LaTeXStringRcwaMapping</C>479</Index>480<Index Key="LaTeXAndXDVI" Subkey="for an rcwa mapping of Z x Z">481<C>LaTeXAndXDVI</C>482</Index>483<Index Key="Modulus" Subkey="of an rcwa mapping of Z x Z">484<C>Modulus</C>485</Index>486<Index Key="Coefficients" Subkey="of an rcwa mapping of Z x Z">487<C>Coefficients</C>488</Index>489<Index Key="Support" Subkey="of an rcwa mapping of Z x Z">490<C>Support</C>491</Index>492<Index Key="MovedPoints" Subkey="of an rcwa mapping of Z x Z">493<C>MovedPoints</C>494</Index>495<Index Key="Order" Subkey="of an rcwa mapping of Z x Z">496<C>Order</C>497</Index>498<Index Key="Multiplier" Subkey="of an rcwa mapping of Z x Z">499<C>Multiplier</C>500</Index>501<Index Key="Divisor" Subkey="of an rcwa mapping of Z x Z">502<C>Divisor</C>503</Index>504<Index Key="PrimeSet" Subkey="of an rcwa mapping of Z x Z">505<C>PrimeSet</C>506</Index>507<Index Key="One" Subkey="for an rcwa mapping of Z x Z">508<C>One</C>509</Index>510<Index Key="Zero" Subkey="for an rcwa mapping of Z x Z">511<C>Zero</C>512</Index>513<Index Key="IsInjective" Subkey="for an rcwa mapping of Z x Z">514<C>IsInjective</C>515</Index>516<Index Key="IsSurjective" Subkey="for an rcwa mapping of Z x Z">517<C>IsSurjective</C>518</Index>519<Index Key="IsBijective" Subkey="for an rcwa mapping of Z x Z">520<C>IsBijective</C>521</Index>522<Index Key="IsTame" Subkey="for an rcwa mapping of Z x Z">523<C>IsTame</C>524</Index>525<Index Key="IsIntegral" Subkey="for an rcwa mapping of Z x Z">526<C>IsIntegral</C>527</Index>528<Index Key="IsBalanced" Subkey="for an rcwa mapping of Z x Z">529<C>IsBalanced</C>530</Index>531<Index Key="IsClassWiseOrderPreserving"532Subkey="for an rcwa mapping of Z x Z">533<C>IsClassWiseOrderPreserving</C>534</Index>535<Index Key="IsOne" Subkey="for an rcwa mapping of Z x Z">536<C>IsOne</C>537</Index>538<Index Key="IsZero" Subkey="for an rcwa mapping of Z x Z">539<C>IsZero</C>540</Index>541<Index Key="Trajectory" Subkey="for rcwa mappings of Z x Z">542<C>Trajectory</C>543</Index>544<Index Key="ShortCycles"545Subkey="for rcwa perm. of Z x Z, set of points and max. length">546<C>ShortCycles</C>547</Index>548<Index Key="Multpk" Subkey="for rcwa mapping of Z x Z, prime and exponent">549<C>Multpk</C>550</Index>551<Index Key="ClassWiseOrderPreservingOn" Subkey="for rcwa mappings of Z x Z">552<C>ClassWiseOrderPreservingOn</C>553</Index>554<Index Key="ClassWiseOrderReversingOn" Subkey="for rcwa mappings of Z x Z">555<C>ClassWiseOrderReversingOn</C>556</Index>557<Index Key="ClassWiseConstantOn" Subkey="for rcwa mappings of Z x Z">558<C>ClassWiseConstantOn</C>559</Index>560561<List>562<Mark> Output </Mark>563<Item>564<C>View</C>, <C>Display</C>, <C>Print</C>, <C>String</C>,565<C>LaTeXStringRcwaMapping</C>, <C>LaTeXAndXDVI</C>.566</Item>567<Mark> Access to components </Mark>568<Item> <C>Modulus</C>, <C>Coefficients</C>. </Item>569<Mark> Attributes </Mark>570<Item>571<C>Support</C> / <C>MovedPoints</C>, <C>Order</C>,572<C>Multiplier</C>, <C>Divisor</C>, <C>PrimeSet</C>,573<C>One</C>, <C>Zero</C>.574</Item>575<Mark> Properties </Mark>576<Item>577<C>IsInjective</C>, <C>IsSurjective</C>, <C>IsBijective</C>,578<C>IsTame</C>, <C>IsIntegral</C>, <C>IsBalanced</C>,579<C>IsClassWiseOrderPreserving</C>, <C>IsOne</C>, <C>IsZero</C>.580</Item>581<Mark> Action on <M>&ZZ;^d</M> </Mark>582<Item>583<C>^</C> (for points / finite sets / residue class unions),584<C>Trajectory</C>, <C>ShortCycles</C>, <C>Multpk</C>,585<C>ClassWiseOrderPreservingOn</C>, <C>ClassWiseOrderReversingOn</C>,586<C>ClassWiseConstantOn</C>.587</Item>588<Mark> Arithmetical operations </Mark>589<Item>590<C>=</C>, <C>*</C> (multiplication / composition and multiplication591by a <M>2 \times 2</M> matrix or an integer),592<C>^</C> (exponentiation and conjugation), <C>Inverse</C>,593<C>+</C> (addition of a constant).594</Item>595</List>596597The above operations are documented either in the &GAP; Reference Manual598or earlier in this manual. The operations which are special for rcwa mappings599of <M>&ZZ;^2</M> are described in the sequel. <P/>600601<ManSection>602<Attr Name="ProjectionsToCoordinates" Arg="f"603Label="for an rcwa mapping of Z x Z"/>604<Returns>605the projections of the rcwa mapping <A>f</A> of <M>&ZZ;^2</M> to the606coordinates if such projections exist, and <C>fail</C> otherwise.607</Returns>608<Description>609An rcwa mapping can be projected to the first / second coordinate if and610only if the first / second coordinate of the image of a point depends611only on the first / second coordinate of the preimage. Note that this is612a very strong and restrictive condition.613<Example>614<![CDATA[615gap> f := RcwaMapping(ClassTransposition(0,2,1,2),ClassReflection(0,2));;616gap> Display(f);617618Rcwa mapping of Z^2 with modulus (2,0)Z+(0,2)Z619620/621| (m+1,-n) if (m,n) in (0,0)+(2,0)Z+(0,2)Z622| (m+1,n) if (m,n) in (0,1)+(2,0)Z+(0,2)Z623(m,n) |-> < (m-1,-n) if (m,n) in (1,0)+(2,0)Z+(0,2)Z624| (m-1,n) if (m,n) in (1,1)+(2,0)Z+(0,2)Z625|626\627628gap> List(ProjectionsToCoordinates(f),Factorization);629[ [ ( 0(2), 1(2) ) ], [ ClassReflection( 0(2) ) ] ]630]]>631</Example>632</Description>633</ManSection>634635</Section>636637<!-- #################################################################### -->638639<Section Label="sec:MethodsForRcwaGroupsOverZxZ">640<Heading>641Methods for residue-class-wise affine groups and -monoids over <M>&ZZ;^2</M>642</Heading>643644<Index Key="Rcwa"645Subkey="the monoid formed by all rcwa permutations of Z x Z">646<C>Rcwa</C>647</Index>648<Index Key="RCWA"649Subkey="the group formed by all rcwa permutations of Z x Z">650<C>RCWA</C>651</Index>652<Index Key="CT"653Subkey="the group generated by all class transpositions of Z x Z">654<C>CT</C>655</Index>656657Residue-class-wise affine groups over <M>&ZZ;^2</M> can be entered by658<C>Group</C>, <C>GroupByGenerators</C> and <C>GroupWithGenerators</C>,659like any groups in &GAP;. Likewise, residue-class-wise affine monoids over660<M>&ZZ;^2</M> can be entered by <C>Monoid</C> and <C>MonoidByGenerators</C>.661The groups RCWA(<M>&ZZ;^2</M>) and CT(<M>&ZZ;^2</M>) are entered662as <C>RCWA(Integers^2)</C> and <C>CT(Integers^2)</C>, respectively.663The monoid Rcwa(<M>&ZZ;^2</M>) is entered as <C>Rcwa(Integers^2)</C>. <P/>664665<Index Key="Size" Subkey="for an rcwa group over Z x Z">666<C>Size</C>667</Index>668<Index Key="IsIntegral" Subkey="for an rcwa group over Z x Z">669<C>IsIntegral</C>670</Index>671<Index Key="IsClassWiseTranslating" Subkey="for an rcwa group over Z x Z">672<C>IsClassWiseTranslating</C>673</Index>674<Index Key="IsTame" Subkey="for an rcwa group over Z x Z">675<C>IsTame</C>676</Index>677<Index Key="Modulus" Subkey="of an rcwa group over Z x Z">678<C>Modulus</C>679</Index>680<Index Key="Multiplier" Subkey="of an rcwa group over Z x Z">681<C>Multiplier</C>682</Index>683<Index Key="Divisor" Subkey="of an rcwa group over Z x Z">684<C>Divisor</C>685</Index>686687There are methods provided for the operations <C>Size</C>,688<C>IsIntegral</C>, <C>IsClassWiseTranslating</C>, <C>IsTame</C>,689<C>Modulus</C>, <C>Multiplier</C> and <C>Divisor</C>. <P/>690691There are methods for <Ref Attr="IsomorphismRcwaGroup"692Label="for a group, over a given ring"/> which embed the groups SL(2,&ZZ;)693and GL(2,&ZZ;) into RCWA(<M>&ZZ;^2</M>) in such a way that the support694of the image is a specified residue class:695696<ManSection>697<Heading>698IsomorphismRcwaGroup (Embeddings of SL(2,&ZZ;) and GL(2,&ZZ;))699</Heading>700<Attr Name="IsomorphismRcwaGroup"701Arg="sl2z, cl" Label="for SL(2,Z) and a residue class"/>702<Attr Name="IsomorphismRcwaGroup"703Arg="gl2z, cl" Label="for GL(2,Z) and a residue class"/>704<Returns>705a monomorphism from <A>sl2z</A> respectively <A>gl2z</A>706to RCWA(<M>&ZZ;^2</M>), such that the support of the image707is the residue class <A>cl</A> and the generators708are affine on <A>cl</A>.709</Returns>710<Description>711<Example>712<![CDATA[713gap> sl := SL(2,Integers);714SL(2,Integers)715gap> phi := IsomorphismRcwaGroup(sl,ResidueClass([1,0],[[2,2],[0,3]]));716[ [ [ 0, 1 ], [ -1, 0 ] ], [ [ 1, 1 ], [ 0, 1 ] ] ] ->717[ ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[0,1],[-1,0]]),718ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[1,1],[0,1]]) ]719gap> Support(Image(phi));720(1,0)+(2,2)Z+(0,3)Z721gap> gl := GL(2,Integers);722GL(2,Integers)723gap> phi := IsomorphismRcwaGroup(gl,ResidueClass([1,0],[[2,2],[0,3]]));724[ [ [ 0, 1 ], [ 1, 0 ] ], [ [ -1, 0 ], [ 0, 1 ] ],725[ [ 1, 1 ], [ 0, 1 ] ] ] ->726[ ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[0,1],[1,0]]),727ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[-1,0],[0,1]]),728ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[1,1],[0,1]]) ]729gap> [[-47,-37],[61,48]]^phi;730ClassRotation((1,0)+(2,2)Z+(0,3)Z,[[-47,-37],[61,48]])731gap> Display(last:AsTable);732733Rcwa permutation of Z^2 with modulus (2,2)Z+(0,3)Z, of order 6734735[m,n] mod (2,2)Z+(0,3)Z | Image of [m,n]736-----------------------------+-------------------------------------------737[0,0] [0,1] [0,2] [1,1] |738[1,2] | [m,n]739[1,0] | [(-263m+122n+266)/3,(-1147m+532n+1147)/6]740]]>741</Example>742</Description>743</ManSection>744745<Index Key="DrawOrbitPicture" Subkey="for rcwa groups over Z x Z">746<C>DrawOrbitPicture</C>747</Index>748749The function <Ref Func="DrawOrbitPicture"750Label="G, p0, bound, h, w, colored, palette, filename"/>751can also be used to depict orbits under the action of rcwa groups752over <M>&ZZ;^2</M>. Further there is a function which depicts753residue class unions of <M>&ZZ;^2</M> and partitions754of <M>&ZZ;^2</M> into such:755756<ManSection>757<Heading> DrawGrid </Heading>758<Func Name="DrawGrid"759Arg="U, yrange, xrange, filename"760Label="U, yrange, xrange, filename"/>761<Func Name="DrawGrid"762Arg="P, yrange, xrange, filename"763Label="P, yrange, xrange, filename"/>764<Returns>765nothing.766</Returns>767<Description>768This function depicts the residue class union <A>U</A>769of <M>&ZZ;^2</M> or the partition <A>P</A>770of <M>&ZZ;^2</M> into residue class unions, respectively.771The arguments <A>yrange</A> and <A>xrange</A> are the coordinate772ranges of the rectangular snippet to be drawn, and the argument773<A>filename</A> is the name, i.e. the full path name,774of the output file. If the first argument is a residue class union,775the output picture is black-and-white, where black pixels represent776members of <A>U</A> and white pixels represent non-members.777If the first argument is a partition of <M>&ZZ;^2</M> into residue778class unions, the produced picture is colored, and different colors are779used to denote membership in different parts.780</Description>781</ManSection>782783</Section>784785<!-- #################################################################### -->786787</Chapter>788789<!-- #################################################################### -->790791792