passagemath-schemes 10.6.40__cp314-cp314-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.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.6.40.dist-info/METADATA +204 -0
- passagemath_schemes-10.6.40.dist-info/METADATA.bak +205 -0
- passagemath_schemes-10.6.40.dist-info/RECORD +314 -0
- passagemath_schemes-10.6.40.dist-info/WHEEL +6 -0
- passagemath_schemes-10.6.40.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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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-314-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
|
@@ -0,0 +1,708 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
# sage.doctest: needs sage.libs.pari
|
|
3
|
+
"""
|
|
4
|
+
The cuspidal subspace
|
|
5
|
+
|
|
6
|
+
EXAMPLES::
|
|
7
|
+
|
|
8
|
+
sage: S = CuspForms(SL2Z,12); S
|
|
9
|
+
Cuspidal subspace of dimension 1 of Modular Forms space of dimension 2 for
|
|
10
|
+
Modular Group SL(2,Z) of weight 12 over Rational Field
|
|
11
|
+
sage: S.basis()
|
|
12
|
+
[q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6)]
|
|
13
|
+
|
|
14
|
+
sage: S = CuspForms(Gamma0(33),2); S
|
|
15
|
+
Cuspidal subspace of dimension 3 of Modular Forms space of dimension 6 for
|
|
16
|
+
Congruence Subgroup Gamma0(33) of weight 2 over Rational Field
|
|
17
|
+
sage: S.basis()
|
|
18
|
+
[q - q^5 + O(q^6), q^2 - q^4 - q^5 + O(q^6), q^3 + O(q^6)]
|
|
19
|
+
|
|
20
|
+
sage: S = CuspForms(Gamma1(3),6); S
|
|
21
|
+
Cuspidal subspace of dimension 1 of Modular Forms space of dimension 3 for
|
|
22
|
+
Congruence Subgroup Gamma1(3) of weight 6 over Rational Field
|
|
23
|
+
sage: S.basis()
|
|
24
|
+
[q - 6*q^2 + 9*q^3 + 4*q^4 + 6*q^5 + O(q^6)]
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
#########################################################################
|
|
28
|
+
# Copyright (C) 2004--2006 William Stein <wstein@gmail.com>
|
|
29
|
+
#
|
|
30
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
31
|
+
#
|
|
32
|
+
# http://www.gnu.org/licenses/
|
|
33
|
+
#########################################################################
|
|
34
|
+
|
|
35
|
+
from sage.matrix.constructor import Matrix
|
|
36
|
+
from sage.matrix.special import identity_matrix
|
|
37
|
+
from sage.misc.cachefunc import cached_method
|
|
38
|
+
from sage.misc.lazy_import import lazy_import
|
|
39
|
+
from sage.misc.verbose import verbose
|
|
40
|
+
from sage.rings.integer import Integer
|
|
41
|
+
from sage.rings.rational_field import QQ
|
|
42
|
+
|
|
43
|
+
lazy_import('sage.modular.modform.vm_basis', 'victor_miller_basis')
|
|
44
|
+
|
|
45
|
+
from .submodule import ModularFormsSubmodule
|
|
46
|
+
from . import weight1
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class CuspidalSubmodule(ModularFormsSubmodule):
|
|
50
|
+
"""
|
|
51
|
+
Base class for cuspidal submodules of ambient spaces of modular forms.
|
|
52
|
+
"""
|
|
53
|
+
def __init__(self, ambient_space):
|
|
54
|
+
"""
|
|
55
|
+
The cuspidal submodule of an ambient space of modular forms.
|
|
56
|
+
|
|
57
|
+
EXAMPLES::
|
|
58
|
+
|
|
59
|
+
sage: S = CuspForms(SL2Z,12); S
|
|
60
|
+
Cuspidal subspace of dimension 1 of Modular Forms space of dimension 2 for
|
|
61
|
+
Modular Group SL(2,Z) of weight 12 over Rational Field
|
|
62
|
+
sage: S.basis()
|
|
63
|
+
[q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6)]
|
|
64
|
+
|
|
65
|
+
sage: S = CuspForms(Gamma0(33),2); S
|
|
66
|
+
Cuspidal subspace of dimension 3 of Modular Forms space of dimension 6 for
|
|
67
|
+
Congruence Subgroup Gamma0(33) of weight 2 over Rational Field
|
|
68
|
+
sage: S.basis()
|
|
69
|
+
[q - q^5 + O(q^6), q^2 - q^4 - q^5 + O(q^6), q^3 + O(q^6)]
|
|
70
|
+
|
|
71
|
+
sage: S = CuspForms(Gamma1(3),6); S
|
|
72
|
+
Cuspidal subspace of dimension 1 of Modular Forms space of dimension 3 for
|
|
73
|
+
Congruence Subgroup Gamma1(3) of weight 6 over Rational Field
|
|
74
|
+
sage: S.basis()
|
|
75
|
+
[q - 6*q^2 + 9*q^3 + 4*q^4 + 6*q^5 + O(q^6)]
|
|
76
|
+
sage: S == loads(dumps(S))
|
|
77
|
+
True
|
|
78
|
+
"""
|
|
79
|
+
from sage.misc.verbose import verbose
|
|
80
|
+
verbose('creating cuspidal submodule of %s' % ambient_space)
|
|
81
|
+
d = ambient_space._dim_cuspidal()
|
|
82
|
+
V = ambient_space.module()
|
|
83
|
+
G = [V.gen(i) for i in range(d)]
|
|
84
|
+
S = V.submodule(G, check=False, already_echelonized=True)
|
|
85
|
+
ModularFormsSubmodule.__init__(self, ambient_space, S)
|
|
86
|
+
|
|
87
|
+
def _compute_q_expansion_basis(self, prec):
|
|
88
|
+
r"""
|
|
89
|
+
Compute a basis of `q`-expansions of ``self`` to the given precision. Not
|
|
90
|
+
implemented in this abstract base class.
|
|
91
|
+
|
|
92
|
+
EXAMPLES::
|
|
93
|
+
|
|
94
|
+
sage: M = CuspForms(GammaH(11,[2]), 2)
|
|
95
|
+
sage: sage.modular.modform.cuspidal_submodule.CuspidalSubmodule._compute_q_expansion_basis(M, 6)
|
|
96
|
+
Traceback (most recent call last):
|
|
97
|
+
...
|
|
98
|
+
NotImplementedError: q-expansion basis not implemented for "Cuspidal subspace of ..."
|
|
99
|
+
"""
|
|
100
|
+
raise NotImplementedError('q-expansion basis not implemented for "%s"' % self)
|
|
101
|
+
|
|
102
|
+
def _repr_(self) -> str:
|
|
103
|
+
"""
|
|
104
|
+
Return the string representation of ``self``.
|
|
105
|
+
|
|
106
|
+
EXAMPLES::
|
|
107
|
+
|
|
108
|
+
sage: S = CuspForms(Gamma1(3),6); S._repr_()
|
|
109
|
+
'Cuspidal subspace of dimension 1 of Modular Forms space of dimension 3 for Congruence Subgroup Gamma1(3) of weight 6 over Rational Field'
|
|
110
|
+
"""
|
|
111
|
+
return "Cuspidal subspace of dimension %s of %s" % (self.dimension(), self.ambient_module())
|
|
112
|
+
|
|
113
|
+
def is_cuspidal(self) -> bool:
|
|
114
|
+
"""
|
|
115
|
+
Return ``True`` since spaces of cusp forms are cuspidal.
|
|
116
|
+
|
|
117
|
+
EXAMPLES::
|
|
118
|
+
|
|
119
|
+
sage: CuspForms(4,10).is_cuspidal()
|
|
120
|
+
True
|
|
121
|
+
"""
|
|
122
|
+
return True
|
|
123
|
+
|
|
124
|
+
@cached_method
|
|
125
|
+
def modular_symbols(self, sign=0):
|
|
126
|
+
"""
|
|
127
|
+
Return the corresponding space of modular symbols with the given sign.
|
|
128
|
+
|
|
129
|
+
EXAMPLES::
|
|
130
|
+
|
|
131
|
+
sage: S = ModularForms(11,2).cuspidal_submodule()
|
|
132
|
+
sage: S.modular_symbols()
|
|
133
|
+
Modular Symbols subspace of dimension 2 of Modular Symbols space
|
|
134
|
+
of dimension 3 for Gamma_0(11) of weight 2 with sign 0 over Rational Field
|
|
135
|
+
|
|
136
|
+
sage: S.modular_symbols(sign=-1)
|
|
137
|
+
Modular Symbols subspace of dimension 1 of Modular Symbols space
|
|
138
|
+
of dimension 1 for Gamma_0(11) of weight 2 with sign -1 over Rational Field
|
|
139
|
+
|
|
140
|
+
sage: M = S.modular_symbols(sign=1); M
|
|
141
|
+
Modular Symbols subspace of dimension 1 of Modular Symbols space of
|
|
142
|
+
dimension 2 for Gamma_0(11) of weight 2 with sign 1 over Rational Field
|
|
143
|
+
sage: M.sign()
|
|
144
|
+
1
|
|
145
|
+
|
|
146
|
+
sage: S = ModularForms(1,12).cuspidal_submodule()
|
|
147
|
+
sage: S.modular_symbols()
|
|
148
|
+
Modular Symbols subspace of dimension 2 of Modular Symbols space of
|
|
149
|
+
dimension 3 for Gamma_0(1) of weight 12 with sign 0 over Rational Field
|
|
150
|
+
|
|
151
|
+
sage: # needs sage.rings.number_field
|
|
152
|
+
sage: eps = DirichletGroup(13).0
|
|
153
|
+
sage: S = CuspForms(eps^2, 2)
|
|
154
|
+
sage: S.modular_symbols(sign=0)
|
|
155
|
+
Modular Symbols subspace of dimension 2 of Modular Symbols space
|
|
156
|
+
of dimension 4 and level 13, weight 2, character [zeta6], sign 0,
|
|
157
|
+
over Cyclotomic Field of order 6 and degree 2
|
|
158
|
+
sage: S.modular_symbols(sign=1)
|
|
159
|
+
Modular Symbols subspace of dimension 1 of Modular Symbols space
|
|
160
|
+
of dimension 3 and level 13, weight 2, character [zeta6], sign 1,
|
|
161
|
+
over Cyclotomic Field of order 6 and degree 2
|
|
162
|
+
sage: S.modular_symbols(sign=-1)
|
|
163
|
+
Modular Symbols subspace of dimension 1 of Modular Symbols space
|
|
164
|
+
of dimension 1 and level 13, weight 2, character [zeta6], sign -1,
|
|
165
|
+
over Cyclotomic Field of order 6 and degree 2
|
|
166
|
+
"""
|
|
167
|
+
A = self.ambient_module()
|
|
168
|
+
return A.modular_symbols(sign).cuspidal_submodule()
|
|
169
|
+
|
|
170
|
+
def change_ring(self, R):
|
|
171
|
+
r"""
|
|
172
|
+
Change the base ring of ``self`` to ``R``, when this makes sense.
|
|
173
|
+
|
|
174
|
+
This differs from
|
|
175
|
+
:meth:`~sage.modular.modform.space.ModularFormsSpace.base_extend`
|
|
176
|
+
in that there may not be a canonical map from ``self`` to the new
|
|
177
|
+
space, as in the first example below. If this space has a
|
|
178
|
+
character then this may fail when the character cannot be
|
|
179
|
+
defined over ``R``, as in the second example.
|
|
180
|
+
|
|
181
|
+
EXAMPLES::
|
|
182
|
+
|
|
183
|
+
sage: # needs sage.rings.number_field
|
|
184
|
+
sage: chi = DirichletGroup(109, CyclotomicField(3)).0
|
|
185
|
+
sage: S9 = CuspForms(chi, 2, base_ring = CyclotomicField(9)); S9
|
|
186
|
+
Cuspidal subspace of dimension 8 of
|
|
187
|
+
Modular Forms space of dimension 10, character [zeta3 + 1] and weight 2
|
|
188
|
+
over Cyclotomic Field of order 9 and degree 6
|
|
189
|
+
sage: S9.change_ring(CyclotomicField(3))
|
|
190
|
+
Cuspidal subspace of dimension 8 of
|
|
191
|
+
Modular Forms space of dimension 10, character [zeta3 + 1] and weight 2
|
|
192
|
+
over Cyclotomic Field of order 3 and degree 2
|
|
193
|
+
sage: S9.change_ring(QQ)
|
|
194
|
+
Traceback (most recent call last):
|
|
195
|
+
...
|
|
196
|
+
ValueError: Space cannot be defined over Rational Field
|
|
197
|
+
"""
|
|
198
|
+
return self.ambient_module().change_ring(R).cuspidal_submodule()
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
class CuspidalSubmodule_R(CuspidalSubmodule):
|
|
202
|
+
"""
|
|
203
|
+
Cuspidal submodule over a non-minimal base ring.
|
|
204
|
+
"""
|
|
205
|
+
def _compute_q_expansion_basis(self, prec):
|
|
206
|
+
r"""
|
|
207
|
+
EXAMPLES::
|
|
208
|
+
|
|
209
|
+
sage: # needs sage.rings.number_field
|
|
210
|
+
sage: CuspForms(Gamma1(13), 2, base_ring=QuadraticField(-7, 'a')).q_expansion_basis() # indirect doctest
|
|
211
|
+
[q - 4*q^3 - q^4 + 3*q^5 + O(q^6), q^2 - 2*q^3 - q^4 + 2*q^5 + O(q^6)]
|
|
212
|
+
"""
|
|
213
|
+
return ModularFormsSubmodule._compute_q_expansion_basis(self, prec)
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
class CuspidalSubmodule_modsym_qexp(CuspidalSubmodule):
|
|
217
|
+
"""
|
|
218
|
+
Cuspidal submodule with `q`-expansions calculated via modular symbols.
|
|
219
|
+
"""
|
|
220
|
+
def _compute_q_expansion_basis(self, prec=None):
|
|
221
|
+
"""
|
|
222
|
+
Compute `q`-expansions of a basis for ``self`` (via modular symbols).
|
|
223
|
+
|
|
224
|
+
EXAMPLES::
|
|
225
|
+
|
|
226
|
+
sage: sage.modular.modform.cuspidal_submodule.CuspidalSubmodule_modsym_qexp(ModularForms(11,2))._compute_q_expansion_basis()
|
|
227
|
+
[q - 2*q^2 - q^3 + 2*q^4 + q^5 + O(q^6)]
|
|
228
|
+
"""
|
|
229
|
+
if prec is None:
|
|
230
|
+
prec = self.prec()
|
|
231
|
+
else:
|
|
232
|
+
prec = Integer(prec)
|
|
233
|
+
if self.dimension() == 0:
|
|
234
|
+
return []
|
|
235
|
+
M = self.modular_symbols(sign=1)
|
|
236
|
+
return M.q_expansion_basis(prec)
|
|
237
|
+
|
|
238
|
+
def _compute_hecke_matrix_prime(self, p):
|
|
239
|
+
"""
|
|
240
|
+
Compute the matrix of a Hecke operator.
|
|
241
|
+
|
|
242
|
+
EXAMPLES::
|
|
243
|
+
|
|
244
|
+
sage: C = CuspForms(38, 2)
|
|
245
|
+
sage: C._compute_hecke_matrix_prime(7)
|
|
246
|
+
[-1 0 0 0]
|
|
247
|
+
[ 0 -1 0 0]
|
|
248
|
+
[-2 -2 1 -2]
|
|
249
|
+
[ 2 2 -2 1]
|
|
250
|
+
"""
|
|
251
|
+
A = self.modular_symbols(sign=1)
|
|
252
|
+
T = A.hecke_matrix(p)
|
|
253
|
+
return _convert_matrix_from_modsyms(A, T)[0]
|
|
254
|
+
|
|
255
|
+
def hecke_polynomial(self, n, var='x'):
|
|
256
|
+
r"""
|
|
257
|
+
Return the characteristic polynomial of the Hecke operator `T_n` on this
|
|
258
|
+
space. This is computed via modular symbols, and in particular is
|
|
259
|
+
faster to compute than the matrix itself.
|
|
260
|
+
|
|
261
|
+
EXAMPLES::
|
|
262
|
+
|
|
263
|
+
sage: CuspForms(105, 2).hecke_polynomial(2, 'y')
|
|
264
|
+
y^13 + 5*y^12 - 4*y^11 - 52*y^10 - 34*y^9 + 174*y^8 + 212*y^7
|
|
265
|
+
- 196*y^6 - 375*y^5 - 11*y^4 + 200*y^3 + 80*y^2
|
|
266
|
+
|
|
267
|
+
Check that this gives the same answer as computing the Hecke matrix::
|
|
268
|
+
|
|
269
|
+
sage: CuspForms(105, 2).hecke_matrix(2).charpoly(var='y')
|
|
270
|
+
y^13 + 5*y^12 - 4*y^11 - 52*y^10 - 34*y^9 + 174*y^8 + 212*y^7
|
|
271
|
+
- 196*y^6 - 375*y^5 - 11*y^4 + 200*y^3 + 80*y^2
|
|
272
|
+
|
|
273
|
+
Check that :issue:`21546` is fixed (this example used to take about 5 hours)::
|
|
274
|
+
|
|
275
|
+
sage: CuspForms(1728, 2).hecke_polynomial(2) # long time (20 sec)
|
|
276
|
+
x^253 + x^251 - 2*x^249
|
|
277
|
+
"""
|
|
278
|
+
return self.modular_symbols(sign=1).hecke_polynomial(n, var)
|
|
279
|
+
|
|
280
|
+
def new_submodule(self, p=None):
|
|
281
|
+
r"""
|
|
282
|
+
Return the new subspace of this space of cusp forms. This is computed
|
|
283
|
+
using modular symbols.
|
|
284
|
+
|
|
285
|
+
EXAMPLES::
|
|
286
|
+
|
|
287
|
+
sage: CuspForms(55).new_submodule()
|
|
288
|
+
Modular Forms subspace of dimension 3 of
|
|
289
|
+
Modular Forms space of dimension 8 for
|
|
290
|
+
Congruence Subgroup Gamma0(55) of weight 2 over Rational Field
|
|
291
|
+
"""
|
|
292
|
+
symbs = self.modular_symbols(sign=1).new_subspace(p)
|
|
293
|
+
bas = []
|
|
294
|
+
for x in symbs.q_expansion_basis(self.sturm_bound()):
|
|
295
|
+
bas.append(self(x))
|
|
296
|
+
return self.submodule(bas, check=False)
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
class CuspidalSubmodule_level1_Q(CuspidalSubmodule):
|
|
300
|
+
r"""
|
|
301
|
+
Space of cusp forms of level 1 over `\QQ`.
|
|
302
|
+
"""
|
|
303
|
+
def _compute_q_expansion_basis(self, prec=None):
|
|
304
|
+
"""
|
|
305
|
+
Compute `q`-expansions of a basis for ``self``.
|
|
306
|
+
|
|
307
|
+
EXAMPLES::
|
|
308
|
+
|
|
309
|
+
sage: sage.modular.modform.cuspidal_submodule.CuspidalSubmodule_level1_Q(ModularForms(1,12))._compute_q_expansion_basis()
|
|
310
|
+
[q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6)]
|
|
311
|
+
"""
|
|
312
|
+
if prec is None:
|
|
313
|
+
prec = self.prec()
|
|
314
|
+
else:
|
|
315
|
+
prec = Integer(prec)
|
|
316
|
+
return victor_miller_basis(self.weight(), prec, cusp_only=True, var='q')
|
|
317
|
+
|
|
318
|
+
def _pari_init_(self):
|
|
319
|
+
"""
|
|
320
|
+
Conversion to Pari.
|
|
321
|
+
|
|
322
|
+
EXAMPLES::
|
|
323
|
+
|
|
324
|
+
sage: A = ModularForms(1,12).cuspidal_submodule()
|
|
325
|
+
sage: pari.mfparams(A)
|
|
326
|
+
[1, 12, 1, 1, t - 1]
|
|
327
|
+
sage: pari.mfdim(A)
|
|
328
|
+
1
|
|
329
|
+
"""
|
|
330
|
+
from sage.libs.pari import pari
|
|
331
|
+
return pari.mfinit([self.level(), self.weight()], 1)
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
class CuspidalSubmodule_wt1_eps(CuspidalSubmodule):
|
|
335
|
+
r"""
|
|
336
|
+
Space of cusp forms of weight 1 with specified character.
|
|
337
|
+
"""
|
|
338
|
+
|
|
339
|
+
def _compute_q_expansion_basis(self, prec=None):
|
|
340
|
+
r"""
|
|
341
|
+
Compute `q`-expansion basis using Schaeffer's algorithm.
|
|
342
|
+
|
|
343
|
+
EXAMPLES::
|
|
344
|
+
|
|
345
|
+
sage: CuspForms(DirichletGroup(23, QQ).0, 1).q_echelon_basis() # indirect doctest
|
|
346
|
+
[q - q^2 - q^3 + O(q^6)]
|
|
347
|
+
"""
|
|
348
|
+
if prec is None:
|
|
349
|
+
prec = self.prec()
|
|
350
|
+
else:
|
|
351
|
+
prec = Integer(prec)
|
|
352
|
+
chi = self.character()
|
|
353
|
+
return [weight1.modular_ratio_to_prec(chi, f, prec) for f in
|
|
354
|
+
weight1.hecke_stable_subspace(chi)]
|
|
355
|
+
|
|
356
|
+
def _pari_init_(self):
|
|
357
|
+
"""
|
|
358
|
+
Conversion to Pari.
|
|
359
|
+
|
|
360
|
+
EXAMPLES::
|
|
361
|
+
|
|
362
|
+
sage: A = CuspForms(DirichletGroup(23, QQ).0, 1)
|
|
363
|
+
sage: pari.mfparams(A)
|
|
364
|
+
[23, 1, -23, 1, t + 1]
|
|
365
|
+
sage: pari.mfdim(A)
|
|
366
|
+
1
|
|
367
|
+
"""
|
|
368
|
+
from sage.libs.pari import pari
|
|
369
|
+
return pari.mfinit([self.level(), self.weight(), self.character()], 1)
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
class CuspidalSubmodule_wt1_gH(CuspidalSubmodule):
|
|
373
|
+
r"""
|
|
374
|
+
Space of cusp forms of weight 1 for a GammaH group.
|
|
375
|
+
"""
|
|
376
|
+
|
|
377
|
+
def _compute_q_expansion_basis(self, prec=None):
|
|
378
|
+
r"""
|
|
379
|
+
Compute `q`-expansion basis using Schaeffer's algorithm.
|
|
380
|
+
|
|
381
|
+
EXAMPLES::
|
|
382
|
+
|
|
383
|
+
sage: CuspForms(GammaH(31, [7]), 1).q_expansion_basis() # indirect doctest
|
|
384
|
+
[q - q^2 - q^5 + O(q^6)]
|
|
385
|
+
|
|
386
|
+
A more elaborate example (two Galois-conjugate characters each giving a
|
|
387
|
+
2-dimensional space)::
|
|
388
|
+
|
|
389
|
+
sage: CuspForms(GammaH(124, [85]), 1).q_expansion_basis() # long time
|
|
390
|
+
[q - q^4 - q^6 + O(q^7), q^2 + O(q^7), q^3 + O(q^7), q^5 - q^6 + O(q^7)]
|
|
391
|
+
"""
|
|
392
|
+
if prec is None:
|
|
393
|
+
prec = self.prec()
|
|
394
|
+
else:
|
|
395
|
+
prec = Integer(prec)
|
|
396
|
+
|
|
397
|
+
chars = self.group().characters_mod_H(sign=-1, galois_orbits=True)
|
|
398
|
+
|
|
399
|
+
B = []
|
|
400
|
+
dim = 0
|
|
401
|
+
for c in chars:
|
|
402
|
+
chi = c.minimize_base_ring()
|
|
403
|
+
Bchi = [weight1.modular_ratio_to_prec(chi, f, prec)
|
|
404
|
+
for f in weight1.hecke_stable_subspace(chi) ]
|
|
405
|
+
if Bchi == []:
|
|
406
|
+
continue
|
|
407
|
+
if chi.base_ring() == QQ:
|
|
408
|
+
B += [f.padded_list(prec) for f in Bchi]
|
|
409
|
+
dim += len(Bchi)
|
|
410
|
+
else:
|
|
411
|
+
d = chi.base_ring().degree()
|
|
412
|
+
dim += d * len(Bchi)
|
|
413
|
+
for f in Bchi:
|
|
414
|
+
w = f.padded_list(prec)
|
|
415
|
+
for i in range(d):
|
|
416
|
+
B.append([x[i] for x in w])
|
|
417
|
+
|
|
418
|
+
basis_mat = Matrix(QQ, B)
|
|
419
|
+
if basis_mat.is_zero():
|
|
420
|
+
return []
|
|
421
|
+
# Daft thing: "transformation=True" parameter to echelonize
|
|
422
|
+
# is ignored for rational matrices!
|
|
423
|
+
big_mat = basis_mat.augment(identity_matrix(dim))
|
|
424
|
+
big_mat.echelonize()
|
|
425
|
+
c = big_mat.pivots()[-1]
|
|
426
|
+
|
|
427
|
+
echelon_basis_mat = big_mat[:, :prec]
|
|
428
|
+
|
|
429
|
+
R = self._q_expansion_ring()
|
|
430
|
+
|
|
431
|
+
if c >= prec:
|
|
432
|
+
verbose("Precision %s insufficient to determine basis" % prec, level=1)
|
|
433
|
+
else:
|
|
434
|
+
verbose("Minimal precision for basis: %s" % (c+1), level=1)
|
|
435
|
+
t = big_mat[:, prec:]
|
|
436
|
+
assert echelon_basis_mat == t * basis_mat
|
|
437
|
+
self.__transformation_matrix = t
|
|
438
|
+
self._char_basis = [R(f.list(), c+1) for f in basis_mat.rows()]
|
|
439
|
+
|
|
440
|
+
return [R(f.list(), prec) for f in echelon_basis_mat.rows() if f != 0]
|
|
441
|
+
|
|
442
|
+
def _transformation_matrix(self):
|
|
443
|
+
r"""
|
|
444
|
+
Return the transformation matrix between a basis of Galois orbits of
|
|
445
|
+
forms with character, and the echelon-form basis.
|
|
446
|
+
|
|
447
|
+
EXAMPLES::
|
|
448
|
+
|
|
449
|
+
sage: CuspForms(GammaH(31, [7]), 1)._transformation_matrix()
|
|
450
|
+
[1]
|
|
451
|
+
sage: CuspForms(GammaH(124, [33]), 1)._transformation_matrix() # long time
|
|
452
|
+
[ 1 1 0 0 0 0 1]
|
|
453
|
+
[ 0 0 0 0 0 1 0]
|
|
454
|
+
[ 1 0 1 1 -1 -1 1]
|
|
455
|
+
[ 0 0 0 0 0 0 1]
|
|
456
|
+
[ 0 1 0 0 0 0 0]
|
|
457
|
+
[ 1 0 0 0 -1 0 1]
|
|
458
|
+
[ 0 0 1 0 0 -1 0]
|
|
459
|
+
"""
|
|
460
|
+
self.q_expansion_basis() # triggers iterative computation
|
|
461
|
+
return self.__transformation_matrix
|
|
462
|
+
|
|
463
|
+
def _compute_diamond_matrix(self, d):
|
|
464
|
+
r"""
|
|
465
|
+
EXAMPLES::
|
|
466
|
+
|
|
467
|
+
sage: CuspForms(GammaH(31, [7]), 1).diamond_bracket_matrix(3)
|
|
468
|
+
[-1]
|
|
469
|
+
|
|
470
|
+
sage: C = CuspForms(GammaH(124, [33]), 1) # long time
|
|
471
|
+
sage: D = C.diamond_bracket_matrix(3); D # long time
|
|
472
|
+
[ 0 0 0 -1 1 0 0]
|
|
473
|
+
[ 0 -1 0 0 0 0 0]
|
|
474
|
+
[ 2 1 1 -2 -1 -2 -1]
|
|
475
|
+
[ 0 0 0 -1 0 0 0]
|
|
476
|
+
[-1 0 0 1 1 0 0]
|
|
477
|
+
[ 2 0 0 -2 -1 -1 0]
|
|
478
|
+
[ 0 2 1 0 0 -1 0]
|
|
479
|
+
sage: t = C._transformation_matrix(); ~t * D * t # long time
|
|
480
|
+
[ 1 1 0 0 0 0 0]
|
|
481
|
+
[-1 0 0 0 0 0 0]
|
|
482
|
+
[ 0 0 1 1 0 0 0]
|
|
483
|
+
[ 0 0 -1 0 0 0 0]
|
|
484
|
+
[ 0 0 0 0 -1 0 0]
|
|
485
|
+
[ 0 0 0 0 0 -1 0]
|
|
486
|
+
[ 0 0 0 0 0 0 -1]
|
|
487
|
+
"""
|
|
488
|
+
chars = self.group().characters_mod_H(sign=-1, galois_orbits=True)
|
|
489
|
+
A = Matrix(QQ, 0, 0)
|
|
490
|
+
for c in chars:
|
|
491
|
+
chi = c.minimize_base_ring()
|
|
492
|
+
dim = weight1.dimension_wt1_cusp_forms(chi)
|
|
493
|
+
if chi.base_ring() == QQ:
|
|
494
|
+
m = Matrix(QQ, 1, 1, [chi(d)])
|
|
495
|
+
else:
|
|
496
|
+
m = chi(d).matrix().transpose()
|
|
497
|
+
for i in range(dim):
|
|
498
|
+
A = A.block_sum(m)
|
|
499
|
+
t = self._transformation_matrix()
|
|
500
|
+
return t * A * ~t
|
|
501
|
+
|
|
502
|
+
def _compute_hecke_matrix(self, n):
|
|
503
|
+
r"""
|
|
504
|
+
EXAMPLES::
|
|
505
|
+
|
|
506
|
+
sage: CuspForms(GammaH(31, [7]), 1).hecke_matrix(7)
|
|
507
|
+
[-1]
|
|
508
|
+
|
|
509
|
+
sage: # long time
|
|
510
|
+
sage: C = CuspForms(GammaH(124, [33]), 1)
|
|
511
|
+
sage: C.hecke_matrix(2)
|
|
512
|
+
[ 0 0 -1 -1 0 1 0]
|
|
513
|
+
[ 1 0 0 -1 -1 -1 0]
|
|
514
|
+
[ 0 0 0 -1 1 1 -1]
|
|
515
|
+
[ 0 1 0 -1 0 0 0]
|
|
516
|
+
[ 0 0 -1 0 0 1 1]
|
|
517
|
+
[ 0 0 0 -1 0 0 -1]
|
|
518
|
+
[ 0 0 0 0 0 1 0]
|
|
519
|
+
sage: C.hecke_matrix(7)
|
|
520
|
+
[ 0 1 0 -1 0 0 1]
|
|
521
|
+
[ 0 -1 0 0 0 0 0]
|
|
522
|
+
[ 0 1 -1 0 0 0 1]
|
|
523
|
+
[ 0 0 0 -1 0 0 0]
|
|
524
|
+
[ 0 1 1 0 0 -1 0]
|
|
525
|
+
[ 1 0 -1 -1 -1 0 1]
|
|
526
|
+
[ 0 1 0 0 1 0 0]
|
|
527
|
+
sage: C.hecke_matrix(23) == 0
|
|
528
|
+
True
|
|
529
|
+
"""
|
|
530
|
+
chars = self.group().characters_mod_H(sign=-1, galois_orbits=True)
|
|
531
|
+
A = Matrix(QQ, 0, 0)
|
|
532
|
+
for c in chars:
|
|
533
|
+
chi = c.minimize_base_ring()
|
|
534
|
+
d = weight1.dimension_wt1_cusp_forms(chi)
|
|
535
|
+
e = chi.base_ring().degree()
|
|
536
|
+
H = Matrix(QQ, d*e, d*e)
|
|
537
|
+
from .constructor import CuspForms
|
|
538
|
+
M = CuspForms(chi, 1).hecke_matrix(n)
|
|
539
|
+
if e == 1:
|
|
540
|
+
H = M
|
|
541
|
+
else:
|
|
542
|
+
for i in range(d):
|
|
543
|
+
for j in range(d):
|
|
544
|
+
H[e*i:e*(i+1), e*j:e*(j+1)] = M[i,j].matrix().transpose()
|
|
545
|
+
A = A.block_sum(H)
|
|
546
|
+
t = self._transformation_matrix()
|
|
547
|
+
return t * A * ~t
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
class CuspidalSubmodule_g0_Q(CuspidalSubmodule_modsym_qexp):
|
|
551
|
+
r"""
|
|
552
|
+
Space of cusp forms for `\Gamma_0(N)` over `\QQ`.
|
|
553
|
+
"""
|
|
554
|
+
def _pari_init_(self):
|
|
555
|
+
"""
|
|
556
|
+
Conversion to Pari.
|
|
557
|
+
|
|
558
|
+
EXAMPLES::
|
|
559
|
+
|
|
560
|
+
sage: h = Newforms(37)[1]
|
|
561
|
+
sage: MF = h.parent()
|
|
562
|
+
sage: pari.mfparams(MF)
|
|
563
|
+
[37, 2, 1, 1, t - 1]
|
|
564
|
+
sage: pari.mfdim(MF)
|
|
565
|
+
2
|
|
566
|
+
"""
|
|
567
|
+
from sage.libs.pari import pari
|
|
568
|
+
return pari.mfinit([self.level(), self.weight()], 1)
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
class CuspidalSubmodule_gH_Q(CuspidalSubmodule_modsym_qexp):
|
|
572
|
+
r"""
|
|
573
|
+
Space of cusp forms for `\Gamma_H(N)` over `\QQ`.
|
|
574
|
+
"""
|
|
575
|
+
|
|
576
|
+
def _compute_hecke_matrix(self, n):
|
|
577
|
+
r"""
|
|
578
|
+
Compute the matrix of the Hecke operator `T_n` acting on this space.
|
|
579
|
+
This is done directly using modular symbols, rather than using
|
|
580
|
+
`q`-expansions as for spaces with fixed character.
|
|
581
|
+
|
|
582
|
+
EXAMPLES::
|
|
583
|
+
|
|
584
|
+
sage: CuspForms(Gamma1(8), 4)._compute_hecke_matrix(2)
|
|
585
|
+
[ 0 -16 32]
|
|
586
|
+
[ 1 -10 18]
|
|
587
|
+
[ 0 -4 8]
|
|
588
|
+
|
|
589
|
+
sage: CuspForms(GammaH(15, [4]), 3)._compute_hecke_matrix(17)
|
|
590
|
+
[ 18 22 -30 -60]
|
|
591
|
+
[ 4 0 6 -18]
|
|
592
|
+
[ 6 0 2 -20]
|
|
593
|
+
[ 6 12 -24 -20]
|
|
594
|
+
"""
|
|
595
|
+
symbs = self.modular_symbols(sign=1)
|
|
596
|
+
return _convert_matrix_from_modsyms(symbs, symbs.hecke_matrix(n))[0]
|
|
597
|
+
|
|
598
|
+
def _compute_diamond_matrix(self, d):
|
|
599
|
+
r"""
|
|
600
|
+
EXAMPLES::
|
|
601
|
+
|
|
602
|
+
sage: CuspForms(Gamma1(5), 6).diamond_bracket_matrix(3) # indirect doctest
|
|
603
|
+
[ -1 0 0]
|
|
604
|
+
[ 3 5 -12]
|
|
605
|
+
[ 1 2 -5]
|
|
606
|
+
sage: CuspForms(GammaH(15, [4]), 3)._compute_diamond_matrix(7)
|
|
607
|
+
[ 2 3 -9 -3]
|
|
608
|
+
[ 0 2 -3 0]
|
|
609
|
+
[ 0 1 -2 0]
|
|
610
|
+
[ 1 1 -3 -2]
|
|
611
|
+
"""
|
|
612
|
+
symbs = self.modular_symbols(sign=1)
|
|
613
|
+
return _convert_matrix_from_modsyms(symbs, symbs.diamond_bracket_matrix(d))[0]
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
class CuspidalSubmodule_g1_Q(CuspidalSubmodule_gH_Q):
|
|
617
|
+
r"""
|
|
618
|
+
Space of cusp forms for `\Gamma_1(N)` over `\QQ`.
|
|
619
|
+
"""
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
class CuspidalSubmodule_eps(CuspidalSubmodule_modsym_qexp):
|
|
623
|
+
"""
|
|
624
|
+
Space of cusp forms with given Dirichlet character.
|
|
625
|
+
|
|
626
|
+
EXAMPLES::
|
|
627
|
+
|
|
628
|
+
sage: S = CuspForms(DirichletGroup(5).0,5); S
|
|
629
|
+
Cuspidal subspace of dimension 1 of Modular Forms space of dimension 3,
|
|
630
|
+
character [zeta4] and weight 5 over Cyclotomic Field of order 4 and degree 2
|
|
631
|
+
|
|
632
|
+
sage: S.basis()
|
|
633
|
+
[q + (-zeta4 - 1)*q^2 + (6*zeta4 - 6)*q^3 - 14*zeta4*q^4 + (15*zeta4 + 20)*q^5 + O(q^6)]
|
|
634
|
+
sage: f = S.0
|
|
635
|
+
sage: f.qexp()
|
|
636
|
+
q + (-zeta4 - 1)*q^2 + (6*zeta4 - 6)*q^3 - 14*zeta4*q^4 + (15*zeta4 + 20)*q^5 + O(q^6)
|
|
637
|
+
sage: f.qexp(7)
|
|
638
|
+
q + (-zeta4 - 1)*q^2 + (6*zeta4 - 6)*q^3 - 14*zeta4*q^4 + (15*zeta4 + 20)*q^5 + 12*q^6 + O(q^7)
|
|
639
|
+
sage: f.qexp(3)
|
|
640
|
+
q + (-zeta4 - 1)*q^2 + O(q^3)
|
|
641
|
+
sage: f.qexp(2)
|
|
642
|
+
q + O(q^2)
|
|
643
|
+
sage: f.qexp(1)
|
|
644
|
+
O(q^1)
|
|
645
|
+
"""
|
|
646
|
+
pass
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
def _convert_matrix_from_modsyms(symbs, T):
|
|
650
|
+
r"""
|
|
651
|
+
Given a space of modular symbols and a matrix T acting on it, calculate the
|
|
652
|
+
matrix of the corresponding operator on the echelon-form basis of the
|
|
653
|
+
corresponding space of modular forms.
|
|
654
|
+
|
|
655
|
+
The matrix T *must* commute with the Hecke operators! We use this when T is
|
|
656
|
+
either a Hecke operator, or a diamond operator. This will *not work* for
|
|
657
|
+
the Atkin-Lehner operators, for instance, when there are oldforms present.
|
|
658
|
+
|
|
659
|
+
OUTPUT:
|
|
660
|
+
|
|
661
|
+
A pair `(T_e, ps)` with `T_e` the converted matrix and `ps` a list
|
|
662
|
+
of pivot elements of the echelon basis.
|
|
663
|
+
|
|
664
|
+
EXAMPLES::
|
|
665
|
+
|
|
666
|
+
sage: CuspForms(Gamma1(5), 6).diamond_bracket_matrix(3) # indirect doctest
|
|
667
|
+
[ -1 0 0]
|
|
668
|
+
[ 3 5 -12]
|
|
669
|
+
[ 1 2 -5]
|
|
670
|
+
"""
|
|
671
|
+
d = symbs.rank()
|
|
672
|
+
|
|
673
|
+
# create a vector space of appropriate dimension to
|
|
674
|
+
# contain our q-expansions
|
|
675
|
+
A = symbs.base_ring()
|
|
676
|
+
r = symbs.sturm_bound()
|
|
677
|
+
X = A**r
|
|
678
|
+
Y = X.zero_submodule()
|
|
679
|
+
basis = []
|
|
680
|
+
basis_images = []
|
|
681
|
+
|
|
682
|
+
# we repeatedly use these matrices below, so we store them
|
|
683
|
+
# once as lists to save time.
|
|
684
|
+
hecke_matrix_ls = [symbs.hecke_matrix(m).list()
|
|
685
|
+
for m in range(1, r + 1)]
|
|
686
|
+
hecke_image_ls = [(T * symbs.hecke_matrix(m)).list()
|
|
687
|
+
for m in range(1, r + 1)]
|
|
688
|
+
|
|
689
|
+
# compute the q-expansions of some cusp forms and their
|
|
690
|
+
# images under T_n
|
|
691
|
+
for i in range(d**2):
|
|
692
|
+
v = X([hecke_matrix_ls[m][i] for m in range(r)])
|
|
693
|
+
Ynew = Y.span(Y.basis() + [v])
|
|
694
|
+
if Ynew.rank() > Y.rank():
|
|
695
|
+
basis.append(v)
|
|
696
|
+
basis_images.append(X([hecke_image_ls[m][i] for m in range(r)]))
|
|
697
|
+
Y = Ynew
|
|
698
|
+
if len(basis) == d:
|
|
699
|
+
break
|
|
700
|
+
|
|
701
|
+
# now we can compute the matrix acting on the echelonized space of mod forms
|
|
702
|
+
# need to pass A as base ring since otherwise there are problems when the
|
|
703
|
+
# space has dimension 0
|
|
704
|
+
bigmat = Matrix(A, basis).augment(Matrix(A, basis_images))
|
|
705
|
+
bigmat.echelonize()
|
|
706
|
+
pivs = bigmat.pivots()
|
|
707
|
+
return bigmat.matrix_from_rows_and_columns(list(range(d)),
|
|
708
|
+
[r + x for x in pivs]), pivs
|