CoCalc Public Fileswww / tables / magma_src / ModFrm / subspaces.mOpen with one click!
Author: William A. Stein
1
freeze;
2
3
/****-*-magma-* EXPORT DATE: 2004-03-08 ************************************
4
5
MODFORM: Modular Forms in MAGMA
6
7
William A. Stein
8
9
FILE: subspaces.m
10
11
$Header: /home/was/magma/packages/ModFrm/code/RCS/subspaces.m,v 1.6 2002/06/28 04:31:34 was Exp $
12
13
$Log: subspaces.m,v $
14
Revision 1.6 2002/06/28 04:31:34 was
15
Fixed caching of new subspaces. It was totally wrong before.
16
17
Revision 1.5 2002/05/06 05:32:52 was
18
Correct access via SpaceTypeParam.
19
20
Revision 1.4 2002/04/18 23:26:28 was
21
*** empty log message ***
22
23
Revision 1.3 2002/04/13 07:27:05 was
24
Added stuff for p-new subspaces.
25
26
Revision 1.2 2001/05/30 18:57:30 was
27
Created.
28
29
Revision 1.1 2001/05/16 03:52:12 was
30
Initial revision
31
32
33
***************************************************************************/
34
35
36
import "creation.m" : CopyOfDefiningModularFormsObject;
37
38
import "predicates.m": AssociatedSpaceOverZ,
39
SpaceType,
40
SpaceTypeParam;
41
42
43
function MakeSubspace(M, type, param)
44
assert Type(M) eq ModFrm;
45
assert Type(type) eq MonStgElt;
46
assert IsAmbientSpace(M);
47
assert type in {"zero", "ambient", "cusp", "eis", "new", "cusp_new", "eis_new"};
48
49
if type eq "ambient" then
50
return M;
51
end if;
52
53
if type eq "zero" then
54
return ZeroSubspace(M);
55
end if;
56
57
function MakeSpaceWithType()
58
S := CopyOfDefiningModularFormsObject(M);
59
delete S`dimension;
60
S`ambient_space := M;
61
S`type := type;
62
S`type_param := param;
63
if Type(BaseRing(S)) ne RngInt then
64
MZ := AssociatedSpaceOverZ(M);
65
case type:
66
when "cusp":
67
A := CuspidalSubspace(MZ);
68
when "eis":
69
A := EisensteinSubspace(MZ);
70
when "new":
71
A := NewSubspace(MZ,param);
72
when "cusp_new":
73
A := NewSubspace(CuspidalSubspace(MZ),param);
74
when "eis_new":
75
A := NewSubspace(EisensteinSubspace(MZ),param);
76
else
77
error "Bug in subspaces.m";
78
end case;
79
S`associated_space_over_z := A;
80
end if;
81
return S;
82
end function;
83
84
85
case type:
86
when "cusp":
87
if not assigned M`cusp then
88
M`cusp := MakeSpaceWithType();
89
end if;
90
return M`cusp;
91
when "eis":
92
if not assigned M`eis then
93
M`eis := MakeSpaceWithType();
94
end if;
95
return M`eis;
96
97
when "new":
98
if not assigned M`new then
99
M`new := [* *];
100
end if;
101
if exists(i) { i : i in [1..#M`new] | M`new[i][1] eq param} then
102
return M`new[i][2];
103
end if;
104
Append(~M`new,<param,MakeSpaceWithType()>);
105
return M`new[#M`new][2];
106
107
when "cusp_new":
108
if not assigned M`cusp_new then
109
M`cusp_new := [* *];
110
end if;
111
if exists(i) { i : i in [1..#M`cusp_new] | M`cusp_new[i][1] eq param} then
112
return M`cusp_new[i][2];
113
end if;
114
Append(~M`cusp_new,<param,MakeSpaceWithType()>);
115
return M`cusp_new[#M`cusp_new][2];
116
117
118
when "eis_new":
119
if not assigned M`eis_new then
120
M`eis_new := [* *];
121
end if;
122
if exists(i) { i : i in [1..#M`eis_new] | M`eis_new[i][1] eq param} then
123
return M`eis_new[i][2];
124
end if;
125
Append(~M`eis_new,<param,MakeSpaceWithType()>);
126
return M`eis_new[#M`eis_new][2];
127
128
else:
129
assert false;
130
end case;
131
132
end function;
133
134
135
intrinsic CuspidalSubspace(M::ModFrm) -> ModFrm
136
{The cuspidal subspace of M.}
137
if not assigned M`cuspidal_subspace then
138
vprint ModularForms : "ModularForms: Computing cuspidal subspace.";
139
if assigned M`dimension and M`dimension eq 0 then
140
return M;
141
end if;
142
A := AmbientSpace(M);
143
case SpaceType(M):
144
when "full":
145
M`cuspidal_subspace := MakeSubspace(A, "cusp", 0);
146
when "cusp", "cusp_new", "cusp_newform":
147
return M;
148
when "eis", "eis_new", "eis_newform":
149
M`cuspidal_subspace := MakeSubspace(A, "zero", 0);
150
when "new":
151
M`cuspidal_subspace := MakeSubspace(A, "cusp_new", 0);
152
else:
153
error "Typo in CuspidalSubspace." ;
154
end case;
155
end if;
156
if assigned M`cuspidal_subspace then
157
return M`cuspidal_subspace;
158
end if;
159
error "CuspidalSubspace -- bug.";
160
end intrinsic;
161
162
163
intrinsic EisensteinSubspace(M::ModFrm) -> ModFrm
164
{The Eisenstein subspace of M.}
165
if not assigned M`eisenstein_subspace then
166
vprint ModularForms : "ModularForms: Computing eisenstein subspace.";
167
if assigned M`dimension and M`dimension eq 0 then
168
return M;
169
end if;
170
A := AmbientSpace(M);
171
case SpaceType(M):
172
when "full":
173
M`eisenstein_subspace := MakeSubspace(A, "eis", 0);
174
when "cusp", "cusp_new", "cusp_newform":
175
M`eisenstein_subspace := MakeSubspace(A, "zero", 0);
176
when "eis", "eis_new", "eis_newform":
177
M`eisenstein_subspace := true;
178
return M;
179
when "new":
180
M`eisenstein_subspace := MakeSubspace(A, "eis_new", 0);
181
else:
182
error "Typo in EisensteinSubspace." ;
183
end case;
184
end if;
185
if Type(M`eisenstein_subspace) eq BoolElt then
186
return M;
187
end if;
188
return M`eisenstein_subspace;
189
error "EisensteinSubspace -- bug.";
190
end intrinsic;
191
192
intrinsic NewSubspace(M::ModFrm) -> ModFrm
193
{The new subspace of M.}
194
return NewSubspace(M, 0);
195
end intrinsic;
196
197
intrinsic NewSubspace(M::ModFrm, p::RngIntElt) -> ModFrm
198
{The p-new subspace of M.}
199
require IsPrime(p) or p eq 0 : "Argument 2 must be prime.";
200
vprint ModularForms : "ModularForms: Computing new subspace.";
201
if assigned M`dimension and M`dimension eq 0 then
202
return M;
203
end if;
204
if not assigned M`new_subspace then
205
M`new_subspace := [* *];
206
end if;
207
if exists(i) { i : i in [1..#M`new_subspace] | M`new_subspace[i][1] eq p} then
208
return M`new_subspace[i][2];
209
end if;
210
211
A := AmbientSpace(M);
212
case SpaceType(M):
213
when "full":
214
N := MakeSubspace(A, "new", p);
215
Append(~M`new_subspace, <p,N>);
216
return N;
217
when "cusp":
218
N := MakeSubspace(A, "cusp_new", p);
219
Append(~M`new_subspace, <p,N>);
220
return N;
221
when "eis":
222
N := MakeSubspace(A, "eis_new", p);
223
Append(~M`new_subspace, <p,N>);
224
return N;
225
when "new", "cusp_new", "eis_new":
226
if SpaceTypeParam(M) eq p then
227
return M;
228
elif SpaceTypeParam(M) eq 0 then
229
N := MakeSubspace(A,M`type, p);
230
else
231
// This isn't yet fully supported, so give an error.
232
error "Construction of NewSubspace of the type you asked for is not yet supported.";
233
N := MakeSubspace(A,M`type, p*SpaceTypeParam(M));
234
end if;
235
Append(~M`new_subspace, <p,N>);
236
return N;
237
when "eis_newform", "cusp_newform":
238
return M;
239
else:
240
error "Bug in NewSubspace." ;
241
end case;
242
end intrinsic;
243
244
intrinsic ZeroSubspace(M::ModFrm) -> ModFrm
245
{The trivial subspace of M.}
246
S := CopyOfDefiningModularFormsObject(M);
247
S`dimension := 0;
248
S`type := "zero";
249
return S;
250
end intrinsic;
251
252
253
254