Dimensions of spaces of modular forms

AUTHORS:

  • William Stein

  • Jordi Quer

ACKNOWLEDGEMENT: The dimension formulas and implementations in this module grew out of a program that Bruce Kaskel wrote (around 1996) in PARI, which Kevin Buzzard subsequently extended. I (William Stein) then implemented it in C++ for Hecke. I also implemented it in Magma. Also, the functions for dimensions of spaces with nontrivial character are based on a paper (that has no proofs) by Cohen and Oesterlé [CO1977]. The formulas for \(\Gamma_H(N)\) were found and implemented by Jordi Quer.

The formulas here are more complete than in Hecke or Magma.

Currently the input to each function below is an integer and either a Dirichlet character \(\varepsilon\) or a finite index subgroup of \(\SL_2(\ZZ)\). If the input is a Dirichlet character \(\varepsilon\), the dimensions are for subspaces of \(M_k(\Gamma_1(N), \varepsilon)\), where \(N\) is the modulus of \(\varepsilon\).

These functions mostly call the methods dimension_cusp_forms, dimension_modular_forms and so on of the corresponding congruence subgroup classes.

REFERENCES:

[CO1977]

H. Cohen, J. Oesterlé, Dimensions des espaces de formes modulaires, p. 69-78 in Modular functions in one variable VI. Lecture Notes in Math. 627, Springer-Verlag, NewYork, 1977.

sage.modular.dims.CO_delta(r, p, N, eps)[source]

This is used as an intermediate value in computations related to the paper of Cohen-Oesterlé.

INPUT:

  • r – positive integer

  • p – a prime

  • N – positive integer

  • eps – character

OUTPUT: element of the base ring of the character

EXAMPLES:

sage: G.<eps> = DirichletGroup(7)
sage: sage.modular.dims.CO_delta(1,5,7,eps^3)
2
>>> from sage.all import *
>>> G = DirichletGroup(Integer(7), names=('eps',)); (eps,) = G._first_ngens(1)
>>> sage.modular.dims.CO_delta(Integer(1),Integer(5),Integer(7),eps**Integer(3))
2
G.<eps> = DirichletGroup(7)
sage.modular.dims.CO_delta(1,5,7,eps^3)
sage.modular.dims.CO_nu(r, p, N, eps)[source]

This is used as an intermediate value in computations related to the paper of Cohen-Oesterlé.

INPUT:

  • r – positive integer

  • p – a prime

  • N – positive integer

  • eps – character

OUTPUT: element of the base ring of the character

EXAMPLES:

sage: G.<eps> = DirichletGroup(7)
sage: G.<eps> = DirichletGroup(7)
sage: sage.modular.dims.CO_nu(1,7,7,eps)
-1
>>> from sage.all import *
>>> G = DirichletGroup(Integer(7), names=('eps',)); (eps,) = G._first_ngens(1)
>>> G = DirichletGroup(Integer(7), names=('eps',)); (eps,) = G._first_ngens(1)
>>> sage.modular.dims.CO_nu(Integer(1),Integer(7),Integer(7),eps)
-1
G.<eps> = DirichletGroup(7)
G.<eps> = DirichletGroup(7)
sage.modular.dims.CO_nu(1,7,7,eps)
sage.modular.dims.CohenOesterle(eps, k)[source]

Compute the Cohen-Oesterlé function associate to eps, \(k\).

This is a summand in the formula for the dimension of the space of cusp forms of weight \(2\) with character \(\varepsilon\).

INPUT:

  • eps – Dirichlet character

  • k – integer

OUTPUT: element of the base ring of eps

EXAMPLES:

sage: G.<eps> = DirichletGroup(7)
sage: sage.modular.dims.CohenOesterle(eps, 2)
-2/3
sage: sage.modular.dims.CohenOesterle(eps, 4)
-1
>>> from sage.all import *
>>> G = DirichletGroup(Integer(7), names=('eps',)); (eps,) = G._first_ngens(1)
>>> sage.modular.dims.CohenOesterle(eps, Integer(2))
-2/3
>>> sage.modular.dims.CohenOesterle(eps, Integer(4))
-1
G.<eps> = DirichletGroup(7)
sage.modular.dims.CohenOesterle(eps, 2)
sage.modular.dims.CohenOesterle(eps, 4)
sage.modular.dims.dimension_cusp_forms(X, k=2)[source]

The dimension of the space of cusp forms for the given congruence subgroup or Dirichlet character.

INPUT:

  • X – congruence subgroup or Dirichlet character or integer

  • k – weight (integer)

EXAMPLES:

