<h3>2 <span class="Heading">Unions of Residue Classes with Fixed Representatives</span></h3>
<p><strong class="pkg">ResClasses</strong> supports computations with unions of residue classes which are endowed with distinguished (<q>fixed</q>) representatives. These unions of residue classes can be viewed as multisets of ring elements. The residue classes forming such a union do not need to be disjoint or even only distinct.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ResidueClassWithFixedRepresentative</code>( <var class="Arg">R</var>, <var class="Arg">m</var>, <var class="Arg">r</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ ResidueClassWithFixedRepresentative</code>( <var class="Arg">m</var>, <var class="Arg">r</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the residue class <var class="Arg">r</var> mod <var class="Arg">m</var> of the ring <var class="Arg">R</var>, with the fixed representative <var class="Arg">r</var>.</p>
<p>If the argument <var class="Arg">R</var> is omitted, it defaults to <code class="code">Integers</code>. Residue classes with fixed representatives have the property <code class="code">IsResidueClassWithFixedRepresentative</code>. The fixed representative <var class="Arg">r</var> can be retrieved by the operation <code class="code">Residue</code>, and the modulus <var class="Arg">m</var> can be retrieved by the operation <code class="code">Modulus</code>.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UnionOfResidueClassesWithFixedReps</code>( <var class="Arg">R</var>, <var class="Arg">classes</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ UnionOfResidueClassesWithFixedReps</code>( <var class="Arg">classes</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: the union of the residue classes <var class="Arg">classes</var>[<span class="SimpleMath">i</span>][2] mod <var class="Arg">classes</var>[<span class="SimpleMath">i</span>][1] of the ring <var class="Arg">R</var>, with fixed representatives <var class="Arg">classes</var>[<span class="SimpleMath">i</span>][2].</p>
<p>The argument <var class="Arg">classes</var> must be a list of pairs of elements of the ring <var class="Arg">R</var>. Their first entries -- the moduli -- must be nonzero. If the argument <var class="Arg">R</var> is omitted, it defaults to <code class="code">Integers</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">UnionOfResidueClassesWithFixedReps(Integers,[[2,4],[3,9]]);</span>
[4/2] U [9/3]
</pre></div>
<p>There is a method for the operation <code class="code">Modulus</code> which returns the lcm of the moduli of the residue classes forming such a union. Further there is an operation <code class="code">Classes</code> for retrieving the list of classes which has been passed as an argument to <codeclass="code">UnionOfResidueClassesWithFixedReps</code>. The operation <code class="code">AsListOfClasses</code> does the same, except that the returned list contains residue classes instead of pairs <code class="code">[<var class="Arg">modulus</var>,<var class="Arg">residue</var>]</code>. There are methods for <code class="code">Print</code>, <code class="code">String</code> and <code class="code">Display</code> available for unions of residue classes with fixed representatives.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AllResidueClassesWithFixedRepsModulo</code>( <var class="Arg">R</var>, <var class="Arg">m</var> )</td><td class="tdright">( function )</td></tr></table></div>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ AllResidueClassesWithFixedRepsModulo</code>( <var class="Arg">m</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a sorted list of all residue classes (mod <var class="Arg">m</var>) of the ring <var class="Arg">R</var>, with fixed representatives.</p>
<p>If the argument <var class="Arg">R</var> is omitted it defaults to the default ring of <var class="Arg">m</var>, cf. the documentation of <code class="code">DefaultRing</code> in the <strong class="pkg">GAP</strong> reference manual. The representatives are the same as those chosen by the operation <code class="code">mod</code>. See also <code class="func">AllResidueClassesModulo</code> (<a href="chap1.html#X8326D6F285081E0F"><span class="RefLink">1.1-3</span></a>).</p>
<h4>2.2 <span class="Heading">
Methods for unions of residue classes with fixed representatives
</span></h4>
<p>Throughout this chapter, the argument <var class="Arg">R</var> denotes the underlying ring, and the arguments <var class="Arg">U</var>, <var class="Arg">U1</var> and <var class="Arg">U2</var> denote unions of residue classes of <var class="Arg">R</var> with fixed representatives.</p>
<p>Unions of residue classes with fixed representatives are multisets. Elements and residue classes can be contained with multiplicities:</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Multiplicity</code>( <var class="Arg">x</var>, <var class="Arg">U</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">‣ Multiplicity</code>( <var class="Arg">cl</var>, <var class="Arg">U</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: the multiplicity of <var class="Arg">x</var> in <var class="Arg">U</var> regarded as a multiset of ring elements, resp. the multiplicity of the residue class <var class="Arg">cl</var> in <var class="Arg">U</var> regarded as a multiset of residue classes.</p>
<p>Let <code class="code">U</code> be a union of residue classes with fixed representatives. The multiset <code class="code">U</code> can have an attribute <code class="code">Density</code> which denotes its <em>natural density</em> as a multiset, i.e. elements with multiplicity <span class="SimpleMath">k</span> count <span class="SimpleMath">k</span>-fold. The multiset <code class="code">U</code> has the property <code class="code">IsOverlappingFree</code> if it consists of pairwise disjoint residue classes. The set-theoretic union of the residue classes forming <code class="code">U</code> can be determined by the operation <code class="code">AsOrdinaryUnionOfResidueClasses</code>. The object returned by this operation is an <q>ordinary</q> residue class union as described in Chapter <a href="chap1.html#X815A3DDE7C0BC44A"><span class="RefLink">1</span></a>.</p>
<p>In the sequel we abbreviate the term <q>the multiset of ring elements endowed with the structure of a union of residue classes with fixed representatives</q> by <q>the multiset</q>.</p>
<p>There are methods for <code class="code">+</code> and <code class="code">-</code> available for computing the multiset of sums <span class="SimpleMath">u + x</span>, <span class="SimpleMath">u ∈ U</span>, the multiset of differences <span class="SimpleMath">u - x</span> resp. <span class="SimpleMath">x - u</span>, <span class="SimpleMath">u ∈ U</span> and the multiset of the additive inverses of the elements of <span class="SimpleMath">U</span>. Further there are methods for <code class="code">*</code> and <code class="code">/</code> available for computing the multiset of products <span class="SimpleMath">x ⋅ u</span>, <span class="SimpleMath">u ∈ U</span> and the multiset of quotients <span class="SimpleMath">u/x</span>, <span class="SimpleMath">u ∈ U</span>. The division method requires all elements of <code class="code">U</code> to be divisible by <span class="SimpleMath">x</span>. If the underlying ring is the ring of integers, scalar multiplication and division leave <span class="SimpleMath">δ</span> invariant (<span class="SimpleMath">→</span> <code class="func">Delta</code> (<a href="chap2.html#X78DCAB2C7C4E37E8"><span class="RefLink">2.3-1</span></a>)).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">U := UnionOfResidueClassesWithFixedReps(Integers,[[2,0],[3,0]]);</span>
[0/2] U [0/3]
<span class="GAPprompt">gap></span> <span class="GAPinput">U + 7;</span>
[7/2] U [7/3]
<span class="GAPprompt">gap></span> <span class="GAPinput">U - 7; 7 - U; -U;</span>
[-7/2] U [-7/3]
[7/-3] U [7/-2]
[0/-3] U [0/-2]
<span class="GAPprompt">gap></span> <span class="GAPinput">V := 2 * U;</span>
[0/4] U [0/6]
<span class="GAPprompt">gap></span> <span class="GAPinput">V/2;</span>
[0/2] U [0/3]
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Union</code>( <var class="Arg">U1</var>, <var class="Arg">U2</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: the union of <var class="Arg">U1</var> and <var class="Arg">U2</var>.</p>
<p>The multiplicity of any ring element or residue class in the union is the sum of its multiplicities in the arguments. It holds that <code class="code">Delta(Union(<var class="Arg">U1</var>,<varclass="Arg">U2</var>)) = Delta(<var class="Arg">U1</var>) + Delta(<var class="Arg">U2</var>)</code>. (<span class="SimpleMath">→</span> <code class="func">Delta</code> (<a href="chap2.html#X78DCAB2C7C4E37E8"><span class="RefLink">2.3-1</span></a>)).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">U := UnionOfResidueClassesWithFixedReps(Integers,[[2,0],[3,0]]);</span>
[0/2] U [0/3]
<span class="GAPprompt">gap></span> <span class="GAPinput">Union(U,U); </span>
[0/2] U [0/2] U [0/3] U [0/3]
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Difference</code>( <var class="Arg">U1</var>, <var class="Arg">U2</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: the difference of <var class="Arg">U1</var> and <var class="Arg">U2</var>.</p>
<p>The multiplicity of any residue class in the difference is its multiplicity in <var class="Arg">U1</var> minus its multiplicity in <var class="Arg">U2</var>, if this value is nonnegative. The difference of the empty residue class union with fixed representatives and some residue class <spanclass="SimpleMath">[r/m]</span> is set equal to <span class="SimpleMath">[(m-r)/m]</span>. It holds that <code class="code">Delta(Difference(<var class="Arg">U1</var>,<var class="Arg">U2</var>)) = Delta(<var class="Arg">U1</var>) - Delta(<var class="Arg">U2</var>)</code>. (<span class="SimpleMath">→</span> <code class="func">Delta</code> (<a href="chap2.html#X78DCAB2C7C4E37E8"><span class="RefLink">2.3-1</span></a>)).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">U := UnionOfResidueClassesWithFixedReps(Integers,[[2,0],[3,0]]);</span>
[0/2] U [0/3]
<span class="GAPprompt">gap></span> <span class="GAPinput">V := UnionOfResidueClassesWithFixedReps(Integers,[[3,0],[5,2]]);</span>
[0/3] U [2/5]
<span class="GAPprompt">gap></span> <span class="GAPinput">Difference(U,V);</span>
[0/2] U [3/5]
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Delta</code>( <var class="Arg">U</var> )</td><td class="tdright">( attribute )</td></tr></table></div>
<p>Returns: the value of the invariant <span class="SimpleMath">δ</span> of the residue class union <var class="Arg">U</var>.</p>
<p>For a residue class <span class="SimpleMath">[r/m]</span> with fixed representative we set <span class="SimpleMath">δ([r/m]) := r/m - 1/2</span>, and extend this definition additively to unions of such residue classes. If no representatives are fixed, this definition is still unique (mod 1). There is a related invariant <span class="SimpleMath">ρ</span> which is defined by <span class="SimpleMath">e^δ(U) π i</span>. The corresponding attribute is called <code class="code">Rho</code>.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">U := UnionOfResidueClassesWithFixedReps(Integers,[[2,3],[3,4]]);</span>
[3/2] U [4/3]
<span class="GAPprompt">gap></span> <span class="GAPinput">Delta(U) = (3/2-1/2) + (4/3-1/2);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">V := RepresentativeStabilizingRefinement(U,3);</span>
[3/6] U [5/6] U [7/6] U [4/9] U [7/9] U [10/9]
<span class="GAPprompt">gap></span> <span class="GAPinput">Delta(V) = Delta(U);</span>
true
<span class="GAPprompt">gap></span> <span class="GAPinput">Rho(V);</span>
E(12)^11
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ RepresentativeStabilizingRefinement</code>( <var class="Arg">U</var>, <var class="Arg">k</var> )</td><td class="tdright">( method )</td></tr></table></div>
<p>Returns: the representative stabilizing refinement of <var class="Arg">U</var> into <var class="Arg">k</var> parts.</p>
<p>The <em>representative stabilizing refinement</em> of a residue class <span class="SimpleMath">[r/m]</span> of ℤ into <span class="SimpleMath">k</span> parts is defined by <span class="SimpleMath">[r/km] ∪ [(r+m)/km] ∪ dots ∪ [(r+(k-1)m)/km]</span>. This definition is extended in the obvious way to unions of residue classes.</p>
<p>If the argument <var class="Arg">k</var> is zero, the method performs a simplification of <var class="Arg">U</var> by joining appropriate residue classes, if this is possible.</p>
<p>In any case the value of <code class="code">Delta(<var class="Arg">U</var>)</code> is invariant under this operation (<span class="SimpleMath">→</span> <code class="func">Delta</code> (<a href="chap2.html#X78DCAB2C7C4E37E8"><span class="RefLink">2.3-1</span></a>)).</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">U := UnionOfResidueClassesWithFixedReps(Integers,[[2,0],[3,0]]);</span>
[0/2] U [0/3]
<span class="GAPprompt">gap></span> <span class="GAPinput">RepresentativeStabilizingRefinement(U,4); </span>
[0/8] U [2/8] U [4/8] U [6/8] U [0/12] U [3/12] U [6/12] U [9/12]
<span class="GAPprompt">gap></span> <span class="GAPinput">RepresentativeStabilizingRefinement(last,0);</span>
[0/2] U [0/3]
<h4>2.4 <span class="Heading">
The categories of unions of residue classes with fixed rep's
</span></h4>
<p>The names of the categories of unions of residue classes with fixed representatives are <code class="code">IsUnionOfResidueClassesOf[Z|Z_pi|ZorZ_pi|GFqx]WithFixedRepresentatives</code>.</p>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.