passagemath-schemes 10.5.44__cp313-cp313-musllinux_1_2_aarch64.whl → 10.6.42__cp313-cp313-musllinux_1_2_aarch64.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/__init__.py +3 -0
- {passagemath_schemes-10.5.44.dist-info → passagemath_schemes-10.6.42.dist-info}/METADATA +41 -41
- {passagemath_schemes-10.5.44.dist-info → passagemath_schemes-10.6.42.dist-info}/METADATA.bak +42 -42
- {passagemath_schemes-10.5.44.dist-info → passagemath_schemes-10.6.42.dist-info}/RECORD +158 -139
- passagemath_schemes-10.6.42.dist-info/top_level.txt +3 -0
- passagemath_schemes.libs/{libflint-7dd7ad94.so.19.0.0 → libflint-edf7fb90.so.22.0.0} +0 -0
- passagemath_schemes.libs/{libgcc_s-69c45f16.so.1 → libgcc_s-2d945d6c.so.1} +0 -0
- passagemath_schemes.libs/{libgmp-8e78bd9b.so.10.5.0 → libgmp-28992bcb.so.10.5.0} +0 -0
- passagemath_schemes.libs/{libgmpxx-e6de26f1.so.4.7.0 → libgmpxx-fecb01a9.so.4.7.0} +0 -0
- passagemath_schemes.libs/{libmpfr-5ff10580.so.6.2.1 → libmpfr-1fc8ea36.so.6.2.2} +0 -0
- passagemath_schemes.libs/{libstdc++-1f1a71be.so.6.0.33 → libstdc++-85f2cd6d.so.6.0.33} +0 -0
- sage/all__sagemath_schemes.py +3 -2
- sage/databases/all__sagemath_schemes.py +0 -10
- sage/dynamics/arithmetic_dynamics/berkovich_ds.py +4 -4
- sage/dynamics/arithmetic_dynamics/generic_ds.py +3 -3
- sage/dynamics/arithmetic_dynamics/projective_ds.py +7 -7
- sage/dynamics/arithmetic_dynamics/projective_ds_helper.cpython-313-aarch64-linux-musl.so +0 -0
- sage/dynamics/arithmetic_dynamics/wehlerK3.py +18 -18
- sage/lfunctions/zero_sums.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/abvar/abvar.py +12 -11
- sage/modular/abvar/constructor.py +3 -3
- sage/modular/abvar/cuspidal_subgroup.py +5 -6
- sage/modular/abvar/finite_subgroup.py +20 -18
- sage/modular/abvar/homology.py +1 -2
- sage/modular/abvar/homspace.py +1 -1
- sage/modular/abvar/lseries.py +3 -3
- sage/modular/abvar/morphism.py +1 -1
- sage/modular/abvar/torsion_point.py +1 -1
- sage/modular/abvar/torsion_subgroup.py +1 -1
- sage/modular/arithgroup/arithgroup_element.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/arithgroup/arithgroup_perm.py +16 -16
- sage/modular/arithgroup/congroup.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/arithgroup/congroup_gamma0.py +2 -2
- sage/modular/arithgroup/congroup_gamma1.py +4 -4
- sage/modular/arithgroup/congroup_gammaH.py +2 -2
- sage/modular/arithgroup/congroup_generic.py +2 -3
- sage/modular/arithgroup/congroup_sl2z.py +3 -3
- sage/modular/arithgroup/farey_symbol.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/arithgroup/farey_symbol.pyx +1 -2
- sage/modular/btquotients/btquotient.py +4 -5
- sage/modular/btquotients/pautomorphicform.py +2 -2
- sage/modular/cusps.py +6 -4
- sage/modular/cusps_nf.py +7 -8
- sage/modular/dirichlet.py +34 -43
- sage/modular/drinfeld_modform/element.py +4 -4
- sage/modular/drinfeld_modform/ring.py +12 -12
- sage/modular/drinfeld_modform/tutorial.py +1 -1
- sage/modular/hecke/algebra.py +7 -5
- sage/modular/hecke/ambient_module.py +2 -2
- sage/modular/hecke/element.py +7 -2
- sage/modular/hecke/module.py +9 -9
- sage/modular/hecke/submodule.py +6 -8
- sage/modular/hypergeometric_misc.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/hypergeometric_misc.pyx +3 -2
- sage/modular/hypergeometric_motive.py +2 -2
- sage/modular/local_comp/local_comp.py +19 -11
- sage/modular/local_comp/type_space.py +10 -8
- sage/modular/modform/ambient.py +4 -3
- sage/modular/modform/cuspidal_submodule.py +2 -2
- sage/modular/modform/element.py +72 -72
- sage/modular/modform/half_integral.py +1 -1
- sage/modular/modform/l_series_gross_zagier.py +3 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/modform/l_series_gross_zagier_coeffs.pyx +5 -2
- sage/modular/modform/ring.py +10 -12
- sage/modular/modform/space.py +18 -21
- sage/modular/modform/weight1.py +1 -2
- sage/modular/modform_hecketriangle/abstract_ring.py +7 -14
- sage/modular/modform_hecketriangle/abstract_space.py +63 -66
- sage/modular/modform_hecketriangle/graded_ring_element.py +11 -12
- sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +82 -84
- sage/modular/modform_hecketriangle/hecke_triangle_groups.py +2 -2
- sage/modular/modform_hecketriangle/readme.py +9 -11
- sage/modular/modform_hecketriangle/series_constructor.py +10 -18
- sage/modular/modform_hecketriangle/space.py +29 -30
- sage/modular/modform_hecketriangle/subspace.py +9 -7
- sage/modular/modsym/ambient.py +13 -20
- sage/modular/modsym/boundary.py +2 -2
- sage/modular/modsym/manin_symbol.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/modsym/manin_symbol_list.py +3 -7
- sage/modular/modsym/relation_matrix_pyx.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/modsym/space.py +10 -22
- sage/modular/modsym/subspace.py +5 -7
- sage/modular/multiple_zeta.py +11 -13
- sage/modular/multiple_zeta_F_algebra.py +4 -6
- sage/modular/overconvergent/genus0.py +5 -4
- sage/modular/overconvergent/hecke_series.py +2 -2
- sage/modular/pollack_stevens/distributions.py +2 -2
- sage/modular/pollack_stevens/fund_domain.py +26 -29
- sage/modular/pollack_stevens/manin_map.py +15 -10
- sage/modular/pollack_stevens/modsym.py +18 -18
- sage/modular/quasimodform/element.py +10 -10
- sage/modular/quasimodform/ring.py +22 -22
- sage/modular/ssmod/ssmod.py +5 -12
- sage/rings/polynomial/binary_form_reduce.py +1 -1
- sage/schemes/curves/affine_curve.py +4 -4
- sage/schemes/curves/plane_curve_arrangement.py +28 -24
- sage/schemes/elliptic_curves/BSD.py +1 -1
- sage/schemes/elliptic_curves/addition_formulas_ring.py +4 -0
- sage/schemes/elliptic_curves/cm.py +1 -1
- sage/schemes/elliptic_curves/constructor.py +3 -3
- sage/schemes/elliptic_curves/ell_egros.py +1 -1
- sage/schemes/elliptic_curves/ell_field.py +57 -46
- sage/schemes/elliptic_curves/ell_finite_field.py +138 -26
- sage/schemes/elliptic_curves/ell_local_data.py +9 -9
- sage/schemes/elliptic_curves/ell_number_field.py +25 -24
- sage/schemes/elliptic_curves/ell_point.py +21 -22
- sage/schemes/elliptic_curves/ell_rational_field.py +38 -28
- sage/schemes/elliptic_curves/formal_group.py +1 -1
- sage/schemes/elliptic_curves/heegner.py +11 -8
- sage/schemes/elliptic_curves/height.py +26 -23
- sage/schemes/elliptic_curves/hom.py +2 -1
- sage/schemes/elliptic_curves/hom_composite.py +11 -11
- sage/schemes/elliptic_curves/hom_frobenius.py +8 -8
- sage/schemes/elliptic_curves/hom_sum.py +7 -1
- sage/schemes/elliptic_curves/hom_velusqrt.py +13 -7
- sage/schemes/elliptic_curves/homset.py +2 -2
- sage/schemes/elliptic_curves/isogeny_small_degree.py +1 -1
- sage/schemes/elliptic_curves/mod_poly.py +12 -5
- sage/schemes/elliptic_curves/mod_sym_num.cpython-313-aarch64-linux-musl.so +0 -0
- sage/schemes/elliptic_curves/padic_lseries.py +25 -13
- sage/schemes/elliptic_curves/padics.py +71 -63
- sage/schemes/elliptic_curves/period_lattice.py +78 -27
- sage/schemes/elliptic_curves/period_lattice_region.cpython-313-aarch64-linux-musl.so +0 -0
- sage/schemes/elliptic_curves/sha_tate.py +1 -1
- sage/schemes/elliptic_curves/weierstrass_morphism.py +2 -2
- sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +1 -1
- sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +1 -1
- sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +10 -20
- sage/schemes/jacobians/abstract_jacobian.py +1 -1
- sage/schemes/plane_conics/con_field.py +42 -42
- sage/schemes/plane_conics/con_rational_field.py +1 -1
- sage/schemes/riemann_surfaces/riemann_surface.py +8 -8
- 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
- passagemath_schemes-10.5.44.dist-info/top_level.txt +0 -2
- sage/databases/db_modular_polynomials.py +0 -250
- sage/databases/stein_watkins.py +0 -363
- sage/modular/modsym/p1list.cpython-313-aarch64-linux-musl.so +0 -0
- sage/modular/modsym/p1list.pxd +0 -29
- sage/modular/modsym/p1list.pyx +0 -1372
- {passagemath_schemes-10.5.44.dist-info → passagemath_schemes-10.6.42.dist-info}/WHEEL +0 -0
sage/modular/modform/element.py
CHANGED
|
@@ -58,12 +58,12 @@ from sage.rings.real_mpfr import RealField
|
|
|
58
58
|
from sage.structure.element import coercion_model, ModuleElement, Element
|
|
59
59
|
from sage.structure.richcmp import richcmp, op_NE, op_EQ
|
|
60
60
|
|
|
61
|
-
lazy_import('sage.combinat.integer_vector_weighted', 'WeightedIntegerVectors')
|
|
62
|
-
lazy_import('sage.rings.number_field.number_field_morphisms', 'NumberFieldEmbedding')
|
|
63
|
-
|
|
64
61
|
import sage.modular.hecke.element as element
|
|
65
62
|
from . import defaults
|
|
66
63
|
|
|
64
|
+
lazy_import('sage.combinat.integer_vector_weighted', 'WeightedIntegerVectors')
|
|
65
|
+
lazy_import('sage.rings.number_field.number_field_morphisms', 'NumberFieldEmbedding')
|
|
66
|
+
|
|
67
67
|
|
|
68
68
|
def is_ModularFormElement(x):
|
|
69
69
|
"""
|
|
@@ -338,7 +338,6 @@ class ModularForm_abstract(ModuleElement):
|
|
|
338
338
|
sage: f(ComplexField(128)(1+2*I)/3 + x - x) # rel tol 1e-36
|
|
339
339
|
429.19994832206294278688085399056359632 - 786.15736284188243351153830824852974995*I
|
|
340
340
|
"""
|
|
341
|
-
from sage.rings.integer import Integer
|
|
342
341
|
from sage.misc.functional import log
|
|
343
342
|
from sage.structure.element import parent
|
|
344
343
|
from sage.rings.complex_mpfr import ComplexNumber
|
|
@@ -358,7 +357,7 @@ class ModularForm_abstract(ModuleElement):
|
|
|
358
357
|
if not isinstance(x, (RealNumber, ComplexNumber)):
|
|
359
358
|
x = CC(x) # might lose precision if this is done unconditionally (TODO what about interval and ball types?)
|
|
360
359
|
if isinstance(x, (RealNumber, ComplexNumber)):
|
|
361
|
-
return self.eval_at_tau(log(x)/(2*parent(x)(pi)*I)) # cast to parent(x) to force numerical evaluation of pi
|
|
360
|
+
return self.eval_at_tau(log(x) / (2 * parent(x)(pi) * I)) # cast to parent(x) to force numerical evaluation of pi
|
|
362
361
|
return self.q_expansion(prec)(x)
|
|
363
362
|
|
|
364
363
|
def eval_at_tau(self, tau):
|
|
@@ -394,7 +393,6 @@ class ModularForm_abstract(ModuleElement):
|
|
|
394
393
|
sage: f.eval_at_tau(ComplexField(128)(1+2*I)/3 + x - x) # rel tol 1e-36
|
|
395
394
|
-1.0451570582202060056197878314286036966 + 2.7225112098519803098203933583286590274*I
|
|
396
395
|
"""
|
|
397
|
-
from sage.libs.pari.convert_sage import gen_to_sage
|
|
398
396
|
from sage.libs.pari import pari
|
|
399
397
|
from sage.rings.cc import CC
|
|
400
398
|
from sage.rings.complex_mpfr import ComplexNumber, ComplexField
|
|
@@ -583,9 +581,9 @@ class ModularForm_abstract(ModuleElement):
|
|
|
583
581
|
if n.stop is None:
|
|
584
582
|
return self.q_expansion().list()[n]
|
|
585
583
|
else:
|
|
586
|
-
return self.q_expansion(n.stop+1).list()[n]
|
|
584
|
+
return self.q_expansion(n.stop + 1).list()[n]
|
|
587
585
|
else:
|
|
588
|
-
return self.q_expansion(n+1)[int(n)]
|
|
586
|
+
return self.q_expansion(n + 1)[int(n)]
|
|
589
587
|
|
|
590
588
|
def coefficient(self, n):
|
|
591
589
|
r"""
|
|
@@ -611,7 +609,7 @@ class ModularForm_abstract(ModuleElement):
|
|
|
611
609
|
-1472
|
|
612
610
|
"""
|
|
613
611
|
n = ZZ(n)
|
|
614
|
-
return self.q_expansion(n+1)[n]
|
|
612
|
+
return self.q_expansion(n + 1)[n]
|
|
615
613
|
|
|
616
614
|
def padded_list(self, n):
|
|
617
615
|
"""
|
|
@@ -999,11 +997,11 @@ class ModularForm_abstract(ModuleElement):
|
|
|
999
997
|
|
|
1000
998
|
M = self.group()(M)
|
|
1001
999
|
# coefficients of the matrix M
|
|
1002
|
-
|
|
1000
|
+
b, c, d = (M.b(), M.c() / N, M.d())
|
|
1003
1001
|
if d == 0:
|
|
1004
1002
|
return R.zero()
|
|
1005
1003
|
if d < 0:
|
|
1006
|
-
|
|
1004
|
+
b, c, d = (-b, -c, -d)
|
|
1007
1005
|
|
|
1008
1006
|
twopi = 2 * R.pi()
|
|
1009
1007
|
I = R.complex_field().gen()
|
|
@@ -1196,13 +1194,13 @@ class ModularForm_abstract(ModuleElement):
|
|
|
1196
1194
|
# Find out how many coefficients of the Dirichlet series are needed
|
|
1197
1195
|
# in order to compute to the required precision
|
|
1198
1196
|
num_coeffs = L.num_coeffs()
|
|
1199
|
-
coeffs = self.q_expansion(num_coeffs+1).padded_list()[1:]
|
|
1197
|
+
coeffs = self.q_expansion(num_coeffs + 1).padded_list()[1:]
|
|
1200
1198
|
|
|
1201
1199
|
# renormalize so that coefficient of q is 1
|
|
1202
1200
|
b = coeffs[0]
|
|
1203
1201
|
if b != 1:
|
|
1204
|
-
invb = 1/b
|
|
1205
|
-
coeffs = (invb*c for c in coeffs)
|
|
1202
|
+
invb = 1 / b
|
|
1203
|
+
coeffs = (invb * c for c in coeffs)
|
|
1206
1204
|
|
|
1207
1205
|
v = [emb(c) for c in coeffs]
|
|
1208
1206
|
w = [c.conjugate() for c in v]
|
|
@@ -1313,7 +1311,7 @@ class ModularForm_abstract(ModuleElement):
|
|
|
1313
1311
|
|
|
1314
1312
|
# utility function for Dirichlet convolution of series
|
|
1315
1313
|
def dirichlet_convolution(A, B):
|
|
1316
|
-
return [sum(A[d-1] * B[n
|
|
1314
|
+
return [sum(A[d - 1] * B[n // d - 1] for d in divisors(n))
|
|
1317
1315
|
for n in range(1, 1 + min(len(A), len(B)))]
|
|
1318
1316
|
|
|
1319
1317
|
# The Dirichlet series for \zeta(2 s - 2 k + 2)
|
|
@@ -1392,7 +1390,7 @@ class ModularForm_abstract(ModuleElement):
|
|
|
1392
1390
|
pi = RealField(prec).pi()
|
|
1393
1391
|
L = self.symsquare_lseries(prec=prec, embedding=embedding)
|
|
1394
1392
|
k = self.weight()
|
|
1395
|
-
return (ZZ(k - 1).factorial() / 2**(2*k - 1) / pi**(k+1)) * L(k).real_part()
|
|
1393
|
+
return (ZZ(k - 1).factorial() / 2**(2 * k - 1) / pi**(k + 1)) * L(k).real_part()
|
|
1396
1394
|
|
|
1397
1395
|
def _q_expansion_bound(self, eps):
|
|
1398
1396
|
r"""
|
|
@@ -1440,11 +1438,11 @@ class ModularForm_abstract(ModuleElement):
|
|
|
1440
1438
|
chi.conductor() * eps.conductor()])
|
|
1441
1439
|
y = QQ(self.weight()) / QQ(12) * M
|
|
1442
1440
|
for p in M.prime_divisors():
|
|
1443
|
-
y *= (1 + 1/QQ(p))
|
|
1441
|
+
y *= (1 + 1 / QQ(p))
|
|
1444
1442
|
return y.ceil()
|
|
1445
1443
|
|
|
1446
1444
|
@cached_method
|
|
1447
|
-
def has_cm(self):
|
|
1445
|
+
def has_cm(self) -> bool:
|
|
1448
1446
|
r"""
|
|
1449
1447
|
Return whether the modular form ``self`` has complex multiplication.
|
|
1450
1448
|
|
|
@@ -1806,9 +1804,11 @@ class Newform(ModularForm_abstract):
|
|
|
1806
1804
|
S = self.parent()
|
|
1807
1805
|
return S(self.q_expansion(S.sturm_bound()))
|
|
1808
1806
|
|
|
1809
|
-
def is_cuspidal(self):
|
|
1807
|
+
def is_cuspidal(self) -> bool:
|
|
1810
1808
|
"""
|
|
1811
|
-
Return True
|
|
1809
|
+
Return ``True``.
|
|
1810
|
+
|
|
1811
|
+
For compatibility with elements of modular forms spaces.
|
|
1812
1812
|
|
|
1813
1813
|
EXAMPLES::
|
|
1814
1814
|
|
|
@@ -1979,12 +1979,12 @@ class Newform(ModularForm_abstract):
|
|
|
1979
1979
|
a2
|
|
1980
1980
|
"""
|
|
1981
1981
|
if Q == 1:
|
|
1982
|
-
return ZZ(
|
|
1982
|
+
return ZZ.one()
|
|
1983
1983
|
a_Q = self[Q]
|
|
1984
1984
|
if not a_Q:
|
|
1985
1985
|
raise ValueError("a_Q must be nonzero")
|
|
1986
1986
|
|
|
1987
|
-
l = ZZ(
|
|
1987
|
+
l = ZZ.one()
|
|
1988
1988
|
M = self.character().conductor()
|
|
1989
1989
|
for p, e in Q.factor():
|
|
1990
1990
|
if p.divides(M): # principal series at p
|
|
@@ -2019,7 +2019,7 @@ class Newform(ModularForm_abstract):
|
|
|
2019
2019
|
True
|
|
2020
2020
|
"""
|
|
2021
2021
|
if Q == 1:
|
|
2022
|
-
return ZZ(
|
|
2022
|
+
return ZZ.one()
|
|
2023
2023
|
|
|
2024
2024
|
S = self._defining_modular_symbols()
|
|
2025
2025
|
A = S.ambient()
|
|
@@ -2037,16 +2037,16 @@ class Newform(ModularForm_abstract):
|
|
|
2037
2037
|
continue
|
|
2038
2038
|
aa = crt(a, 1, Q, N.prime_to_m_part(Q))
|
|
2039
2039
|
diam = matrix(ZZ, 2, lift_to_sl2z(0, aa, N))
|
|
2040
|
-
L.append((W * diam * matrix(QQ, 2, [1, a/Q0, 0, 1])).change_ring(ZZ))
|
|
2040
|
+
L.append((W * diam * matrix(QQ, 2, [1, a / Q0, 0, 1])).change_ring(ZZ))
|
|
2041
2041
|
|
|
2042
2042
|
W = A._matrix_of_operator_on_modular_symbols(A, [x.list() for x in L])
|
|
2043
2043
|
e = S.dual_eigenvector(names=self._name())
|
|
2044
2044
|
i = e.nonzero_positions()[0]
|
|
2045
|
-
w = (W*e)[i]/e[i]
|
|
2045
|
+
w = (W * e)[i] / e[i]
|
|
2046
2046
|
if W * e != w * e:
|
|
2047
2047
|
raise ArithmeticError("Bug in Atkin--Lehner computation: eigenspace not invariant")
|
|
2048
2048
|
sign = prod([eps(-1) for eps in self.character().decomposition() if eps.conductor().divides(Q)])
|
|
2049
|
-
return w / Q0 / sign * self.character()(crt(1, Q//Q0, Q, N//Q))
|
|
2049
|
+
return w / Q0 / sign * self.character()(crt(1, Q // Q0, Q, N // Q))
|
|
2050
2050
|
|
|
2051
2051
|
def atkin_lehner_action(self, d=None, normalization='analytic', embedding=None):
|
|
2052
2052
|
r"""
|
|
@@ -2309,7 +2309,7 @@ class Newform(ModularForm_abstract):
|
|
|
2309
2309
|
w3a = self._atkin_lehner_eigenvalue_from_modsym(d3)
|
|
2310
2310
|
w3b = self._atkin_lehner_eigenvalue_from_qexp(d3)
|
|
2311
2311
|
assert w3a == w3b
|
|
2312
|
-
w = w1*w2*w3a
|
|
2312
|
+
w = w1 * w2 * w3a
|
|
2313
2313
|
|
|
2314
2314
|
if embedding is None:
|
|
2315
2315
|
R = self.hecke_eigenvalue_field()
|
|
@@ -2334,9 +2334,9 @@ class Newform(ModularForm_abstract):
|
|
|
2334
2334
|
raise ValueError("Unable to compute Gauss sum. Try specifying an embedding into a larger ring")
|
|
2335
2335
|
else:
|
|
2336
2336
|
G = R(1)
|
|
2337
|
-
if not R(d**(self.weight()-2)).is_square():
|
|
2337
|
+
if not R(d**(self.weight() - 2)).is_square():
|
|
2338
2338
|
raise ValueError("Unable to compute square root. Try specifying an embedding into a larger ring")
|
|
2339
|
-
ratio = R(d**(self.weight()-2)).sqrt() * embedding(self.character()(crt(1, d//d0, d, N//d))) / G
|
|
2339
|
+
ratio = R(d**(self.weight() - 2)).sqrt() * embedding(self.character()(crt(1, d // d0, d, N // d))) / G
|
|
2340
2340
|
return embedding(w) / ratio
|
|
2341
2341
|
|
|
2342
2342
|
def twist(self, chi, level=None, check=True):
|
|
@@ -2447,8 +2447,8 @@ class Newform(ModularForm_abstract):
|
|
|
2447
2447
|
alpha = N_epsilon.valuation(q)
|
|
2448
2448
|
beta = N_chi.valuation(q)
|
|
2449
2449
|
gamma = N.valuation(q)
|
|
2450
|
-
delta = max(alpha + beta, 2*beta, gamma)
|
|
2451
|
-
if delta == gamma and max(alpha + beta, 2*beta) < gamma:
|
|
2450
|
+
delta = max(alpha + beta, 2 * beta, gamma)
|
|
2451
|
+
if delta == gamma and max(alpha + beta, 2 * beta) < gamma:
|
|
2452
2452
|
continue
|
|
2453
2453
|
if delta > gamma and N_epsilon_chi.valuation(q) == max(alpha, beta):
|
|
2454
2454
|
continue
|
|
@@ -2468,7 +2468,7 @@ class Newform(ModularForm_abstract):
|
|
|
2468
2468
|
for p in prime_range(500):
|
|
2469
2469
|
if p.divides(chi.level()):
|
|
2470
2470
|
continue
|
|
2471
|
-
D = (D.hecke_operator(p) - self[p]*chi(p)).kernel()
|
|
2471
|
+
D = (D.hecke_operator(p) - self[p] * chi(p)).kernel()
|
|
2472
2472
|
if D.rank() == 1:
|
|
2473
2473
|
break
|
|
2474
2474
|
if D.is_zero():
|
|
@@ -2508,11 +2508,11 @@ class Newform(ModularForm_abstract):
|
|
|
2508
2508
|
if p is None:
|
|
2509
2509
|
# test local minimality at all primes
|
|
2510
2510
|
for p in self.level().prime_divisors():
|
|
2511
|
-
|
|
2511
|
+
g, chi = self.minimal_twist(p)
|
|
2512
2512
|
if g.level() < self.level():
|
|
2513
2513
|
h, tau = g.minimal_twist(p=None)
|
|
2514
2514
|
M = chi.modulus().lcm(tau.modulus())
|
|
2515
|
-
return (h, chi.extend(M)*tau.extend(M))
|
|
2515
|
+
return (h, chi.extend(M) * tau.extend(M))
|
|
2516
2516
|
# f locally minimal at all p, hence globally minimal
|
|
2517
2517
|
return (self, DirichletGroup(1, self.base_ring())(1))
|
|
2518
2518
|
|
|
@@ -2526,27 +2526,27 @@ class Newform(ModularForm_abstract):
|
|
|
2526
2526
|
if (r == c) or (r == 1 and c == 0):
|
|
2527
2527
|
# easy cases
|
|
2528
2528
|
return (self, DirichletGroup(1, self.base_ring())(1))
|
|
2529
|
-
elif r < 2*c:
|
|
2529
|
+
elif r < 2 * c:
|
|
2530
2530
|
# In this case we know that there is a unique chi of conductor p^u
|
|
2531
2531
|
# such that self x chi has level N/p^u, where u = r-c, and this
|
|
2532
2532
|
# twist is minimal.
|
|
2533
2533
|
candidates = []
|
|
2534
|
-
for chi in DirichletGroup(p**(r-c), self.base_ring()):
|
|
2534
|
+
for chi in DirichletGroup(p**(r - c), self.base_ring()):
|
|
2535
2535
|
if not chi.is_primitive():
|
|
2536
2536
|
continue
|
|
2537
2537
|
try:
|
|
2538
|
-
g = self.twist(chi, level=N//p**(r-c))
|
|
2538
|
+
g = self.twist(chi, level=N // p**(r - c))
|
|
2539
2539
|
candidates.append((g, chi))
|
|
2540
2540
|
except ValueError:
|
|
2541
2541
|
continue
|
|
2542
2542
|
|
|
2543
|
-
l = ZZ(
|
|
2543
|
+
l = ZZ.one()
|
|
2544
2544
|
while len(candidates) > 1:
|
|
2545
2545
|
l = l.next_prime()
|
|
2546
2546
|
if l == p:
|
|
2547
2547
|
continue
|
|
2548
|
-
candidates = [(h, chi) for (h, chi) in candidates if h[l] == chi(l)*self[l]]
|
|
2549
|
-
if l > 10000 or
|
|
2548
|
+
candidates = [(h, chi) for (h, chi) in candidates if h[l] == chi(l) * self[l]]
|
|
2549
|
+
if l > 10000 or not candidates:
|
|
2550
2550
|
raise RuntimeError("bug finding minimal twist")
|
|
2551
2551
|
return candidates[0]
|
|
2552
2552
|
else:
|
|
@@ -2558,27 +2558,27 @@ class Newform(ModularForm_abstract):
|
|
|
2558
2558
|
T = TypeSpace(self, p)
|
|
2559
2559
|
if T.is_minimal():
|
|
2560
2560
|
return (self, DirichletGroup(1, self.base_ring())(1))
|
|
2561
|
+
|
|
2562
|
+
g = T.minimal_twist()
|
|
2563
|
+
epsg = g.character().extend(N)
|
|
2564
|
+
chisq = (epsg / self.character()).restrict(p**(r // 2))
|
|
2565
|
+
K = coercion_model.common_parent(self.base_ring(), g.base_ring())
|
|
2566
|
+
chis = [chi for chi in DirichletGroup(p**(r // 2), K) if chi**2 == chisq]
|
|
2567
|
+
|
|
2568
|
+
if g.has_cm() and g.cm_discriminant().prime_divisors() == [p]:
|
|
2569
|
+
# Quicker to test g than self, because g has smaller level.
|
|
2570
|
+
t = 2
|
|
2561
2571
|
else:
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
if g
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
t = 1
|
|
2573
|
-
l = ZZ(1)
|
|
2574
|
-
while len(chis) > t:
|
|
2575
|
-
l = l.next_prime()
|
|
2576
|
-
if l == p:
|
|
2577
|
-
continue
|
|
2578
|
-
chis = [chi for chi in chis if g[l] == chi(l) * self[l] ]
|
|
2579
|
-
if l > 10000 or len(chis) == 0:
|
|
2580
|
-
raise RuntimeError("bug finding minimal twist")
|
|
2581
|
-
return (g, chis[0])
|
|
2572
|
+
t = 1
|
|
2573
|
+
l = ZZ.one()
|
|
2574
|
+
while len(chis) > t:
|
|
2575
|
+
l = l.next_prime()
|
|
2576
|
+
if l == p:
|
|
2577
|
+
continue
|
|
2578
|
+
chis = [chi for chi in chis if g[l] == chi(l) * self[l]]
|
|
2579
|
+
if l > 10000 or not chis:
|
|
2580
|
+
raise RuntimeError("bug finding minimal twist")
|
|
2581
|
+
return (g, chis[0])
|
|
2582
2582
|
|
|
2583
2583
|
def local_component(self, p, twist_factor=None):
|
|
2584
2584
|
"""
|
|
@@ -3462,11 +3462,11 @@ class GradedModularFormElement(ModuleElement):
|
|
|
3462
3462
|
sage: M([E4, ModularForms(3, 6).0])
|
|
3463
3463
|
Traceback (most recent call last):
|
|
3464
3464
|
...
|
|
3465
|
-
ValueError: the group and/or the base ring of at least one modular form (q - 6*q^2 + 9*q^3 + 4*q^4 + 6*q^5 + O(q^6)) is not
|
|
3465
|
+
ValueError: the group and/or the base ring of at least one modular form (q - 6*q^2 + 9*q^3 + 4*q^4 + 6*q^5 + O(q^6)) is not consistent with the base space
|
|
3466
3466
|
sage: M({4:E4, 6:ModularForms(3, 6).0})
|
|
3467
3467
|
Traceback (most recent call last):
|
|
3468
3468
|
...
|
|
3469
|
-
ValueError: the group and/or the base ring of at least one modular form (q - 6*q^2 + 9*q^3 + 4*q^4 + 6*q^5 + O(q^6)) is not
|
|
3469
|
+
ValueError: the group and/or the base ring of at least one modular form (q - 6*q^2 + 9*q^3 + 4*q^4 + 6*q^5 + O(q^6)) is not consistent with the base space
|
|
3470
3470
|
sage: M = ModularFormsRing(Gamma0(2))
|
|
3471
3471
|
sage: E4 = ModularForms(1, 4).0
|
|
3472
3472
|
sage: M(E4)[4].parent()
|
|
@@ -3489,7 +3489,7 @@ class GradedModularFormElement(ModuleElement):
|
|
|
3489
3489
|
M = parent.modular_forms_of_weight(f.weight()).change_ring(parent.base_ring())
|
|
3490
3490
|
forms_dictionary[k] = M(f)
|
|
3491
3491
|
else:
|
|
3492
|
-
raise ValueError('the group and/or the base ring of at least one modular form (%s) is not
|
|
3492
|
+
raise ValueError('the group and/or the base ring of at least one modular form (%s) is not consistent with the base space' % (f))
|
|
3493
3493
|
else:
|
|
3494
3494
|
raise ValueError('at least one key (%s) of the defining dictionary does not correspond to the weight of its value (%s). Real weight: %s' % (k, f, f.weight()))
|
|
3495
3495
|
else:
|
|
@@ -3506,15 +3506,15 @@ class GradedModularFormElement(ModuleElement):
|
|
|
3506
3506
|
M = parent.modular_forms_of_weight(f.weight()).change_ring(parent.base_ring())
|
|
3507
3507
|
forms_dictionary[f.weight()] = M(forms_dictionary.get(f.weight(), 0) + f)
|
|
3508
3508
|
else:
|
|
3509
|
-
raise ValueError('the group and/or the base ring of at least one modular form (%s) is not
|
|
3509
|
+
raise ValueError('the group and/or the base ring of at least one modular form (%s) is not consistent with the base space' % (f))
|
|
3510
3510
|
else:
|
|
3511
|
-
forms_dictionary[ZZ(
|
|
3511
|
+
forms_dictionary[ZZ.zero()] = parent.base_ring().coerce(f)
|
|
3512
3512
|
else:
|
|
3513
3513
|
raise TypeError('the defining data structure should be a list or a dictionary')
|
|
3514
3514
|
self._forms_dictionary = {k: f for k, f in forms_dictionary.items() if not f.is_zero()} # remove the zero values
|
|
3515
3515
|
Element.__init__(self, parent)
|
|
3516
3516
|
|
|
3517
|
-
def __bool__(self):
|
|
3517
|
+
def __bool__(self) -> bool:
|
|
3518
3518
|
r"""
|
|
3519
3519
|
Return "True" if ``self`` is nonzero and "False" otherwise.
|
|
3520
3520
|
|
|
@@ -3530,7 +3530,7 @@ class GradedModularFormElement(ModuleElement):
|
|
|
3530
3530
|
"""
|
|
3531
3531
|
return bool(self._forms_dictionary)
|
|
3532
3532
|
|
|
3533
|
-
def is_zero(self):
|
|
3533
|
+
def is_zero(self) -> bool:
|
|
3534
3534
|
r"""
|
|
3535
3535
|
Return "True" if the graded form is 0 and "False" otherwise.
|
|
3536
3536
|
|
|
@@ -3547,7 +3547,7 @@ class GradedModularFormElement(ModuleElement):
|
|
|
3547
3547
|
"""
|
|
3548
3548
|
return not self
|
|
3549
3549
|
|
|
3550
|
-
def is_one(self):
|
|
3550
|
+
def is_one(self) -> bool:
|
|
3551
3551
|
r"""
|
|
3552
3552
|
Return "True" if the graded form is 1 and "False" otherwise.
|
|
3553
3553
|
|
|
@@ -3850,7 +3850,7 @@ class GradedModularFormElement(ModuleElement):
|
|
|
3850
3850
|
"""
|
|
3851
3851
|
GM = self.__class__
|
|
3852
3852
|
f_self = self._forms_dictionary
|
|
3853
|
-
f_mul = {k: c*f for k, f in f_self.items()}
|
|
3853
|
+
f_mul = {k: c * f for k, f in f_self.items()}
|
|
3854
3854
|
return GM(self.parent(), f_mul)
|
|
3855
3855
|
|
|
3856
3856
|
def _richcmp_(self, other, op):
|
|
@@ -3908,7 +3908,7 @@ class GradedModularFormElement(ModuleElement):
|
|
|
3908
3908
|
"""
|
|
3909
3909
|
if self.is_homogeneous():
|
|
3910
3910
|
if self.is_zero():
|
|
3911
|
-
return ZZ(
|
|
3911
|
+
return ZZ.zero()
|
|
3912
3912
|
return next(iter(self._forms_dictionary))
|
|
3913
3913
|
else:
|
|
3914
3914
|
raise ValueError("the given graded form is not homogeneous (not a modular form)")
|
|
@@ -3930,10 +3930,10 @@ class GradedModularFormElement(ModuleElement):
|
|
|
3930
3930
|
[0]
|
|
3931
3931
|
"""
|
|
3932
3932
|
if self.is_zero():
|
|
3933
|
-
return [ZZ(
|
|
3933
|
+
return [ZZ.zero()]
|
|
3934
3934
|
return sorted(self._forms_dictionary)
|
|
3935
3935
|
|
|
3936
|
-
def is_homogeneous(self):
|
|
3936
|
+
def is_homogeneous(self) -> bool:
|
|
3937
3937
|
r"""
|
|
3938
3938
|
Return ``True`` if the graded modular form is homogeneous, i.e. if it
|
|
3939
3939
|
is a modular forms of a certain weight.
|
|
@@ -101,7 +101,7 @@ def half_integral_weight_modform_basis(chi, k, prec):
|
|
|
101
101
|
|
|
102
102
|
ALGORITHM: Basmaji (page 55 of his Essen thesis, "Ein Algorithmus
|
|
103
103
|
zur Berechnung von Hecke-Operatoren und Anwendungen auf modulare
|
|
104
|
-
Kurven", http://wstein.org/scans/papers/basmaji/).
|
|
104
|
+
Kurven", https://web.archive.org/web/20160905111513/http://wstein.org/scans/papers/basmaji/thesis_of_basmaji.dvi).
|
|
105
105
|
|
|
106
106
|
Let `S = S_{k+1}(\epsilon)` be the space of cusp forms of
|
|
107
107
|
even integer weight `k+1` and character
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-schemes
|
|
2
2
|
# sage.doctest: needs database_cremona_mini_ellcurve
|
|
3
|
+
r"""
|
|
4
|
+
Gross-Zagier L-series
|
|
5
|
+
"""
|
|
3
6
|
from sage.rings.integer import Integer
|
|
4
7
|
from sage.structure.sage_object import SageObject
|
|
5
8
|
from sage.lfunctions.dokchitser import Dokchitser
|
|
Binary file
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
r"""
|
|
3
|
+
Utilities for Gross-Zagier L-series
|
|
4
|
+
"""
|
|
2
5
|
from cysignals.memory cimport check_allocarray, check_calloc, sig_free
|
|
3
6
|
from cysignals.signals cimport sig_check, sig_on, sig_off
|
|
4
7
|
|
|
@@ -15,7 +18,7 @@ from libc.string cimport memcpy
|
|
|
15
18
|
|
|
16
19
|
cpdef to_series(L, var):
|
|
17
20
|
"""
|
|
18
|
-
Create a power series element out of a list ``L`` in the variable``
|
|
21
|
+
Create a power series element out of a list ``L`` in the variable ``var``.
|
|
19
22
|
|
|
20
23
|
EXAMPLES::
|
|
21
24
|
|
|
@@ -43,7 +46,7 @@ def bqf_theta_series(Q, long bound, var=None):
|
|
|
43
46
|
|
|
44
47
|
.. MATH::
|
|
45
48
|
|
|
46
|
-
\sum_{(x,y) \in \
|
|
49
|
+
\sum_{(x,y) \in \ZZ^2} q^{f(x,y)} = \sum_{n=-\infty}^{\infty} r(n)q^n
|
|
47
50
|
|
|
48
51
|
where `r(n)` give the number of way `n` is represented by `f`.
|
|
49
52
|
|
sage/modular/modform/ring.py
CHANGED
|
@@ -385,7 +385,7 @@ class ModularFormsRing(Parent):
|
|
|
385
385
|
return PolynomialRing(self.base_ring(), len(gens), names,
|
|
386
386
|
order=TermOrder('wdeglex', degs))
|
|
387
387
|
|
|
388
|
-
def
|
|
388
|
+
def _generators_variables_dictionary(self, poly_parent, gens):
|
|
389
389
|
r"""
|
|
390
390
|
Return a dictionary giving an association between polynomial
|
|
391
391
|
ring generators and generators of modular forms ring.
|
|
@@ -399,7 +399,7 @@ class ModularFormsRing(Parent):
|
|
|
399
399
|
|
|
400
400
|
sage: M = ModularFormsRing(Gamma0(6))
|
|
401
401
|
sage: P = QQ['x, y, z']
|
|
402
|
-
sage: M.
|
|
402
|
+
sage: M._generators_variables_dictionary(P, M.gen_forms())
|
|
403
403
|
{z: q^2 - 2*q^3 + 3*q^4 + O(q^6),
|
|
404
404
|
y: q + 5*q^3 - 2*q^4 + 6*q^5 + O(q^6),
|
|
405
405
|
x: 1 + 24*q^3 + O(q^6)}
|
|
@@ -480,7 +480,7 @@ class ModularFormsRing(Parent):
|
|
|
480
480
|
raise TypeError('`polynomial` must be a multivariate polynomial')
|
|
481
481
|
if gens is None:
|
|
482
482
|
gens = self.gen_forms()
|
|
483
|
-
dict = self.
|
|
483
|
+
dict = self._generators_variables_dictionary(polynomial.parent(), gens)
|
|
484
484
|
if polynomial.is_constant():
|
|
485
485
|
return self(polynomial.constant_coefficient())
|
|
486
486
|
return polynomial.substitute(dict)
|
|
@@ -514,12 +514,12 @@ class ModularFormsRing(Parent):
|
|
|
514
514
|
sage: M(f)
|
|
515
515
|
Traceback (most recent call last):
|
|
516
516
|
...
|
|
517
|
-
ValueError: the group (Congruence Subgroup Gamma0(3)) and/or the base ring (Rational Field) of the given modular form is not
|
|
517
|
+
ValueError: the group (Congruence Subgroup Gamma0(3)) and/or the base ring (Rational Field) of the given modular form is not consistent with the base space: Ring of Modular Forms for Modular Group SL(2,Z) over Rational Field
|
|
518
518
|
sage: M = ModularFormsRing(1, base_ring=ZZ)
|
|
519
519
|
sage: M(ModularForms(1,4).0)
|
|
520
520
|
Traceback (most recent call last):
|
|
521
521
|
...
|
|
522
|
-
ValueError: the group (Modular Group SL(2,Z)) and/or the base ring (Rational Field) of the given modular form is not
|
|
522
|
+
ValueError: the group (Modular Group SL(2,Z)) and/or the base ring (Rational Field) of the given modular form is not consistent with the base space: Ring of Modular Forms for Modular Group SL(2,Z) over Integer Ring
|
|
523
523
|
sage: M('x')
|
|
524
524
|
Traceback (most recent call last):
|
|
525
525
|
...
|
|
@@ -539,7 +539,7 @@ class ModularFormsRing(Parent):
|
|
|
539
539
|
if self.group().is_subgroup(forms_datum.group()) and self.base_ring().has_coerce_map_from(forms_datum.base_ring()):
|
|
540
540
|
forms_dictionary = {forms_datum.weight(): forms_datum}
|
|
541
541
|
else:
|
|
542
|
-
raise ValueError('the group (%s) and/or the base ring (%s) of the given modular form is not
|
|
542
|
+
raise ValueError('the group (%s) and/or the base ring (%s) of the given modular form is not consistent with the base space: %s' % (forms_datum.group(), forms_datum.base_ring(), self))
|
|
543
543
|
elif forms_datum in self.base_ring():
|
|
544
544
|
forms_dictionary = {0: forms_datum}
|
|
545
545
|
elif isinstance(forms_datum, MPolynomial):
|
|
@@ -1061,9 +1061,8 @@ class ModularFormsRing(Parent):
|
|
|
1061
1061
|
V = _span_of_forms_in_weight(G, weight, prec=working_prec, use_random=use_random, stop_dim=d)
|
|
1062
1062
|
if V.rank() == d and (self.base_ring().is_field() or V.index_in_saturation() == 1):
|
|
1063
1063
|
break
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
verbose("Need more generators: trying again with generators of weight up to %s" % gen_weight)
|
|
1064
|
+
gen_weight += 1
|
|
1065
|
+
verbose("Need more generators: trying again with generators of weight up to %s" % gen_weight)
|
|
1067
1066
|
|
|
1068
1067
|
R = G[0][1].parent()
|
|
1069
1068
|
return [R(list(x), prec=prec) for x in V.gens()]
|
|
@@ -1207,9 +1206,8 @@ class ModularFormsRing(Parent):
|
|
|
1207
1206
|
W = A.span([A(f.padded_list(working_prec)) for f in flist])
|
|
1208
1207
|
if W.rank() == d and (self.base_ring().is_field() or W.index_in_saturation() == 1):
|
|
1209
1208
|
break
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
verbose("Need more generators: trying again with generators of weight up to %s" % gen_weight)
|
|
1209
|
+
gen_weight += 1
|
|
1210
|
+
verbose("Need more generators: trying again with generators of weight up to %s" % gen_weight)
|
|
1213
1211
|
|
|
1214
1212
|
R = G[0][1].parent()
|
|
1215
1213
|
return [R(list(x), prec=prec) for x in W.gens()]
|
sage/modular/modform/space.py
CHANGED
|
@@ -328,7 +328,7 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
328
328
|
"""
|
|
329
329
|
return self.__character
|
|
330
330
|
|
|
331
|
-
def has_character(self):
|
|
331
|
+
def has_character(self) -> bool:
|
|
332
332
|
r"""
|
|
333
333
|
Return ``True`` if this space of modular forms has a specific
|
|
334
334
|
character.
|
|
@@ -356,7 +356,7 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
356
356
|
"""
|
|
357
357
|
return self.character() is not None
|
|
358
358
|
|
|
359
|
-
def is_ambient(self):
|
|
359
|
+
def is_ambient(self) -> bool:
|
|
360
360
|
"""
|
|
361
361
|
Return ``True`` if this an ambient space of modular forms.
|
|
362
362
|
|
|
@@ -664,9 +664,8 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
664
664
|
B = [f for f in self._compute_q_expansion_basis(current_prec) if f != 0]
|
|
665
665
|
if len(B) == d:
|
|
666
666
|
break
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
current_prec += d
|
|
667
|
+
tries += 1
|
|
668
|
+
current_prec += d
|
|
670
669
|
if tries > 5:
|
|
671
670
|
print("WARNING: possible bug in q_expansion_basis for modular forms space %s" % self)
|
|
672
671
|
if prec == -1:
|
|
@@ -1359,7 +1358,7 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
1359
1358
|
except IndexError:
|
|
1360
1359
|
raise ValueError("Generator %s not defined" % n)
|
|
1361
1360
|
|
|
1362
|
-
def gens(self):
|
|
1361
|
+
def gens(self) -> tuple:
|
|
1363
1362
|
"""
|
|
1364
1363
|
Return a complete set of generators for ``self``.
|
|
1365
1364
|
|
|
@@ -1367,13 +1366,13 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
1367
1366
|
|
|
1368
1367
|
sage: N = ModularForms(6,4)
|
|
1369
1368
|
sage: N.gens()
|
|
1370
|
-
|
|
1369
|
+
(q - 2*q^2 - 3*q^3 + 4*q^4 + 6*q^5 + O(q^6),
|
|
1371
1370
|
1 + O(q^6),
|
|
1372
1371
|
q - 8*q^4 + 126*q^5 + O(q^6),
|
|
1373
1372
|
q^2 + 9*q^4 + O(q^6),
|
|
1374
|
-
q^3 + O(q^6)
|
|
1373
|
+
q^3 + O(q^6))
|
|
1375
1374
|
"""
|
|
1376
|
-
return self.basis()
|
|
1375
|
+
return tuple(self.basis())
|
|
1377
1376
|
|
|
1378
1377
|
def sturm_bound(self, M=None):
|
|
1379
1378
|
r"""
|
|
@@ -1484,7 +1483,7 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
1484
1483
|
else:
|
|
1485
1484
|
assert S.dimension() == self.dimension()
|
|
1486
1485
|
self.__is_cuspidal = True
|
|
1487
|
-
S.
|
|
1486
|
+
S.is_eisenstein.set_cache(S.dimension() == 0)
|
|
1488
1487
|
S.__is_cuspidal = True
|
|
1489
1488
|
return S
|
|
1490
1489
|
|
|
@@ -1511,7 +1510,7 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
1511
1510
|
"""
|
|
1512
1511
|
return self.cuspidal_submodule()
|
|
1513
1512
|
|
|
1514
|
-
def is_cuspidal(self):
|
|
1513
|
+
def is_cuspidal(self) -> bool:
|
|
1515
1514
|
r"""
|
|
1516
1515
|
Return ``True`` if this space is cuspidal.
|
|
1517
1516
|
|
|
@@ -1525,7 +1524,8 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
1525
1524
|
"""
|
|
1526
1525
|
return (self.cuspidal_submodule() == self)
|
|
1527
1526
|
|
|
1528
|
-
|
|
1527
|
+
@cached_method
|
|
1528
|
+
def is_eisenstein(self) -> bool:
|
|
1529
1529
|
r"""
|
|
1530
1530
|
Return ``True`` if this space is Eisenstein.
|
|
1531
1531
|
|
|
@@ -1659,28 +1659,25 @@ class ModularFormsSpace(hecke.HeckeModule_generic):
|
|
|
1659
1659
|
sage: W.eisenstein_submodule()
|
|
1660
1660
|
Modular Forms subspace of dimension 0 of Modular Forms space of dimension 11 for Congruence Subgroup Gamma0(6) of weight 10 over Rational Field
|
|
1661
1661
|
"""
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
return self
|
|
1665
|
-
except AttributeError:
|
|
1666
|
-
pass
|
|
1662
|
+
if self.is_eisenstein.cache is True:
|
|
1663
|
+
return self
|
|
1667
1664
|
|
|
1668
1665
|
if self.is_ambient():
|
|
1669
1666
|
raise NotImplementedError("ambient modular forms spaces must override eisenstein_submodule")
|
|
1670
1667
|
A = self.ambient_module().eisenstein_submodule()
|
|
1671
1668
|
E = self.intersection(A)
|
|
1672
1669
|
if E.dimension() < self.dimension():
|
|
1673
|
-
self.
|
|
1670
|
+
self.is_eisenstein.set_cache(False)
|
|
1674
1671
|
else:
|
|
1675
1672
|
assert E.dimension() == self.dimension()
|
|
1676
|
-
self.
|
|
1673
|
+
self.is_eisenstein.set_cache(True)
|
|
1677
1674
|
E.__is_cuspidal = (E.dimension() == 0)
|
|
1678
|
-
E.
|
|
1675
|
+
E.is_eisenstein.set_cache(True)
|
|
1679
1676
|
return E
|
|
1680
1677
|
|
|
1681
1678
|
def eisenstein_subspace(self):
|
|
1682
1679
|
"""
|
|
1683
|
-
Synonym for eisenstein_submodule
|
|
1680
|
+
Synonym for :meth:`eisenstein_submodule`.
|
|
1684
1681
|
|
|
1685
1682
|
EXAMPLES::
|
|
1686
1683
|
|
sage/modular/modform/weight1.py
CHANGED
|
@@ -187,8 +187,7 @@ def hecke_stable_subspace(chi, aux_prime=ZZ(2)):
|
|
|
187
187
|
if D.dimension() != 0:
|
|
188
188
|
raise ArithmeticError("Got non-cuspidal form!")
|
|
189
189
|
verbose("Done", t=t, level=1)
|
|
190
|
-
|
|
191
|
-
return qexps
|
|
190
|
+
return Sequence(A(x.list()).add_bigoh(R) for x in J.gens())
|
|
192
191
|
|
|
193
192
|
|
|
194
193
|
@cached_function
|