sage: from sage.modular.dims import dimension_cusp_forms
sage: dimension_cusp_forms(5,4)
1

sage: dimension_cusp_forms(Gamma0(11),2)
1
sage: dimension_cusp_forms(Gamma1(13),2)
2

sage: dimension_cusp_forms(DirichletGroup(13).0^2,2)
1
sage: dimension_cusp_forms(DirichletGroup(13).0,3)
1

sage: dimension_cusp_forms(Gamma0(11),2)
1
sage: dimension_cusp_forms(Gamma0(11),0)
0
sage: dimension_cusp_forms(Gamma0(1),12)
1
sage: dimension_cusp_forms(Gamma0(1),2)
0
sage: dimension_cusp_forms(Gamma0(1),4)
0

sage: dimension_cusp_forms(Gamma0(389),2)
32
sage: dimension_cusp_forms(Gamma0(389),4)
97
sage: dimension_cusp_forms(Gamma0(2005),2)
199
sage: dimension_cusp_forms(Gamma0(11),1)
0

sage: dimension_cusp_forms(Gamma1(11),2)
1
sage: dimension_cusp_forms(Gamma1(1),12)
1
sage: dimension_cusp_forms(Gamma1(1),2)
0
sage: dimension_cusp_forms(Gamma1(1),4)
0

sage: dimension_cusp_forms(Gamma1(389),2)
6112
sage: dimension_cusp_forms(Gamma1(389),4)
18721
sage: dimension_cusp_forms(Gamma1(2005),2)
159201

sage: dimension_cusp_forms(Gamma1(11),1)
0

sage: e = DirichletGroup(13).0
sage: e.order()
12
sage: dimension_cusp_forms(e,2)
0
sage: dimension_cusp_forms(e^2,2)
1
>>> from sage.all import *
>>> from sage.modular.dims import dimension_cusp_forms
>>> dimension_cusp_forms(Integer(5),Integer(4))
1

>>> dimension_cusp_forms(Gamma0(Integer(11)),Integer(2))
1
>>> dimension_cusp_forms(Gamma1(Integer(13)),Integer(2))
2

>>> dimension_cusp_forms(DirichletGroup(Integer(13)).gen(0)**Integer(2),Integer(2))
1
>>> dimension_cusp_forms(DirichletGroup(Integer(13)).gen(0),Integer(3))
1

>>> dimension_cusp_forms(Gamma0(Integer(11)),Integer(2))
1
>>> dimension_cusp_forms(Gamma0(Integer(11)),Integer(0))
0
>>> dimension_cusp_forms(Gamma0(Integer(1)),Integer(12))
1
>>> dimension_cusp_forms(Gamma0(Integer(1)),Integer(2))
0
>>> dimension_cusp_forms(Gamma0(Integer(1)),Integer(4))
0

>>> dimension_cusp_forms(Gamma0(Integer(389)),Integer(2))
32
>>> dimension_cusp_forms(Gamma0(Integer(389)),Integer(4))
97
>>> dimension_cusp_forms(Gamma0(Integer(2005)),Integer(2))
199
>>> dimension_cusp_forms(Gamma0(Integer(11)),Integer(1))
0

>>> dimension_cusp_forms(Gamma1(Integer(11)),Integer(2))
1
>>> dimension_cusp_forms(Gamma1(Integer(1)),Integer(12))
1
>>> dimension_cusp_forms(Gamma1(Integer(1)),Integer(2))
0
>>> dimension_cusp_forms(Gamma1(Integer(1)),Integer(4))
0

>>> dimension_cusp_forms(Gamma1(Integer(389)),Integer(2))
6112
>>> dimension_cusp_forms(Gamma1(Integer(389)),Integer(4))
18721
>>> dimension_cusp_forms(Gamma1(Integer(2005)),Integer(2))
159201

>>> dimension_cusp_forms(Gamma1(Integer(11)),Integer(1))
0

