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
sage/lfunctions/pari.py
ADDED
|
@@ -0,0 +1,818 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-schemes
|
|
2
|
+
"""
|
|
3
|
+
`L`-functions from PARI
|
|
4
|
+
|
|
5
|
+
This is a wrapper around the general PARI `L`-functions functionality.
|
|
6
|
+
|
|
7
|
+
AUTHORS:
|
|
8
|
+
|
|
9
|
+
- Frédéric Chapoton (2018) interface
|
|
10
|
+
"""
|
|
11
|
+
# ****************************************************************************
|
|
12
|
+
# Copyright (C) 2018 Frédéric Chapoton <chapoton@unistra.fr>
|
|
13
|
+
#
|
|
14
|
+
# This program is free software: you can redistribute it and/or modify
|
|
15
|
+
# it under the terms of the GNU General Public License as published by
|
|
16
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
17
|
+
# (at your option) any later version.
|
|
18
|
+
# https://www.gnu.org/licenses/
|
|
19
|
+
# ****************************************************************************
|
|
20
|
+
from operator import index as PyNumber_Index
|
|
21
|
+
from cypari2.gen import Gen
|
|
22
|
+
from sage.libs.pari import pari
|
|
23
|
+
from sage.structure.sage_object import SageObject
|
|
24
|
+
from sage.rings.integer_ring import ZZ
|
|
25
|
+
from sage.rings.real_mpfr import RealField
|
|
26
|
+
from sage.rings.complex_mpfr import ComplexField
|
|
27
|
+
from sage.rings.power_series_ring import PowerSeriesRing
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class lfun_generic:
|
|
31
|
+
r"""
|
|
32
|
+
Create a PARI `L`-function (:pari:`lfun` instance).
|
|
33
|
+
|
|
34
|
+
The arguments are::
|
|
35
|
+
|
|
36
|
+
lfun_generic(conductor, gammaV, weight, eps, poles, residues, init)
|
|
37
|
+
|
|
38
|
+
where
|
|
39
|
+
|
|
40
|
+
- ``conductor`` -- integer; the conductor
|
|
41
|
+
|
|
42
|
+
- ``gammaV`` -- list of Gamma-factor parameters, e.g. [0] for
|
|
43
|
+
Riemann zeta, [0,1] for ell.curves, (see examples)
|
|
44
|
+
|
|
45
|
+
- ``weight`` -- positive real number, usually an integer e.g. 1 for
|
|
46
|
+
Riemann zeta, 2 for `H^1` of curves/`\QQ`
|
|
47
|
+
|
|
48
|
+
- ``eps`` -- complex number; sign in functional equation
|
|
49
|
+
|
|
50
|
+
- ``poles`` -- (default: ``[]``) list of points where `L^*(s)` has
|
|
51
|
+
(simple) poles; only poles with `Re(s)>weight/2` should be
|
|
52
|
+
included
|
|
53
|
+
|
|
54
|
+
- ``residues`` -- vector of residues of `L^*(s)` in those poles or
|
|
55
|
+
set ``residues='automatic'`` (default)
|
|
56
|
+
|
|
57
|
+
- ``init`` -- list of coefficients
|
|
58
|
+
|
|
59
|
+
RIEMANN ZETA FUNCTION:
|
|
60
|
+
|
|
61
|
+
We compute with the Riemann Zeta function::
|
|
62
|
+
|
|
63
|
+
sage: from sage.lfunctions.pari import lfun_generic, LFunction
|
|
64
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[1])
|
|
65
|
+
sage: lf.init_coeffs([1]*2000)
|
|
66
|
+
|
|
67
|
+
Now we can wrap this PARI `L`-function into one Sage `L`-function::
|
|
68
|
+
|
|
69
|
+
sage: L = LFunction(lf); L
|
|
70
|
+
L-series of conductor 1 and weight 1
|
|
71
|
+
sage: L(1)
|
|
72
|
+
Traceback (most recent call last):
|
|
73
|
+
...
|
|
74
|
+
ArithmeticError: pole here
|
|
75
|
+
sage: L(2)
|
|
76
|
+
1.64493406684823
|
|
77
|
+
sage: L.derivative(2)
|
|
78
|
+
-0.937548254315844
|
|
79
|
+
sage: h = RR('0.0000000000001')
|
|
80
|
+
sage: (zeta(2+h) - zeta(2.))/h
|
|
81
|
+
-0.937028232783632
|
|
82
|
+
sage: L.taylor_series(2, k=5)
|
|
83
|
+
1.64493406684823 - 0.937548254315844*z + 0.994640117149451*z^2 - 1.00002430047384*z^3 + 1.00006193307...*z^4 + O(z^5)
|
|
84
|
+
"""
|
|
85
|
+
def __init__(self, conductor, gammaV, weight, eps, poles=[],
|
|
86
|
+
residues='automatic', prec=None, *args, **kwds):
|
|
87
|
+
"""
|
|
88
|
+
Initialisation of a :pari:`lfun` from motivic data.
|
|
89
|
+
|
|
90
|
+
This can happen either in one stage or in two stages: the coefficients
|
|
91
|
+
can be given using the ``init`` keyword, or entered using
|
|
92
|
+
the :meth:`init_coeffs`.
|
|
93
|
+
|
|
94
|
+
EXAMPLES::
|
|
95
|
+
|
|
96
|
+
sage: from sage.lfunctions.pari import lfun_generic, LFunction
|
|
97
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[1])
|
|
98
|
+
"""
|
|
99
|
+
# before entering the coefficients, this attribute is None
|
|
100
|
+
self._L = None
|
|
101
|
+
|
|
102
|
+
self.conductor = conductor
|
|
103
|
+
self.gammaV = gammaV
|
|
104
|
+
self.weight = weight
|
|
105
|
+
self.eps = eps
|
|
106
|
+
self.poles = poles
|
|
107
|
+
self.residues = residues
|
|
108
|
+
self.prec = prec
|
|
109
|
+
|
|
110
|
+
if args or kwds:
|
|
111
|
+
self.init_coeffs(*args, **kwds)
|
|
112
|
+
|
|
113
|
+
def init_coeffs(self, v, cutoff=None, w=1):
|
|
114
|
+
"""
|
|
115
|
+
Set the coefficients `a_n` of the `L`-series.
|
|
116
|
+
|
|
117
|
+
If `L(s)` is not equal to its dual, pass the coefficients of
|
|
118
|
+
the dual as the second optional argument.
|
|
119
|
+
|
|
120
|
+
INPUT:
|
|
121
|
+
|
|
122
|
+
- ``v`` -- list of complex numbers or unary function
|
|
123
|
+
|
|
124
|
+
- ``cutoff`` -- unused
|
|
125
|
+
|
|
126
|
+
- ``w`` -- list of complex numbers or unary function
|
|
127
|
+
|
|
128
|
+
EXAMPLES::
|
|
129
|
+
|
|
130
|
+
sage: from sage.lfunctions.pari import lfun_generic, LFunction
|
|
131
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0, 1], weight=12, eps=1)
|
|
132
|
+
sage: pari_coeffs = pari('k->vector(k,n,(5*sigma(n,3)+7*sigma(n,5))*n/12 - 35*sum(k=1,n-1,(6*k-4*(n-k))*sigma(k,3)*sigma(n-k,5)))')
|
|
133
|
+
sage: lf.init_coeffs(pari_coeffs)
|
|
134
|
+
|
|
135
|
+
Evaluate the resulting `L`-function at a point, and compare with
|
|
136
|
+
the answer that one gets "by definition" (of `L`-function
|
|
137
|
+
attached to a modular form)::
|
|
138
|
+
|
|
139
|
+
sage: L = LFunction(lf)
|
|
140
|
+
sage: L(14)
|
|
141
|
+
0.998583063162746
|
|
142
|
+
sage: a = delta_qexp(1000)
|
|
143
|
+
sage: sum(a[n]/float(n)^14 for n in reversed(range(1,1000)))
|
|
144
|
+
0.9985830631627461
|
|
145
|
+
|
|
146
|
+
Illustrate that one can give a list of complex numbers for v
|
|
147
|
+
(see :issue:`10937`)::
|
|
148
|
+
|
|
149
|
+
sage: l2 = lfun_generic(conductor=1, gammaV=[0, 1], weight=12, eps=1)
|
|
150
|
+
sage: l2.init_coeffs(list(delta_qexp(1000))[1:])
|
|
151
|
+
sage: L2 = LFunction(l2)
|
|
152
|
+
sage: L2(14)
|
|
153
|
+
0.998583063162746
|
|
154
|
+
|
|
155
|
+
TESTS:
|
|
156
|
+
|
|
157
|
+
Verify that setting the `w` parameter does not raise an error
|
|
158
|
+
(see :issue:`10937`)::
|
|
159
|
+
|
|
160
|
+
sage: L2 = lfun_generic(conductor=1, gammaV=[0, 1], weight=12, eps=1)
|
|
161
|
+
sage: L2.init_coeffs(list(delta_qexp(1000))[1:], w=[1..1000])
|
|
162
|
+
"""
|
|
163
|
+
v = pari(v)
|
|
164
|
+
if v.type() not in ('t_CLOSURE', 't_VEC'):
|
|
165
|
+
raise TypeError("v (coefficients) must be a list or a function")
|
|
166
|
+
|
|
167
|
+
# w = 0 means a*_n = a_n
|
|
168
|
+
# w = 1 means a*_n = complex conjugate of a_n
|
|
169
|
+
# otherwise w must be a list of coefficients
|
|
170
|
+
w = pari(w)
|
|
171
|
+
if w.type() not in ('t_INT', 't_CLOSURE', 't_VEC'):
|
|
172
|
+
raise TypeError("w (dual coefficients) must be a list or a function or the special value 0 or 1")
|
|
173
|
+
|
|
174
|
+
if not self.poles:
|
|
175
|
+
self._L = pari.lfuncreate([v, w, self.gammaV, self.weight,
|
|
176
|
+
self.conductor, self.eps])
|
|
177
|
+
else:
|
|
178
|
+
# TODO
|
|
179
|
+
# poles = list(zip(poles, residues))
|
|
180
|
+
self._L = pari.lfuncreate([v, w, self.gammaV, self.weight,
|
|
181
|
+
self.conductor, self.eps,
|
|
182
|
+
self.poles[0]])
|
|
183
|
+
|
|
184
|
+
def __pari__(self):
|
|
185
|
+
"""
|
|
186
|
+
Return the PARI `L`-function object.
|
|
187
|
+
|
|
188
|
+
EXAMPLES::
|
|
189
|
+
|
|
190
|
+
sage: from sage.lfunctions.pari import lfun_generic, LFunction
|
|
191
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[1])
|
|
192
|
+
sage: lf.__pari__()
|
|
193
|
+
Traceback (most recent call last):
|
|
194
|
+
...
|
|
195
|
+
ValueError: call init_coeffs on the L-function first
|
|
196
|
+
|
|
197
|
+
sage: lf.init_coeffs([1]*2000)
|
|
198
|
+
sage: X = lf.__pari__()
|
|
199
|
+
sage: X.type()
|
|
200
|
+
't_VEC'
|
|
201
|
+
"""
|
|
202
|
+
if self._L is None:
|
|
203
|
+
raise ValueError("call init_coeffs on the L-function first")
|
|
204
|
+
return self._L
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
def lfun_character(chi):
|
|
208
|
+
"""
|
|
209
|
+
Create the `L`-function of a primitive Dirichlet character.
|
|
210
|
+
|
|
211
|
+
If the given character is not primitive, it is replaced by its
|
|
212
|
+
associated primitive character.
|
|
213
|
+
|
|
214
|
+
OUTPUT: one :pari:`lfun` object
|
|
215
|
+
|
|
216
|
+
EXAMPLES::
|
|
217
|
+
|
|
218
|
+
sage: from sage.lfunctions.pari import lfun_character, LFunction
|
|
219
|
+
sage: chi = DirichletGroup(6).gen().primitive_character()
|
|
220
|
+
sage: L = LFunction(lfun_character(chi))
|
|
221
|
+
sage: L(3)
|
|
222
|
+
0.884023811750080
|
|
223
|
+
|
|
224
|
+
TESTS:
|
|
225
|
+
|
|
226
|
+
A non-primitive one::
|
|
227
|
+
|
|
228
|
+
sage: L = LFunction(lfun_character(DirichletGroup(6).gen()))
|
|
229
|
+
sage: L(4)
|
|
230
|
+
0.940025680877124
|
|
231
|
+
|
|
232
|
+
With complex arguments::
|
|
233
|
+
|
|
234
|
+
sage: from sage.lfunctions.pari import lfun_character, LFunction
|
|
235
|
+
sage: chi = DirichletGroup(6, CC).gen().primitive_character()
|
|
236
|
+
sage: L = LFunction(lfun_character(chi))
|
|
237
|
+
sage: L(3)
|
|
238
|
+
0.884023811750080
|
|
239
|
+
|
|
240
|
+
Check the values::
|
|
241
|
+
|
|
242
|
+
sage: chi = DirichletGroup(24)([1, -1, -1]); chi
|
|
243
|
+
Dirichlet character modulo 24 of conductor 24
|
|
244
|
+
mapping 7 |--> 1, 13 |--> -1, 17 |--> -1
|
|
245
|
+
sage: Lchi = lfun_character(chi)
|
|
246
|
+
sage: v = [0] + Lchi.lfunan(30).sage()
|
|
247
|
+
sage: all(v[i] == chi(i) for i in (7, 13, 17))
|
|
248
|
+
True
|
|
249
|
+
"""
|
|
250
|
+
if not chi.is_primitive():
|
|
251
|
+
chi = chi.primitive_character()
|
|
252
|
+
G, v = chi._pari_init_()
|
|
253
|
+
return pari.lfuncreate([G, v])
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
def lfun_hgm(motif, t):
|
|
257
|
+
"""
|
|
258
|
+
Create the `L`-function of an hypergeometric motive.
|
|
259
|
+
|
|
260
|
+
OUTPUT: one :pari:`lfun` object
|
|
261
|
+
|
|
262
|
+
EXAMPLES::
|
|
263
|
+
|
|
264
|
+
sage: from sage.lfunctions.pari import lfun_hgm, LFunction
|
|
265
|
+
sage: from sage.modular.hypergeometric_motive import HypergeometricData as Hyp
|
|
266
|
+
sage: H = Hyp(gamma_list=([3,-1,-1,-1]))
|
|
267
|
+
sage: L = LFunction(lfun_hgm(H, 1/5))
|
|
268
|
+
sage: L(3)
|
|
269
|
+
0.901925346034773
|
|
270
|
+
"""
|
|
271
|
+
H = pari.hgminit(*motif.alpha_beta())
|
|
272
|
+
lf = pari.lfunhgm(H, t)
|
|
273
|
+
return pari.lfuncreate(lf)
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
def lfun_elliptic_curve(E):
|
|
277
|
+
"""
|
|
278
|
+
Create the `L`-function of an elliptic curve.
|
|
279
|
+
|
|
280
|
+
OUTPUT: one :pari:`lfun` object
|
|
281
|
+
|
|
282
|
+
EXAMPLES::
|
|
283
|
+
|
|
284
|
+
sage: from sage.lfunctions.pari import lfun_elliptic_curve, LFunction
|
|
285
|
+
|
|
286
|
+
sage: # needs database_cremona_mini_ellcurve
|
|
287
|
+
sage: E = EllipticCurve('11a1')
|
|
288
|
+
sage: L = LFunction(lfun_elliptic_curve(E))
|
|
289
|
+
sage: L(3)
|
|
290
|
+
0.752723147389051
|
|
291
|
+
sage: L(1)
|
|
292
|
+
0.253841860855911
|
|
293
|
+
|
|
294
|
+
Over number fields::
|
|
295
|
+
|
|
296
|
+
sage: K.<a> = QuadraticField(2)
|
|
297
|
+
sage: E = EllipticCurve([1, a])
|
|
298
|
+
sage: L = LFunction(lfun_elliptic_curve(E))
|
|
299
|
+
sage: L(3)
|
|
300
|
+
1.00412346717019
|
|
301
|
+
"""
|
|
302
|
+
return pari.lfuncreate(E)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
def lfun_number_field(K):
|
|
306
|
+
"""
|
|
307
|
+
Create the Dedekind zeta function of a number field.
|
|
308
|
+
|
|
309
|
+
OUTPUT: one :pari:`lfun` object
|
|
310
|
+
|
|
311
|
+
EXAMPLES::
|
|
312
|
+
|
|
313
|
+
sage: from sage.lfunctions.pari import lfun_number_field, LFunction
|
|
314
|
+
|
|
315
|
+
sage: L = LFunction(lfun_number_field(QQ))
|
|
316
|
+
sage: L(3)
|
|
317
|
+
1.20205690315959
|
|
318
|
+
|
|
319
|
+
sage: x = polygen(QQ, 'x')
|
|
320
|
+
sage: K = NumberField(x**2 - 2, 'a')
|
|
321
|
+
sage: L = LFunction(lfun_number_field(K))
|
|
322
|
+
sage: L(3)
|
|
323
|
+
1.15202784126080
|
|
324
|
+
sage: L(0)
|
|
325
|
+
...0.000000000000000
|
|
326
|
+
"""
|
|
327
|
+
return pari.lfuncreate(K)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
def lfun_eta_quotient(scalings, exponents):
|
|
331
|
+
"""
|
|
332
|
+
Return the `L`-function of an eta-quotient.
|
|
333
|
+
|
|
334
|
+
This uses :pari:`lfunetaquo`.
|
|
335
|
+
|
|
336
|
+
INPUT:
|
|
337
|
+
|
|
338
|
+
- ``scalings`` -- list of integers; the scaling factors
|
|
339
|
+
|
|
340
|
+
- ``exponents`` -- list of integers; the exponents
|
|
341
|
+
|
|
342
|
+
EXAMPLES::
|
|
343
|
+
|
|
344
|
+
sage: from sage.lfunctions.pari import lfun_eta_quotient, LFunction
|
|
345
|
+
sage: L = LFunction(lfun_eta_quotient([1], [24]))
|
|
346
|
+
sage: L(1)
|
|
347
|
+
0.0374412812685155
|
|
348
|
+
|
|
349
|
+
sage: lfun_eta_quotient([6], [4])
|
|
350
|
+
[[Vecsmall([7]), [Vecsmall([6]), Vecsmall([4]), 0]], 0, [0, 1], 2, 36, 1]
|
|
351
|
+
|
|
352
|
+
sage: lfun_eta_quotient([2, 1, 4], [5, -2, -2])
|
|
353
|
+
Traceback (most recent call last):
|
|
354
|
+
...
|
|
355
|
+
PariError: sorry, noncuspidal eta quotient is not yet implemented
|
|
356
|
+
"""
|
|
357
|
+
from sage.matrix.constructor import matrix
|
|
358
|
+
N = len(scalings)
|
|
359
|
+
if N != len(exponents):
|
|
360
|
+
raise ValueError('arguments should have the same length')
|
|
361
|
+
m = matrix(ZZ, N, 2, list(zip(scalings, exponents)))
|
|
362
|
+
return pari.lfunetaquo(m)
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
def lfun_delta():
|
|
366
|
+
"""
|
|
367
|
+
Return the `L`-function of Ramanujan's Delta modular form.
|
|
368
|
+
|
|
369
|
+
EXAMPLES::
|
|
370
|
+
|
|
371
|
+
sage: from sage.lfunctions.pari import lfun_delta, LFunction
|
|
372
|
+
sage: L = LFunction(lfun_delta())
|
|
373
|
+
sage: L(1)
|
|
374
|
+
0.0374412812685155
|
|
375
|
+
"""
|
|
376
|
+
return lfun_eta_quotient([1], [24])
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
def lfun_quadratic_form(qf):
|
|
380
|
+
"""
|
|
381
|
+
Return the `L`-function of a positive definite quadratic form.
|
|
382
|
+
|
|
383
|
+
This uses :pari:`lfunqf`.
|
|
384
|
+
|
|
385
|
+
EXAMPLES::
|
|
386
|
+
|
|
387
|
+
sage: from sage.lfunctions.pari import lfun_quadratic_form, LFunction
|
|
388
|
+
sage: Q = QuadraticForm(ZZ, 2, [2, 3, 4])
|
|
389
|
+
sage: L = LFunction(lfun_quadratic_form(Q))
|
|
390
|
+
sage: L(3)
|
|
391
|
+
0.377597233183583
|
|
392
|
+
"""
|
|
393
|
+
if not qf.is_positive_definite():
|
|
394
|
+
raise ValueError('quadratic form must be positive definite')
|
|
395
|
+
return pari.lfunqf(qf.matrix())
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
def lfun_genus2(C):
|
|
399
|
+
"""
|
|
400
|
+
Return the `L`-function of a curve of genus 2.
|
|
401
|
+
|
|
402
|
+
INPUT:
|
|
403
|
+
|
|
404
|
+
- ``C`` -- hyperelliptic curve of genus 2
|
|
405
|
+
|
|
406
|
+
Currently, the model needs to be minimal at 2.
|
|
407
|
+
|
|
408
|
+
This uses :pari:`lfungenus2`.
|
|
409
|
+
|
|
410
|
+
EXAMPLES::
|
|
411
|
+
|
|
412
|
+
sage: from sage.lfunctions.pari import lfun_genus2, LFunction
|
|
413
|
+
sage: x = polygen(QQ, 'x')
|
|
414
|
+
sage: C = HyperellipticCurve(x^5 + x + 1)
|
|
415
|
+
sage: L = LFunction(lfun_genus2(C))
|
|
416
|
+
...
|
|
417
|
+
sage: L(3)
|
|
418
|
+
0.965946926261520
|
|
419
|
+
|
|
420
|
+
sage: C = HyperellipticCurve(x^2 + x, x^3 + x^2 + 1)
|
|
421
|
+
sage: L = LFunction(lfun_genus2(C))
|
|
422
|
+
sage: L(2)
|
|
423
|
+
0.364286342944359
|
|
424
|
+
|
|
425
|
+
TESTS::
|
|
426
|
+
|
|
427
|
+
sage: x = polygen(QQ, 'x')
|
|
428
|
+
sage: H = HyperellipticCurve(x^15 + x + 1)
|
|
429
|
+
sage: L = LFunction(lfun_genus2(H))
|
|
430
|
+
Traceback (most recent call last):
|
|
431
|
+
...
|
|
432
|
+
ValueError: curve must be hyperelliptic of genus 2
|
|
433
|
+
"""
|
|
434
|
+
from sage.schemes.hyperelliptic_curves.hyperelliptic_g2 import HyperellipticCurve_g2 as hyp_g2
|
|
435
|
+
if not isinstance(C, hyp_g2):
|
|
436
|
+
raise ValueError('curve must be hyperelliptic of genus 2')
|
|
437
|
+
P, Q = C.hyperelliptic_polynomials()
|
|
438
|
+
return pari.lfungenus2(P) if not Q else pari.lfungenus2([P, Q])
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
class LFunction(SageObject):
|
|
442
|
+
r"""
|
|
443
|
+
Build the `L`-function from a PARI `L`-function.
|
|
444
|
+
|
|
445
|
+
.. RUBRIC:: Rank 1 elliptic curve
|
|
446
|
+
|
|
447
|
+
We compute with the `L`-series of a rank `1` curve. ::
|
|
448
|
+
|
|
449
|
+
sage: # needs database_cremona_mini_ellcurve
|
|
450
|
+
sage: E = EllipticCurve('37a')
|
|
451
|
+
sage: L = E.lseries().dokchitser(algorithm='pari'); L
|
|
452
|
+
PARI L-function associated to Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
|
|
453
|
+
sage: L(1)
|
|
454
|
+
0.000000000000000
|
|
455
|
+
sage: L.derivative(1)
|
|
456
|
+
0.305999773834052
|
|
457
|
+
sage: L.derivative(1, 2)
|
|
458
|
+
0.373095594536324
|
|
459
|
+
sage: L.num_coeffs()
|
|
460
|
+
50
|
|
461
|
+
sage: L.taylor_series(1, 4)
|
|
462
|
+
0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2 - 0.136791463097188*z^3 + O(z^4)
|
|
463
|
+
sage: L.check_functional_equation() # abs tol 4e-19
|
|
464
|
+
1.08420217248550e-19
|
|
465
|
+
|
|
466
|
+
.. RUBRIC:: Rank 2 elliptic curve
|
|
467
|
+
|
|
468
|
+
We compute the leading coefficient and Taylor expansion of the
|
|
469
|
+
`L`-series of a rank `2` elliptic curve::
|
|
470
|
+
|
|
471
|
+
sage: # needs database_cremona_mini_ellcurve
|
|
472
|
+
sage: E = EllipticCurve('389a')
|
|
473
|
+
sage: L = E.lseries().dokchitser(algorithm='pari')
|
|
474
|
+
sage: L.num_coeffs()
|
|
475
|
+
163
|
|
476
|
+
sage: L.derivative(1, E.rank())
|
|
477
|
+
1.51863300057685
|
|
478
|
+
sage: L.taylor_series(1, 4)
|
|
479
|
+
...e-19 + (...e-19)*z + 0.759316500288427*z^2 - 0.430302337583362*z^3 + O(z^4)
|
|
480
|
+
|
|
481
|
+
.. RUBRIC:: Number field
|
|
482
|
+
|
|
483
|
+
We compute with the Dedekind zeta function of a number field::
|
|
484
|
+
|
|
485
|
+
sage: x = polygen(QQ, 'x')
|
|
486
|
+
sage: K = NumberField(x**4 - x**2 - 1,'a')
|
|
487
|
+
sage: L = K.zeta_function(algorithm='pari')
|
|
488
|
+
sage: L.conductor
|
|
489
|
+
400
|
|
490
|
+
sage: L.num_coeffs()
|
|
491
|
+
348
|
|
492
|
+
sage: L(2)
|
|
493
|
+
1.10398438736918
|
|
494
|
+
sage: L.taylor_series(2, 3)
|
|
495
|
+
1.10398438736918 - 0.215822638498759*z + 0.279836437522536*z^2 + O(z^3)
|
|
496
|
+
|
|
497
|
+
.. RUBRIC:: Ramanujan `\Delta` L-function
|
|
498
|
+
|
|
499
|
+
The coefficients are given by Ramanujan's tau function::
|
|
500
|
+
|
|
501
|
+
sage: from sage.lfunctions.pari import lfun_generic, LFunction
|
|
502
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0, 1], weight=12, eps=1)
|
|
503
|
+
sage: tau = pari('k->vector(k,n,(5*sigma(n,3)+7*sigma(n,5))*n/12 - 35*sum(k=1,n-1,(6*k-4*(n-k))*sigma(k,3)*sigma(n-k,5)))')
|
|
504
|
+
sage: lf.init_coeffs(tau)
|
|
505
|
+
sage: L = LFunction(lf)
|
|
506
|
+
|
|
507
|
+
Now we are ready to evaluate, etc. ::
|
|
508
|
+
|
|
509
|
+
sage: L(1)
|
|
510
|
+
0.0374412812685155
|
|
511
|
+
sage: L.taylor_series(1, 3)
|
|
512
|
+
0.0374412812685155 + 0.0709221123619322*z + 0.0380744761270520*z^2 + O(z^3)
|
|
513
|
+
"""
|
|
514
|
+
def __init__(self, lfun, prec=None):
|
|
515
|
+
"""
|
|
516
|
+
Initialization of the `L`-function from a PARI `L`-function.
|
|
517
|
+
|
|
518
|
+
INPUT:
|
|
519
|
+
|
|
520
|
+
- ``lfun`` -- a PARI :pari:`lfun` object or an instance of :class:`lfun_generic`
|
|
521
|
+
- ``prec`` -- integer (default: 53); number of *bits* of precision
|
|
522
|
+
|
|
523
|
+
EXAMPLES::
|
|
524
|
+
|
|
525
|
+
sage: from sage.lfunctions.pari import lfun_generic, LFunction
|
|
526
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[-1], v=pari('k->vector(k,n,1)'))
|
|
527
|
+
sage: L = LFunction(lf)
|
|
528
|
+
sage: L.num_coeffs()
|
|
529
|
+
4
|
|
530
|
+
"""
|
|
531
|
+
if isinstance(lfun, lfun_generic):
|
|
532
|
+
# preparation using motivic data
|
|
533
|
+
self._L = lfun.__pari__()
|
|
534
|
+
if prec is None:
|
|
535
|
+
prec = lfun.prec
|
|
536
|
+
elif isinstance(lfun, Gen):
|
|
537
|
+
# already some PARI lfun
|
|
538
|
+
self._L = lfun
|
|
539
|
+
else:
|
|
540
|
+
# create a PARI lfunction from other input data
|
|
541
|
+
self._L = pari.lfuncreate(lfun)
|
|
542
|
+
|
|
543
|
+
self._conductor = ZZ(self._L[4]) # needs check
|
|
544
|
+
self._weight = ZZ(self._L[3]) # needs check
|
|
545
|
+
if prec is None:
|
|
546
|
+
self.prec = 53
|
|
547
|
+
else:
|
|
548
|
+
self.prec = PyNumber_Index(prec)
|
|
549
|
+
self._RR = RealField(self.prec)
|
|
550
|
+
self._CC = ComplexField(self.prec)
|
|
551
|
+
# Complex field used for inputs, which ensures exact 1-to-1
|
|
552
|
+
# conversion to/from PARI. Since PARI objects have a precision
|
|
553
|
+
# in machine words (not bits), this is typically higher. For
|
|
554
|
+
# example, the default of 53 bits of precision would become 64.
|
|
555
|
+
self._CCin = ComplexField(pari.bitprecision(self._RR(1)))
|
|
556
|
+
|
|
557
|
+
def _repr_(self):
|
|
558
|
+
"""
|
|
559
|
+
EXAMPLES::
|
|
560
|
+
|
|
561
|
+
sage: from sage.lfunctions.pari import lfun_number_field, LFunction
|
|
562
|
+
sage: L = LFunction(lfun_number_field(QQ)); L
|
|
563
|
+
L-series of conductor 1 and weight 1
|
|
564
|
+
"""
|
|
565
|
+
return "L-series of conductor %s and weight %s" % (self._conductor,
|
|
566
|
+
self._weight)
|
|
567
|
+
|
|
568
|
+
@property
|
|
569
|
+
def conductor(self):
|
|
570
|
+
"""
|
|
571
|
+
Return the conductor.
|
|
572
|
+
|
|
573
|
+
EXAMPLES::
|
|
574
|
+
|
|
575
|
+
sage: from sage.lfunctions.pari import *
|
|
576
|
+
sage: L = LFunction(lfun_number_field(QQ)); L.conductor
|
|
577
|
+
1
|
|
578
|
+
sage: E = EllipticCurve('11a') # needs database_cremona_mini_ellcurve
|
|
579
|
+
sage: L = LFunction(lfun_number_field(E)); L.conductor # needs database_cremona_mini_ellcurve
|
|
580
|
+
11
|
|
581
|
+
"""
|
|
582
|
+
return self._conductor
|
|
583
|
+
|
|
584
|
+
def num_coeffs(self, T=1):
|
|
585
|
+
"""
|
|
586
|
+
Return number of coefficients `a_n` that are needed in
|
|
587
|
+
order to perform most relevant `L`-function computations to
|
|
588
|
+
the desired precision.
|
|
589
|
+
|
|
590
|
+
EXAMPLES::
|
|
591
|
+
|
|
592
|
+
sage: # needs database_cremona_mini_ellcurve
|
|
593
|
+
sage: E = EllipticCurve('11a')
|
|
594
|
+
sage: L = E.lseries().dokchitser(algorithm='pari')
|
|
595
|
+
sage: L.num_coeffs()
|
|
596
|
+
27
|
|
597
|
+
sage: E = EllipticCurve('5077a')
|
|
598
|
+
sage: L = E.lseries().dokchitser(algorithm='pari')
|
|
599
|
+
sage: L.num_coeffs()
|
|
600
|
+
591
|
|
601
|
+
|
|
602
|
+
sage: from sage.lfunctions.pari import lfun_generic, LFunction
|
|
603
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[-1], v=pari('k->vector(k,n,1)'))
|
|
604
|
+
sage: L = LFunction(lf)
|
|
605
|
+
sage: L.num_coeffs()
|
|
606
|
+
4
|
|
607
|
+
"""
|
|
608
|
+
# lfuncost takes a domain
|
|
609
|
+
domain = [pari(1) / 2, 1, 1]
|
|
610
|
+
return ZZ(pari.lfuncost(self._L, domain)[0])
|
|
611
|
+
|
|
612
|
+
def Lambda(self, s):
|
|
613
|
+
"""
|
|
614
|
+
Evaluate the completed `L`-function at s.
|
|
615
|
+
|
|
616
|
+
EXAMPLES::
|
|
617
|
+
|
|
618
|
+
sage: from sage.lfunctions.pari import lfun_number_field, LFunction
|
|
619
|
+
sage: L = LFunction(lfun_number_field(QQ))
|
|
620
|
+
sage: L.Lambda(2)
|
|
621
|
+
0.523598775598299
|
|
622
|
+
sage: L.Lambda(1 - 2)
|
|
623
|
+
0.523598775598299
|
|
624
|
+
"""
|
|
625
|
+
s = self._CCin(s)
|
|
626
|
+
R = self._CC
|
|
627
|
+
return R(pari.lfunlambda(self._L, s, precision=self.prec))
|
|
628
|
+
|
|
629
|
+
def hardy(self, t):
|
|
630
|
+
"""
|
|
631
|
+
Evaluate the associated Hardy function at t.
|
|
632
|
+
|
|
633
|
+
This only works for real t.
|
|
634
|
+
|
|
635
|
+
EXAMPLES::
|
|
636
|
+
|
|
637
|
+
sage: from sage.lfunctions.pari import lfun_number_field, LFunction
|
|
638
|
+
sage: L = LFunction(lfun_number_field(QQ))
|
|
639
|
+
sage: L.hardy(2)
|
|
640
|
+
-0.962008487244041
|
|
641
|
+
|
|
642
|
+
TESTS::
|
|
643
|
+
|
|
644
|
+
sage: L.hardy(.4 + .3*I)
|
|
645
|
+
Traceback (most recent call last):
|
|
646
|
+
...
|
|
647
|
+
PariError: incorrect type in lfunhardy (t_COMPLEX)
|
|
648
|
+
"""
|
|
649
|
+
t = self._CCin(t)
|
|
650
|
+
R = self._RR
|
|
651
|
+
return R(pari.lfunhardy(self._L, t, precision=self.prec))
|
|
652
|
+
|
|
653
|
+
def derivative(self, s, D=1):
|
|
654
|
+
"""
|
|
655
|
+
Return the derivative of the `L`-function at point s and order D.
|
|
656
|
+
|
|
657
|
+
INPUT:
|
|
658
|
+
|
|
659
|
+
- ``s`` -- complex number
|
|
660
|
+
|
|
661
|
+
- ``D`` -- integer (default: 1)
|
|
662
|
+
|
|
663
|
+
EXAMPLES::
|
|
664
|
+
|
|
665
|
+
sage: from sage.lfunctions.pari import lfun_number_field, LFunction
|
|
666
|
+
sage: L = LFunction(lfun_number_field(QQ))
|
|
667
|
+
sage: L.derivative(2)
|
|
668
|
+
-0.937548254315844
|
|
669
|
+
"""
|
|
670
|
+
s = self._CCin(s)
|
|
671
|
+
R = self._CC
|
|
672
|
+
return R(pari.lfun(self._L, s, D, precision=self.prec))
|
|
673
|
+
|
|
674
|
+
def taylor_series(self, s, k=6, var='z'):
|
|
675
|
+
r"""
|
|
676
|
+
Return the first `k` terms of the Taylor series expansion
|
|
677
|
+
of the `L`-series about `s`.
|
|
678
|
+
|
|
679
|
+
This is returned as a formal power series in ``var``.
|
|
680
|
+
|
|
681
|
+
INPUT:
|
|
682
|
+
|
|
683
|
+
- ``s`` -- complex number; point about which to expand
|
|
684
|
+
|
|
685
|
+
- ``k`` -- integer (default: 6); series is `O(``var``^k)`
|
|
686
|
+
|
|
687
|
+
- ``var`` -- string (default: ``'z'``); variable of power series
|
|
688
|
+
|
|
689
|
+
EXAMPLES::
|
|
690
|
+
|
|
691
|
+
sage: from sage.lfunctions.pari import lfun_number_field, LFunction
|
|
692
|
+
sage: lf = lfun_number_field(QQ)
|
|
693
|
+
sage: L = LFunction(lf)
|
|
694
|
+
sage: L.taylor_series(2, 3)
|
|
695
|
+
1.64493406684823 - 0.937548254315844*z + 0.994640117149451*z^2 + O(z^3)
|
|
696
|
+
|
|
697
|
+
sage: # needs database_cremona_mini_ellcurve
|
|
698
|
+
sage: E = EllipticCurve('37a')
|
|
699
|
+
sage: L = E.lseries().dokchitser(algorithm='pari')
|
|
700
|
+
sage: L.taylor_series(1)
|
|
701
|
+
0.000000000000000 + 0.305999773834052*z + 0.186547797268162*z^2
|
|
702
|
+
- 0.136791463097188*z^3 + 0.0161066468496401*z^4 + 0.0185955175398802*z^5 + O(z^6)
|
|
703
|
+
|
|
704
|
+
We compute a Taylor series where each coefficient is to high
|
|
705
|
+
precision::
|
|
706
|
+
|
|
707
|
+
sage: # needs database_cremona_mini_ellcurve
|
|
708
|
+
sage: E = EllipticCurve('389a')
|
|
709
|
+
sage: L = E.lseries().dokchitser(200,algorithm='pari')
|
|
710
|
+
sage: L.taylor_series(1, 3)
|
|
711
|
+
2...e-63 + (...e-63)*z + 0.75931650028842677023019260789472201907809751649492435158581*z^2 + O(z^3)
|
|
712
|
+
|
|
713
|
+
Check that :issue:`25402` is fixed::
|
|
714
|
+
|
|
715
|
+
sage: # needs database_cremona_mini_ellcurve
|
|
716
|
+
sage: L = EllipticCurve("24a1").modular_form().lseries()
|
|
717
|
+
sage: L.taylor_series(-1, 3)
|
|
718
|
+
0.000000000000000 - 0.702565506265199*z + 0.638929001045535*z^2 + O(z^3)
|
|
719
|
+
"""
|
|
720
|
+
pt = pari.Ser([s, 1], d=k) # s + x + O(x^k)
|
|
721
|
+
B = PowerSeriesRing(self._CC, var)
|
|
722
|
+
return B(pari.lfun(self._L, pt, precision=self.prec))
|
|
723
|
+
|
|
724
|
+
def zeros(self, maxi):
|
|
725
|
+
"""
|
|
726
|
+
Return the zeros with imaginary part bounded by maxi.
|
|
727
|
+
|
|
728
|
+
EXAMPLES::
|
|
729
|
+
|
|
730
|
+
sage: from sage.lfunctions.pari import lfun_number_field, LFunction
|
|
731
|
+
sage: lf = lfun_number_field(QQ)
|
|
732
|
+
sage: L = LFunction(lf)
|
|
733
|
+
sage: L.zeros(20)
|
|
734
|
+
[14.1347251417347]
|
|
735
|
+
"""
|
|
736
|
+
R = self._CC
|
|
737
|
+
return [R(z) for z in pari.lfunzeros(self._L, maxi)]
|
|
738
|
+
|
|
739
|
+
def _clear_value_cache(self):
|
|
740
|
+
"""
|
|
741
|
+
Clear the cache where values of the function are stored.
|
|
742
|
+
|
|
743
|
+
EXAMPLES::
|
|
744
|
+
|
|
745
|
+
sage: from sage.lfunctions.pari import lfun_number_field, LFunction
|
|
746
|
+
sage: lf = lfun_number_field(QQ)
|
|
747
|
+
sage: L = LFunction(lf)
|
|
748
|
+
sage: L(4)
|
|
749
|
+
1.08232323371114
|
|
750
|
+
sage: L._clear_value_cache()
|
|
751
|
+
"""
|
|
752
|
+
del self.__values
|
|
753
|
+
|
|
754
|
+
def __call__(self, s):
|
|
755
|
+
r"""
|
|
756
|
+
Return the value of the `L`-function at point ``s``.
|
|
757
|
+
|
|
758
|
+
INPUT:
|
|
759
|
+
|
|
760
|
+
- ``s`` -- complex number
|
|
761
|
+
|
|
762
|
+
.. NOTE::
|
|
763
|
+
|
|
764
|
+
Evaluation of the function takes a long time, so each
|
|
765
|
+
evaluation is cached. Call :meth:`_clear_value_cache` to
|
|
766
|
+
clear the evaluation cache.
|
|
767
|
+
|
|
768
|
+
EXAMPLES::
|
|
769
|
+
|
|
770
|
+
sage: # needs database_cremona_mini_ellcurve
|
|
771
|
+
sage: E = EllipticCurve('5077a')
|
|
772
|
+
sage: L = E.lseries().dokchitser(100, algorithm='pari')
|
|
773
|
+
sage: L(1)
|
|
774
|
+
0.00000000000000000000000000000
|
|
775
|
+
sage: L(1 + I)
|
|
776
|
+
-1.3085436607849493358323930438 + 0.81298000036784359634835412129*I
|
|
777
|
+
"""
|
|
778
|
+
s = self._CC(s)
|
|
779
|
+
try:
|
|
780
|
+
return self.__values[s]
|
|
781
|
+
except AttributeError:
|
|
782
|
+
self.__values = {}
|
|
783
|
+
except KeyError:
|
|
784
|
+
pass
|
|
785
|
+
try:
|
|
786
|
+
value = self._CC(pari.lfun(self._L, s, precision=self.prec))
|
|
787
|
+
except NameError:
|
|
788
|
+
raise ArithmeticError('pole here')
|
|
789
|
+
else:
|
|
790
|
+
return value
|
|
791
|
+
|
|
792
|
+
def check_functional_equation(self):
|
|
793
|
+
r"""
|
|
794
|
+
Verify how well numerically the functional equation is satisfied.
|
|
795
|
+
|
|
796
|
+
If what this function returns does not look like 0 at all,
|
|
797
|
+
probably the functional equation is wrong, i.e. some of the
|
|
798
|
+
parameters gammaV, conductor, etc., or the coefficients are wrong.
|
|
799
|
+
|
|
800
|
+
EXAMPLES::
|
|
801
|
+
|
|
802
|
+
sage: from sage.lfunctions.pari import lfun_generic, LFunction
|
|
803
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0], weight=1, eps=1, poles=[1], residues=[1], v=pari('k->vector(k,n,1)'))
|
|
804
|
+
sage: L = LFunction(lf)
|
|
805
|
+
sage: L.check_functional_equation()
|
|
806
|
+
4.33680868994202e-19
|
|
807
|
+
|
|
808
|
+
If we choose the sign in functional equation for the
|
|
809
|
+
`\zeta` function incorrectly, the functional equation
|
|
810
|
+
does not check out::
|
|
811
|
+
|
|
812
|
+
sage: lf = lfun_generic(conductor=1, gammaV=[0], weight=1, eps=-1, poles=[1], residues=[1])
|
|
813
|
+
sage: lf.init_coeffs([1]*2000)
|
|
814
|
+
sage: L = LFunction(lf)
|
|
815
|
+
sage: L.check_functional_equation()
|
|
816
|
+
16.0000000000000
|
|
817
|
+
"""
|
|
818
|
+
return self._RR(2)**pari.lfuncheckfeq(self._L)
|