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

105

106

107

108

109

110

111

112

113

114

115

116

117

118

""" 

Submodules of spaces of modular forms 

 

EXAMPLES:: 

 

sage: M = ModularForms(Gamma1(13),2); M 

Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field 

sage: M.eisenstein_subspace() 

Eisenstein subspace of dimension 11 of Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field 

sage: M == loads(dumps(M)) 

True 

sage: M.cuspidal_subspace() 

Cuspidal subspace of dimension 2 of Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field 

""" 

from __future__ import absolute_import 

 

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

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

# 

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

# 

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

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

 

from .space import ModularFormsSpace 

 

import sage.modular.hecke.submodule 

 

 

class ModularFormsSubmodule(ModularFormsSpace, 

sage.modular.hecke.submodule.HeckeSubmodule): 

""" 

A submodule of an ambient space of modular forms. 

""" 

def __init__(self, ambient_module, submodule, dual=None, check=False): 

""" 

INPUT: 

 

- ambient_module -- ModularFormsSpace 

- submodule -- a submodule of the ambient space. 

- dual_module -- (default: None) ignored 

- check -- (default: False) whether to check that the 

submodule is Hecke equivariant 

 

EXAMPLES:: 

 

sage: M = ModularForms(Gamma1(13),2); M 

Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field 

sage: M.eisenstein_subspace() 

Eisenstein subspace of dimension 11 of Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field 

 

""" 

A = ambient_module 

sage.modular.hecke.submodule.HeckeSubmodule.__init__(self, A, submodule, check=check) 

ModularFormsSpace.__init__(self, A.group(), A.weight(), 

A.character(), A.base_ring()) 

 

def _repr_(self): 

""" 

EXAMPLES:: 

 

sage: ModularForms(Gamma1(13),2).eisenstein_subspace()._repr_() 

'Eisenstein subspace of dimension 11 of Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field' 

""" 

return "Modular Forms subspace of dimension %s of %s"%(self.dimension(), self.ambient_module()) 

 

def _compute_coefficients(self, element, X): 

""" 

Compute all coefficients of the modular form element in self for 

indices in X. 

 

TODO: Implement this function. 

 

EXAMPLES:: 

 

sage: M = ModularForms(6,4).cuspidal_subspace() 

sage: M._compute_coefficients( M.basis()[0], range(1,100) ) 

Traceback (most recent call last): 

... 

NotImplementedError 

""" 

raise NotImplementedError 

 

def _compute_q_expansion_basis(self, prec): 

""" 

Compute q_expansions to precision prec for each element in self.basis(). 

 

EXAMPLES:: 

 

sage: M = ModularForms(Gamma1(13),2); M 

Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field 

sage: S = M.eisenstein_subspace(); S 

Eisenstein subspace of dimension 11 of Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field 

sage: S._compute_q_expansion_basis(5) 

[1 + O(q^5), 

q + O(q^5), 

q^2 + O(q^5), 

q^3 + O(q^5), 

q^4 + O(q^5), 

O(q^5), 

O(q^5), 

O(q^5), 

O(q^5), 

O(q^5), 

O(q^5)] 

""" 

A = self.ambient_module() 

return [A._q_expansion(element = f.element(), prec=prec) for f in self.basis()] 

 

 

# TODO 

class ModularFormsSubmoduleWithBasis(ModularFormsSubmodule): 

pass