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.

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