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,421 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+ # sage.doctest: needs sage.libs.pari sage.modules
3
+ """
4
+ Local Normal Form
5
+ """
6
+ # ****************************************************************************
7
+ # Copyright (C) 2007 William Stein and Jonathan Hanke
8
+ #
9
+ # Distributed under the terms of the GNU General Public License (GPL)
10
+ #
11
+ # This code is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
+ # General Public License for more details.
15
+ #
16
+ # The full text of the GPL is available at:
17
+ #
18
+ # https://www.gnu.org/licenses/
19
+ # ****************************************************************************
20
+
21
+ import copy
22
+
23
+ from sage.rings.infinity import Infinity
24
+ from sage.rings.integer_ring import ZZ
25
+ from sage.rings.rational_field import QQ
26
+ from sage.arith.misc import GCD, valuation, is_prime
27
+
28
+
29
+ def find_entry_with_minimal_scale_at_prime(self, p):
30
+ r"""
31
+ Find the entry of the quadratic form with minimal scale at the
32
+ prime `p`, preferring diagonal entries in case of a tie.
33
+
34
+ (I.e. If
35
+ we write the quadratic form as a symmetric matrix `M`, then this
36
+ entry ``M[i,j]`` has the minimal valuation at the prime `p`.)
37
+
38
+ .. NOTE::
39
+
40
+ This answer is independent of the kind of matrix (Gram or
41
+ Hessian) associated to the form.
42
+
43
+ INPUT:
44
+
45
+ - ``p`` -- a prime number > 0
46
+
47
+ OUTPUT: a pair of integers `\geq 0`
48
+
49
+ EXAMPLES::
50
+
51
+ sage: Q = QuadraticForm(ZZ, 2, [6, 2, 20]); Q
52
+ Quadratic form in 2 variables over Integer Ring with coefficients:
53
+ [ 6 2 ]
54
+ [ * 20 ]
55
+ sage: Q.find_entry_with_minimal_scale_at_prime(2)
56
+ (0, 1)
57
+ sage: Q.find_entry_with_minimal_scale_at_prime(3)
58
+ (1, 1)
59
+ sage: Q.find_entry_with_minimal_scale_at_prime(5)
60
+ (0, 0)
61
+ """
62
+ n = self.dim()
63
+ min_val = Infinity
64
+ ij_index = None
65
+ val_2 = valuation(2, p)
66
+ for d in range(n): # d = difference j-i
67
+ for e in range(n - d): # e is the length of the diagonal with value d.
68
+
69
+ # Compute the valuation of the entry
70
+ if d == 0:
71
+ tmp_val = valuation(self[e, e + d], p)
72
+ else:
73
+ tmp_val = valuation(self[e, e + d], p) - val_2
74
+
75
+ # Check if it's any smaller than what we have
76
+ if tmp_val < min_val:
77
+ ij_index = (e, e + d)
78
+ min_val = tmp_val
79
+
80
+ # Return the result
81
+ return ij_index
82
+
83
+
84
+ def local_normal_form(self, p):
85
+ r"""
86
+ Return a locally integrally equivalent quadratic form over
87
+ the `p`-adic integers `\ZZ_p` which gives the Jordan decomposition.
88
+
89
+ The Jordan components are written as sums of blocks of size `\leq 2`
90
+ and are arranged by increasing scale, and then by increasing norm.
91
+ This is equivalent to saying that we put the `1 \times 1` blocks before
92
+ the `2 \times 2` blocks in each Jordan component.
93
+
94
+ INPUT:
95
+
96
+ - ``p`` -- a positive prime number
97
+
98
+ OUTPUT: a quadratic form over `\ZZ`
99
+
100
+ .. WARNING::
101
+
102
+ Currently this only works for quadratic forms defined over `\ZZ`.
103
+
104
+ EXAMPLES::
105
+
106
+ sage: Q = QuadraticForm(ZZ, 2, [10,4,1])
107
+ sage: Q.local_normal_form(5)
108
+ Quadratic form in 2 variables over Integer Ring with coefficients:
109
+ [ 1 0 ]
110
+ [ * 6 ]
111
+
112
+ ::
113
+
114
+ sage: Q.local_normal_form(3)
115
+ Quadratic form in 2 variables over Integer Ring with coefficients:
116
+ [ 10 0 ]
117
+ [ * 15 ]
118
+
119
+ sage: Q.local_normal_form(2)
120
+ Quadratic form in 2 variables over Integer Ring with coefficients:
121
+ [ 1 0 ]
122
+ [ * 6 ]
123
+ """
124
+ # Sanity Checks
125
+ if self.base_ring() != ZZ:
126
+ raise NotImplementedError("this currently only works for quadratic forms defined over ZZ")
127
+ if not (p >= 2 and is_prime(p)):
128
+ raise TypeError("p is not a positive prime number")
129
+
130
+ # Some useful local variables
131
+ Q = self.parent()(self.base_ring(), self.dim(), self.coefficients())
132
+
133
+ # Prepare the final form to return
134
+ Q_Jordan = copy.deepcopy(self)
135
+ Q_Jordan.__init__(self.base_ring(), 0)
136
+
137
+ while Q.dim() > 0:
138
+ n = Q.dim()
139
+
140
+ # Step 1: Find the minimally p-divisible matrix entry, preferring diagonals
141
+ # -------------------------------------------------------------------------
142
+ (min_i, min_j) = Q.find_entry_with_minimal_scale_at_prime(p)
143
+ if min_i == min_j:
144
+ min_val = valuation(2 * Q[min_i, min_j], p)
145
+ else:
146
+ min_val = valuation(Q[min_i, min_j], p)
147
+
148
+ # Error if we still haven't seen nonzero coefficients!
149
+ if min_val == Infinity:
150
+ raise RuntimeError("the original matrix is degenerate")
151
+
152
+ # Step 2: Arrange for the upper leftmost entry to have minimal valuation
153
+ # ----------------------------------------------------------------------
154
+ if min_i == min_j:
155
+ block_size = 1
156
+ Q.swap_variables(0, min_i, in_place=True)
157
+ else:
158
+ # Work in the upper-left 2x2 block, and replace it by its 2-adic equivalent form
159
+ Q.swap_variables(0, min_i, in_place=True)
160
+ Q.swap_variables(1, min_j, in_place=True)
161
+
162
+ # 1x1 => make upper left the smallest
163
+ if p != 2:
164
+ block_size = 1
165
+ Q.add_symmetric(1, 0, 1, in_place=True)
166
+ # 2x2 => replace it with the appropriate 2x2 matrix
167
+ else:
168
+ block_size = 2
169
+
170
+ # Step 3: Clear out the remaining entries
171
+ # ---------------------------------------
172
+ min_scale = p ** min_val # This is the minimal valuation of the Hessian matrix entries.
173
+
174
+ # Perform cancellation over Z by ensuring divisibility
175
+ if block_size == 1:
176
+ a = 2 * Q[0, 0]
177
+ for j in range(block_size, n):
178
+ b = Q[0, j]
179
+ g = GCD(a, b)
180
+
181
+ # Sanity Check: a/g is a p-unit
182
+ if valuation(g, p) != valuation(a, p):
183
+ raise RuntimeError("we have a problem with our rescaling not preserving p-integrality")
184
+
185
+ Q.multiply_variable(ZZ(a / g), j, in_place=True) # Ensures that the new b entry is divisible by a
186
+ Q.add_symmetric(ZZ(-b / g), j, 0, in_place=True) # Performs the cancellation
187
+
188
+ elif block_size == 2:
189
+ a1 = 2 * Q[0, 0]
190
+ a2 = Q[0, 1]
191
+ b1 = Q[1, 0] # This is the same as a2
192
+ b2 = 2 * Q[1, 1]
193
+
194
+ big_det = a1 * b2 - a2 * b1
195
+ small_det = big_det / (min_scale * min_scale)
196
+
197
+ # Cancels out the rows/columns of the 2x2 block
198
+ for j in range(block_size, n):
199
+ a = Q[0, j]
200
+ b = Q[1, j]
201
+
202
+ # Ensures an integral result (scale jth row/column by big_det)
203
+ Q.multiply_variable(big_det, j, in_place=True)
204
+
205
+ # Performs the cancellation (by producing -big_det * jth row/column)
206
+ Q.add_symmetric(ZZ(-(a * b2 - b * a2)), j, 0, in_place=True)
207
+ Q.add_symmetric(ZZ(-(-a * b1 + b * a1)), j, 1, in_place=True)
208
+
209
+ # Now remove the extra factor (non p-unit factor) in big_det we introduced above
210
+ Q.divide_variable(ZZ(min_scale * min_scale), j, in_place=True)
211
+
212
+ # Uses Cassels's proof to replace the remaining 2 x 2 block
213
+ if (1 + small_det) % 8 == 0:
214
+ Q[0, 0] = 0
215
+ Q[1, 1] = 0
216
+ Q[0, 1] = min_scale
217
+ elif (5 + small_det) % 8 == 0:
218
+ Q[0, 0] = min_scale
219
+ Q[1, 1] = min_scale
220
+ Q[0, 1] = min_scale
221
+ else:
222
+ raise RuntimeError("Error in LocalNormal: Impossible behavior for a 2x2 block! \n")
223
+
224
+ # Check that the cancellation worked, extract the upper-left block, and trim Q to handle the next block.
225
+ for i in range(block_size):
226
+ for j in range(block_size, n):
227
+ if Q[i, j] != 0:
228
+ raise RuntimeError(f"the cancellation did not work properly at entry ({i},{j})")
229
+ Q_Jordan = Q_Jordan + Q.extract_variables(range(block_size))
230
+ Q = Q.extract_variables(range(block_size, n))
231
+
232
+ return Q_Jordan
233
+
234
+
235
+ def jordan_blocks_by_scale_and_unimodular(self, p, safe_flag=True):
236
+ r"""
237
+ Return a list of pairs `(s_i, L_i)` where `L_i` is a maximal
238
+ `p^{s_i}`-unimodular Jordan component which is further decomposed into
239
+ block diagonals of block size `\le 2`.
240
+
241
+ For each `L_i` the `2 \times 2` blocks are listed after the `1 \times 1` blocks
242
+ (which follows from the convention of the
243
+ :meth:`local_normal_form` method).
244
+
245
+ .. NOTE::
246
+
247
+ The decomposition of each `L_i` into smaller blocks is not unique!
248
+
249
+ The ``safe_flag`` argument allows us to select whether we want a copy of
250
+ the output, or the original output. By default ``safe_flag = True``, so we
251
+ return a copy of the cached information. If this is set to ``False``, then
252
+ the routine is much faster but the return values are vulnerable to being
253
+ corrupted by the user.
254
+
255
+ INPUT:
256
+
257
+ - ``p`` -- a prime number > 0
258
+
259
+ OUTPUT:
260
+
261
+ A list of pairs `(s_i, L_i)` where:
262
+
263
+ - `s_i` is an integer,
264
+ - `L_i` is a block-diagonal unimodular quadratic form over `\ZZ_p`.
265
+
266
+ .. NOTE::
267
+
268
+ These forms `L_i` are defined over the `p`-adic integers, but by a
269
+ matrix over `\ZZ` (or `\QQ`?).
270
+
271
+ EXAMPLES::
272
+
273
+ sage: Q = DiagonalQuadraticForm(ZZ, [1,9,5,7])
274
+ sage: Q.jordan_blocks_by_scale_and_unimodular(3)
275
+ [(0, Quadratic form in 3 variables over Integer Ring with coefficients:
276
+ [ 1 0 0 ]
277
+ [ * 5 0 ]
278
+ [ * * 7 ]),
279
+ (2, Quadratic form in 1 variables over Integer Ring with coefficients:
280
+ [ 1 ])]
281
+
282
+ ::
283
+
284
+ sage: Q2 = QuadraticForm(ZZ, 2, [1,1,1])
285
+ sage: Q2.jordan_blocks_by_scale_and_unimodular(2)
286
+ [(-1, Quadratic form in 2 variables over Integer Ring with coefficients:
287
+ [ 2 2 ]
288
+ [ * 2 ])]
289
+ sage: Q = Q2 + Q2.scale_by_factor(2)
290
+ sage: Q.jordan_blocks_by_scale_and_unimodular(2)
291
+ [(-1, Quadratic form in 2 variables over Integer Ring with coefficients:
292
+ [ 2 2 ]
293
+ [ * 2 ]),
294
+ (0, Quadratic form in 2 variables over Integer Ring with coefficients:
295
+ [ 2 2 ]
296
+ [ * 2 ])]
297
+ """
298
+ # Try to use the cached result
299
+ try:
300
+ if safe_flag:
301
+ return copy.deepcopy(self.__jordan_blocks_by_scale_and_unimodular_dict[p])
302
+ else:
303
+ return self.__jordan_blocks_by_scale_and_unimodular_dict[p]
304
+ except (KeyError, AttributeError):
305
+ # Initialize the global dictionary if it doesn't exist
306
+ if not hasattr(self, '__jordan_blocks_by_scale_and_unimodular_dict'):
307
+ self.__jordan_blocks_by_scale_and_unimodular_dict = {}
308
+
309
+ # Deal with zero dim'l forms
310
+ if self.dim() == 0:
311
+ return []
312
+
313
+ # Find the Local Normal form of Q at p
314
+ Q1 = self.local_normal_form(p)
315
+
316
+ # Parse this into Jordan Blocks
317
+ n = Q1.dim()
318
+ tmp_Jordan_list = []
319
+ i = 0
320
+ start_ind = 0
321
+ if n >= 2 and Q1[0, 1] != 0:
322
+ start_scale = valuation(Q1[0, 1], p) - 1
323
+ else:
324
+ start_scale = valuation(Q1[0, 0], p)
325
+
326
+ while i < n:
327
+
328
+ # Determine the size of the current block
329
+ if i == n - 1 or Q1[i, i + 1] == 0:
330
+ block_size = 1
331
+ else:
332
+ block_size = 2
333
+
334
+ # Determine the valuation of the current block
335
+ if block_size == 1:
336
+ block_scale = valuation(Q1[i, i], p)
337
+ else:
338
+ block_scale = valuation(Q1[i, i + 1], p) - 1
339
+
340
+ # Process the previous block if the valuation increased
341
+ if block_scale > start_scale:
342
+ tmp_Jordan_list += [(start_scale, Q1.extract_variables(range(start_ind, i)).scale_by_factor(ZZ.one() / QQ(p)**start_scale))]
343
+ start_ind = i
344
+ start_scale = block_scale
345
+
346
+ # Increment the index
347
+ i += block_size
348
+
349
+ # Add the last block
350
+ tmp_Jordan_list += [(start_scale, Q1.extract_variables(range(start_ind, n)).scale_by_factor(ZZ.one() / QQ(p)**start_scale))]
351
+
352
+ # Cache the result
353
+ self.__jordan_blocks_by_scale_and_unimodular_dict[p] = tmp_Jordan_list
354
+
355
+ # Return the result
356
+ return tmp_Jordan_list
357
+
358
+
359
+ def jordan_blocks_in_unimodular_list_by_scale_power(self, p):
360
+ r"""
361
+ Return a list of Jordan components, whose component at index `i`
362
+ should be scaled by the factor `p^i`.
363
+
364
+ This is only defined for integer-valued quadratic forms
365
+ (i.e., forms with base ring `\ZZ`), and the indexing only works
366
+ correctly for `p=2` when the form has an integer Gram matrix.
367
+
368
+ INPUT:
369
+
370
+ - ``self`` -- a quadratic form over `\ZZ`, which has integer Gram matrix if `p = 2`
371
+ - ``p`` -- a prime number > 0
372
+
373
+ OUTPUT: list of `p`-unimodular quadratic forms
374
+
375
+ EXAMPLES::
376
+
377
+ sage: Q = QuadraticForm(ZZ, 3, [2, -2, 0, 3, -5, 4])
378
+ sage: Q.jordan_blocks_in_unimodular_list_by_scale_power(2)
379
+ Traceback (most recent call last):
380
+ ...
381
+ TypeError: the given quadratic form has a Jordan component with a negative scale exponent
382
+
383
+ sage: Q.scale_by_factor(2).jordan_blocks_in_unimodular_list_by_scale_power(2)
384
+ [Quadratic form in 2 variables over Integer Ring with coefficients:
385
+ [ 0 2 ]
386
+ [ * 0 ],
387
+ Quadratic form in 0 variables over Integer Ring with coefficients:
388
+ ,
389
+ Quadratic form in 1 variables over Integer Ring with coefficients:
390
+ [ 345 ]]
391
+
392
+ sage: Q.jordan_blocks_in_unimodular_list_by_scale_power(3)
393
+ [Quadratic form in 2 variables over Integer Ring with coefficients:
394
+ [ 2 0 ]
395
+ [ * 10 ],
396
+ Quadratic form in 1 variables over Integer Ring with coefficients:
397
+ [ 2 ]]
398
+ """
399
+ # Sanity Check
400
+ if self.base_ring() != ZZ:
401
+ raise TypeError("this method only makes sense for integer-valued quadratic forms (i.e. defined over ZZ)")
402
+
403
+ # Deal with zero dim'l forms
404
+ if self.dim() == 0:
405
+ return []
406
+
407
+ # Find the Jordan Decomposition
408
+ list_of_jordan_pairs = self.jordan_blocks_by_scale_and_unimodular(p)
409
+ scale_list = [P[0] for P in list_of_jordan_pairs]
410
+ s_max = max(scale_list)
411
+ if min(scale_list) < 0:
412
+ raise TypeError("the given quadratic form has a Jordan component with a negative scale exponent")
413
+
414
+ # Make the new list of unimodular Jordan components
415
+ zero_form = self.parent()(ZZ, 0)
416
+ list_by_scale = [zero_form for _ in range(s_max + 1)]
417
+ for P in list_of_jordan_pairs:
418
+ list_by_scale[P[0]] = P[1]
419
+
420
+ # Return the new list
421
+ return list_by_scale