>>> e = DirichletGroup(Integer(13)).gen(0)
>>> e.order()
12
>>> dimension_cusp_forms(e,Integer(2))
0
>>> dimension_cusp_forms(e**Integer(2),Integer(2))
1
from sage.modular.dims import dimension_cusp_forms
dimension_cusp_forms(5,4)
dimension_cusp_forms(Gamma0(11),2)
dimension_cusp_forms(Gamma1(13),2)
dimension_cusp_forms(DirichletGroup(13).0^2,2)
dimension_cusp_forms(DirichletGroup(13).0,3)
dimension_cusp_forms(Gamma0(11),2)
dimension_cusp_forms(Gamma0(11),0)
dimension_cusp_forms(Gamma0(1),12)
dimension_cusp_forms(Gamma0(1),2)
dimension_cusp_forms(Gamma0(1),4)
dimension_cusp_forms(Gamma0(389),2)
dimension_cusp_forms(Gamma0(389),4)
dimension_cusp_forms(Gamma0(2005),2)
dimension_cusp_forms(Gamma0(11),1)
dimension_cusp_forms(Gamma1(11),2)
dimension_cusp_forms(Gamma1(1),12)
dimension_cusp_forms(Gamma1(1),2)
dimension_cusp_forms(Gamma1(1),4)
dimension_cusp_forms(Gamma1(389),2)
dimension_cusp_forms(Gamma1(389),4)
dimension_cusp_forms(Gamma1(2005),2)
dimension_cusp_forms(Gamma1(11),1)
e = DirichletGroup(13).0
e.order()
dimension_cusp_forms(e,2)
dimension_cusp_forms(e^2,2)

Check that Issue #12640 is fixed:

sage: dimension_cusp_forms(DirichletGroup(1)(1), 12)
1
sage: dimension_cusp_forms(DirichletGroup(2)(1), 24)
5
>>> from sage.all import *
>>> dimension_cusp_forms(DirichletGroup(Integer(1))(Integer(1)), Integer(12))
1
>>> dimension_cusp_forms(DirichletGroup(Integer(2))(Integer(1)), Integer(24))
5
dimension_cusp_forms(DirichletGroup(1)(1), 12)
dimension_cusp_forms(DirichletGroup(2)(1), 24)
sage.modular.dims.dimension_eis(X, k=2)[source]

The dimension of the space of Eisenstein series for the given congruence subgroup.

INPUT:

  • X – congruence subgroup or Dirichlet character or integer

  • k – integer; weight

EXAMPLES:

sage: from sage.modular.dims import dimension_eis
sage: dimension_eis(5,4)
2

sage: dimension_eis(Gamma0(11),2)
1
sage: dimension_eis(Gamma1(13),2)
11
sage: dimension_eis(Gamma1(2006),2)
3711

sage: e = DirichletGroup(13).0
sage: e.order()
12
sage: dimension_eis(e,2)
0
sage: dimension_eis(e^2,2)
2

sage: e = DirichletGroup(13).0
sage: e.order()
12
sage: dimension_eis(e,2)
0
sage: dimension_eis(e^2,2)
2
sage: dimension_eis(e,13)
2

sage: G = DirichletGroup(20)
sage: dimension_eis(G.0,3)
4
sage: dimension_eis(G.1,3)
6
sage: dimension_eis(G.1^2,2)
6

sage: G = DirichletGroup(200)
sage: e = prod(G.gens(), G(1))
sage: e.conductor()
200
sage: dimension_eis(e,2)
4

sage: from sage.modular.dims import dimension_modular_forms
sage: dimension_modular_forms(Gamma1(4), 11)
6
>>> from sage.all import *
>>> from sage.modular.dims import dimension_eis
>>> dimension_eis(Integer(5),Integer(4))
2

>>> dimension_eis(Gamma0(Integer(11)),Integer(2))
1
>>> dimension_eis(Gamma1(Integer(13)),Integer(2))
11
>>> dimension_eis(Gamma1(Integer(2006)),Integer(2))
3711

>>> e = DirichletGroup(Integer(13)).gen(0)
>>> e.order()
12
>>> dimension_eis(e,Integer(2))
0
>>> dimension_eis(e**Integer(2),Integer(2))
2

>>> e = DirichletGroup(Integer(13)).gen(0)
>>> e.order()
12
>>> dimension_eis(e,Integer(2))
0
>>> dimension_eis(e**Integer(2),Integer(2))
2
>>> dimension_eis(e,Integer(13))
2

>>> G = DirichletGroup(Integer(20))
>>> dimension_eis(G.gen(0),Integer(3))
4
>>> dimension_eis(G.gen(1),Integer(3))
6
>>> dimension_eis(G.gen(1)**Integer(2),Integer(2))
6

>>> G = DirichletGroup(Integer(200))
>>> e = prod(G.gens(), G(Integer(1)))
>>> e.conductor()
200
>>> dimension_eis(e,Integer(2))
4

