passagemath-flint 10.6.1rc10__cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_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.
Files changed (361) hide show
  1. passagemath_flint-10.6.1rc10.dist-info/METADATA +122 -0
  2. passagemath_flint-10.6.1rc10.dist-info/RECORD +361 -0
  3. passagemath_flint-10.6.1rc10.dist-info/WHEEL +6 -0
  4. passagemath_flint-10.6.1rc10.dist-info/top_level.txt +2 -0
  5. passagemath_flint.libs/libflint-aecb9cc5.so.21.0.0 +0 -0
  6. passagemath_flint.libs/libgf2x-a4cdec90.so.3.0.0 +0 -0
  7. passagemath_flint.libs/libgfortran-8f1e9814.so.5.0.0 +0 -0
  8. passagemath_flint.libs/libgmp-6e109695.so.10.5.0 +0 -0
  9. passagemath_flint.libs/libgsl-cda90e79.so.28.0.0 +0 -0
  10. passagemath_flint.libs/libmpfi-e3c25853.so.0.0.0 +0 -0
  11. passagemath_flint.libs/libmpfr-82690d50.so.6.2.1 +0 -0
  12. passagemath_flint.libs/libntl-74e7d9a3.so.44.0.1 +0 -0
  13. passagemath_flint.libs/libopenblasp-r0-6dcb67f9.3.29.so +0 -0
  14. passagemath_flint.libs/libquadmath-828275a7.so.0.0.0 +0 -0
  15. sage/all__sagemath_flint.py +29 -0
  16. sage/combinat/all__sagemath_flint.py +1 -0
  17. sage/combinat/posets/all__sagemath_flint.py +1 -0
  18. sage/combinat/posets/hasse_cython_flint.cpython-313-x86_64-linux-gnu.so +0 -0
  19. sage/combinat/posets/hasse_cython_flint.pyx +194 -0
  20. sage/data_structures/all__sagemath_flint.py +1 -0
  21. sage/data_structures/bounded_integer_sequences.cpython-313-x86_64-linux-gnu.so +0 -0
  22. sage/data_structures/bounded_integer_sequences.pxd +62 -0
  23. sage/data_structures/bounded_integer_sequences.pyx +1418 -0
  24. sage/graphs/all__sagemath_flint.py +1 -0
  25. sage/graphs/chrompoly.cpython-313-x86_64-linux-gnu.so +0 -0
  26. sage/graphs/chrompoly.pyx +555 -0
  27. sage/graphs/matchpoly.cpython-313-x86_64-linux-gnu.so +0 -0
  28. sage/graphs/matchpoly.pyx +412 -0
  29. sage/libs/all__sagemath_flint.py +17 -0
  30. sage/libs/arb/__init__.py +1 -0
  31. sage/libs/arb/acb.pxd +154 -0
  32. sage/libs/arb/acb_calc.pxd +9 -0
  33. sage/libs/arb/acb_elliptic.pxd +25 -0
  34. sage/libs/arb/acb_hypgeom.pxd +74 -0
  35. sage/libs/arb/acb_mat.pxd +62 -0
  36. sage/libs/arb/acb_modular.pxd +17 -0
  37. sage/libs/arb/acb_poly.pxd +216 -0
  38. sage/libs/arb/arb.pxd +240 -0
  39. sage/libs/arb/arb_fmpz_poly.pxd +21 -0
  40. sage/libs/arb/arb_hypgeom.pxd +83 -0
  41. sage/libs/arb/arb_wrap.h +34 -0
  42. sage/libs/arb/arf.pxd +131 -0
  43. sage/libs/arb/arith.cpython-313-x86_64-linux-gnu.so +0 -0
  44. sage/libs/arb/arith.pyx +87 -0
  45. sage/libs/arb/bernoulli.pxd +6 -0
  46. sage/libs/arb/mag.pxd +77 -0
  47. sage/libs/arb/types.pxd +37 -0
  48. sage/libs/flint/__init__.py +1 -0
  49. sage/libs/flint/acb.pxd +270 -0
  50. sage/libs/flint/acb_calc.pxd +22 -0
  51. sage/libs/flint/acb_dft.pxd +51 -0
  52. sage/libs/flint/acb_dirichlet.pxd +112 -0
  53. sage/libs/flint/acb_elliptic.pxd +42 -0
  54. sage/libs/flint/acb_hypgeom.pxd +169 -0
  55. sage/libs/flint/acb_macros.pxd +9 -0
  56. sage/libs/flint/acb_mat.pxd +136 -0
  57. sage/libs/flint/acb_mat_macros.pxd +10 -0
  58. sage/libs/flint/acb_modular.pxd +62 -0
  59. sage/libs/flint/acb_poly.pxd +251 -0
  60. sage/libs/flint/acb_poly_macros.pxd +8 -0
  61. sage/libs/flint/acb_theta.pxd +124 -0
  62. sage/libs/flint/acf.pxd +32 -0
  63. sage/libs/flint/aprcl.pxd +84 -0
  64. sage/libs/flint/arb.pxd +382 -0
  65. sage/libs/flint/arb_calc.pxd +31 -0
  66. sage/libs/flint/arb_fmpz_poly.pxd +34 -0
  67. sage/libs/flint/arb_fpwrap.pxd +215 -0
  68. sage/libs/flint/arb_hypgeom.pxd +147 -0
  69. sage/libs/flint/arb_macros.pxd +9 -0
  70. sage/libs/flint/arb_mat.pxd +140 -0
  71. sage/libs/flint/arb_mat_macros.pxd +10 -0
  72. sage/libs/flint/arb_poly.pxd +237 -0
  73. sage/libs/flint/arf.pxd +167 -0
  74. sage/libs/flint/arith.cpython-313-x86_64-linux-gnu.so +0 -0
  75. sage/libs/flint/arith.pxd +76 -0
  76. sage/libs/flint/arith.pyx +77 -0
  77. sage/libs/flint/arith_sage.cpython-313-x86_64-linux-gnu.so +0 -0
  78. sage/libs/flint/arith_sage.pyx +308 -0
  79. sage/libs/flint/bernoulli.pxd +28 -0
  80. sage/libs/flint/bool_mat.pxd +52 -0
  81. sage/libs/flint/ca.pxd +203 -0
  82. sage/libs/flint/ca_ext.pxd +34 -0
  83. sage/libs/flint/ca_field.pxd +32 -0
  84. sage/libs/flint/ca_mat.pxd +117 -0
  85. sage/libs/flint/ca_poly.pxd +104 -0
  86. sage/libs/flint/ca_vec.pxd +46 -0
  87. sage/libs/flint/calcium.pxd +27 -0
  88. sage/libs/flint/d_mat.pxd +39 -0
  89. sage/libs/flint/d_vec.pxd +32 -0
  90. sage/libs/flint/dirichlet.pxd +57 -0
  91. sage/libs/flint/dlog.pxd +53 -0
  92. sage/libs/flint/double_extras.pxd +24 -0
  93. sage/libs/flint/double_interval.pxd +36 -0
  94. sage/libs/flint/fexpr.pxd +104 -0
  95. sage/libs/flint/fexpr_builtin.pxd +20 -0
  96. sage/libs/flint/fft.pxd +66 -0
  97. sage/libs/flint/flint.pxd +36 -0
  98. sage/libs/flint/flint_ntl_wrap.h +35 -0
  99. sage/libs/flint/flint_sage.cpython-313-x86_64-linux-gnu.so +0 -0
  100. sage/libs/flint/flint_sage.pyx +163 -0
  101. sage/libs/flint/flint_wrap.h +190 -0
  102. sage/libs/flint/fmpq.pxd +137 -0
  103. sage/libs/flint/fmpq_mat.pxd +105 -0
  104. sage/libs/flint/fmpq_mat_macros.pxd +10 -0
  105. sage/libs/flint/fmpq_mpoly.pxd +165 -0
  106. sage/libs/flint/fmpq_mpoly_factor.pxd +30 -0
  107. sage/libs/flint/fmpq_poly.pxd +241 -0
  108. sage/libs/flint/fmpq_poly_macros.pxd +9 -0
  109. sage/libs/flint/fmpq_poly_sage.cpython-313-x86_64-linux-gnu.so +0 -0
  110. sage/libs/flint/fmpq_poly_sage.pxd +31 -0
  111. sage/libs/flint/fmpq_poly_sage.pyx +48 -0
  112. sage/libs/flint/fmpq_vec.pxd +27 -0
  113. sage/libs/flint/fmpz.pxd +256 -0
  114. sage/libs/flint/fmpz_extras.pxd +32 -0
  115. sage/libs/flint/fmpz_factor.pxd +42 -0
  116. sage/libs/flint/fmpz_factor_sage.cpython-313-x86_64-linux-gnu.so +0 -0
  117. sage/libs/flint/fmpz_factor_sage.pxd +4 -0
  118. sage/libs/flint/fmpz_factor_sage.pyx +29 -0
  119. sage/libs/flint/fmpz_lll.pxd +49 -0
  120. sage/libs/flint/fmpz_macros.pxd +8 -0
  121. sage/libs/flint/fmpz_mat.pxd +184 -0
  122. sage/libs/flint/fmpz_mat_macros.pxd +10 -0
  123. sage/libs/flint/fmpz_mod.pxd +46 -0
  124. sage/libs/flint/fmpz_mod_mat.pxd +71 -0
  125. sage/libs/flint/fmpz_mod_mpoly.pxd +161 -0
  126. sage/libs/flint/fmpz_mod_mpoly_factor.pxd +28 -0
  127. sage/libs/flint/fmpz_mod_poly.pxd +249 -0
  128. sage/libs/flint/fmpz_mod_poly_factor.pxd +46 -0
  129. sage/libs/flint/fmpz_mod_vec.pxd +27 -0
  130. sage/libs/flint/fmpz_mpoly.pxd +224 -0
  131. sage/libs/flint/fmpz_mpoly_factor.pxd +29 -0
  132. sage/libs/flint/fmpz_mpoly_q.pxd +57 -0
  133. sage/libs/flint/fmpz_poly.cpython-313-x86_64-linux-gnu.so +0 -0
  134. sage/libs/flint/fmpz_poly.pxd +407 -0
  135. sage/libs/flint/fmpz_poly.pyx +19 -0
  136. sage/libs/flint/fmpz_poly_factor.pxd +33 -0
  137. sage/libs/flint/fmpz_poly_macros.pxd +8 -0
  138. sage/libs/flint/fmpz_poly_mat.pxd +71 -0
  139. sage/libs/flint/fmpz_poly_q.pxd +55 -0
  140. sage/libs/flint/fmpz_poly_sage.cpython-313-x86_64-linux-gnu.so +0 -0
  141. sage/libs/flint/fmpz_poly_sage.pxd +20 -0
  142. sage/libs/flint/fmpz_poly_sage.pyx +500 -0
  143. sage/libs/flint/fmpz_vec.pxd +80 -0
  144. sage/libs/flint/fmpzi.pxd +52 -0
  145. sage/libs/flint/fq.pxd +97 -0
  146. sage/libs/flint/fq_default.pxd +84 -0
  147. sage/libs/flint/fq_default_mat.pxd +70 -0
  148. sage/libs/flint/fq_default_poly.pxd +97 -0
  149. sage/libs/flint/fq_default_poly_factor.pxd +39 -0
  150. sage/libs/flint/fq_embed.pxd +28 -0
  151. sage/libs/flint/fq_mat.pxd +83 -0
  152. sage/libs/flint/fq_nmod.pxd +95 -0
  153. sage/libs/flint/fq_nmod_embed.pxd +28 -0
  154. sage/libs/flint/fq_nmod_mat.pxd +83 -0
  155. sage/libs/flint/fq_nmod_mpoly.pxd +130 -0
  156. sage/libs/flint/fq_nmod_mpoly_factor.pxd +28 -0
  157. sage/libs/flint/fq_nmod_poly.pxd +202 -0
  158. sage/libs/flint/fq_nmod_poly_factor.pxd +47 -0
  159. sage/libs/flint/fq_nmod_vec.pxd +33 -0
  160. sage/libs/flint/fq_poly.pxd +204 -0
  161. sage/libs/flint/fq_poly_factor.pxd +47 -0
  162. sage/libs/flint/fq_vec.pxd +33 -0
  163. sage/libs/flint/fq_zech.pxd +99 -0
  164. sage/libs/flint/fq_zech_embed.pxd +28 -0
  165. sage/libs/flint/fq_zech_mat.pxd +78 -0
  166. sage/libs/flint/fq_zech_poly.pxd +198 -0
  167. sage/libs/flint/fq_zech_poly_factor.pxd +47 -0
  168. sage/libs/flint/fq_zech_vec.pxd +33 -0
  169. sage/libs/flint/gr.pxd +174 -0
  170. sage/libs/flint/gr_generic.pxd +215 -0
  171. sage/libs/flint/gr_mat.pxd +161 -0
  172. sage/libs/flint/gr_mpoly.pxd +68 -0
  173. sage/libs/flint/gr_poly.pxd +276 -0
  174. sage/libs/flint/gr_special.pxd +237 -0
  175. sage/libs/flint/gr_vec.pxd +120 -0
  176. sage/libs/flint/hypgeom.pxd +24 -0
  177. sage/libs/flint/long_extras.pxd +23 -0
  178. sage/libs/flint/mag.pxd +131 -0
  179. sage/libs/flint/mag_macros.pxd +8 -0
  180. sage/libs/flint/mpf_mat.pxd +36 -0
  181. sage/libs/flint/mpf_vec.pxd +34 -0
  182. sage/libs/flint/mpfr_mat.pxd +27 -0
  183. sage/libs/flint/mpfr_vec.pxd +25 -0
  184. sage/libs/flint/mpn_extras.pxd +41 -0
  185. sage/libs/flint/mpoly.pxd +72 -0
  186. sage/libs/flint/nf.pxd +19 -0
  187. sage/libs/flint/nf_elem.pxd +74 -0
  188. sage/libs/flint/nmod.pxd +35 -0
  189. sage/libs/flint/nmod_mat.pxd +104 -0
  190. sage/libs/flint/nmod_mpoly.pxd +144 -0
  191. sage/libs/flint/nmod_mpoly_factor.pxd +28 -0
  192. sage/libs/flint/nmod_poly.pxd +339 -0
  193. sage/libs/flint/nmod_poly_factor.pxd +44 -0
  194. sage/libs/flint/nmod_poly_linkage.pxi +710 -0
  195. sage/libs/flint/nmod_poly_mat.pxd +76 -0
  196. sage/libs/flint/nmod_vec.pxd +40 -0
  197. sage/libs/flint/ntl_interface.pxd +17 -0
  198. sage/libs/flint/padic.pxd +93 -0
  199. sage/libs/flint/padic_mat.pxd +64 -0
  200. sage/libs/flint/padic_poly.pxd +88 -0
  201. sage/libs/flint/partitions.pxd +23 -0
  202. sage/libs/flint/perm.pxd +26 -0
  203. sage/libs/flint/profiler.pxd +24 -0
  204. sage/libs/flint/qadic.pxd +77 -0
  205. sage/libs/flint/qfb.pxd +44 -0
  206. sage/libs/flint/qqbar.pxd +172 -0
  207. sage/libs/flint/qsieve.cpython-313-x86_64-linux-gnu.so +0 -0
  208. sage/libs/flint/qsieve.pxd +41 -0
  209. sage/libs/flint/qsieve.pyx +21 -0
  210. sage/libs/flint/qsieve_sage.cpython-313-x86_64-linux-gnu.so +0 -0
  211. sage/libs/flint/qsieve_sage.pyx +67 -0
  212. sage/libs/flint/thread_pool.pxd +25 -0
  213. sage/libs/flint/types.pxd +2076 -0
  214. sage/libs/flint/ulong_extras.cpython-313-x86_64-linux-gnu.so +0 -0
  215. sage/libs/flint/ulong_extras.pxd +141 -0
  216. sage/libs/flint/ulong_extras.pyx +21 -0
  217. sage/libs/flint/ulong_extras_sage.cpython-313-x86_64-linux-gnu.so +0 -0
  218. sage/libs/flint/ulong_extras_sage.pyx +21 -0
  219. sage/matrix/all__sagemath_flint.py +1 -0
  220. sage/matrix/change_ring.cpython-313-x86_64-linux-gnu.so +0 -0
  221. sage/matrix/change_ring.pyx +43 -0
  222. sage/matrix/matrix_complex_ball_dense.cpython-313-x86_64-linux-gnu.so +0 -0
  223. sage/matrix/matrix_complex_ball_dense.pxd +14 -0
  224. sage/matrix/matrix_complex_ball_dense.pyx +973 -0
  225. sage/matrix/matrix_cyclo_dense.cpython-313-x86_64-linux-gnu.so +0 -0
  226. sage/matrix/matrix_cyclo_dense.pxd +16 -0
  227. sage/matrix/matrix_cyclo_dense.pyx +1761 -0
  228. sage/matrix/matrix_integer_dense.cpython-313-x86_64-linux-gnu.so +0 -0
  229. sage/matrix/matrix_integer_dense.pxd +32 -0
  230. sage/matrix/matrix_integer_dense.pyx +5801 -0
  231. sage/matrix/matrix_integer_dense_hnf.py +1294 -0
  232. sage/matrix/matrix_integer_dense_saturation.py +346 -0
  233. sage/matrix/matrix_integer_sparse.cpython-313-x86_64-linux-gnu.so +0 -0
  234. sage/matrix/matrix_integer_sparse.pxd +9 -0
  235. sage/matrix/matrix_integer_sparse.pyx +1090 -0
  236. sage/matrix/matrix_rational_dense.cpython-313-x86_64-linux-gnu.so +0 -0
  237. sage/matrix/matrix_rational_dense.pxd +23 -0
  238. sage/matrix/matrix_rational_dense.pyx +2995 -0
  239. sage/matrix/matrix_rational_sparse.cpython-313-x86_64-linux-gnu.so +0 -0
  240. sage/matrix/matrix_rational_sparse.pxd +11 -0
  241. sage/matrix/matrix_rational_sparse.pyx +789 -0
  242. sage/matrix/misc_flint.cpython-313-x86_64-linux-gnu.so +0 -0
  243. sage/matrix/misc_flint.pyx +109 -0
  244. sage/modular/all__sagemath_flint.py +1 -0
  245. sage/modular/modform/all__sagemath_flint.py +1 -0
  246. sage/modular/modform/eis_series_cython.cpython-313-x86_64-linux-gnu.so +0 -0
  247. sage/modular/modform/eis_series_cython.pyx +226 -0
  248. sage/modular/modsym/all__sagemath_flint.py +1 -0
  249. sage/modular/modsym/apply.cpython-313-x86_64-linux-gnu.so +0 -0
  250. sage/modular/modsym/apply.pxd +6 -0
  251. sage/modular/modsym/apply.pyx +113 -0
  252. sage/modular/modsym/heilbronn.cpython-313-x86_64-linux-gnu.so +0 -0
  253. sage/modular/modsym/heilbronn.pyx +966 -0
  254. sage/modular/pollack_stevens/all__sagemath_flint.py +1 -0
  255. sage/modular/pollack_stevens/dist.cpython-313-x86_64-linux-gnu.so +0 -0
  256. sage/modular/pollack_stevens/dist.pxd +38 -0
  257. sage/modular/pollack_stevens/dist.pyx +1439 -0
  258. sage/quivers/algebra.py +691 -0
  259. sage/quivers/algebra_elements.cpython-313-x86_64-linux-gnu.so +0 -0
  260. sage/quivers/algebra_elements.pxd +97 -0
  261. sage/quivers/algebra_elements.pxi +1324 -0
  262. sage/quivers/algebra_elements.pyx +1424 -0
  263. sage/quivers/all.py +1 -0
  264. sage/quivers/ar_quiver.py +917 -0
  265. sage/quivers/homspace.py +640 -0
  266. sage/quivers/morphism.py +1282 -0
  267. sage/quivers/path_semigroup.py +1155 -0
  268. sage/quivers/paths.cpython-313-x86_64-linux-gnu.so +0 -0
  269. sage/quivers/paths.pxd +13 -0
  270. sage/quivers/paths.pyx +809 -0
  271. sage/quivers/representation.py +2975 -0
  272. sage/rings/all__sagemath_flint.py +37 -0
  273. sage/rings/cif.py +4 -0
  274. sage/rings/complex_arb.cpython-313-x86_64-linux-gnu.so +0 -0
  275. sage/rings/complex_arb.pxd +29 -0
  276. sage/rings/complex_arb.pyx +5176 -0
  277. sage/rings/complex_interval.cpython-313-x86_64-linux-gnu.so +0 -0
  278. sage/rings/complex_interval.pxd +30 -0
  279. sage/rings/complex_interval.pyx +2475 -0
  280. sage/rings/complex_interval_field.py +711 -0
  281. sage/rings/convert/all.py +1 -0
  282. sage/rings/convert/mpfi.cpython-313-x86_64-linux-gnu.so +0 -0
  283. sage/rings/convert/mpfi.pxd +6 -0
  284. sage/rings/convert/mpfi.pyx +576 -0
  285. sage/rings/factorint_flint.cpython-313-x86_64-linux-gnu.so +0 -0
  286. sage/rings/factorint_flint.pyx +99 -0
  287. sage/rings/fraction_field_FpT.cpython-313-x86_64-linux-gnu.so +0 -0
  288. sage/rings/fraction_field_FpT.pxd +28 -0
  289. sage/rings/fraction_field_FpT.pyx +2043 -0
  290. sage/rings/imaginary_unit.py +5 -0
  291. sage/rings/monomials.py +73 -0
  292. sage/rings/number_field/S_unit_solver.py +2870 -0
  293. sage/rings/number_field/all__sagemath_flint.py +7 -0
  294. sage/rings/number_field/bdd_height.py +664 -0
  295. sage/rings/number_field/class_group.py +762 -0
  296. sage/rings/number_field/galois_group.py +1307 -0
  297. sage/rings/number_field/homset.py +612 -0
  298. sage/rings/number_field/maps.py +687 -0
  299. sage/rings/number_field/morphism.py +272 -0
  300. sage/rings/number_field/number_field.py +12820 -0
  301. sage/rings/number_field/number_field_element.cpython-313-x86_64-linux-gnu.so +0 -0
  302. sage/rings/number_field/number_field_element.pxd +59 -0
  303. sage/rings/number_field/number_field_element.pyx +5735 -0
  304. sage/rings/number_field/number_field_element_quadratic.cpython-313-x86_64-linux-gnu.so +0 -0
  305. sage/rings/number_field/number_field_element_quadratic.pxd +34 -0
  306. sage/rings/number_field/number_field_element_quadratic.pyx +3185 -0
  307. sage/rings/number_field/number_field_ideal_rel.py +925 -0
  308. sage/rings/number_field/number_field_morphisms.cpython-313-x86_64-linux-gnu.so +0 -0
  309. sage/rings/number_field/number_field_morphisms.pyx +781 -0
  310. sage/rings/number_field/number_field_rel.py +2734 -0
  311. sage/rings/number_field/order.py +2981 -0
  312. sage/rings/number_field/order_ideal.py +804 -0
  313. sage/rings/number_field/selmer_group.py +715 -0
  314. sage/rings/number_field/small_primes_of_degree_one.py +242 -0
  315. sage/rings/number_field/splitting_field.py +606 -0
  316. sage/rings/number_field/structure.py +380 -0
  317. sage/rings/number_field/unit_group.py +721 -0
  318. sage/rings/padics/all__sagemath_flint.py +3 -0
  319. sage/rings/polynomial/all__sagemath_flint.py +1 -0
  320. sage/rings/polynomial/complex_roots.py +312 -0
  321. sage/rings/polynomial/evaluation_flint.cpython-313-x86_64-linux-gnu.so +0 -0
  322. sage/rings/polynomial/evaluation_flint.pxd +7 -0
  323. sage/rings/polynomial/evaluation_flint.pyx +68 -0
  324. sage/rings/polynomial/hilbert.cpython-313-x86_64-linux-gnu.so +0 -0
  325. sage/rings/polynomial/hilbert.pyx +602 -0
  326. sage/rings/polynomial/polynomial_complex_arb.cpython-313-x86_64-linux-gnu.so +0 -0
  327. sage/rings/polynomial/polynomial_complex_arb.pxd +7 -0
  328. sage/rings/polynomial/polynomial_complex_arb.pyx +963 -0
  329. sage/rings/polynomial/polynomial_integer_dense_flint.cpython-313-x86_64-linux-gnu.so +0 -0
  330. sage/rings/polynomial/polynomial_integer_dense_flint.pxd +13 -0
  331. sage/rings/polynomial/polynomial_integer_dense_flint.pyx +1881 -0
  332. sage/rings/polynomial/polynomial_number_field.cpython-313-x86_64-linux-gnu.so +0 -0
  333. sage/rings/polynomial/polynomial_number_field.pyx +345 -0
  334. sage/rings/polynomial/polynomial_rational_flint.cpython-313-x86_64-linux-gnu.so +0 -0
  335. sage/rings/polynomial/polynomial_rational_flint.pxd +20 -0
  336. sage/rings/polynomial/polynomial_rational_flint.pyx +2598 -0
  337. sage/rings/polynomial/polynomial_zmod_flint.cpython-313-x86_64-linux-gnu.so +0 -0
  338. sage/rings/polynomial/polynomial_zmod_flint.pxd +20 -0
  339. sage/rings/polynomial/polynomial_zmod_flint.pyx +1063 -0
  340. sage/rings/polynomial/real_roots.cpython-313-x86_64-linux-gnu.so +0 -0
  341. sage/rings/polynomial/real_roots.pxd +81 -0
  342. sage/rings/polynomial/real_roots.pyx +4704 -0
  343. sage/rings/polynomial/refine_root.cpython-313-x86_64-linux-gnu.so +0 -0
  344. sage/rings/polynomial/refine_root.pyx +142 -0
  345. sage/rings/polynomial/weil/all.py +4 -0
  346. sage/rings/polynomial/weil/power_sums.h +46 -0
  347. sage/rings/polynomial/weil/weil_polynomials.cpython-313-x86_64-linux-gnu.so +0 -0
  348. sage/rings/polynomial/weil/weil_polynomials.pyx +596 -0
  349. sage/rings/qqbar.py +9025 -0
  350. sage/rings/real_arb.cpython-313-x86_64-linux-gnu.so +0 -0
  351. sage/rings/real_arb.pxd +21 -0
  352. sage/rings/real_arb.pyx +4065 -0
  353. sage/rings/real_interval_absolute.cpython-313-x86_64-linux-gnu.so +0 -0
  354. sage/rings/real_interval_absolute.pyx +1073 -0
  355. sage/rings/real_mpfi.cpython-313-x86_64-linux-gnu.so +0 -0
  356. sage/rings/real_mpfi.pyx +5428 -0
  357. sage/schemes/all__sagemath_flint.py +1 -0
  358. sage/schemes/elliptic_curves/all__sagemath_flint.py +1 -0
  359. sage/schemes/elliptic_curves/descent_two_isogeny.cpython-313-x86_64-linux-gnu.so +0 -0
  360. sage/schemes/elliptic_curves/descent_two_isogeny.pyx +1387 -0
  361. sage/schemes/elliptic_curves/descent_two_isogeny_pari.pxd +5 -0
