passagemath-pari 10.6.32__cp314-cp314-musllinux_1_2_x86_64.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-pari might be problematic. Click here for more details.

Files changed (331) hide show
  1. PARIKernel/__init__.py +2 -0
  2. PARIKernel/__main__.py +5 -0
  3. PARIKernel/io.cpython-314-x86_64-linux-musl.so +0 -0
  4. PARIKernel/io.pxd +7 -0
  5. PARIKernel/io.pyx +84 -0
  6. PARIKernel/kernel.cpython-314-x86_64-linux-musl.so +0 -0
  7. PARIKernel/kernel.pyx +260 -0
  8. PARIKernel/paridecl.pxd +95 -0
  9. PARIKernel/svg.cpython-314-x86_64-linux-musl.so +0 -0
  10. PARIKernel/svg.pyx +52 -0
  11. cypari2/__init__.py +8 -0
  12. cypari2/auto_paridecl.pxd +1070 -0
  13. cypari2/closure.cpython-314-x86_64-linux-musl.so +0 -0
  14. cypari2/closure.pxd +5 -0
  15. cypari2/closure.pyx +246 -0
  16. cypari2/convert.cpython-314-x86_64-linux-musl.so +0 -0
  17. cypari2/convert.pxd +80 -0
  18. cypari2/convert.pyx +613 -0
  19. cypari2/custom_block.cpython-314-x86_64-linux-musl.so +0 -0
  20. cypari2/custom_block.pyx +30 -0
  21. cypari2/cypari.h +13 -0
  22. cypari2/gen.cpython-314-x86_64-linux-musl.so +0 -0
  23. cypari2/gen.pxd +69 -0
  24. cypari2/gen.pyx +4819 -0
  25. cypari2/handle_error.cpython-314-x86_64-linux-musl.so +0 -0
  26. cypari2/handle_error.pxd +7 -0
  27. cypari2/handle_error.pyx +232 -0
  28. cypari2/pari_instance.cpython-314-x86_64-linux-musl.so +0 -0
  29. cypari2/pari_instance.pxd +27 -0
  30. cypari2/pari_instance.pyx +1438 -0
  31. cypari2/paridecl.pxd +5353 -0
  32. cypari2/paripriv.pxd +34 -0
  33. cypari2/pycore_long.h +98 -0
  34. cypari2/pycore_long.pxd +9 -0
  35. cypari2/stack.cpython-314-x86_64-linux-musl.so +0 -0
  36. cypari2/stack.pxd +27 -0
  37. cypari2/stack.pyx +278 -0
  38. cypari2/string_utils.cpython-314-x86_64-linux-musl.so +0 -0
  39. cypari2/string_utils.pxd +29 -0
  40. cypari2/string_utils.pyx +65 -0
  41. cypari2/types.pxd +147 -0
  42. passagemath_pari-10.6.32.data/data/etc/jupyter/nbconfig/notebook.d/gp-mode.json +5 -0
  43. passagemath_pari-10.6.32.data/data/share/jupyter/kernels/pari_jupyter/kernel.js +28 -0
  44. passagemath_pari-10.6.32.data/data/share/jupyter/kernels/pari_jupyter/kernel.json +6 -0
  45. passagemath_pari-10.6.32.data/data/share/jupyter/kernels/pari_jupyter/logo-64x64.png +0 -0
  46. passagemath_pari-10.6.32.data/data/share/jupyter/kernels/xeus-gp/kernel.json +13 -0
  47. passagemath_pari-10.6.32.data/data/share/jupyter/kernels/xeus-gp/logo-32x32.png +0 -0
  48. passagemath_pari-10.6.32.data/data/share/jupyter/kernels/xeus-gp/logo-64x64.png +0 -0
  49. passagemath_pari-10.6.32.data/data/share/jupyter/kernels/xeus-gp/logo-svg.svg +75 -0
  50. passagemath_pari-10.6.32.data/data/share/jupyter/nbextensions/gp-mode/gp.js +284 -0
  51. passagemath_pari-10.6.32.data/data/share/jupyter/nbextensions/gp-mode/main.js +15 -0
  52. passagemath_pari-10.6.32.dist-info/METADATA +209 -0
  53. passagemath_pari-10.6.32.dist-info/RECORD +331 -0
  54. passagemath_pari-10.6.32.dist-info/WHEEL +5 -0
  55. passagemath_pari-10.6.32.dist-info/top_level.txt +4 -0
  56. passagemath_pari.libs/libcrypto-f04afe95.so.3 +0 -0
  57. passagemath_pari.libs/libflint-fd6f12fc.so.21.0.0 +0 -0
  58. passagemath_pari.libs/libgcc_s-0cd532bd.so.1 +0 -0
  59. passagemath_pari.libs/libgf2x-9e30c3e3.so.3.0.0 +0 -0
  60. passagemath_pari.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
  61. passagemath_pari.libs/libgivaro-9a94c711.so.9.2.1 +0 -0
  62. passagemath_pari.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
  63. passagemath_pari.libs/libgmpxx-9e08595c.so.4.7.0 +0 -0
  64. passagemath_pari.libs/libgsl-42cda06f.so.28.0.0 +0 -0
  65. passagemath_pari.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
  66. passagemath_pari.libs/libncursesw-9c9e32c3.so.6.5 +0 -0
  67. passagemath_pari.libs/libntl-26885ca2.so.44.0.1 +0 -0
  68. passagemath_pari.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
  69. passagemath_pari.libs/libpari-gmp-tls-f31f908f.so.2.17.2 +0 -0
  70. passagemath_pari.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
  71. passagemath_pari.libs/libreadline-06542304.so.8.2 +0 -0
  72. passagemath_pari.libs/libstdc++-5d72f927.so.6.0.33 +0 -0
  73. passagemath_pari.libs/libuuid-f3770415.so.1.3.0 +0 -0
  74. passagemath_pari.libs/libxeus-735780ff.so.13.1.0 +0 -0
  75. passagemath_pari.libs/libxeus-zmq-c68577b4.so.6.0.1 +0 -0
  76. passagemath_pari.libs/libzmq-1ba9a3da.so.5.2.5 +0 -0
  77. sage/all__sagemath_pari.py +26 -0
  78. sage/databases/all__sagemath_pari.py +7 -0
  79. sage/databases/conway.py +274 -0
  80. sage/ext/all__sagemath_pari.py +1 -0
  81. sage/ext/memory.cpython-314-x86_64-linux-musl.so +0 -0
  82. sage/ext/memory.pyx +98 -0
  83. sage/ext_data/pari/buzzard/DimensionSk.g +286 -0
  84. sage/ext_data/pari/buzzard/Tpprog.g +179 -0
  85. sage/ext_data/pari/buzzard/genusn.g +129 -0
  86. sage/ext_data/pari/dokchitser/computel.gp +740 -0
  87. sage/ext_data/pari/dokchitser/computel.gp.template +740 -0
  88. sage/ext_data/pari/dokchitser/ex-bsw +43 -0
  89. sage/ext_data/pari/dokchitser/ex-chgen +48 -0
  90. sage/ext_data/pari/dokchitser/ex-chqua +37 -0
  91. sage/ext_data/pari/dokchitser/ex-delta +35 -0
  92. sage/ext_data/pari/dokchitser/ex-eisen +30 -0
  93. sage/ext_data/pari/dokchitser/ex-gen2 +38 -0
  94. sage/ext_data/pari/dokchitser/ex-gen3 +49 -0
  95. sage/ext_data/pari/dokchitser/ex-gen4 +54 -0
  96. sage/ext_data/pari/dokchitser/ex-nf +48 -0
  97. sage/ext_data/pari/dokchitser/ex-shin +50 -0
  98. sage/ext_data/pari/dokchitser/ex-tau2 +30 -0
  99. sage/ext_data/pari/dokchitser/ex-zeta +27 -0
  100. sage/ext_data/pari/dokchitser/ex-zeta2 +47 -0
  101. sage/ext_data/pari/dokchitser/testall +13 -0
  102. sage/ext_data/pari/simon/ell.gp +2129 -0
  103. sage/ext_data/pari/simon/ellQ.gp +2151 -0
  104. sage/ext_data/pari/simon/ellcommon.gp +126 -0
  105. sage/ext_data/pari/simon/qfsolve.gp +722 -0
  106. sage/ext_data/pari/simon/resultant3.gp +306 -0
  107. sage/groups/all__sagemath_pari.py +3 -0
  108. sage/groups/pari_group.py +175 -0
  109. sage/interfaces/all__sagemath_pari.py +1 -0
  110. sage/interfaces/genus2reduction.py +464 -0
  111. sage/interfaces/gp.py +1114 -0
  112. sage/libs/all__sagemath_pari.py +2 -0
  113. sage/libs/linkages/__init__.py +1 -0
  114. sage/libs/linkages/padics/API.pxi +617 -0
  115. sage/libs/linkages/padics/Polynomial_ram.pxi +388 -0
  116. sage/libs/linkages/padics/Polynomial_shared.pxi +554 -0
  117. sage/libs/linkages/padics/__init__.py +1 -0
  118. sage/libs/linkages/padics/fmpz_poly_unram.pxi +869 -0
  119. sage/libs/linkages/padics/mpz.pxi +691 -0
  120. sage/libs/linkages/padics/relaxed/API.pxi +518 -0
  121. sage/libs/linkages/padics/relaxed/__init__.py +1 -0
  122. sage/libs/linkages/padics/relaxed/flint.pxi +543 -0
  123. sage/libs/linkages/padics/unram_shared.pxi +247 -0
  124. sage/libs/pari/__init__.py +210 -0
  125. sage/libs/pari/all.py +5 -0
  126. sage/libs/pari/convert_flint.cpython-314-x86_64-linux-musl.so +0 -0
  127. sage/libs/pari/convert_flint.pxd +14 -0
  128. sage/libs/pari/convert_flint.pyx +159 -0
  129. sage/libs/pari/convert_gmp.cpython-314-x86_64-linux-musl.so +0 -0
  130. sage/libs/pari/convert_gmp.pxd +14 -0
  131. sage/libs/pari/convert_gmp.pyx +210 -0
  132. sage/libs/pari/convert_sage.cpython-314-x86_64-linux-musl.so +0 -0
  133. sage/libs/pari/convert_sage.pxd +16 -0
  134. sage/libs/pari/convert_sage.pyx +588 -0
  135. sage/libs/pari/convert_sage_complex_double.cpython-314-x86_64-linux-musl.so +0 -0
  136. sage/libs/pari/convert_sage_complex_double.pxd +14 -0
  137. sage/libs/pari/convert_sage_complex_double.pyx +132 -0
  138. sage/libs/pari/convert_sage_matrix.cpython-314-x86_64-linux-musl.so +0 -0
  139. sage/libs/pari/convert_sage_matrix.pyx +106 -0
  140. sage/libs/pari/convert_sage_real_double.cpython-314-x86_64-linux-musl.so +0 -0
  141. sage/libs/pari/convert_sage_real_double.pxd +5 -0
  142. sage/libs/pari/convert_sage_real_double.pyx +14 -0
  143. sage/libs/pari/convert_sage_real_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
  144. sage/libs/pari/convert_sage_real_mpfr.pxd +7 -0
  145. sage/libs/pari/convert_sage_real_mpfr.pyx +108 -0
  146. sage/libs/pari/misc.cpython-314-x86_64-linux-musl.so +0 -0
  147. sage/libs/pari/misc.pxd +4 -0
  148. sage/libs/pari/misc.pyx +26 -0
  149. sage/libs/pari/tests.py +1848 -0
  150. sage/matrix/all__sagemath_pari.py +1 -0
  151. sage/matrix/matrix_integer_pari.cpython-314-x86_64-linux-musl.so +0 -0
  152. sage/matrix/matrix_integer_pari.pyx +187 -0
  153. sage/matrix/matrix_rational_pari.cpython-314-x86_64-linux-musl.so +0 -0
  154. sage/matrix/matrix_rational_pari.pyx +160 -0
  155. sage/quadratic_forms/all__sagemath_pari.py +10 -0
  156. sage/quadratic_forms/genera/all.py +9 -0
  157. sage/quadratic_forms/genera/genus.py +3506 -0
  158. sage/quadratic_forms/genera/normal_form.py +1519 -0
  159. sage/quadratic_forms/genera/spinor_genus.py +243 -0
  160. sage/quadratic_forms/qfsolve.py +255 -0
  161. sage/quadratic_forms/quadratic_form__automorphisms.py +427 -0
  162. sage/quadratic_forms/quadratic_form__genus.py +141 -0
  163. sage/quadratic_forms/quadratic_form__local_density_interfaces.py +140 -0
  164. sage/quadratic_forms/quadratic_form__local_normal_form.py +421 -0
  165. sage/quadratic_forms/quadratic_form__local_representation_conditions.py +889 -0
  166. sage/quadratic_forms/quadratic_form__mass.py +69 -0
  167. sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py +663 -0
  168. sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py +373 -0
  169. sage/quadratic_forms/quadratic_form__siegel_product.py +198 -0
  170. sage/quadratic_forms/special_values.py +323 -0
  171. sage/rings/all__sagemath_pari.py +15 -0
  172. sage/rings/factorint_pari.cpython-314-x86_64-linux-musl.so +0 -0
  173. sage/rings/factorint_pari.pyx +80 -0
  174. sage/rings/finite_rings/all__sagemath_pari.py +1 -0
  175. sage/rings/finite_rings/element_givaro.cpython-314-x86_64-linux-musl.so +0 -0
  176. sage/rings/finite_rings/element_givaro.pxd +91 -0
  177. sage/rings/finite_rings/element_givaro.pyx +1769 -0
  178. sage/rings/finite_rings/element_ntl_gf2e.cpython-314-x86_64-linux-musl.so +0 -0
  179. sage/rings/finite_rings/element_ntl_gf2e.pxd +22 -0
  180. sage/rings/finite_rings/element_ntl_gf2e.pyx +1333 -0
  181. sage/rings/finite_rings/element_pari_ffelt.cpython-314-x86_64-linux-musl.so +0 -0
  182. sage/rings/finite_rings/element_pari_ffelt.pxd +13 -0
  183. sage/rings/finite_rings/element_pari_ffelt.pyx +1441 -0
  184. sage/rings/finite_rings/finite_field_givaro.py +612 -0
  185. sage/rings/finite_rings/finite_field_pari_ffelt.py +238 -0
  186. sage/rings/finite_rings/hom_finite_field_givaro.cpython-314-x86_64-linux-musl.so +0 -0
  187. sage/rings/finite_rings/hom_finite_field_givaro.pxd +28 -0
  188. sage/rings/finite_rings/hom_finite_field_givaro.pyx +280 -0
  189. sage/rings/finite_rings/residue_field_givaro.cpython-314-x86_64-linux-musl.so +0 -0
  190. sage/rings/finite_rings/residue_field_givaro.pyx +133 -0
  191. sage/rings/finite_rings/residue_field_pari_ffelt.cpython-314-x86_64-linux-musl.so +0 -0
  192. sage/rings/finite_rings/residue_field_pari_ffelt.pyx +128 -0
  193. sage/rings/function_field/all__sagemath_pari.py +1 -0
  194. sage/rings/function_field/valuation.py +1450 -0
  195. sage/rings/function_field/valuation_ring.py +212 -0
  196. sage/rings/number_field/all__sagemath_pari.py +14 -0
  197. sage/rings/number_field/totallyreal.cpython-314-x86_64-linux-musl.so +0 -0
  198. sage/rings/number_field/totallyreal.pyx +509 -0
  199. sage/rings/number_field/totallyreal_data.cpython-314-x86_64-linux-musl.so +0 -0
  200. sage/rings/number_field/totallyreal_data.pxd +26 -0
  201. sage/rings/number_field/totallyreal_data.pyx +928 -0
  202. sage/rings/number_field/totallyreal_phc.py +144 -0
  203. sage/rings/number_field/totallyreal_rel.py +1018 -0
  204. sage/rings/padics/CA_template.pxi +1847 -0
  205. sage/rings/padics/CA_template_header.pxi +50 -0
  206. sage/rings/padics/CR_template.pxi +2563 -0
  207. sage/rings/padics/CR_template_header.pxi +57 -0
  208. sage/rings/padics/FM_template.pxi +1575 -0
  209. sage/rings/padics/FM_template_header.pxi +50 -0
  210. sage/rings/padics/FP_template.pxi +2176 -0
  211. sage/rings/padics/FP_template_header.pxi +57 -0
  212. sage/rings/padics/all.py +3 -0
  213. sage/rings/padics/all__sagemath_pari.py +11 -0
  214. sage/rings/padics/common_conversion.cpython-314-x86_64-linux-musl.so +0 -0
  215. sage/rings/padics/common_conversion.pxd +15 -0
  216. sage/rings/padics/common_conversion.pyx +508 -0
  217. sage/rings/padics/eisenstein_extension_generic.py +232 -0
  218. sage/rings/padics/factory.py +3623 -0
  219. sage/rings/padics/generic_nodes.py +1615 -0
  220. sage/rings/padics/lattice_precision.py +2889 -0
  221. sage/rings/padics/morphism.cpython-314-x86_64-linux-musl.so +0 -0
  222. sage/rings/padics/morphism.pxd +11 -0
  223. sage/rings/padics/morphism.pyx +366 -0
  224. sage/rings/padics/padic_base_generic.py +467 -0
  225. sage/rings/padics/padic_base_leaves.py +1235 -0
  226. sage/rings/padics/padic_capped_absolute_element.cpython-314-x86_64-linux-musl.so +0 -0
  227. sage/rings/padics/padic_capped_absolute_element.pxd +15 -0
  228. sage/rings/padics/padic_capped_absolute_element.pyx +520 -0
  229. sage/rings/padics/padic_capped_relative_element.cpython-314-x86_64-linux-musl.so +0 -0
  230. sage/rings/padics/padic_capped_relative_element.pxd +14 -0
  231. sage/rings/padics/padic_capped_relative_element.pyx +614 -0
  232. sage/rings/padics/padic_extension_generic.py +990 -0
  233. sage/rings/padics/padic_extension_leaves.py +738 -0
  234. sage/rings/padics/padic_fixed_mod_element.cpython-314-x86_64-linux-musl.so +0 -0
  235. sage/rings/padics/padic_fixed_mod_element.pxd +15 -0
  236. sage/rings/padics/padic_fixed_mod_element.pyx +584 -0
  237. sage/rings/padics/padic_floating_point_element.cpython-314-x86_64-linux-musl.so +0 -0
  238. sage/rings/padics/padic_floating_point_element.pxd +14 -0
  239. sage/rings/padics/padic_floating_point_element.pyx +447 -0
  240. sage/rings/padics/padic_generic_element.cpython-314-x86_64-linux-musl.so +0 -0
  241. sage/rings/padics/padic_generic_element.pxd +48 -0
  242. sage/rings/padics/padic_generic_element.pyx +4642 -0
  243. sage/rings/padics/padic_lattice_element.py +1342 -0
  244. sage/rings/padics/padic_printing.cpython-314-x86_64-linux-musl.so +0 -0
  245. sage/rings/padics/padic_printing.pxd +38 -0
  246. sage/rings/padics/padic_printing.pyx +1505 -0
  247. sage/rings/padics/padic_relaxed_element.cpython-314-x86_64-linux-musl.so +0 -0
  248. sage/rings/padics/padic_relaxed_element.pxd +56 -0
  249. sage/rings/padics/padic_relaxed_element.pyx +18 -0
  250. sage/rings/padics/padic_relaxed_errors.cpython-314-x86_64-linux-musl.so +0 -0
  251. sage/rings/padics/padic_relaxed_errors.pxd +11 -0
  252. sage/rings/padics/padic_relaxed_errors.pyx +71 -0
  253. sage/rings/padics/padic_template_element.pxi +1212 -0
  254. sage/rings/padics/padic_template_element_header.pxi +50 -0
  255. sage/rings/padics/padic_valuation.py +1423 -0
  256. sage/rings/padics/pow_computer_flint.cpython-314-x86_64-linux-musl.so +0 -0
  257. sage/rings/padics/pow_computer_flint.pxd +38 -0
  258. sage/rings/padics/pow_computer_flint.pyx +641 -0
  259. sage/rings/padics/pow_computer_relative.cpython-314-x86_64-linux-musl.so +0 -0
  260. sage/rings/padics/pow_computer_relative.pxd +29 -0
  261. sage/rings/padics/pow_computer_relative.pyx +415 -0
  262. sage/rings/padics/qadic_flint_CA.cpython-314-x86_64-linux-musl.so +0 -0
  263. sage/rings/padics/qadic_flint_CA.pxd +21 -0
  264. sage/rings/padics/qadic_flint_CA.pyx +130 -0
  265. sage/rings/padics/qadic_flint_CR.cpython-314-x86_64-linux-musl.so +0 -0
  266. sage/rings/padics/qadic_flint_CR.pxd +13 -0
  267. sage/rings/padics/qadic_flint_CR.pyx +172 -0
  268. sage/rings/padics/qadic_flint_FM.cpython-314-x86_64-linux-musl.so +0 -0
  269. sage/rings/padics/qadic_flint_FM.pxd +14 -0
  270. sage/rings/padics/qadic_flint_FM.pyx +111 -0
  271. sage/rings/padics/qadic_flint_FP.cpython-314-x86_64-linux-musl.so +0 -0
  272. sage/rings/padics/qadic_flint_FP.pxd +12 -0
  273. sage/rings/padics/qadic_flint_FP.pyx +165 -0
  274. sage/rings/padics/relative_extension_leaves.py +429 -0
  275. sage/rings/padics/relative_ramified_CA.cpython-314-x86_64-linux-musl.so +0 -0
  276. sage/rings/padics/relative_ramified_CA.pxd +9 -0
  277. sage/rings/padics/relative_ramified_CA.pyx +33 -0
  278. sage/rings/padics/relative_ramified_CR.cpython-314-x86_64-linux-musl.so +0 -0
  279. sage/rings/padics/relative_ramified_CR.pxd +8 -0
  280. sage/rings/padics/relative_ramified_CR.pyx +33 -0
  281. sage/rings/padics/relative_ramified_FM.cpython-314-x86_64-linux-musl.so +0 -0
  282. sage/rings/padics/relative_ramified_FM.pxd +9 -0
  283. sage/rings/padics/relative_ramified_FM.pyx +33 -0
  284. sage/rings/padics/relative_ramified_FP.cpython-314-x86_64-linux-musl.so +0 -0
  285. sage/rings/padics/relative_ramified_FP.pxd +8 -0
  286. sage/rings/padics/relative_ramified_FP.pyx +33 -0
  287. sage/rings/padics/relaxed_template.pxi +4229 -0
  288. sage/rings/padics/relaxed_template_header.pxi +160 -0
  289. sage/rings/padics/tests.py +35 -0
  290. sage/rings/padics/tutorial.py +341 -0
  291. sage/rings/padics/unramified_extension_generic.py +335 -0
  292. sage/rings/padics/witt_vector.py +917 -0
  293. sage/rings/padics/witt_vector_ring.py +934 -0
  294. sage/rings/pari_ring.py +235 -0
  295. sage/rings/polynomial/all__sagemath_pari.py +1 -0
  296. sage/rings/polynomial/padics/all.py +1 -0
  297. sage/rings/polynomial/padics/polynomial_padic.py +360 -0
  298. sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py +1324 -0
  299. sage/rings/polynomial/padics/polynomial_padic_flat.py +72 -0
  300. sage/rings/power_series_pari.cpython-314-x86_64-linux-musl.so +0 -0
  301. sage/rings/power_series_pari.pxd +6 -0
  302. sage/rings/power_series_pari.pyx +934 -0
  303. sage/rings/tate_algebra.py +1282 -0
  304. sage/rings/tate_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  305. sage/rings/tate_algebra_element.pxd +49 -0
  306. sage/rings/tate_algebra_element.pyx +3464 -0
  307. sage/rings/tate_algebra_ideal.cpython-314-x86_64-linux-musl.so +0 -0
  308. sage/rings/tate_algebra_ideal.pxd +7 -0
  309. sage/rings/tate_algebra_ideal.pyx +1307 -0
  310. sage/rings/valuation/all.py +7 -0
  311. sage/rings/valuation/augmented_valuation.py +2118 -0
  312. sage/rings/valuation/developing_valuation.py +362 -0
  313. sage/rings/valuation/gauss_valuation.py +812 -0
  314. sage/rings/valuation/inductive_valuation.py +1686 -0
  315. sage/rings/valuation/limit_valuation.py +946 -0
  316. sage/rings/valuation/mapped_valuation.py +656 -0
  317. sage/rings/valuation/scaled_valuation.py +322 -0
  318. sage/rings/valuation/trivial_valuation.py +382 -0
  319. sage/rings/valuation/valuation.py +1119 -0
  320. sage/rings/valuation/valuation_space.py +1615 -0
  321. sage/rings/valuation/valuations_catalog.py +10 -0
  322. sage/rings/valuation/value_group.py +697 -0
  323. sage/schemes/all__sagemath_pari.py +1 -0
  324. sage/schemes/elliptic_curves/all__sagemath_pari.py +1 -0
  325. sage/schemes/elliptic_curves/descent_two_isogeny_pari.cpython-314-x86_64-linux-musl.so +0 -0
  326. sage/schemes/elliptic_curves/descent_two_isogeny_pari.pyx +46 -0
  327. sage_wheels/bin/gp +0 -0
  328. sage_wheels/bin/gp2c +0 -0
  329. sage_wheels/bin/gp2c-run +57 -0
  330. sage_wheels/bin/xeus-gp +0 -0
  331. sage_wheels/share/gp2c/func.dsc +18414 -0