>>> from sage.modular.dims import dimension_modular_forms
>>> dimension_modular_forms(Gamma1(Integer(4)), Integer(11))
6
from sage.modular.dims import dimension_eis
dimension_eis(5,4)
dimension_eis(Gamma0(11),2)
dimension_eis(Gamma1(13),2)
dimension_eis(Gamma1(2006),2)
e = DirichletGroup(13).0
e.order()
dimension_eis(e,2)
dimension_eis(e^2,2)
e = DirichletGroup(13).0
e.order()
dimension_eis(e,2)
dimension_eis(e^2,2)
dimension_eis(e,13)
G = DirichletGroup(20)
dimension_eis(G.0,3)
dimension_eis(G.1,3)
dimension_eis(G.1^2,2)
G = DirichletGroup(200)
e = prod(G.gens(), G(1))
e.conductor()
dimension_eis(e,2)
from sage.modular.dims import dimension_modular_forms
dimension_modular_forms(Gamma1(4), 11)
sage.modular.dims.dimension_modular_forms(X, k=2)[source]

The dimension of the space of cusp forms for the given congruence subgroup (either \(\Gamma_0(N)\), \(\Gamma_1(N)\), or \(\Gamma_H(N)\)) or Dirichlet character.

INPUT:

  • X – congruence subgroup or Dirichlet character

  • k – integer; weight

EXAMPLES:

sage: from sage.modular.dims import dimension_modular_forms
sage: dimension_modular_forms(Gamma0(11),2)
2
sage: dimension_modular_forms(Gamma0(11),0)
1
sage: dimension_modular_forms(Gamma1(13),2)
13
sage: dimension_modular_forms(GammaH(11, [10]), 2)
10
sage: dimension_modular_forms(GammaH(11, [10]))
10
sage: dimension_modular_forms(GammaH(11, [10]), 4)
20
sage: e = DirichletGroup(20).1
sage: dimension_modular_forms(e,3)
9
sage: from sage.modular.dims import dimension_cusp_forms
sage: dimension_cusp_forms(e,3)
3
sage: from sage.modular.dims import dimension_eis
sage: dimension_eis(e,3)
6
sage: dimension_modular_forms(11,2)
2
>>> from sage.all import *
>>> from sage.modular.dims import dimension_modular_forms
>>> dimension_modular_forms(Gamma0(Integer(11)),Integer(2))
2
>>> dimension_modular_forms(Gamma0(Integer(11)),Integer(0))
1
>>> dimension_modular_forms(Gamma1(Integer(13)),Integer(2))
13
>>> dimension_modular_forms(GammaH(Integer(11), [Integer(10)]), Integer(2))
10
>>> dimension_modular_forms(GammaH(Integer(11), [Integer(10)]))
10
>>> dimension_modular_forms(GammaH(Integer(11), [Integer(10)]), Integer(4))
20
>>> e = DirichletGroup(Integer(20)).gen(1)
>>> dimension_modular_forms(e,Integer(3))
9
>>> from sage.modular.dims import dimension_cusp_forms
>>> dimension_cusp_forms(e,Integer(3))
3
>>> from sage.modular.dims import dimension_eis
>>> dimension_eis(e,Integer(3))
6
>>> dimension_modular_forms(Integer(11),Integer(2))
2
from sage.modular.dims import dimension_modular_forms
dimension_modular_forms(Gamma0(11),2)
dimension_modular_forms(Gamma0(11),0)
dimension_modular_forms(Gamma1(13),2)
dimension_modular_forms(GammaH(11, [10]), 2)
dimension_modular_forms(GammaH(11, [10]))
dimension_modular_forms(GammaH(11, [10]), 4)
e = DirichletGroup(20).1
dimension_modular_forms(e,3)
from sage.modular.dims import dimension_cusp_forms
dimension_cusp_forms(e,3)
from sage.modular.dims import dimension_eis
dimension_eis(e,3)
dimension_modular_forms(11,2)
sage.modular.dims.dimension_new_cusp_forms(X, k=2, p=0)[source]

Return the dimension of the new (or \(p\)-new) subspace of cusp forms for the character or group \(X\).

INPUT:

  • X – integer, congruence subgroup or Dirichlet character

  • k – weight (integer)

  • p – 0 or a prime

EXAMPLES:

sage: from sage.modular.dims import dimension_new_cusp_forms
sage: dimension_new_cusp_forms(100,2)
1

sage: dimension_new_cusp_forms(Gamma0(100),2)
1
sage: dimension_new_cusp_forms(Gamma0(100),4)
5

sage: dimension_new_cusp_forms(Gamma1(100),2)
141
sage: dimension_new_cusp_forms(Gamma1(100),4)
463

sage: dimension_new_cusp_forms(DirichletGroup(100).1^2,2)
2
sage: dimension_new_cusp_forms(DirichletGroup(100).1^2,4)
8

