passagemath-schemes 10.6.47__cp312-cp312-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 (311) 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.47.dist-info/METADATA +204 -0
  7. passagemath_schemes-10.6.47.dist-info/METADATA.bak +205 -0
  8. passagemath_schemes-10.6.47.dist-info/RECORD +311 -0
  9. passagemath_schemes-10.6.47.dist-info/WHEEL +6 -0
  10. passagemath_schemes-10.6.47.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-312-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-312-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-312-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-312-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-312-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-312-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-312-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-312-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_nf.py +1241 -0
  154. sage/modular/modsym/relation_matrix.py +591 -0
  155. sage/modular/modsym/relation_matrix_pyx.cpython-312-darwin.so +0 -0
  156. sage/modular/modsym/relation_matrix_pyx.pyx +108 -0
  157. sage/modular/modsym/space.py +2468 -0
  158. sage/modular/modsym/subspace.py +455 -0
  159. sage/modular/modsym/tests.py +375 -0
  160. sage/modular/multiple_zeta.py +2632 -0
  161. sage/modular/multiple_zeta_F_algebra.py +786 -0
  162. sage/modular/overconvergent/all.py +6 -0
  163. sage/modular/overconvergent/genus0.py +1878 -0
  164. sage/modular/overconvergent/hecke_series.py +1187 -0
  165. sage/modular/overconvergent/weightspace.py +778 -0
  166. sage/modular/pollack_stevens/all.py +4 -0
  167. sage/modular/pollack_stevens/distributions.py +874 -0
  168. sage/modular/pollack_stevens/fund_domain.py +1572 -0
  169. sage/modular/pollack_stevens/manin_map.py +859 -0
  170. sage/modular/pollack_stevens/modsym.py +1593 -0
  171. sage/modular/pollack_stevens/padic_lseries.py +417 -0
  172. sage/modular/pollack_stevens/sigma0.py +534 -0
  173. sage/modular/pollack_stevens/space.py +1076 -0
  174. sage/modular/quasimodform/all.py +3 -0
  175. sage/modular/quasimodform/element.py +845 -0
  176. sage/modular/quasimodform/ring.py +828 -0
  177. sage/modular/quatalg/all.py +3 -0
  178. sage/modular/quatalg/brandt.py +1642 -0
  179. sage/modular/ssmod/all.py +8 -0
  180. sage/modular/ssmod/ssmod.py +827 -0
  181. sage/rings/all__sagemath_schemes.py +1 -0
  182. sage/rings/polynomial/all__sagemath_schemes.py +1 -0
  183. sage/rings/polynomial/binary_form_reduce.py +585 -0
  184. sage/schemes/all.py +41 -0
  185. sage/schemes/berkovich/all.py +6 -0
  186. sage/schemes/berkovich/berkovich_cp_element.py +2582 -0
  187. sage/schemes/berkovich/berkovich_space.py +748 -0
  188. sage/schemes/curves/affine_curve.py +2928 -0
  189. sage/schemes/curves/all.py +33 -0
  190. sage/schemes/curves/closed_point.py +434 -0
  191. sage/schemes/curves/constructor.py +381 -0
  192. sage/schemes/curves/curve.py +542 -0
  193. sage/schemes/curves/plane_curve_arrangement.py +1283 -0
  194. sage/schemes/curves/point.py +463 -0
  195. sage/schemes/curves/projective_curve.py +3026 -0
  196. sage/schemes/curves/zariski_vankampen.py +1932 -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 +1036 -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 +1102 -0
  208. sage/schemes/elliptic_curves/constructor.py +1552 -0
  209. sage/schemes/elliptic_curves/ec_database.py +175 -0
  210. sage/schemes/elliptic_curves/ell_curve_isogeny.py +3972 -0
  211. sage/schemes/elliptic_curves/ell_egros.py +459 -0
  212. sage/schemes/elliptic_curves/ell_field.py +2836 -0
  213. sage/schemes/elliptic_curves/ell_finite_field.py +3359 -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 +4787 -0
  220. sage/schemes/elliptic_curves/ell_rational_field.py +7368 -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 +1669 -0
  227. sage/schemes/elliptic_curves/gp_simon.py +152 -0
  228. sage/schemes/elliptic_curves/heegner.py +7335 -0
  229. sage/schemes/elliptic_curves/height.py +2109 -0
  230. sage/schemes/elliptic_curves/hom.py +1406 -0
  231. sage/schemes/elliptic_curves/hom_composite.py +934 -0
  232. sage/schemes/elliptic_curves/hom_frobenius.py +522 -0
  233. sage/schemes/elliptic_curves/hom_scalar.py +531 -0
  234. sage/schemes/elliptic_curves/hom_sum.py +682 -0
  235. sage/schemes/elliptic_curves/hom_velusqrt.py +1290 -0
  236. sage/schemes/elliptic_curves/homset.py +271 -0
  237. sage/schemes/elliptic_curves/isogeny_class.py +1521 -0
  238. sage/schemes/elliptic_curves/isogeny_small_degree.py +2797 -0
  239. sage/schemes/elliptic_curves/jacobian.py +237 -0
  240. sage/schemes/elliptic_curves/kodaira_symbol.py +344 -0
  241. sage/schemes/elliptic_curves/kraus.py +1014 -0
  242. sage/schemes/elliptic_curves/lseries_ell.py +943 -0
  243. sage/schemes/elliptic_curves/mod5family.py +105 -0
  244. sage/schemes/elliptic_curves/mod_poly.py +197 -0
  245. sage/schemes/elliptic_curves/mod_sym_num.cpython-312-darwin.so +0 -0
  246. sage/schemes/elliptic_curves/mod_sym_num.pyx +3796 -0
  247. sage/schemes/elliptic_curves/modular_parametrization.py +305 -0
  248. sage/schemes/elliptic_curves/padic_lseries.py +1793 -0
  249. sage/schemes/elliptic_curves/padics.py +1816 -0
  250. sage/schemes/elliptic_curves/period_lattice.py +2234 -0
  251. sage/schemes/elliptic_curves/period_lattice_region.cpython-312-darwin.so +0 -0
  252. sage/schemes/elliptic_curves/period_lattice_region.pyx +722 -0
  253. sage/schemes/elliptic_curves/saturation.py +715 -0
  254. sage/schemes/elliptic_curves/sha_tate.py +1158 -0
  255. sage/schemes/elliptic_curves/weierstrass_morphism.py +1117 -0
  256. sage/schemes/elliptic_curves/weierstrass_transform.py +200 -0
  257. sage/schemes/hyperelliptic_curves/all.py +6 -0
  258. sage/schemes/hyperelliptic_curves/constructor.py +291 -0
  259. sage/schemes/hyperelliptic_curves/hyperelliptic_finite_field.py +1914 -0
  260. sage/schemes/hyperelliptic_curves/hyperelliptic_g2.py +192 -0
  261. sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py +954 -0
  262. sage/schemes/hyperelliptic_curves/hyperelliptic_padic_field.py +1332 -0
  263. sage/schemes/hyperelliptic_curves/hyperelliptic_rational_field.py +84 -0
  264. sage/schemes/hyperelliptic_curves/invariants.py +410 -0
  265. sage/schemes/hyperelliptic_curves/jacobian_endomorphism_utils.py +315 -0
  266. sage/schemes/hyperelliptic_curves/jacobian_g2.py +32 -0
  267. sage/schemes/hyperelliptic_curves/jacobian_generic.py +419 -0
  268. sage/schemes/hyperelliptic_curves/jacobian_homset.py +186 -0
  269. sage/schemes/hyperelliptic_curves/jacobian_morphism.py +875 -0
  270. sage/schemes/hyperelliptic_curves/kummer_surface.py +99 -0
  271. sage/schemes/hyperelliptic_curves/mestre.py +302 -0
  272. sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +3871 -0
  273. sage/schemes/jacobians/abstract_jacobian.py +277 -0
  274. sage/schemes/jacobians/all.py +2 -0
  275. sage/schemes/overview.py +161 -0
  276. sage/schemes/plane_conics/all.py +22 -0
  277. sage/schemes/plane_conics/con_field.py +1296 -0
  278. sage/schemes/plane_conics/con_finite_field.py +158 -0
  279. sage/schemes/plane_conics/con_number_field.py +456 -0
  280. sage/schemes/plane_conics/con_rational_field.py +406 -0
  281. sage/schemes/plane_conics/con_rational_function_field.py +580 -0
  282. sage/schemes/plane_conics/constructor.py +249 -0
  283. sage/schemes/plane_quartics/all.py +2 -0
  284. sage/schemes/plane_quartics/quartic_constructor.py +71 -0
  285. sage/schemes/plane_quartics/quartic_generic.py +73 -0
  286. sage/schemes/riemann_surfaces/all.py +1 -0
  287. sage/schemes/riemann_surfaces/riemann_surface.py +4117 -0
  288. sage_wheels/share/cremona/cremona_mini.db +0 -0
  289. sage_wheels/share/ellcurves/rank0 +30427 -0
  290. sage_wheels/share/ellcurves/rank1 +31871 -0
  291. sage_wheels/share/ellcurves/rank10 +6 -0
  292. sage_wheels/share/ellcurves/rank11 +6 -0
  293. sage_wheels/share/ellcurves/rank12 +1 -0
  294. sage_wheels/share/ellcurves/rank14 +1 -0
  295. sage_wheels/share/ellcurves/rank15 +1 -0
  296. sage_wheels/share/ellcurves/rank17 +1 -0
  297. sage_wheels/share/ellcurves/rank19 +1 -0
  298. sage_wheels/share/ellcurves/rank2 +2388 -0
  299. sage_wheels/share/ellcurves/rank20 +1 -0
  300. sage_wheels/share/ellcurves/rank21 +1 -0
  301. sage_wheels/share/ellcurves/rank22 +1 -0
  302. sage_wheels/share/ellcurves/rank23 +1 -0
  303. sage_wheels/share/ellcurves/rank24 +1 -0
  304. sage_wheels/share/ellcurves/rank28 +1 -0
  305. sage_wheels/share/ellcurves/rank3 +836 -0
  306. sage_wheels/share/ellcurves/rank4 +10 -0
  307. sage_wheels/share/ellcurves/rank5 +5 -0
  308. sage_wheels/share/ellcurves/rank6 +5 -0
  309. sage_wheels/share/ellcurves/rank7 +5 -0
  310. sage_wheels/share/ellcurves/rank8 +6 -0
  311. sage_wheels/share/ellcurves/rank9 +7 -0
