GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
<!-- #################################################################### -->1<!-- ## ## -->2<!-- ## rcwamono.xml RCWA documentation Stefan Kohl ## -->3<!-- ## ## -->4<!-- #################################################################### -->56<Chapter Label="ch:RcwaMonoids">7<Heading>Residue-Class-Wise Affine Monoids</Heading>89<Ignore Remark="set screen width to 75, for the example tester">10<Example>11<![CDATA[12gap> SizeScreen([75,24]);;13]]>14</Example>15</Ignore>1617In this short chapter, we describe how to compute with residue-class-wise18affine monoids.1920<Index Key="rcwa monoid" Subkey="definition">rcwa monoid</Index>2122<E>Residue-class-wise affine</E> monoids, or <E>rcwa</E> monoids for short,23are monoids whose elements are residue-class-wise affine mappings.2425<!-- #################################################################### -->2627<Section Label="sec:ContructingRcwaMonoids">28<Heading>Constructing residue-class-wise affine monoids</Heading>2930<Index Key="Monoid"><C>Monoid</C></Index>31<Index Key="MonoidByGenerators"><C>MonoidByGenerators</C></Index>3233As any other monoids in &GAP;, residue-class-wise affine monoids can be34constructed by <C>Monoid</C> or <C>MonoidByGenerators</C>.3536<Example>37<![CDATA[38gap> M := Monoid(RcwaMapping([[ 0,1,1],[1,1,1]]),39> RcwaMapping([[-1,3,1],[0,2,1]]));40<rcwa monoid over Z with 2 generators>41gap> Size(M);421143gap> Display(MultiplicationTable(M));44[ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ],45[ 2, 8, 5, 11, 8, 3, 10, 5, 2, 8, 5 ],46[ 3, 10, 11, 5, 5, 5, 8, 8, 8, 2, 3 ],47[ 4, 9, 6, 8, 8, 8, 5, 5, 5, 7, 4 ],48[ 5, 8, 5, 8, 8, 8, 5, 5, 5, 8, 5 ],49[ 6, 7, 4, 8, 8, 8, 5, 5, 5, 9, 6 ],50[ 7, 5, 8, 6, 5, 4, 9, 8, 7, 5, 8 ],51[ 8, 5, 8, 5, 5, 5, 8, 8, 8, 5, 8 ],52[ 9, 5, 8, 4, 5, 6, 7, 8, 9, 5, 8 ],53[ 10, 8, 5, 3, 8, 11, 2, 5, 10, 8, 5 ],54[ 11, 2, 3, 5, 5, 5, 8, 8, 8, 10, 11 ] ]55]]>56</Example>5758<Index Key="View" Subkey="for an rcwa monoid"><C>View</C></Index>59<Index Key="Display" Subkey="for an rcwa monoid"><C>Display</C></Index>60<Index Key="Print" Subkey="for an rcwa monoid"><C>Print</C></Index>61<Index Key="String" Subkey="for an rcwa monoid"><C>String</C></Index>6263There are methods for the operations <C>View</C>, <C>Display</C>,64<C>Print</C> and <C>String</C> which are applicable to rcwa monoids.65All rcwa monoids over a ring <M>R</M> are submonoids of Rcwa(<M>R</M>).66The monoid Rcwa(<M>R</M>) itself is not finitely generated, thus cannot67be constructed as described above. It is handled as a special case:6869<ManSection>70<Func Name="Rcwa" Arg="R"71Label="the monoid formed by all rcwa mappings of a ring"/>72<Returns>73the monoid Rcwa(<A>R</A>) of all residue-class-wise affine74mappings of the ring <A>R</A>.75</Returns>76<Description>77<Example>78<![CDATA[79gap> RcwaZ := Rcwa(Integers);80Rcwa(Z)81gap> IsSubset(RcwaZ,M);82true83]]>84</Example>85</Description>86</ManSection>8788<Index Key="Restriction"89Subkey="for an rcwa monoid, by an injective rcwa mapping">90<C>Restriction</C>91</Index>92<Index Key="Induction"93Subkey="for an rcwa monoid, by an injective rcwa mapping">94<C>Induction</C>95</Index>9697In our methods to construct rcwa groups, two kinds of mappings played98a crucial role, namely the restriction monomorphisms (cf. <Ref99Oper="Restriction" Label="of an rcwa group, by an injective rcwa mapping"/>)100and the induction epimorphisms (cf. <Ref Oper="Induction"101Label="of an rcwa group, by an injective rcwa mapping"/>).102The restriction monomorphisms extend in a natural way to the monoids103Rcwa(<M>R</M>), and the induction epimorphisms have corresponding104generalizations, also. Therefore the operations <C>Restriction</C>105and <C>Induction</C> can be applied to rcwa monoids as well:106107<Example>108<![CDATA[109gap> M2 := Restriction(M,2*One(Rcwa(Integers)));110<rcwa monoid over Z with 2 generators, of size 11>111gap> Support(M2);1120(2)113gap> Action(M2,ResidueClass(1,2));114Trivial rcwa group over Z115gap> Induction(M2,2*One(Rcwa(Integers))) = M;116true117]]>118</Example>119120</Section>121122<!-- #################################################################### -->123124<Section Label="sec:ComputingWithRcwaMonoids">125<Heading>Computing with residue-class-wise affine monoids</Heading>126127<Index Key="Size" Subkey="for an rcwa monoid"><C>Size</C></Index>128<Index Key="rcwa monoids" Subkey="membership test">129<C>rcwa monoids</C>130</Index>131<Index Key="IsSubset" Subkey="for two rcwa monoids"><C>IsSubset</C></Index>132133There is a method for <C>Size</C> which computes the order of an rcwa monoid.134Further there is a method for <C>in</C> which checks whether a given135rcwa mapping lies in a given rcwa monoid (membership test), and there136is a method for <C>IsSubset</C> which checks for a submonoid relation. <P/>137138<Index Key="Support" Subkey="of an rcwa monoid"><C>Support</C></Index>139<Index Key="Modulus" Subkey="of an rcwa monoid"><C>Modulus</C></Index>140<Index Key="IsTame" Subkey="for an rcwa monoid"><C>IsTame</C></Index>141<Index Key="PrimeSet" Subkey="of an rcwa monoid"><C>PrimeSet</C></Index>142<Index Key="IsIntegral" Subkey="for an rcwa monoid"><C>IsIntegral</C></Index>143<Index Key="IsClassWiseOrderPreserving" Subkey="for an rcwa monoid">144<C>IsClassWiseOrderPreserving</C>145</Index>146<Index Key="IsSignPreserving" Subkey="for an rcwa monoid">147<C>IsSignPreserving</C>148</Index>149150There are also methods for <C>Support</C>, <C>Modulus</C>, <C>IsTame</C>,151<C>PrimeSet</C>, <C>IsIntegral</C>, <C>IsClassWiseOrderPreserving</C> and152<C>IsSignPreserving</C> available for rcwa monoids. <P/>153154<Index Key="rcwa monoid" Subkey="modulus">rcwa monoid</Index>155<Index Key="rcwa monoid" Subkey="tame">rcwa monoid</Index>156<Index Key="rcwa monoid" Subkey="wild">rcwa monoid</Index>157<Index Key="rcwa monoid" Subkey="prime set">rcwa monoid</Index>158<Index Key="rcwa monoid" Subkey="integral">rcwa monoid</Index>159<Index Key="rcwa monoid" Subkey="class-wise order-preserving">160rcwa monoid161</Index>162<Index Key="rcwa monoid" Subkey="sign-preserving">rcwa monoid</Index>163164The <E>support</E> of an rcwa monoid is the union of the supports of165its elements. The <E>modulus</E> of an rcwa monoid is the lcm of the166moduli of its elements in case such an lcm exists and 0 otherwise.167An rcwa monoid is called <E>tame</E> if its modulus is nonzero, and168<E>wild</E> otherwise. The <E>prime set</E> of an rcwa monoid is the169union of the prime sets of its elements. An rcwa monoid is called170<E>integral</E>, <E>class-wise order-preserving</E> or <E>sign-preserving</E>171if all of its elements are so.172173<Example>174<![CDATA[175gap> f1 := RcwaMapping([[-1, 1, 1],[ 0,-1, 1]]);;176gap> f2 := RcwaMapping([[ 1,-1, 1],[-1,-2, 1],[-1, 2, 1]]);;177gap> f3 := RcwaMapping([[ 1, 0, 1],[-1, 0, 1]]);;178gap> N := Monoid(f1,f2,f3);;179gap> Size(N);180366181gap> List([Monoid(f1,f2),Monoid(f1,f3),Monoid(f2,f3)],Size);182[ 96, 6, 66 ]183gap> f1*f2*f3 in N;184true185gap> IsSubset(N,M);186false187gap> IsSubset(N,Monoid(f1*f2,f3*f2));188true189gap> Support(N);190Integers191gap> Modulus(N);1926193gap> IsTame(N) and IsIntegral(N);194true195gap> IsClassWiseOrderPreserving(N) or IsSignPreserving(N);196false197gap> Collected(List(AsList(N),Image)); # The images of the elements of N.198[ [ Integers, 2 ], [ 1(2), 2 ], [ Z \ 1(3), 32 ], [ 0(6), 44 ],199[ 0(6) U 1(6), 4 ], [ Z \ 4(6) U 5(6), 32 ], [ 0(6) U 2(6), 4 ],200[ 0(6) U 5(6), 4 ], [ 1(6), 44 ], [ 1(6) U [ -1 ], 2 ],201[ 1(6) U 3(6), 4 ], [ 1(6) U 5(6), 40 ], [ 2(6), 44 ],202[ 2(6) U 3(6), 4 ], [ 3(6), 44 ], [ 3(6) U 5(6), 4 ], [ 5(6), 44 ],203[ 5(6) U [ 1 ], 2 ], [ [ -5 ], 1 ], [ [ -4 ], 1 ], [ [ -3 ], 1 ],204[ [ -1 ], 1 ], [ [ 0 ], 1 ], [ [ 1 ], 1 ], [ [ 2 ], 1 ], [ [ 3 ], 1 ],205[ [ 5 ], 1 ], [ [ 6 ], 1 ] ]206]]>207</Example>208209Finite forward orbits under the action of an rcwa monoid can be found210by the operation <C>ShortOrbits</C>:211212<ManSection>213<Meth Name="ShortOrbits" Arg="M, S, maxlng"214Label="for rcwa monoid, set of points and bound on length"/>215<Returns>216a list of finite forward orbits of the rcwa monoid <A>M</A>217of length at most <A>maxlng</A> which start at points in218the set <A>S</A>.219</Returns>220<Description>221<Example>222<![CDATA[223gap> ShortOrbits(M,[-5..5],20);224[ [ -5, -4, 1, 2, 7, 8 ], [ -3, -2, 1, 2, 5, 6 ], [ -1, 0, 1, 2, 3, 4 ] ]225gap> Print(Action(M,last[1]),"\n");226Monoid( [ Transformation( [ 2, 3, 4, 3, 6, 3 ] ),227Transformation( [ 4, 5, 4, 3, 4, 1 ] ) ] )228gap> orbs := ShortOrbits(N,[0..10],100);229[ [ -5, -4, -3, -1, 0, 1, 2, 3, 5, 6 ],230[ -11, -10, -9, -7, -6, -5, -4, -3, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,23111, 12 ],232[ -17, -16, -15, -13, -12, -11, -10, -9, -7, -6, -5, -4, -3, -1, 0, 1,2332, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18 ] ]234gap> quots := List(orbs,orb->Action(N,orb));;235gap> List(quots,Size);236[ 268, 332, 366 ]237]]>238</Example>239</Description>240</ManSection>241242Balls of given radius around an element of an rcwa monoid can be computed243by the operation <C>Ball</C>. This operation can also be used for computing244forward orbits or subsets of such under the action of an rcwa monoid:245246<ManSection>247<Heading>248Ball (for monoid, element and radius or monoid, point, radius and action)249</Heading>250<Meth Name ="Ball"251Arg="M, f, r" Label="for monoid, element and radius"/>252<Meth Name ="Ball"253Arg="M, p, r, action" Label="for monoid, point, radius and action"/>254<Returns>255the ball of radius <A>r</A> around the element <A>f</A> in256the monoid <A>M</A>, respectively257the ball of radius <A>r</A> around the point <A>p</A> under258the action <A>action</A> of the monoid <A>M</A>.259</Returns>260<Description>261All balls are understood with respect to <C>GeneratorsOfMonoid(<A>M</A>)</C>.262As membership tests can be expensive, the first-mentioned method does not263check whether <A>f</A> is indeed an element of <A>M</A>.264The methods require that point- / element comparisons are cheap.265They are not only applicable to rcwa monoids.266If the option <A>Spheres</A> is set, the ball is split up and267returned as a list of spheres.268<Example>269<![CDATA[270gap> List([0..12],k->Length(Ball(N,One(N),k)));271[ 1, 4, 11, 26, 53, 99, 163, 228, 285, 329, 354, 364, 366 ]272gap> Ball(N,[0..3],2,OnTuples);273[ [ -3, 3, 3, 3 ], [ -1, -3, 0, 2 ], [ -1, -1, -1, -1 ],274[ -1, -1, 1, -1 ], [ -1, 1, 1, 1 ], [ -1, 3, 0, -4 ], [ 0, -1, 2, -3 ],275[ 0, 1, 2, 3 ], [ 1, -1, -1, -1 ], [ 1, 3, 0, 2 ], [ 3, -4, -1, 0 ] ]276gap> l := 2*IdentityRcwaMappingOfZ; r := l+1;277Rcwa mapping of Z: n -> 2n278Rcwa mapping of Z: n -> 2n + 1279gap> Ball(Monoid(l,r),1,4,OnPoints:Spheres);280[ [ 1 ], [ 2, 3 ], [ 4, 5, 6, 7 ], [ 8, 9, 10, 11, 12, 13, 14, 15 ],281[ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] ]282]]>283</Example>284</Description>285</ManSection>286287<Alt Only="HTML"> </Alt>288289</Section>290291<!-- #################################################################### -->292293</Chapter>294295<!-- #################################################################### -->296297298