Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

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

r""" 

Modular Forms for `\Gamma_0(N)` over `\QQ` 

 

TESTS:: 

 

sage: m = ModularForms(Gamma0(389),6) 

sage: loads(dumps(m)) == m 

True 

""" 

from __future__ import absolute_import 

 

######################################################################### 

# Copyright (C) 2006 William Stein <wstein@gmail.com> 

# 

# Distributed under the terms of the GNU General Public License (GPL) 

# 

# http://www.gnu.org/licenses/ 

######################################################################### 

 

import sage.rings.all as rings 

 

import sage.modular.arithgroup.all as arithgroup 

 

from . import ambient 

from . import cuspidal_submodule 

from . import eisenstein_submodule 

 

from sage.misc.cachefunc import cached_method 

 

class ModularFormsAmbient_g0_Q(ambient.ModularFormsAmbient): 

""" 

A space of modular forms for `\Gamma_0(N)` over `\QQ`. 

""" 

def __init__(self, level, weight): 

r""" 

Create a space of modular symbols for `\Gamma_0(N)` of given 

weight defined over `\QQ`. 

 

EXAMPLES:: 

 

sage: m = ModularForms(Gamma0(11),4); m 

Modular Forms space of dimension 4 for Congruence Subgroup Gamma0(11) of weight 4 over Rational Field 

sage: type(m) 

<class 'sage.modular.modform.ambient_g0.ModularFormsAmbient_g0_Q_with_category'> 

""" 

ambient.ModularFormsAmbient.__init__(self, arithgroup.Gamma0(level), weight, rings.QQ) 

 

#################################################################### 

# Computation of Special Submodules 

#################################################################### 

@cached_method 

def cuspidal_submodule(self): 

r""" 

Return the cuspidal submodule of this space of modular forms for 

`\Gamma_0(N)`. 

 

EXAMPLES:: 

 

sage: m = ModularForms(Gamma0(33),4) 

sage: s = m.cuspidal_submodule(); s 

Cuspidal subspace of dimension 10 of Modular Forms space of dimension 14 for Congruence Subgroup Gamma0(33) of weight 4 over Rational Field 

sage: type(s) 

<class 'sage.modular.modform.cuspidal_submodule.CuspidalSubmodule_g0_Q_with_category'> 

""" 

if self.level() == 1: 

return cuspidal_submodule.CuspidalSubmodule_level1_Q(self) 

else: 

return cuspidal_submodule.CuspidalSubmodule_g0_Q(self) 

 

@cached_method 

def eisenstein_submodule(self): 

r""" 

Return the Eisenstein submodule of this space of modular forms for 

`\Gamma_0(N)`. 

 

EXAMPLES:: 

 

sage: m = ModularForms(Gamma0(389),6) 

sage: m.eisenstein_submodule() 

Eisenstein subspace of dimension 2 of Modular Forms space of dimension 163 for Congruence Subgroup Gamma0(389) of weight 6 over Rational Field 

""" 

return eisenstein_submodule.EisensteinSubmodule_g0_Q(self) 

 

def _compute_atkin_lehner_matrix(self, d): 

r""" 

Compute the matrix of the Atkin-Lehner involution W_d acting on self, 

where d is a divisor of the level. This is only implemented in the 

(trivial) level 1 case. 

 

EXAMPLES:: 

 

sage: ModularForms(1, 30).atkin_lehner_operator() 

Hecke module morphism Atkin-Lehner operator W_1 defined by the matrix 

[1 0 0] 

[0 1 0] 

[0 0 1] 

Domain: Modular Forms space of dimension 3 for Modular Group SL(2,Z) ... 

Codomain: Modular Forms space of dimension 3 for Modular Group SL(2,Z) ... 

""" 

if self.level() == 1: 

from sage.matrix.matrix_space import MatrixSpace 

return MatrixSpace(self.base_ring(), self.rank())(1) 

else: 

raise NotImplementedError