passagemath-schemes 10.8.1a4__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.
- passagemath_schemes/.dylibs/libflint.22.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.8.1a4.dist-info/METADATA +203 -0
- passagemath_schemes-10.8.1a4.dist-info/METADATA.bak +204 -0
- passagemath_schemes-10.8.1a4.dist-info/RECORD +312 -0
- passagemath_schemes-10.8.1a4.dist-info/WHEEL +6 -0
- passagemath_schemes-10.8.1a4.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 +9556 -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 +2578 -0
- sage/lfunctions/all.py +18 -0
- sage/lfunctions/dokchitser.py +727 -0
- sage/lfunctions/pari.py +971 -0
- sage/lfunctions/zero_sums.cpython-314t-darwin.so +0 -0
- sage/lfunctions/zero_sums.pyx +1847 -0
- sage/modular/abvar/abvar.py +5132 -0
- sage/modular/abvar/abvar_ambient_jacobian.py +414 -0
- sage/modular/abvar/abvar_newform.py +246 -0
- sage/modular/abvar/all.py +8 -0
- sage/modular/abvar/constructor.py +187 -0
- sage/modular/abvar/cuspidal_subgroup.py +371 -0
- sage/modular/abvar/finite_subgroup.py +896 -0
- sage/modular/abvar/homology.py +721 -0
- sage/modular/abvar/homspace.py +989 -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 +741 -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 +1406 -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 +361 -0
- sage/modular/arithgroup/congroup_gamma0.py +692 -0
- sage/modular/arithgroup/congroup_gamma1.py +659 -0
- sage/modular/arithgroup/congroup_gammaH.py +1491 -0
- sage/modular/arithgroup/congroup_generic.py +630 -0
- sage/modular/arithgroup/congroup_sl2z.py +266 -0
- sage/modular/arithgroup/farey_symbol.cpython-314t-darwin.so +0 -0
- sage/modular/arithgroup/farey_symbol.pyx +1067 -0
- sage/modular/arithgroup/tests.py +425 -0
- sage/modular/btquotients/all.py +4 -0
- sage/modular/btquotients/btquotient.py +3736 -0
- sage/modular/btquotients/pautomorphicform.py +2564 -0
- sage/modular/buzzard.py +100 -0
- sage/modular/congroup.py +29 -0
- sage/modular/congroup_element.py +13 -0
- sage/modular/cusps.py +1107 -0
- sage/modular/cusps_nf.py +1270 -0
- sage/modular/dims.py +571 -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 +1076 -0
- sage/modular/hecke/algebra.py +725 -0
- sage/modular/hecke/all.py +19 -0
- sage/modular/hecke/ambient_module.py +994 -0
- sage/modular/hecke/degenmap.py +119 -0
- sage/modular/hecke/element.py +302 -0
- sage/modular/hecke/hecke_operator.py +736 -0
- sage/modular/hecke/homspace.py +185 -0
- sage/modular/hecke/module.py +1744 -0
- sage/modular/hecke/morphism.py +139 -0
- sage/modular/hecke/submodule.py +970 -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 +2020 -0
- sage/modular/local_comp/all.py +2 -0
- sage/modular/local_comp/liftings.py +292 -0
- sage/modular/local_comp/local_comp.py +1070 -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 +817 -0
- sage/modular/modform/ambient_R.py +177 -0
- sage/modular/modform/ambient_eps.py +306 -0
- sage/modular/modform/ambient_g0.py +120 -0
- sage/modular/modform/ambient_g1.py +199 -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 +487 -0
- sage/modular/modform/eisenstein_submodule.py +663 -0
- sage/modular/modform/element.py +4105 -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 +127 -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 +1859 -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 +380 -0
- sage/modular/modform/weight1.py +221 -0
- sage/modular/modform_hecketriangle/abstract_ring.py +1932 -0
- sage/modular/modform_hecketriangle/abstract_space.py +2527 -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 +3349 -0
- sage/modular/modform_hecketriangle/hecke_triangle_groups.py +1426 -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 +3844 -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 +1291 -0
- sage/modular/modsym/modsym.py +400 -0
- sage/modular/modsym/modular_symbols.py +384 -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 +376 -0
- sage/modular/multiple_zeta.py +2635 -0
- sage/modular/multiple_zeta_F_algebra.py +789 -0
- sage/modular/overconvergent/all.py +6 -0
- sage/modular/overconvergent/genus0.py +1879 -0
- sage/modular/overconvergent/hecke_series.py +1187 -0
- sage/modular/overconvergent/weightspace.py +776 -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 +856 -0
- sage/modular/pollack_stevens/modsym.py +1590 -0
- sage/modular/pollack_stevens/padic_lseries.py +417 -0
- sage/modular/pollack_stevens/sigma0.py +534 -0
- sage/modular/pollack_stevens/space.py +1078 -0
- sage/modular/quasimodform/all.py +3 -0
- sage/modular/quasimodform/element.py +846 -0
- sage/modular/quasimodform/ring.py +826 -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 +700 -0
- sage/schemes/curves/affine_curve.py +2924 -0
- sage/schemes/curves/all.py +33 -0
- sage/schemes/curves/closed_point.py +434 -0
- sage/schemes/curves/constructor.py +397 -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 +3203 -0
- sage/schemes/curves/weighted_projective_curve.py +106 -0
- sage/schemes/curves/zariski_vankampen.py +1931 -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 +991 -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 +1103 -0
- sage/schemes/elliptic_curves/constructor.py +1530 -0
- sage/schemes/elliptic_curves/ec_database.py +175 -0
- sage/schemes/elliptic_curves/ell_curve_isogeny.py +3971 -0
- sage/schemes/elliptic_curves/ell_egros.py +457 -0
- sage/schemes/elliptic_curves/ell_field.py +2837 -0
- sage/schemes/elliptic_curves/ell_finite_field.py +3249 -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 +4944 -0
- sage/schemes/elliptic_curves/ell_rational_field.py +7184 -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 +1663 -0
- sage/schemes/elliptic_curves/gp_simon.py +152 -0
- sage/schemes/elliptic_curves/heegner.py +7328 -0
- sage/schemes/elliptic_curves/height.py +2108 -0
- sage/schemes/elliptic_curves/hom.py +1788 -0
- sage/schemes/elliptic_curves/hom_composite.py +1084 -0
- sage/schemes/elliptic_curves/hom_fractional.py +544 -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 +681 -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 +1523 -0
- sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
- sage/schemes/elliptic_curves/jacobian.py +247 -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 +915 -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 +716 -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 +369 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1948 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
- sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +936 -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 +312 -0
- sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
- sage/schemes/hyperelliptic_curves/jacobian_generic.py +437 -0
- sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
- sage/schemes/hyperelliptic_curves/jacobian_morphism.py +878 -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 +3863 -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 +581 -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 +53 -0
- sage/schemes/riemann_surfaces/all.py +1 -0
- sage/schemes/riemann_surfaces/riemann_surface.py +4177 -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
|
@@ -0,0 +1,817 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.libs.pari
|
|
3
|
+
r"""
|
|
4
|
+
Ambient spaces of modular forms
|
|
5
|
+
|
|
6
|
+
EXAMPLES:
|
|
7
|
+
|
|
8
|
+
We compute a basis for the ambient space
|
|
9
|
+
`M_2(\Gamma_1(25),\chi)`, where `\chi` is
|
|
10
|
+
quadratic.
|
|
11
|
+
|
|
12
|
+
::
|
|
13
|
+
|
|
14
|
+
sage: chi = DirichletGroup(25,QQ).0; chi
|
|
15
|
+
Dirichlet character modulo 25 of conductor 5 mapping 2 |--> -1
|
|
16
|
+
sage: n = ModularForms(chi,2); n
|
|
17
|
+
Modular Forms space of dimension 6, character [-1] and weight 2 over Rational Field
|
|
18
|
+
sage: type(n)
|
|
19
|
+
<class 'sage.modular.modform.ambient_eps.ModularFormsAmbient_eps_with_category'>
|
|
20
|
+
|
|
21
|
+
Compute a basis::
|
|
22
|
+
|
|
23
|
+
sage: n.basis()
|
|
24
|
+
[1 + O(q^6),
|
|
25
|
+
q + O(q^6),
|
|
26
|
+
q^2 + O(q^6),
|
|
27
|
+
q^3 + O(q^6),
|
|
28
|
+
q^4 + O(q^6),
|
|
29
|
+
q^5 + O(q^6)]
|
|
30
|
+
|
|
31
|
+
Compute the same basis but to higher precision::
|
|
32
|
+
|
|
33
|
+
sage: n.set_precision(20)
|
|
34
|
+
sage: n.basis()
|
|
35
|
+
[1 + 10*q^10 + 20*q^15 + O(q^20),
|
|
36
|
+
q + 5*q^6 + q^9 + 12*q^11 - 3*q^14 + 17*q^16 + 8*q^19 + O(q^20),
|
|
37
|
+
q^2 + 4*q^7 - q^8 + 8*q^12 + 2*q^13 + 10*q^17 - 5*q^18 + O(q^20),
|
|
38
|
+
q^3 + q^7 + 3*q^8 - q^12 + 5*q^13 + 3*q^17 + 6*q^18 + O(q^20),
|
|
39
|
+
q^4 - q^6 + 2*q^9 + 3*q^14 - 2*q^16 + 4*q^19 + O(q^20),
|
|
40
|
+
q^5 + q^10 + 2*q^15 + O(q^20)]
|
|
41
|
+
|
|
42
|
+
TESTS::
|
|
43
|
+
|
|
44
|
+
sage: m = ModularForms(Gamma1(20),2,GF(7))
|
|
45
|
+
sage: loads(dumps(m)) == m
|
|
46
|
+
True
|
|
47
|
+
|
|
48
|
+
::
|
|
49
|
+
|
|
50
|
+
sage: m = ModularForms(GammaH(11,[3]), 2); m
|
|
51
|
+
Modular Forms space of dimension 2 for Congruence Subgroup Gamma_H(11) with H generated by [3] of weight 2 over Rational Field
|
|
52
|
+
sage: type(m)
|
|
53
|
+
<class 'sage.modular.modform.ambient_g1.ModularFormsAmbient_gH_Q_with_category'>
|
|
54
|
+
sage: m == loads(dumps(m))
|
|
55
|
+
True
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
# ****************************************************************************
|
|
59
|
+
# Copyright (C) 2006 William Stein <wstein@gmail.com>
|
|
60
|
+
#
|
|
61
|
+
# This program is free software: you can redistribute it and/or modify
|
|
62
|
+
# it under the terms of the GNU General Public License as published by
|
|
63
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
64
|
+
# (at your option) any later version.
|
|
65
|
+
# https://www.gnu.org/licenses/
|
|
66
|
+
# ****************************************************************************
|
|
67
|
+
|
|
68
|
+
from sage.arith.misc import is_prime, sigma
|
|
69
|
+
from sage.matrix.constructor import matrix
|
|
70
|
+
from sage.misc.cachefunc import cached_method
|
|
71
|
+
from sage.modular.arithgroup.congroup_gamma0 import Gamma0_class
|
|
72
|
+
from sage.modular.arithgroup.congroup_gamma1 import Gamma1_class
|
|
73
|
+
from sage.modular.arithgroup.congroup_generic import CongruenceSubgroupBase
|
|
74
|
+
from sage.modular.dirichlet import TrivialCharacter
|
|
75
|
+
from sage.modular.hecke.ambient_module import AmbientHeckeModule
|
|
76
|
+
from sage.modular.modsym.modsym import ModularSymbols
|
|
77
|
+
from sage.modules.free_module import VectorSpace
|
|
78
|
+
from sage.rings.integer import Integer
|
|
79
|
+
from sage.structure.sequence import Sequence
|
|
80
|
+
|
|
81
|
+
from . import defaults
|
|
82
|
+
from . import eisenstein_submodule
|
|
83
|
+
from . import eis_series
|
|
84
|
+
from . import space
|
|
85
|
+
from . import submodule
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class ModularFormsAmbient(space.ModularFormsSpace,
|
|
89
|
+
AmbientHeckeModule):
|
|
90
|
+
"""
|
|
91
|
+
An ambient space of modular forms.
|
|
92
|
+
"""
|
|
93
|
+
def __init__(self, group, weight, base_ring, character=None, eis_only=False):
|
|
94
|
+
"""
|
|
95
|
+
Create an ambient space of modular forms.
|
|
96
|
+
|
|
97
|
+
EXAMPLES::
|
|
98
|
+
|
|
99
|
+
sage: m = ModularForms(Gamma1(20),20); m
|
|
100
|
+
Modular Forms space of dimension 238 for Congruence Subgroup Gamma1(20) of weight 20 over Rational Field
|
|
101
|
+
sage: m.is_ambient()
|
|
102
|
+
True
|
|
103
|
+
"""
|
|
104
|
+
if not isinstance(group, CongruenceSubgroupBase):
|
|
105
|
+
raise TypeError('group (=%s) must be a congruence subgroup' % group)
|
|
106
|
+
weight = Integer(weight)
|
|
107
|
+
|
|
108
|
+
if character is None and isinstance(group, Gamma0_class):
|
|
109
|
+
character = TrivialCharacter(group.level(), base_ring)
|
|
110
|
+
|
|
111
|
+
self._eis_only = eis_only
|
|
112
|
+
space.ModularFormsSpace.__init__(self, group, weight, character, base_ring)
|
|
113
|
+
if eis_only:
|
|
114
|
+
d = self._dim_eisenstein()
|
|
115
|
+
else:
|
|
116
|
+
d = self.dimension()
|
|
117
|
+
AmbientHeckeModule.__init__(self, base_ring, d, group.level(), weight)
|
|
118
|
+
|
|
119
|
+
def _repr_(self):
|
|
120
|
+
"""
|
|
121
|
+
Return string representation of ``self``.
|
|
122
|
+
|
|
123
|
+
EXAMPLES::
|
|
124
|
+
|
|
125
|
+
sage: m = ModularForms(Gamma1(20),100); m._repr_()
|
|
126
|
+
'Modular Forms space of dimension 1198 for Congruence Subgroup Gamma1(20) of weight 100 over Rational Field'
|
|
127
|
+
|
|
128
|
+
The output of _repr_ is not affected by renaming the space::
|
|
129
|
+
|
|
130
|
+
sage: m.rename('A big modform space')
|
|
131
|
+
sage: m
|
|
132
|
+
A big modform space
|
|
133
|
+
sage: m._repr_()
|
|
134
|
+
'Modular Forms space of dimension 1198 for Congruence Subgroup Gamma1(20) of weight 100 over Rational Field'
|
|
135
|
+
"""
|
|
136
|
+
if self._eis_only:
|
|
137
|
+
return "Modular Forms space for %s of weight %s over %s" % (
|
|
138
|
+
self.group(), self.weight(), self.base_ring())
|
|
139
|
+
else:
|
|
140
|
+
return "Modular Forms space of dimension %s for %s of weight %s over %s" % (
|
|
141
|
+
self.dimension(), self.group(), self.weight(), self.base_ring())
|
|
142
|
+
|
|
143
|
+
def _submodule_class(self):
|
|
144
|
+
"""
|
|
145
|
+
Return the Python class of submodules of this modular forms space.
|
|
146
|
+
|
|
147
|
+
EXAMPLES::
|
|
148
|
+
|
|
149
|
+
sage: m = ModularForms(Gamma0(20),2)
|
|
150
|
+
sage: m._submodule_class()
|
|
151
|
+
<class 'sage.modular.modform.submodule.ModularFormsSubmodule'>
|
|
152
|
+
"""
|
|
153
|
+
return submodule.ModularFormsSubmodule
|
|
154
|
+
|
|
155
|
+
def change_ring(self, base_ring):
|
|
156
|
+
"""
|
|
157
|
+
Change the base ring of this space of modular forms.
|
|
158
|
+
|
|
159
|
+
INPUT:
|
|
160
|
+
|
|
161
|
+
- ``R`` -- ring
|
|
162
|
+
|
|
163
|
+
EXAMPLES::
|
|
164
|
+
|
|
165
|
+
sage: M = ModularForms(Gamma0(37),2)
|
|
166
|
+
sage: M.basis()
|
|
167
|
+
[q + q^3 - 2*q^4 + O(q^6),
|
|
168
|
+
q^2 + 2*q^3 - 2*q^4 + q^5 + O(q^6),
|
|
169
|
+
1 + 2/3*q + 2*q^2 + 8/3*q^3 + 14/3*q^4 + 4*q^5 + O(q^6)]
|
|
170
|
+
|
|
171
|
+
The basis after changing the base ring is the reduction modulo
|
|
172
|
+
`3` of an integral basis.
|
|
173
|
+
|
|
174
|
+
::
|
|
175
|
+
|
|
176
|
+
sage: M3 = M.change_ring(GF(3))
|
|
177
|
+
sage: M3.basis()
|
|
178
|
+
[q + q^3 + q^4 + O(q^6),
|
|
179
|
+
q^2 + 2*q^3 + q^4 + q^5 + O(q^6),
|
|
180
|
+
1 + q^3 + q^4 + 2*q^5 + O(q^6)]
|
|
181
|
+
"""
|
|
182
|
+
from . import constructor
|
|
183
|
+
return constructor.ModularForms(self.group(), self.weight(),
|
|
184
|
+
base_ring, prec=self.prec(),
|
|
185
|
+
eis_only=self._eis_only)
|
|
186
|
+
|
|
187
|
+
@cached_method
|
|
188
|
+
def dimension(self):
|
|
189
|
+
"""
|
|
190
|
+
Return the dimension of this ambient space of modular forms,
|
|
191
|
+
computed using a dimension formula (so it should be reasonably
|
|
192
|
+
fast).
|
|
193
|
+
|
|
194
|
+
EXAMPLES::
|
|
195
|
+
|
|
196
|
+
sage: m = ModularForms(Gamma1(20),20)
|
|
197
|
+
sage: m.dimension()
|
|
198
|
+
238
|
|
199
|
+
"""
|
|
200
|
+
return self._dim_eisenstein() + self._dim_cuspidal()
|
|
201
|
+
|
|
202
|
+
def hecke_module_of_level(self, N):
|
|
203
|
+
r"""
|
|
204
|
+
Return the Hecke module of level N corresponding to self, which is the
|
|
205
|
+
domain or codomain of a degeneracy map from ``self``. Here N must be either
|
|
206
|
+
a divisor or a multiple of the level of ``self``.
|
|
207
|
+
|
|
208
|
+
EXAMPLES::
|
|
209
|
+
|
|
210
|
+
sage: ModularForms(25, 6).hecke_module_of_level(5)
|
|
211
|
+
Modular Forms space of dimension 3 for Congruence Subgroup Gamma0(5) of weight 6 over Rational Field
|
|
212
|
+
sage: ModularForms(Gamma1(4), 3).hecke_module_of_level(8)
|
|
213
|
+
Modular Forms space of dimension 7 for Congruence Subgroup Gamma1(8) of weight 3 over Rational Field
|
|
214
|
+
sage: ModularForms(Gamma1(4), 3).hecke_module_of_level(9)
|
|
215
|
+
Traceback (most recent call last):
|
|
216
|
+
...
|
|
217
|
+
ValueError: N (=9) must be a divisor or a multiple of the level of self (=4)
|
|
218
|
+
"""
|
|
219
|
+
if not (N % self.level() == 0 or self.level() % N == 0):
|
|
220
|
+
raise ValueError("N (=%s) must be a divisor or a multiple of the level of self (=%s)" % (N, self.level()))
|
|
221
|
+
from . import constructor
|
|
222
|
+
return constructor.ModularForms(self.group()._new_group_from_level(N), self.weight(), self.base_ring(), prec=self.prec())
|
|
223
|
+
|
|
224
|
+
def _degeneracy_raising_matrix(self, M, t):
|
|
225
|
+
r"""
|
|
226
|
+
Calculate the matrix of the degeneracy map from ``self`` to M corresponding
|
|
227
|
+
to `f(q) \mapsto f(q^t)`. Here the level of M should be a multiple of
|
|
228
|
+
the level of self, and t should divide the quotient.
|
|
229
|
+
|
|
230
|
+
EXAMPLES::
|
|
231
|
+
|
|
232
|
+
sage: ModularForms(22, 2)._degeneracy_raising_matrix(ModularForms(44, 2), 1)
|
|
233
|
+
[ 1 0 -1 -2 0 0 0 0 0]
|
|
234
|
+
[ 0 1 0 -2 0 0 0 0 0]
|
|
235
|
+
[ 0 0 0 0 1 0 0 0 24]
|
|
236
|
+
[ 0 0 0 0 0 1 0 -2 21]
|
|
237
|
+
[ 0 0 0 0 0 0 1 3 -10]
|
|
238
|
+
sage: ModularForms(22, 2)._degeneracy_raising_matrix(ModularForms(44, 2), 2)
|
|
239
|
+
[0 1 0 0 0 0 0 0 0]
|
|
240
|
+
[0 0 0 1 0 0 0 0 0]
|
|
241
|
+
[0 0 0 0 1 0 0 0 0]
|
|
242
|
+
[0 0 0 0 0 0 1 0 0]
|
|
243
|
+
[0 0 0 0 0 0 0 1 0]
|
|
244
|
+
"""
|
|
245
|
+
from sage.matrix.matrix_space import MatrixSpace
|
|
246
|
+
A = MatrixSpace(self.base_ring(), self.dimension(), M.dimension())
|
|
247
|
+
d = M.sturm_bound() + 1
|
|
248
|
+
q = self.an_element().qexp(d).parent().gen()
|
|
249
|
+
im_gens = []
|
|
250
|
+
for x in self.basis():
|
|
251
|
+
fq = x.qexp(d)
|
|
252
|
+
fqt = fq(q**t).add_bigoh(d) # silly workaround for trac #5367
|
|
253
|
+
im_gens.append(M(fqt))
|
|
254
|
+
return A([M.coordinate_vector(u) for u in im_gens])
|
|
255
|
+
|
|
256
|
+
def rank(self):
|
|
257
|
+
r"""
|
|
258
|
+
This is a synonym for ``self.dimension()``.
|
|
259
|
+
|
|
260
|
+
EXAMPLES::
|
|
261
|
+
|
|
262
|
+
sage: m = ModularForms(Gamma0(20),4)
|
|
263
|
+
sage: m.rank()
|
|
264
|
+
12
|
|
265
|
+
sage: m.dimension()
|
|
266
|
+
12
|
|
267
|
+
"""
|
|
268
|
+
return self.dimension()
|
|
269
|
+
|
|
270
|
+
def ambient_space(self):
|
|
271
|
+
"""
|
|
272
|
+
Return the ambient space that contains this ambient space. This is,
|
|
273
|
+
of course, just this space again.
|
|
274
|
+
|
|
275
|
+
EXAMPLES::
|
|
276
|
+
|
|
277
|
+
sage: m = ModularForms(Gamma0(3),30)
|
|
278
|
+
sage: m.ambient_space() is m
|
|
279
|
+
True
|
|
280
|
+
"""
|
|
281
|
+
return self
|
|
282
|
+
|
|
283
|
+
def is_ambient(self) -> bool:
|
|
284
|
+
"""
|
|
285
|
+
Return ``True`` if this an ambient space of modular forms.
|
|
286
|
+
|
|
287
|
+
This is an ambient space, so this function always returns ``True``.
|
|
288
|
+
|
|
289
|
+
EXAMPLES::
|
|
290
|
+
|
|
291
|
+
sage: ModularForms(11).is_ambient()
|
|
292
|
+
True
|
|
293
|
+
sage: CuspForms(11).is_ambient()
|
|
294
|
+
False
|
|
295
|
+
"""
|
|
296
|
+
return True
|
|
297
|
+
|
|
298
|
+
@cached_method(key=lambda self, sign: Integer(sign)) # convert sign to an Integer before looking this up in the cache
|
|
299
|
+
def modular_symbols(self, sign=0):
|
|
300
|
+
"""
|
|
301
|
+
Return the corresponding space of modular symbols with the given
|
|
302
|
+
sign.
|
|
303
|
+
|
|
304
|
+
EXAMPLES::
|
|
305
|
+
|
|
306
|
+
sage: S = ModularForms(11,2)
|
|
307
|
+
sage: S.modular_symbols()
|
|
308
|
+
Modular Symbols space of dimension 3 for Gamma_0(11) of weight 2 with sign 0 over Rational Field
|
|
309
|
+
sage: S.modular_symbols(sign=1)
|
|
310
|
+
Modular Symbols space of dimension 2 for Gamma_0(11) of weight 2 with sign 1 over Rational Field
|
|
311
|
+
sage: S.modular_symbols(sign=-1)
|
|
312
|
+
Modular Symbols space of dimension 1 for Gamma_0(11) of weight 2 with sign -1 over Rational Field
|
|
313
|
+
|
|
314
|
+
::
|
|
315
|
+
|
|
316
|
+
sage: ModularForms(1,12).modular_symbols()
|
|
317
|
+
Modular Symbols space of dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
|
|
318
|
+
"""
|
|
319
|
+
sign = Integer(sign)
|
|
320
|
+
return ModularSymbols(group=self.group(),
|
|
321
|
+
weight=self.weight(),
|
|
322
|
+
sign=sign,
|
|
323
|
+
base_ring=self.base_ring())
|
|
324
|
+
|
|
325
|
+
@cached_method
|
|
326
|
+
def module(self):
|
|
327
|
+
"""
|
|
328
|
+
Return the underlying free module corresponding to this space
|
|
329
|
+
of modular forms.
|
|
330
|
+
|
|
331
|
+
EXAMPLES::
|
|
332
|
+
|
|
333
|
+
sage: m = ModularForms(Gamma1(13),10)
|
|
334
|
+
sage: m.free_module()
|
|
335
|
+
Vector space of dimension 69 over Rational Field
|
|
336
|
+
sage: ModularForms(Gamma1(13),4, GF(49,'b')).free_module()
|
|
337
|
+
Vector space of dimension 27 over Finite Field in b of size 7^2
|
|
338
|
+
"""
|
|
339
|
+
d = self.dimension()
|
|
340
|
+
return VectorSpace(self.base_ring(), d)
|
|
341
|
+
|
|
342
|
+
# free_module -- stupid thing: there are functions in classes
|
|
343
|
+
# ModularFormsSpace and HeckeModule that both do much the same
|
|
344
|
+
# thing, and one has to override both of them!
|
|
345
|
+
def free_module(self):
|
|
346
|
+
"""
|
|
347
|
+
Return the free module underlying this space of modular forms.
|
|
348
|
+
|
|
349
|
+
EXAMPLES::
|
|
350
|
+
|
|
351
|
+
sage: ModularForms(37).free_module()
|
|
352
|
+
Vector space of dimension 3 over Rational Field
|
|
353
|
+
"""
|
|
354
|
+
return self.module()
|
|
355
|
+
|
|
356
|
+
def prec(self, new_prec=None):
|
|
357
|
+
"""
|
|
358
|
+
Set or get default initial precision for printing modular forms.
|
|
359
|
+
|
|
360
|
+
INPUT:
|
|
361
|
+
|
|
362
|
+
- ``new_prec`` -- positive integer (default: ``None``)
|
|
363
|
+
|
|
364
|
+
OUTPUT: if ``new_prec`` is ``None``, returns the current precision
|
|
365
|
+
|
|
366
|
+
EXAMPLES::
|
|
367
|
+
|
|
368
|
+
sage: M = ModularForms(1,12, prec=3)
|
|
369
|
+
sage: M.prec()
|
|
370
|
+
3
|
|
371
|
+
|
|
372
|
+
::
|
|
373
|
+
|
|
374
|
+
sage: M.basis()
|
|
375
|
+
[q - 24*q^2 + O(q^3), 1 + 65520/691*q + 134250480/691*q^2 + O(q^3)]
|
|
376
|
+
|
|
377
|
+
::
|
|
378
|
+
|
|
379
|
+
sage: M.prec(5)
|
|
380
|
+
5
|
|
381
|
+
sage: M.basis()
|
|
382
|
+
[q - 24*q^2 + 252*q^3 - 1472*q^4 + O(q^5),
|
|
383
|
+
1 + 65520/691*q + 134250480/691*q^2 + 11606736960/691*q^3 + 274945048560/691*q^4 + O(q^5)]
|
|
384
|
+
"""
|
|
385
|
+
if new_prec:
|
|
386
|
+
self.__prec = new_prec
|
|
387
|
+
try:
|
|
388
|
+
return self.__prec
|
|
389
|
+
except AttributeError:
|
|
390
|
+
self.__prec = defaults.DEFAULT_PRECISION
|
|
391
|
+
return self.__prec
|
|
392
|
+
|
|
393
|
+
def set_precision(self, n):
|
|
394
|
+
"""
|
|
395
|
+
Set the default precision for displaying elements of this space.
|
|
396
|
+
|
|
397
|
+
EXAMPLES::
|
|
398
|
+
|
|
399
|
+
sage: m = ModularForms(Gamma1(5),2)
|
|
400
|
+
sage: m.set_precision(10)
|
|
401
|
+
sage: m.basis()
|
|
402
|
+
[1 + 60*q^3 - 120*q^4 + 240*q^5 - 300*q^6 + 300*q^7 - 180*q^9 + O(q^10),
|
|
403
|
+
q + 6*q^3 - 9*q^4 + 27*q^5 - 28*q^6 + 30*q^7 - 11*q^9 + O(q^10),
|
|
404
|
+
q^2 - 4*q^3 + 12*q^4 - 22*q^5 + 30*q^6 - 24*q^7 + 5*q^8 + 18*q^9 + O(q^10)]
|
|
405
|
+
sage: m.set_precision(5)
|
|
406
|
+
sage: m.basis()
|
|
407
|
+
[1 + 60*q^3 - 120*q^4 + O(q^5),
|
|
408
|
+
q + 6*q^3 - 9*q^4 + O(q^5),
|
|
409
|
+
q^2 - 4*q^3 + 12*q^4 + O(q^5)]
|
|
410
|
+
"""
|
|
411
|
+
if n < 0:
|
|
412
|
+
raise ValueError("n (=%s) must be >= 0" % n)
|
|
413
|
+
self.__prec = Integer(n)
|
|
414
|
+
|
|
415
|
+
####################################################################
|
|
416
|
+
# Computation of Special Submodules
|
|
417
|
+
####################################################################
|
|
418
|
+
@cached_method
|
|
419
|
+
def cuspidal_submodule(self):
|
|
420
|
+
"""
|
|
421
|
+
Return the cuspidal submodule of this ambient module.
|
|
422
|
+
|
|
423
|
+
EXAMPLES::
|
|
424
|
+
|
|
425
|
+
sage: ModularForms(Gamma1(13)).cuspidal_submodule()
|
|
426
|
+
Cuspidal subspace of dimension 2 of Modular Forms space of dimension 13 for
|
|
427
|
+
Congruence Subgroup Gamma1(13) of weight 2 over Rational Field
|
|
428
|
+
"""
|
|
429
|
+
from .cuspidal_submodule import CuspidalSubmodule
|
|
430
|
+
return CuspidalSubmodule(self)
|
|
431
|
+
|
|
432
|
+
@cached_method
|
|
433
|
+
def eisenstein_submodule(self):
|
|
434
|
+
"""
|
|
435
|
+
Return the Eisenstein submodule of this ambient module.
|
|
436
|
+
|
|
437
|
+
EXAMPLES::
|
|
438
|
+
|
|
439
|
+
sage: m = ModularForms(Gamma1(13),2); m
|
|
440
|
+
Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field
|
|
441
|
+
sage: m.eisenstein_submodule()
|
|
442
|
+
Eisenstein subspace of dimension 11 of Modular Forms space of dimension 13 for Congruence Subgroup Gamma1(13) of weight 2 over Rational Field
|
|
443
|
+
"""
|
|
444
|
+
return eisenstein_submodule.EisensteinSubmodule(self)
|
|
445
|
+
|
|
446
|
+
@cached_method(key=lambda self, p: (Integer(p) if p is not None else p)) # convert p to an Integer before looking this up in the cache
|
|
447
|
+
def new_submodule(self, p=None):
|
|
448
|
+
"""
|
|
449
|
+
Return the new or `p`-new submodule of this ambient
|
|
450
|
+
module.
|
|
451
|
+
|
|
452
|
+
INPUT:
|
|
453
|
+
|
|
454
|
+
- ``p`` -- (default: ``None``), if specified return only
|
|
455
|
+
the `p`-new submodule
|
|
456
|
+
|
|
457
|
+
EXAMPLES::
|
|
458
|
+
|
|
459
|
+
sage: m = ModularForms(Gamma0(33),2); m
|
|
460
|
+
Modular Forms space of dimension 6 for Congruence Subgroup Gamma0(33) of weight 2 over Rational Field
|
|
461
|
+
sage: m.new_submodule()
|
|
462
|
+
Modular Forms subspace of dimension 1 of Modular Forms space of dimension 6 for Congruence Subgroup Gamma0(33) of weight 2 over Rational Field
|
|
463
|
+
|
|
464
|
+
Another example::
|
|
465
|
+
|
|
466
|
+
sage: M = ModularForms(17,4)
|
|
467
|
+
sage: N = M.new_subspace(); N
|
|
468
|
+
Modular Forms subspace of dimension 4 of Modular Forms space of dimension 6 for Congruence Subgroup Gamma0(17) of weight 4 over Rational Field
|
|
469
|
+
sage: N.basis()
|
|
470
|
+
[q + 2*q^5 + O(q^6),
|
|
471
|
+
q^2 - 3/2*q^5 + O(q^6),
|
|
472
|
+
q^3 + O(q^6),
|
|
473
|
+
q^4 - 1/2*q^5 + O(q^6)]
|
|
474
|
+
|
|
475
|
+
::
|
|
476
|
+
|
|
477
|
+
sage: ModularForms(12,4).new_submodule()
|
|
478
|
+
Modular Forms subspace of dimension 1 of Modular Forms space of dimension 9 for Congruence Subgroup Gamma0(12) of weight 4 over Rational Field
|
|
479
|
+
|
|
480
|
+
Unfortunately (TODO) - `p`-new submodules aren't yet
|
|
481
|
+
implemented::
|
|
482
|
+
|
|
483
|
+
sage: m.new_submodule(3) # not implemented
|
|
484
|
+
Traceback (most recent call last):
|
|
485
|
+
...
|
|
486
|
+
NotImplementedError
|
|
487
|
+
sage: m.new_submodule(11) # not implemented
|
|
488
|
+
Traceback (most recent call last):
|
|
489
|
+
...
|
|
490
|
+
NotImplementedError
|
|
491
|
+
"""
|
|
492
|
+
if p is not None:
|
|
493
|
+
p = Integer(p)
|
|
494
|
+
if not p.is_prime():
|
|
495
|
+
raise ValueError("p (=%s) must be a prime or None." % p)
|
|
496
|
+
return self.cuspidal_submodule().new_submodule(p) + self.eisenstein_submodule().new_submodule(p)
|
|
497
|
+
|
|
498
|
+
def _q_expansion(self, element, prec):
|
|
499
|
+
r"""
|
|
500
|
+
Return the `q`-expansion of a particular element of this space of
|
|
501
|
+
modular forms, where the element should be a vector, list, or tuple
|
|
502
|
+
(not a ModularFormElement). Here element should have length =
|
|
503
|
+
self.dimension(). If element = [ a_i ] and self.basis() = [ v_i
|
|
504
|
+
], then we return `\sum a_i v_i`.
|
|
505
|
+
|
|
506
|
+
INPUT:
|
|
507
|
+
|
|
508
|
+
- ``element`` -- vector, list or tuple
|
|
509
|
+
|
|
510
|
+
- ``prec`` -- desired precision of `q`-expansion
|
|
511
|
+
|
|
512
|
+
EXAMPLES::
|
|
513
|
+
|
|
514
|
+
sage: m = ModularForms(Gamma0(23),2); m
|
|
515
|
+
Modular Forms space of dimension 3 for Congruence Subgroup Gamma0(23) of weight 2 over Rational Field
|
|
516
|
+
sage: m.basis()
|
|
517
|
+
[q - q^3 - q^4 + O(q^6),
|
|
518
|
+
q^2 - 2*q^3 - q^4 + 2*q^5 + O(q^6),
|
|
519
|
+
1 + 12/11*q + 36/11*q^2 + 48/11*q^3 + 84/11*q^4 + 72/11*q^5 + O(q^6)]
|
|
520
|
+
sage: m._q_expansion([1,2,0], 5)
|
|
521
|
+
q + 2*q^2 - 5*q^3 - 3*q^4 + O(q^5)
|
|
522
|
+
"""
|
|
523
|
+
B = self.q_expansion_basis(prec)
|
|
524
|
+
f = self._q_expansion_zero()
|
|
525
|
+
for i in range(len(element)):
|
|
526
|
+
if element[i]:
|
|
527
|
+
f += element[i] * B[i]
|
|
528
|
+
return f
|
|
529
|
+
|
|
530
|
+
####################################################################
|
|
531
|
+
# Computations of Dimensions
|
|
532
|
+
####################################################################
|
|
533
|
+
@cached_method
|
|
534
|
+
def _dim_cuspidal(self):
|
|
535
|
+
r"""
|
|
536
|
+
Return the dimension of the cuspidal subspace of this ambient
|
|
537
|
+
modular forms space.
|
|
538
|
+
|
|
539
|
+
For weights `k \ge 2` this is computed using a
|
|
540
|
+
dimension formula. For weight 1, it will trigger a computation of a
|
|
541
|
+
basis of `q`-expansions using Schaeffer's algorithm, unless this space
|
|
542
|
+
is a space of Eisenstein forms only, in which case we just return 0.
|
|
543
|
+
|
|
544
|
+
EXAMPLES::
|
|
545
|
+
|
|
546
|
+
sage: m = ModularForms(GammaH(11,[3]), 2); m
|
|
547
|
+
Modular Forms space of dimension 2 for Congruence Subgroup Gamma_H(11) with H generated by [3] of weight 2 over Rational Field
|
|
548
|
+
sage: m._dim_cuspidal()
|
|
549
|
+
1
|
|
550
|
+
sage: m = ModularForms(DirichletGroup(389,CyclotomicField(4)).0,3); m._dim_cuspidal()
|
|
551
|
+
64
|
|
552
|
+
sage: m = ModularForms(GammaH(31, [7]), 1)
|
|
553
|
+
sage: m._dim_cuspidal()
|
|
554
|
+
1
|
|
555
|
+
sage: m = ModularForms(GammaH(31, [7]), 1, eis_only=True)
|
|
556
|
+
sage: m._dim_cuspidal()
|
|
557
|
+
0
|
|
558
|
+
"""
|
|
559
|
+
if self._eis_only:
|
|
560
|
+
return 0
|
|
561
|
+
if isinstance(self.group(), Gamma1_class) and self.character() is not None:
|
|
562
|
+
return self.group().dimension_cusp_forms(self.weight(),
|
|
563
|
+
self.character())
|
|
564
|
+
else:
|
|
565
|
+
return self.group().dimension_cusp_forms(self.weight())
|
|
566
|
+
|
|
567
|
+
@cached_method
|
|
568
|
+
def _dim_eisenstein(self):
|
|
569
|
+
"""
|
|
570
|
+
Return the dimension of the Eisenstein subspace of this modular
|
|
571
|
+
symbols space, computed using a dimension formula.
|
|
572
|
+
|
|
573
|
+
EXAMPLES::
|
|
574
|
+
|
|
575
|
+
sage: m = ModularForms(GammaH(13,[4]), 2); m
|
|
576
|
+
Modular Forms space of dimension 3 for Congruence Subgroup Gamma_H(13) with H generated by [4] of weight 2 over Rational Field
|
|
577
|
+
sage: m._dim_eisenstein()
|
|
578
|
+
3
|
|
579
|
+
|
|
580
|
+
sage: m = ModularForms(DirichletGroup(13).0,7); m
|
|
581
|
+
Modular Forms space of dimension 8, character [zeta12] and weight 7 over Cyclotomic Field of order 12 and degree 4
|
|
582
|
+
sage: m._dim_eisenstein()
|
|
583
|
+
2
|
|
584
|
+
sage: m._dim_cuspidal()
|
|
585
|
+
6
|
|
586
|
+
|
|
587
|
+
Test that :issue:`24030` is fixed::
|
|
588
|
+
|
|
589
|
+
sage: ModularForms(GammaH(40, [21]), 1).dimension() # indirect doctest
|
|
590
|
+
16
|
|
591
|
+
"""
|
|
592
|
+
if isinstance(self.group(), Gamma1_class) and self.character() is not None:
|
|
593
|
+
return self.group().dimension_eis(self.weight(), self.character())
|
|
594
|
+
else:
|
|
595
|
+
return self.group().dimension_eis(self.weight())
|
|
596
|
+
|
|
597
|
+
@cached_method
|
|
598
|
+
def _dim_new_cuspidal(self):
|
|
599
|
+
"""
|
|
600
|
+
Return the dimension of the new cuspidal subspace, computed using
|
|
601
|
+
dimension formulas.
|
|
602
|
+
|
|
603
|
+
EXAMPLES::
|
|
604
|
+
|
|
605
|
+
sage: m = ModularForms(GammaH(11,[2]), 2); m._dim_new_cuspidal()
|
|
606
|
+
1
|
|
607
|
+
sage: m = ModularForms(DirichletGroup(33).0,7); m
|
|
608
|
+
Modular Forms space of dimension 26, character [-1, 1] and weight 7 over Rational Field
|
|
609
|
+
sage: m._dim_new_cuspidal()
|
|
610
|
+
20
|
|
611
|
+
sage: m._dim_cuspidal()
|
|
612
|
+
22
|
|
613
|
+
"""
|
|
614
|
+
if isinstance(self.group(), Gamma1_class) and self.character() is not None:
|
|
615
|
+
return self.group().dimension_new_cusp_forms(self.weight(), self.character())
|
|
616
|
+
else:
|
|
617
|
+
return self.group().dimension_new_cusp_forms(self.weight())
|
|
618
|
+
|
|
619
|
+
@cached_method
|
|
620
|
+
def _dim_new_eisenstein(self):
|
|
621
|
+
"""
|
|
622
|
+
Return the dimension of the new Eisenstein subspace, computed
|
|
623
|
+
by enumerating all Eisenstein series of the appropriate level.
|
|
624
|
+
|
|
625
|
+
EXAMPLES::
|
|
626
|
+
|
|
627
|
+
sage: m = ModularForms(Gamma0(11), 4)
|
|
628
|
+
sage: m._dim_new_eisenstein()
|
|
629
|
+
0
|
|
630
|
+
sage: m = ModularForms(Gamma0(11), 2)
|
|
631
|
+
sage: m._dim_new_eisenstein()
|
|
632
|
+
1
|
|
633
|
+
sage: m = ModularForms(DirichletGroup(36).0,5); m
|
|
634
|
+
Modular Forms space of dimension 28, character [-1, 1] and weight 5 over Rational Field
|
|
635
|
+
sage: m._dim_new_eisenstein()
|
|
636
|
+
2
|
|
637
|
+
sage: m._dim_eisenstein()
|
|
638
|
+
8
|
|
639
|
+
"""
|
|
640
|
+
if isinstance(self.group(), Gamma0_class) and self.weight() == 2:
|
|
641
|
+
if is_prime(self.level()):
|
|
642
|
+
d = 1
|
|
643
|
+
else:
|
|
644
|
+
d = 0
|
|
645
|
+
else:
|
|
646
|
+
E = self.eisenstein_series()
|
|
647
|
+
d = len([g for g in E if g.new_level() == self.level()])
|
|
648
|
+
return d
|
|
649
|
+
|
|
650
|
+
####################################################################
|
|
651
|
+
# Computations of all Eisenstein series in self
|
|
652
|
+
####################################################################
|
|
653
|
+
|
|
654
|
+
@cached_method
|
|
655
|
+
def eisenstein_params(self):
|
|
656
|
+
"""
|
|
657
|
+
Return parameters that define all Eisenstein series in ``self``.
|
|
658
|
+
|
|
659
|
+
OUTPUT: an immutable Sequence
|
|
660
|
+
|
|
661
|
+
EXAMPLES::
|
|
662
|
+
|
|
663
|
+
sage: m = ModularForms(Gamma0(22), 2)
|
|
664
|
+
sage: v = m.eisenstein_params(); v
|
|
665
|
+
[(Dirichlet character modulo 22 of conductor 1 mapping 13 |--> 1, Dirichlet character modulo 22 of conductor 1 mapping 13 |--> 1, 2), (Dirichlet character modulo 22 of conductor 1 mapping 13 |--> 1, Dirichlet character modulo 22 of conductor 1 mapping 13 |--> 1, 11), (Dirichlet character modulo 22 of conductor 1 mapping 13 |--> 1, Dirichlet character modulo 22 of conductor 1 mapping 13 |--> 1, 22)]
|
|
666
|
+
sage: type(v)
|
|
667
|
+
<class 'sage.structure.sequence.Sequence_generic'>
|
|
668
|
+
"""
|
|
669
|
+
eps = self.character()
|
|
670
|
+
if eps is None:
|
|
671
|
+
if isinstance(self.group(), Gamma1_class):
|
|
672
|
+
eps = self.level()
|
|
673
|
+
else:
|
|
674
|
+
raise NotImplementedError
|
|
675
|
+
params = eis_series.compute_eisenstein_params(eps, self.weight())
|
|
676
|
+
return Sequence(params, immutable=True)
|
|
677
|
+
|
|
678
|
+
def eisenstein_series(self):
|
|
679
|
+
"""
|
|
680
|
+
Return all Eisenstein series associated to this space.
|
|
681
|
+
|
|
682
|
+
::
|
|
683
|
+
|
|
684
|
+
sage: ModularForms(27,2).eisenstein_series()
|
|
685
|
+
[q^3 + O(q^6),
|
|
686
|
+
q - 3*q^2 + 7*q^4 - 6*q^5 + O(q^6),
|
|
687
|
+
1/12 + q + 3*q^2 + q^3 + 7*q^4 + 6*q^5 + O(q^6),
|
|
688
|
+
1/3 + q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + O(q^6),
|
|
689
|
+
13/12 + q + 3*q^2 + 4*q^3 + 7*q^4 + 6*q^5 + O(q^6)]
|
|
690
|
+
|
|
691
|
+
::
|
|
692
|
+
|
|
693
|
+
sage: ModularForms(Gamma1(5),3).eisenstein_series()
|
|
694
|
+
[-1/5*zeta4 - 2/5 + q + (4*zeta4 + 1)*q^2 + (-9*zeta4 + 1)*q^3 + (4*zeta4 - 15)*q^4 + q^5 + O(q^6),
|
|
695
|
+
q + (zeta4 + 4)*q^2 + (-zeta4 + 9)*q^3 + (4*zeta4 + 15)*q^4 + 25*q^5 + O(q^6),
|
|
696
|
+
1/5*zeta4 - 2/5 + q + (-4*zeta4 + 1)*q^2 + (9*zeta4 + 1)*q^3 + (-4*zeta4 - 15)*q^4 + q^5 + O(q^6),
|
|
697
|
+
q + (-zeta4 + 4)*q^2 + (zeta4 + 9)*q^3 + (-4*zeta4 + 15)*q^4 + 25*q^5 + O(q^6)]
|
|
698
|
+
|
|
699
|
+
::
|
|
700
|
+
|
|
701
|
+
sage: eps = DirichletGroup(13).0^2
|
|
702
|
+
sage: ModularForms(eps,2).eisenstein_series()
|
|
703
|
+
[-7/13*zeta6 - 11/13 + q + (2*zeta6 + 1)*q^2 + (-3*zeta6 + 1)*q^3 + (6*zeta6 - 3)*q^4 - 4*q^5 + O(q^6),
|
|
704
|
+
q + (zeta6 + 2)*q^2 + (-zeta6 + 3)*q^3 + (3*zeta6 + 3)*q^4 + 4*q^5 + O(q^6)]
|
|
705
|
+
"""
|
|
706
|
+
return self.eisenstein_submodule().eisenstein_series()
|
|
707
|
+
|
|
708
|
+
def _compute_q_expansion_basis(self, prec):
|
|
709
|
+
"""
|
|
710
|
+
EXAMPLES::
|
|
711
|
+
|
|
712
|
+
sage: m = ModularForms(11,4)
|
|
713
|
+
sage: m._compute_q_expansion_basis(5)
|
|
714
|
+
[q + 3*q^3 - 6*q^4 + O(q^5), q^2 - 4*q^3 + 2*q^4 + O(q^5), 1 + O(q^5), q + 9*q^2 + 28*q^3 + 73*q^4 + O(q^5)]
|
|
715
|
+
"""
|
|
716
|
+
S = self.cuspidal_submodule()
|
|
717
|
+
E = self.eisenstein_submodule()
|
|
718
|
+
B_S = S._compute_q_expansion_basis(prec)
|
|
719
|
+
B_E = E._compute_q_expansion_basis(prec)
|
|
720
|
+
return B_S + B_E
|
|
721
|
+
|
|
722
|
+
def _compute_hecke_matrix(self, n):
|
|
723
|
+
"""
|
|
724
|
+
Compute the matrix of the Hecke operator `T_n` acting on ``self``.
|
|
725
|
+
|
|
726
|
+
.. NOTE::
|
|
727
|
+
|
|
728
|
+
If ``self`` is a level 1 space, the much faster Victor Miller basis
|
|
729
|
+
is used for this computation.
|
|
730
|
+
|
|
731
|
+
EXAMPLES::
|
|
732
|
+
|
|
733
|
+
sage: M = ModularForms(11, 2)
|
|
734
|
+
sage: M._compute_hecke_matrix(6)
|
|
735
|
+
[ 2 0]
|
|
736
|
+
[ 0 12]
|
|
737
|
+
|
|
738
|
+
Check that :issue:`22780` is fixed::
|
|
739
|
+
|
|
740
|
+
sage: M = ModularForms(1, 12)
|
|
741
|
+
sage: M._compute_hecke_matrix(2)
|
|
742
|
+
[ -24 0]
|
|
743
|
+
[ 0 2049]
|
|
744
|
+
sage: ModularForms(1, 2).hecke_matrix(2)
|
|
745
|
+
[]
|
|
746
|
+
|
|
747
|
+
TESTS:
|
|
748
|
+
|
|
749
|
+
The following Hecke matrix is 43x43 with very large integer entries.
|
|
750
|
+
We test it indirectly by computing the product and the sum of its
|
|
751
|
+
eigenvalues, and reducing these two integers modulo all the primes
|
|
752
|
+
less than 100::
|
|
753
|
+
|
|
754
|
+
sage: M = ModularForms(1, 512)
|
|
755
|
+
sage: t = M._compute_hecke_matrix(5) # long time (2s)
|
|
756
|
+
sage: t[-1, -1] == 1 + 5^511 # long time (0s, depends on above)
|
|
757
|
+
True
|
|
758
|
+
sage: f = t.charpoly() # long time (4s)
|
|
759
|
+
sage: [f[0]%p for p in prime_range(100)] # long time (0s, depends on above)
|
|
760
|
+
[0, 0, 0, 0, 1, 9, 2, 7, 0, 0, 0, 0, 1, 12, 9, 16, 37, 0, 21, 11, 70, 22, 0, 58, 76]
|
|
761
|
+
sage: [f[42]%p for p in prime_range(100)] # long time (0s, depends on above)
|
|
762
|
+
[0, 0, 4, 0, 10, 4, 4, 8, 12, 1, 23, 13, 10, 27, 20, 13, 16, 59, 53, 41, 11, 13, 12, 6, 82]
|
|
763
|
+
"""
|
|
764
|
+
if self.level() == 1:
|
|
765
|
+
k = self.weight()
|
|
766
|
+
d = self.dimension()
|
|
767
|
+
if d == 0:
|
|
768
|
+
return matrix(self.base_ring(), 0, 0, [])
|
|
769
|
+
from sage.modular.all import victor_miller_basis, hecke_operator_on_basis
|
|
770
|
+
vmb = victor_miller_basis(k, prec=d * n + 1)[1:]
|
|
771
|
+
Tcusp = hecke_operator_on_basis(vmb, n, k)
|
|
772
|
+
return Tcusp.block_sum(matrix(self.base_ring(), 1, 1,
|
|
773
|
+
[sigma(n, k - 1)]))
|
|
774
|
+
else:
|
|
775
|
+
return space.ModularFormsSpace._compute_hecke_matrix(self, n)
|
|
776
|
+
|
|
777
|
+
def _compute_hecke_matrix_prime_power(self, p, r):
|
|
778
|
+
r"""
|
|
779
|
+
Compute the Hecke matrix `T_{p^r}`, where `p` is prime and `r \ge 2`.
|
|
780
|
+
|
|
781
|
+
This is an internal method. End users are encouraged to use the
|
|
782
|
+
method hecke_matrix() instead.
|
|
783
|
+
|
|
784
|
+
TESTS:
|
|
785
|
+
|
|
786
|
+
sage: M = ModularForms(1, 12)
|
|
787
|
+
sage: M._compute_hecke_matrix_prime_power(5, 3)
|
|
788
|
+
[ -359001100500 0]
|
|
789
|
+
[ 0 116415324211120654296876]
|
|
790
|
+
sage: delta_qexp(126)[125]
|
|
791
|
+
-359001100500
|
|
792
|
+
sage: eisenstein_series_qexp(12, 126)[125]
|
|
793
|
+
116415324211120654296876
|
|
794
|
+
"""
|
|
795
|
+
if self.level() == 1:
|
|
796
|
+
return self._compute_hecke_matrix(p**r)
|
|
797
|
+
else:
|
|
798
|
+
return space.ModularFormsSpace._compute_hecke_matrix_prime_power(self, p, r)
|
|
799
|
+
|
|
800
|
+
def hecke_polynomial(self, n, var='x'):
|
|
801
|
+
r"""
|
|
802
|
+
Compute the characteristic polynomial of the Hecke operator `T_n` acting
|
|
803
|
+
on this space. Except in level 1, this is computed via modular symbols,
|
|
804
|
+
and in particular is faster to compute than the matrix itself.
|
|
805
|
+
|
|
806
|
+
EXAMPLES::
|
|
807
|
+
|
|
808
|
+
sage: ModularForms(17,4).hecke_polynomial(2)
|
|
809
|
+
x^6 - 16*x^5 + 18*x^4 + 608*x^3 - 1371*x^2 - 4968*x + 7776
|
|
810
|
+
|
|
811
|
+
Check that this gives the same answer as computing the actual Hecke
|
|
812
|
+
matrix (which is generally slower)::
|
|
813
|
+
|
|
814
|
+
sage: ModularForms(17,4).hecke_matrix(2).charpoly()
|
|
815
|
+
x^6 - 16*x^5 + 18*x^4 + 608*x^3 - 1371*x^2 - 4968*x + 7776
|
|
816
|
+
"""
|
|
817
|
+
return self.cuspidal_submodule().hecke_polynomial(n, var) * self.eisenstein_submodule().hecke_polynomial(n, var)
|