passagemath-schemes 10.8.1a4__cp314-cp314t-macosx_13_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (312) hide show
  1. passagemath_schemes/.dylibs/libflint.22.0.dylib +0 -0
  2. passagemath_schemes/.dylibs/libgmp.10.dylib +0 -0
  3. passagemath_schemes/.dylibs/libgmpxx.4.dylib +0 -0
  4. passagemath_schemes/.dylibs/libmpfr.6.dylib +0 -0
  5. passagemath_schemes/__init__.py +3 -0
  6. passagemath_schemes-10.8.1a4.dist-info/METADATA +203 -0
  7. passagemath_schemes-10.8.1a4.dist-info/METADATA.bak +204 -0
  8. passagemath_schemes-10.8.1a4.dist-info/RECORD +312 -0
  9. passagemath_schemes-10.8.1a4.dist-info/WHEEL +6 -0
  10. passagemath_schemes-10.8.1a4.dist-info/top_level.txt +3 -0
  11. sage/all__sagemath_schemes.py +23 -0
  12. sage/databases/all__sagemath_schemes.py +7 -0
  13. sage/databases/cremona.py +1723 -0
  14. sage/dynamics/all__sagemath_schemes.py +2 -0
  15. sage/dynamics/arithmetic_dynamics/affine_ds.py +1083 -0
  16. sage/dynamics/arithmetic_dynamics/all.py +14 -0
  17. sage/dynamics/arithmetic_dynamics/berkovich_ds.py +1101 -0
  18. sage/dynamics/arithmetic_dynamics/dynamical_semigroup.py +1543 -0
  19. sage/dynamics/arithmetic_dynamics/endPN_automorphism_group.py +2426 -0
  20. sage/dynamics/arithmetic_dynamics/endPN_minimal_model.py +1169 -0
  21. sage/dynamics/arithmetic_dynamics/generic_ds.py +663 -0
  22. sage/dynamics/arithmetic_dynamics/product_projective_ds.py +339 -0
  23. sage/dynamics/arithmetic_dynamics/projective_ds.py +9556 -0
  24. sage/dynamics/arithmetic_dynamics/projective_ds_helper.cpython-314t-darwin.so +0 -0
  25. sage/dynamics/arithmetic_dynamics/projective_ds_helper.pyx +301 -0
  26. sage/dynamics/arithmetic_dynamics/wehlerK3.py +2578 -0
  27. sage/lfunctions/all.py +18 -0
  28. sage/lfunctions/dokchitser.py +727 -0
  29. sage/lfunctions/pari.py +971 -0
  30. sage/lfunctions/zero_sums.cpython-314t-darwin.so +0 -0
  31. sage/lfunctions/zero_sums.pyx +1847 -0
  32. sage/modular/abvar/abvar.py +5132 -0
  33. sage/modular/abvar/abvar_ambient_jacobian.py +414 -0
  34. sage/modular/abvar/abvar_newform.py +246 -0
  35. sage/modular/abvar/all.py +8 -0
  36. sage/modular/abvar/constructor.py +187 -0
  37. sage/modular/abvar/cuspidal_subgroup.py +371 -0
  38. sage/modular/abvar/finite_subgroup.py +896 -0
  39. sage/modular/abvar/homology.py +721 -0
  40. sage/modular/abvar/homspace.py +989 -0
  41. sage/modular/abvar/lseries.py +415 -0
  42. sage/modular/abvar/morphism.py +935 -0
  43. sage/modular/abvar/torsion_point.py +274 -0
  44. sage/modular/abvar/torsion_subgroup.py +741 -0
  45. sage/modular/all.py +43 -0
  46. sage/modular/arithgroup/all.py +20 -0
  47. sage/modular/arithgroup/arithgroup_element.cpython-314t-darwin.so +0 -0
  48. sage/modular/arithgroup/arithgroup_element.pyx +474 -0
  49. sage/modular/arithgroup/arithgroup_generic.py +1406 -0
  50. sage/modular/arithgroup/arithgroup_perm.py +2692 -0
  51. sage/modular/arithgroup/congroup.cpython-314t-darwin.so +0 -0
  52. sage/modular/arithgroup/congroup.pyx +334 -0
  53. sage/modular/arithgroup/congroup_gamma.py +361 -0
  54. sage/modular/arithgroup/congroup_gamma0.py +692 -0
  55. sage/modular/arithgroup/congroup_gamma1.py +659 -0
  56. sage/modular/arithgroup/congroup_gammaH.py +1491 -0
  57. sage/modular/arithgroup/congroup_generic.py +630 -0
  58. sage/modular/arithgroup/congroup_sl2z.py +266 -0
  59. sage/modular/arithgroup/farey_symbol.cpython-314t-darwin.so +0 -0
  60. sage/modular/arithgroup/farey_symbol.pyx +1067 -0
  61. sage/modular/arithgroup/tests.py +425 -0
  62. sage/modular/btquotients/all.py +4 -0
  63. sage/modular/btquotients/btquotient.py +3736 -0
  64. sage/modular/btquotients/pautomorphicform.py +2564 -0
  65. sage/modular/buzzard.py +100 -0
  66. sage/modular/congroup.py +29 -0
  67. sage/modular/congroup_element.py +13 -0
  68. sage/modular/cusps.py +1107 -0
  69. sage/modular/cusps_nf.py +1270 -0
  70. sage/modular/dims.py +571 -0
  71. sage/modular/dirichlet.py +3310 -0
  72. sage/modular/drinfeld_modform/all.py +2 -0
  73. sage/modular/drinfeld_modform/element.py +446 -0
  74. sage/modular/drinfeld_modform/ring.py +773 -0
  75. sage/modular/drinfeld_modform/tutorial.py +236 -0
  76. sage/modular/etaproducts.py +1076 -0
  77. sage/modular/hecke/algebra.py +725 -0
  78. sage/modular/hecke/all.py +19 -0
  79. sage/modular/hecke/ambient_module.py +994 -0
  80. sage/modular/hecke/degenmap.py +119 -0
  81. sage/modular/hecke/element.py +302 -0
  82. sage/modular/hecke/hecke_operator.py +736 -0
  83. sage/modular/hecke/homspace.py +185 -0
  84. sage/modular/hecke/module.py +1744 -0
  85. sage/modular/hecke/morphism.py +139 -0
  86. sage/modular/hecke/submodule.py +970 -0
  87. sage/modular/hypergeometric_misc.cpython-314t-darwin.so +0 -0
  88. sage/modular/hypergeometric_misc.pxd +4 -0
  89. sage/modular/hypergeometric_misc.pyx +166 -0
  90. sage/modular/hypergeometric_motive.py +2020 -0
  91. sage/modular/local_comp/all.py +2 -0
  92. sage/modular/local_comp/liftings.py +292 -0
  93. sage/modular/local_comp/local_comp.py +1070 -0
  94. sage/modular/local_comp/smoothchar.py +1825 -0
  95. sage/modular/local_comp/type_space.py +748 -0
  96. sage/modular/modform/all.py +30 -0
  97. sage/modular/modform/ambient.py +817 -0
  98. sage/modular/modform/ambient_R.py +177 -0
  99. sage/modular/modform/ambient_eps.py +306 -0
  100. sage/modular/modform/ambient_g0.py +120 -0
  101. sage/modular/modform/ambient_g1.py +199 -0
  102. sage/modular/modform/constructor.py +545 -0
  103. sage/modular/modform/cuspidal_submodule.py +708 -0
  104. sage/modular/modform/defaults.py +14 -0
  105. sage/modular/modform/eis_series.py +487 -0
  106. sage/modular/modform/eisenstein_submodule.py +663 -0
  107. sage/modular/modform/element.py +4105 -0
  108. sage/modular/modform/half_integral.py +154 -0
  109. sage/modular/modform/hecke_operator_on_qexp.py +247 -0
  110. sage/modular/modform/j_invariant.py +47 -0
  111. sage/modular/modform/l_series_gross_zagier.py +127 -0
  112. sage/modular/modform/l_series_gross_zagier_coeffs.cpython-314t-darwin.so +0 -0
  113. sage/modular/modform/l_series_gross_zagier_coeffs.pyx +177 -0
  114. sage/modular/modform/notes.py +45 -0
  115. sage/modular/modform/numerical.py +514 -0
  116. sage/modular/modform/periods.py +14 -0
  117. sage/modular/modform/ring.py +1257 -0
  118. sage/modular/modform/space.py +1859 -0
  119. sage/modular/modform/submodule.py +118 -0
  120. sage/modular/modform/tests.py +64 -0
  121. sage/modular/modform/theta.py +110 -0
  122. sage/modular/modform/vm_basis.py +380 -0
  123. sage/modular/modform/weight1.py +221 -0
  124. sage/modular/modform_hecketriangle/abstract_ring.py +1932 -0
  125. sage/modular/modform_hecketriangle/abstract_space.py +2527 -0
  126. sage/modular/modform_hecketriangle/all.py +30 -0
  127. sage/modular/modform_hecketriangle/analytic_type.py +590 -0
  128. sage/modular/modform_hecketriangle/constructor.py +416 -0
  129. sage/modular/modform_hecketriangle/element.py +351 -0
  130. sage/modular/modform_hecketriangle/functors.py +752 -0
  131. sage/modular/modform_hecketriangle/graded_ring.py +541 -0
  132. sage/modular/modform_hecketriangle/graded_ring_element.py +2225 -0
  133. sage/modular/modform_hecketriangle/hecke_triangle_group_element.py +3349 -0
  134. sage/modular/modform_hecketriangle/hecke_triangle_groups.py +1426 -0
  135. sage/modular/modform_hecketriangle/readme.py +1214 -0
  136. sage/modular/modform_hecketriangle/series_constructor.py +580 -0
  137. sage/modular/modform_hecketriangle/space.py +1037 -0
  138. sage/modular/modform_hecketriangle/subspace.py +423 -0
  139. sage/modular/modsym/all.py +17 -0
  140. sage/modular/modsym/ambient.py +3844 -0
  141. sage/modular/modsym/boundary.py +1420 -0
  142. sage/modular/modsym/element.py +336 -0
  143. sage/modular/modsym/g1list.py +178 -0
  144. sage/modular/modsym/ghlist.py +182 -0
  145. sage/modular/modsym/hecke_operator.py +73 -0
  146. sage/modular/modsym/manin_symbol.cpython-314t-darwin.so +0 -0
  147. sage/modular/modsym/manin_symbol.pxd +5 -0
  148. sage/modular/modsym/manin_symbol.pyx +497 -0
  149. sage/modular/modsym/manin_symbol_list.py +1291 -0
  150. sage/modular/modsym/modsym.py +400 -0
  151. sage/modular/modsym/modular_symbols.py +384 -0
  152. sage/modular/modsym/p1list_nf.py +1241 -0
  153. sage/modular/modsym/relation_matrix.py +591 -0
  154. sage/modular/modsym/relation_matrix_pyx.cpython-314t-darwin.so +0 -0
  155. sage/modular/modsym/relation_matrix_pyx.pyx +108 -0
  156. sage/modular/modsym/space.py +2468 -0
  157. sage/modular/modsym/subspace.py +455 -0
  158. sage/modular/modsym/tests.py +376 -0
  159. sage/modular/multiple_zeta.py +2635 -0
  160. sage/modular/multiple_zeta_F_algebra.py +789 -0
  161. sage/modular/overconvergent/all.py +6 -0
  162. sage/modular/overconvergent/genus0.py +1879 -0
  163. sage/modular/overconvergent/hecke_series.py +1187 -0
  164. sage/modular/overconvergent/weightspace.py +776 -0
  165. sage/modular/pollack_stevens/all.py +4 -0
  166. sage/modular/pollack_stevens/distributions.py +874 -0
  167. sage/modular/pollack_stevens/fund_domain.py +1572 -0
  168. sage/modular/pollack_stevens/manin_map.py +856 -0
  169. sage/modular/pollack_stevens/modsym.py +1590 -0
  170. sage/modular/pollack_stevens/padic_lseries.py +417 -0
  171. sage/modular/pollack_stevens/sigma0.py +534 -0
  172. sage/modular/pollack_stevens/space.py +1078 -0
  173. sage/modular/quasimodform/all.py +3 -0
  174. sage/modular/quasimodform/element.py +846 -0
  175. sage/modular/quasimodform/ring.py +826 -0
  176. sage/modular/quatalg/all.py +3 -0
  177. sage/modular/quatalg/brandt.py +1642 -0
  178. sage/modular/ssmod/all.py +8 -0
  179. sage/modular/ssmod/ssmod.py +827 -0
  180. sage/rings/all__sagemath_schemes.py +1 -0
  181. sage/rings/polynomial/all__sagemath_schemes.py +1 -0
  182. sage/rings/polynomial/binary_form_reduce.py +585 -0
  183. sage/schemes/all.py +41 -0
  184. sage/schemes/berkovich/all.py +6 -0
  185. sage/schemes/berkovich/berkovich_cp_element.py +2582 -0
  186. sage/schemes/berkovich/berkovich_space.py +700 -0
  187. sage/schemes/curves/affine_curve.py +2924 -0
  188. sage/schemes/curves/all.py +33 -0
  189. sage/schemes/curves/closed_point.py +434 -0
  190. sage/schemes/curves/constructor.py +397 -0
  191. sage/schemes/curves/curve.py +542 -0
  192. sage/schemes/curves/plane_curve_arrangement.py +1283 -0
  193. sage/schemes/curves/point.py +463 -0
  194. sage/schemes/curves/projective_curve.py +3203 -0
  195. sage/schemes/curves/weighted_projective_curve.py +106 -0
  196. sage/schemes/curves/zariski_vankampen.py +1931 -0
  197. sage/schemes/cyclic_covers/all.py +2 -0
  198. sage/schemes/cyclic_covers/charpoly_frobenius.py +320 -0
  199. sage/schemes/cyclic_covers/constructor.py +137 -0
  200. sage/schemes/cyclic_covers/cycliccover_finite_field.py +1309 -0
  201. sage/schemes/cyclic_covers/cycliccover_generic.py +310 -0
  202. sage/schemes/elliptic_curves/BSD.py +991 -0
  203. sage/schemes/elliptic_curves/Qcurves.py +592 -0
  204. sage/schemes/elliptic_curves/addition_formulas_ring.py +94 -0
  205. sage/schemes/elliptic_curves/all.py +49 -0
  206. sage/schemes/elliptic_curves/cardinality.py +609 -0
  207. sage/schemes/elliptic_curves/cm.py +1103 -0
  208. sage/schemes/elliptic_curves/constructor.py +1530 -0
  209. sage/schemes/elliptic_curves/ec_database.py +175 -0
  210. sage/schemes/elliptic_curves/ell_curve_isogeny.py +3971 -0
  211. sage/schemes/elliptic_curves/ell_egros.py +457 -0
  212. sage/schemes/elliptic_curves/ell_field.py +2837 -0
  213. sage/schemes/elliptic_curves/ell_finite_field.py +3249 -0
  214. sage/schemes/elliptic_curves/ell_generic.py +3760 -0
  215. sage/schemes/elliptic_curves/ell_local_data.py +1207 -0
  216. sage/schemes/elliptic_curves/ell_modular_symbols.py +775 -0
  217. sage/schemes/elliptic_curves/ell_number_field.py +4220 -0
  218. sage/schemes/elliptic_curves/ell_padic_field.py +107 -0
  219. sage/schemes/elliptic_curves/ell_point.py +4944 -0
  220. sage/schemes/elliptic_curves/ell_rational_field.py +7184 -0
  221. sage/schemes/elliptic_curves/ell_tate_curve.py +671 -0
  222. sage/schemes/elliptic_curves/ell_torsion.py +436 -0
  223. sage/schemes/elliptic_curves/ell_wp.py +352 -0
  224. sage/schemes/elliptic_curves/formal_group.py +760 -0
  225. sage/schemes/elliptic_curves/gal_reps.py +1459 -0
  226. sage/schemes/elliptic_curves/gal_reps_number_field.py +1663 -0
  227. sage/schemes/elliptic_curves/gp_simon.py +152 -0
  228. sage/schemes/elliptic_curves/heegner.py +7328 -0
  229. sage/schemes/elliptic_curves/height.py +2108 -0
  230. sage/schemes/elliptic_curves/hom.py +1788 -0
  231. sage/schemes/elliptic_curves/hom_composite.py +1084 -0
  232. sage/schemes/elliptic_curves/hom_fractional.py +544 -0
  233. sage/schemes/elliptic_curves/hom_frobenius.py +522 -0
  234. sage/schemes/elliptic_curves/hom_scalar.py +531 -0
  235. sage/schemes/elliptic_curves/hom_sum.py +681 -0
  236. sage/schemes/elliptic_curves/hom_velusqrt.py +1290 -0
  237. sage/schemes/elliptic_curves/homset.py +271 -0
  238. sage/schemes/elliptic_curves/isogeny_class.py +1523 -0
  239. sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
  240. sage/schemes/elliptic_curves/jacobian.py +247 -0
  241. sage/schemes/elliptic_curves/kodaira_symbol.py +344 -0
  242. sage/schemes/elliptic_curves/kraus.py +1014 -0
  243. sage/schemes/elliptic_curves/lseries_ell.py +915 -0
  244. sage/schemes/elliptic_curves/mod5family.py +105 -0
  245. sage/schemes/elliptic_curves/mod_poly.py +197 -0
  246. sage/schemes/elliptic_curves/mod_sym_num.cpython-314t-darwin.so +0 -0
  247. sage/schemes/elliptic_curves/mod_sym_num.pyx +3796 -0
  248. sage/schemes/elliptic_curves/modular_parametrization.py +305 -0
  249. sage/schemes/elliptic_curves/padic_lseries.py +1793 -0
  250. sage/schemes/elliptic_curves/padics.py +1816 -0
  251. sage/schemes/elliptic_curves/period_lattice.py +2234 -0
  252. sage/schemes/elliptic_curves/period_lattice_region.cpython-314t-darwin.so +0 -0
  253. sage/schemes/elliptic_curves/period_lattice_region.pyx +722 -0
  254. sage/schemes/elliptic_curves/saturation.py +716 -0
  255. sage/schemes/elliptic_curves/sha_tate.py +1158 -0
  256. sage/schemes/elliptic_curves/weierstrass_morphism.py +1117 -0
  257. sage/schemes/elliptic_curves/weierstrass_transform.py +200 -0
  258. sage/schemes/hyperelliptic_curves/all.py +6 -0
  259. sage/schemes/hyperelliptic_curves/constructor.py +369 -0
  260. sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1948 -0
  261. sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
  262. sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +936 -0
  263. sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +1332 -0
  264. sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +84 -0
  265. sage/schemes/hyperelliptic_curves/invariants.py +410 -0
  266. sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +312 -0
  267. sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
  268. sage/schemes/hyperelliptic_curves/jacobian_generic.py +437 -0
  269. sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
  270. sage/schemes/hyperelliptic_curves/jacobian_morphism.py +878 -0
  271. sage/schemes/hyperelliptic_curves/kummer_surface.py +99 -0
  272. sage/schemes/hyperelliptic_curves/mestre.py +302 -0
  273. sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +3863 -0
  274. sage/schemes/jacobians/abstract_jacobian.py +277 -0
  275. sage/schemes/jacobians/all.py +2 -0
  276. sage/schemes/overview.py +161 -0
  277. sage/schemes/plane_conics/all.py +22 -0
  278. sage/schemes/plane_conics/con_field.py +1296 -0
  279. sage/schemes/plane_conics/con_finite_field.py +158 -0
  280. sage/schemes/plane_conics/con_number_field.py +456 -0
  281. sage/schemes/plane_conics/con_rational_field.py +406 -0
  282. sage/schemes/plane_conics/con_rational_function_field.py +581 -0
  283. sage/schemes/plane_conics/constructor.py +249 -0
  284. sage/schemes/plane_quartics/all.py +2 -0
  285. sage/schemes/plane_quartics/quartic_constructor.py +71 -0
  286. sage/schemes/plane_quartics/quartic_generic.py +53 -0
  287. sage/schemes/riemann_surfaces/all.py +1 -0
  288. sage/schemes/riemann_surfaces/riemann_surface.py +4177 -0
  289. sage_wheels/share/cremona/cremona_mini.db +0 -0
  290. sage_wheels/share/ellcurves/rank0 +30427 -0
  291. sage_wheels/share/ellcurves/rank1 +31871 -0
  292. sage_wheels/share/ellcurves/rank10 +6 -0
  293. sage_wheels/share/ellcurves/rank11 +6 -0
  294. sage_wheels/share/ellcurves/rank12 +1 -0
  295. sage_wheels/share/ellcurves/rank14 +1 -0
  296. sage_wheels/share/ellcurves/rank15 +1 -0
  297. sage_wheels/share/ellcurves/rank17 +1 -0
  298. sage_wheels/share/ellcurves/rank19 +1 -0
  299. sage_wheels/share/ellcurves/rank2 +2388 -0
  300. sage_wheels/share/ellcurves/rank20 +1 -0
  301. sage_wheels/share/ellcurves/rank21 +1 -0
  302. sage_wheels/share/ellcurves/rank22 +1 -0
  303. sage_wheels/share/ellcurves/rank23 +1 -0
  304. sage_wheels/share/ellcurves/rank24 +1 -0
  305. sage_wheels/share/ellcurves/rank28 +1 -0
  306. sage_wheels/share/ellcurves/rank3 +836 -0
  307. sage_wheels/share/ellcurves/rank4 +10 -0
  308. sage_wheels/share/ellcurves/rank5 +5 -0
  309. sage_wheels/share/ellcurves/rank6 +5 -0
  310. sage_wheels/share/ellcurves/rank7 +5 -0
  311. sage_wheels/share/ellcurves/rank8 +6 -0
  312. sage_wheels/share/ellcurves/rank9 +7 -0
