Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

610986 views
1
<!-- #################################################################### -->
2
<!-- ## ## -->
3
<!-- ## rcwamono.xml RCWA documentation Stefan Kohl ## -->
4
<!-- ## ## -->
5
<!-- #################################################################### -->
6
7
<Chapter Label="ch:RcwaMonoids">
8
<Heading>Residue-Class-Wise Affine Monoids</Heading>
9
10
<Ignore Remark="set screen width to 75, for the example tester">
11
<Example>
12
<![CDATA[
13
gap> SizeScreen([75,24]);;
14
]]>
15
</Example>
16
</Ignore>
17
18
In this short chapter, we describe how to compute with residue-class-wise
19
affine monoids.
20
21
<Index Key="rcwa monoid" Subkey="definition">rcwa monoid</Index>
22
23
<E>Residue-class-wise affine</E> monoids, or <E>rcwa</E> monoids for short,
24
are monoids whose elements are residue-class-wise affine mappings.
25
26
<!-- #################################################################### -->
27
28
<Section Label="sec:ContructingRcwaMonoids">
29
<Heading>Constructing residue-class-wise affine monoids</Heading>
30
31
<Index Key="Monoid"><C>Monoid</C></Index>
32
<Index Key="MonoidByGenerators"><C>MonoidByGenerators</C></Index>
33
34
As any other monoids in &GAP;, residue-class-wise affine monoids can be
35
constructed by <C>Monoid</C> or <C>MonoidByGenerators</C>.
36
37
<Example>
38
<![CDATA[
39
gap> M := Monoid(RcwaMapping([[ 0,1,1],[1,1,1]]),
40
> RcwaMapping([[-1,3,1],[0,2,1]]));
41
<rcwa monoid over Z with 2 generators>
42
gap> Size(M);
43
11
44
gap> Display(MultiplicationTable(M));
45
[ [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 ],
46
[ 2, 8, 5, 11, 8, 3, 10, 5, 2, 8, 5 ],
47
[ 3, 10, 11, 5, 5, 5, 8, 8, 8, 2, 3 ],
48
[ 4, 9, 6, 8, 8, 8, 5, 5, 5, 7, 4 ],
49
[ 5, 8, 5, 8, 8, 8, 5, 5, 5, 8, 5 ],
50
[ 6, 7, 4, 8, 8, 8, 5, 5, 5, 9, 6 ],
51
[ 7, 5, 8, 6, 5, 4, 9, 8, 7, 5, 8 ],
52
[ 8, 5, 8, 5, 5, 5, 8, 8, 8, 5, 8 ],
53
[ 9, 5, 8, 4, 5, 6, 7, 8, 9, 5, 8 ],
54
[ 10, 8, 5, 3, 8, 11, 2, 5, 10, 8, 5 ],
55
[ 11, 2, 3, 5, 5, 5, 8, 8, 8, 10, 11 ] ]
56
]]>
57
</Example>
58
59
<Index Key="View" Subkey="for an rcwa monoid"><C>View</C></Index>
60
<Index Key="Display" Subkey="for an rcwa monoid"><C>Display</C></Index>
61
<Index Key="Print" Subkey="for an rcwa monoid"><C>Print</C></Index>
62
<Index Key="String" Subkey="for an rcwa monoid"><C>String</C></Index>
63
64
There are methods for the operations <C>View</C>, <C>Display</C>,
65
<C>Print</C> and <C>String</C> which are applicable to rcwa monoids.
66
All rcwa monoids over a ring <M>R</M> are submonoids of Rcwa(<M>R</M>).
67
The monoid Rcwa(<M>R</M>) itself is not finitely generated, thus cannot
68
be constructed as described above. It is handled as a special case:
69
70
<ManSection>
71
<Func Name="Rcwa" Arg="R"
72
Label="the monoid formed by all rcwa mappings of a ring"/>
73
<Returns>
74
the monoid Rcwa(<A>R</A>) of all residue-class-wise affine
75
mappings of the ring&nbsp;<A>R</A>.
76
</Returns>
77
<Description>
78
<Example>
79
<![CDATA[
80
gap> RcwaZ := Rcwa(Integers);
81
Rcwa(Z)
82
gap> IsSubset(RcwaZ,M);
83
true
84
]]>
85
</Example>
86
</Description>
87
</ManSection>
88
89
<Index Key="Restriction"
90
Subkey="for an rcwa monoid, by an injective rcwa mapping">
91
<C>Restriction</C>
92
</Index>
93
<Index Key="Induction"
94
Subkey="for an rcwa monoid, by an injective rcwa mapping">
95
<C>Induction</C>
96
</Index>
97
98
In our methods to construct rcwa groups, two kinds of mappings played
99
a crucial role, namely the restriction monomorphisms (cf.&nbsp;<Ref
100
Oper="Restriction" Label="of an rcwa group, by an injective rcwa mapping"/>)
101
and the induction epimorphisms (cf.&nbsp;<Ref Oper="Induction"
102
Label="of an rcwa group, by an injective rcwa mapping"/>).
103
The restriction monomorphisms extend in a natural way to the monoids
104
Rcwa(<M>R</M>), and the induction epimorphisms have corresponding
105
generalizations, also. Therefore the operations <C>Restriction</C>
106
and <C>Induction</C> can be applied to rcwa monoids as well:
107
108
<Example>
109
<![CDATA[
110
gap> M2 := Restriction(M,2*One(Rcwa(Integers)));
111
<rcwa monoid over Z with 2 generators, of size 11>
112
gap> Support(M2);
113
0(2)
114
gap> Action(M2,ResidueClass(1,2));
115
Trivial rcwa group over Z
116
gap> Induction(M2,2*One(Rcwa(Integers))) = M;
117
true
118
]]>
119
</Example>
120
121
</Section>
122
123
<!-- #################################################################### -->
124
125
<Section Label="sec:ComputingWithRcwaMonoids">
126
<Heading>Computing with residue-class-wise affine monoids</Heading>
127
128
<Index Key="Size" Subkey="for an rcwa monoid"><C>Size</C></Index>
129
<Index Key="rcwa monoids" Subkey="membership test">
130
<C>rcwa monoids</C>
131
</Index>
132
<Index Key="IsSubset" Subkey="for two rcwa monoids"><C>IsSubset</C></Index>
133
134
There is a method for <C>Size</C> which computes the order of an rcwa monoid.
135
Further there is a method for <C>in</C> which checks whether a given
136
rcwa mapping lies in a given rcwa monoid (membership test), and there
137
is a method for <C>IsSubset</C> which checks for a submonoid relation. <P/>
138
139
<Index Key="Support" Subkey="of an rcwa monoid"><C>Support</C></Index>
140
<Index Key="Modulus" Subkey="of an rcwa monoid"><C>Modulus</C></Index>
141
<Index Key="IsTame" Subkey="for an rcwa monoid"><C>IsTame</C></Index>
142
<Index Key="PrimeSet" Subkey="of an rcwa monoid"><C>PrimeSet</C></Index>
143
<Index Key="IsIntegral" Subkey="for an rcwa monoid"><C>IsIntegral</C></Index>
144
<Index Key="IsClassWiseOrderPreserving" Subkey="for an rcwa monoid">
145
<C>IsClassWiseOrderPreserving</C>
146
</Index>
147
<Index Key="IsSignPreserving" Subkey="for an rcwa monoid">
148
<C>IsSignPreserving</C>
149
</Index>
150
151
There are also methods for <C>Support</C>, <C>Modulus</C>, <C>IsTame</C>,
152
<C>PrimeSet</C>, <C>IsIntegral</C>, <C>IsClassWiseOrderPreserving</C> and
153
<C>IsSignPreserving</C> available for rcwa monoids. <P/>
154
155
<Index Key="rcwa monoid" Subkey="modulus">rcwa monoid</Index>
156
<Index Key="rcwa monoid" Subkey="tame">rcwa monoid</Index>
157
<Index Key="rcwa monoid" Subkey="wild">rcwa monoid</Index>
158
<Index Key="rcwa monoid" Subkey="prime set">rcwa monoid</Index>
159
<Index Key="rcwa monoid" Subkey="integral">rcwa monoid</Index>
160
<Index Key="rcwa monoid" Subkey="class-wise order-preserving">
161
rcwa monoid
162
</Index>
163
<Index Key="rcwa monoid" Subkey="sign-preserving">rcwa monoid</Index>
164
165
The <E>support</E> of an rcwa monoid is the union of the supports of
166
its elements. The <E>modulus</E> of an rcwa monoid is the lcm of the
167
moduli of its elements in case such an lcm exists and 0 otherwise.
168
An rcwa monoid is called <E>tame</E> if its modulus is nonzero, and
169
<E>wild</E> otherwise. The <E>prime set</E> of an rcwa monoid is the
170
union of the prime sets of its elements. An rcwa monoid is called
171
<E>integral</E>, <E>class-wise order-preserving</E> or <E>sign-preserving</E>
172
if all of its elements are so.
173
174
<Example>
175
<![CDATA[
176
gap> f1 := RcwaMapping([[-1, 1, 1],[ 0,-1, 1]]);;
177
gap> f2 := RcwaMapping([[ 1,-1, 1],[-1,-2, 1],[-1, 2, 1]]);;
178
gap> f3 := RcwaMapping([[ 1, 0, 1],[-1, 0, 1]]);;
179
gap> N := Monoid(f1,f2,f3);;
180
gap> Size(N);
181
366
182
gap> List([Monoid(f1,f2),Monoid(f1,f3),Monoid(f2,f3)],Size);
183
[ 96, 6, 66 ]
184
gap> f1*f2*f3 in N;
185
true
186
gap> IsSubset(N,M);
187
false
188
gap> IsSubset(N,Monoid(f1*f2,f3*f2));
189
true
190
gap> Support(N);
191
Integers
192
gap> Modulus(N);
193
6
194
gap> IsTame(N) and IsIntegral(N);
195
true
196
gap> IsClassWiseOrderPreserving(N) or IsSignPreserving(N);
197
false
198
gap> Collected(List(AsList(N),Image)); # The images of the elements of N.
199
[ [ Integers, 2 ], [ 1(2), 2 ], [ Z \ 1(3), 32 ], [ 0(6), 44 ],
200
[ 0(6) U 1(6), 4 ], [ Z \ 4(6) U 5(6), 32 ], [ 0(6) U 2(6), 4 ],
201
[ 0(6) U 5(6), 4 ], [ 1(6), 44 ], [ 1(6) U [ -1 ], 2 ],
202
[ 1(6) U 3(6), 4 ], [ 1(6) U 5(6), 40 ], [ 2(6), 44 ],
203
[ 2(6) U 3(6), 4 ], [ 3(6), 44 ], [ 3(6) U 5(6), 4 ], [ 5(6), 44 ],
204
[ 5(6) U [ 1 ], 2 ], [ [ -5 ], 1 ], [ [ -4 ], 1 ], [ [ -3 ], 1 ],
205
[ [ -1 ], 1 ], [ [ 0 ], 1 ], [ [ 1 ], 1 ], [ [ 2 ], 1 ], [ [ 3 ], 1 ],
206
[ [ 5 ], 1 ], [ [ 6 ], 1 ] ]
207
]]>
208
</Example>
209
210
Finite forward orbits under the action of an rcwa monoid can be found
211
by the operation <C>ShortOrbits</C>:
212
213
<ManSection>
214
<Meth Name="ShortOrbits" Arg="M, S, maxlng"
215
Label="for rcwa monoid, set of points and bound on length"/>
216
<Returns>
217
a list of finite forward orbits of the rcwa monoid&nbsp;<A>M</A>
218
of length at most&nbsp;<A>maxlng</A> which start at points in
219
the set&nbsp;<A>S</A>.
220
</Returns>
221
<Description>
222
<Example>
223
<![CDATA[
224
gap> ShortOrbits(M,[-5..5],20);
225
[ [ -5, -4, 1, 2, 7, 8 ], [ -3, -2, 1, 2, 5, 6 ], [ -1, 0, 1, 2, 3, 4 ] ]
226
gap> Print(Action(M,last[1]),"\n");
227
Monoid( [ Transformation( [ 2, 3, 4, 3, 6, 3 ] ),
228
Transformation( [ 4, 5, 4, 3, 4, 1 ] ) ] )
229
gap> orbs := ShortOrbits(N,[0..10],100);
230
[ [ -5, -4, -3, -1, 0, 1, 2, 3, 5, 6 ],
231
[ -11, -10, -9, -7, -6, -5, -4, -3, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
232
11, 12 ],
233
[ -17, -16, -15, -13, -12, -11, -10, -9, -7, -6, -5, -4, -3, -1, 0, 1,
234
2, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18 ] ]
235
gap> quots := List(orbs,orb->Action(N,orb));;
236
gap> List(quots,Size);
237
[ 268, 332, 366 ]
238
]]>
239
</Example>
240
</Description>
241
</ManSection>
242
243
Balls of given radius around an element of an rcwa monoid can be computed
244
by the operation <C>Ball</C>. This operation can also be used for computing
245
forward orbits or subsets of such under the action of an rcwa monoid:
246
247
<ManSection>
248
<Heading>
249
Ball (for monoid, element and radius or monoid, point, radius and action)
250
</Heading>
251
<Meth Name ="Ball"
252
Arg="M, f, r" Label="for monoid, element and radius"/>
253
<Meth Name ="Ball"
254
Arg="M, p, r, action" Label="for monoid, point, radius and action"/>
255
<Returns>
256
the ball of radius&nbsp;<A>r</A> around the element&nbsp;<A>f</A> in
257
the monoid&nbsp;<A>M</A>, respectively
258
the ball of radius&nbsp;<A>r</A> around the point&nbsp;<A>p</A> under
259
the action&nbsp;<A>action</A> of the monoid&nbsp;<A>M</A>.
260
</Returns>
261
<Description>
262
All balls are understood with respect to <C>GeneratorsOfMonoid(<A>M</A>)</C>.
263
As membership tests can be expensive, the first-mentioned method does not
264
check whether <A>f</A> is indeed an element of&nbsp;<A>M</A>.
265
The methods require that point- / element comparisons are cheap.
266
They are not only applicable to rcwa monoids.
267
If the option <A>Spheres</A> is set, the ball is split up and
268
returned as a list of spheres.
269
<Example>
270
<![CDATA[
271
gap> List([0..12],k->Length(Ball(N,One(N),k)));
272
[ 1, 4, 11, 26, 53, 99, 163, 228, 285, 329, 354, 364, 366 ]
273
gap> Ball(N,[0..3],2,OnTuples);
274
[ [ -3, 3, 3, 3 ], [ -1, -3, 0, 2 ], [ -1, -1, -1, -1 ],
275
[ -1, -1, 1, -1 ], [ -1, 1, 1, 1 ], [ -1, 3, 0, -4 ], [ 0, -1, 2, -3 ],
276
[ 0, 1, 2, 3 ], [ 1, -1, -1, -1 ], [ 1, 3, 0, 2 ], [ 3, -4, -1, 0 ] ]
277
gap> l := 2*IdentityRcwaMappingOfZ; r := l+1;
278
Rcwa mapping of Z: n -> 2n
279
Rcwa mapping of Z: n -> 2n + 1
280
gap> Ball(Monoid(l,r),1,4,OnPoints:Spheres);
281
[ [ 1 ], [ 2, 3 ], [ 4, 5, 6, 7 ], [ 8, 9, 10, 11, 12, 13, 14, 15 ],
282
[ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 ] ]
283
]]>
284
</Example>
285
</Description>
286
</ManSection>
287
288
<Alt Only="HTML">&nbsp;</Alt>
289
290
</Section>
291
292
<!-- #################################################################### -->
293
294
</Chapter>
295
296
<!-- #################################################################### -->
297
298