Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
241852 views
1
r"""
2
Interfaces for modular forms which admit Hecke actions or ring which have
3
Maass lifts.
4
5
AUTHOR :
6
-- Martin Raum (2009 - 07 - 30) Initial version
7
"""
8
9
#===============================================================================
10
#
11
# Copyright (C) 2009 Martin Raum
12
#
13
# This program is free software; you can redistribute it and/or
14
# modify it under the terms of the GNU General Public License
15
# as published by the Free Software Foundation; either version 3
16
# of the License, or (at your option) any later version.
17
#
18
# This program is distributed in the hope that it will be useful,
19
# but WITHOUT ANY WARRANTY; without even the implied warranty of
20
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21
# General Public License for more details.
22
#
23
# You should have received a copy of the GNU General Public License
24
# along with this program; if not, see <http://www.gnu.org/licenses/>.
25
#
26
#===============================================================================
27
28
from psage.modform.fourier_expansion_framework.gradedexpansions.gradedexpansion_element import GradedExpansion_abstract
29
from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_element import MonoidPowerSeries_abstract, \
30
EquivariantMonoidPowerSeries_abstract
31
from psage.modform.fourier_expansion_framework.modularforms.modularform_submodule import ModularFormsSubmoduleHeckeInvariant
32
from psage.modform.fourier_expansion_framework.gradedexpansions.fourierexpansionwrapper import FourierExpansionWrapper
33
34
#===============================================================================
35
# ModularFormsAmbientWithHeckeAction_abstract
36
#===============================================================================
37
38
class ModularFormsAmbientWithHeckeAction_abstract :
39
"""
40
The standard implementation assumes that the action only depends on the
41
modulus and the weight.
42
The deriving class must override self._hecke_operator_class or it will
43
be derived from the type.
44
"""
45
46
def __init__(self, type) :
47
"""
48
TESTS::
49
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
50
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
51
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
52
sage: ma = ModularFormsModule_withheckeaction( QQ, ModularFormTestType_vectorvalued(), NNFilter(5) )
53
sage: sm = ma.graded_submodule(3)
54
sage: sm._hecke_action(7)
55
[(1)]
56
sage: ma = ModularFormsRing_withheckeaction( QQ, ModularFormTestType_scalar(), NNFilter(5) )
57
Traceback (most recent call last):
58
...
59
ValueError: Type for modular forms ambients with Hecke action must support Hecke operators.
60
"""
61
if not hasattr(self, '_hecke_operator_class') :
62
if not type.has_hecke_action() :
63
raise ValueError( "Type for modular forms ambients with Hecke action must support Hecke operators." )
64
self._hecke_operator_class = type._hecke_operator_class()
65
66
hecke_invariant_pred = lambda basis, **kwds : "is_hecke_invariant" in kwds and kwds["is_hecke_invariant"]
67
def hecke_invariant_fcn(basis, **kwds) :
68
try :
69
return self.type()._submodule_heckeinvariant_class(self, basis, **kwds)
70
except NotImplementedError :
71
return ModularFormsSubmoduleHeckeInvariant(self, basis, **kwds)
72
73
self._submodule_classes.insert(-2, (hecke_invariant_pred, hecke_invariant_fcn))
74
75
def _hecke_action(self, n, form) :
76
"""
77
The image of ``form`` under the `n`-th Hecke operator.
78
79
INPUT:
80
- `n` -- A Hecke modulus. Probably an integer.
81
- ``form`` -- An element whose parent supports conversion from
82
Fourier expansions.
83
84
OUTPUT:
85
An element in the parent of ``form``.
86
87
TESTS::
88
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_ambient import *
89
sage: from psage.modform.fourier_expansion_framework.modularforms.modularform_testtype import *
90
sage: from psage.modform.fourier_expansion_framework.monoidpowerseries.monoidpowerseries_basicmonoids import *
91
sage: ma = ModularFormsModule_withheckeaction( QQ, ModularFormTestType_vectorvalued(), NNFilter(5) )
92
sage: sm = ma.graded_submodule(3)
93
sage: ma._hecke_action(2, sm.0)
94
Equivariant monoid power series in Module of equivariant monoid power series over NN
95
sage: ma._hecke_action(7, sm.0)
96
(1)
97
sage: ma._hecke_action(2, 2)
98
Traceback (most recent call last):
99
...
100
TypeError: Form must be a Fourier expansion or wrap one.
101
"""
102
T = self._hecke_operator_class(n)
103
104
if isinstance(form, FourierExpansionWrapper) :
105
expansion = form.fourier_expansion()
106
try :
107
weight = form.weight()
108
except AttributeError :
109
weight = None
110
elif isinstance(form, (MonoidPowerSeries_abstract, EquivariantMonoidPowerSeries_abstract)) :
111
expansion = form
112
weight = None
113
else :
114
raise TypeError( "Form must be a Fourier expansion or wrap one." )
115
116
hecke_expansion = T.eval(expansion, weight)
117
118
if isinstance(form, FourierExpansionWrapper) :
119
try :
120
return form.parent()(hecke_expansion)
121
except (ValueError, ArithmeticError) :
122
pass
123
124
return hecke_expansion
125
126