@@ -0,0 +1,762 @@
1
+ # sage_setup: distribution = sagemath-flint
2
+ # sage.doctest: needs sage.rings.number_field
3
+ r"""
4
+ Class groups of number fields
5
+
6
+ An element of a class group is stored as a pair consisting of both an explicit
7
+ ideal in that ideal class, and a list of exponents giving that ideal class in
8
+ terms of the generators of the parent class group. These can be accessed with
9
+ the ``ideal()`` and ``exponents()`` methods respectively.
10
+
11
+ EXAMPLES::
12
+
13
+ sage: x = polygen(ZZ, 'x')
14
+ sage: K.<a> = NumberField(x^2 + 23)
15
+ sage: I = K.class_group().gen(); I
16
+ Fractional ideal class (2, 1/2*a - 1/2)
17
+ sage: I.ideal()
18
+ Fractional ideal (2, 1/2*a - 1/2)
19
+ sage: I.exponents()
20
+ (1,)
21
+
22
+ sage: I.ideal() * I.ideal()
23
+ Fractional ideal (4, 1/2*a + 3/2)
24
+ sage: (I.ideal() * I.ideal()).reduce_equiv()
25
+ Fractional ideal (2, 1/2*a + 1/2)
26
+ sage: J = I * I; J # class group multiplication is automatically reduced
27
+ Fractional ideal class (2, 1/2*a + 1/2)
28
+ sage: J.ideal()
29
+ Fractional ideal (2, 1/2*a + 1/2)
30
+ sage: J.exponents()
31
+ (2,)
32
+
33
+ sage: I * I.ideal() # ideal classes coerce to their representative ideal
34
+ Fractional ideal (4, 1/2*a + 3/2)
35
+
36
+ sage: K.fractional_ideal([2, 1/2*a + 1/2])
37
+ Fractional ideal (2, 1/2*a + 1/2)
38
+ sage: K.fractional_ideal([2, 1/2*a + 1/2]).is_principal()
39
+ False
40
+ sage: K.fractional_ideal([2, 1/2*a + 1/2])^3
41
+ Fractional ideal (1/2*a - 3/2)
42
+ """
43
+
44
+ from sage.groups.abelian_gps.values import AbelianGroupWithValues_class, AbelianGroupWithValuesElement
45
+ from sage.groups.abelian_gps.abelian_group_element import AbelianGroupElement
46
+ from sage.structure.element import MonoidElement
47
+ from sage.rings.integer_ring import ZZ
48
+
49
+
50
+ class FractionalIdealClass(AbelianGroupWithValuesElement):
51
+ r"""
52
+ A fractional ideal class in a number field.
53
+
54
+ EXAMPLES::
55
+
56
+ sage: x = polygen(ZZ, 'x')
57
+ sage: G = NumberField(x^2 + 23,'a').class_group(); G
58
+ Class group of order 3 with structure C3 of
59
+ Number Field in a with defining polynomial x^2 + 23
60
+ sage: I = G.0; I
61
+ Fractional ideal class (2, 1/2*a - 1/2)
62
+ sage: I.ideal()
63
+ Fractional ideal (2, 1/2*a - 1/2)
64
+
65
+ sage: K.<w> = QuadraticField(-23)
66
+ sage: OK = K.ring_of_integers()
67
+ sage: C = OK.class_group()
68
+ sage: P2a, P2b = [P for P, e in (2*K).factor()]
69
+ sage: c = C(P2a); c
70
+ Fractional ideal class (2, 1/2*w - 1/2)
71
+ sage: c.gens()
72
+ (2, 1/2*w - 1/2)
73
+ """
74
+ def __init__(self, parent, element, ideal=None):
75
+ """
76
+ Return the ideal class of this fractional ideal.
77
+
78
+ EXAMPLES::
79
+
80
+ sage: x = polygen(ZZ, 'x')
81
+ sage: K.<a> = NumberField(x^2 + 23,'a'); G = K.class_group()
82
+ sage: G(K.ideal(13, a + 4))
83
+ Fractional ideal class (13, 1/2*a + 17/2)
84
+ """
85
+ if element is None:
86
+ element = parent._ideal_log(ideal)
87
+ AbelianGroupWithValuesElement.__init__(self, parent, element, ideal)
88
+
89
+ def _repr_(self):
90
+ r"""
91
+ Return string representation of this fractional ideal class.
92
+
93
+ EXAMPLES::
94
+
95
+ sage: x = polygen(ZZ, 'x')
96
+ sage: K.<a> = NumberField(x^2 + 23,'a'); G = K.class_group()
97
+ sage: G(K.ideal(13, a + 4))._repr_()
98
+ 'Fractional ideal class (13, 1/2*a + 17/2)'
99
+ sage: G(K.ideal(59, a+6))._repr_()
100
+ 'Trivial principal fractional ideal class'
101
+ """
102
+ if self.is_principal():
103
+ return 'Trivial principal fractional ideal class'
104
+ return 'Fractional ideal class %s' % self._value._repr_short()
105
+
106
+ def _mul_(self, other):
107
+ r"""
108
+ Multiplication of two (S-)ideal classes.
109
+
110
+ EXAMPLES::
111
+
112
+ sage: x = polygen(ZZ, 'x')
113
+ sage: G = NumberField(x^2 + 23,'a').class_group(); G
114
+ Class group of order 3 with structure C3 of
115
+ Number Field in a with defining polynomial x^2 + 23
116
+ sage: I = G.0; I
117
+ Fractional ideal class (2, 1/2*a - 1/2)
118
+ sage: I*I # indirect doctest
119
+ Fractional ideal class (2, 1/2*a + 1/2)
120
+ sage: I*I*I # indirect doctest
121
+ Trivial principal fractional ideal class
122
+
123
+ sage: K.<a> = QuadraticField(-14)
124
+ sage: I = K.ideal(2,a)
125
+ sage: S = (I,)
126
+ sage: CS = K.S_class_group(S)
127
+ sage: G = K.ideal(3,a+1)
128
+ sage: CS(G)*CS(G)
129
+ Trivial S-ideal class
130
+ """
131
+ m = AbelianGroupElement._mul_(self, other)
132
+ m._value = (self.ideal() * other.ideal()).reduce_equiv()
133
+ return m
134
+
135
+ def _div_(self, other):
136
+ r"""
137
+ Division of two ideal classes.
138
+
139
+ EXAMPLES::
140
+
141
+ sage: x = polygen(ZZ, 'x')
142
+ sage: G = NumberField(x^2 + 23,'a').class_group(); G
143
+ Class group of order 3 with structure C3 of
144
+ Number Field in a with defining polynomial x^2 + 23
145
+ sage: I = G.0; I
146
+ Fractional ideal class (2, 1/2*a - 1/2)
147
+ sage: I*I # indirect doctest
148
+ Fractional ideal class (2, 1/2*a + 1/2)
149
+ sage: I*I*I # indirect doctest
150
+ Trivial principal fractional ideal class
151
+ """
152
+ m = AbelianGroupElement._div_(self, other)
153
+ m._value = (self.ideal() / other.ideal()).reduce_equiv()
154
+ return m
155
+
156
+ def __pow__(self, n):
157
+ r"""
158
+ Raise this element to the power n.
159
+
160
+ EXAMPLES::
161
+
162
+ sage: x = polygen(ZZ, 'x')
163
+ sage: K.<a> = NumberField(x^3 - 3*x + 8)
164
+ sage: C = K.class_group()
165
+ sage: c = C(2, a)
166
+ sage: c^2
167
+ Fractional ideal class (4, a)
168
+ sage: c^3
169
+ Trivial principal fractional ideal class
170
+ sage: c^1000
171
+ Fractional ideal class (2, a)
172
+ sage: (c^2)^2
173
+ Fractional ideal class (2, a)
174
+ """
175
+ # We use MonoidElement's __pow__ routine, since that does
176
+ # repeated squaring, and hence the ideal gets reduced as
177
+ # we go along; actually computing self._value ** n would
178
+ # be disastrous.
179
+ n = n % self.order()
180
+ return MonoidElement.__pow__(self, n)
181
+
182
+ def inverse(self):
183
+ r"""
184
+ Return the multiplicative inverse of this ideal class.
185
+
186
+ EXAMPLES::
187
+
188
+ sage: x = polygen(ZZ, 'x')
189
+ sage: K.<a> = NumberField(x^3 - 3*x + 8); G = K.class_group()
190
+ sage: G(2, a).inverse()
191
+ Fractional ideal class (2, a^2 + 2*a - 1)
192
+ sage: ~G(2, a)
193
+ Fractional ideal class (2, a^2 + 2*a - 1)
194
+ """
195
+ m = AbelianGroupElement.__invert__(self)
196
+ m._value = (~self.ideal()).reduce_equiv()
197
+ return m
198
+
199
+ __invert__ = inverse
200
+
201
+ def is_principal(self):
202
+ r"""
203
+ Return ``True`` iff this ideal class is the trivial (principal) class.
204
+
205
+ EXAMPLES::
206
+
207
+ sage: K.<w> = QuadraticField(-23)
208
+ sage: OK = K.ring_of_integers()
209
+ sage: C = OK.class_group()
210
+ sage: P2a, P2b = [P for P, e in (2*K).factor()]
211
+ sage: c = C(P2a)
212
+ sage: c.is_principal()
213
+ False
214
+ sage: (c^2).is_principal()
215
+ False
216
+ sage: (c^3).is_principal()
217
+ True
218
+ """
219
+ return self.is_one()
220
+
221
+ def reduce(self):
222
+ r"""
223
+ Return representative for this ideal class that has been
224
+ reduced using PARI's :pari:`idealred`.
225
+
226
+ EXAMPLES::
227
+
228
+ sage: x = polygen(ZZ, 'x')
229
+ sage: k.<a> = NumberField(x^2 + 20072); G = k.class_group(); G
230
+ Class group of order 76 with structure C38 x C2 of
231
+ Number Field in a with defining polynomial x^2 + 20072
232
+ sage: I = (G.0)^11; I
233
+ Fractional ideal class (33, 1/2*a + 8)
234
+ sage: J = G(I.ideal()^5); J
235
+ Fractional ideal class (39135393, 1/2*a + 13654253)
236
+ sage: J.reduce()
237
+ Fractional ideal class (73, 1/2*a + 47)
238
+ sage: J == I^5
239
+ True
240
+ """
241
+ return self.parent()(self.ideal().reduce_equiv())
242
+
243
+ def ideal(self):
244
+ r"""
245
+ Return a representative ideal in this ideal class.
246
+
247
+ EXAMPLES::
248
+
249
+ sage: K.<w> = QuadraticField(-23)
250
+ sage: OK = K.ring_of_integers()
251
+ sage: C = OK.class_group()
252
+ sage: P2a, P2b = [P for P, e in (2*K).factor()]
253
+ sage: c = C(P2a); c
254
+ Fractional ideal class (2, 1/2*w - 1/2)
255
+ sage: c.ideal()
256
+ Fractional ideal (2, 1/2*w - 1/2)
257
+ """
258
+ return self.value()
259
+
260
+ def representative_prime(self, norm_bound=1000):
261
+ r"""
262
+ Return a prime ideal in this ideal class.
263
+
264
+ INPUT:
265
+
266
+ - ``norm_bound`` -- (positive integer) upper bound on the norm of
267
+ primes tested
268
+
269
+ EXAMPLES::
270
+
271
+ sage: x = polygen(ZZ, 'x')
272
+ sage: K.<a> = NumberField(x^2 + 31)
273
+ sage: K.class_number()
274
+ 3
275
+ sage: Cl = K.class_group()
276
+ sage: [c.representative_prime() for c in Cl]
277
+ [Fractional ideal (3),
278
+ Fractional ideal (2, 1/2*a + 1/2),
279
+ Fractional ideal (2, 1/2*a - 1/2)]
280
+
281
+ sage: K.<a> = NumberField(x^2 + 223)
282
+ sage: K.class_number()
283
+ 7
284
+ sage: Cl = K.class_group()
285
+ sage: [c.representative_prime() for c in Cl]
286
+ [Fractional ideal (3),
287
+ Fractional ideal (2, 1/2*a + 1/2),
288
+ Fractional ideal (17, 1/2*a + 7/2),
289
+ Fractional ideal (7, 1/2*a - 1/2),
290
+ Fractional ideal (7, 1/2*a + 1/2),
291
+ Fractional ideal (17, 1/2*a + 27/2),
292
+ Fractional ideal (2, 1/2*a - 1/2)]
293
+ """
294
+ if self.value().is_prime():
295
+ return self.value()
296
+ c = self.reduce()
297
+ if c.value().is_prime():
298
+ return c.value()
299
+ # otherwise we just search:
300
+ Cl = self.parent()
301
+ K = Cl.number_field()
302
+ from sage.rings.real_mpfr import RR
303
+ for P in K.primes_of_bounded_norm_iter(RR(norm_bound)):
304
+ if Cl(P) == c:
305
+ return P
306
+ raise RuntimeError("No prime of norm less than %s found in class %s" % (norm_bound, c))
307
+
308
+ def gens(self) -> tuple:
309
+ r"""
310
+ Return generators for a representative ideal in this
311
+ (`S`-)ideal class.
312
+
313
+ EXAMPLES::
314
+
315
+ sage: K.<w> = QuadraticField(-23)
316
+ sage: OK = K.ring_of_integers()
317
+ sage: C = OK.class_group()
318
+ sage: P2a, P2b = [P for P, e in (2*K).factor()]
319
+ sage: c = C(P2a); c
320
+ Fractional ideal class (2, 1/2*w - 1/2)
321
+ sage: c.gens()
322
+ (2, 1/2*w - 1/2)
323
+ """
324
+ return self.ideal().gens()
325
+
326
+
327
+ class SFractionalIdealClass(FractionalIdealClass):
328
+ r"""
329
+ An `S`-fractional ideal class in a number field for a tuple `S` of primes.
330
+
331
+ EXAMPLES::
332
+
333
+ sage: K.<a> = QuadraticField(-14)
334
+ sage: I = K.ideal(2, a)
335
+ sage: S = (I,)
336
+ sage: CS = K.S_class_group(S)
337
+ sage: J = K.ideal(7, a)
338
+ sage: G = K.ideal(3, a + 1)
339
+ sage: CS(I)
340
+ Trivial S-ideal class
341
+ sage: CS(J)
342
+ Trivial S-ideal class
343
+ sage: CS(G)
344
+ Fractional S-ideal class (3, a + 1)
345
+
346
+ ::
347
+
348
+ sage: K.<a> = QuadraticField(-14)
349
+ sage: I = K.ideal(2, a)
350
+ sage: S = (I,)
351
+ sage: CS = K.S_class_group(S)
352
+ sage: J = K.ideal(7, a)
353
+ sage: G = K.ideal(3, a + 1)
354
+ sage: CS(I).ideal()
355
+ Fractional ideal (2, a)
356
+ sage: CS(J).ideal()
357
+ Fractional ideal (7, a)
358
+ sage: CS(G).ideal()
359
+ Fractional ideal (3, a + 1)
360
+
361
+ ::
362
+
363
+ sage: K.<a> = QuadraticField(-14)
364
+ sage: I = K.ideal(2, a)
365
+ sage: S = (I,)
366
+ sage: CS = K.S_class_group(S)
367
+ sage: G = K.ideal(3, a + 1)
368
+ sage: CS(G).inverse()
369
+ Fractional S-ideal class (3, a + 2)
370
+
371
+ TESTS::
372
+
373
+ sage: K.<a> = QuadraticField(-14)
374
+ sage: I = K.ideal(2,a)
375
+ sage: S = (I,)
376
+ sage: CS = K.S_class_group(S)
377
+ sage: J = K.ideal(7,a)
378
+ sage: G = K.ideal(3,a+1)
379
+ sage: CS(I).order()
380
+ 1
381
+ sage: CS(J).order()
382
+ 1
383
+ sage: CS(G).order()
384
+ 2
385
+ """
386
+
387
+ def _repr_(self):
388
+ r"""
389
+ Return a string representation of the `S`-ideal class of this fractional ideal.
390
+
391
+ EXAMPLES::
392
+
393
+ sage: K.<a> = QuadraticField(-14)
394
+ sage: I = K.ideal(2,a)
395
+ sage: J = K.ideal(3, a + 2)
396
+ sage: S = (I,)
397
+ sage: CS = K.S_class_group(S)
398
+ sage: CS(J)
399
+ Fractional S-ideal class (3, a + 2)
400
+ sage: CS(J^2)
401
+ Trivial S-ideal class
402
+ """
403
+ if self.is_trivial():
404
+ return 'Trivial S-ideal class'
405
+ return 'Fractional S-ideal class %s' % self._value._repr_short()
406
+
407
+
408
+ class ClassGroup(AbelianGroupWithValues_class):
409
+ r"""
410
+ The class group of a number field.
411
+
412
+ EXAMPLES::
413
+
414
+ sage: x = polygen(ZZ, 'x')
415
+ sage: K.<a> = NumberField(x^2 + 23)
416
+ sage: G = K.class_group(); G
417
+ Class group of order 3 with structure C3 of
418
+ Number Field in a with defining polynomial x^2 + 23
419
+ sage: G.category()
420
+ Category of finite enumerated commutative groups
421
+
422
+ Note the distinction between abstract generators, their ideal, and
423
+ exponents::
424
+
425
+ sage: C = NumberField(x^2 + 120071, 'a').class_group(); C
426
+ Class group of order 500 with structure C250 x C2
427
+ of Number Field in a with defining polynomial x^2 + 120071
428
+ sage: c = C.gen(0)
429
+ sage: c # random
430
+ Fractional ideal class (5, 1/2*a + 3/2)
431
+ sage: c.ideal() # random
432
+ Fractional ideal (5, 1/2*a + 3/2)
433
+ sage: c.ideal() is c.value() # alias
434
+ True
435
+ sage: c.exponents()
436
+ (1, 0)
437
+ """
438
+ Element = FractionalIdealClass
439
+
440
+ def __init__(self, gens_orders, names, number_field, gens, proof=True):
441
+ r"""
442
+ Create a class group.
443
+
444
+ TESTS::
445
+
446
+ sage: x = polygen(ZZ, 'x')
447
+ sage: K.<a> = NumberField(x^2 + 23)
448
+ sage: G = K.class_group()
449
+ sage: TestSuite(G).run()
450
+ """
451
+ AbelianGroupWithValues_class.__init__(self, gens_orders, names, gens,
452
+ values_group=number_field.ideal_monoid())
453
+ self._proof_flag = proof
454
+ self._number_field = number_field
455
+
456
+ def _element_constructor_(self, *args, **kwds):
457
+ r"""
458
+ Create an element of this class group from the given data. This may be:
459
+ an ideal class in this number field; an ideal class in a subfield; or
460
+ anything from which an ideal in this number field can be constructed.
461
+
462
+ EXAMPLES::
463
+
464
+ sage: x = polygen(ZZ, 'x')
465
+ sage: K.<b> = NumberField(x^2 + 389)
466
+ sage: C = K.class_group()
467
+ sage: C(K.ideal(b)) # indirect doctest
468
+ Trivial principal fractional ideal class
469
+ sage: C(K.ideal(59049, b + 35312)) # indirect doctest
470
+ Fractional ideal class (59049, b + 35312)
471
+ sage: C((59049, b + 35312)) # indirect doctest
472
+ Fractional ideal class (59049, b + 35312)
473
+ sage: C(59049, b + 35312) # indirect doctest
474
+ Fractional ideal class (59049, b + 35312)
475
+
476
+ sage: K.<a> = QuadraticField(-23)
477
+ sage: L.<b> = K.extension(x^2 - 2)
478
+ sage: CK = K.class_group()
479
+ sage: CL = L.class_group()
480
+ sage: [CL(I).exponents() for I in CK]
481
+ [(0,), (2,), (4,)]
482
+ """
483
+ if isinstance(args[0], FractionalIdealClass):
484
+ return self.element_class(self, None, self._number_field.ideal(args[0].ideal()))
485
+ else:
486
+ I = self._number_field.ideal(*args, **kwds)
487
+ if I.is_zero():
488
+ raise TypeError("The zero ideal is not a fractional ideal")
489
+ return self.element_class(self, None, I)
490
+
491
+ def _ideal_log(self, ideal):
492
+ """
493
+ Compute the exponents from the ``ideal``.
494
+
495
+ Used by the element constructor if necessary.
496
+
497
+ EXAMPLES::
498
+
499
+ sage: x = polygen(ZZ, 'x')
500
+ sage: K.<a> = NumberField(x^2 + 23, 'a')
501
+ sage: G = K.class_group()
502
+ sage: g = G.an_element()
503
+ sage: G._ideal_log(g.ideal())
504
+ (1,)
505
+ sage: g.exponents()
506
+ (1,)
507
+ """
508
+ return tuple(ZZ(order) for order in ideal.ideal_class_log(proof=self._proof_flag))
509
+
510
+ def gens_ideals(self):
511
+ r"""
512
+ Return generating ideals for the (`S`-)class group.
513
+
514
+ This is an alias for :meth:`gens_values`.
515
+
516
+ OUTPUT: a tuple of ideals, one for each abstract Abelian group generator
517
+
518
+ EXAMPLES::
519
+
520
+ sage: x = polygen(ZZ, 'x')
521
+ sage: K.<a> = NumberField(x^4 + 23)
522
+ sage: K.class_group().gens_ideals() # random gens (platform dependent)
523
+ (Fractional ideal (2, 1/4*a^3 - 1/4*a^2 + 1/4*a - 1/4),)
524
+
525
+ sage: C = NumberField(x^2 + x + 23899, 'a').class_group(); C
526
+ Class group of order 68 with structure C34 x C2 of Number Field
527
+ in a with defining polynomial x^2 + x + 23899
528
+ sage: C.gens()
529
+ (Fractional ideal class (83, a + 21), Fractional ideal class (15, a + 8))
530
+ sage: C.gens_ideals()
531
+ (Fractional ideal (83, a + 21), Fractional ideal (15, a + 8))
532
+ """
533
+ return self.gens_values()
534
+
535
+ def __iter__(self):
536
+ r"""
537
+ Return an iterator of all ideal classes in this class group.
538
+
539
+ EXAMPLES::
540
+
541
+ sage: x = polygen(ZZ, 'x')
542
+ sage: K.<a> = NumberField(x^4 + 23)
543
+ sage: G = K.class_group()
544
+ sage: G
545
+ Class group of order 3 with structure C3 of Number Field
546
+ in a with defining polynomial x^4 + 23
547
+ sage: list(G)
548
+ [Trivial principal fractional ideal class,
549
+ Fractional ideal class (2, 1/4*a^3 - 1/4*a^2 + 1/4*a - 1/4),
550
+ Fractional ideal class (2, 1/2*a^2 + 1/2)]
551
+ sage: G.list()
552
+ (Trivial principal fractional ideal class,
553
+ Fractional ideal class (2, 1/4*a^3 - 1/4*a^2 + 1/4*a - 1/4),
554
+ Fractional ideal class (2, 1/2*a^2 + 1/2))
555
+
556
+ TESTS::
557
+
558
+ sage: K.<a> = NumberField(x^2 + 1)
559
+ sage: G = K.class_group()
560
+ sage: G
561
+ Class group of order 1 of Number Field in a with defining polynomial x^2 + 1
562
+ sage: list(G)
563
+ [Trivial principal fractional ideal class]
564
+ sage: G.list()
565
+ (Trivial principal fractional ideal class,)
566
+ """
567
+ return self._iter_inner(self.one(), 0)
568
+
569
+ def _iter_inner(self, i0, k):
570
+ r"""
571
+ Yield all elements of the coset `i0 * \{h in H_k\}`, where
572
+ `H_k` is the subgroup of ``self`` generated by ``self.gens()[k:]``.
573
+
574
+ Each new element provided costs exactly one group operation, and is
575
+ not necessarily reduced.
576
+
577
+ EXAMPLES::
578
+
579
+ sage: x = ZZ['x'].gen()
580
+ sage: K.<v> = NumberField(x^4 + 90*x^2 + 45)
581
+ sage: OK = K.maximal_order()
582
+ sage: G = OK.class_group()
583
+ sage: iter = G._iter_inner(G.gen(0)^2,1)
584
+ sage: all(next(iter) in G for _ in range(4))
585
+ True
586
+ """
587
+ if k == self.ngens():
588
+ yield i0
589
+ return
590
+ gk = self.gen(k)
591
+ for _ in range(self._gens_orders[k]):
592
+ yield from self._iter_inner(i0, k + 1)
593
+ i0 = i0 * gk
594
+ return
595
+
596
+ def _repr_(self):
597
+ r"""
598
+ Return string representation of ``self``.
599
+
600
+ EXAMPLES::
601
+
602
+ sage: x = polygen(ZZ, 'x')
603
+ sage: C = NumberField(x^2 + 23, 'a').class_group()
604
+ sage: C._repr_()
605
+ 'Class group of order 3 with structure C3 of Number Field in a with defining polynomial x^2 + 23'
606
+ """
607
+ s = 'Class group of order %s ' % self.order()
608
+ if self.order() > 1:
609
+ s += 'with structure %s ' % self._group_notation(self.gens_orders())
610
+ s += 'of %s' % self.number_field()
611
+ return s
612
+
613
+ def number_field(self):
614
+ r"""
615
+ Return the number field that this (`S`-)class group is attached to.
616
+
617
+ EXAMPLES::
618
+
619
+ sage: x = polygen(ZZ, 'x')
620
+ sage: C = NumberField(x^2 + 23, 'w').class_group(); C
621
+ Class group of order 3 with structure C3 of
622
+ Number Field in w with defining polynomial x^2 + 23
623
+ sage: C.number_field()
624
+ Number Field in w with defining polynomial x^2 + 23
625
+
626
+ sage: K.<a> = QuadraticField(-14)
627
+ sage: CS = K.S_class_group(K.primes_above(2))
628
+ sage: CS.number_field()
629
+ Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I
630
+ """
631
+ return self._number_field
632
+
633
+
634
+ class SClassGroup(ClassGroup):
635
+ r"""
636
+ The `S`-class group of a number field.
637
+
638
+ EXAMPLES::
639
+
640
+ sage: K.<a> = QuadraticField(-14)
641
+ sage: S = K.primes_above(2)
642
+ sage: K.S_class_group(S).gens() # random gens (platform dependent)
643
+ (Fractional S-ideal class (3, a + 2),)
644
+
645
+ sage: K.<a> = QuadraticField(-974)
646
+ sage: CS = K.S_class_group(K.primes_above(2)); CS
647
+ S-class group of order 18 with structure C6 x C3 of
648
+ Number Field in a with defining polynomial x^2 + 974 with a = 31.20897306865447?*I
649
+ sage: CS.gen(0) # random
650
+ Fractional S-ideal class (3, a + 2)
651
+ sage: CS.gen(1) # random
652
+ Fractional S-ideal class (31, a + 24)
653
+ """
654
+ Element = SFractionalIdealClass
655
+
656
+ def __init__(self, gens_orders, names, number_field, gens, S, proof=True):
657
+ r"""
658
+ Create an `S`-class group.
659
+
660
+ EXAMPLES::
661
+
662
+ sage: K.<a> = QuadraticField(-14)
663
+ sage: I = K.ideal(2,a)
664
+ sage: S = (I,)
665
+ sage: K.S_class_group(S)
666
+ S-class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I
667
+ sage: K.<a> = QuadraticField(-105)
668
+ sage: K.S_class_group([K.ideal(13, a + 8)])
669
+ S-class group of order 4 with structure C2 x C2 of Number Field in a with defining polynomial x^2 + 105 with a = 10.24695076595960?*I
670
+ """
671
+ AbelianGroupWithValues_class.__init__(self, gens_orders, names, gens,
672
+ values_group=number_field.ideal_monoid())
673
+ self._proof_flag = proof
674
+ self._number_field = number_field
675
+ self._S = S
676
+
677
+ def S(self):
678
+ r"""
679
+ Return the set (or rather tuple) of primes used to define this class group.
680
+
681
+ EXAMPLES::
682
+
683
+ sage: K.<a> = QuadraticField(-14)
684
+ sage: I = K.ideal(2, a)
685
+ sage: S = (I,)
686
+ sage: CS = K.S_class_group(S);CS
687
+ S-class group of order 2 with structure C2 of
688
+ Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I
689
+ sage: T = tuple()
690
+ sage: CT = K.S_class_group(T);CT
691
+ S-class group of order 4 with structure C4 of
692
+ Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I
693
+ sage: CS.S()
694
+ (Fractional ideal (2, a),)
695
+ sage: CT.S()
696
+ ()
697
+ """
698
+ return self._S
699
+
700
+ def _ideal_log(self, ideal):
701
+ """
702
+ Compute the exponents from the ``ideal``.
703
+
704
+ Used by the element constructor if necessary.
705
+
706
+ EXAMPLES::
707
+
708
+ sage: K.<a> = QuadraticField(-14)
709
+ sage: I = K.ideal(2,a)
710
+ sage: S = (I,)
711
+ sage: CS = K.S_class_group(S)
712
+ sage: s = CS.an_element()
713
+ sage: CS._ideal_log(s.ideal())
714
+ (1,)
715
+ sage: s.exponents()
716
+ (1,)
717
+ """
718
+ return tuple(ZZ(order) for order in ideal.S_ideal_class_log(self.S()))
719
+
720
+ def _element_constructor_(self, *args, **kwds):
721
+ r"""
722
+ Create an element of this class group from the given data.
723
+
724
+ EXAMPLES::
725
+
726
+ sage: K.<a> = QuadraticField(-14)
727
+ sage: I = K.ideal(2,a)
728
+ sage: S = (I,)
729
+ sage: CS = K.S_class_group(S)
730
+ sage: J = K.ideal(7,a)
731
+ sage: G = K.ideal(3,a+1)
732
+ sage: CS(I)
733
+ Trivial S-ideal class
734
+ sage: CS(J)
735
+ Trivial S-ideal class
736
+ sage: CS(G)
737
+ Fractional S-ideal class (3, a + 1)
738
+ """
739
+ if isinstance(args[0], FractionalIdealClass):
740
+ return self.element_class(self, None, args[0].ideal())
741
+ else:
742
+ I = self.number_field().ideal(*args, **kwds)
743
+ if I.is_zero():
744
+ raise TypeError("The zero ideal is not a fractional ideal")
745
+ return self.element_class(self, None, I)
746
+
747
+ def _repr_(self):
748
+ r"""
749
+ Return string representation of this S-class group.
750
+
751
+ EXAMPLES::
752
+
753
+ sage: K.<a> = QuadraticField(-14)
754
+ sage: CS = K.S_class_group(K.primes_above(2))
755
+ sage: CS._repr_()
756
+ 'S-class group of order 2 with structure C2 of Number Field in a with defining polynomial x^2 + 14 with a = 3.741657386773942?*I'
757
+ """
758
+ s = 'S-class group of order %s ' % self.order()
759
+ if self.order() > 1:
760
+ s += 'with structure %s ' % self._group_notation(self.gens_orders())
761
+ s += 'of %s' % self.number_field()
762
+ return s