<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>GAP (RCWA) - Chapter 4: Residue-Class-Wise Affine Monoids</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <meta name="generator" content="GAPDoc2HTML" /> <link rel="stylesheet" type="text/css" href="manual.css" /> </head> <body> <div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div> <div class="chlinkprevnexttop"> <a href="chap0.html">Top of Book</a> <a href="chap3.html">Previous Chapter</a> <a href="chap5.html">Next Chapter</a> </div> <p><a id="X81C90F7C7BA25BDF" name="X81C90F7C7BA25BDF"></a></p> <div class="ChapSects"><a href="chap4.html#X81C90F7C7BA25BDF">4. <span class="Heading">Residue-Class-Wise Affine Monoids</span></a> <div class="ContSect"><span class="nocss"> </span><a href="chap4.html#X7F95328B7C7E49EA">4.1 <span class="Heading">Constructing residue-class-wise affine monoids</span></a> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap4.html#X788C654D8358E642">4.1-1 Rcwa</a></span> </div> <div class="ContSect"><span class="nocss"> </span><a href="chap4.html#X8759954F7EB1A658">4.2 <span class="Heading">Computing with residue-class-wise affine monoids</span></a> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap4.html#X87DB896687475084">4.2-1 ShortOrbits</a></span> <span class="ContSS"><br /><span class="nocss"> </span><a href="chap4.html#X787848137DF1C245">4.2-2 <span class="Heading"> Ball (for monoid, element and radius or monoid, point, radius and action) </span></a> </span> </div> </div> <h3>4. <span class="Heading">Residue-Class-Wise Affine Monoids</span></h3> <p>In this short chapter, we describe how to compute with residue-class-wise affine monoids. <em>Residue-class-wise affine</em> monoids, or <em>rcwa</em> monoids for short, are monoids whose elements are residue-class-wise affine mappings.</p> <p><a id="X7F95328B7C7E49EA" name="X7F95328B7C7E49EA"></a></p> <h4>4.1 <span class="Heading">Constructing residue-class-wise affine monoids</span></h4> <p>As any other monoids in <strong class="pkg">GAP</strong>, residue-class-wise affine monoids can be constructed by <code class="code">Monoid</code> or <code class="code">MonoidByGenerators</code>.</p> <table class="example"> <tr><td><pre> gap> M := Monoid(RcwaMapping([[ 0,1,1],[1,1,1]]), > RcwaMapping([[-1,3,1],[0,2,1]])); <rcwa monoid over Z with 2 generators> gap> Size(M); 11 gap> Display(MultiplicationTable(M)); [ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ], [ 2, 8, 5, 11, 8, 3, 10, 5, 2, 8, 5 ], [ 3, 10, 11, 5, 5, 5, 8, 8, 8, 2, 3 ], [ 4, 9, 6, 8, 8, 8, 5, 5, 5, 7, 4 ], [ 5, 8, 5, 8, 8, 8, 5, 5, 5, 8, 5 ], [ 6, 7, 4, 8, 8, 8, 5, 5, 5, 9, 6 ], [ 7, 5, 8, 6, 5, 4, 9, 8, 7, 5, 8 ], [ 8, 5, 8, 5, 5, 5, 8, 8, 8, 5, 8 ], [ 9, 5, 8, 4, 5, 6, 7, 8, 9, 5, 8 ], [ 10, 8, 5, 3, 8, 11, 2, 5, 10, 8, 5 ], [ 11, 2, 3, 5, 5, 5, 8, 8, 8, 10, 11 ] ] </pre></td></tr></table> <p>There are methods for the operations <code class="code">View</code>, <code class="code">Display</code>, <code class="code">Print</code> and <code class="code">String</code> which are applicable to rcwa monoids. All rcwa monoids over a ring R are submonoids of Rcwa(R). The monoid Rcwa(R) itself is not finitely generated, thus cannot be constructed as described above. It is handled as a special case:</p> <p><a id="X788C654D8358E642" name="X788C654D8358E642"></a></p> <h5>4.1-1 Rcwa</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> Rcwa</code>( <var class="Arg">R</var> )</td><td class="tdright">( function )</td></tr></table></div> <p><b>Returns: </b>The monoid Rcwa(<var class="Arg">R</var>) of all residue-class-wise affine mappings of the ring <var class="Arg">R</var>.</p> <table class="example"> <tr><td><pre> gap> RcwaZ := Rcwa(Integers); Rcwa(Z) gap> IsSubset(RcwaZ,M); true </pre></td></tr></table> <p>In our methods to construct rcwa groups, two kinds of mappings played a crucial role, namely the restriction monomorphisms (cf. <code class="func">Restriction</code> (<a href="chap3.html#X852EF2C079E4D7FF"><b>3.1-6</b></a>)) and the induction epimorphisms (cf. <code class="func">Induction</code> (<a href="chap3.html#X8709A96C8640E4C2"><b>3.1-7</b></a>)). The restriction monomorphisms extend in a natural way to the monoids Rcwa(R), and the induction epimorphisms have corresponding generalizations, also. Therefore the operations <code class="code">Restriction</code> and <code class="code">Induction</code> can be applied to rcwa monoids as well:</p> <table class="example"> <tr><td><pre> gap> M2 := Restriction(M,2*One(Rcwa(Integers))); <rcwa monoid over Z with 2 generators, of size 11> gap> Support(M2); 0(2) gap> Action(M2,ResidueClass(1,2)); Trivial rcwa group over Z gap> Induction(M2,2*One(Rcwa(Integers))) = M; true </pre></td></tr></table> <p><a id="X8759954F7EB1A658" name="X8759954F7EB1A658"></a></p> <h4>4.2 <span class="Heading">Computing with residue-class-wise affine monoids</span></h4> <p>There is a method for <code class="code">Size</code> which computes the order of an rcwa monoid. Further there is a method for <code class="code">in</code> which checks whether a given rcwa mapping lies in a given rcwa monoid (membership test), and there is a method for <code class="code">IsSubset</code> which checks for a submonoid relation.</p> <p>There are also methods for <code class="code">Support</code>, <code class="code">Modulus</code>, <code class="code">IsTame</code>, <code class="code">PrimeSet</code>, <code class="code">IsIntegral</code>, <code class="code">IsClassWiseOrderPreserving</code> and <code class="code">IsSignPreserving</code> available for rcwa monoids.</p> <p>The <em>support</em> of an rcwa monoid is the union of the supports of its elements. The <em>modulus</em> of an rcwa monoid is the lcm of the moduli of its elements in case such an lcm exists and 0 otherwise. An rcwa monoid is called <em>tame</em> if its modulus is nonzero, and <em>wild</em> otherwise. The <em>prime set</em> of an rcwa monoid is the union of the prime sets of its elements. An rcwa monoid is called <em>integral</em>, <em>class-wise order-preserving</em> or <em>sign-preserving</em> if all of its elements are so.</p> <table class="example"> <tr><td><pre> gap> f1 := RcwaMapping([[-1, 1, 1],[ 0,-1, 1]]);; gap> f2 := RcwaMapping([[ 1,-1, 1],[-1,-2, 1],[-1, 2, 1]]);; gap> f3 := RcwaMapping([[ 1, 0, 1],[-1, 0, 1]]);; gap> N := Monoid(f1,f2,f3);; gap> Size(N); 366 gap> List([Monoid(f1,f2),Monoid(f1,f3),Monoid(f2,f3)],Size); [ 96, 6, 66 ] gap> f1*f2*f3 in N; true gap> IsSubset(N,M); false gap> IsSubset(N,Monoid(f1*f2,f3*f2)); true gap> Support(N); Integers gap> Modulus(N); 6 gap> IsTame(N) and IsIntegral(N); true gap> IsClassWiseOrderPreserving(N) or IsSignPreserving(N); false gap> Collected(List(AsList(N),Image)); # The images of the elements of N. [ [ Integers, 2 ], [ 1(2), 2 ], [ Z \ 1(3), 32 ], [ 0(6), 44 ], [ 0(6) U 1(6), 4 ], [ Z \ 4(6) U 5(6), 32 ], [ 0(6) U 2(6), 4 ], [ 0(6) U 5(6), 4 ], [ 1(6), 44 ], [ 1(6) U [ -1 ], 2 ], [ 1(6) U 3(6), 4 ], [ 1(6) U 5(6), 40 ], [ 2(6), 44 ], [ 2(6) U 3(6), 4 ], [ 3(6), 44 ], [ 3(6) U 5(6), 4 ], [ 5(6), 44 ], [ 5(6) U [ 1 ], 2 ], [ [ -5 ], 1 ], [ [ -4 ], 1 ], [ [ -3 ], 1 ], [ [ -1 ], 1 ], [ [ 0 ], 1 ], [ [ 1 ], 1 ], [ [ 2 ], 1 ], [ [ 3 ], 1 ], [ [ 5 ], 1 ], [ [ 6 ], 1 ] ] </pre></td></tr></table> <p>Finite forward orbits under the action of an rcwa monoid can be found by the operation <code class="code">ShortOrbits</code>:</p> <p><a id="X87DB896687475084" name="X87DB896687475084"></a></p> <h5>4.2-1 ShortOrbits</h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> ShortOrbits</code>( <var class="Arg">M, S, maxlng</var> )</td><td class="tdright">( method )</td></tr></table></div> <p><b>Returns: </b>A list of finite forward orbits of the rcwa monoid <var class="Arg">M</var> of length at most <var class="Arg">maxlng</var> which start at points in the set <var class="Arg">S</var>.</p> <table class="example"> <tr><td><pre> gap> ShortOrbits(M,[-5..5],20); [ [ -5, -4, 1, 2, 7, 8 ], [ -3, -2, 1, 2, 5, 6 ], [ -1, 0, 1, 2, 3, 4 ] ] gap> Display(Action(M,last[1])); Monoid( [ Transformation( [ 2, 3, 4, 3, 6, 3 ] ), Transformation( [ 4, 5, 4, 3, 4, 1 ] ) ], ... ) gap> orbs := ShortOrbits(N,[0..10],100); [ [ -5, -4, -3, -1, 0, 1, 2, 3, 5, 6 ], [ -11, -10, -9, -7, -6, -5, -4, -3, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12 ], [ -17, -16, -15, -13, -12, -11, -10, -9, -7, -6, -5, -4, -3, -1, 0, 1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18 ] ] gap> quots := List(orbs,orb->Action(N,orb));; gap> List(quots,Size); [ 268, 332, 366 ] </pre></td></tr></table> <p>Balls of given radius around an element of an rcwa monoid can be computed by the operation <code class="code">Ball</code>. This operation can also be used for computing forward orbits or subsets of such under the action of an rcwa monoid:</p> <p><a id="X787848137DF1C245" name="X787848137DF1C245"></a></p> <h5>4.2-2 <span class="Heading"> Ball (for monoid, element and radius or monoid, point, radius and action) </span></h5> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> Ball</code>( <var class="Arg">M, f, r</var> )</td><td class="tdright">( method )</td></tr></table></div> <div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">> Ball</code>( <var class="Arg">M, p, r, action</var> )</td><td class="tdright">( method )</td></tr></table></div> <p><b>Returns: </b>The ball of radius <var class="Arg">r</var> around the element <var class="Arg">f</var> in the monoid <var class="Arg">M</var>, respectively the ball of radius <var class="Arg">r</var> around the point <var class="Arg">p</var> under the action <var class="Arg">action</var> of the monoid <var class="Arg">M</var>.</p> <p>All balls are understood with respect to <code class="code">GeneratorsOfMonoid(<var class="Arg">M</var>)</code>. As membership tests can be expensive, the first-mentioned method does not check whether <var class="Arg">f</var> is indeed an element of <var class="Arg">M</var>. The methods require that point- / element comparisons are cheap. They are not only applicable to rcwa monoids. If the option <var class="Arg">Spheres</var> is set, the ball is splitted up and returned as a list of spheres.</p> <table class="example"> <tr><td><pre> gap> List([0..12],k->Length(Ball(N,One(N),k))); [ 1, 4, 11, 26, 53, 99, 163, 228, 285, 329, 354, 364, 366 ] gap> Ball(N,[0..3],2,OnTuples); [ [ -3, 3, 3, 3 ], [ -1, -3, 0, 2 ], [ -1, -1, -1, -1 ], [ -1, -1, 1, -1 ], [ -1, 1, 1, 1 ], [ -1, 3, 0, -4 ], [ 0, -1, 2, -3 ], [ 0, 1, 2, 3 ], [ 1, -1, -1, -1 ], [ 1, 3, 0, 2 ], [ 3, -4, -1, 0 ] ] gap> l := 2*IdentityRcwaMappingOfZ; r := l+1; Rcwa mapping of Z: n -> 2n Rcwa mapping of Z: n -> 2n + 1 gap> Ball(Monoid(l,r),1,4,OnPoints:Spheres); [ [ 1 ], [ 2, 3 ], [ 4, 5, 6, 7 ], [ 8, 9, 10, 11, 12, 13, 14, 15 ], [ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] ] </pre></td></tr></table> <p> </p> <div class="chlinkprevnextbot"> <a href="chap0.html">Top of Book</a> <a href="chap3.html">Previous Chapter</a> <a href="chap5.html">Next Chapter</a> </div> <div class="chlinkbot"><span class="chlink1">Goto Chapter: </span><a href="chap0.html">Top</a> <a href="chap1.html">1</a> <a href="chap2.html">2</a> <a href="chap3.html">3</a> <a href="chap4.html">4</a> <a href="chap5.html">5</a> <a href="chap6.html">6</a> <a href="chap7.html">7</a> <a href="chapBib.html">Bib</a> <a href="chapInd.html">Ind</a> </div> <hr /> <p class="foot">generated by <a href="http://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p> </body> </html>