@@ -0,0 +1,740 @@
1
+ /************* ComputeL v1.3.8, 2001-2018, (c) Tim Dokchitser ************/
2
+ /**************** computing special values of L-functions ****************/
3
+ /* arXiv.org/abs/math.NT/0207280, Exper. Math. 13 (2004), no. 2, 137-150 */
4
+ /****** Questions/comments welcome! -> tim.dokchitser@bristol.ac.uk ******/
5
+
6
+ \\ ACKNOWLEDGEMENTS: I'd like to thank Mark Watkins, Steve Donnelly,
7
+ \\ William Stein, Anton Mellit, Almasa Odzak, Karim Belabas, Myoungil Kim,
8
+ \\ Chris King, F. Patrick Rabarison, Neil Dummigan, Maciej Radziejewski,
9
+ \\ François Brunault and Alex Best, for examples, bug fixes and suggestions
10
+
11
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
12
+ \\ Distributed under the terms of the GNU General Public License (GPL)
13
+ \\ This code is distributed in the hope that it will be useful,
14
+ \\ but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ \\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ \\ GNU General Public License for more details.
17
+ \\ The full text of the GPL is available at:
18
+ \\ http://www.gnu.org/licenses/
19
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
20
+
21
+ \\ USAGE: Take an L-function L(s) = sum of a(n)/n^s over complex numbers
22
+ \\ e.g. Riemann zeta-function, Dedekind zeta-function,
23
+ \\ Dirichlet L-function of a character, L-function
24
+ \\ of a curve over a number field, L-function of a modular form,
25
+ \\ any ``motivic'' L-function, Shintani's zeta-function etc.
26
+ \\ assuming L(s) satisfies a functional equation of a standard form,
27
+ \\ this package computes L(s) or its k-th derivative for some k
28
+ \\ for a given complex s to required precision
29
+ \\ - a short usage guide is provided below
30
+ \\ - or (better) just look at the example files ex-*
31
+ \\ they are hopefully self-explanatory
32
+ \\
33
+ \\ ASSUMED: L^*(s) = Gamma-factor * L(s) satisfies functional equation
34
+ \\ L^*(s) = sgn * L^*(weight-s),
35
+ \\ [ more generally L^*(s) = sgn * Ldual^*(weight-s) ]
36
+ \\ Gamma-factor = A^s * product of Gamma((s+gammaV[k])/2)
37
+ \\ where A = sqrt(conductor/Pi^d)
38
+ \\
39
+ \\ gammaV = list of Gamma-factor parameters,
40
+ \\ e.g. [0] for Riemann zeta, [0,1] for ell.curves
41
+ \\ conductor = exponential factor (real>0, usually integer),
42
+ \\ e.g. 1 for Riemann zeta and modular forms under SL_2(Z)
43
+ \\ e.g. |discriminant| for number fields
44
+ \\ e.g. conductor for H^1 of curves/Q
45
+ \\ weight = real > 0 (usually integer, =1 by default)
46
+ \\ e.g. 1 for Riemann zeta, 2 for H^1 of curves/Q
47
+ \\ sgn = complex number (=1 by default)
48
+ \\
49
+ \\ 1. Read the package (\rcomputel)
50
+ \\ 2. Set the required working precision (say \p28)
51
+ \\
52
+ \\ 3. DEFINE gammaV, conductor, weight, sgn,
53
+ \\ Lpoles = vector of points where L^*(s) has (simple) poles
54
+ \\ Only poles with Re(s)>weight/2 are to be included
55
+ \\ Lresidues = vector of residues of L^*(s) in those poles
56
+ \\ or set Lresidues = automatic (default value; see ex-nf)
57
+ \\ if necessary, re-define coefgrow(), MaxImaginaryPart (see below)
58
+ \\
59
+ \\ [4.] CALL cflength() determine how many coefficients a(n) are necessary
60
+ \\ [optional] to perform L-function computations
61
+ \\
62
+ \\ 5. CALL initLdata(cfstr) where cfstr (e.g. "(-1)^k") is a string which
63
+ \\ evaluates to k-th coefficient a(k) in L-series, e.g.
64
+ \\ N = cflength(); \\ say returns N=10
65
+ \\ Avec = [1,-1,0,1,-1,0,1,-1,0,1,-1,0]; \\ must be at least 10 long
66
+ \\ initLdata("Avec[k]");
67
+ \\ If Ldual(s)<>L(s), in other words, if the functional equation involves
68
+ \\ another L-function, its coefficients are passed as a 3rd parameter,
69
+ \\ initLdata("Avec[k]",,"conj(Avec[k])"); see ex-chgen as an example
70
+ \\
71
+ \\ [7.] CALL checkfeq() verify how well numerically the functional
72
+ \\ [optional] equation is satisfied
73
+ \\ also determines the residues if Lpoles!=[]
74
+ \\ and Lresidues=automatic
75
+ \\ More specifically: for T>1 (default 1.2), checkfeq(T) should ideally
76
+ \\ return 0 (with current precision, e.g. 3.2341E-29 for \p28 is good)
77
+ \\ * if what checkfeq() returns does not look like 0 at all,
78
+ \\ probably functional equation is wrong
79
+ \\ (i.e. some of the parameters gammaV, conductor etc., or the coeffs)
80
+ \\ * if checkfeq(T) is to be used, more coefficients have to be
81
+ \\ generated (approximately T times more), e.g. call
82
+ \\ cflength(1.3), initLdata("a(k)",1.3), checkfeq(1.3)
83
+ \\ * T=1 always (!) returns 0, so T has to be away from 1
84
+ \\ * default value T=1.2 seems to give a reasonable balance
85
+ \\ * if you don't have to verify the functional equation or the L-values,
86
+ \\ call cflength(1) and initLdata("a(k)",1),
87
+ \\ you need slightly less coefficients then
88
+ \\
89
+ \\ 8. CALL L(s0) to determine the value of L-function L(s) in s=s0
90
+ \\ CALL L(s0,c) with c>1 to get the same value with a different cutoff
91
+ \\ point (c close to 1); should return the same answer,
92
+ \\ good to check if everything works with right precision
93
+ \\ (if it doesn't, email me!)
94
+ \\ needs generally more coefficients for larger ex
95
+ \\ if L(s0,ex)-L(s0) is large, either the functional eq.
96
+ \\ is wrong or loss of precision (should get a warning)
97
+ \\ CALL L(s0,,k) to determine k-th derivative of L(s) in s=s0
98
+ \\ see ex-bsw for example
99
+ \\ CALL Lseries(s,,k) to get first k terms of Taylor series expansion
100
+ \\ L(s)+L'(s)S+L''(s)*S^2/2!+...
101
+ \\ faster than k calls to L(s)
102
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
103
+ \\ Default values for the L-function parameters \\
104
+ \\ All may be (and conductor and gammaV must be) re-defined \\
105
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
106
+
107
+ \\ MUST be re-defined, gives error if unchanged
108
+ conductor = automatic;
109
+ gammaV = automatic;
110
+
111
+ \\ MAY be re-defined
112
+ weight = 1; \\ by default L(s)<->L(1-s)
113
+ sgn = 1; \\ with sign=1 in functional equation
114
+ Lpoles = []; \\ and L*(s) has no poles
115
+ Lresidues = automatic; \\ if this is not changed to [r1,r2,...] by hand,
116
+ \\ checkfeq() tries to determine residues automatically
117
+ \\ see ex-nf for instance
118
+
119
+ {
120
+ coefgrow(n) = if(length(Lpoles), \\ default bound for coeffs. a(n)
121
+ 1.5*n^(vecmax(real(Lpoles))-1), \\ you may redefine coefgrow() by hand
122
+ sqrt(4*n)^(weight-1)); \\ if your a(n) have different growth
123
+ } \\ see ex-delta for example
124
+
125
+ \\ - For s with large imaginary part there is a lot of cancellation when
126
+ \\ computing L(s), so a precision loss occurs. You then get a warning message
127
+ \\ - If you want to compute L(s), say, for s=1/2+100*I,
128
+ \\ set MaxImaginaryPart=100 before calling initLdata()
129
+ \\ - global variable PrecisionLoss holds the number of digits lost in
130
+ \\ the last calculation (independently of the MaxImaginaryPart setting)
131
+
132
+ MaxImaginaryPart = 0; \\ re-define this if you want to compute L(s)
133
+ \\ for large imaginary s (see ex-zeta2 for example)
134
+
135
+ MaxAsympCoeffs = 40; \\ At most this number of terms is generated
136
+ \\ in asymptotic series for phi(t) and G(s,t)
137
+ \\ default value of 40 seems to work generally well
138
+
139
+
140
+ /******************* IMPLEMENTATION OF THE PACKAGE ************************/
141
+
142
+
143
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
144
+ \\ Some helfpul functions \\
145
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
146
+
147
+ \\ Extraction operations on vectors
148
+ vecleft(v,n) = vecextract(v,concat("1..",Str(n)));
149
+ vecright(v,n) = vecextract(v,concat(Str(length(v)-n+1),concat("..",Str(length(v)))));
150
+
151
+ \\ Tabulate a string to n characters, e.g. StrTab(3,2)="3 ";
152
+ StrTab(x,n) = x=Str(x);while(length(x)<n,x=concat(x," "));x
153
+
154
+ \\ Concatenate up to 4 strings
155
+ concatstr(s1="",s2="",s3="",s4="")=concat(Str(s1),concat(Str(s2),concat(Str(s3),Str(s4))))
156
+
157
+ \\ Print a ``small error'', e.g. 0.00000013 as "1E-7"
158
+ {
159
+ errprint(x)=if(type(x)=="t_COMPLEX",x=abs(x));
160
+ if(x==0,concatstr("1E-",default(realprecision)+1),
161
+ concatstr(truncate(x/10^floor(log(abs(x))/log(10))),"E",floor(log(abs(x))/log(10))));
162
+ }
163
+
164
+
165
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
166
+ \\ gammaseries(z0,terms) \\
167
+ \\ Taylor series expansion of Gamma(z0+x) around 0, z0 arbitrary complex \\
168
+ \\ - up to O(x^(terms+1)) \\
169
+ \\ - uses current real precision \\
170
+ \\ See Luke "Mathematical functions and their approximations", section 1.4 \
171
+ \\ note a misprint there in the recursion formulas [(z-n) term in c3 below] \
172
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
173
+
174
+ {
175
+ gammaseries(z0,terms)=
176
+ local(Avec,Bvec,Qvec,n,z,err,res,c0,c1,c2,c3,sinser,reflect,digts,srprec,negint);
177
+
178
+ srprec=default(seriesprecision);
179
+ if (z0==real(round(z0)),z0=real(round(z0))); \\ you don't want to know
180
+ negint=type(z0)=="t_INT" && z0<=0; \\ z0 is a pole
181
+ default(seriesprecision,terms+1+negint);
182
+ if (terms==0 && !negint,res=gamma(z0)+O(x), \\ faster to use
183
+ if (terms==1 && !imag(z0) && !negint, \\ built-in functions
184
+ res=gamma(z0)*(1+psi(z0)*x+O(x^2)), \\ in special cases
185
+ if (z0==0, res=gamma(1+x)/x,
186
+ if (z0==1, res=gamma(1+x),
187
+ if (z0==2, res=gamma(1+x)*(1+x),
188
+ \\ otherwise use Luke's rational approximations for psi(x)
189
+ digts=default(realprecision); \\ save working precision
190
+ default(realprecision,digts+3); \\ and work with 3 digits more
191
+ reflect=real(z0)<0.5; \\ left of 1/2 use reflection formula
192
+ if (reflect,z0=1-z0);
193
+ z=subst(Ser(precision(1.*z0,digts+3)+X),X,x);
194
+ \\ work with z0+x as a variable gives power series in X as an answer
195
+ Avec=[1,(z+6)/2,(z^2+82*z+96)/6,(z^3+387*z^2+2906*z+1920)/12];
196
+ Bvec=[1,4,8*z+28,14*z^2+204*z+310];
197
+ Qvec=[0,0,0,Avec[4]/Bvec[4]];
198
+ n=4;
199
+ until(err<0.1^(digts+1.5), \\ Luke's recursions for psi(x)
200
+ c1=(2*n-1)*(3*(n-1)*z+7*n^2-9*n-6);
201
+ c2=-(2*n-3)*(z-n-1)*(3*(n-1)*z-7*n^2+19*n-4);
202
+ c3=(2*n-1)*(n-3)*(z-n)*(z-n-1)*(z+n-4);
203
+ c0=(2*n-3)*(n+1);
204
+ Avec=concat(Avec,[(c1*Avec[n]+c2*Avec[n-1]+c3*Avec[n-2])/c0]);
205
+ Bvec=concat(Bvec,[(c1*Bvec[n]+c2*Bvec[n-1]+c3*Bvec[n-2])/c0]);
206
+ Qvec=concat(Qvec,Avec[n+1]/Bvec[n+1]);
207
+ err=vecmax(abs(Vec(Qvec[n+1]-Qvec[n])));
208
+ n++;
209
+ );
210
+ res=gamma(z0)*exp(intformal( psi(1)+2*(z-1)/z*Qvec[n] )); \\ psi->gamma
211
+ if (reflect, \\ reflect if necessary
212
+ sinser=Vec(sin(Pi*z));
213
+ if (negint,sinser[1]=0); \\ taking slight care at integers<0
214
+ res=subst(Pi/res/Ser(sinser),x,-x);
215
+ );
216
+ default(realprecision,digts);
217
+ )))));
218
+ default(seriesprecision,srprec);
219
+ res;
220
+ }
221
+
222
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
223
+ \\ fullgamma(ss) - the full gamma factor (at s=ss) \\
224
+ \\ vA^s*Gamma((s+gammaV[1])/2)*...*Gamma((s+gammaV[d])/2) \\
225
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
226
+
227
+ {
228
+ fullgamma(ss) =
229
+ if(ss!=lastFGs,lastFGs=ss;
230
+ lastFGval=prod(j=1,length(gammaV),gamma((ss+gammaV[j])/2),vA^ss)
231
+ );
232
+ lastFGval;
233
+ }
234
+
235
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
236
+ \\ fullgammaseries(ss,extraterms) - Laurent series for the gamma factor \\
237
+ \\ without the exponential factor, i.e. \\
238
+ \\ Gamma((s+gammaV[1])/2)*...*Gamma((s+gammaV[d])/2) \\
239
+ \\ around s=ss with a given number of extra terms. The series variable is S.
240
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
241
+
242
+ {
243
+ fullgammaseries(ss,extraterms)=
244
+ local(digts,GSD);
245
+
246
+ digts=lfundigits;
247
+ if (lastFGSs!=ss || lastFGSterms!=extraterms,
248
+ GSD=sum(j=1,numpoles,(abs((ss+poles[j])/2-round(real((ss+poles[j])/2)))<10^(2-digts)) * PoleOrders[j] )+extraterms;
249
+ lastFGSs=ss;
250
+ lastFGSterms=extraterms;
251
+ lastFGSval=subst(prod(j=1,length(gammaV),gammaseries((ss+gammaV[j])/2,GSD)),x,S/2);
252
+ );
253
+ lastFGSval;
254
+ }
255
+
256
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
257
+ \\ RecursionsAtInfinity(gammaV) \\
258
+ \\ Recursions for the asymptotic expansion coefficients \\
259
+ \\ for phi(x) and G(s,x) at infinity. \\
260
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
261
+
262
+ {
263
+ RecursionsAtInfinity(gammaV)=
264
+ local(d,p,j,k,symvec,modsymvec,deltapol,recF,recG);
265
+
266
+ \\ d = number of Gamma-factors in question
267
+ \\ gammaV[k] = Gamma-factors
268
+ \\ symvec = vector of elementary symmetric functions
269
+ \\ 1, gammaV[1]+...+gammaV[d], ... , gammaV[1]*...*gammaV[d], 0
270
+ \\ modsymvec = symmetric expressions used in the formula
271
+
272
+ d = length(gammaV);
273
+ symvec = concat(Vec(prod(k=1,d,(x+gammaV[k]))),[0]);
274
+
275
+ modsymvec = vector(d+2,k,0);
276
+ for (j=0,d,
277
+ for (k=0,j,
278
+ modsymvec[j+1]+=(-symvec[2])^k*d^(j-1-k)*binomial(k+d-j,k)*symvec[j-k+1];
279
+ ));
280
+
281
+ \\ Delta polynomials
282
+ OldSeriesPrecision = default(seriesprecision);
283
+ default(seriesprecision,2*d+2);
284
+ deltapol=subst(Vec( (sinh(x)/x)^tvar ),tvar,x);
285
+ default(seriesprecision,OldSeriesPrecision);
286
+
287
+ \\ recursion coefficients for phi at infinity
288
+ recF=vector(d+1,p,
289
+ -1/2^p/d^(p-1)/n*sum(m=0,p,modsymvec[m+1]*prod(j=m,p-1,d-j)*
290
+ sum(k=0,floor((p-m)/2),(2*n-p+1)^(p-m-2*k)/(p-m-2*k)!*subst(deltapol[2*k+1],x,d-p))));
291
+
292
+ \\ recursion coefficients for G at infinity
293
+ recG=vector(d,p,recF[p+1]-(symvec[2]+d*(s-1)-2*(n-p)-1)/2/d*recF[p]);
294
+
295
+ [vector(d-1,p,recF[p+1]),recG] \\ return them both
296
+ }
297
+
298
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
299
+ \\ SeriesToContFrac(vec) \\
300
+ \\ Convert a power series vec[1]+vec[2]*x+vec[3]*x^2+... \\
301
+ \\ into a continued fraction expansion. \\
302
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
303
+
304
+ {
305
+ SeriesToContFrac(vec)=
306
+ local(res=[],ind);
307
+
308
+ vec=1.*vec;
309
+ while (1,
310
+ res=concat(res,[vec[1]]);
311
+ ind=0;
312
+ until(ind==length(vec) || abs(vec[ind+1])>10^-asympdigits,ind++;vec[ind]=0);
313
+ if(ind>=length(vec),break);
314
+ res=concat(res,[ind]);
315
+ vec=Vec(x^ind/Ser(vec));
316
+ );
317
+ res;
318
+ }
319
+
320
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
321
+ \\ EvaluateContFrac(cfvec,terms,t) \\
322
+ \\ Evaluate a continued fraction at x=t, using a given number of terms \\
323
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
324
+
325
+ {
326
+ EvaluateContFrac(cfvec,terms,t)=
327
+ local(res);
328
+
329
+ if (terms<0 || terms>length(cfvec)\2,terms=length(cfvec)\2);
330
+ res=cfvec[2*terms+1];
331
+ while(terms>0,res=if(res,cfvec[2*terms-1]+t^cfvec[2*terms]/res,10^asympdigits);terms--);
332
+ res;
333
+ }
334
+
335
+
336
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
337
+ \\ cflength( cutoff=1.2 ) \\
338
+ \\ \\
339
+ \\ number of coefficients necessary to work with L-series with \\
340
+ \\ current Gamma-factor gammaV, conductor, weight and working precision \\
341
+ \\ - CUTOFF specifies largest t used as a cutoff point in checkfeq(t) \\
342
+ \\ and L(...,t,...). Default is 1.2. Set it to 1 if checkfeq() \\
343
+ \\ is not to be used. \\
344
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
345
+
346
+ {
347
+ cflength(cutoff=1.2)=
348
+ local(vA,d,expdifff,asympconstf,err,t,t1=0,t2=2,tt,res,lfundigits);
349
+
350
+ vA = sqrt(conductor/Pi^length(gammaV));
351
+ d = length(gammaV);
352
+ lfundigits = default(realprecision) +
353
+ max(ceil(-log(abs(fullgamma(0.7*weight+MaxImaginaryPart*I)))/log(10)),0);
354
+ expdifff = (sum(k=1,d,gammaV[k])+1)/d-1;
355
+ asympconstf = 2*prod(k=1,d,gamma(k/d));
356
+ err = 10^(-lfundigits-0.5);
357
+ until (t2-t1<=1,
358
+ t = if(t1,(t1+t2)\2,t2);
359
+ tt = t/cutoff/vA;
360
+ res = coefgrow(t) * asympconstf*exp(-d*tt^(2/d))*tt^expdifff;
361
+ if (t1,if(abs(res)>err,t1=t,t2=t),if(abs(res)<err,t1=t2/2,t2*=2));
362
+ );
363
+ ceil(t2)
364
+ }
365
+
366
+
367
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
368
+ \\ initLdata(cfstr, cutoff=1.2 [,cfdualstr]) \\
369
+ \\ \\
370
+ \\ - to be called before the L-values computations. \\
371
+ \\ - gammaV, conductor and weight must be initialized by now. \\
372
+ \\ also coefgrow(), MaxImaginaryPart and MaxAsympCoeffs are used here \\
373
+ \\ - CFSTR must be a string which evaluates to a function of k \\
374
+ \\ which gives k-th coefficient of the L-series, e.g. "(-1)^k" \\
375
+ \\ - CUTOFF specifies largest t used as a cutoff point in checkfeq(t) \\
376
+ \\ and L(...,t,...). Default is 1.2. Set it to 1 if checkfeq() \\
377
+ \\ is not to be used. \\
378
+ \\ - if cutoff<0, force the number of coefficients to be -cutoff \\
379
+ \\ - CFDUALSTR must evaluate (like cfstr) to the k-th coefficient of \\
380
+ \\ the dual L-function if it is different from L(s), \\
381
+ \\ for instance initLdata("a(k)",,"conj(a(k))") (see e.g. ex-chgen) \\
382
+ \\ - uses current real precision to determine the desired precision \\
383
+ \\ for L-values \\
384
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
385
+
386
+ {
387
+ initLdata(vstr,cutoff=1.2,vdualstr="")=
388
+ local(len,d,pordtmp,recF,recG,terms);
389
+
390
+ if (type(gammaV)!="t_VEC",
391
+ error("Gamma-factor gammaV has to be defined before calling initLdata()"));
392
+ if (type(conductor)!="t_INT" && type(conductor)!="t_REAL",
393
+ error("conductor has to be defined before calling initLdata()"));
394
+
395
+ len=if(cutoff<0,-cutoff,cflength(cutoff));
396
+ cfvec=vector(len,k,eval(vstr));
397
+ if (vdualstr=="",cfdualvec=cfvec,cfdualvec=vector(len,k,eval(vdualstr)));
398
+ if (cutoff<0,len=cflength());
399
+
400
+ lastFGs = -1E99; \\ globals to track what was calculated last
401
+ lastFGSs = -1E99; \\ to avoid re-calculating same values each time
402
+ lastGs = [-1E99,-1E99];
403
+ lastLSs = [-1E99,-1E99];
404
+
405
+ d = length(gammaV); \\ d = number of gamma factors
406
+
407
+ \\ Calculate the necessary amount of extra digits
408
+
409
+ answerdigits = default(realprecision);
410
+ vA=sqrt(conductor/Pi^d);
411
+ lfundigits = answerdigits +
412
+ max(ceil(-log(abs(fullgamma(0.7*weight+MaxImaginaryPart*I)))/log(10)),0);
413
+ termdigits = lfundigits + floor(weight-1);
414
+ taylordigits = 2*termdigits;
415
+ asympdigits = termdigits;
416
+
417
+ \\ Exponential factor defined to maximal precision
418
+
419
+ default(realprecision,taylordigits);
420
+ vA = sqrt(precision(conductor,taylordigits)/Pi^d); \\ exp. factor
421
+ lastt = len/vA;
422
+
423
+ pordtmp = vector(d,k,1); \\ locate poles and their orders
424
+ for(j=1,d,for(k=1,d,if(j!=k,\
425
+ if(type(diff=gammaV[j]-gammaV[k])=="t_INT" & (diff%2==0) & (diff<=0),\
426
+ pordtmp[j]+=pordtmp[k];pordtmp[k]=0))));
427
+ poles = [];
428
+ PoleOrders = [];
429
+ for(j=1,d,if(pordtmp[j]!=0,\
430
+ poles=concat(poles,gammaV[j]);PoleOrders=concat(PoleOrders,pordtmp[j])));
431
+ numpoles = length(poles);
432
+
433
+ \\ Initialize the asymptotic coefficients at infinity
434
+
435
+ default(realprecision,asympdigits);
436
+
437
+ recFG=RecursionsAtInfinity(gammaV);
438
+ recF=recFG[1];
439
+ recG=recFG[2];
440
+ kill(recFG);
441
+
442
+ \\ Maximum number of terms in the asymptotic expansion
443
+
444
+ ncoeff=MaxAsympCoeffs;
445
+
446
+ \\ Asymptotic behaviour at infinity for phi and G
447
+
448
+ expdifff = (sum(k=1,d,gammaV[k])+1)/d-1;
449
+ asympconstf = 2*prod(k=1,d,gamma(k/d));
450
+ expdiffg = (sum(k=1,d,gammaV[k])+1)/d-1-2/d;
451
+ asympconstg = prod(k=1,d,gamma(k/d));
452
+
453
+ \\ Coefficients for the asymptotic expansion of phi(t) and G(t)
454
+
455
+ Fvec=vector(d+ncoeff,X,0);
456
+ Fvec[d]=1.;
457
+ for(y=1,ncoeff,Fvec[d+y]=1.*sum(j=1,d-1,subst(recF[j],n,y)*Fvec[d+y-j]));
458
+
459
+ Gvec=vector(d+ncoeff,X,0);
460
+ Gvec[d]=1.;
461
+ for(y=1,ncoeff,Gvec[d+y]=1.*sum(j=1,d,subst(recG[j],n,y)*Gvec[d+y-j]));
462
+
463
+ \\ Convert the Fvec (Taylor asymptotic) coefficients into fcf (contfrac coeffs)
464
+
465
+ fcf=SeriesToContFrac(vector(ncoeff+1,k,Fvec[d+k-1]));
466
+ fncf=length(fcf)\2; \\ at most ncoeff+1, less if terminates
467
+
468
+ \\ Taylor series coefficients of phi(t) around t=infinity
469
+
470
+ if (lastt<35,termstep=1,termstep=floor(lastt^(1/3)));
471
+ phiinfterms=vector(round(lastt/termstep)+1,k,-1);
472
+
473
+ terms=fncf;
474
+ PhiCaseBound=0;
475
+ for (k=1,length(phiinfterms),
476
+ t1=(k-1)*termstep;
477
+ while ((k>1)&&(terms>1)&&
478
+ (abs(phiinf(t1,terms-1)-phiinf(t1,terms)))<10^(-termdigits-1),terms-=1);
479
+ if (sum(j=1,terms,fcf[2*j])<ncoeff,phiinfterms[k]=terms,PhiCaseBound=k*termstep);
480
+ );
481
+
482
+ \\ Recursions for phi(t) and G(t,s) at the origin
483
+
484
+ default(realprecision,taylordigits);
485
+
486
+ \\ Initial values of the gamma factors for recursions
487
+
488
+ InitV = vector(numpoles,j,prod(k=1,d,
489
+ subst(gammaseries((-poles[j]+gammaV[k])/2,PoleOrders[j]-1),x,X/2)));
490
+
491
+ \\ Taylor series coefficients of phi(t) around t=0 -> phiVser
492
+
493
+ phiV = [];
494
+ phiVnn = 0;
495
+ phiVser = InitV;
496
+ until((phiVnn>3)&&(vecmax(abs(phiV[phiVnn]))*((PhiCaseBound+1)*vA)^(2*phiVnn)<10^(-termdigits-1)),
497
+ RecursephiV());
498
+
499
+ default(realprecision,answerdigits);
500
+ }
501
+
502
+
503
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
504
+ \\ phi(t) - inverse Mellin transform of the product of Gamma-factors \\
505
+ \\ computed either with Taylor in 0 or from asymptotics \\
506
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
507
+
508
+ phi(t)=if(t<PhiCaseBound,phi0(t),phiinf(t,phiinfterms[min(1+floor(abs(t)/termstep),length(phiinfterms))]));
509
+
510
+ {
511
+ RecursephiV()= \\ compute one more term for the recursions at the origin
512
+ phiVnn++;
513
+ phiV=concat(phiV,[matrix(numpoles,vecmax(PoleOrders),j,k,polcoeff(phiVser[j],-k))]);
514
+ for (j=1,numpoles,for(k=1,length(gammaV),
515
+ phiVser[j]/=(X/2-poles[j]/2-phiVnn+gammaV[k]/2)));
516
+ }
517
+
518
+ {
519
+ phi0(t)= \\ phi(t) using series expansion at t=0
520
+ local(t2,LogTTerm,TPower,res=0,nn=0,totalold);
521
+
522
+ default(realprecision,taylordigits);
523
+ t = precision(t,taylordigits);
524
+ t2 = t^2;
525
+ LogTTerm = vector(vecmax(PoleOrders),k,(-log(t))^(k-1)/(k-1)!)~;
526
+ TPower = 1.0*vector(numpoles,j,t^poles[j]);
527
+ until (abs(res-totalold)<10^-(termdigits+1)&&(nn>3),
528
+ totalold=res;
529
+ nn++;
530
+ if(nn>phiVnn,RecursephiV());
531
+ res+=TPower*phiV[nn]*LogTTerm;
532
+ TPower*=t2;
533
+ );
534
+ default(realprecision,termdigits);
535
+ res;
536
+ }
537
+
538
+ { \\ phi(t) using asymptotic expansion at infinity
539
+ phiinf(t,ncf=fncf)=
540
+ local(res,d,td2);
541
+
542
+ default(realprecision,asympdigits);
543
+ t=precision(t,asympdigits);
544
+ d=length(gammaV);
545
+ td2=t^(-2/d);
546
+ res=EvaluateContFrac(fcf,ncf,td2);
547
+ res=res*asympconstf*exp(-d/td2)*t^expdifff;
548
+ default(realprecision,termdigits);
549
+ res;
550
+ }
551
+
552
+
553
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
554
+ \\ G(t,s) - incomplete Mellin transform of phi(t) divided by x^s \\
555
+ \\ computed either with Taylor in 0 or from asymptotics \\
556
+ \\ G(t,s,k) - its k-th derivative (default 0) \\
557
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
558
+
559
+ {
560
+ G(t,ss,der=0)=
561
+ local(nn);
562
+
563
+ if(lastGs!=[ss,der] || type(Ginfterms)!="t_VEC",
564
+ initGinf(ss,der);lastGs=[ss,der]);
565
+ if(t<GCaseBound,G0(t,ss,der),
566
+ nn=min(1+floor(abs(t)/termstep),length(Ginfterms));
567
+ Ginf(t,ss,der,Ginfterms[nn]));
568
+ }
569
+
570
+
571
+ LogInt(i,j,logt,der)=\
572
+ if (abs(i)<10^(2-termdigits),0,sum(k=0,j-1,binomial((k-j),der)*der!*(-i*logt)^k/k!)/i^(j+der));
573
+
574
+ {
575
+ MakeLogSum(ss,der)=
576
+ local(nn,V,logsum);
577
+
578
+ if(length(LogSum)==phiVnn, \\ more phiV's necessary
579
+ for (j=1,floor(phiVnn/10)+1,RecursephiV()));
580
+ for (nn=length(LogSum)+1,phiVnn, \\ generate logsums
581
+ V=phiV[nn];
582
+ logsum=vector(numpoles,j,sum(k=1,PoleOrders[j],V[j,k]*LogInt(poles[j]+2*(nn-1)+ss,k,lt,der)))~;
583
+ LogSum=concat(LogSum,[logsum]);
584
+ );
585
+ lastLSs=[ss,der];
586
+ }
587
+
588
+ {
589
+ G0(t,ss,der)= \\ G(t,s,der) computed using Taylor series at 0
590
+ local(t2,LT,TPower,res,nn,term,gmser,gmcf,dgts);
591
+
592
+ default(realprecision,taylordigits);
593
+ ss = precision(ss,taylordigits);
594
+ if ([ss,der]!=lastLSs,LogSum=[]);
595
+ t = precision(t,taylordigits);
596
+ t2 = t^2; \\ time
597
+ LT = log(t); \\ = money
598
+ TPower = vector(numpoles,j,t^poles[j]);
599
+ res = 0;
600
+ nn = 0;
601
+ term = 1;
602
+ until ((nn>3) && abs(term)<10^-(termdigits+1),
603
+ nn++;
604
+ if(nn>length(LogSum),MakeLogSum(ss,der));
605
+ term=TPower*subst(LogSum[nn],lt,LT);
606
+ res+=term;
607
+ TPower*=t2;
608
+ );
609
+ gmser=fullgammaseries(ss,der)/t^(S+ss);
610
+ gmcf=polcoeff(gmser,der,S)*der!;
611
+ res=(gmcf-res);
612
+ default(realprecision,termdigits);
613
+ res;
614
+ }
615
+
616
+
617
+ {
618
+ Ginf(t,ss,der,ncf=-1)= \\ G(t,s,der) computed using asymptotic expansion
619
+ local(res,d,tt); \\ at infinity and associated continued fraction
620
+
621
+ default(realprecision,asympdigits);
622
+ ss=precision(ss,asympdigits);
623
+ t=precision(t,asympdigits);
624
+ if (ncf==-1,ncf=gncf);
625
+ d=length(gammaV);
626
+ tt=t^(-2/d);
627
+ res=EvaluateContFrac(gcf,ncf,tt);
628
+ res=asympconstg*exp(-d/tt)*t^expdiffg*tt^der*res;
629
+ default(realprecision,termdigits);
630
+ res;
631
+ }
632
+
633
+
634
+ {
635
+ initGinf(ss,der)= \\ pre-compute asymptotic expansions for a given s
636
+
637
+ local(d,gvec,gncf,terms,t1);
638
+ default(realprecision,asympdigits);
639
+ ss=precision(ss,asympdigits);
640
+ d=length(gammaV);
641
+ gvec=Gvec;
642
+ for (k=1,der,gvec=deriv(gvec,s);gvec=concat(vecright(gvec,length(gvec)-1),1));
643
+ gcf=SeriesToContFrac(vector(ncoeff+1,k,subst(gvec[d+k-1],s,ss)));
644
+ gncf=length(gcf)\2;
645
+ Ginfterms=vector(round(lastt/termstep)+1,k,-1);
646
+ terms=gncf;
647
+ GCaseBound=0;
648
+ for (k=1,length(Ginfterms),
649
+ t1=(k-1)*termstep;
650
+ while ((k>1)&&(terms>1)&&
651
+ (abs(Ginf(t1,ss,der,terms-1)-Ginf(t1,ss,der,terms)))<10^(-termdigits-2),terms-=1);
652
+ if (sum(j=1,terms,gcf[2*j])<ncoeff,Ginfterms[k]=terms,GCaseBound=k*termstep);
653
+ );
654
+ default(realprecision,termdigits);
655
+ }
656
+
657
+
658
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
659
+ \\ ltheta(t) = sum a(k)*phi(k*t/vA) \\
660
+ \\ satisfies ltheta(1/t)=sgn*t^weight*ldualtheta(t) + residue contribution \\
661
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
662
+
663
+ ltheta(t) = t=precision(t/vA,taylordigits);\
664
+ sum(k=1,min(floor(lastt/t+1),length(cfvec)),cfvec[k]*if(cfvec[k],phi(k*t),0));
665
+ ldualtheta(t) = t=precision(t/vA,taylordigits);\
666
+ sum(k=1,min(floor(lastt/t+1),length(cfvec)),cfdualvec[k]*if(cfdualvec[k],phi(k*t),0));
667
+
668
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
669
+ \\ checkfeq(t=1.2) = verify the functional equation by evaluating LHS-RHS \\
670
+ \\ for func.eq for ltheta(t), should return approx. 0 \\
671
+ \\ - also determines residues if Lresidues is set to automatic \\
672
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
673
+
674
+ {
675
+ checkfeq(t=6/5)= \\ determine residues if they are not yet set
676
+ local(nlp,lpx,lpv,lpm,res); \\ .. and check the functional equation
677
+
678
+ if (Lresidues==automatic && Lpoles!=[],
679
+ nlp=length(Lpoles);
680
+ lpx=vector(nlp,k,1.15+if(k==1,0,k-1)/10);
681
+ lpv=vector(nlp,k,tq=lpx[k];sgn*tq^weight*ldualtheta(tq)-ltheta(1/tq));
682
+ lpm=matrix(nlp,nlp,k,j,tq=lpx[k];ss=Lpoles[j];tq^ss-sgn*tq^(weight-ss));
683
+ Lresidues=matsolve(lpm,lpv~)~;
684
+ );
685
+ res=ltheta(t)-sgn*t^(-weight)*ldualtheta(1/t)+
686
+ sum(k=1,length(Lpoles),Lresidues[k]*(t^-Lpoles[k]-sgn*t^(-weight+Lpoles[k])));
687
+ default(realprecision,answerdigits);
688
+ res;
689
+ }
690
+
691
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
692
+ \\ L(ss,cutoff,k) = k-th derivative of L(s) at s=ss \\
693
+ \\ cutoff = 1 by default (cutoff point), >=1 in general \\
694
+ \\ must be equal to 1 if k>0 \\
695
+ \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
696
+
697
+ L(ss,cutoff=1,der=0)=polcoeff(Lseries(ss,cutoff,der),der)*der!
698
+
699
+
700
+ { \\ Lseries(s,,der) = L(s)+L'(s)S+L''(s)*S^2/2!+... ,first der terms
701
+ Lseries(ss,cutoff=1,der=0)=
702
+
703
+ local(FGSeries,LGSeries,res);
704
+
705
+ default(realprecision,lfundigits);
706
+ FGSeries = fullgammaseries(ss,der)*vA^(ss+S);
707
+ if (length(Lpoles) && (vecmin(abs(vector(length(Lpoles),k,Lpoles[k]-ss)))<10^(-answerdigits) ||
708
+ vecmin(abs(vector(length(Lpoles),k,weight-Lpoles[k]-ss)))<10^(-answerdigits)),
709
+ error("L*(s) has a pole at s=",ss));
710
+ \\ if (vecmin(abs(vector(length(Lpoles),k,Lpoles[k]-ss)))<10^(-answerdigits) ||
711
+ \\ vecmin(abs(vector(length(Lpoles),k,weight-Lpoles[k]-ss)))<10^(-answerdigits),
712
+ \\ error("L*(s) has a pole at s=",ss));
713
+ PrecisionLoss = ceil(-log(vecmax(abs(Vec(FGSeries))))/log(10))
714
+ -(lfundigits-answerdigits);
715
+ if (PrecisionLoss>1,
716
+ print("Warning: Loss of ",PrecisionLoss," digits due to cancellation"));
717
+ LSSeries = sum(k=0,der,Lstar(ss,cutoff,k)*S^k/k!)+O(S^(der+1));
718
+ res=LSSeries/FGSeries;
719
+ default(realprecision,answerdigits);
720
+ res;
721
+ }
722
+
723
+
724
+ {
725
+ Lstar(ss,cutoff=1,der=0)= \\ Lstar(s) = L(s) * Gamma factor
726
+ local(res,ncf1,ncf2);
727
+
728
+ if (der & (cutoff!=1),error("L(s,cutoff,k>0) is only implemented for cutoff=1"));
729
+ ss = precision(ss,taylordigits);
730
+ cutoff = precision(cutoff,taylordigits);
731
+ ncf1 = min(round(lastt*vA*cutoff),length(cfvec));
732
+ ncf2 = min(round(lastt*vA/cutoff),length(cfvec));
733
+ default(realprecision,termdigits);
734
+ res=(-sum(k=1,length(Lpoles),(-1)^der*der!*Lresidues[k]/(ss-Lpoles[k])^(der+1)*cutoff^(-Lpoles[k]))
735
+ -sgn*sum(k=1,length(Lpoles),Lresidues[k]*der!/(weight-Lpoles[k]-ss)^(der+1)*cutoff^(-weight+Lpoles[k]))
736
+ +sgn*sum(k=1,ncf1,if(cfdualvec[k],cfdualvec[k]*(-1)^der*G(k/vA/cutoff,weight-ss,der),0)/cutoff^weight)
737
+ +sum(k=1,ncf2,if(cfvec[k],cfvec[k]*G(k*cutoff/vA,ss,der),0))
738
+ )*cutoff^ss;
739
+ res;
740
+ }