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,29 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+ from sage.rings.padics.pow_computer cimport PowComputer_class
3
+ from sage.rings.polynomial.polynomial_element cimport Polynomial_generic_dense
4
+
5
+ cdef class PowComputer_relative(PowComputer_class):
6
+ # p-adic elements are represented by polynomials in this ring
7
+ cdef public object poly_ring
8
+ # the p-adic ring is an extension of this base ring
9
+ cdef public object base_ring
10
+ # the modulus of the extension
11
+ cdef public Polynomial_generic_dense modulus
12
+ # storage for temporary variables used in the linkage files
13
+ cdef Polynomial_generic_dense tmp_cconv_out
14
+ cdef Polynomial_generic_dense tmp_ccoeffs
15
+ cdef Polynomial_generic_dense tmp_ccoeffs_frac
16
+ cdef Polynomial_generic_dense tmp_ccmp_a
17
+ cdef Polynomial_generic_dense tmp_ccmp_b
18
+ cdef Polynomial_generic_dense shift_rem
19
+ cdef Polynomial_generic_dense aliasing
20
+ # allow cached methods
21
+ cdef public dict _cached_methods
22
+
23
+ cdef unsigned long capdiv(self, unsigned long n) noexcept
24
+
25
+ cdef class PowComputer_relative_eis(PowComputer_relative):
26
+ # (x^e - modulus)/p
27
+ cdef public Polynomial_generic_dense _shift_seed
28
+ cdef public Polynomial_generic_dense _inv_shift_seed
29
+ cpdef Polynomial_generic_dense invert(self, Polynomial_generic_dense element, long prec)
@@ -0,0 +1,415 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+ # distutils: libraries = NTL_LIBRARIES gmp M_LIBRARIES
3
+ # distutils: extra_compile_args = NTL_CFLAGS
4
+ # distutils: include_dirs = NTL_INCDIR
5
+ # distutils: library_dirs = NTL_LIBDIR
6
+ # distutils: extra_link_args = NTL_LIBEXTRA
7
+ # distutils: language = c++
8
+ r"""
9
+ A ``PowComputer`` for relative extensions
10
+
11
+ This module provides helper classes for the various kinds of relative `p`-adic
12
+ extensions. You should never have to access these directly, unless you are
13
+ working on linkages or other low-level `p`-adics code within the Sage library.
14
+
15
+ AUTHORS:
16
+
17
+ - David Roe, Julian Rüth (2017-06-11): initial version
18
+ """
19
+ # ****************************************************************************
20
+ # Copyright (C) 2017 David Roe <roed.math@gmail.com>
21
+ # 2017 Julian Rüth <julian.rueth@fsfe.org>
22
+ #
23
+ # Distributed under the terms of the GNU General Public License (GPL)
24
+ # as published by the Free Software Foundation; either version 2 of
25
+ # the License, or (at your option) any later version.
26
+ #
27
+ # https://www.gnu.org/licenses/
28
+ # ****************************************************************************
29
+
30
+ from sage.rings.integer cimport Integer
31
+ from sage.misc.cachefunc import cached_method
32
+
33
+
34
+ cdef class PowComputer_relative(PowComputer_class):
35
+ r"""
36
+ Base class for a ``PowComputer`` for use in `p`-adics implemented by Sage
37
+ Polynomials.
38
+
39
+ For a description of inputs see :func:`PowComputer_relative_maker`.
40
+
41
+ EXAMPLES::
42
+
43
+ sage: # needs sage.libs.flint
44
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
45
+ sage: R.<a> = ZqFM(25)
46
+ sage: S.<x> = R[]
47
+ sage: f = x^3 - 5*x - 5*a
48
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
49
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
50
+ sage: PC = PowComputer_relative_maker(3, 20, 20, 60, False, f, shift_seed, 'fixed-mod')
51
+
52
+ TESTS::
53
+
54
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative
55
+ sage: isinstance(PC, PowComputer_relative) # needs sage.libs.flint
56
+ True
57
+ """
58
+ def __cinit__(self, Integer prime, long cache_limit, long prec_cap, long ram_prec_cap, bint in_field, poly, shift_seed):
59
+ r"""
60
+ TESTS::
61
+
62
+ sage: # needs sage.libs.flint
63
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
64
+ sage: R.<a> = ZqFM(25)
65
+ sage: S.<x> = R[]
66
+ sage: f = x^3 - 5*x - 5*a
67
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
68
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
69
+ sage: PC = PowComputer_relative_maker(3, 20, 20, 60, False, f, shift_seed, 'fixed-mod')
70
+ """
71
+ self._allocated = 4
72
+
73
+ def __init__(self, Integer prime, long cache_limit, long prec_cap, long ram_prec_cap, bint in_field, poly, shift_seed):
74
+ r"""
75
+ TESTS::
76
+
77
+ sage: # needs sage.libs.flint
78
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
79
+ sage: R.<a> = ZqFM(25)
80
+ sage: S.<x> = R[]; f = x^3 - 5*x - 5*a
81
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
82
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
83
+ sage: PC = PowComputer_relative_maker(5, 20, 20, 60, False, f, shift_seed, 'fixed-mod') # indirect doctest
84
+ sage: TestSuite(PC).run()
85
+ """
86
+ PowComputer_class.__init__(self, prime, cache_limit, prec_cap, ram_prec_cap, in_field, poly, shift_seed)
87
+ self.e = poly.degree() * poly.base_ring().absolute_e()
88
+ self.f = poly.base_ring().absolute_f()
89
+
90
+ self.modulus = poly
91
+
92
+ self.tmp_cconv_out = poly.parent()()
93
+ self.tmp_ccoeffs = poly.parent()()
94
+ self.tmp_ccmp_a = poly.parent()()
95
+ self.tmp_ccmp_b = poly.parent()()
96
+ self.shift_rem = poly.parent()()
97
+ self.aliasing = poly.parent()()
98
+
99
+ self.base_ring = poly.base_ring()
100
+ self.poly_ring = poly.parent()
101
+ self._shift_seed = shift_seed
102
+
103
+ def __dealloc__(self):
104
+ r"""
105
+ TESTS::
106
+
107
+ sage: # needs sage.libs.flint
108
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
109
+ sage: R.<a> = ZqFM(25)
110
+ sage: S.<x> = R[]
111
+ sage: f = x^3 - 5*x - 5*a
112
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
113
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
114
+ sage: PC = PowComputer_relative_maker(5, 20, 20, 60, False, f, shift_seed, 'fixed-mod')
115
+ sage: del PC
116
+ """
117
+
118
+ def __reduce__(self):
119
+ r"""
120
+ Return a picklable representation of this ``PowComputer``.
121
+
122
+ TESTS::
123
+
124
+ sage: # needs sage.libs.flint
125
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
126
+ sage: R.<a> = ZqFM(25)
127
+ sage: S.<x> = R[]
128
+ sage: f = x^3 - 5*x - 5*a
129
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
130
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
131
+ sage: PC = PowComputer_relative_maker(5, 20, 20, 60, False, f, shift_seed, 'fixed-mod') # indirect doctest
132
+ sage: loads(dumps(PC)) == PC
133
+ True
134
+ """
135
+ return PowComputer_relative_maker, (self.prime, self.cache_limit, self.prec_cap, self.ram_prec_cap, self.in_field, self.polynomial(), self._shift_seed, self._prec_type)
136
+
137
+ def _repr_(self):
138
+ r"""
139
+ Return a string representation of this ``PowComputer``.
140
+
141
+ EXAMPLES::
142
+
143
+ sage: # needs sage.libs.flint
144
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
145
+ sage: R.<a> = ZqFM(25,print_pos=False,show_prec=False)
146
+ sage: S.<x> = R[]
147
+ sage: f = x^3 + 5*x + 5*a
148
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
149
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
150
+ sage: PowComputer_relative_maker(5, 20, 20, 60, False, f, shift_seed, 'fixed-mod') # indirect doctest
151
+ Relative PowComputer for modulus x^3 + 5*x + a*5
152
+ """
153
+ return "Relative PowComputer for modulus %s" % (self.modulus,)
154
+
155
+ cdef unsigned long capdiv(self, unsigned long n) noexcept:
156
+ r"""
157
+ Return `\lceil n/e \rceil`.
158
+ """
159
+ if self.e == 1:
160
+ return n
161
+ if n == 0:
162
+ return 0
163
+ return (n - 1)/self.e + 1
164
+
165
+ def polynomial(self, n=None, var='x'):
166
+ r"""
167
+ Return the modulus of the `p`-adic extension that is handled by this
168
+ ``PowComputer``.
169
+
170
+ EXAMPLES::
171
+
172
+ sage: # needs sage.libs.flint
173
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
174
+ sage: R.<a> = ZqFM(25)
175
+ sage: S.<x> = R[]; f = x^3 - 5*x - 5*a
176
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
177
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
178
+ sage: PC = PowComputer_relative_maker(5, 20, 20, 60, False, f, shift_seed, 'fixed-mod') # indirect doctest
179
+ sage: PC.polynomial() is f
180
+ True
181
+ """
182
+ return self.modulus
183
+
184
+
185
+ cdef class PowComputer_relative_eis(PowComputer_relative):
186
+ r"""
187
+ A ``PowComputer`` for a relative extension defined by an Eisenstein polynomial.
188
+
189
+ For a description of inputs see :func:`PowComputer_relative_maker`.
190
+
191
+ EXAMPLES::
192
+
193
+ sage: # needs sage.libs.flint
194
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_eis, PowComputer_relative_maker
195
+ sage: R.<a> = ZqFM(25)
196
+ sage: S.<x> = R[]; f = x^3 - 5*x - 5*a
197
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
198
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
199
+ sage: PC = PowComputer_relative_maker(5, 20, 20, 60, False, f, shift_seed, 'fixed-mod')
200
+
201
+ TESTS::
202
+
203
+ sage: isinstance(PC, PowComputer_relative_eis) # needs sage.libs.flint
204
+ True
205
+ """
206
+ def __init__(self, Integer prime, long cache_limit, long prec_cap, long ram_prec_cap, bint in_field, poly, shift_seed):
207
+ r"""
208
+ TESTS::
209
+
210
+ sage: # needs sage.libs.flint
211
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
212
+ sage: R.<a> = ZqFM(25)
213
+ sage: S.<x> = R[]; f = x^3 - 5*x - 5*a
214
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
215
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
216
+ sage: PC = PowComputer_relative_maker(5, 20, 20, 60, False, f, shift_seed, 'fixed-mod')
217
+ sage: TestSuite(PC).run()
218
+ """
219
+ PowComputer_relative.__init__(self, prime, cache_limit, prec_cap, ram_prec_cap, in_field, poly, shift_seed)
220
+ self._inv_shift_seed = self.invert(shift_seed, self.ram_prec_cap)
221
+
222
+ cpdef Polynomial_generic_dense invert(self, Polynomial_generic_dense a, long prec):
223
+ r"""
224
+ Return the inverse of ``a``.
225
+
226
+ INPUT:
227
+
228
+ - ``a`` -- a `p`-adic element, represented as a reduced
229
+ Polynomial in ``poly_ring``
230
+
231
+ - ``prec`` -- a ``long``, the required precision
232
+
233
+ OUTPUT: a polynomial ``b`` such that ``a*b`` is one modulo `π^\mathrm{prec}`
234
+
235
+ EXAMPLES::
236
+
237
+ sage: # needs sage.libs.flint
238
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
239
+ sage: R.<a> = ZqFM(25,3)
240
+ sage: S.<x> = R[]; f = x^3 - 5*x - 5*a
241
+ sage: W.<w> = R.ext(f)
242
+ sage: g = 1 + 2*w; ginv = ~g
243
+ sage: ginv
244
+ 1 + 3*w + 4*w^2 + 2*w^3 + (3*a + 3)*w^4 + ... + (3*a + 2)*w^8
245
+ sage: RFP = R.change(field=False, show_prec=False, type='floating-point')
246
+ sage: shift_seed = (-f[:3] // 5).change_ring(RFP)
247
+ sage: PC = PowComputer_relative_maker(5, 3, 3, 9, False, f, shift_seed, 'fixed-mod')
248
+ sage: g = 1 + 2*x
249
+ sage: ginv = PC.invert(g, 5); ginv
250
+ (4 + (3*a + 1)*5 + (2*a + 2)*5^2)*x^2 + (3 + (a + 1)*5 + (3*a + 2)*5^2)*x + 1 + 2*a*5 + 2*5^2
251
+ """
252
+ k = self.base_ring.residue_field()
253
+ a0 = k(a[0])
254
+ if a0.is_zero():
255
+ raise ValueError("element has no inverse")
256
+ K = self.base_ring.change(field=True)
257
+ Qpmodulus = self.modulus.change_ring(K)
258
+ Qpa = a.change_ring(K)
259
+ R = Qpa.parent()
260
+ inv = R([~a0])
261
+ curprec = 1
262
+ while curprec < prec:
263
+ # Newton iteration
264
+ inv = 2*inv - inv**2 * Qpa
265
+ curprec *= 2
266
+ inv = inv % Qpmodulus
267
+ return inv.change_ring(self.base_ring)
268
+
269
+ @cached_method
270
+ def px_pow(self, r):
271
+ r"""
272
+ Return `p/π^r` where π is the uniformizer and `p` is the uniformizer of
273
+ the base ring (not necessarily an integer.)
274
+
275
+ INPUT:
276
+
277
+ - ``r`` -- integer with 0 <= r < e
278
+
279
+ OUTPUT: a reduced polynomial in π
280
+
281
+ EXAMPLES::
282
+
283
+ sage: # needs sage.libs.ntl
284
+ sage: R.<a> = Zq(25, prec=3)
285
+ sage: S.<x> = R[]; f = x^3 - 5*x - 5*a
286
+ sage: W.<w> = R.ext(f)
287
+ sage: elt = W.prime_pow.px_pow(2); elt
288
+ ((4*a + 4) + (4*a + 1)*5 + (4*a + 2)*5^2)*x^2 + ((2*a + 3) + (2*a + 4)*5 + (2*a + 4)*5^2)*x + (a + 1)*5 + 3*5^2 + 2*5^3
289
+ """
290
+ if r < 0:
291
+ raise ValueError("r must be nonnegative")
292
+ elif r == 0:
293
+ return self.poly_ring(self.base_ring.uniformizer())
294
+ elif r >= self.e:
295
+ raise NotImplementedError
296
+ else:
297
+ return (self._inv_shift_seed << (self.e-r)) % self.modulus
298
+
299
+ @cached_method
300
+ def pxe_pow(self, r):
301
+ r"""
302
+ Return the ``r``-th power of the unit `p/π^e` where `e` is the relative
303
+ ramification index and `p` is the uniformizer of the base ring (not necessarily an integer.)
304
+
305
+ INPUT:
306
+
307
+ - ``r`` -- nonnegative integer
308
+
309
+ OUTPUT: a reduced polynomial in π
310
+
311
+ EXAMPLES::
312
+
313
+ sage: # needs sage.libs.ntl
314
+ sage: R.<a> = Zq(25, prec=3)
315
+ sage: S.<x> = R[]; f = x^3 - 5*x - 5*a
316
+ sage: W.<w> = R.ext(f)
317
+ sage: elt = W.prime_pow.pxe_pow(2); elt
318
+ ((4*a + 2) + (a + 4)*5 + 2*a*5^2)*x^2 + ((a + 2) + (a + 2)*5 + (2*a + 4)*5^2)*x + (a + 1) + (3*a + 2)*5 + (2*a + 2)*5^2
319
+ """
320
+ if r < 0:
321
+ raise ValueError("r must be nonnegative")
322
+ elif r == 0:
323
+ return self.poly_ring.one()
324
+ elif r == 1:
325
+ return self._inv_shift_seed
326
+ elif r % 2:
327
+ return (self.pxe_pow(r-1) * self.pxe_pow(1)) % self.modulus
328
+ else:
329
+ return (self.pxe_pow(r//2)*self.pxe_pow(r//2)) % self.modulus
330
+
331
+ @cached_method
332
+ def uniformizer_pow(self, r):
333
+ r"""
334
+ Return the ``r``-th power of the uniformizer.
335
+
336
+ INPUT:
337
+
338
+ - ``r`` -- nonnegative integer
339
+
340
+ OUTPUT: a reduced polynomial in π
341
+
342
+ EXAMPLES::
343
+
344
+ sage: # needs sage.libs.ntl
345
+ sage: R.<a> = Zq(25, prec=3)
346
+ sage: S.<x> = R[]; f = x^3 - 5*x - 5*a
347
+ sage: W.<w> = R.ext(f)
348
+ sage: W.prime_pow.uniformizer_pow(2)
349
+ x^2
350
+ """
351
+ if r < 0:
352
+ raise ValueError("r must be nonnegative")
353
+ elif r == 0:
354
+ return self.poly_ring.one()
355
+ elif r < self.e:
356
+ return self.poly_ring.one() << r
357
+ elif r % 2:
358
+ return (self.uniformizer_pow(r-1) << 1) % self.modulus
359
+ else:
360
+ return (self.uniformizer_pow(r//2) * self.uniformizer_pow(r//2)) % self.modulus
361
+
362
+
363
+ def PowComputer_relative_maker(prime, cache_limit, prec_cap, ram_prec_cap, in_field, poly, shift_seed, prec_type):
364
+ r"""
365
+ Create a ``PowComputer``.
366
+
367
+ INPUT:
368
+
369
+ - ``prime`` -- a uniformizer in the base ring
370
+
371
+ - ``cache_limit`` -- nonnegative integer, controlling the caching. The
372
+ ``PowComputer`` caches frequently used things like powers of ``prime``
373
+ This parameter, e.g., controls up to which power these are cached.
374
+
375
+ - ``prec_cap`` -- the power of ``prime`` modulo which elements of largest
376
+ precision are defined
377
+
378
+ - ``ram_prec_cap`` -- approximately ``e*prec_cap``, where ``e`` is
379
+ the relative ramification degree of the extension. For a ramified
380
+ extension this is what Sage calls the precision cap of the ring. In
381
+ fact, it's possible to have rings with precision cap not a multiple of
382
+ `e`, in which case the actual relationship between ``ram_prec_cap`` and
383
+ ``prec_cap`` is that ``prec_cap = ceil(n/e)``
384
+
385
+ - ``in_field`` -- boolean; whether the associated ring is actually a
386
+ field
387
+
388
+ - ``poly`` -- the polynomial defining the extension
389
+
390
+ - ``prec_type`` -- one of ``'capped-rel'``, ``'capped-abs'`` or
391
+ ``'fixed-mod'``, ``'floating-point'``; the precision type of the ring
392
+
393
+ .. NOTE::
394
+
395
+ Because of the way templates work, this function imports the class of
396
+ its return value from the appropriate element files. This means that
397
+ the returned PowComputer will have the appropriate compile-time-type
398
+ for Cython.
399
+
400
+ EXAMPLES::
401
+
402
+ sage: # needs sage.libs.flint
403
+ sage: from sage.rings.padics.pow_computer_relative import PowComputer_relative_maker
404
+ sage: R.<a> = ZqFM(25, prec=2)
405
+ sage: S.<x> = R[]
406
+ sage: f = x^3 - 5*x - 5*a
407
+ sage: W.<w> = R.extension(f)
408
+ sage: PC = W.prime_pow # indirect doctest
409
+ sage: PC
410
+ Relative PowComputer for modulus x^3 + (4*5 + 4*5^2)*x + 4*a*5 + 4*a*5^2
411
+ """
412
+ PC = PowComputer_relative_eis(prime, cache_limit, prec_cap, ram_prec_cap, in_field, poly, shift_seed)
413
+ # We have to set this here because the signature of __cinit__ in PowComputer_base doesn't allow for prec_type to be passed.
414
+ PC._prec_type = prec_type
415
+ return PC
@@ -0,0 +1,21 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+
3
+ from sage.libs.flint.types cimport fmpz_poly_t
4
+ from sage.rings.padics.pow_computer_flint cimport PowComputer_flint_unram
5
+ from sage.rings.padics.qadic_flint_CR cimport CRElement
6
+
7
+ cdef class PowComputer_(PowComputer_flint_unram):
8
+ pass
9
+ ctypedef fmpz_poly_t celement
10
+
11
+ include "CA_template_header.pxi"
12
+
13
+ cdef class qAdicCappedAbsoluteElement(CAElement):
14
+ pass
15
+
16
+ cdef class qAdicCoercion_Zq_Qq(RingHomomorphism):
17
+ cdef CRElement _zero
18
+ cdef Morphism _section
19
+
20
+ cdef class qAdicConvert_Qq_Zq(Morphism):
21
+ cdef CAElement _zero
@@ -0,0 +1,130 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+ # sage.doctest: needs sage.libs.flint
3
+
4
+ include "sage/libs/linkages/padics/fmpz_poly_unram.pxi"
5
+ include "sage/libs/linkages/padics/unram_shared.pxi"
6
+ include "CA_template.pxi"
7
+
8
+ cdef class PowComputer_(PowComputer_flint_unram):
9
+ """
10
+ A PowComputer for a capped-absolute unramified ring.
11
+ """
12
+ def __init__(self, Integer prime, long cache_limit, long prec_cap, long ram_prec_cap, bint in_field, poly=None):
13
+ """
14
+ Initialization.
15
+
16
+ EXAMPLES::
17
+
18
+ sage: R.<a> = ZqCA(125)
19
+ sage: type(R.prime_pow)
20
+ <class 'sage.rings.padics.qadic_flint_CA.PowComputer_'>
21
+ sage: R.prime_pow._prec_type
22
+ 'capped-abs'
23
+ """
24
+ self._prec_type = 'capped-abs'
25
+ PowComputer_flint_unram.__init__(self, prime, cache_limit, prec_cap, ram_prec_cap, in_field, poly)
26
+
27
+ cdef class qAdicCappedAbsoluteElement(CAElement):
28
+ frobenius = frobenius_unram
29
+ trace = trace_unram
30
+ norm = norm_unram
31
+
32
+ def matrix_mod_pn(self):
33
+ r"""
34
+ Return the matrix of right multiplication by the element on
35
+ the power basis `1, x, x^2, \ldots, x^{d-1}` for this
36
+ extension field. Thus the *rows* of this matrix give the
37
+ images of each of the `x^i`. The entries of the matrices are
38
+ IntegerMod elements, defined modulo ``p^(self.absprec() / e)``.
39
+
40
+ EXAMPLES::
41
+
42
+ sage: R.<a> = ZqCA(5^5,5)
43
+ sage: b = (5 + 15*a)^3
44
+ sage: b.matrix_mod_pn()
45
+ [ 125 1125 250 250 0]
46
+ [ 0 125 1125 250 250]
47
+ [2375 2125 125 1125 250]
48
+ [2375 1375 2125 125 1125]
49
+ [2875 1000 1375 2125 125]
50
+
51
+ sage: M = R(0,3).matrix_mod_pn(); M == 0
52
+ True
53
+ sage: M.base_ring()
54
+ Ring of integers modulo 125
55
+ """
56
+ return cmatrix_mod_pn(self.value, self.absprec, 0, self.prime_pow)
57
+
58
+ def _flint_rep(self, var='x'):
59
+ """
60
+ Replacement for _ntl_rep for use in printing and debugging.
61
+
62
+ EXAMPLES::
63
+
64
+ sage: R.<a> = ZqCA(27, 4)
65
+ sage: (1+a).inverse_of_unit()._flint_rep()
66
+ 41*x^2 + 40*x + 42
67
+ sage: (1+a)*(41*a^2+40*a+42)
68
+ 1 + O(3^4)
69
+ """
70
+ return self.prime_pow._new_fmpz_poly(self.value, var)
71
+
72
+ def _flint_rep_abs(self, var='x'):
73
+ """
74
+ Replacement for _ntl_rep_abs for use in printing and debugging.
75
+
76
+ EXAMPLES::
77
+
78
+ sage: R.<a> = ZqCA(27, 4)
79
+ sage: (3+3*a)._flint_rep_abs()
80
+ (3*x + 3, 0)
81
+ """
82
+ return self._flint_rep(var), Integer(0)
83
+
84
+ def _modp_rep(self, use_smallest_mode=False, return_list=True):
85
+ r"""
86
+ Return the element with the same reduction mod p that can be expressed
87
+ with coefficients between 0 and p-1. The absolute precision will be maximal.
88
+
89
+ This method is used in printing and computing `p`-adic expansions.
90
+
91
+ INPUT:
92
+
93
+ - ``use_smallest_mode`` -- if ``True``, use reps between -p/2 and p/2 instead
94
+ - ``return_list`` -- if ``True``, return a list of coefficients (as integers);
95
+ for use in printing
96
+
97
+ EXAMPLES::
98
+
99
+ sage: R.<a> = Qq(27,4)
100
+ sage: b = a^2 + 5*a - 3
101
+ sage: b._modp_rep()
102
+ ((a^2 + 2*a) + O(3^4), [0, 2, 1])
103
+ sage: b._modp_rep(use_smallest_mode=True)[1]
104
+ [0, -1, 1]
105
+ """
106
+ cdef CAElement rep = self._new_c()
107
+ rep.absprec = self.prime_pow.prec_cap
108
+ L = cmodp_rep(rep.value, self.value, smallest_mode if use_smallest_mode else simple_mode, return_list, self.prime_pow)
109
+ if return_list:
110
+ return rep, L
111
+ else:
112
+ return rep
113
+
114
+ def __hash__(self):
115
+ r"""
116
+ Raise a :exc:`TypeError` since this element is not hashable
117
+ (:issue:`11895`).
118
+
119
+ TESTS::
120
+
121
+ sage: K.<a> = ZqCA(9)
122
+ sage: hash(a)
123
+ Traceback (most recent call last):
124
+ ...
125
+ TypeError: ...unhashable type: 'sage.rings.padics.qadic_flint_CA.qAdicCappedAbsoluteElement'...
126
+ """
127
+ # Eventually, hashing will be disabled for all (non-fixed-mod) p-adic
128
+ # elements (#11895), until then, we only to this for types which did
129
+ # not support hashing before we switched some elements to FLINT
130
+ raise TypeError("unhashable type: 'sage.rings.padics.qadic_flint_CA.qAdicCappedAbsoluteElement'")
@@ -0,0 +1,13 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+
3
+ from sage.libs.flint.types cimport fmpz_poly_t
4
+ from sage.rings.padics.pow_computer_flint cimport PowComputer_flint_unram
5
+
6
+ cdef class PowComputer_(PowComputer_flint_unram):
7
+ pass
8
+ ctypedef fmpz_poly_t celement
9
+
10
+ include "CR_template_header.pxi"
11
+
12
+ cdef class qAdicCappedRelativeElement(CRElement):
13
+ pass