@@ -0,0 +1,671 @@
1
+ # sage_setup: distribution = sagemath-schemes
2
+ r"""
3
+ Tate's parametrisation of `p`-adic curves with multiplicative reduction
4
+
5
+ Let `E` be an elliptic curve defined over the `p`-adic numbers `\QQ_p`.
6
+ Suppose that `E` has multiplicative reduction, i.e. that the `j`-invariant
7
+ of `E` has negative valuation, say `n`. Then there exists a parameter
8
+ `q` in `\ZZ_p` of valuation `n` such that the points of `E` defined over
9
+ the algebraic closure `\bar{\QQ}_p` are in bijection with
10
+ `\bar{\QQ}_p^{\times}\,/\, q^{\ZZ}`. More precisely there exists
11
+ the series `s_4(q)` and `s_6(q)` such that the
12
+ `y^2+x y = x^3 + s_4(q) x+s_6(q)` curve is isomorphic to `E` over
13
+ `\bar{\QQ}_p` (or over `\QQ_p` if the reduction is *split* multiplicative).
14
+ There is a `p`-adic analytic map from
15
+ `\bar{\QQ}^{\times}_p` to this curve with kernel `q^{\ZZ}`.
16
+ Points of good reduction correspond to points of valuation
17
+ `0` in `\bar{\QQ}^{\times}_p`.
18
+
19
+ See chapter V of [Sil1994]_ for more details.
20
+
21
+ AUTHORS:
22
+
23
+ - Chris Wuthrich (23/05/2007): first version
24
+
25
+ - William Stein (2007-05-29): added some examples; editing.
26
+
27
+ - Chris Wuthrich (04/09): reformatted docstrings.
28
+ """
29
+ ######################################################################
30
+ # Copyright (C) 2007 chris wuthrich
31
+ #
32
+ # Distributed under the terms of the GNU General Public License (GPL)
33
+ #
34
+ # This code is distributed in the hope that it will be useful,
35
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
36
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
37
+ # General Public License for more details.
38
+ #
39
+ # The full text of the GPL is available at:
40
+ #
41
+ # https://www.gnu.org/licenses/
42
+ ######################################################################
43
+ from sage.arith.functions import lcm as LCM
44
+ from sage.matrix.constructor import matrix
45
+ from sage.misc.functional import denominator, log
46
+ from sage.misc.lazy_import import lazy_import
47
+ from sage.misc.misc_c import prod
48
+ from sage.modular.modform.constructor import EisensteinForms, CuspForms
49
+ from sage.rings.integer_ring import ZZ
50
+ from sage.schemes.elliptic_curves.constructor import EllipticCurve
51
+ from sage.structure.richcmp import richcmp, richcmp_method
52
+ from sage.structure.sage_object import SageObject
53
+
54
+ lazy_import('sage.rings.padics.factory', 'Qp')
55
+
56
+
57
+ @richcmp_method
58
+ class TateCurve(SageObject):
59
+ r"""
60
+ Tate's `p`-adic uniformisation of an elliptic curve with
61
+ multiplicative reduction.
62
+
63
+ .. NOTE::
64
+
65
+ Some of the methods of this Tate curve only work when the
66
+ reduction is split multiplicative over `\QQ_p`.
67
+
68
+ EXAMPLES::
69
+
70
+ sage: e = EllipticCurve('130a1')
71
+ sage: eq = e.tate_curve(5); eq
72
+ 5-adic Tate curve associated to the Elliptic Curve
73
+ defined by y^2 + x*y + y = x^3 - 33*x + 68 over Rational Field
74
+ sage: eq == loads(dumps(eq))
75
+ True
76
+
77
+ REFERENCES: [Sil1994]_
78
+ """
79
+ def __init__(self, E, p):
80
+ r"""
81
+ INPUT:
82
+
83
+ - ``E`` -- an elliptic curve over the rational numbers
84
+
85
+ - ``p`` -- a prime where `E` has multiplicative reduction,
86
+ i.e., such that `j(E)` has negative valuation
87
+
88
+ EXAMPLES::
89
+
90
+ sage: e = EllipticCurve('130a1')
91
+ sage: eq = e.tate_curve(2); eq
92
+ 2-adic Tate curve associated to the Elliptic Curve
93
+ defined by y^2 + x*y + y = x^3 - 33*x + 68 over Rational Field
94
+ """
95
+ if not p.is_prime():
96
+ raise ValueError("p (=%s) must be a prime" % p)
97
+ if E.j_invariant().valuation(p) >= 0:
98
+ raise ValueError("the elliptic curve must have multiplicative reduction at %s" % p)
99
+ self._p = ZZ(p)
100
+ self._E = E
101
+ self._q = self.parameter()
102
+
103
+ def __richcmp__(self, other, op):
104
+ r"""
105
+ Compare ``self`` and ``other``.
106
+
107
+ TESTS::
108
+
109
+ sage: E = EllipticCurve('35a')
110
+ sage: eq5 = E.tate_curve(5)
111
+ sage: eq7 = E.tate_curve(7)
112
+ sage: eq7 == eq7
113
+ True
114
+ sage: eq7 == eq5
115
+ False
116
+ """
117
+ if type(self) is not type(other):
118
+ return NotImplemented
119
+
120
+ return richcmp((self._E, self._p), (other._E, other._p), op)
121
+
122
+ def _repr_(self):
123
+ r"""
124
+ Return print representation.
125
+
126
+ EXAMPLES::
127
+
128
+ sage: e = EllipticCurve('130a1')
129
+ sage: eq = e.tate_curve(2)
130
+ sage: eq._repr_()
131
+ '2-adic Tate curve associated to the Elliptic Curve defined by y^2 + x*y + y = x^3 - 33*x + 68 over Rational Field'
132
+ """
133
+ return "%s-adic Tate curve associated to the %s" % (self._p, self._E)
134
+
135
+ def original_curve(self):
136
+ r"""
137
+ Return the elliptic curve the Tate curve was constructed from.
138
+
139
+ EXAMPLES::
140
+
141
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
142
+ sage: eq.original_curve()
143
+ Elliptic Curve defined by y^2 + x*y + y = x^3 - 33*x + 68
144
+ over Rational Field
145
+ """
146
+ return self._E
147
+
148
+ def prime(self):
149
+ r"""
150
+ Return the residual characteristic `p`.
151
+
152
+ EXAMPLES::
153
+
154
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
155
+ sage: eq.original_curve()
156
+ Elliptic Curve defined by y^2 + x*y + y = x^3 - 33*x + 68
157
+ over Rational Field
158
+ sage: eq.prime()
159
+ 5
160
+ """
161
+ return self._p
162
+
163
+ def parameter(self, prec=20):
164
+ r"""
165
+ Return the Tate parameter `q` such that the curve is isomorphic
166
+ over the algebraic closure of `\QQ_p` to the curve
167
+ `\QQ_p^{\times}/q^{\ZZ}`.
168
+
169
+ INPUT:
170
+
171
+ - ``prec`` -- the `p`-adic precision (default: 20)
172
+
173
+ EXAMPLES::
174
+
175
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
176
+ sage: eq.parameter(prec=5)
177
+ 3*5^3 + 3*5^4 + 2*5^5 + 2*5^6 + 3*5^7 + O(5^8)
178
+ """
179
+ qE = getattr(self, "_q", None)
180
+ if qE and qE.precision_relative() >= prec:
181
+ return Qp(self._p, prec=prec)(qE)
182
+
183
+ E4 = EisensteinForms(weight=4).basis()[0]
184
+ Delta = CuspForms(weight=12).basis()[0]
185
+ j = (E4.q_expansion(prec + 3)) ** 3 / Delta.q_expansion(prec + 3)
186
+ jinv = (1 / j).power_series()
187
+ q_in_terms_of_jinv = jinv.reverse()
188
+ R = Qp(self._p, prec=prec)
189
+ qE = q_in_terms_of_jinv(R(1 / self._E.j_invariant()))
190
+ self._q = qE
191
+ return qE
192
+
193
+ def __sk(self, k, prec):
194
+ q = self.parameter(prec=prec)
195
+ return sum(n ** k * q ** n / (1 - q ** n)
196
+ for n in range(1, prec + 1))
197
+
198
+ def __delta(self, prec):
199
+ q = self.parameter(prec=prec)
200
+ return q * prod([(1 - q**n)**24
201
+ for n in range(1, prec + 1)])
202
+
203
+ def curve(self, prec=20):
204
+ r"""
205
+ Return the `p`-adic elliptic curve of the form
206
+ `y^2+x y = x^3 + s_4 x+s_6`.
207
+
208
+ This curve with split multiplicative reduction is isomorphic
209
+ to the given curve over the algebraic closure of `\QQ_p`.
210
+
211
+ INPUT:
212
+
213
+ - ``prec`` -- the `p`-adic precision (default: 20)
214
+
215
+ EXAMPLES::
216
+
217
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
218
+ sage: eq.curve(prec=5)
219
+ Elliptic Curve defined by y^2 + (1+O(5^5))*x*y =
220
+ x^3 + (2*5^4+5^5+2*5^6+5^7+3*5^8+O(5^9))*x + (2*5^3+5^4+2*5^5+5^7+O(5^8))
221
+ over 5-adic Field with capped relative precision 5
222
+ """
223
+ Eq = getattr(self, "__curve", None)
224
+ if Eq and Eq.a6().precision_relative() >= prec:
225
+ return Eq.change_ring(Qp(self._p, prec))
226
+
227
+ qE = self.parameter(prec=prec)
228
+ precp = prec + 2
229
+ tate_a4 = -5 * self.__sk(3, precp)
230
+ tate_a6 = (tate_a4 - 7 * self.__sk(5, precp)) / 12
231
+ R = qE.parent()
232
+ Eq = EllipticCurve([R.one(), R.zero(), R.zero(), R(tate_a4), R(tate_a6)])
233
+ self.__curve = Eq
234
+ return Eq
235
+
236
+ def _Csquare(self, prec=20):
237
+ r"""
238
+ Return the square of the constant `C` such that the canonical
239
+ Néron differential `\omega` and the canonical differential
240
+ `\frac{du}{u}` on `\QQ^{\times}/q^{\ZZ}` are linked by `\omega
241
+ = C \frac{du}{u}`.
242
+
243
+ This constant is only a square in `\QQ_p` if the curve has split
244
+ multiplicative reduction.
245
+
246
+ INPUT:
247
+
248
+ - ``prec`` -- the `p`-adic precision (default: 20)
249
+
250
+ EXAMPLES::
251
+
252
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
253
+ sage: eq._Csquare(prec=5)
254
+ 4 + 2*5^2 + 2*5^4 + O(5^5)
255
+ """
256
+ Csq = getattr(self, "__csquare", None)
257
+ if Csq and Csq.precision_relative() >= prec:
258
+ return Csq
259
+
260
+ Eq = self.curve(prec=prec)
261
+ tateCsquare = Eq.c6() * self._E.c4() / Eq.c4() / self._E.c6()
262
+ self.__Csquare = tateCsquare
263
+ return tateCsquare
264
+
265
+ def E2(self, prec=20):
266
+ r"""
267
+ Return the value of the `p`-adic Eisenstein series of weight 2
268
+ evaluated on the elliptic curve having split multiplicative
269
+ reduction.
270
+
271
+ INPUT:
272
+
273
+ - ``prec`` -- the `p`-adic precision (default: 20)
274
+
275
+ EXAMPLES::
276
+
277
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
278
+ sage: eq.E2(prec=10)
279
+ 4 + 2*5^2 + 2*5^3 + 5^4 + 2*5^5 + 5^7 + 5^8 + 2*5^9 + O(5^10)
280
+
281
+ sage: T = EllipticCurve('14').tate_curve(7)
282
+ sage: T.E2(30)
283
+ 2 + 4*7 + 7^2 + 3*7^3 + 6*7^4 + 5*7^5 + 2*7^6 + 7^7 + 5*7^8 + 6*7^9 + 5*7^10 + 2*7^11 + 6*7^12 + 4*7^13 + 3*7^15 + 5*7^16 + 4*7^17 + 4*7^18 + 2*7^20 + 7^21 + 5*7^22 + 4*7^23 + 4*7^24 + 3*7^25 + 6*7^26 + 3*7^27 + 6*7^28 + O(7^30)
284
+ """
285
+ p = self._p
286
+ Csq = self._Csquare(prec=prec)
287
+ qE = self.parameter(prec=prec)
288
+ n = qE.valuation()
289
+ R = Qp(p, prec)
290
+ e2 = Csq * (1 - 24 * sum(qE**i / (1 - qE**i)**2
291
+ for i in range(1, prec // n + 5)))
292
+ return R(e2)
293
+
294
+ def is_split(self) -> bool:
295
+ r"""
296
+ Return ``True`` if the given elliptic curve has split multiplicative reduction.
297
+
298
+ EXAMPLES::
299
+
300
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
301
+ sage: eq.is_split()
302
+ True
303
+
304
+ sage: eq = EllipticCurve('37a1').tate_curve(37)
305
+ sage: eq.is_split()
306
+ False
307
+ """
308
+ return self._Csquare().is_square()
309
+
310
+ def parametrisation_onto_tate_curve(self, u, prec=None):
311
+ r"""
312
+ Given an element `u` in `\QQ_p^{\times}`, this computes its image on the Tate curve
313
+ under the `p`-adic uniformisation of `E`.
314
+
315
+ INPUT:
316
+
317
+ - ``u`` -- a nonzero `p`-adic number
318
+
319
+ - ``prec`` -- the `p`-adic precision; default is the relative precision
320
+ of ``u``, otherwise 20
321
+
322
+ EXAMPLES::
323
+
324
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
325
+ sage: eq.parametrisation_onto_tate_curve(1+5+5^2+O(5^10), prec=10)
326
+ (5^-2 + 4*5^-1 + 1 + 2*5 + 3*5^2 + 2*5^5 + 3*5^6 + O(5^7)
327
+ : 4*5^-3 + 2*5^-1 + 4 + 2*5 + 3*5^4 + 2*5^5 + O(5^6) : 1 + O(5^10))
328
+ sage: eq.parametrisation_onto_tate_curve(1+5+5^2+O(5^10))
329
+ (5^-2 + 4*5^-1 + 1 + 2*5 + 3*5^2 + 2*5^5 + 3*5^6 + O(5^7)
330
+ : 4*5^-3 + 2*5^-1 + 4 + 2*5 + 3*5^4 + 2*5^5 + O(5^6) : 1 + O(5^10))
331
+ sage: eq.parametrisation_onto_tate_curve(1+5+5^2+O(5^10), prec=20)
332
+ Traceback (most recent call last):
333
+ ...
334
+ ValueError: requested more precision than the precision of u
335
+ """
336
+ if prec is None:
337
+ prec = getattr(u, "precision_relative", lambda: 20)()
338
+ u = Qp(self._p, prec)(u)
339
+ if prec > u.precision_relative():
340
+ raise ValueError("requested more precision than the precision of u")
341
+ if u == 1:
342
+ return self.curve(prec=prec)(0)
343
+
344
+ q = self.parameter(prec=prec)
345
+ un = u * q ** (-(u.valuation() // q.valuation()))
346
+
347
+ precn = (prec // q.valuation()) + 4
348
+
349
+ # formulas in Silverman II (Advanced Topics in the Arithmetic
350
+ # of Elliptic curves, p. 425)
351
+
352
+ powers_of_q = [(n, q**n) for n in range(1, precn)]
353
+ xx = un / (1 - un)**2 + sum(qn * un / (1 - qn * un)**2 +
354
+ qn / un / (1 - qn / un)**2 -
355
+ 2 * qn / (1 - qn)**2
356
+ for n, qn in powers_of_q)
357
+
358
+ yy = un**2 / (1 - un)**3 + sum(qn**2 * un**2 / (1 - qn * un)**3 -
359
+ qn / un / (1 - qn / un)**3 +
360
+ qn / (1 - qn)**2
361
+ for n, qn in powers_of_q)
362
+
363
+ return self.curve(prec=prec)([xx, yy])
364
+
365
+ # From here on all functions need that the curve has split
366
+ # multiplicative reduction.
367
+
368
+ def L_invariant(self, prec=20):
369
+ r"""
370
+ Return the *mysterious* `\mathcal{L}`-invariant associated
371
+ to an elliptic curve with split multiplicative reduction.
372
+
373
+ One instance where this constant appears is in the exceptional
374
+ case of the `p`-adic Birch and Swinnerton-Dyer conjecture as
375
+ formulated in [MTT1986]_. See [Col2004]_ for a detailed discussion.
376
+
377
+ INPUT:
378
+
379
+ - ``prec`` -- the `p`-adic precision (default: 20)
380
+
381
+ EXAMPLES::
382
+
383
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
384
+ sage: eq.L_invariant(prec=10)
385
+ 5^3 + 4*5^4 + 2*5^5 + 2*5^6 + 2*5^7 + 3*5^8 + 5^9 + O(5^10)
386
+ """
387
+ if not self.is_split():
388
+ raise RuntimeError("the curve must have split multiplicative "
389
+ "reduction")
390
+ qE = self.parameter(prec=prec)
391
+ n = qE.valuation()
392
+ u = qE / self._p ** n
393
+ # the p-adic logarithm of Iwasawa normalised by log(p) = 0
394
+ return log(u) / n
395
+
396
+ def _isomorphism(self, prec=20):
397
+ r"""
398
+ Return the isomorphism between ``self.curve()`` and the given
399
+ curve in the form of a list ``[u,r,s,t]`` of `p`-adic numbers.
400
+
401
+ For this to exist the given curve has to have split
402
+ multiplicative reduction over `\QQ_p`.
403
+
404
+ More precisely, if `E` has coordinates `x` and `y` and the Tate
405
+ curve has coordinates `X`, `Y` with `Y^2 + XY = X^3 + s_4 X +s_6`
406
+ then `X = u^2 x +r` and `Y = u^3 y +s u^2 x +t`.
407
+
408
+ INPUT:
409
+
410
+ - ``prec`` -- the `p`-adic precision (default: 20)
411
+
412
+ EXAMPLES::
413
+
414
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
415
+ sage: eq._isomorphism(prec=5)
416
+ [2 + 3*5^2 + 2*5^3 + 4*5^4 + O(5^5),
417
+ 4 + 3*5 + 4*5^2 + 2*5^3 + O(5^5),
418
+ 3 + 2*5 + 5^2 + 5^3 + 2*5^4 + O(5^5),
419
+ 2 + 5 + 3*5^2 + 5^3 + 5^4 + O(5^5)]
420
+ """
421
+ if not self.is_split():
422
+ raise RuntimeError("the curve must have split multiplicative "
423
+ "reduction")
424
+ C = self._Csquare(prec=prec + 4).sqrt()
425
+ R = Qp(self._p, prec)
426
+ C = R(C)
427
+ s = (C * R(self._E.a1()) - R.one()) / R(2)
428
+ r = (C ** 2 * R(self._E.a2()) + s + s ** 2) / R(3)
429
+ t = (C ** 3 * R(self._E.a3()) - r) / R(2)
430
+ return [C, r, s, t]
431
+
432
+ def _inverse_isomorphism(self, prec=20):
433
+ r"""
434
+ Return the isomorphism between the given curve and
435
+ ``self.curve()`` in the form of a list ``[u,r,s,t]`` of
436
+ `p`-adic numbers.
437
+
438
+ For this to exist the given curve has to have split
439
+ multiplicative reduction over `\QQ_p`.
440
+
441
+ More precisely, if `E` has coordinates `x` and `y` and the Tate
442
+ curve has coordinates `X`, `Y` with `Y^2 + XY = X^3 + s_4 X +s_6`
443
+ then `x = u^2 X +r` and `y = u^3 Y +s u^2 X +t`.
444
+
445
+ INPUT:
446
+
447
+ - ``prec`` -- the `p`-adic precision (default: 20)
448
+
449
+ EXAMPLES::
450
+
451
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
452
+ sage: eq._inverse_isomorphism(prec=5)
453
+ [3 + 2*5 + 3*5^3 + O(5^5), 4 + 2*5 + 4*5^3 + 3*5^4 + O(5^5),
454
+ 1 + 5 + 4*5^3 + 2*5^4 + O(5^5), 5 + 2*5^2 + 3*5^4 + O(5^5)]
455
+ """
456
+ if not self.is_split():
457
+ raise RuntimeError("the curve must have split multiplicative "
458
+ "reduction")
459
+ u, r, s, t = self._isomorphism(prec=prec)
460
+ return [1 / u, -r / u ** 2, -s / u, (r * s - t) / u ** 3]
461
+
462
+ def lift(self, P, prec=20):
463
+ r"""
464
+ Given a point `P` in the formal group of the elliptic curve `E` with split multiplicative reduction,
465
+ this produces an element `u` in `\QQ_p^{\times}` mapped to the point `P` by the Tate parametrisation.
466
+ The algorithm return the unique such element in `1+p\ZZ_p`.
467
+
468
+ INPUT:
469
+
470
+ - ``P`` -- a point on the elliptic curve
471
+
472
+ - ``prec`` -- the `p`-adic precision (default: 20)
473
+
474
+ EXAMPLES::
475
+
476
+ sage: e = EllipticCurve('130a1')
477
+ sage: eq = e.tate_curve(5)
478
+ sage: P = e([-6,10])
479
+ sage: l = eq.lift(12*P, prec=10); l
480
+ 1 + 4*5 + 5^3 + 5^4 + 4*5^5 + 5^6 + 5^7 + 4*5^8 + 5^9 + O(5^10)
481
+
482
+ Now we map the lift l back and check that it is indeed right.::
483
+
484
+ sage: eq.parametrisation_onto_original_curve(l)
485
+ (4*5^-2 + 2*5^-1 + 4*5 + 3*5^3 + 5^4 + 2*5^5 + 4*5^6 + O(5^7)
486
+ : 2*5^-3 + 5^-1 + 4 + 4*5 + 5^2 + 3*5^3 + 4*5^4 + O(5^6) : 1 + O(5^10))
487
+ sage: e5 = e.change_ring(Qp(5,9))
488
+ sage: e5(12*P)
489
+ (4*5^-2 + 2*5^-1 + 4*5 + 3*5^3 + 5^4 + 2*5^5 + 4*5^6 + O(5^7)
490
+ : 2*5^-3 + 5^-1 + 4 + 4*5 + 5^2 + 3*5^3 + 4*5^4 + O(5^6) : 1 + O(5^9))
491
+ """
492
+ p = self._p
493
+ R = Qp(self._p, prec)
494
+ if not self._E == P.curve():
495
+ raise ValueError("the point must lie on the original curve.")
496
+ if not self.is_split():
497
+ raise ValueError("the curve must have split multiplicative reduction.")
498
+ if P.is_zero():
499
+ return R.one()
500
+ if P[0].valuation(p) >= 0:
501
+ raise ValueError("the point must lie in the formal group.")
502
+
503
+ Eq = self.curve(prec=prec)
504
+ C, r, s, t = self._isomorphism(prec=prec)
505
+ xx = r + C ** 2 * P[0]
506
+ yy = t + s * C ** 2 * P[0] + C ** 3 * P[1]
507
+ assert Eq.defining_polynomial()(xx, yy, 1) == 0, f"bug: point ({xx}, {yy}) does not lie on the curve {Eq}"
508
+ tt = -xx / yy
509
+ eqhat = Eq.formal()
510
+ eqlog = eqhat.log(prec + 3)
511
+ z = eqlog(tt)
512
+ u = ZZ.one()
513
+ fac = ZZ.one()
514
+ for i in range(1, 2 * prec + 1):
515
+ fac *= i
516
+ u += z ** i / fac
517
+ return u
518
+
519
+ def parametrisation_onto_original_curve(self, u, prec=None):
520
+ r"""
521
+ Given an element `u` in `\QQ_p^{\times}`, this computes its image on the original curve
522
+ under the `p`-adic uniformisation of `E`.
523
+
524
+ INPUT:
525
+
526
+ - ``u`` -- a nonzero `p`-adic number
527
+
528
+ - ``prec`` -- the `p`-adic precision; default is the relative precision
529
+ of ``u``, otherwise 20
530
+
531
+ EXAMPLES::
532
+
533
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
534
+ sage: eq.parametrisation_onto_original_curve(1+5+5^2+O(5^10))
535
+ (4*5^-2 + 4*5^-1 + 4 + 2*5^3 + 3*5^4 + 2*5^6 + O(5^7) :
536
+ 3*5^-3 + 5^-2 + 4*5^-1 + 1 + 4*5 + 5^2 + 3*5^5 + O(5^6) :
537
+ 1 + O(5^10))
538
+ sage: eq.parametrisation_onto_original_curve(1+5+5^2+O(5^10), prec=20)
539
+ Traceback (most recent call last):
540
+ ...
541
+ ValueError: requested more precision than the precision of u
542
+
543
+ Here is how one gets a 4-torsion point on `E` over `\QQ_5`::
544
+
545
+ sage: R = Qp(5,30)
546
+ sage: i = R(-1).sqrt()
547
+ sage: T = eq.parametrisation_onto_original_curve(i, prec=30); T
548
+ (2 + 3*5 + 4*5^2 + 2*5^3 + 5^4 + 4*5^5 + 2*5^7 + 5^8 + 5^9 + 5^12 + 3*5^13 + 3*5^14 + 5^15 + 4*5^17 + 5^18 + 3*5^19 + 2*5^20 + 4*5^21 + 5^22 + 3*5^23 + 3*5^24 + 4*5^25 + 3*5^26 + 3*5^27 + 3*5^28 + 3*5^29 + O(5^30) : 3*5 + 5^2 + 5^4 + 3*5^5 + 3*5^7 + 2*5^8 + 4*5^9 + 5^10 + 2*5^11 + 4*5^13 + 2*5^14 + 4*5^15 + 4*5^16 + 3*5^17 + 2*5^18 + 4*5^20 + 2*5^21 + 2*5^22 + 4*5^23 + 4*5^24 + 4*5^25 + 5^26 + 3*5^27 + 2*5^28 + O(5^30) : 1 + O(5^30))
549
+ sage: 4*T
550
+ (0 : 1 + O(5^30) : 0)
551
+ """
552
+ if not self.is_split():
553
+ raise ValueError("the curve must have split multiplicative "
554
+ "reduction.")
555
+ if prec is None:
556
+ prec = getattr(u, "precision_relative", lambda: 20)()
557
+
558
+ P = self.parametrisation_onto_tate_curve(u, prec=prec)
559
+ C, r, s, t = self._inverse_isomorphism(prec=prec)
560
+ xx = r + C ** 2 * P[0]
561
+ yy = t + s * C ** 2 * P[0] + C ** 3 * P[1]
562
+ R = Qp(self._p, prec)
563
+ E_over_Qp = self._E.base_extend(R)
564
+ return E_over_Qp([xx, yy])
565
+
566
+ def __padic_sigma_square(self, u, prec):
567
+ q = self.parameter(prec=prec)
568
+ return (u - 1)**2 / u * prod([((1 - q**n * u) * (1 - q**n / u) /
569
+ (1 - q**n)**2)**2
570
+ for n in range(1, prec + 1)])
571
+
572
+ # the following functions are rather functions of the global curve
573
+ # than the local curve
574
+ # we use the same names as for elliptic curves over rationals.
575
+
576
+ def padic_height(self, prec=20):
577
+ r"""
578
+ Return the canonical `p`-adic height function on the original curve.
579
+
580
+ INPUT:
581
+
582
+ - ``prec`` -- the `p`-adic precision (default: 20)
583
+
584
+ OUTPUT: a function that can be evaluated on rational points of `E`
585
+
586
+ EXAMPLES::
587
+
588
+ sage: e = EllipticCurve('130a1')
589
+ sage: eq = e.tate_curve(5)
590
+ sage: h = eq.padic_height(prec=10)
591
+ sage: P = e.gens()[0] # needs eclib
592
+ sage: h(P) # needs eclib
593
+ 2*5^-1 + 1 + 2*5 + 2*5^2 + 3*5^3 + 3*5^6 + 5^7 + O(5^9)
594
+
595
+ Check that it is a quadratic function::
596
+
597
+ sage: h(3*P) - 3^2*h(P) # needs eclib
598
+ O(5^9)
599
+ """
600
+ if not self.is_split():
601
+ raise NotImplementedError("the p-adic height is not implemented "
602
+ "for non-split multiplicative reduction.")
603
+
604
+ p = self._p
605
+
606
+ # we will have to do it properly with David Harvey's _multiply_point(E, R, Q)
607
+ n = LCM(self._E.tamagawa_numbers()) * (p - 1)
608
+
609
+ # this function is a closure, I don't see how to doctest it (PZ)
610
+ def _height(P, check=True):
611
+ if check:
612
+ assert P.curve() == self._E, "the point P must lie on the curve from which the height function was created"
613
+ Q = n * P
614
+ cQ = denominator(Q[0])
615
+ q = self.parameter(prec=prec)
616
+ nn = q.valuation()
617
+ precp = prec + nn + 2
618
+ uQ = self.lift(Q, prec=precp)
619
+ si = self.__padic_sigma_square(uQ, prec=precp)
620
+ q = self.parameter(prec=precp)
621
+ nn = q.valuation()
622
+ qEu = q / p ** nn
623
+ res = -(log(si * self._Csquare(prec=precp) / cQ) + log(uQ)**2 / log(qEu)) / n**2
624
+ R = Qp(self._p, prec)
625
+ return R(res)
626
+
627
+ return _height
628
+
629
+ def padic_regulator(self, prec=20):
630
+ r"""
631
+ Compute the canonical `p`-adic regulator on the extended
632
+ Mordell-Weil group as in [MTT1986]_
633
+ (with the correction of [Wer1998]_ and sign convention in [SW2013]_.)
634
+
635
+ The `p`-adic Birch and Swinnerton-Dyer conjecture predicts
636
+ that this value appears in the formula for the leading term of
637
+ the `p`-adic `L`-function.
638
+
639
+ INPUT:
640
+
641
+ - ``prec`` -- the `p`-adic precision (default: 20)
642
+
643
+ EXAMPLES::
644
+
645
+ sage: eq = EllipticCurve('130a1').tate_curve(5)
646
+ sage: eq.padic_regulator() # needs eclib
647
+ 2*5^-1 + 1 + 2*5 + 2*5^2 + 3*5^3 + 3*5^6 + 5^7 + 3*5^9 + 3*5^10 + 3*5^12 + 4*5^13 + 3*5^15 + 2*5^16 + 3*5^18 + 4*5^19 + 4*5^20 + 3*5^21 + 4*5^22 + O(5^23)
648
+ """
649
+ prec = prec + 4
650
+
651
+ K = Qp(self._p, prec=prec)
652
+ rank = self._E.rank()
653
+ if rank == 0:
654
+ return K.one()
655
+
656
+ if not self.is_split():
657
+ raise NotImplementedError("the p-adic regulator is not implemented "
658
+ "for non-split multiplicative reduction.")
659
+
660
+ basis = self._E.gens()
661
+ M = matrix(K, rank, rank, 0)
662
+
663
+ height = self.padic_height(prec=prec)
664
+ point_height = [height(P) for P in basis]
665
+ for i in range(rank):
666
+ for j in range(i + 1, rank):
667
+ M[i, j] = M[j, i] = (- point_height[i] - point_height[j] + height(basis[i] + basis[j])) / 2
668
+ for i in range(rank):
669
+ M[i, i] = point_height[i]
670
+
671
+ return M.determinant()