Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
241852 views
1
r"""
2
Rings of orthogonal modular forms.
3
4
AUTHOR :
5
-- Martin Raum (2009 - 07 - 30) Initial version
6
"""
7
8
#===============================================================================
9
#
10
# Copyright (C) 2009 Martin Raum
11
#
12
# This program is free software; you can redistribute it and/or
13
# modify it under the terms of the GNU General Public License
14
# as published by the Free Software Foundation; either version 3
15
# of the License, or (at your option) any later version.
16
#
17
# This program is distributed in the hope that it will be useful,
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20
# General Public License for more details.
21
#
22
# You should have received a copy of the GNU General Public License
23
# along with this program; if not, see <http://www.gnu.org/licenses/>.
24
#
25
#===============================================================================
26
27
from psage.modform.fourier_expansion_framework.gradedexpansions.gradedexpansion_module import GradedExpansionModule_class
28
from psage.modform.fourier_expansion_framework.gradedexpansions.gradedexpansion_ring import GradedExpansionRing_class
29
from psage.modform.fourier_expansion_framework.modularforms.modularform_element import ModularForm_generic
30
from psage.modform.fourier_expansion_framework.modularforms.modularform_functor import ModularFormsFunctor
31
from psage.modform.fourier_expansion_framework.modularforms.modularform_interfaces import ModularFormsAmbientWithHeckeAction_abstract
32
from psage.modform.fourier_expansion_framework.modularforms.modularform_submodule import ModularFormsWeightSubmodule
33
from sage.rings.integer import Integer
34
from sage.rings.integer_ring import ZZ
35
from sage.structure.element import Element
36
37
#===============================================================================
38
# ModularFormsAmbient
39
#===============================================================================
40
41
def ModularFormsAmbient( A, type, precision, *args, **kwds) :
42
"""
43
Create a ring or module of modular forms of given type. The underlying Fourier
44
expansions are calculated up to ``precision``.
45
46
INPUT:
47
- `A` -- A ring; The base ring for the modular forms.
48
- ``type`` -- An inystance of :class:~`fourier_expansion_framework.modularforms.modularform_types.ModularFormType_abstract`.
49
- ``precision`` -- A precision class.
50
- ``*arg`` -- Will be forwarded to the type's construction function.
51
- ``**kwds`` -- Will be forwarded to the type's construction function.
52
53
OUTPUT:
54
An instance of :class:~`ModularFormsAmbient_abstract`.
55
56
TESTS::
57
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
58
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
59
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
60
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
61
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_vectorvalued(), NNFilter(5), reduce_before_evaluating = False )
62
"""
63
if not 'reduce_before_evaluating' in kwds :
64
kwds['reduce_before_evaluating'] = type.reduce_before_evaluating(A)
65
66
return type._ambient_construction_function()(A, type, precision, *args, **kwds)
67
68
#===============================================================================
69
# ModularFormsAmbient_abstract
70
#===============================================================================
71
72
class ModularFormsAmbient_abstract :
73
"""
74
An abstract implementation of a graded expansion ambient, that deduced its structure from
75
data stored by a type of modular forms.
76
"""
77
78
def __init__(self, type, precision) :
79
"""
80
INPUT:
81
- ``type`` -- An inystance of :class:~`fourier_expansion_framework.modularforms.modularform_types.ModularFormType_abstract`.
82
- ``precision`` -- A precision class.
83
84
NOTE:
85
- The attribute ``_extended_base_ring`` must be set before calling the constructor or
86
will be ignored.
87
- The attribute ``_submodule_classes`` will be overwritten and has to be populated after calling the
88
constructor. See :meth:~`._submodule` for its description.
89
- The attribute ``_element_class`` may not be set if it has to be adopted from the type.
90
91
TESTS::
92
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
93
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
94
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
95
sage: ma = ModularFormsAmbient_abstract( ModularFormTestType_scalar(), NNFilter(5) )
96
"""
97
self.__type = type
98
self.__precision = precision
99
100
if not hasattr(self, '_element_class') :
101
try :
102
self._element_class = type._ambient_element_class()
103
except NotImplementedError :
104
self._element_class = ModularForm_generic
105
106
single_weight_pred = lambda basis, **kwds: "grading_indices" in kwds and len(kwds["grading_indices"]) == 1
107
def single_weight_function(basis, **kwds) :
108
try :
109
return self.__type._weight_submodule_class()(self, basis, kwds["grading_indices"][0], **kwds)
110
except NotImplementedError :
111
return ModularFormsWeightSubmodule(self, basis, kwds["grading_indices"][0])
112
113
self._submodule_classes = [( single_weight_pred, single_weight_function ),
114
( lambda _, **kwds : True,
115
lambda basis, **kwds : self._graded_ambient_class._submodule(self, basis, **kwds) ) ]
116
117
# This couldn't be refactored completely and will most likely cause problems in the
118
# the concrete implementations. A complete replacement has taken place and this is
119
# probably no issue.
120
# def precision(self) :
121
def fourier_expansion_precision(self) :
122
"""
123
The common precision of the underlying Fourier expansions.
124
125
OUTPUT:
126
A filter for the Fourier expansion ambient's monoid or action.
127
128
TESTS::
129
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
130
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
131
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
132
sage: ma = ModularFormsAmbient_abstract( ModularFormTestType_scalar(), NNFilter(5) )
133
sage: ma.fourier_expansion_precision()
134
Filtered NN with action up to 5
135
"""
136
return self.__precision
137
138
def type(self) :
139
"""
140
The type of modular forms this ambient contains.
141
142
OUTPUT:
143
An instance of :class:~`fourier_expansion_framework.modularforms.modularform_types.ModularFormType_abstract`.
144
145
TESTS::
146
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
147
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
148
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
149
sage: ma = ModularFormsAmbient_abstract( ModularFormTestType_scalar(), NNFilter(5) )
150
sage: ma.type()
151
Test type of modular forms with 5 generators
152
"""
153
return self.__type
154
155
def group(self) :
156
"""
157
The modular group the modular forms in this ambient are attached to.
158
159
OUTPUT:
160
An arbitrary type.
161
162
TESTS::
163
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
164
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
165
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
166
sage: ma = ModularFormsAmbient_abstract( ModularFormTestType_scalar(), NNFilter(5) )
167
sage: ma.group()
168
'1'
169
"""
170
return self.__type.group()
171
172
def weights(self) :
173
"""
174
The generators' weights.
175
176
OUTPUT:
177
A tuple of (generalized) weights.
178
179
TESTS::
180
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
181
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
182
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
183
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
184
sage: ma.weights()
185
(1, 2, 3, 4, 5)
186
"""
187
return self.__type.weights(self.relations().base_ring())
188
189
def graded_submodules_are_free(self) :
190
"""
191
Whether the modules of elements of fixed grading are free.
192
193
OUTPUT:
194
A boolean.
195
196
TESTS::
197
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
198
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
199
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
200
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
201
sage: ma.graded_submodules_are_free()
202
True
203
"""
204
return self.__type.graded_submodules_are_free(self.relations().base_ring())
205
206
def _submodule(self, basis, **kwds) :
207
"""
208
A submodule with given basis.
209
210
INPUT:
211
- ``basis`` -- A list of elements of ``self``.
212
- ``**kwds`` -- Will be forwarded to the submodule construction function.
213
214
OUTPUT:
215
A submodule of graded expansions.
216
217
TESTS::
218
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
219
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
220
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
221
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
222
sage: sm = ma._submodule([ma.0], grading_indices = [1])
223
"""
224
for pred, fcn in self._submodule_classes :
225
if pred(basis, **kwds) : return fcn(basis, **kwds)
226
227
raise RuntimeError, "submodule classes do not match %s, %s" % (basis, kwds)
228
229
def construction(self) :
230
"""
231
TESTS::
232
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
233
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
234
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
235
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
236
sage: (F, A) = ma.construction()
237
sage: F(A) == ma
238
True
239
"""
240
return ModularFormsFunctor(self.__type, self.__precision), self.relations().base_ring()
241
242
def _coerce_map_from_(self, other) :
243
"""
244
TESTS::
245
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
246
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
247
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
248
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
249
sage: ma2 = ModularFormsAmbient( ZZ, ModularFormTestType_scalar(), NNFilter(5) )
250
sage: ma._coerce_map_from_(ma2)
251
Conversion via _element_constructor_ map:
252
From: Graded expansion ring with generators g1, g2, g3, g4, g5
253
To: Graded expansion ring with generators g1, g2, g3, g4, g5
254
"""
255
from sage.structure.coerce_maps import CallableConvertMap
256
257
if isinstance(other, ModularFormsAmbient_abstract) and \
258
self.relations().base_ring().has_coerce_map_from(other.relations().base_ring()) and \
259
self.type() == other.type() :
260
return CallableConvertMap(other, self, self._element_constructor_)
261
262
return self._graded_ambient_class._coerce_map_from_(self, other)
263
264
def _element_constructor_(self, x) :
265
"""
266
TESTS::
267
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
268
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
269
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
270
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
271
sage: ma2 = ModularFormsAmbient( ZZ, ModularFormTestType_scalar(), NNFilter(5) )
272
sage: ma(ma2.0)
273
Graded expansion g1
274
"""
275
if isinstance(x, (int, Integer)) and x == 0 :
276
return self._element_class(self, self.relations().ring().zero())
277
278
if isinstance(x, Element) :
279
P = x.parent()
280
if isinstance(P, ModularFormsAmbient_abstract) :
281
if P.type() == self.type() and \
282
self.relations().base_ring().has_coerce_map_from(P.relations().base_ring()) :
283
return self._element_class( self,
284
self.relations().ring()( x.polynomial(). \
285
subs(self.type()._hom_base_extension(P.relations().base_ring(), self.relations().base_ring())) )
286
)
287
288
return self._graded_ambient_class._element_constructor_(self, x)
289
290
def __cmp__(self, other) :
291
"""
292
TESTS::
293
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
294
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
295
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
296
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
297
sage: ma == ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
298
True
299
sage: ma == ModularFormsAmbient( ZZ, ModularFormTestType_scalar(), NNFilter(5) )
300
False
301
sage: ma == ModularFormsAmbient( QQ, ModularFormTestType_vectorvalued(), NNFilter(5) )
302
False
303
"""
304
c = cmp(type(self), type(other))
305
306
if c == 0 :
307
c = cmp(self.type(), other.type())
308
if c == 0 :
309
c = cmp(self.relations().base_ring(), other.relations().base_ring())
310
311
return c
312
313
#===============================================================================
314
# ModularFormsRing_generic
315
#===============================================================================
316
317
class ModularFormsRing_generic ( ModularFormsAmbient_abstract, GradedExpansionRing_class ) :
318
def __init__(self, K, type, precision, **kwds) :
319
"""
320
INPUT:
321
- `K` -- A ring.
322
- ``type`` -- An inystance of :class:~`fourier_expansion_framework.modularforms.modularform_types.ModularFormType_abstract`.
323
- ``precision`` -- A precision class.
324
- ``**kwds`` -- Will be forwardd to :class:~`fourier_expansion_framework.gradedexpansions.gradedexpansion_ring.GradedExpansionRing_class`.
325
326
NOTE:
327
- The attribute ``_extended_base_ring`` must be set before calling the constructor or
328
will be ignored.
329
- The attribute ``_graded_ambient_class`` may not be set.
330
- The attribute ``_submodule_classes`` will be overwritten and has to be populated after calling the
331
constructor. See :meth:~`fourier_expansion_framework.modularforms.modularform_ambient._submodule` for its description.
332
- The attribute ``_element_class`` may not be set if it has to be adopted from the type.
333
334
TESTS::
335
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
336
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
337
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
338
sage: ma = ModularFormsRing_generic( QQ, ModularFormTestType_scalar(), NNFilter(5) )
339
sage: ma.has_coerce_map_from(QQ)
340
True
341
"""
342
if not hasattr(self, '_extended_base_ring') :
343
try :
344
if type.is_vector_valued() :
345
nvv_type = type.non_vector_valued()
346
self._extended_base_ring = ModularFormsAmbient(K, nvv_type, precision)
347
except NotImplementedError :
348
del self._extended_base_ring
349
350
if not hasattr(self, '_graded_ambient_class') :
351
self._graded_ambient_class = GradedExpansionRing_class
352
353
if not 'all_relations' in kwds :
354
kwds['all_relations'] = True
355
356
ModularFormsAmbient_abstract.__init__(self, type, precision)
357
GradedExpansionRing_class.__init__(self, type.base_ring_generators(K, precision),
358
type.generators(K, precision), type.generator_relations(K), type.grading(K), **kwds)
359
360
#=======================================================================
361
# self._populate_coercion_lists_(
362
# coerce_list = [GradedExpansionBaseringInjection(self.base_ring(), self)],
363
# convert_list = [self.relations().ring()],
364
# convert_method_name = "_graded_expansion_submodule_to_graded_ambient_" )
365
#=======================================================================
366
367
def _coerce_map_from_(self, other):
368
"""
369
TESTS::
370
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
371
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
372
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
373
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
374
sage: ma._coerce_map_from_(ma)
375
Conversion via _element_constructor_ map:
376
From: Graded expansion ring with generators g1, g2, g3, g4, g5
377
To: Graded expansion ring with generators g1, g2, g3, g4, g5
378
"""
379
from sage.structure.coerce_maps import CallableConvertMap
380
381
if isinstance(other, ModularFormsRing_generic) and \
382
self.base_ring().has_coerce_map_from(other.base_ring()) and \
383
self.type().is_vector_valued() and \
384
self.type().non_vector_valued() == other.type() :
385
return CallableConvertMap(other, self, self._element_constructor_)
386
387
return ModularFormsAmbient_abstract._coerce_map_from_(self, other)
388
389
def _element_constructor_(self, x) :
390
"""
391
TESTS::
392
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
393
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
394
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
395
sage: ma = ModularFormsAmbient( QQ, ModularFormTestType_scalar(), NNFilter(5) )
396
sage: ma2 = ModularFormsAmbient( ZZ, ModularFormTestType_scalar(), NNFilter(5) )
397
sage: ma(ma2.0)
398
Graded expansion g1
399
"""
400
if isinstance(x, Element) :
401
P = x.parent()
402
if isinstance(P, ModularFormsRing_generic) :
403
try :
404
if self.type().is_vector_valued() and \
405
self.type().non_vector_values() == P.type() and \
406
self.base_ring().has_coerce_map_from(P.base_ring()) :
407
if self.base_ring() != P.base_ring() :
408
from sage.categories.pushout import pushout
409
x = pushout(P, self.base_ring())(x)
410
411
return self._element_class( self,
412
self.relations().ring()( x.polynomial(). \
413
subs(self.type()._hom_to_vector_valued(self.base_ring())) )
414
)
415
except NotImplementedError :
416
pass
417
418
return ModularFormsAmbient_abstract._element_constructor_(self, x)
419
420
#===============================================================================
421
# ModularFormsModule_generic
422
#===============================================================================
423
424
class ModularFormsModule_generic ( ModularFormsAmbient_abstract, GradedExpansionModule_class ) :
425
def __init__(self, K, type, precision, **kwds) :
426
"""
427
INPUT:
428
- `K` -- A ring.
429
- ``type`` -- An inystance of :class:~`fourier_expansion_framework.modularforms.modularform_types.ModularFormType_abstract`.
430
- ``precision`` -- A precision class.
431
- ``**kwds`` -- Will be forwardd to :class:~`fourier_expansion_framework.gradedexpansions.gradedexpansion_ring.GradedExpansionRing_class`.
432
433
NOTE:
434
- The attribute ``_extended_base_ring`` must be set before calling the constructor or
435
will be ignored.
436
- The attribute ``_graded_ambient_class`` may not be set.
437
- The attribute ``_submodule_classes`` will be overwritten and has to be populated after calling the
438
constructor. See :meth:~`fourier_expansion_framework.modularforms.modularform_ambient._submodule` for its description.
439
- The attribute ``_element_class`` may not be set if it has to be adopted from the type.
440
441
TESTS::
442
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
443
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
444
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
445
sage: ma = ModularFormsModule_generic( QQ, ModularFormTestType_vectorvalued(), NNFilter(5) )
446
"""
447
if not hasattr(self, '_extended_base_ring') :
448
try :
449
if type.is_vector_valued() :
450
nvv_type = type.non_vector_valued()
451
self._extended_base_ring = ModularFormsAmbient(K, nvv_type, precision)
452
except NotImplementedError :
453
del self._extended_base_ring
454
455
if not hasattr(self, '_graded_ambient_class') :
456
self._graded_ambient_class = GradedExpansionModule_class
457
458
if not 'all_relations' in kwds :
459
kwds['all_relations'] = True
460
461
ModularFormsAmbient_abstract.__init__(self, type, precision)
462
GradedExpansionModule_class.__init__(self, type.base_ring_generators(K, precision),
463
type.generators(K, precision), type.generator_relations(K), type.grading(K), **kwds)
464
465
#=======================================================================
466
# self._populate_coercion_lists_(
467
# convert_list = [self.relations().ring()],
468
# convert_method_name = "_graded_expansion_submodule_to_graded_ambient_" )
469
#=======================================================================
470
471
#===============================================================================
472
# ModularFormsRing_withheckeaction
473
#===============================================================================
474
475
class ModularFormsRing_withheckeaction(ModularFormsAmbientWithHeckeAction_abstract, ModularFormsRing_generic ) :
476
def __init__(self, K, type, precision, **kwds) :
477
"""
478
INPUT:
479
- `K` -- A ring.
480
- ``type`` -- An inystance of :class:~`fourier_expansion_framework.modularforms.modularform_types.ModularFormType_abstract`.
481
- ``precision`` -- A precision class.
482
- ``**kwds`` -- Will be forwardd to :class:~`fourier_expansion_framework.gradedexpansions.gradedexpansion_ring.GradedExpansionRing_class`.
483
484
NOTE:
485
- The attribute ``_extended_base_ring`` must be set before calling the constructor or
486
will be ignored.
487
- The attribute ``_graded_ambient_class`` may not be set.
488
- The attribute ``_submodule_classes`` will be overwritten and has to be populated after calling the
489
constructor. See :meth:~`fourier_expansion_framework.modularforms.modularform_ambient._submodule` for its description.
490
- The attribute ``_element_class`` may not be set if it has to be adopted from the type.
491
492
TESTS::
493
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
494
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
495
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
496
sage: ma = ModularFormsRing_generic( QQ, ModularFormTestType_scalar(), NNFilter(5) )
497
"""
498
ModularFormsRing_generic.__init__(self, K, type, precision, **kwds)
499
ModularFormsAmbientWithHeckeAction_abstract.__init__(self, type)
500
501
#===============================================================================
502
# ModularFormsModule_withheckeaction
503
#===============================================================================
504
505
class ModularFormsModule_withheckeaction(ModularFormsAmbientWithHeckeAction_abstract, ModularFormsModule_generic ) :
506
def __init__(self, K, type, precision, **kwds) :
507
"""
508
INPUT:
509
- `K` -- A ring.
510
- ``type`` -- An inystance of :class:~`fourier_expansion_framework.modularforms.modularform_types.ModularFormType_abstract`.
511
- ``precision`` -- A precision class.
512
- ``**kwds`` -- Will be forwardd to :class:~`fourier_expansion_framework.gradedexpansions.gradedexpansion_ring.GradedExpansionRing_class`.
513
514
NOTE:
515
- The attribute ``_extended_base_ring`` must be set before calling the constructor or
516
will be ignored.
517
- The attribute ``_graded_ambient_class`` may not be set.
518
- The attribute ``_submodule_classes`` will be overwritten and has to be populated after calling the
519
constructor. See :meth:~`fourier_expansion_framework.modularforms.modularform_ambient._submodule` for its description.
520
- The attribute ``_element_class`` may not be set if it has to be adopted from the type.
521
522
TESTS::
523
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
524
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
525
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
526
sage: ma = ModularFormsModule_withheckeaction( QQ, ModularFormTestType_vectorvalued(), NNFilter(5) )
527
"""
528
ModularFormsModule_generic.__init__(self, K, type, precision, **kwds)
529
ModularFormsAmbientWithHeckeAction_abstract.__init__(self, type)
530
531