@@ -0,0 +1,915 @@
1
+ # sage_setup: distribution = sagemath-schemes
2
+ """
3
+ `L`-series for elliptic curves
4
+
5
+ AUTHORS:
6
+
7
+ - Simon Spicer (2014-08-15): Added LFunctionZeroSum class interface method
8
+
9
+ - Jeroen Demeyer (2013-10-17): Compute L series with arbitrary precision
10
+ instead of floats.
11
+
12
+ - William Stein et al. (2005 and later)
13
+ """
14
+ # ****************************************************************************
15
+ # Copyright (C) 2005 William Stein
16
+ # Copyright (C) 2013 Jeroen Demeyer
17
+ #
18
+ # Distributed under the terms of the GNU General Public License (GPL)
19
+ # as published by the Free Software Foundation; either version 2 of
20
+ # the License, or (at your option) any later version.
21
+ # https://www.gnu.org/licenses/
22
+ # ****************************************************************************
23
+
24
+ from math import ceil, log, sqrt
25
+
26
+ from sage.misc.cachefunc import cached_method
27
+ from sage.misc.verbose import verbose
28
+ from sage.rings.rational_field import RationalField
29
+ from sage.rings.real_mpfr import RealField
30
+ from sage.structure.sage_object import SageObject
31
+
32
+
33
+ class Lseries_ell(SageObject):
34
+ """
35
+ An elliptic curve `L`-series.
36
+ """
37
+ def __init__(self, E) -> None:
38
+ r"""
39
+ Create an elliptic curve `L`-series.
40
+
41
+ EXAMPLES::
42
+
43
+ sage: EllipticCurve([1..5]).lseries()
44
+ Complex L-series of the Elliptic Curve
45
+ defined by y^2 + x*y + 3*y = x^3 + 2*x^2 + 4*x + 5 over Rational Field
46
+ """
47
+ self.__E = E
48
+
49
+ def elliptic_curve(self):
50
+ r"""
51
+ Return the elliptic curve that this `L`-series is attached to.
52
+
53
+ EXAMPLES::
54
+
55
+ sage: E = EllipticCurve('389a')
56
+ sage: L = E.lseries()
57
+ sage: L.elliptic_curve ()
58
+ Elliptic Curve defined by y^2 + y = x^3 + x^2 - 2*x over Rational Field
59
+ """
60
+ return self.__E
61
+
62
+ def taylor_series(self, a=1, prec=53, series_prec=6, var='z'):
63
+ r"""
64
+ Return the Taylor series of this `L`-series about `a` to
65
+ the given precision (in bits) and the number of terms.
66
+
67
+ The output is a series in ``var``, where you should view ``var`` as
68
+ equal to `s-a`. Thus this function returns the formal power
69
+ series whose coefficients are `L^{(n)}(a)/n!`.
70
+
71
+ INPUT:
72
+
73
+ - ``a`` -- complex number
74
+ - ``prec`` -- integer; precision in bits (default: 53)
75
+ - ``series_prec`` -- integer (default: 6)
76
+ - ``var`` -- variable (default: ``'z'``)
77
+
78
+ EXAMPLES::
79
+
80
+ sage: E = EllipticCurve('389a')
81
+ sage: L = E.lseries()
82
+ sage: L.taylor_series(series_prec=3) # abs tol 1e-14
83
+ -1.27685190980159e-23 + (7.23588070754027e-24)*z + 0.759316500288427*z^2 + O(z^3) # 32-bit
84
+ 1.34667664606157e-19 + (-7.63157535163667e-20)*z + 0.759316500288427*z^2 + O(z^3) # 64-bit
85
+ """
86
+ D = self.dokchitser(prec)
87
+ return D.taylor_series(a, series_prec, var)
88
+
89
+ def _repr_(self) -> str:
90
+ r"""
91
+ Return string representation of this `L`-series.
92
+
93
+ EXAMPLES::
94
+
95
+ sage: E = EllipticCurve('37a')
96
+ sage: L = E.lseries()
97
+ sage: L._repr_()
98
+ 'Complex L-series of the Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field'
99
+ """
100
+ return "Complex L-series of the %s" % self.__E
101
+
102
+ def dokchitser(self, prec=53,
103
+ max_imaginary_part=0,
104
+ max_asymp_coeffs=40,
105
+ algorithm=None):
106
+ r"""
107
+ Return an interface for computing with the `L`-series
108
+ of this elliptic curve.
109
+
110
+ This provides a way to compute Taylor expansions and higher
111
+ derivatives of `L`-series.
112
+
113
+ INPUT:
114
+
115
+ - ``prec`` -- integer (default: 53); bits precision
116
+
117
+ - ``max_imaginary_part`` -- real number (default: 0)
118
+
119
+ - ``max_asymp_coeffs`` -- integer (default: 40)
120
+
121
+ - ``algorithm`` -- string; ``'pari'`` (default), or ``'magma'``
122
+
123
+ The default algorithm is "pari", which returns an interface to Pari's
124
+ own general implementation of `L`-functions.
125
+
126
+ .. NOTE::
127
+
128
+ If algorithm='magma', then the precision is in digits rather
129
+ than bits and the object returned is a Magma `L`-series, which has
130
+ different functionality from the Sage `L`-series.
131
+
132
+ EXAMPLES::
133
+
134
+ sage: E = EllipticCurve('37a')
135
+ sage: L = E.lseries().dokchitser()
136
+ sage: L(2)
137
+ 0.381575408260711
138
+ sage: L = E.lseries().dokchitser(algorithm='magma') # optional - magma
139
+ sage: L.Evaluate(2) # optional - magma
140
+ 0.38157540826071121129371040958008663667709753398892116
141
+
142
+ If the curve has too large a conductor, one can still define
143
+ the `L`-series but some computations may not work::
144
+
145
+ sage: e = EllipticCurve([1,1,0,-63900,-1964465932632])
146
+ sage: L = e.lseries().dokchitser(15)
147
+ sage: L(2)
148
+ 0.8309
149
+
150
+ TESTS::
151
+
152
+ sage: E = EllipticCurve('37a')
153
+ sage: L = E.lseries().dokchitser(algorithm="zweistein")
154
+ Traceback (most recent call last):
155
+ ...
156
+ ValueError: algorithm must be "pari" or "magma"
157
+ """
158
+ if algorithm is None:
159
+ algorithm = 'pari'
160
+
161
+ if algorithm == 'magma':
162
+ from sage.interfaces.magma import magma
163
+ return magma(self.__E).LSeries(Precision=prec)
164
+
165
+ if algorithm == 'pari':
166
+ from sage.lfunctions.pari import LFunction, lfun_elliptic_curve
167
+ L = LFunction(lfun_elliptic_curve(self.__E), prec=prec)
168
+ L.rename('PARI L-function associated to %s' % self.__E)
169
+ return L
170
+
171
+ raise ValueError('algorithm must be "pari" or "magma"')
172
+
173
+ def sympow(self, n, prec):
174
+ r"""
175
+ Return `L( Sym^{(n)}(E, \text{edge}))` to ``prec`` digits
176
+ of precision.
177
+
178
+ INPUT:
179
+
180
+ - ``n`` -- integer
181
+
182
+ - ``prec`` -- integer
183
+
184
+ OUTPUT: string; real number to ``prec`` digits of precision as a string
185
+
186
+ .. NOTE::
187
+
188
+ Before using this function for the first time for
189
+ a given ``n``, you may have to type ``sympow('-new_data <n>')``,
190
+ where ``<n>`` is replaced by your value of ``n``. This
191
+ command takes a long time to run.
192
+
193
+ EXAMPLES::
194
+
195
+ sage: E = EllipticCurve('37a')
196
+ sage: a = E.lseries().sympow(2,16) # not tested - requires precomputing "sympow('-new_data 2')"
197
+ sage: a # not tested
198
+ '2.492262044273650E+00'
199
+ sage: RR(a) # not tested
200
+ 2.49226204427365
201
+ """
202
+ from sage.lfunctions.sympow import sympow
203
+ return sympow.L(self.__E, n, prec)
204
+
205
+ def sympow_derivs(self, n, prec, d):
206
+ r"""
207
+ Return `0`-th to `d`-th derivatives of `L( Sym^{(n)}(E,
208
+ \text{edge}))` to ``prec`` digits of precision.
209
+
210
+ INPUT:
211
+
212
+ - ``n`` -- integer
213
+
214
+ - ``prec`` -- integer
215
+
216
+ - ``d`` -- integer
217
+
218
+ OUTPUT: string; exactly as output by sympow
219
+
220
+ .. NOTE::
221
+
222
+ To use this function you may have to run a few commands
223
+ like ``sympow('-new_data 1d2')``, each which takes a few
224
+ minutes. If this function fails it will indicate what
225
+ commands have to be run.
226
+
227
+ EXAMPLES::
228
+
229
+ sage: E = EllipticCurve('37a')
230
+ sage: print(E.lseries().sympow_derivs(1,16,2)) # not tested -- requires precomputing "sympow('-new_data 2')"
231
+ sympow 1.018 RELEASE (c) Mark Watkins --- see README and COPYING for details
232
+ Minimal model of curve is [0,0,1,-1,0]
233
+ At 37: Inertia Group is C1 MULTIPLICATIVE REDUCTION
234
+ Conductor is 37
235
+ sp 1: Conductor at 37 is 1+0, root number is 1
236
+ sp 1: Euler factor at 37 is 1+1*x
237
+ 1st sym power conductor is 37, global root number is -1
238
+ NT 1d0: 35
239
+ NT 1d1: 32
240
+ NT 1d2: 28
241
+ Maximal number of terms is 35
242
+ Done with small primes 1049
243
+ Computed: 1d0 1d1 1d2
244
+ Checked out: 1d1
245
+ 1n0: 3.837774351482055E-01
246
+ 1w0: 3.777214305638848E-01
247
+ 1n1: 3.059997738340522E-01
248
+ 1w1: 3.059997738340524E-01
249
+ 1n2: 1.519054910249753E-01
250
+ 1w2: 1.545605024269432E-01
251
+ """
252
+ from sage.lfunctions.sympow import sympow
253
+ return sympow.Lderivs(self.__E, n, prec, d)
254
+
255
+ def zeros(self, n):
256
+ r"""
257
+ Return the imaginary parts of the first `n` nontrivial zeros
258
+ on the critical line of the `L`-function in the upper half
259
+ plane, as 32-bit reals.
260
+
261
+ EXAMPLES::
262
+
263
+ sage: E = EllipticCurve('37a')
264
+ sage: E.lseries().zeros(2) # needs lcalc
265
+ [0.000000000, 5.00317001]
266
+
267
+ sage: a = E.lseries().zeros(20) # long time # needs lcalc
268
+ sage: point([(1,x) for x in a]) # long time # needs lcalc sage.plot
269
+ Graphics object consisting of 1 graphics primitive
270
+
271
+ AUTHORS: Uses Rubinstein's L-functions calculator.
272
+ """
273
+ from sage.lfunctions.lcalc import lcalc
274
+ return lcalc.zeros(n, L=self.__E)
275
+
276
+ def zeros_in_interval(self, x, y, stepsize):
277
+ r"""
278
+ Return the imaginary parts of (most of) the nontrivial zeros
279
+ on the critical line `\Re(s)=1` with positive imaginary part
280
+ between ``x`` and ``y``, along with a technical quantity for each.
281
+
282
+ INPUT:
283
+
284
+ - ``x`` -- positive floating point number
285
+ - ``y`` -- positive floating point number
286
+ - ``stepsize`` -- positive floating point number
287
+
288
+ OUTPUT:
289
+
290
+ - list of pairs ``(zero, S(T))``.
291
+
292
+ Rubinstein writes: The first column outputs the imaginary part
293
+ of the zero, the second column a quantity related to ``S(T)`` (it
294
+ increases roughly by 2 whenever a sign change, i.e. pair of
295
+ zeros, is missed). Higher up the critical strip you should use
296
+ a smaller stepsize so as not to miss zeros.
297
+
298
+ EXAMPLES::
299
+
300
+ sage: E = EllipticCurve('37a')
301
+ sage: E.lseries().zeros_in_interval(6, 10, 0.1) # long time, needs lcalc
302
+ [(6.87039122, 0.248922780), (8.01433081, -0.140168533), (9.93309835, -0.129943029)]
303
+ """
304
+ from sage.lfunctions.lcalc import lcalc
305
+ return lcalc.zeros_in_interval(x, y, stepsize, L=self.__E)
306
+
307
+ def values_along_line(self, s0, s1, number_samples):
308
+ r"""
309
+ Return values of `L(E, s)` at ``number_samples``
310
+ equally-spaced sample points along the line from `s_0` to
311
+ `s_1` in the complex plane.
312
+
313
+ .. NOTE::
314
+
315
+ The `L`-series is normalized so that the center of the
316
+ critical strip is 1.
317
+
318
+ INPUT:
319
+
320
+ - ``s0``, ``s1`` -- complex numbers
321
+ - ``number_samples`` -- integer
322
+
323
+ OUTPUT:
324
+
325
+ list -- list of pairs (`s`, `L(E,s)`), where the `s` are
326
+ equally spaced sampled points on the line from
327
+ ``s0`` to ``s1``.
328
+
329
+ EXAMPLES::
330
+
331
+ sage: E = EllipticCurve('37a')
332
+ sage: E.lseries().values_along_line(1, 0.5 + 20*I, 5) # needs lcalc
333
+ [(0.500000000, ...),
334
+ (0.400000000 + 4.00000000*I, 3.31920245 - 2.60028054*I),
335
+ (0.300000000 + 8.00000000*I, -0.886341185 - 0.422640337*I),
336
+ (0.200000000 + 12.0000000*I, -3.50558936 - 0.108531690*I),
337
+ (0.100000000 + 16.0000000*I, -3.87043288 - 1.88049411*I)]
338
+ """
339
+ from sage.lfunctions.lcalc import lcalc
340
+ return lcalc.values_along_line(s0-RationalField()('1/2'),
341
+ s1-RationalField()('1/2'),
342
+ number_samples, L=self.__E)
343
+
344
+ def twist_values(self, s, dmin, dmax):
345
+ r"""
346
+ Return values of `L(E, s, \chi_d)` for each quadratic
347
+ character `\chi_d` for `d_{\min} \leq d \leq d_{\max}`.
348
+
349
+ .. NOTE::
350
+
351
+ The `L`-series is normalized so that the center of the
352
+ critical strip is 1.
353
+
354
+ INPUT:
355
+
356
+ - ``s`` -- complex numbers
357
+
358
+ - ``dmin`` -- integer
359
+
360
+ - ``dmax`` -- integer
361
+
362
+ OUTPUT:
363
+
364
+ - list of pairs `(d, L(E, s, \chi_d))`
365
+
366
+ EXAMPLES::
367
+
368
+ sage: # needs lcalc
369
+ sage: E = EllipticCurve('37a')
370
+ sage: vals = E.lseries().twist_values(1, -12, -4)
371
+ sage: vals[0][0]
372
+ -11
373
+ sage: vals[0][1] # abs tol 1e-8
374
+ 1.47824342 + 0.0*I
375
+ sage: vals[1][0]
376
+ -8
377
+ sage: vals[1][1] # abs tol 1e-8
378
+ 0.0 + 0.0*I
379
+ sage: vals[2][0]
380
+ -7
381
+ sage: vals[2][1] # abs tol 1e-8
382
+ 1.85307619 + 0.0*I
383
+ sage: vals[3][0]
384
+ -4
385
+ sage: vals[3][1] # abs tol 1e-8
386
+ 2.45138938 + 0.0*I
387
+ sage: F = E.quadratic_twist(-8)
388
+ sage: F.rank()
389
+ 1
390
+ sage: F = E.quadratic_twist(-7)
391
+ sage: F.rank()
392
+ 0
393
+ """
394
+ from sage.lfunctions.lcalc import lcalc
395
+ return lcalc.twist_values(s - RationalField()('1/2'), dmin, dmax, L=self.__E)
396
+
397
+ def twist_zeros(self, n, dmin, dmax):
398
+ r"""
399
+ Return first `n` real parts of nontrivial zeros of
400
+ `L(E,s,\chi_d)` for each quadratic character `\chi_d` with
401
+ `d_{\min} \leq d \leq d_{\max}`.
402
+
403
+ .. NOTE::
404
+
405
+ The `L`-series is normalized so that the center of the
406
+ critical strip is 1.
407
+
408
+ INPUT:
409
+
410
+ - ``n`` -- integer
411
+
412
+ - ``dmin`` -- integer
413
+
414
+ - ``dmax`` -- integer
415
+
416
+ OUTPUT:
417
+
418
+ - ``dict`` -- keys are the discriminants `d`, and
419
+ values are list of corresponding zeros
420
+
421
+ EXAMPLES::
422
+
423
+ sage: E = EllipticCurve('37a')
424
+ sage: E.lseries().twist_zeros(3, -4, -3) # long time, needs lcalc
425
+ {-4: [1.60813783, 2.96144840, 3.89751747], -3: [2.06170900, 3.48216881, 4.45853219]}
426
+ """
427
+ from sage.lfunctions.lcalc import lcalc
428
+ return lcalc.twist_zeros(n, dmin, dmax, L=self.__E)
429
+
430
+ def at1(self, k=None, prec=None):
431
+ r"""
432
+ Compute `L(E,1)` using `k` terms of the series for `L(E,1)` as
433
+ explained in Section 7.5.3 of Henri Cohen's book *A Course in
434
+ Computational Algebraic Number Theory*. If the argument `k`
435
+ is not specified, then it defaults to `\sqrt{N}`, where `N` is
436
+ the conductor.
437
+
438
+ INPUT:
439
+
440
+ - ``k`` -- number of terms of the series; if zero or ``None``,
441
+ use `k = \sqrt{N}`, where `N` is the conductor
442
+
443
+ - ``prec`` -- numerical precision in bits; if zero or ``None``,
444
+ use a reasonable automatic default
445
+
446
+ OUTPUT:
447
+
448
+ A tuple of real numbers ``(L, err)`` where ``L`` is an
449
+ approximation for `L(E,1)` and ``err`` is a bound on the error
450
+ in the approximation.
451
+
452
+ This function is disjoint from the PARI :pari:`elllseries`
453
+ command, which is for a similar purpose. To use that command
454
+ (via the PARI C library), simply type
455
+ ``E.pari_mincurve().elllseries(1)``.
456
+
457
+ ALGORITHM:
458
+
459
+ - Compute the root number eps. If it is -1, return 0.
460
+
461
+ - Compute the Fourier coefficients `a_n`, for `n` up to and
462
+ including `k`.
463
+
464
+ - Compute the sum
465
+
466
+ .. MATH::
467
+
468
+ 2 \cdot \sum_{n=1}^{k} \frac{a_n}{n} \cdot \exp(-2*pi*n/\sqrt{N}),
469
+
470
+ where `N` is the conductor of `E`.
471
+
472
+ - Compute a bound on the tail end of the series, which is
473
+
474
+ .. MATH::
475
+
476
+ 2 e^{-2 \pi (k+1) / \sqrt{N}} / (1 - e^{-2 \pi/\sqrt{N}}).
477
+
478
+ For a proof see [Grigov-Jorza-Patrascu-Patrikis-Stein].
479
+
480
+ EXAMPLES::
481
+
482
+ sage: L, err = EllipticCurve('11a1').lseries().at1()
483
+ sage: L, err
484
+ (0.253804, 0.000181444)
485
+ sage: parent(L)
486
+ Real Field with 24 bits of precision
487
+ sage: E = EllipticCurve('37b')
488
+ sage: E.lseries().at1()
489
+ (0.7257177, 0.000800697)
490
+ sage: E.lseries().at1(100)
491
+ (0.7256810619361527823362055410263965487367603361763, 1.52469e-45)
492
+ sage: L,err = E.lseries().at1(100, prec=128)
493
+ sage: L
494
+ 0.72568106193615278233620554102639654873
495
+ sage: parent(L)
496
+ Real Field with 128 bits of precision
497
+ sage: err
498
+ 1.70693e-37
499
+ sage: parent(err)
500
+ Real Field with 24 bits of precision and rounding RNDU
501
+
502
+ Rank 1 through 3 elliptic curves::
503
+
504
+ sage: E = EllipticCurve('37a1')
505
+ sage: E.lseries().at1()
506
+ (0.0000000, 0.000000)
507
+ sage: E = EllipticCurve('389a1')
508
+ sage: E.lseries().at1()
509
+ (-0.001769566, 0.00911776)
510
+ sage: E = EllipticCurve('5077a1')
511
+ sage: E.lseries().at1()
512
+ (0.0000000, 0.000000)
513
+ """
514
+ sqrtN = sqrt(self.__E.conductor())
515
+ if k:
516
+ k = int(k)
517
+ else:
518
+ k = int(ceil(sqrtN))
519
+
520
+ if prec:
521
+ prec = int(prec)
522
+ else:
523
+ # Use the same precision as deriv_at1() below for
524
+ # consistency
525
+ prec = int(9.065*k/sqrtN + 1.443*log(k)) + 12
526
+ R = RealField(prec)
527
+ # Compute error term with bounded precision of 24 bits and
528
+ # round towards +infinity
529
+ Rerror = RealField(24, rnd='RNDU')
530
+
531
+ if self.__E.root_number() == -1:
532
+ return (R.zero(), Rerror.zero())
533
+
534
+ an = self.__E.anlist(k) # list of Sage Integers
535
+ pi = R.pi()
536
+ sqrtN = R(self.__E.conductor()).sqrt()
537
+
538
+ z = (-2*pi/sqrtN).exp()
539
+ zpow = z
540
+ # Compute series sum and accumulate floating point errors
541
+ L = R.zero()
542
+ error = Rerror.zero()
543
+
544
+ for n in range(1, k + 1):
545
+ term = (zpow * an[n])/n
546
+ zpow *= z
547
+ L += term
548
+ # We express relative error in units of epsilon, where
549
+ # epsilon is a number divided by 2^precision.
550
+ # Instead of multiplying the error by 2 after the loop
551
+ # (to account for L *= 2), we already multiply it now.
552
+ #
553
+ # For multiplication and division, the relative error
554
+ # in epsilons is bounded by (1+e)^n - 1, where n is the
555
+ # number of operations (assuming exact inputs).
556
+ # exp(x) additionally multiplies this error by abs(x) and
557
+ # adds one epsilon. The inputs pi and sqrtN each contribute
558
+ # another epsilon.
559
+ # Assuming that 2*pi/sqrtN <= 2, the relative error for z is
560
+ # 7 epsilon. This implies a relative error of (8n-1) epsilon
561
+ # for zpow. We add 2 for the computation of term and 1/2 to
562
+ # compensate for the approximation (1+e)^n = 1+ne.
563
+ #
564
+ # The error of the addition is at most half an ulp of the
565
+ # result.
566
+ #
567
+ # Multiplying everything by two gives:
568
+ error += term.epsilon(Rerror)*(16*n + 3) + L.ulp(Rerror)
569
+ L *= 2
570
+
571
+ # Add series error (we use (-2)/(z-1) instead of 2/(1-z)
572
+ # because this causes 1/(1-z) to be rounded up)
573
+ error += ((-2)*Rerror(zpow)) / Rerror(z - 1)
574
+ return (L, error)
575
+
576
+ def deriv_at1(self, k=None, prec=None):
577
+ r"""
578
+ Compute `L'(E,1)` using `k` terms of the series for `L'(E,1)`,
579
+ under the assumption that `L(E,1) = 0`.
580
+
581
+ The algorithm used is from Section 7.5.3 of Henri Cohen's book
582
+ *A Course in Computational Algebraic Number Theory*.
583
+
584
+ INPUT:
585
+
586
+ - ``k`` -- number of terms of the series; if zero or ``None``,
587
+ use `k = \sqrt{N}`, where `N` is the conductor
588
+
589
+ - ``prec`` -- numerical precision in bits; if zero or ``None``,
590
+ use a reasonable automatic default
591
+
592
+ OUTPUT:
593
+
594
+ A tuple of real numbers ``(L1, err)`` where ``L1`` is an
595
+ approximation for `L'(E,1)` and ``err`` is a bound on the error
596
+ in the approximation.
597
+
598
+ .. WARNING::
599
+
600
+ This function only makes sense if `L(E)` has positive order
601
+ of vanishing at 1, or equivalently if `L(E,1) = 0`.
602
+
603
+ ALGORITHM:
604
+
605
+ - Compute the root number eps. If it is 1, return 0.
606
+
607
+ - Compute the Fourier coefficients `a_n`, for `n` up to and
608
+ including `k`.
609
+
610
+ - Compute the sum
611
+
612
+ .. MATH::
613
+
614
+ 2 \cdot \sum_{n=1}^{k} (a_n / n) \cdot E_1(2 \pi n/\sqrt{N}),
615
+
616
+ where `N` is the conductor of `E`, and `E_1` is the
617
+ exponential integral function.
618
+
619
+ - Compute a bound on the tail end of the series, which is
620
+
621
+ .. MATH::
622
+
623
+ 2 e^{-2 \pi (k+1) / \sqrt{N}} / (1 - e^{-2 \pi/\sqrt{N}}).
624
+
625
+ For a proof see [Grigorov-Jorza-Patrascu-Patrikis-Stein]. This
626
+ is exactly the same as the bound for the approximation to
627
+ `L(E,1)` produced by :meth:`at1`.
628
+
629
+ EXAMPLES::
630
+
631
+ sage: E = EllipticCurve('37a')
632
+ sage: E.lseries().deriv_at1() # needs sage.symbolic
633
+ (0.3059866, 0.000801045)
634
+ sage: E.lseries().deriv_at1(100) # needs sage.symbolic
635
+ (0.3059997738340523018204836833216764744526377745903, 1.52493e-45)
636
+ sage: E.lseries().deriv_at1(1000) # needs sage.symbolic
637
+ (0.305999773834052301820483683321676474452637774590771998..., 2.75031e-449)
638
+
639
+ With less numerical precision, the error is bounded by numerical accuracy::
640
+
641
+ sage: # needs sage.symbolic
642
+ sage: L, err = E.lseries().deriv_at1(100, prec=64)
643
+ sage: L, err
644
+ (0.305999773834052302, 5.55318e-18)
645
+ sage: parent(L)
646
+ Real Field with 64 bits of precision
647
+ sage: parent(err)
648
+ Real Field with 24 bits of precision and rounding RNDU
649
+
650
+ Rank 2 and rank 3 elliptic curves::
651
+
652
+ sage: E = EllipticCurve('389a1')
653
+ sage: E.lseries().deriv_at1() # needs sage.symbolic
654
+ (0.0000000, 0.000000)
655
+ sage: E = EllipticCurve((1, 0, 1, -131, 558)) # curve 59450i1
656
+ sage: E.lseries().deriv_at1() # needs sage.symbolic
657
+ (-0.00010911444, 0.142428)
658
+ sage: E.lseries().deriv_at1(4000) # needs sage.symbolic
659
+ (6.990...e-50, 1.31318e-43)
660
+ """
661
+ sqrtN = sqrt(self.__E.conductor())
662
+ if k:
663
+ k = int(k)
664
+ else:
665
+ k = int(ceil(sqrtN))
666
+
667
+ if prec:
668
+ prec = int(prec)
669
+ else:
670
+ # Estimate number of bits for the computation, based on error
671
+ # estimate below (the denominator of that error is close enough
672
+ # to 1 that we can ignore it).
673
+ # 9.065 = 2*Pi/log(2)
674
+ # 1.443 = 1/log(2)
675
+ # 12 is an arbitrary extra number of bits (it is chosen
676
+ # such that the precision is 24 bits when the conductor
677
+ # equals 11 and k is the default value 4)
678
+ prec = int(9.065*k/sqrtN + 1.443*log(k)) + 12
679
+ R = RealField(prec)
680
+ # Compute error term with bounded precision of 24 bits and
681
+ # round towards +infinity
682
+ Rerror = RealField(24, rnd='RNDU')
683
+
684
+ if self.__E.root_number() == 1:
685
+ # Order of vanishing at 1 of L(E) is even and assumed to be
686
+ # positive, so L'(E,1) = 0.
687
+ return (R.zero(), Rerror.zero())
688
+
689
+ from sage.functions.exp_integral import exponential_integral_1
690
+
691
+ an = self.__E.anlist(k) # list of Sage Integers
692
+ pi = R.pi()
693
+ sqrtN = R(self.__E.conductor()).sqrt()
694
+ v = exponential_integral_1(2*pi/sqrtN, k)
695
+
696
+ # Compute series sum and accumulate floating point errors
697
+ L = R.zero()
698
+ error = Rerror.zero()
699
+ # Sum of |an[n]|/n
700
+ sumann = Rerror.zero()
701
+
702
+ for n in range(1, k + 1):
703
+ term = (v[n-1] * an[n])/n
704
+ L += term
705
+ error += term.epsilon(Rerror)*5 + L.ulp(Rerror)
706
+ sumann += Rerror(an[n].abs())/n
707
+ L *= 2
708
+
709
+ # Add error term for exponential_integral_1() errors.
710
+ # Absolute error for 2*v[i] is 4*max(1, v[0])*2^-prec
711
+ if v[0] > 1.0:
712
+ sumann *= Rerror(v[0])
713
+ error += (sumann >> (prec - 2))
714
+
715
+ # Add series error (we use (-2)/(z-1) instead of 2/(1-z)
716
+ # because this causes 1/(1-z) to be rounded up)
717
+ z = (-2*pi/sqrtN).exp()
718
+ zpow = ((-2*(k+1))*pi/sqrtN).exp()
719
+ error += ((-2)*Rerror(zpow)) / Rerror(z - 1)
720
+ return (L, error)
721
+
722
+ def __call__(self, s):
723
+ r"""
724
+ Return the value of the `L`-series of the elliptic curve E at s,
725
+ where s must be a real number.
726
+
727
+ .. NOTE::
728
+
729
+ If the conductor of the curve is large, say `>10^{12}`,
730
+ then this function will take a very long time, since it
731
+ uses an `O(\sqrt{N})` algorithm.
732
+
733
+ EXAMPLES::
734
+
735
+ sage: E = EllipticCurve([1,2,3,4,5])
736
+ sage: L = E.lseries()
737
+ sage: L(1)
738
+ 0.000000000000000
739
+ sage: L(1.1)
740
+ 0.285491007678148
741
+ sage: L(1.1 + I)
742
+ 0.174851377216615 + 0.816965038124457*I
743
+ """
744
+ return self.dokchitser()(s)
745
+
746
+ def L1_vanishes(self):
747
+ r"""
748
+ Return whether or not `L(E,1) = 0`. The result is provably
749
+ correct if the Manin constant of the associated optimal
750
+ quotient is <= 2. This hypothesis on the Manin constant
751
+ is true for all curves of conductor <= 40000 (by Cremona) and
752
+ all semistable curves (i.e., squarefree conductor).
753
+
754
+ ALGORITHM: see :meth:`L_ratio`.
755
+
756
+ EXAMPLES::
757
+
758
+ sage: # needs sage.graphs
759
+ sage: E = EllipticCurve([0, -1, 1, -10, -20]) # 11A = X_0(11)
760
+ sage: E.lseries().L1_vanishes()
761
+ False
762
+ sage: E = EllipticCurve([0, -1, 1, 0, 0]) # X_1(11)
763
+ sage: E.lseries().L1_vanishes()
764
+ False
765
+ sage: E = EllipticCurve([0, 0, 1, -1, 0]) # 37A (rank 1)
766
+ sage: E.lseries().L1_vanishes()
767
+ True
768
+ sage: E = EllipticCurve([0, 1, 1, -2, 0]) # 389A (rank 2)
769
+ sage: E.lseries().L1_vanishes()
770
+ True
771
+ sage: E = EllipticCurve([0, 0, 1, -38, 90]) # 361A (CM curve))
772
+ sage: E.lseries().L1_vanishes()
773
+ True
774
+ sage: E = EllipticCurve([0,-1,1,-2,-1]) # 141C (13-isogeny)
775
+ sage: E.lseries().L1_vanishes()
776
+ False
777
+
778
+ AUTHORS: William Stein, 2005-04-20.
779
+ """
780
+ return self.L_ratio() == 0
781
+
782
+ @cached_method
783
+ def L_ratio(self):
784
+ r"""
785
+ Return the ratio `L(E,1) / \Omega` as an exact rational number.
786
+
787
+ The result is *provably* correct if the Manin
788
+ constant of the associated optimal quotient is `\leq 2`. This
789
+ hypothesis on the Manin constant is true for all semistable
790
+ curves (i.e., squarefree conductor), by a theorem of Mazur
791
+ from his *Rational Isogenies of Prime Degree* paper.
792
+
793
+ EXAMPLES::
794
+
795
+ sage: # needs sage.graphs
796
+ sage: E = EllipticCurve([0, -1, 1, -10, -20]) # 11A = X_0(11)
797
+ sage: E.lseries().L_ratio()
798
+ 1/5
799
+ sage: E = EllipticCurve([0, -1, 1, 0, 0]) # X_1(11)
800
+ sage: E.lseries().L_ratio()
801
+ 1/25
802
+ sage: E = EllipticCurve([0, 0, 1, -1, 0]) # 37A (rank 1)
803
+ sage: E.lseries().L_ratio()
804
+ 0
805
+ sage: E = EllipticCurve([0, 1, 1, -2, 0]) # 389A (rank 2)
806
+ sage: E.lseries().L_ratio()
807
+ 0
808
+ sage: E = EllipticCurve([0, 0, 1, -38, 90]) # 361A (CM curve))
809
+ sage: E.lseries().L_ratio()
810
+ 0
811
+ sage: E = EllipticCurve([0,-1,1,-2,-1]) # 141C (13-isogeny)
812
+ sage: E.lseries().L_ratio()
813
+ 1
814
+ sage: E = EllipticCurve(RationalField(), [1, 0, 0, 1/24624, 1/886464])
815
+ sage: E.lseries().L_ratio()
816
+ 2
817
+
818
+ See :issue:`3651` and :issue:`15299`::
819
+
820
+ sage: # needs sage.graphs
821
+ sage: EllipticCurve([0,0,0,-193^2,0]).sha().an()
822
+ 4
823
+ sage: EllipticCurve([1, 0, 1, -131, 558]).sha().an() # long time
824
+ 1.00000000000000
825
+
826
+ ALGORITHM: Compute the root number. If it is -1 then `L(E,s)`
827
+ vanishes to odd order at 1, hence vanishes. If it is +1, use
828
+ a result about modular symbols and Mazur's *Rational Isogenies*
829
+ paper to determine a provably correct bound (assuming Manin
830
+ constant is <= 2) so that we can determine whether `L(E,1) = 0`.
831
+
832
+ AUTHORS: William Stein, 2005-04-20.
833
+ """
834
+ if not self.__E.is_minimal():
835
+ return self.__E.minimal_model().lseries().L_ratio()
836
+
837
+ QQ = RationalField()
838
+ if self.__E.root_number() == -1:
839
+ return QQ.zero()
840
+
841
+ # Even root number. Decide if L(E,1) = 0. If E is a modular
842
+ # *OPTIMAL* quotient of J_0(N) elliptic curve, we know that T *
843
+ # L(E,1)/omega is an integer n, where T is the order of the
844
+ # image of the rational torsion point (0)-(oo) in E(Q), and
845
+ # omega is the least real Neron period. (This is proved in my
846
+ # Ph.D. thesis, but is probably well known.) We can easily
847
+ # compute omega to very high precision using AGM. So to prove
848
+ # that L(E,1) = 0 we compute T/omega * L(E,1) to sufficient
849
+ # precision to determine it as an integer. If eps is the
850
+ # error in computation of L(E,1), then the error in computing
851
+ # the product is (2T/Omega_E) * eps, and we need this to be
852
+ # less than 0.5, i.e.,
853
+ # (2T/Omega_E) * eps < 0.5,
854
+ # so
855
+ # eps < 0.5 * Omega_E / (2T) = Omega_E / (4*T).
856
+ #
857
+ # Since in general E need not be optimal, we have to choose
858
+ # eps = Omega_E/(8*t*B), where t is the exponent of E(Q)_tor,
859
+ # and is a multiple of the degree of an isogeny between E
860
+ # and the optimal curve.
861
+ #
862
+ # NOTE: We *do* have to worry about the Manin constant, since
863
+ # we are using the Neron model to compute omega, not the
864
+ # newform. My theorem replaces the omega above by omega/c,
865
+ # where c is the Manin constant, and the bound must be
866
+ # correspondingly smaller. If the level is square free, then
867
+ # the Manin constant is 1 or 2, so there's no problem (since
868
+ # we took 8 instead of 4 in the denominator). If the level
869
+ # is divisible by a square, then the Manin constant could
870
+ # be a divisible by an arbitrary power of that prime, except
871
+ # that Edixhoven claims the primes that appear are <= 7.
872
+
873
+ t = self.__E.torsion_subgroup().order()
874
+ omega = self.__E.period_lattice().basis()[0]
875
+ d = self.__E._multiple_of_degree_of_isogeny_to_optimal_curve()
876
+ C = 8 * d * t
877
+ eps = omega / C
878
+
879
+ sqrtN = 2 * self.__E.conductor().isqrt()
880
+ k = sqrtN + 10
881
+ while True:
882
+ L1, error_bound = self.at1(k)
883
+ if error_bound < eps:
884
+ n = (L1 * C / omega).round()
885
+ quo = QQ((n, C))
886
+ return quo / self.__E.real_components()
887
+ k += sqrtN
888
+ verbose("Increasing precision to %s terms." % k)
889
+
890
+ def zero_sums(self, N=None):
891
+ r"""
892
+ Return an ``LFunctionZeroSum`` class object for efficient computation
893
+ of sums over the zeros of ``self``.
894
+
895
+ This can be used to bound analytic rank from above without
896
+ having to compute with the `L`-series directly.
897
+
898
+ INPUT:
899
+
900
+ - ``N`` -- (default: ``None``) if not ``None``, the conductor of the
901
+ elliptic curve attached to ``self``. This is passable so that zero
902
+ sum computations can be done on curves for which the conductor
903
+ has been precomputed.
904
+
905
+ OUTPUT: a ``LFunctionZeroSum_EllipticCurve`` instance
906
+
907
+ EXAMPLES::
908
+
909
+ sage: E = EllipticCurve("5077a")
910
+ sage: E.lseries().zero_sums() # needs sage.symbolic
911
+ Zero sum estimator for L-function attached to
912
+ Elliptic Curve defined by y^2 + y = x^3 - 7*x + 6 over Rational Field
913
+ """
914
+ from sage.lfunctions.zero_sums import LFunctionZeroSum
915
+ return LFunctionZeroSum(self.__E, N=N)