-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcharacter.m
More file actions
284 lines (246 loc) · 10.7 KB
/
character.m
File metadata and controls
284 lines (246 loc) · 10.7 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
/* DIRICHLET CHARACTERS OVER GLOBAL FUNCTION FIELDS
Let R be the ring of integers of a global function field K of a smooth proper
geometrically irreducible curve over a finite field k. A Dirichlet character
over K of a non-zero modulus M in R is an element of its character group. In
other words, this is a group homomorphism from the unit group of R / M to the
complex field, whose image lies in the cyclotomic extension of K of modulus
equal to the Euler totient function Phi(M) of M.
This file defines Dirichlet characters of irreducible moduli over the global
function field k(t) of the projective line over a finite field k, with a unique
place at infinity 1 / t.
*/
declare type GrpDrchFFElt;
declare attributes GrpDrchFFElt: Parent, Image, Codomain, Order, Inverse,
ResidueImage, ResidueCodomain, ResidueCharacter, ResidueOrder,
IsTrivial, IsPrimitive, IsEven, IsOdd,
CharacterSum, EpsilonFactor, ResidueGaussSum, GaussSum,
Conductor, LDegree, RootNumber;
intrinsic DirichletCharacter(G :: GrpDrchFF : Image) -> GrpDrchFFElt
{ The Dirichlet character over k(t) in a group G of Dirichlet characters over
k(t) given by mapping its generator to an Image that is some root of unity in
its minimal cyclotomic field of order dividing the size of G. By default,
Image is set to be the generator of the codomain of G. }
X := New(GrpDrchFFElt);
X`Parent := G;
C := Codomain(G);
coercible, h := IsCoercible(C, Image);
X`Image := coercible select Minimise(h) else C.1;
require X`Image ^ #G eq 1:
"The image is not a root of unity of order dividing the size of G.";
return X;
end intrinsic;
intrinsic DirichletCharacter(M :: RngUPolElt[FldFin] :
Generator := MinimalGenerator(M), Image) -> GrpDrchFFElt
{ The Dirichlet character over k(t) of modulus an irreducible polynomial M of
k[t], given by mapping an element of k[t] that is a unit and a Generator when
reduced modulo M, to an Image that is some root of unity in its minimal
cyclotomic field of order dividing the size of G. By default, Generator is set
to be the minimal generator of the unit group of k[t] / M, and Image is set to
be the generator of the codomain of its character group. }
require IsIrreducible(M): "The modulus M is not a prime element of k[t].";
require IsCoercible(Parent(M), Generator):
"The generator is not an element of k[t].";
require IsGenerator(M, Generator):
"The generator is not a generator of the unit group of k[t] / M.";
return DirichletCharacter(DirichletGroup(M : Generator := Generator) :
Image := Image);
end intrinsic;
intrinsic DirichletCharacter(M :: FldFunRatUElt[FldFin] :
Generator := MinimalGenerator(M), Image) -> GrpDrchFFElt
{ " }
require Denominator(M) eq 1: "The modulus M is not an element of k[t].";
return DirichletCharacter(Numerator(M) : Generator := Generator,
Image := Image);
end intrinsic;
intrinsic Parent(X :: GrpDrchFFElt) -> GrpDrchFF
{ The character group of a Dirichlet character X over k(t). }
return X`Parent;
end intrinsic;
intrinsic Image(X :: GrpDrchFFElt) -> FldCycElt
{ The image of the generator of the unit group of k[t] / M that defines a
Dirichlet character over k(t) of a non-zero modulus M in k[t]. }
return X`Image;
end intrinsic;
intrinsic Modulus(X :: GrpDrchFFElt) -> RngUPolElt[FldFin]
{ The modulus of a Dirichlet character X over k(t). }
return Modulus(Parent(X));
end intrinsic;
intrinsic Generator(X :: GrpDrchFFElt) -> RngUPolElt[FldFin]
{ The generator of the unit group of k[t] / M that defines a Dirichlet character
over k(t) of a non-zero modulus M in k[t]. }
return Generator(Parent(X));
end intrinsic;
intrinsic ChangeGenerator(X :: GrpDrchFFElt, g :: Any) -> GrpDrchFFElt
{ The same Dirichlet character X over k(t) of a non-zero modulus M in k[t] with
generator changed to a generator g of the unit group of k[t] / M. }
return DirichletCharacter(Modulus(X) : Generator := g, Image := X(g));
end intrinsic;
intrinsic ChangeGenerator(~X :: GrpDrchFFElt, g :: Any)
{ " }
X := ChangeGenerator(X, g);
end intrinsic;
intrinsic BaseRing(X :: GrpDrchFFElt) -> RngUPol[FldFin]
{ The base ring k[t] for a Dirichlet character X over k(t). }
return BaseRing(Parent(X));
end intrinsic;
intrinsic Characteristic(X :: GrpDrchFFElt) -> RngIntElt
{ The characteristic char(k) for a Dirichlet character X over k(t). }
return Characteristic(Parent(X));
end intrinsic;
intrinsic Domain(X :: GrpDrchFFElt) -> FldFunRat[FldFin]
{ The domain k(t) of a Dirichlet character X over k(t). }
return Domain(Parent(X));
end intrinsic;
intrinsic ResidueDegree(X :: GrpDrchFFElt) -> RngIntElt
{ The residue degree for a Dirichlet character X over k(t) of a non-zero modulus
M in k[t]. This is equal to the degree deg M of M. }
return ResidueDegree(Parent(X));
end intrinsic;
intrinsic ResidueField(X :: GrpDrchFFElt) -> FldFin
{ The residue field k for a Dirichlet character X over k(t). }
return ResidueField(Parent(X));
end intrinsic;
intrinsic ResidueGenerator(X :: GrpDrchFFElt) -> FldFinElt
{ The generator of k for a Dirichlet character X over k(t). }
return ResidueGenerator(Parent(X));
end intrinsic;
intrinsic ResidueSize(X :: GrpDrchFFElt) -> RngIntElt
{ The residue field size #k for a Dirichlet character X over k(t). }
return ResidueSize(Parent(X));
end intrinsic;
intrinsic SqrtResidueSize(X :: GrpDrchFFElt) -> FldCycElt
{ The square root of #k for a Dirichlet character X over k(t) as an element of
its minimal cyclotomic field. }
return SqrtResidueSize(Parent(X));
end intrinsic;
intrinsic Print(X :: GrpDrchFFElt)
{ The printing of a Dirichlet character X over k(t). }
K<t> := Domain(X);
printf
"Dirichlet character over F_%o(%o) of modulus %o given by mapping %o to %o",
ResidueSize(X), t, Modulus(X), K ! Generator(X), Image(X);
end intrinsic;
intrinsic Codomain(X :: GrpDrchFFElt) -> FldCyc
{ The minimal codomain of a Dirichlet character X over k(t). This is a subfield
of the codomain of its character group. }
if not assigned X`Codomain then
X`Codomain := Parent(Image(X));
end if;
return X`Codomain;
end intrinsic;
intrinsic Order(X :: GrpDrchFFElt) -> RngIntElt
{ The order of a Dirichlet character X over k(t) in its character group. }
if not assigned X`Order then
X`Order := Conductor(Codomain(X));
end if;
return X`Order;
end intrinsic;
intrinsic '@'(x :: Any, X :: GrpDrchFFElt) -> FldCycElt
{ The evaluation of a Dirichlet character X over k(t) on an element x of k(t),
which must either be an element of k[t] or 1 / t. }
K<t> := Domain(X);
require IsCoercible(K, x): "The element x is not an element of k(t).";
x := K ! x;
require Denominator(x) eq 1 or x eq 1 / t:
"The element x is neither an element of k[t] nor 1 / t.";
if x eq 1 / t then
return IsEven(X) select 1 else 0;
end if;
M := Modulus(X);
return BaseRing(X) ! x mod M eq 0 select 0 else
Image(X) ^ Log(M, Generator(X), x);
end intrinsic;
intrinsic Inverse(X :: GrpDrchFFElt) -> GrpDrchFFElt
{ The inverse of a Dirichlet character X over k(t). This is also equal to the
complex conjugate of X. }
if not assigned X`Inverse then
X`Inverse := DirichletCharacter(Parent(X) : Image := 1 / Image(X));
end if;
return X`Inverse;
end intrinsic;
intrinsic 'eq'(X :: GrpDrchFFElt, Y :: GrpDrchFFElt) -> BoolElt
{ The equality of two Dirichlet characters X and Y over k(t). }
coercible, Y := IsCoercible(Parent(X), Y);
return coercible and Image(X) eq Image(Y);
end intrinsic;
intrinsic '^'(X :: GrpDrchFFElt, n :: RngIntElt) -> GrpDrchFFElt
{ The exponentiation of a Dirichlet character X over k(t) by an integer n. }
return DirichletCharacter(Parent(X) : Image := Image(X) ^ n);
end intrinsic;
intrinsic '*'(X :: GrpDrchFFElt, Y :: GrpDrchFFElt) -> GrpDrchFFElt
{ The multiplication of two Dirichlet characters X and Y over k(t). Note that
this has not been implemented when X and Y have different moduli in k[t]. }
coercible, Y := IsCoercible(Parent(X), Y);
require coercible: "This has not been implemented for different moduli.";
return DirichletCharacter(Parent(X) : Image := Image(X) * Image(Y));
end intrinsic;
intrinsic '/'(X :: GrpDrchFFElt, Y :: GrpDrchFFElt) -> GrpDrchFFElt
{ The division of two Dirichlet characters X and Y over k(t). Note that this has
not been implemented when X and Y have different moduli in k[t]. }
return X * Inverse(Y);
end intrinsic;
intrinsic ResidueImage(X :: GrpDrchFFElt) -> FldCycElt
{ The image of the generator of k that defines the character over k associated
to a Dirichlet character X over k(t). Note that this image is coerced to its
minimal cyclotomic field. }
if not assigned X`ResidueImage then
X`ResidueImage := X(ResidueGenerator(X));
end if;
return X`ResidueImage;
end intrinsic;
intrinsic ResidueCodomain(X :: GrpDrchFFElt) -> FldCyc
{ The minimal codomain of the character over k associated to a Dirichlet
character X over k(t). This is a subfield of the codomain of X. }
if not assigned X`ResidueCodomain then
X`ResidueCodomain := Parent(ResidueImage(X));
end if;
return X`ResidueCodomain;
end intrinsic;
intrinsic ResidueCharacter(X :: GrpDrchFFElt) -> GrpDrchFFElt
{ The character over k associated to a Dirichlet character X over k(t). This is
a Dirichlet character over k(t) of modulus t - 1, whose image of generator is
coerced to its minimal cyclotomic field. }
if not assigned X`ResidueCharacter then
X`ResidueCharacter := DirichletCharacter(Domain(X).1 - 1 :
Generator := ResidueGenerator(X), Image := ResidueImage(X));
end if;
return X`ResidueCharacter;
end intrinsic;
intrinsic ResidueOrder(X :: GrpDrchFFElt) -> RngIntElt
{ The order of the character over k associated to a Dirichlet character X over
k(t) in its character group. }
if not assigned X`ResidueOrder then
X`ResidueOrder := Order(ResidueCharacter(X));
end if;
return X`ResidueOrder;
end intrinsic;
intrinsic IsTrivial(X :: GrpDrchFFElt) -> BoolElt
{ The triviality of a Dirichlet character X over k(t). }
if not assigned X`IsTrivial then
X`IsTrivial := Image(X) eq 1;
end if;
return X`IsTrivial;
end intrinsic;
intrinsic IsPrimitive(X :: GrpDrchFFElt) -> BoolElt
{ The primitivity of a Dirichlet character X over k(t). }
if not assigned X`IsPrimitive then
X`IsPrimitive := not IsTrivial(X);
end if;
return X`IsPrimitive;
end intrinsic;
intrinsic IsEven(X :: GrpDrchFFElt) -> BoolElt
{ The parity of a Dirichlet character X over k(t). This is true if X is even,
namely that X is trivial on all elements of k. }
if not assigned X`IsEven then
X`IsEven := ResidueImage(X) eq 1;
end if;
return X`IsEven;
end intrinsic;
intrinsic IsOdd(X :: GrpDrchFFElt) -> BoolElt
{ The parity of a Dirichlet character X over k(t). This is true if X is odd,
namely that X is not trivial on some element of k. }
if not assigned X`IsOdd then
X`IsOdd := not IsEven(X);
end if;
return X`IsOdd;
end intrinsic;