Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
remove things form namespace (steenrod base and modular forms dimensi…
Browse files Browse the repository at this point in the history
…ons)
  • Loading branch information
fchapoton committed Oct 7, 2021
1 parent 52915b6 commit bb7b733
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 54 deletions.
7 changes: 4 additions & 3 deletions src/sage/algebras/steenrod/all.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
"""
The Steenrod algebra
"""

from .steenrod_algebra import SteenrodAlgebra, Sq
from .steenrod_algebra_bases import steenrod_algebra_basis

from sage.misc.lazy_import import lazy_import
lazy_import('sage.algebras.steenrod.steenrod_algebra_bases',
'steenrod_algebra_basis',
deprecation=(32647, 'removed from namespace'))
11 changes: 6 additions & 5 deletions src/sage/modular/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@

from .cusps import Cusp, Cusps

from .dims import (dimension_cusp_forms,
dimension_new_cusp_forms,
dimension_eis,
dimension_modular_forms,
sturm_bound)
lazy_import('sage.modular.dims', ('dimension_cusp_forms',
'dimension_new_cusp_forms',
'dimension_eis',
'dimension_modular_forms',
'sturm_bound'),
deprecation=(32647, 'removed from main namespace'))

from .etaproducts import (EtaGroup, EtaProduct, EtaGroupElement,
AllCusps, CuspFamily)
Expand Down
59 changes: 13 additions & 46 deletions src/sage/modular/dims.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,32 +265,25 @@ def dimension_new_cusp_forms(X, k=2, p=0):
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)
Expand All @@ -315,8 +308,7 @@ def dimension_new_cusp_forms(X, k=2, p=0):
return Gamma1(N).dimension_new_cusp_forms(k, eps=X, p=p)
elif isinstance(X, (int, Integer)):
return Gamma0(X).dimension_new_cusp_forms(k, p=p)
else:
raise TypeError("X (=%s) must be an integer, a Dirichlet character or a congruence subgroup of type Gamma0, Gamma1 or GammaH" % X)
raise TypeError(f"X (={X}) must be an integer, a Dirichlet character or a congruence subgroup of type Gamma0, Gamma1 or GammaH")


def dimension_cusp_forms(X, k=2):
Expand All @@ -333,25 +325,20 @@ def dimension_cusp_forms(X, k=2):
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)
Expand All @@ -363,8 +350,6 @@ def dimension_cusp_forms(X, k=2):
sage: dimension_cusp_forms(Gamma0(1),4)
0
::
sage: dimension_cusp_forms(Gamma0(389),2)
32
sage: dimension_cusp_forms(Gamma0(389),4)
Expand All @@ -374,8 +359,6 @@ def dimension_cusp_forms(X, k=2):
sage: dimension_cusp_forms(Gamma0(11),1)
0
::
sage: dimension_cusp_forms(Gamma1(11),2)
1
sage: dimension_cusp_forms(Gamma1(1),12)
Expand All @@ -385,22 +368,16 @@ def dimension_cusp_forms(X, k=2):
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
Expand All @@ -426,9 +403,8 @@ def dimension_cusp_forms(X, k=2):
return X.dimension_cusp_forms(k)
elif isinstance(X, (int, Integer)):
return Gamma0(X).dimension_cusp_forms(k)
else:
raise TypeError("argument 1 must be a Dirichlet character, an integer "
"or a finite index subgroup of SL2Z")
raise TypeError("argument 1 must be a Dirichlet character, an integer "
"or a finite index subgroup of SL2Z")


def dimension_eis(X, k=2):
Expand All @@ -445,20 +421,17 @@ def dimension_eis(X, k=2):
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
Expand All @@ -467,8 +440,6 @@ def dimension_eis(X, k=2):
sage: dimension_eis(e^2,2)
2
::
sage: e = DirichletGroup(13).0
sage: e.order()
12
Expand All @@ -479,8 +450,6 @@ def dimension_eis(X, k=2):
sage: dimension_eis(e,13)
2
::
sage: G = DirichletGroup(20)
sage: dimension_eis(G.0,3)
4
Expand All @@ -489,17 +458,14 @@ def dimension_eis(X, k=2):
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
"""
Expand All @@ -509,8 +475,7 @@ def dimension_eis(X, k=2):
return Gamma1(X.modulus()).dimension_eis(k, X)
elif isinstance(X, (int, Integer)):
return Gamma0(X).dimension_eis(k)
else:
raise TypeError("argument in dimension_eis must be an integer, a Dirichlet character, or a finite index subgroup of SL2Z (got %s)" % X)
raise TypeError(f"argument in dimension_eis must be an integer, a Dirichlet character, or a finite index subgroup of SL2Z (got {X})")


def dimension_modular_forms(X, k=2):
Expand All @@ -527,6 +492,7 @@ def dimension_modular_forms(X, k=2):
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)
Expand All @@ -542,8 +508,10 @@ def dimension_modular_forms(X, k=2):
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)
Expand Down Expand Up @@ -576,6 +544,7 @@ def sturm_bound(level, weight=2):
EXAMPLES::
sage: from sage.modular.dims import sturm_bound
sage: sturm_bound(11,2)
2
sage: sturm_bound(389,2)
Expand All @@ -592,8 +561,6 @@ def sturm_bound(level, weight=2):
if is_ArithmeticSubgroup(level):
if level.is_congruence():
return level.sturm_bound(weight)
else:
raise ValueError("no Sturm bound defined for noncongruence "
"subgroups")
raise ValueError("no Sturm bound defined for noncongruence subgroups")
if isinstance(level, (int, Integer)):
return Gamma0(level).sturm_bound(weight)

0 comments on commit bb7b733

Please sign in to comment.