passagemath-schemes 10.6.38__cp314-cp314t-macosx_13_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-schemes might be problematic. Click here for more details.
- passagemath_schemes/.dylibs/libflint.21.0.dylib +0 -0
- passagemath_schemes/.dylibs/libgmp.10.dylib +0 -0
- passagemath_schemes/.dylibs/libgmpxx.4.dylib +0 -0
- passagemath_schemes/.dylibs/libmpfr.6.dylib +0 -0
- passagemath_schemes/__init__.py +3 -0
- passagemath_schemes-10.6.38.dist-info/METADATA +204 -0
- passagemath_schemes-10.6.38.dist-info/METADATA.bak +205 -0
- passagemath_schemes-10.6.38.dist-info/RECORD +314 -0
- passagemath_schemes-10.6.38.dist-info/WHEEL +6 -0
- passagemath_schemes-10.6.38.dist-info/top_level.txt +3 -0
- sage/all__sagemath_schemes.py +23 -0
- sage/databases/all__sagemath_schemes.py +7 -0
- sage/databases/cremona.py +1723 -0
- sage/dynamics/all__sagemath_schemes.py +2 -0
- sage/dynamics/arithmetic_dynamics/affine_ds.py +1083 -0
- sage/dynamics/arithmetic_dynamics/all.py +14 -0
- sage/dynamics/arithmetic_dynamics/berkovich_ds.py +1101 -0
- sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +1543 -0
- sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py +2426 -0
- sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py +1169 -0
- sage/dynamics/arithmetic_dynamics/generic_ds.py +663 -0
- sage/dynamics/arithmetic_dynamics/product_projective_ds.py +339 -0
- sage/dynamics/arithmetic_dynamics/projective_ds.py +9558 -0
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.cpython-314t-darwin.so +0 -0
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx +301 -0
- sage/dynamics/arithmetic_dynamics/wehlerK3.py +2576 -0
- sage/lfunctions/all.py +18 -0
- sage/lfunctions/dokchitser.py +745 -0
- sage/lfunctions/pari.py +818 -0
- sage/lfunctions/zero_sums.cpython-314t-darwin.so +0 -0
- sage/lfunctions/zero_sums.pyx +1847 -0
- sage/modular/abvar/abvar.py +5135 -0
- sage/modular/abvar/abvar_ambient_jacobian.py +413 -0
- sage/modular/abvar/abvar_newform.py +244 -0
- sage/modular/abvar/all.py +8 -0
- sage/modular/abvar/constructor.py +186 -0
- sage/modular/abvar/cuspidal_subgroup.py +371 -0
- sage/modular/abvar/finite_subgroup.py +896 -0
- sage/modular/abvar/homology.py +720 -0
- sage/modular/abvar/homspace.py +998 -0
- sage/modular/abvar/lseries.py +415 -0
- sage/modular/abvar/morphism.py +935 -0
- sage/modular/abvar/torsion_point.py +274 -0
- sage/modular/abvar/torsion_subgroup.py +740 -0
- sage/modular/all.py +43 -0
- sage/modular/arithgroup/all.py +20 -0
- sage/modular/arithgroup/arithgroup_element.cpython-314t-darwin.so +0 -0
- sage/modular/arithgroup/arithgroup_element.pyx +474 -0
- sage/modular/arithgroup/arithgroup_generic.py +1402 -0
- sage/modular/arithgroup/arithgroup_perm.py +2692 -0
- sage/modular/arithgroup/congroup.cpython-314t-darwin.so +0 -0
- sage/modular/arithgroup/congroup.pyx +334 -0
- sage/modular/arithgroup/congroup_gamma.py +363 -0
- sage/modular/arithgroup/congroup_gamma0.py +692 -0
- sage/modular/arithgroup/congroup_gamma1.py +653 -0
- sage/modular/arithgroup/congroup_gammaH.py +1469 -0
- sage/modular/arithgroup/congroup_generic.py +628 -0
- sage/modular/arithgroup/congroup_sl2z.py +267 -0
- sage/modular/arithgroup/farey_symbol.cpython-314t-darwin.so +0 -0
- sage/modular/arithgroup/farey_symbol.pyx +1066 -0
- sage/modular/arithgroup/tests.py +418 -0
- sage/modular/btquotients/all.py +4 -0
- sage/modular/btquotients/btquotient.py +3753 -0
- sage/modular/btquotients/pautomorphicform.py +2570 -0
- sage/modular/buzzard.py +100 -0
- sage/modular/congroup.py +29 -0
- sage/modular/congroup_element.py +13 -0
- sage/modular/cusps.py +1109 -0
- sage/modular/cusps_nf.py +1270 -0
- sage/modular/dims.py +569 -0
- sage/modular/dirichlet.py +3310 -0
- sage/modular/drinfeld_modform/all.py +2 -0
- sage/modular/drinfeld_modform/element.py +446 -0
- sage/modular/drinfeld_modform/ring.py +773 -0
- sage/modular/drinfeld_modform/tutorial.py +236 -0
- sage/modular/etaproducts.py +1065 -0
- sage/modular/hecke/algebra.py +746 -0
- sage/modular/hecke/all.py +20 -0
- sage/modular/hecke/ambient_module.py +1019 -0
- sage/modular/hecke/degenmap.py +119 -0
- sage/modular/hecke/element.py +325 -0
- sage/modular/hecke/hecke_operator.py +780 -0
- sage/modular/hecke/homspace.py +206 -0
- sage/modular/hecke/module.py +1767 -0
- sage/modular/hecke/morphism.py +174 -0
- sage/modular/hecke/submodule.py +989 -0
- sage/modular/hypergeometric_misc.cpython-314t-darwin.so +0 -0
- sage/modular/hypergeometric_misc.pxd +4 -0
- sage/modular/hypergeometric_misc.pyx +166 -0
- sage/modular/hypergeometric_motive.py +2017 -0
- sage/modular/local_comp/all.py +2 -0
- sage/modular/local_comp/liftings.py +292 -0
- sage/modular/local_comp/local_comp.py +1071 -0
- sage/modular/local_comp/smoothchar.py +1825 -0
- sage/modular/local_comp/type_space.py +748 -0
- sage/modular/modform/all.py +30 -0
- sage/modular/modform/ambient.py +815 -0
- sage/modular/modform/ambient_R.py +177 -0
- sage/modular/modform/ambient_eps.py +306 -0
- sage/modular/modform/ambient_g0.py +124 -0
- sage/modular/modform/ambient_g1.py +204 -0
- sage/modular/modform/constructor.py +545 -0
- sage/modular/modform/cuspidal_submodule.py +708 -0
- sage/modular/modform/defaults.py +14 -0
- sage/modular/modform/eis_series.py +505 -0
- sage/modular/modform/eisenstein_submodule.py +663 -0
- sage/modular/modform/element.py +4131 -0
- sage/modular/modform/find_generators.py +59 -0
- sage/modular/modform/half_integral.py +154 -0
- sage/modular/modform/hecke_operator_on_qexp.py +247 -0
- sage/modular/modform/j_invariant.py +47 -0
- sage/modular/modform/l_series_gross_zagier.py +133 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.cpython-314t-darwin.so +0 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.pyx +177 -0
- sage/modular/modform/notes.py +45 -0
- sage/modular/modform/numerical.py +514 -0
- sage/modular/modform/periods.py +14 -0
- sage/modular/modform/ring.py +1257 -0
- sage/modular/modform/space.py +1860 -0
- sage/modular/modform/submodule.py +118 -0
- sage/modular/modform/tests.py +64 -0
- sage/modular/modform/theta.py +110 -0
- sage/modular/modform/vm_basis.py +381 -0
- sage/modular/modform/weight1.py +220 -0
- sage/modular/modform_hecketriangle/abstract_ring.py +1932 -0
- sage/modular/modform_hecketriangle/abstract_space.py +2528 -0
- sage/modular/modform_hecketriangle/all.py +30 -0
- sage/modular/modform_hecketriangle/analytic_type.py +590 -0
- sage/modular/modform_hecketriangle/constructor.py +416 -0
- sage/modular/modform_hecketriangle/element.py +351 -0
- sage/modular/modform_hecketriangle/functors.py +752 -0
- sage/modular/modform_hecketriangle/graded_ring.py +541 -0
- sage/modular/modform_hecketriangle/graded_ring_element.py +2225 -0
- sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +3352 -0
- sage/modular/modform_hecketriangle/hecke_triangle_groups.py +1432 -0
- sage/modular/modform_hecketriangle/readme.py +1214 -0
- sage/modular/modform_hecketriangle/series_constructor.py +580 -0
- sage/modular/modform_hecketriangle/space.py +1037 -0
- sage/modular/modform_hecketriangle/subspace.py +423 -0
- sage/modular/modsym/all.py +17 -0
- sage/modular/modsym/ambient.py +3846 -0
- sage/modular/modsym/boundary.py +1420 -0
- sage/modular/modsym/element.py +336 -0
- sage/modular/modsym/g1list.py +178 -0
- sage/modular/modsym/ghlist.py +182 -0
- sage/modular/modsym/hecke_operator.py +73 -0
- sage/modular/modsym/manin_symbol.cpython-314t-darwin.so +0 -0
- sage/modular/modsym/manin_symbol.pxd +5 -0
- sage/modular/modsym/manin_symbol.pyx +497 -0
- sage/modular/modsym/manin_symbol_list.py +1295 -0
- sage/modular/modsym/modsym.py +400 -0
- sage/modular/modsym/modular_symbols.py +384 -0
- sage/modular/modsym/p1list.cpython-314t-darwin.so +0 -0
- sage/modular/modsym/p1list.pxd +29 -0
- sage/modular/modsym/p1list.pyx +1372 -0
- sage/modular/modsym/p1list_nf.py +1241 -0
- sage/modular/modsym/relation_matrix.py +591 -0
- sage/modular/modsym/relation_matrix_pyx.cpython-314t-darwin.so +0 -0
- sage/modular/modsym/relation_matrix_pyx.pyx +108 -0
- sage/modular/modsym/space.py +2468 -0
- sage/modular/modsym/subspace.py +455 -0
- sage/modular/modsym/tests.py +375 -0
- sage/modular/multiple_zeta.py +2632 -0
- sage/modular/multiple_zeta_F_algebra.py +786 -0
- sage/modular/overconvergent/all.py +6 -0
- sage/modular/overconvergent/genus0.py +1878 -0
- sage/modular/overconvergent/hecke_series.py +1187 -0
- sage/modular/overconvergent/weightspace.py +778 -0
- sage/modular/pollack_stevens/all.py +4 -0
- sage/modular/pollack_stevens/distributions.py +874 -0
- sage/modular/pollack_stevens/fund_domain.py +1572 -0
- sage/modular/pollack_stevens/manin_map.py +859 -0
- sage/modular/pollack_stevens/modsym.py +1593 -0
- sage/modular/pollack_stevens/padic_lseries.py +417 -0
- sage/modular/pollack_stevens/sigma0.py +534 -0
- sage/modular/pollack_stevens/space.py +1076 -0
- sage/modular/quasimodform/all.py +3 -0
- sage/modular/quasimodform/element.py +845 -0
- sage/modular/quasimodform/ring.py +828 -0
- sage/modular/quatalg/all.py +3 -0
- sage/modular/quatalg/brandt.py +1642 -0
- sage/modular/ssmod/all.py +8 -0
- sage/modular/ssmod/ssmod.py +827 -0
- sage/rings/all__sagemath_schemes.py +1 -0
- sage/rings/polynomial/all__sagemath_schemes.py +1 -0
- sage/rings/polynomial/binary_form_reduce.py +585 -0
- sage/schemes/all.py +41 -0
- sage/schemes/berkovich/all.py +6 -0
- sage/schemes/berkovich/berkovich_cp_element.py +2582 -0
- sage/schemes/berkovich/berkovich_space.py +748 -0
- sage/schemes/curves/affine_curve.py +2928 -0
- sage/schemes/curves/all.py +33 -0
- sage/schemes/curves/closed_point.py +434 -0
- sage/schemes/curves/constructor.py +381 -0
- sage/schemes/curves/curve.py +542 -0
- sage/schemes/curves/plane_curve_arrangement.py +1283 -0
- sage/schemes/curves/point.py +463 -0
- sage/schemes/curves/projective_curve.py +3026 -0
- sage/schemes/curves/zariski_vankampen.py +1932 -0
- sage/schemes/cyclic_covers/all.py +2 -0
- sage/schemes/cyclic_covers/charpoly_frobenius.py +320 -0
- sage/schemes/cyclic_covers/constructor.py +137 -0
- sage/schemes/cyclic_covers/cycliccover_finite_field.py +1309 -0
- sage/schemes/cyclic_covers/cycliccover_generic.py +310 -0
- sage/schemes/elliptic_curves/BSD.py +1036 -0
- sage/schemes/elliptic_curves/Qcurves.py +592 -0
- sage/schemes/elliptic_curves/addition_formulas_ring.py +94 -0
- sage/schemes/elliptic_curves/all.py +49 -0
- sage/schemes/elliptic_curves/cardinality.py +609 -0
- sage/schemes/elliptic_curves/cm.py +1102 -0
- sage/schemes/elliptic_curves/constructor.py +1552 -0
- sage/schemes/elliptic_curves/ec_database.py +175 -0
- sage/schemes/elliptic_curves/ell_curve_isogeny.py +3972 -0
- sage/schemes/elliptic_curves/ell_egros.py +459 -0
- sage/schemes/elliptic_curves/ell_field.py +2836 -0
- sage/schemes/elliptic_curves/ell_finite_field.py +3359 -0
- sage/schemes/elliptic_curves/ell_generic.py +3760 -0
- sage/schemes/elliptic_curves/ell_local_data.py +1207 -0
- sage/schemes/elliptic_curves/ell_modular_symbols.py +775 -0
- sage/schemes/elliptic_curves/ell_number_field.py +4220 -0
- sage/schemes/elliptic_curves/ell_padic_field.py +107 -0
- sage/schemes/elliptic_curves/ell_point.py +4787 -0
- sage/schemes/elliptic_curves/ell_rational_field.py +7368 -0
- sage/schemes/elliptic_curves/ell_tate_curve.py +671 -0
- sage/schemes/elliptic_curves/ell_torsion.py +436 -0
- sage/schemes/elliptic_curves/ell_wp.py +352 -0
- sage/schemes/elliptic_curves/formal_group.py +760 -0
- sage/schemes/elliptic_curves/gal_reps.py +1459 -0
- sage/schemes/elliptic_curves/gal_reps_number_field.py +1669 -0
- sage/schemes/elliptic_curves/gp_simon.py +152 -0
- sage/schemes/elliptic_curves/heegner.py +7335 -0
- sage/schemes/elliptic_curves/height.py +2109 -0
- sage/schemes/elliptic_curves/hom.py +1406 -0
- sage/schemes/elliptic_curves/hom_composite.py +934 -0
- sage/schemes/elliptic_curves/hom_frobenius.py +522 -0
- sage/schemes/elliptic_curves/hom_scalar.py +531 -0
- sage/schemes/elliptic_curves/hom_sum.py +682 -0
- sage/schemes/elliptic_curves/hom_velusqrt.py +1290 -0
- sage/schemes/elliptic_curves/homset.py +271 -0
- sage/schemes/elliptic_curves/isogeny_class.py +1521 -0
- sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
- sage/schemes/elliptic_curves/jacobian.py +237 -0
- sage/schemes/elliptic_curves/kodaira_symbol.py +344 -0
- sage/schemes/elliptic_curves/kraus.py +1014 -0
- sage/schemes/elliptic_curves/lseries_ell.py +943 -0
- sage/schemes/elliptic_curves/mod5family.py +105 -0
- sage/schemes/elliptic_curves/mod_poly.py +197 -0
- sage/schemes/elliptic_curves/mod_sym_num.cpython-314t-darwin.so +0 -0
- sage/schemes/elliptic_curves/mod_sym_num.pyx +3796 -0
- sage/schemes/elliptic_curves/modular_parametrization.py +305 -0
- sage/schemes/elliptic_curves/padic_lseries.py +1793 -0
- sage/schemes/elliptic_curves/padics.py +1816 -0
- sage/schemes/elliptic_curves/period_lattice.py +2234 -0
- sage/schemes/elliptic_curves/period_lattice_region.cpython-314t-darwin.so +0 -0
- sage/schemes/elliptic_curves/period_lattice_region.pyx +722 -0
- sage/schemes/elliptic_curves/saturation.py +715 -0
- sage/schemes/elliptic_curves/sha_tate.py +1158 -0
- sage/schemes/elliptic_curves/weierstrass_morphism.py +1117 -0
- sage/schemes/elliptic_curves/weierstrass_transform.py +200 -0
- sage/schemes/hyperelliptic_curves/all.py +6 -0
- sage/schemes/hyperelliptic_curves/constructor.py +291 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1914 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +954 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +1332 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +84 -0
- sage/schemes/hyperelliptic_curves/invariants.py +410 -0
- sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +315 -0
- sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
- sage/schemes/hyperelliptic_curves/jacobian_generic.py +419 -0
- sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
- sage/schemes/hyperelliptic_curves/jacobian_morphism.py +875 -0
- sage/schemes/hyperelliptic_curves/kummer_surface.py +99 -0
- sage/schemes/hyperelliptic_curves/mestre.py +302 -0
- sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +3871 -0
- sage/schemes/jacobians/abstract_jacobian.py +277 -0
- sage/schemes/jacobians/all.py +2 -0
- sage/schemes/overview.py +161 -0
- sage/schemes/plane_conics/all.py +22 -0
- sage/schemes/plane_conics/con_field.py +1296 -0
- sage/schemes/plane_conics/con_finite_field.py +158 -0
- sage/schemes/plane_conics/con_number_field.py +456 -0
- sage/schemes/plane_conics/con_rational_field.py +406 -0
- sage/schemes/plane_conics/con_rational_function_field.py +580 -0
- sage/schemes/plane_conics/constructor.py +249 -0
- sage/schemes/plane_quartics/all.py +2 -0
- sage/schemes/plane_quartics/quartic_constructor.py +71 -0
- sage/schemes/plane_quartics/quartic_generic.py +73 -0
- sage/schemes/riemann_surfaces/all.py +1 -0
- sage/schemes/riemann_surfaces/riemann_surface.py +4117 -0
- sage_wheels/share/cremona/cremona_mini.db +0 -0
- sage_wheels/share/ellcurves/rank0 +30427 -0
- sage_wheels/share/ellcurves/rank1 +31871 -0
- sage_wheels/share/ellcurves/rank10 +6 -0
- sage_wheels/share/ellcurves/rank11 +6 -0
- sage_wheels/share/ellcurves/rank12 +1 -0
- sage_wheels/share/ellcurves/rank14 +1 -0
- sage_wheels/share/ellcurves/rank15 +1 -0
- sage_wheels/share/ellcurves/rank17 +1 -0
- sage_wheels/share/ellcurves/rank19 +1 -0
- sage_wheels/share/ellcurves/rank2 +2388 -0
- sage_wheels/share/ellcurves/rank20 +1 -0
- sage_wheels/share/ellcurves/rank21 +1 -0
- sage_wheels/share/ellcurves/rank22 +1 -0
- sage_wheels/share/ellcurves/rank23 +1 -0
- sage_wheels/share/ellcurves/rank24 +1 -0
- sage_wheels/share/ellcurves/rank28 +1 -0
- sage_wheels/share/ellcurves/rank3 +836 -0
- sage_wheels/share/ellcurves/rank4 +10 -0
- sage_wheels/share/ellcurves/rank5 +5 -0
- sage_wheels/share/ellcurves/rank6 +5 -0
- sage_wheels/share/ellcurves/rank7 +5 -0
- sage_wheels/share/ellcurves/rank8 +6 -0
- sage_wheels/share/ellcurves/rank9 +7 -0
sage/modular/dims.py
ADDED
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.libs.pari
|
|
3
|
+
r"""
|
|
4
|
+
Dimensions of spaces of modular forms
|
|
5
|
+
|
|
6
|
+
AUTHORS:
|
|
7
|
+
|
|
8
|
+
- William Stein
|
|
9
|
+
|
|
10
|
+
- Jordi Quer
|
|
11
|
+
|
|
12
|
+
ACKNOWLEDGEMENT: The dimension formulas and implementations in this
|
|
13
|
+
module grew out of a program that Bruce Kaskel wrote (around 1996)
|
|
14
|
+
in PARI, which Kevin Buzzard subsequently extended. I (William
|
|
15
|
+
Stein) then implemented it in C++ for Hecke. I also implemented it
|
|
16
|
+
in Magma. Also, the functions for dimensions of spaces with
|
|
17
|
+
nontrivial character are based on a paper (that has no proofs) by
|
|
18
|
+
Cohen and Oesterlé [CO1977]_. The formulas for `\Gamma_H(N)` were found
|
|
19
|
+
and implemented by Jordi Quer.
|
|
20
|
+
|
|
21
|
+
The formulas here are more complete than in Hecke or Magma.
|
|
22
|
+
|
|
23
|
+
Currently the input to each function below is an integer and either a Dirichlet
|
|
24
|
+
character `\varepsilon` or a finite index subgroup of `\SL_2(\ZZ)`.
|
|
25
|
+
If the input is a Dirichlet character `\varepsilon`, the dimensions are for
|
|
26
|
+
subspaces of `M_k(\Gamma_1(N), \varepsilon)`, where `N` is the modulus of
|
|
27
|
+
`\varepsilon`.
|
|
28
|
+
|
|
29
|
+
These functions mostly call the methods ``dimension_cusp_forms``,
|
|
30
|
+
``dimension_modular_forms`` and so on of the corresponding congruence subgroup
|
|
31
|
+
classes.
|
|
32
|
+
|
|
33
|
+
REFERENCES:
|
|
34
|
+
|
|
35
|
+
.. [CO1977] \H. Cohen, J. Oesterlé, *Dimensions des espaces de formes
|
|
36
|
+
modulaires*, p. 69-78 in Modular functions in one variable VI.
|
|
37
|
+
Lecture Notes in Math. 627, Springer-Verlag, NewYork, 1977.
|
|
38
|
+
"""
|
|
39
|
+
# ****************************************************************************
|
|
40
|
+
# Copyright (C) 2004-2008 William Stein <wstein@gmail.com>
|
|
41
|
+
#
|
|
42
|
+
# This program is free software: you can redistribute it and/or modify
|
|
43
|
+
# it under the terms of the GNU General Public License as published by
|
|
44
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
45
|
+
# (at your option) any later version.
|
|
46
|
+
# https://www.gnu.org/licenses/
|
|
47
|
+
# ****************************************************************************
|
|
48
|
+
|
|
49
|
+
from sage.arith.misc import factor, is_prime, valuation
|
|
50
|
+
from sage.misc.misc_c import prod
|
|
51
|
+
from sage.modular.arithgroup.all import (Gamma0, Gamma1, ArithmeticSubgroup,
|
|
52
|
+
GammaH_class)
|
|
53
|
+
from sage.rings.finite_rings.integer_mod import Mod
|
|
54
|
+
from sage.rings.finite_rings.integer_mod_ring import IntegerModRing
|
|
55
|
+
from sage.rings.integer import Integer
|
|
56
|
+
from sage.rings.rational_field import frac
|
|
57
|
+
|
|
58
|
+
from sage.modular import dirichlet
|
|
59
|
+
|
|
60
|
+
##########################################################################
|
|
61
|
+
# Helper functions for calculating dimensions of spaces of modular forms
|
|
62
|
+
##########################################################################
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def eisen(p):
|
|
66
|
+
"""
|
|
67
|
+
Return the Eisenstein number `n` which is the numerator of `(p-1)/12`.
|
|
68
|
+
|
|
69
|
+
INPUT:
|
|
70
|
+
|
|
71
|
+
- ``p`` -- a prime
|
|
72
|
+
|
|
73
|
+
OUTPUT: integer
|
|
74
|
+
|
|
75
|
+
EXAMPLES::
|
|
76
|
+
|
|
77
|
+
sage: [(p, sage.modular.dims.eisen(p)) for p in prime_range(24)]
|
|
78
|
+
[(2, 1), (3, 1), (5, 1), (7, 1), (11, 5), (13, 1), (17, 4),
|
|
79
|
+
(19, 3), (23, 11)]
|
|
80
|
+
"""
|
|
81
|
+
if not is_prime(p):
|
|
82
|
+
raise ValueError("p must be prime")
|
|
83
|
+
return frac(p - 1, 12).numerator()
|
|
84
|
+
|
|
85
|
+
##########################################################################
|
|
86
|
+
# Formula of Cohen-Oesterlé for dim S_k(Gamma_1(N),eps). REF:
|
|
87
|
+
# Springer Lecture notes in math, volume 627, pages 69--78. The
|
|
88
|
+
# functions CO_delta and CO_nu, which were first written by Kevin
|
|
89
|
+
# Buzzard, are used only by the function CohenOesterle.
|
|
90
|
+
##########################################################################
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def CO_delta(r, p, N, eps):
|
|
94
|
+
r"""
|
|
95
|
+
This is used as an intermediate value in computations related to
|
|
96
|
+
the paper of Cohen-Oesterlé.
|
|
97
|
+
|
|
98
|
+
INPUT:
|
|
99
|
+
|
|
100
|
+
- ``r`` -- positive integer
|
|
101
|
+
|
|
102
|
+
- ``p`` -- a prime
|
|
103
|
+
|
|
104
|
+
- ``N`` -- positive integer
|
|
105
|
+
|
|
106
|
+
- ``eps`` -- character
|
|
107
|
+
|
|
108
|
+
OUTPUT: element of the base ring of the character
|
|
109
|
+
|
|
110
|
+
EXAMPLES::
|
|
111
|
+
|
|
112
|
+
sage: G.<eps> = DirichletGroup(7)
|
|
113
|
+
sage: sage.modular.dims.CO_delta(1,5,7,eps^3)
|
|
114
|
+
2
|
|
115
|
+
"""
|
|
116
|
+
K = eps.base_ring()
|
|
117
|
+
if p % 4 == 3:
|
|
118
|
+
return K.zero()
|
|
119
|
+
if p == 2:
|
|
120
|
+
if r == 1:
|
|
121
|
+
return K.one()
|
|
122
|
+
return K.zero()
|
|
123
|
+
# interesting case: p=1(mod 4).
|
|
124
|
+
# omega is a primitive 4th root of unity mod p.
|
|
125
|
+
omega = (IntegerModRing(p).unit_gens()[0])**((p - 1) // 4)
|
|
126
|
+
# this n is within a p-power root of a "local" 4th root of 1 modulo p.
|
|
127
|
+
n = Mod(int(omega.crt(Mod(1, N // (p**r)))), N)
|
|
128
|
+
n = n**(p**(r - 1)) # this is correct now
|
|
129
|
+
t = eps(n)
|
|
130
|
+
if t == K.one():
|
|
131
|
+
return K(2)
|
|
132
|
+
if t == -K.one():
|
|
133
|
+
return K(-2)
|
|
134
|
+
return K.zero()
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
def CO_nu(r, p, N, eps):
|
|
138
|
+
r"""
|
|
139
|
+
This is used as an intermediate value in computations related to
|
|
140
|
+
the paper of Cohen-Oesterlé.
|
|
141
|
+
|
|
142
|
+
INPUT:
|
|
143
|
+
|
|
144
|
+
- ``r`` -- positive integer
|
|
145
|
+
|
|
146
|
+
- ``p`` -- a prime
|
|
147
|
+
|
|
148
|
+
- ``N`` -- positive integer
|
|
149
|
+
|
|
150
|
+
- ``eps`` -- character
|
|
151
|
+
|
|
152
|
+
OUTPUT: element of the base ring of the character
|
|
153
|
+
|
|
154
|
+
EXAMPLES::
|
|
155
|
+
|
|
156
|
+
sage: G.<eps> = DirichletGroup(7)
|
|
157
|
+
sage: G.<eps> = DirichletGroup(7)
|
|
158
|
+
sage: sage.modular.dims.CO_nu(1,7,7,eps)
|
|
159
|
+
-1
|
|
160
|
+
"""
|
|
161
|
+
K = eps.base_ring()
|
|
162
|
+
if p % 3 == 2:
|
|
163
|
+
return K.zero()
|
|
164
|
+
if p == 3:
|
|
165
|
+
if r == 1:
|
|
166
|
+
return K.one()
|
|
167
|
+
return K.zero()
|
|
168
|
+
# interesting case: p=1(mod 3)
|
|
169
|
+
# omega is a cube root of 1 mod p.
|
|
170
|
+
omega = (IntegerModRing(p).unit_gens()[0])**((p - 1) // 3)
|
|
171
|
+
n = Mod(omega.crt(Mod(1, N // (p**r))), N)
|
|
172
|
+
# within a p-power root of a "local" cube root of 1 mod p.
|
|
173
|
+
n = n**(p**(r - 1)) # this is right now
|
|
174
|
+
t = eps(n)
|
|
175
|
+
if t == K.one():
|
|
176
|
+
return K(2)
|
|
177
|
+
return -K.one()
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def CohenOesterle(eps, k):
|
|
181
|
+
r"""
|
|
182
|
+
Compute the Cohen-Oesterlé function associate to eps, `k`.
|
|
183
|
+
|
|
184
|
+
This is a summand in the formula for the dimension of the space of
|
|
185
|
+
cusp forms of weight `2` with character `\varepsilon`.
|
|
186
|
+
|
|
187
|
+
INPUT:
|
|
188
|
+
|
|
189
|
+
- ``eps`` -- Dirichlet character
|
|
190
|
+
|
|
191
|
+
- ``k`` -- integer
|
|
192
|
+
|
|
193
|
+
OUTPUT: element of the base ring of eps
|
|
194
|
+
|
|
195
|
+
EXAMPLES::
|
|
196
|
+
|
|
197
|
+
sage: G.<eps> = DirichletGroup(7)
|
|
198
|
+
sage: sage.modular.dims.CohenOesterle(eps, 2)
|
|
199
|
+
-2/3
|
|
200
|
+
sage: sage.modular.dims.CohenOesterle(eps, 4)
|
|
201
|
+
-1
|
|
202
|
+
"""
|
|
203
|
+
N = eps.modulus()
|
|
204
|
+
facN = factor(N)
|
|
205
|
+
f = eps.conductor()
|
|
206
|
+
gamma_k = 0
|
|
207
|
+
if k % 4 == 2:
|
|
208
|
+
gamma_k = frac(-1, 4)
|
|
209
|
+
elif k % 4 == 0:
|
|
210
|
+
gamma_k = frac(1, 4)
|
|
211
|
+
mu_k = 0
|
|
212
|
+
if k % 3 == 2:
|
|
213
|
+
mu_k = frac(-1, 3)
|
|
214
|
+
elif k % 3 == 0:
|
|
215
|
+
mu_k = frac(1, 3)
|
|
216
|
+
|
|
217
|
+
def _lambda(r, s, p):
|
|
218
|
+
"""
|
|
219
|
+
Used internally by the CohenOesterle function.
|
|
220
|
+
|
|
221
|
+
INPUT:
|
|
222
|
+
|
|
223
|
+
- ``r``, ``s``, ``p`` -- integers
|
|
224
|
+
|
|
225
|
+
OUTPUT: integer
|
|
226
|
+
|
|
227
|
+
EXAMPLES: (indirect doctest)
|
|
228
|
+
|
|
229
|
+
::
|
|
230
|
+
|
|
231
|
+
sage: # needs sage.rings.number_field
|
|
232
|
+
sage: K = CyclotomicField(3)
|
|
233
|
+
sage: eps = DirichletGroup(7*43, K).0^2
|
|
234
|
+
sage: sage.modular.dims.CohenOesterle(eps, 2)
|
|
235
|
+
-4/3
|
|
236
|
+
"""
|
|
237
|
+
if 2 * s <= r:
|
|
238
|
+
if r % 2 == 0:
|
|
239
|
+
return p**(r // 2) + p**((r // 2) - 1)
|
|
240
|
+
return 2 * p**((r - 1) // 2)
|
|
241
|
+
return 2 * p**(r - s)
|
|
242
|
+
|
|
243
|
+
K = eps.base_ring()
|
|
244
|
+
return K(frac(-1, 2) *
|
|
245
|
+
prod(_lambda(r, valuation(f, p), p) for p, r in facN) +
|
|
246
|
+
gamma_k * K.prod(CO_delta(r, p, N, eps) for p, r in facN) +
|
|
247
|
+
mu_k * K.prod(CO_nu(r, p, N, eps) for p, r in facN))
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
####################################################################
|
|
251
|
+
# Functions exported to the global namespace.
|
|
252
|
+
# These have very flexible inputs.
|
|
253
|
+
####################################################################
|
|
254
|
+
|
|
255
|
+
def dimension_new_cusp_forms(X, k=2, p=0):
|
|
256
|
+
"""
|
|
257
|
+
Return the dimension of the new (or `p`-new) subspace of
|
|
258
|
+
cusp forms for the character or group `X`.
|
|
259
|
+
|
|
260
|
+
INPUT:
|
|
261
|
+
|
|
262
|
+
- ``X`` -- integer, congruence subgroup or Dirichlet
|
|
263
|
+
character
|
|
264
|
+
|
|
265
|
+
- ``k`` -- weight (integer)
|
|
266
|
+
|
|
267
|
+
- ``p`` -- 0 or a prime
|
|
268
|
+
|
|
269
|
+
EXAMPLES::
|
|
270
|
+
|
|
271
|
+
sage: from sage.modular.dims import dimension_new_cusp_forms
|
|
272
|
+
sage: dimension_new_cusp_forms(100,2)
|
|
273
|
+
1
|
|
274
|
+
|
|
275
|
+
sage: dimension_new_cusp_forms(Gamma0(100),2)
|
|
276
|
+
1
|
|
277
|
+
sage: dimension_new_cusp_forms(Gamma0(100),4)
|
|
278
|
+
5
|
|
279
|
+
|
|
280
|
+
sage: dimension_new_cusp_forms(Gamma1(100),2)
|
|
281
|
+
141
|
|
282
|
+
sage: dimension_new_cusp_forms(Gamma1(100),4)
|
|
283
|
+
463
|
|
284
|
+
|
|
285
|
+
sage: dimension_new_cusp_forms(DirichletGroup(100).1^2,2)
|
|
286
|
+
2
|
|
287
|
+
sage: dimension_new_cusp_forms(DirichletGroup(100).1^2,4)
|
|
288
|
+
8
|
|
289
|
+
|
|
290
|
+
sage: sum(dimension_new_cusp_forms(e,3) for e in DirichletGroup(30))
|
|
291
|
+
12
|
|
292
|
+
sage: dimension_new_cusp_forms(Gamma1(30),3)
|
|
293
|
+
12
|
|
294
|
+
|
|
295
|
+
Check that :issue:`12640` is fixed::
|
|
296
|
+
|
|
297
|
+
sage: dimension_new_cusp_forms(DirichletGroup(1)(1), 12)
|
|
298
|
+
1
|
|
299
|
+
sage: dimension_new_cusp_forms(DirichletGroup(2)(1), 24)
|
|
300
|
+
1
|
|
301
|
+
"""
|
|
302
|
+
if isinstance(X, GammaH_class):
|
|
303
|
+
return X.dimension_new_cusp_forms(k, p=p)
|
|
304
|
+
elif isinstance(X, dirichlet.DirichletCharacter):
|
|
305
|
+
N = X.modulus()
|
|
306
|
+
if N <= 2:
|
|
307
|
+
return Gamma0(N).dimension_new_cusp_forms(k, p=p)
|
|
308
|
+
else:
|
|
309
|
+
# Gamma1(N) for N<=2 just returns Gamma0(N), which has no
|
|
310
|
+
# eps parameter. See trac #12640.
|
|
311
|
+
return Gamma1(N).dimension_new_cusp_forms(k, eps=X, p=p)
|
|
312
|
+
elif isinstance(X, (int, Integer)):
|
|
313
|
+
return Gamma0(X).dimension_new_cusp_forms(k, p=p)
|
|
314
|
+
raise TypeError(f"X (={X}) must be an integer, a Dirichlet character or a congruence subgroup of type Gamma0, Gamma1 or GammaH")
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
def dimension_cusp_forms(X, k=2):
|
|
318
|
+
r"""
|
|
319
|
+
The dimension of the space of cusp forms for the given congruence
|
|
320
|
+
subgroup or Dirichlet character.
|
|
321
|
+
|
|
322
|
+
INPUT:
|
|
323
|
+
|
|
324
|
+
- ``X`` -- congruence subgroup or Dirichlet character
|
|
325
|
+
or integer
|
|
326
|
+
|
|
327
|
+
- ``k`` -- weight (integer)
|
|
328
|
+
|
|
329
|
+
EXAMPLES::
|
|
330
|
+
|
|
331
|
+
sage: from sage.modular.dims import dimension_cusp_forms
|
|
332
|
+
sage: dimension_cusp_forms(5,4)
|
|
333
|
+
1
|
|
334
|
+
|
|
335
|
+
sage: dimension_cusp_forms(Gamma0(11),2)
|
|
336
|
+
1
|
|
337
|
+
sage: dimension_cusp_forms(Gamma1(13),2)
|
|
338
|
+
2
|
|
339
|
+
|
|
340
|
+
sage: dimension_cusp_forms(DirichletGroup(13).0^2,2)
|
|
341
|
+
1
|
|
342
|
+
sage: dimension_cusp_forms(DirichletGroup(13).0,3)
|
|
343
|
+
1
|
|
344
|
+
|
|
345
|
+
sage: dimension_cusp_forms(Gamma0(11),2)
|
|
346
|
+
1
|
|
347
|
+
sage: dimension_cusp_forms(Gamma0(11),0)
|
|
348
|
+
0
|
|
349
|
+
sage: dimension_cusp_forms(Gamma0(1),12)
|
|
350
|
+
1
|
|
351
|
+
sage: dimension_cusp_forms(Gamma0(1),2)
|
|
352
|
+
0
|
|
353
|
+
sage: dimension_cusp_forms(Gamma0(1),4)
|
|
354
|
+
0
|
|
355
|
+
|
|
356
|
+
sage: dimension_cusp_forms(Gamma0(389),2)
|
|
357
|
+
32
|
|
358
|
+
sage: dimension_cusp_forms(Gamma0(389),4)
|
|
359
|
+
97
|
|
360
|
+
sage: dimension_cusp_forms(Gamma0(2005),2)
|
|
361
|
+
199
|
|
362
|
+
sage: dimension_cusp_forms(Gamma0(11),1)
|
|
363
|
+
0
|
|
364
|
+
|
|
365
|
+
sage: dimension_cusp_forms(Gamma1(11),2)
|
|
366
|
+
1
|
|
367
|
+
sage: dimension_cusp_forms(Gamma1(1),12)
|
|
368
|
+
1
|
|
369
|
+
sage: dimension_cusp_forms(Gamma1(1),2)
|
|
370
|
+
0
|
|
371
|
+
sage: dimension_cusp_forms(Gamma1(1),4)
|
|
372
|
+
0
|
|
373
|
+
|
|
374
|
+
sage: dimension_cusp_forms(Gamma1(389),2)
|
|
375
|
+
6112
|
|
376
|
+
sage: dimension_cusp_forms(Gamma1(389),4)
|
|
377
|
+
18721
|
|
378
|
+
sage: dimension_cusp_forms(Gamma1(2005),2)
|
|
379
|
+
159201
|
|
380
|
+
|
|
381
|
+
sage: dimension_cusp_forms(Gamma1(11),1)
|
|
382
|
+
0
|
|
383
|
+
|
|
384
|
+
sage: e = DirichletGroup(13).0
|
|
385
|
+
sage: e.order()
|
|
386
|
+
12
|
|
387
|
+
sage: dimension_cusp_forms(e,2)
|
|
388
|
+
0
|
|
389
|
+
sage: dimension_cusp_forms(e^2,2)
|
|
390
|
+
1
|
|
391
|
+
|
|
392
|
+
Check that :issue:`12640` is fixed::
|
|
393
|
+
|
|
394
|
+
sage: dimension_cusp_forms(DirichletGroup(1)(1), 12)
|
|
395
|
+
1
|
|
396
|
+
sage: dimension_cusp_forms(DirichletGroup(2)(1), 24)
|
|
397
|
+
5
|
|
398
|
+
"""
|
|
399
|
+
if isinstance(X, dirichlet.DirichletCharacter):
|
|
400
|
+
N = X.modulus()
|
|
401
|
+
if N <= 2:
|
|
402
|
+
return Gamma0(N).dimension_cusp_forms(k)
|
|
403
|
+
else:
|
|
404
|
+
return Gamma1(N).dimension_cusp_forms(k, X)
|
|
405
|
+
elif isinstance(X, ArithmeticSubgroup):
|
|
406
|
+
return X.dimension_cusp_forms(k)
|
|
407
|
+
elif isinstance(X, (int, Integer)):
|
|
408
|
+
return Gamma0(X).dimension_cusp_forms(k)
|
|
409
|
+
raise TypeError("argument 1 must be a Dirichlet character, an integer "
|
|
410
|
+
"or a finite index subgroup of SL2Z")
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
def dimension_eis(X, k=2):
|
|
414
|
+
"""
|
|
415
|
+
The dimension of the space of Eisenstein series for the given
|
|
416
|
+
congruence subgroup.
|
|
417
|
+
|
|
418
|
+
INPUT:
|
|
419
|
+
|
|
420
|
+
- ``X`` -- congruence subgroup or Dirichlet character
|
|
421
|
+
or integer
|
|
422
|
+
|
|
423
|
+
- ``k`` -- integer; weight
|
|
424
|
+
|
|
425
|
+
EXAMPLES::
|
|
426
|
+
|
|
427
|
+
sage: from sage.modular.dims import dimension_eis
|
|
428
|
+
sage: dimension_eis(5,4)
|
|
429
|
+
2
|
|
430
|
+
|
|
431
|
+
sage: dimension_eis(Gamma0(11),2)
|
|
432
|
+
1
|
|
433
|
+
sage: dimension_eis(Gamma1(13),2)
|
|
434
|
+
11
|
|
435
|
+
sage: dimension_eis(Gamma1(2006),2)
|
|
436
|
+
3711
|
|
437
|
+
|
|
438
|
+
sage: e = DirichletGroup(13).0
|
|
439
|
+
sage: e.order()
|
|
440
|
+
12
|
|
441
|
+
sage: dimension_eis(e,2)
|
|
442
|
+
0
|
|
443
|
+
sage: dimension_eis(e^2,2)
|
|
444
|
+
2
|
|
445
|
+
|
|
446
|
+
sage: e = DirichletGroup(13).0
|
|
447
|
+
sage: e.order()
|
|
448
|
+
12
|
|
449
|
+
sage: dimension_eis(e,2)
|
|
450
|
+
0
|
|
451
|
+
sage: dimension_eis(e^2,2)
|
|
452
|
+
2
|
|
453
|
+
sage: dimension_eis(e,13)
|
|
454
|
+
2
|
|
455
|
+
|
|
456
|
+
sage: G = DirichletGroup(20)
|
|
457
|
+
sage: dimension_eis(G.0,3)
|
|
458
|
+
4
|
|
459
|
+
sage: dimension_eis(G.1,3)
|
|
460
|
+
6
|
|
461
|
+
sage: dimension_eis(G.1^2,2)
|
|
462
|
+
6
|
|
463
|
+
|
|
464
|
+
sage: G = DirichletGroup(200)
|
|
465
|
+
sage: e = prod(G.gens(), G(1))
|
|
466
|
+
sage: e.conductor()
|
|
467
|
+
200
|
|
468
|
+
sage: dimension_eis(e,2)
|
|
469
|
+
4
|
|
470
|
+
|
|
471
|
+
sage: from sage.modular.dims import dimension_modular_forms
|
|
472
|
+
sage: dimension_modular_forms(Gamma1(4), 11)
|
|
473
|
+
6
|
|
474
|
+
"""
|
|
475
|
+
if isinstance(X, ArithmeticSubgroup):
|
|
476
|
+
return X.dimension_eis(k)
|
|
477
|
+
elif isinstance(X, dirichlet.DirichletCharacter):
|
|
478
|
+
return Gamma1(X.modulus()).dimension_eis(k, X)
|
|
479
|
+
elif isinstance(X, (int, Integer)):
|
|
480
|
+
return Gamma0(X).dimension_eis(k)
|
|
481
|
+
raise TypeError(f"argument in dimension_eis must be an integer, a Dirichlet character, or a finite index subgroup of SL2Z (got {X})")
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
def dimension_modular_forms(X, k=2):
|
|
485
|
+
r"""
|
|
486
|
+
The dimension of the space of cusp forms for the given congruence
|
|
487
|
+
subgroup (either `\Gamma_0(N)`, `\Gamma_1(N)`, or
|
|
488
|
+
`\Gamma_H(N)`) or Dirichlet character.
|
|
489
|
+
|
|
490
|
+
INPUT:
|
|
491
|
+
|
|
492
|
+
- ``X`` -- congruence subgroup or Dirichlet character
|
|
493
|
+
|
|
494
|
+
- ``k`` -- integer; weight
|
|
495
|
+
|
|
496
|
+
EXAMPLES::
|
|
497
|
+
|
|
498
|
+
sage: from sage.modular.dims import dimension_modular_forms
|
|
499
|
+
sage: dimension_modular_forms(Gamma0(11),2)
|
|
500
|
+
2
|
|
501
|
+
sage: dimension_modular_forms(Gamma0(11),0)
|
|
502
|
+
1
|
|
503
|
+
sage: dimension_modular_forms(Gamma1(13),2)
|
|
504
|
+
13
|
|
505
|
+
sage: dimension_modular_forms(GammaH(11, [10]), 2)
|
|
506
|
+
10
|
|
507
|
+
sage: dimension_modular_forms(GammaH(11, [10]))
|
|
508
|
+
10
|
|
509
|
+
sage: dimension_modular_forms(GammaH(11, [10]), 4)
|
|
510
|
+
20
|
|
511
|
+
sage: e = DirichletGroup(20).1
|
|
512
|
+
sage: dimension_modular_forms(e,3)
|
|
513
|
+
9
|
|
514
|
+
sage: from sage.modular.dims import dimension_cusp_forms
|
|
515
|
+
sage: dimension_cusp_forms(e,3)
|
|
516
|
+
3
|
|
517
|
+
sage: from sage.modular.dims import dimension_eis
|
|
518
|
+
sage: dimension_eis(e,3)
|
|
519
|
+
6
|
|
520
|
+
sage: dimension_modular_forms(11,2)
|
|
521
|
+
2
|
|
522
|
+
"""
|
|
523
|
+
if isinstance(X, (int, Integer)):
|
|
524
|
+
return Gamma0(X).dimension_modular_forms(k)
|
|
525
|
+
elif isinstance(X, ArithmeticSubgroup):
|
|
526
|
+
return X.dimension_modular_forms(k)
|
|
527
|
+
elif isinstance(X, dirichlet.DirichletCharacter):
|
|
528
|
+
return Gamma1(X.modulus()).dimension_modular_forms(k, eps=X)
|
|
529
|
+
else:
|
|
530
|
+
raise TypeError("argument 1 must be an integer, a Dirichlet character "
|
|
531
|
+
"or an arithmetic subgroup")
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
def sturm_bound(level, weight=2):
|
|
535
|
+
r"""
|
|
536
|
+
Return the Sturm bound for modular forms with given level and weight.
|
|
537
|
+
|
|
538
|
+
For more details, see the documentation for the ``sturm_bound`` method
|
|
539
|
+
of :class:`sage.modular.arithgroup.CongruenceSubgroup` objects.
|
|
540
|
+
|
|
541
|
+
INPUT:
|
|
542
|
+
|
|
543
|
+
- ``level`` -- integer (interpreted as a level for `\Gamma0`) or a
|
|
544
|
+
congruence subgroup
|
|
545
|
+
|
|
546
|
+
- ``weight`` -- integer `\geq 2` (default: 2)
|
|
547
|
+
|
|
548
|
+
EXAMPLES::
|
|
549
|
+
|
|
550
|
+
sage: from sage.modular.dims import sturm_bound
|
|
551
|
+
sage: sturm_bound(11,2)
|
|
552
|
+
2
|
|
553
|
+
sage: sturm_bound(389,2)
|
|
554
|
+
65
|
|
555
|
+
sage: sturm_bound(1,12)
|
|
556
|
+
1
|
|
557
|
+
sage: sturm_bound(100,2)
|
|
558
|
+
30
|
|
559
|
+
sage: sturm_bound(1,36)
|
|
560
|
+
3
|
|
561
|
+
sage: sturm_bound(11)
|
|
562
|
+
2
|
|
563
|
+
"""
|
|
564
|
+
if isinstance(level, ArithmeticSubgroup):
|
|
565
|
+
if level.is_congruence():
|
|
566
|
+
return level.sturm_bound(weight)
|
|
567
|
+
raise ValueError("no Sturm bound defined for noncongruence subgroups")
|
|
568
|
+
if isinstance(level, (int, Integer)):
|
|
569
|
+
return Gamma0(level).sturm_bound(weight)
|