sage: sum(dimension_new_cusp_forms(e,3) for e in DirichletGroup(30))
12
sage: dimension_new_cusp_forms(Gamma1(30),3)
12
>>> from sage.all import *
>>> from sage.modular.dims import dimension_new_cusp_forms
>>> dimension_new_cusp_forms(Integer(100),Integer(2))
1

>>> dimension_new_cusp_forms(Gamma0(Integer(100)),Integer(2))
1
>>> dimension_new_cusp_forms(Gamma0(Integer(100)),Integer(4))
5

>>> dimension_new_cusp_forms(Gamma1(Integer(100)),Integer(2))
141
>>> dimension_new_cusp_forms(Gamma1(Integer(100)),Integer(4))
463

>>> dimension_new_cusp_forms(DirichletGroup(Integer(100)).gen(1)**Integer(2),Integer(2))
2
>>> dimension_new_cusp_forms(DirichletGroup(Integer(100)).gen(1)**Integer(2),Integer(4))
8

>>> sum(dimension_new_cusp_forms(e,Integer(3)) for e in DirichletGroup(Integer(30)))
12
>>> dimension_new_cusp_forms(Gamma1(Integer(30)),Integer(3))
12
from sage.modular.dims import dimension_new_cusp_forms
dimension_new_cusp_forms(100,2)
dimension_new_cusp_forms(Gamma0(100),2)
dimension_new_cusp_forms(Gamma0(100),4)
dimension_new_cusp_forms(Gamma1(100),2)
dimension_new_cusp_forms(Gamma1(100),4)
dimension_new_cusp_forms(DirichletGroup(100).1^2,2)
dimension_new_cusp_forms(DirichletGroup(100).1^2,4)
sum(dimension_new_cusp_forms(e,3) for e in DirichletGroup(30))
dimension_new_cusp_forms(Gamma1(30),3)

Check that Issue #12640 is fixed:

sage: dimension_new_cusp_forms(DirichletGroup(1)(1), 12)
1
sage: dimension_new_cusp_forms(DirichletGroup(2)(1), 24)
1
>>> from sage.all import *
>>> dimension_new_cusp_forms(DirichletGroup(Integer(1))(Integer(1)), Integer(12))
1
>>> dimension_new_cusp_forms(DirichletGroup(Integer(2))(Integer(1)), Integer(24))
1
dimension_new_cusp_forms(DirichletGroup(1)(1), 12)
dimension_new_cusp_forms(DirichletGroup(2)(1), 24)
sage.modular.dims.eisen(p)[source]

Return the Eisenstein number \(n\) which is the numerator of \((p-1)/12\).

INPUT:

  • p – a prime

OUTPUT: integer

EXAMPLES:

sage: [(p, sage.modular.dims.eisen(p)) for p in prime_range(24)]
[(2, 1), (3, 1), (5, 1), (7, 1), (11, 5), (13, 1), (17, 4),
 (19, 3), (23, 11)]
>>> from sage.all import *
>>> [(p, sage.modular.dims.eisen(p)) for p in prime_range(Integer(24))]
[(2, 1), (3, 1), (5, 1), (7, 1), (11, 5), (13, 1), (17, 4),
 (19, 3), (23, 11)]
[(p, sage.modular.dims.eisen(p)) for p in prime_range(24)]
sage.modular.dims.sturm_bound(level, weight=2)[source]

Return the Sturm bound for modular forms with given level and weight.

For more details, see the documentation for the sturm_bound method of sage.modular.arithgroup.CongruenceSubgroup objects.

INPUT:

  • level – integer (interpreted as a level for \(\Gamma0\)) or a congruence subgroup

  • weight – integer \(\geq 2\) (default: 2)

EXAMPLES:

sage: from sage.modular.dims import sturm_bound
sage: sturm_bound(11,2)
2
sage: sturm_bound(389,2)
65
sage: sturm_bound(1,12)
1
sage: sturm_bound(100,2)
30
sage: sturm_bound(1,36)
3
sage: sturm_bound(11)
2
>>> from sage.all import *
>>> from sage.modular.dims import sturm_bound
>>> sturm_bound(Integer(11),Integer(2))
2
>>> sturm_bound(Integer(389),Integer(2))
65
>>> sturm_bound(Integer(1),Integer(12))
1
>>> sturm_bound(Integer(100),Integer(2))
30
>>> sturm_bound(Integer(1),Integer(36))
3
>>> sturm_bound(Integer(11))
2
from sage.modular.dims import sturm_bound
sturm_bound(11,2)
sturm_bound(389,2)
sturm_bound(1,12)
sturm_bound(100,2)
sturm_bound(1,36)
sturm_bound(11)