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,26 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+ # delvewheel: patch
3
+ r"""
4
+ Top level of the distribution package sagemath-pari
5
+
6
+ This distribution makes the following features available::
7
+
8
+ sage: from sage.features.sagemath import *
9
+ sage: sage__libs__pari().is_present()
10
+ FeatureTestResult('sage.libs.pari', True)
11
+ sage: sage__rings__finite_rings().is_present()
12
+ FeatureTestResult('sage.rings.finite_rings', True)
13
+ """
14
+
15
+ from .all__sagemath_categories import *
16
+
17
+ from sage.databases.all__sagemath_pari import *
18
+ from sage.groups.all__sagemath_pari import *
19
+ from sage.libs.all__sagemath_pari import *
20
+ from sage.quadratic_forms.all__sagemath_pari import *
21
+ from sage.rings.all__sagemath_pari import *
22
+
23
+ # Relink imported lazy_import objects to point to the appropriate namespace
24
+ from sage.misc.lazy_import import clean_namespace
25
+ clean_namespace()
26
+ del clean_namespace
@@ -0,0 +1,7 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+
3
+ from sage.misc.lazy_import import lazy_import
4
+
5
+ lazy_import('sage.databases.conway', 'ConwayPolynomials')
6
+
7
+ del lazy_import
@@ -0,0 +1,274 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+ r"""
3
+ Frank Lübeck's tables of Conway polynomials over finite fields
4
+ """
5
+ # ****************************************************************************
6
+ #
7
+ # Copyright (C) 2005-2006 William Stein <wstein@gmail.com>
8
+ # Copyright (C) 2010 Alexandru Ghitza
9
+ # Copyright (C) 2013 R. Andrew Ohana <andrew.ohana@gmail.com>
10
+ #
11
+ # This program is free software: you can redistribute it and/or modify
12
+ # it under the terms of the GNU General Public License as published by
13
+ # the Free Software Foundation, either version 2 of the License, or
14
+ # (at your option) any later version.
15
+ # https://www.gnu.org/licenses/
16
+ # ****************************************************************************
17
+ from collections.abc import Mapping
18
+
19
+
20
+ class DictInMapping(Mapping):
21
+ def __init__(self, dict):
22
+ """
23
+ Places dict into a non-mutable mapping.
24
+
25
+ TESTS::
26
+
27
+ sage: from sage.databases.conway import DictInMapping
28
+ sage: d = {}
29
+ sage: m = DictInMapping(d); m
30
+ {}
31
+ sage: d[0] = 1; m
32
+ {0: 1}
33
+ sage: m[2] = 3
34
+ Traceback (most recent call last):
35
+ ...
36
+ TypeError: 'DictInMapping' object does not support item assignment
37
+ """
38
+ self._store = dict
39
+
40
+ def __getitem__(self, key):
41
+ """
42
+ TESTS::
43
+
44
+ sage: from sage.databases.conway import DictInMapping
45
+ sage: DictInMapping({'foo': 'bar'})['foo']
46
+ 'bar'
47
+ """
48
+ return self._store[key]
49
+
50
+ def __len__(self):
51
+ """
52
+ TESTS::
53
+
54
+ sage: from sage.databases.conway import DictInMapping
55
+ sage: d = {}
56
+ sage: m = DictInMapping(d); len(m)
57
+ 0
58
+ sage: d['foo'] = 'bar'; len(m)
59
+ 1
60
+ """
61
+ return len(self._store)
62
+
63
+ def __iter__(self):
64
+ """
65
+ TESTS::
66
+
67
+ sage: from sage.databases.conway import DictInMapping
68
+ sage: next(iter(DictInMapping({'foo': 'bar'})))
69
+ 'foo'
70
+ """
71
+ return iter(self._store)
72
+
73
+ def __repr__(self):
74
+ """
75
+ TESTS::
76
+
77
+ sage: from sage.databases.conway import DictInMapping
78
+ sage: DictInMapping({'foo': 'bar'})
79
+ {'foo': 'bar'}
80
+ """
81
+ return repr(self._store)
82
+
83
+
84
+ class ConwayPolynomials(Mapping):
85
+ def __init__(self):
86
+ """
87
+ Initialize the database.
88
+
89
+ TESTS::
90
+
91
+ sage: c = ConwayPolynomials()
92
+ sage: c
93
+ Frank Lübeck's database of Conway polynomials
94
+ """
95
+ import conway_polynomials
96
+ self._store = conway_polynomials.database()
97
+
98
+ def __repr__(self):
99
+ """
100
+ Return a description of this database.
101
+
102
+ TESTS::
103
+
104
+ sage: c = ConwayPolynomials()
105
+ sage: c.__repr__()
106
+ "Frank Lübeck's database of Conway polynomials"
107
+ """
108
+ return "Frank Lübeck's database of Conway polynomials"
109
+
110
+ def __getitem__(self, key):
111
+ """
112
+ If key is a pair of integers ``p,n``, return the Conway
113
+ polynomial of degree ``n`` over ``GF(p)``.
114
+
115
+ If key is an integer ``p``, return a non-mutable mapping
116
+ whose keys are the degrees of the polynomial values.
117
+
118
+ TESTS::
119
+
120
+ sage: c = ConwayPolynomials()
121
+ sage: c[60859]
122
+ {1: (60856, 1), 2: (3, 60854, 1),
123
+ 3: (60856, 8, 0, 1), 4: (3, 32881, 3, 0, 1)}
124
+ sage: c[60869, 3]
125
+ (60867, 2, 0, 1)
126
+ """
127
+ try:
128
+ return DictInMapping(self._store[key])
129
+ except KeyError as err:
130
+ try:
131
+ if isinstance(key, (tuple, list)):
132
+ if len(key) == 2:
133
+ return self._store[key[0]][key[1]]
134
+ except KeyError:
135
+ pass
136
+ raise err
137
+
138
+ def __len__(self):
139
+ """
140
+ Return the number of polynomials in this database.
141
+
142
+ TESTS:
143
+
144
+ The database currently contains `35357` polynomials, but due to
145
+ :issue:`35357` it will be extended by Conway polynomials of
146
+ degrees `1`, `2` and `3` for primes between `65537` and `110000`,
147
+ thus leading to a new total of `47090` entries::
148
+
149
+ sage: c = ConwayPolynomials()
150
+ sage: len(c) in [35357, 47090]
151
+ True
152
+ """
153
+ try:
154
+ return self._len
155
+ except AttributeError:
156
+ pass
157
+ self._len = sum(len(a) for a in self._store.values())
158
+ return self._len
159
+
160
+ def __iter__(self):
161
+ """
162
+ Return an iterator over the keys of this database.
163
+
164
+ TESTS::
165
+
166
+ sage: c = ConwayPolynomials()
167
+ sage: itr = iter(c)
168
+ sage: next(itr) # random
169
+ (65537, 4)
170
+ """
171
+ for a, b in self._store.items():
172
+ for c in b:
173
+ yield a, c
174
+
175
+ def polynomial(self, p, n):
176
+ """
177
+ Return the Conway polynomial of degree ``n`` over ``GF(p)``,
178
+ or raise a :exc:`RuntimeError` if this polynomial is not in the
179
+ database.
180
+
181
+ .. NOTE::
182
+
183
+ See also the global function ``conway_polynomial`` for
184
+ a more user-friendly way of accessing the polynomial.
185
+
186
+ INPUT:
187
+
188
+ - ``p`` -- prime number
189
+
190
+ - ``n`` -- positive integer
191
+
192
+ OUTPUT:
193
+
194
+ List of Python int's giving the coefficients of the corresponding
195
+ Conway polynomial in ascending order of degree.
196
+
197
+ EXAMPLES::
198
+
199
+ sage: c = ConwayPolynomials()
200
+ sage: c.polynomial(3, 21)
201
+ (1, 2, 0, 2, 0, 1, 2, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1)
202
+ sage: c.polynomial(97, 128)
203
+ Traceback (most recent call last):
204
+ ...
205
+ RuntimeError: Conway polynomial over F_97 of degree 128 not in database.
206
+ """
207
+ try:
208
+ return self[p, n]
209
+ except KeyError:
210
+ raise RuntimeError("Conway polynomial over F_%s of degree %s not in database." % (p, n))
211
+
212
+ def has_polynomial(self, p, n) -> bool:
213
+ """
214
+ Return ``True`` if the database of Conway polynomials contains the
215
+ polynomial of degree ``n`` over ``GF(p)``.
216
+
217
+ INPUT:
218
+
219
+ - ``p`` -- prime number
220
+
221
+ - ``n`` -- positive integer
222
+
223
+ EXAMPLES::
224
+
225
+ sage: c = ConwayPolynomials()
226
+ sage: c.has_polynomial(97, 12)
227
+ True
228
+ sage: c.has_polynomial(60821, 5)
229
+ False
230
+ """
231
+ return (p, n) in self
232
+
233
+ def primes(self):
234
+ """
235
+ Return the list of prime numbers ``p`` for which the database of
236
+ Conway polynomials contains polynomials over ``GF(p)``.
237
+
238
+ EXAMPLES::
239
+
240
+ sage: c = ConwayPolynomials()
241
+ sage: P = c.primes()
242
+ sage: 2 in P
243
+ True
244
+ sage: next_prime(10^7) in P
245
+ False
246
+ """
247
+ return self._store.keys()
248
+
249
+ def degrees(self, p):
250
+ """
251
+ Return the list of integers ``n`` for which the database of Conway
252
+ polynomials contains the polynomial of degree ``n`` over ``GF(p)``.
253
+
254
+ EXAMPLES::
255
+
256
+ sage: c = ConwayPolynomials()
257
+ sage: c.degrees(60821)
258
+ [1, 2, 3, 4]
259
+ sage: c.degrees(next_prime(10^7))
260
+ []
261
+ """
262
+ if p not in self._store:
263
+ return []
264
+ return list(self._store[p])
265
+
266
+ def __reduce__(self):
267
+ """
268
+ TESTS::
269
+
270
+ sage: c = ConwayPolynomials()
271
+ sage: loads(dumps(c)) == c
272
+ True
273
+ """
274
+ return (ConwayPolynomials, ())
@@ -0,0 +1 @@
1
+ # sage_setup: distribution = sagemath-pari
sage/ext/memory.pyx ADDED
@@ -0,0 +1,98 @@
1
+ # sage_setup: distribution = sagemath-pari
2
+ """
3
+ Low-level memory allocation functions
4
+
5
+ TESTS:
6
+
7
+ Check that an error is raised if we try to allocate a
8
+ ridiculously large integer, see :issue:`15363`::
9
+
10
+ sage: try:
11
+ ....: 2^(2^63-3)
12
+ ....: except (OverflowError, RuntimeError, FloatingPointError):
13
+ ....: print ('Overflow error')
14
+ ...Overflow error
15
+
16
+ AUTHORS:
17
+
18
+ - Jeroen Demeyer (2011-01-13): initial version (:issue:`10258`)
19
+
20
+ - Jeroen Demeyer (2014-12-14): add more functions (:issue:`10257`)
21
+
22
+ - Jeroen Demeyer (2015-03-02): move from ``c_lib`` to Cython (:issue:`17881`)
23
+ """
24
+
25
+ #*****************************************************************************
26
+ # Copyright (C) 2011-2015 Jeroen Demeyer <jdemeyer@cage.ugent.be>
27
+ #
28
+ # This program is free software: you can redistribute it and/or modify
29
+ # it under the terms of the GNU General Public License as published by
30
+ # the Free Software Foundation, either version 2 of the License, or
31
+ # (at your option) any later version.
32
+ # http://www.gnu.org/licenses/
33
+ #*****************************************************************************
34
+
35
+ from cysignals.memory cimport sig_malloc, sig_realloc, sig_free
36
+ from cysignals.signals cimport sig_error
37
+
38
+ from sage.libs.gmp.misc cimport mp_set_memory_functions
39
+
40
+ cdef extern from "Python.h":
41
+ # Declare as returning void without except value
42
+ void PyErr_Format(object exception, char *format, ...)
43
+ int unlikely(int) nogil # Defined by Cython
44
+
45
+
46
+ cdef void alloc_error(size_t size) noexcept nogil:
47
+ """
48
+ Jump back to ``sig_on()``, raising a :exc:`MemoryError`.
49
+ """
50
+ with gil:
51
+ PyErr_Format(MemoryError, "failed to allocate %zu bytes", size)
52
+ sig_error()
53
+
54
+
55
+ cdef void* sage_sig_malloc(size_t size) noexcept nogil:
56
+ """
57
+ ``malloc()`` function for the MPIR/GMP library.
58
+
59
+ Out-of-memory errors are handled using the ``sig_error`` mechanism.
60
+ """
61
+ cdef void* p = sig_malloc(size)
62
+ if unlikely(p == NULL):
63
+ alloc_error(size)
64
+ return p
65
+
66
+
67
+ cdef void* sage_sig_realloc(void *ptr, size_t old_size, size_t new_size) noexcept nogil:
68
+ """
69
+ ``realloc()`` function for the MPIR/GMP library.
70
+
71
+ Out-of-memory errors are handled using the ``sig_error`` mechanism.
72
+ """
73
+ cdef void* p = sig_realloc(ptr, new_size)
74
+ if unlikely(p == NULL):
75
+ alloc_error(new_size)
76
+ return p
77
+
78
+
79
+ cdef void sage_sig_free(void *ptr, size_t size) noexcept nogil:
80
+ """
81
+ ``free()`` function for the MPIR/GMP library.
82
+ """
83
+ sig_free(ptr)
84
+
85
+
86
+ def init_memory_functions():
87
+ """
88
+ Set the MPIR/GMP memory functions to the above functions.
89
+
90
+ EXAMPLES::
91
+
92
+ sage: from sage.ext.memory import init_memory_functions
93
+ sage: init_memory_functions()
94
+ """
95
+ mp_set_memory_functions(sage_sig_malloc, sage_sig_realloc, sage_sig_free)
96
+
97
+
98
+ init_memory_functions()
@@ -0,0 +1,286 @@
1
+ \\ DimensionSk.g, V2.2: program to compute dimensions of spaces of cusp
2
+ \\ forms with non-trivial character.
3
+ \\
4
+ \\ By Kevin Buzzard (buzzard@ic.ac.uk)
5
+ \\
6
+ \\ Please report any problems to buzzard@ic.ac.uk .
7
+ \\
8
+ \\ Needs: genusn.g function S0(n,k)
9
+ \\
10
+ \\ This started off as my port of William's DimensionCuspForms magma script,
11
+ \\ and has grown since then.
12
+ \\
13
+ \\
14
+ \\ Version history:
15
+ \\
16
+ \\ V2.2: Fixed a bug in localevaluate() pointed out by Fernando Gouvea:
17
+ \\ s was used as a local variable but not declared as such.
18
+ \\ (this did actually cause problems with another script, Tpprog.g,
19
+ \\ which happened to use s for something else), 14/2/2002.
20
+ \\
21
+ \\ V2.1: minor tidying up and added a few \\ lines, 10/8/2001.
22
+ \\
23
+ \\ V2.0: severe tidying up, e.g. got rid of all the \s at end
24
+ \\ of lines and used the { trick instead; used local() for local
25
+ \\ variables instead of the old version, and so on, 9/8/2001.
26
+ \\
27
+ \\ V1.0, 26/7/00, just found it in the mess.
28
+ \\
29
+ \\ TODO: Optimise CohenOesterle2 and CohenOesterle3, currently they
30
+ \\ are ridiculous. See the magma version.
31
+ \\
32
+ \\ Remarks: has a superugly way of storing Dirichlet characters.
33
+ \\
34
+ \\ Syntax for characters:
35
+ \\
36
+ \\ eps is [N, i x 3 matrix], where eps[2][,1] is the primes dividing
37
+ \\ N, eps[2][,2] is the powers of these primes that divide N, and eps[2][,3]
38
+ \\ is the following: for p odd, p^n||N, it's t such that znprimroot(p^n)
39
+ \\ gets sent to exp(2*pi*i/phi(p^n))^t. And for p=2, it's
40
+ \\ 0 for 2^1, it's 0 (trivial) or -1 (non-trivial) for 2^2, and for p^n>=8
41
+ \\ it's either t>=0 for the even char sending 5 to exp(2*pi*i/p^(n-2))^t,
42
+ \\ or t<=-1 for the odd char sending 5 to exp(2*pi*i/p^(n-2))^(-1-t).
43
+ \\ (so either 0<=t<2^(n-2) or -1>=t>-1-2^(n-2) )
44
+
45
+ \\ Examples of creation:
46
+ \\
47
+ \\ TrivialCharacter(100) creates the trivial character of level 100.
48
+ \\ DirichletCharacter(45,[1,2]) creates the character of level 45
49
+ \\ which is the product of the character of level 9 sending
50
+ \\ znprimroot(9)=2 to exp(2*Pi*I/6)^1 and the character of level 5
51
+ \\ sending znprimroot(5)=2 to exp(2*Pi*I/4)^2=-1.
52
+
53
+ print("DimensionCuspForms(eps,k) computes the dimension of the space");
54
+ print("of cusp forms of character eps and weight k (note that eps knows");
55
+ print("its level!) The syntax for characters is rather complicated, see");
56
+ print("the detailed remarks at the beginning of the source code for");
57
+ print("more information.");
58
+
59
+
60
+ nearestinteger(z)=
61
+ {
62
+ if(abs(z-round(z))>10^(-10),
63
+ error("argument ",z," not near to an integer in nearestinteger()")
64
+ ,
65
+ real(round(z))
66
+ )
67
+ }
68
+
69
+ DimensionCuspForms(eps,k)=
70
+ {
71
+ local(N=0);
72
+ if(k<=0,
73
+ 0
74
+ ,
75
+ if(k==1,
76
+ error("Can't compute dimension of a space of cusp forms of weight one")
77
+ );
78
+
79
+ N=eps[1];
80
+ if(istrivial(eps),
81
+ S0(N,k)
82
+ ,
83
+ if(nearestinteger(evaluate(eps,N-1))!=(-1)^k,
84
+ 0
85
+ ,
86
+ nearestinteger(idxG0(N)*(k-1)/12 \
87
+ +CohenOesterle1(eps,k)+CohenOesterle2(eps,k)+CohenOesterle3(eps,k))
88
+ )
89
+ )
90
+ )
91
+ }
92
+
93
+ DimensionModularForms(eps,k)=
94
+ {
95
+ local(N=0);
96
+ if(k<=0,
97
+ 0
98
+ ,
99
+ if(k==1,
100
+ error("Can't compute dimension of a space of modular
101
+ forms of weight one")
102
+ );
103
+ \\ k>=2
104
+
105
+ N=eps[1];
106
+ if(nearestinteger(evaluate(eps,N-1))!=(-1)^k,
107
+ 0
108
+ ,
109
+ if(istrivial(eps),
110
+ S0(N,k)+c0(N)-(k==2)
111
+ ,
112
+ nearestinteger(idxG0(N)*(k-1)/12 \
113
+ -CohenOesterle1(eps,k)+CohenOesterle2(eps,k)+CohenOesterle3(eps,k) \
114
+ -(k==2))
115
+ )
116
+ )
117
+ )
118
+ }
119
+
120
+ CohenOesterle1(eps,k)=
121
+ {
122
+ local(facN,f,facf);
123
+ facN=matrix(matsize(eps[2])[1],2,i,j,eps[2][i,j]);
124
+ f=charconductor(eps);
125
+ facf=facN;facf[,2]=vectorv(matsize(facN)[1],i,valuation(f,facN[i,1]));
126
+
127
+ (-1/2)*prod(i=1,matsize(facN)[1],lambda(facN[i,2],facf[i,2],facN[i,1]))
128
+ }
129
+
130
+ CohenOesterle2(eps,k)=
131
+ {
132
+ local(N,gamma_k=0);
133
+ N=eps[1];
134
+ if(k%4==2,gamma_k=-1/4,if(k%4==0,gamma_k=1/4));
135
+ if(gamma_k==0,
136
+ 0
137
+ ,
138
+ gamma_k*sum(i=0,N-1,if((i^2+1)%N==0,evaluate(eps,i),0))
139
+ )
140
+ }
141
+
142
+ CohenOesterle3(eps,k)=
143
+ {
144
+ local(N,mu_k=0);
145
+ N=eps[1];
146
+ if(k%3==2,mu_k=-1/3,if(k%3==0,mu_k=1/3));
147
+ if(mu_k==0,
148
+ 0
149
+ ,
150
+ mu_k*sum(i=0,N-1,if((i^2+i+1)%N==0,evaluate(eps,i),0))
151
+ )
152
+ }
153
+
154
+ lambda(r,s,p)=
155
+ {
156
+ if(2*s<=r,
157
+ if(r%2==0,
158
+ p^(r\2)+p^((r\2)-1)
159
+ ,
160
+ 2*p^((r-1)\2)
161
+ )
162
+ ,
163
+ 2*p^(r-s)
164
+ )
165
+ }
166
+
167
+ evaluate(eps,n)=
168
+ {
169
+ if(gcd(n,eps[1])>1,
170
+ 0
171
+ ,
172
+ if(istrivial(eps),
173
+ 1
174
+ ,
175
+ \\ main case here.
176
+ prod(i=1,matsize(eps[2])[1],localevaluate(eps[2][i,],n))
177
+ )
178
+ )
179
+ }
180
+
181
+ localevaluate(v,n)=
182
+ {
183
+ local(p,e,s,t);
184
+ p=v[1];e=v[2];t=v[3];
185
+ if(p==2, \\ deal with 2 separately
186
+ if(e==1,
187
+ 1
188
+ ,
189
+ s=if(n%4==1,1,-1);
190
+ if(t>=0,
191
+ exp(2*Pi*I/2^(e-2)*t*z2log(Mod(n*s,2^e)))
192
+ ,
193
+ s*exp(2*Pi*I/2^(e-2)*(-1-t)*z2log(Mod(n*s,2^e)))
194
+ )
195
+ )
196
+ ,
197
+ exp(2*Pi*I/(p-1)/p^(e-1)*t*znlog(n,znprimroot(p^e)))
198
+ )
199
+ }
200
+
201
+ charconductor(eps)=
202
+ {
203
+ if(istrivial(eps),
204
+ 1
205
+ ,
206
+ prod(i=1,matsize(eps[2])[1],localconductor(eps[2][i,]))
207
+ )
208
+ }
209
+
210
+ localconductor(v)=
211
+ {
212
+ local(p,e,t,tp);
213
+ p=v[1];e=v[2];t=v[3];
214
+ if(p==2, \\ deal with this case first
215
+ if(e==1||t==0,
216
+ 1
217
+ ,
218
+ if(e==2||t==-1,
219
+ 4
220
+ ,
221
+ \\ p=2 and e>=3 and im(5) isn't trivial
222
+ tp=if(t>=0,t,-1-t); \\ 1<=tp<2^(e-2)
223
+ 2^(e-valuation(tp,2))
224
+ )
225
+ )
226
+ ,
227
+ \\ p odd
228
+ if(t==0,
229
+ 1
230
+ ,
231
+ p^(e-valuation(t,p))
232
+ )
233
+ )
234
+ }
235
+
236
+ z2log(t)=
237
+ {
238
+ \\ This returns the 2-adic log of t.
239
+ if(padicprec(t,2)<3,
240
+ 1
241
+ ,
242
+ truncate(log(lift(t)+O(2^padicprec(t,2)))/log(5+O(2^padicprec(t,2))))
243
+ )
244
+ }
245
+
246
+ idxG0(N)=
247
+ {
248
+ local(facN);
249
+ facN=factor(N);
250
+ prod(i=1,matsize(facN)[1],facN[i,1]^facN[i,2]+facN[i,1]^(facN[i,2]-1))
251
+ }
252
+
253
+ istrivial(eps)=(eps[2][,3]==vectorv(matsize(eps[2])[1],i,0))
254
+
255
+ TrivialCharacter(N)=
256
+ {
257
+ local(facN);
258
+ facN=factor(N);
259
+
260
+ [N,matrix(matsize(facN)[1],3,i,j,if(j<3,facN[i,j],0))]
261
+ }
262
+
263
+ DirichletCharacter(N,v)=
264
+ {
265
+ local(facN);
266
+ facN=factor(N);
267
+ [N,matrix(matsize(facN)[1],3,i,j,if(j<3,facN[i,j],v[i]))]
268
+ }
269
+
270
+ \\
271
+ \\ Syntax for DirichletCharacter: takes (N,v) where N>0 is an integer
272
+ \\ and v is a vector of length equal to the number of factors of N;
273
+ \\ p_i will get assigned v[i]. Note that we *CAN* have factors
274
+ \\ in a non-standard order. Equality of chars will be difficult but
275
+ \\ who cares!
276
+
277
+ charmult(chi1,chi2)=
278
+ {
279
+ if(gcd(chi1[1],chi2[1])>1,
280
+ error("Too lazy to multiply Dirichlet characters together properly")
281
+ );
282
+
283
+ [chi1[1]*chi2[1],concat(chi1[2]~,chi2[2]~)~]
284
+ }
285
+
286
+