passagemath-flint 10.6.1rc10__cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.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 (360) hide show
  1. passagemath_flint-10.6.1rc10.dist-info/METADATA +122 -0
  2. passagemath_flint-10.6.1rc10.dist-info/RECORD +360 -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-3701249d.so.21.0.0 +0 -0
  6. passagemath_flint.libs/libgf2x-fbd36f80.so.3.0.0 +0 -0
  7. passagemath_flint.libs/libgfortran-8a9a71bc.so.5.0.0 +0 -0
  8. passagemath_flint.libs/libgmp-93ebf16a.so.10.5.0 +0 -0
  9. passagemath_flint.libs/libgsl-e3525837.so.28.0.0 +0 -0
  10. passagemath_flint.libs/libmpfi-ad12a86d.so.0.0.0 +0 -0
  11. passagemath_flint.libs/libmpfr-e0f11cf3.so.6.2.1 +0 -0
  12. passagemath_flint.libs/libntl-1004113e.so.44.0.1 +0 -0
  13. passagemath_flint.libs/libopenblasp-r0-4c5b64b1.3.29.so +0 -0
  14. sage/all__sagemath_flint.py +29 -0
  15. sage/combinat/all__sagemath_flint.py +1 -0
  16. sage/combinat/posets/all__sagemath_flint.py +1 -0
  17. sage/combinat/posets/hasse_cython_flint.cpython-312-aarch64-linux-gnu.so +0 -0
  18. sage/combinat/posets/hasse_cython_flint.pyx +194 -0
  19. sage/data_structures/all__sagemath_flint.py +1 -0
  20. sage/data_structures/bounded_integer_sequences.cpython-312-aarch64-linux-gnu.so +0 -0
  21. sage/data_structures/bounded_integer_sequences.pxd +62 -0
  22. sage/data_structures/bounded_integer_sequences.pyx +1418 -0
  23. sage/graphs/all__sagemath_flint.py +1 -0
  24. sage/graphs/chrompoly.cpython-312-aarch64-linux-gnu.so +0 -0
  25. sage/graphs/chrompoly.pyx +555 -0
  26. sage/graphs/matchpoly.cpython-312-aarch64-linux-gnu.so +0 -0
  27. sage/graphs/matchpoly.pyx +412 -0
  28. sage/libs/all__sagemath_flint.py +17 -0
  29. sage/libs/arb/__init__.py +1 -0
  30. sage/libs/arb/acb.pxd +154 -0
  31. sage/libs/arb/acb_calc.pxd +9 -0
  32. sage/libs/arb/acb_elliptic.pxd +25 -0
  33. sage/libs/arb/acb_hypgeom.pxd +74 -0
  34. sage/libs/arb/acb_mat.pxd +62 -0
  35. sage/libs/arb/acb_modular.pxd +17 -0
  36. sage/libs/arb/acb_poly.pxd +216 -0
  37. sage/libs/arb/arb.pxd +240 -0
  38. sage/libs/arb/arb_fmpz_poly.pxd +21 -0
  39. sage/libs/arb/arb_hypgeom.pxd +83 -0
  40. sage/libs/arb/arb_wrap.h +34 -0
  41. sage/libs/arb/arf.pxd +131 -0
  42. sage/libs/arb/arith.cpython-312-aarch64-linux-gnu.so +0 -0
  43. sage/libs/arb/arith.pyx +87 -0
  44. sage/libs/arb/bernoulli.pxd +6 -0
  45. sage/libs/arb/mag.pxd +77 -0
  46. sage/libs/arb/types.pxd +37 -0
  47. sage/libs/flint/__init__.py +1 -0
  48. sage/libs/flint/acb.pxd +270 -0
  49. sage/libs/flint/acb_calc.pxd +22 -0
  50. sage/libs/flint/acb_dft.pxd +51 -0
  51. sage/libs/flint/acb_dirichlet.pxd +112 -0
  52. sage/libs/flint/acb_elliptic.pxd +42 -0
  53. sage/libs/flint/acb_hypgeom.pxd +169 -0
  54. sage/libs/flint/acb_macros.pxd +9 -0
  55. sage/libs/flint/acb_mat.pxd +136 -0
  56. sage/libs/flint/acb_mat_macros.pxd +10 -0
  57. sage/libs/flint/acb_modular.pxd +62 -0
  58. sage/libs/flint/acb_poly.pxd +251 -0
  59. sage/libs/flint/acb_poly_macros.pxd +8 -0
  60. sage/libs/flint/acb_theta.pxd +124 -0
  61. sage/libs/flint/acf.pxd +32 -0
  62. sage/libs/flint/aprcl.pxd +84 -0
  63. sage/libs/flint/arb.pxd +382 -0
  64. sage/libs/flint/arb_calc.pxd +31 -0
  65. sage/libs/flint/arb_fmpz_poly.pxd +34 -0
  66. sage/libs/flint/arb_fpwrap.pxd +215 -0
  67. sage/libs/flint/arb_hypgeom.pxd +147 -0
  68. sage/libs/flint/arb_macros.pxd +9 -0
  69. sage/libs/flint/arb_mat.pxd +140 -0
  70. sage/libs/flint/arb_mat_macros.pxd +10 -0
  71. sage/libs/flint/arb_poly.pxd +237 -0
  72. sage/libs/flint/arf.pxd +167 -0
  73. sage/libs/flint/arith.cpython-312-aarch64-linux-gnu.so +0 -0
  74. sage/libs/flint/arith.pxd +76 -0
  75. sage/libs/flint/arith.pyx +77 -0
  76. sage/libs/flint/arith_sage.cpython-312-aarch64-linux-gnu.so +0 -0
  77. sage/libs/flint/arith_sage.pyx +308 -0
  78. sage/libs/flint/bernoulli.pxd +28 -0
  79. sage/libs/flint/bool_mat.pxd +52 -0
  80. sage/libs/flint/ca.pxd +203 -0
  81. sage/libs/flint/ca_ext.pxd +34 -0
  82. sage/libs/flint/ca_field.pxd +32 -0
  83. sage/libs/flint/ca_mat.pxd +117 -0
  84. sage/libs/flint/ca_poly.pxd +104 -0
  85. sage/libs/flint/ca_vec.pxd +46 -0
  86. sage/libs/flint/calcium.pxd +27 -0
  87. sage/libs/flint/d_mat.pxd +39 -0
  88. sage/libs/flint/d_vec.pxd +32 -0
  89. sage/libs/flint/dirichlet.pxd +57 -0
  90. sage/libs/flint/dlog.pxd +53 -0
  91. sage/libs/flint/double_extras.pxd +24 -0
  92. sage/libs/flint/double_interval.pxd +36 -0
  93. sage/libs/flint/fexpr.pxd +104 -0
  94. sage/libs/flint/fexpr_builtin.pxd +20 -0
  95. sage/libs/flint/fft.pxd +66 -0
  96. sage/libs/flint/flint.pxd +36 -0
  97. sage/libs/flint/flint_ntl_wrap.h +35 -0
  98. sage/libs/flint/flint_sage.cpython-312-aarch64-linux-gnu.so +0 -0
  99. sage/libs/flint/flint_sage.pyx +163 -0
  100. sage/libs/flint/flint_wrap.h +190 -0
  101. sage/libs/flint/fmpq.pxd +137 -0
  102. sage/libs/flint/fmpq_mat.pxd +105 -0
  103. sage/libs/flint/fmpq_mat_macros.pxd +10 -0
  104. sage/libs/flint/fmpq_mpoly.pxd +165 -0
  105. sage/libs/flint/fmpq_mpoly_factor.pxd +30 -0
  106. sage/libs/flint/fmpq_poly.pxd +241 -0
  107. sage/libs/flint/fmpq_poly_macros.pxd +9 -0
  108. sage/libs/flint/fmpq_poly_sage.cpython-312-aarch64-linux-gnu.so +0 -0
  109. sage/libs/flint/fmpq_poly_sage.pxd +31 -0
  110. sage/libs/flint/fmpq_poly_sage.pyx +48 -0
  111. sage/libs/flint/fmpq_vec.pxd +27 -0
  112. sage/libs/flint/fmpz.pxd +256 -0
  113. sage/libs/flint/fmpz_extras.pxd +32 -0
  114. sage/libs/flint/fmpz_factor.pxd +42 -0
  115. sage/libs/flint/fmpz_factor_sage.cpython-312-aarch64-linux-gnu.so +0 -0
  116. sage/libs/flint/fmpz_factor_sage.pxd +4 -0
  117. sage/libs/flint/fmpz_factor_sage.pyx +29 -0
  118. sage/libs/flint/fmpz_lll.pxd +49 -0
  119. sage/libs/flint/fmpz_macros.pxd +8 -0
  120. sage/libs/flint/fmpz_mat.pxd +184 -0
  121. sage/libs/flint/fmpz_mat_macros.pxd +10 -0
  122. sage/libs/flint/fmpz_mod.pxd +46 -0
  123. sage/libs/flint/fmpz_mod_mat.pxd +71 -0
  124. sage/libs/flint/fmpz_mod_mpoly.pxd +161 -0
  125. sage/libs/flint/fmpz_mod_mpoly_factor.pxd +28 -0
  126. sage/libs/flint/fmpz_mod_poly.pxd +249 -0
  127. sage/libs/flint/fmpz_mod_poly_factor.pxd +46 -0
  128. sage/libs/flint/fmpz_mod_vec.pxd +27 -0
  129. sage/libs/flint/fmpz_mpoly.pxd +224 -0
  130. sage/libs/flint/fmpz_mpoly_factor.pxd +29 -0
  131. sage/libs/flint/fmpz_mpoly_q.pxd +57 -0
  132. sage/libs/flint/fmpz_poly.cpython-312-aarch64-linux-gnu.so +0 -0
  133. sage/libs/flint/fmpz_poly.pxd +407 -0
  134. sage/libs/flint/fmpz_poly.pyx +19 -0
  135. sage/libs/flint/fmpz_poly_factor.pxd +33 -0
  136. sage/libs/flint/fmpz_poly_macros.pxd +8 -0
  137. sage/libs/flint/fmpz_poly_mat.pxd +71 -0
  138. sage/libs/flint/fmpz_poly_q.pxd +55 -0
  139. sage/libs/flint/fmpz_poly_sage.cpython-312-aarch64-linux-gnu.so +0 -0
  140. sage/libs/flint/fmpz_poly_sage.pxd +20 -0
  141. sage/libs/flint/fmpz_poly_sage.pyx +500 -0
  142. sage/libs/flint/fmpz_vec.pxd +80 -0
  143. sage/libs/flint/fmpzi.pxd +52 -0
  144. sage/libs/flint/fq.pxd +97 -0
  145. sage/libs/flint/fq_default.pxd +84 -0
  146. sage/libs/flint/fq_default_mat.pxd +70 -0
  147. sage/libs/flint/fq_default_poly.pxd +97 -0
  148. sage/libs/flint/fq_default_poly_factor.pxd +39 -0
  149. sage/libs/flint/fq_embed.pxd +28 -0
  150. sage/libs/flint/fq_mat.pxd +83 -0
  151. sage/libs/flint/fq_nmod.pxd +95 -0
  152. sage/libs/flint/fq_nmod_embed.pxd +28 -0
  153. sage/libs/flint/fq_nmod_mat.pxd +83 -0
  154. sage/libs/flint/fq_nmod_mpoly.pxd +130 -0
  155. sage/libs/flint/fq_nmod_mpoly_factor.pxd +28 -0
  156. sage/libs/flint/fq_nmod_poly.pxd +202 -0
  157. sage/libs/flint/fq_nmod_poly_factor.pxd +47 -0
  158. sage/libs/flint/fq_nmod_vec.pxd +33 -0
  159. sage/libs/flint/fq_poly.pxd +204 -0
  160. sage/libs/flint/fq_poly_factor.pxd +47 -0
  161. sage/libs/flint/fq_vec.pxd +33 -0
  162. sage/libs/flint/fq_zech.pxd +99 -0
  163. sage/libs/flint/fq_zech_embed.pxd +28 -0
  164. sage/libs/flint/fq_zech_mat.pxd +78 -0
  165. sage/libs/flint/fq_zech_poly.pxd +198 -0
  166. sage/libs/flint/fq_zech_poly_factor.pxd +47 -0
  167. sage/libs/flint/fq_zech_vec.pxd +33 -0
  168. sage/libs/flint/gr.pxd +174 -0
  169. sage/libs/flint/gr_generic.pxd +215 -0
  170. sage/libs/flint/gr_mat.pxd +161 -0
  171. sage/libs/flint/gr_mpoly.pxd +68 -0
  172. sage/libs/flint/gr_poly.pxd +276 -0
  173. sage/libs/flint/gr_special.pxd +237 -0
  174. sage/libs/flint/gr_vec.pxd +120 -0
  175. sage/libs/flint/hypgeom.pxd +24 -0
  176. sage/libs/flint/long_extras.pxd +23 -0
  177. sage/libs/flint/mag.pxd +131 -0
  178. sage/libs/flint/mag_macros.pxd +8 -0
  179. sage/libs/flint/mpf_mat.pxd +36 -0
  180. sage/libs/flint/mpf_vec.pxd +34 -0
  181. sage/libs/flint/mpfr_mat.pxd +27 -0
  182. sage/libs/flint/mpfr_vec.pxd +25 -0
  183. sage/libs/flint/mpn_extras.pxd +41 -0
  184. sage/libs/flint/mpoly.pxd +72 -0
  185. sage/libs/flint/nf.pxd +19 -0
  186. sage/libs/flint/nf_elem.pxd +74 -0
  187. sage/libs/flint/nmod.pxd +35 -0
  188. sage/libs/flint/nmod_mat.pxd +104 -0
  189. sage/libs/flint/nmod_mpoly.pxd +144 -0
  190. sage/libs/flint/nmod_mpoly_factor.pxd +28 -0
  191. sage/libs/flint/nmod_poly.pxd +339 -0
  192. sage/libs/flint/nmod_poly_factor.pxd +44 -0
  193. sage/libs/flint/nmod_poly_linkage.pxi +710 -0
  194. sage/libs/flint/nmod_poly_mat.pxd +76 -0
  195. sage/libs/flint/nmod_vec.pxd +40 -0
  196. sage/libs/flint/ntl_interface.pxd +17 -0
  197. sage/libs/flint/padic.pxd +93 -0
  198. sage/libs/flint/padic_mat.pxd +64 -0
  199. sage/libs/flint/padic_poly.pxd +88 -0
  200. sage/libs/flint/partitions.pxd +23 -0
  201. sage/libs/flint/perm.pxd +26 -0
  202. sage/libs/flint/profiler.pxd +24 -0
  203. sage/libs/flint/qadic.pxd +77 -0
  204. sage/libs/flint/qfb.pxd +44 -0
  205. sage/libs/flint/qqbar.pxd +172 -0
  206. sage/libs/flint/qsieve.cpython-312-aarch64-linux-gnu.so +0 -0
  207. sage/libs/flint/qsieve.pxd +41 -0
  208. sage/libs/flint/qsieve.pyx +21 -0
  209. sage/libs/flint/qsieve_sage.cpython-312-aarch64-linux-gnu.so +0 -0
  210. sage/libs/flint/qsieve_sage.pyx +67 -0
  211. sage/libs/flint/thread_pool.pxd +25 -0
  212. sage/libs/flint/types.pxd +2076 -0
  213. sage/libs/flint/ulong_extras.cpython-312-aarch64-linux-gnu.so +0 -0
  214. sage/libs/flint/ulong_extras.pxd +141 -0
  215. sage/libs/flint/ulong_extras.pyx +21 -0
  216. sage/libs/flint/ulong_extras_sage.cpython-312-aarch64-linux-gnu.so +0 -0
  217. sage/libs/flint/ulong_extras_sage.pyx +21 -0
  218. sage/matrix/all__sagemath_flint.py +1 -0
  219. sage/matrix/change_ring.cpython-312-aarch64-linux-gnu.so +0 -0
  220. sage/matrix/change_ring.pyx +43 -0
  221. sage/matrix/matrix_complex_ball_dense.cpython-312-aarch64-linux-gnu.so +0 -0
  222. sage/matrix/matrix_complex_ball_dense.pxd +14 -0
  223. sage/matrix/matrix_complex_ball_dense.pyx +973 -0
  224. sage/matrix/matrix_cyclo_dense.cpython-312-aarch64-linux-gnu.so +0 -0
  225. sage/matrix/matrix_cyclo_dense.pxd +16 -0
  226. sage/matrix/matrix_cyclo_dense.pyx +1761 -0
  227. sage/matrix/matrix_integer_dense.cpython-312-aarch64-linux-gnu.so +0 -0
  228. sage/matrix/matrix_integer_dense.pxd +32 -0
  229. sage/matrix/matrix_integer_dense.pyx +5801 -0
  230. sage/matrix/matrix_integer_dense_hnf.py +1294 -0
  231. sage/matrix/matrix_integer_dense_saturation.py +346 -0
  232. sage/matrix/matrix_integer_sparse.cpython-312-aarch64-linux-gnu.so +0 -0
  233. sage/matrix/matrix_integer_sparse.pxd +9 -0
  234. sage/matrix/matrix_integer_sparse.pyx +1090 -0
  235. sage/matrix/matrix_rational_dense.cpython-312-aarch64-linux-gnu.so +0 -0
  236. sage/matrix/matrix_rational_dense.pxd +23 -0
  237. sage/matrix/matrix_rational_dense.pyx +2995 -0
  238. sage/matrix/matrix_rational_sparse.cpython-312-aarch64-linux-gnu.so +0 -0
  239. sage/matrix/matrix_rational_sparse.pxd +11 -0
  240. sage/matrix/matrix_rational_sparse.pyx +789 -0
  241. sage/matrix/misc_flint.cpython-312-aarch64-linux-gnu.so +0 -0
  242. sage/matrix/misc_flint.pyx +109 -0
  243. sage/modular/all__sagemath_flint.py +1 -0
  244. sage/modular/modform/all__sagemath_flint.py +1 -0
  245. sage/modular/modform/eis_series_cython.cpython-312-aarch64-linux-gnu.so +0 -0
  246. sage/modular/modform/eis_series_cython.pyx +226 -0
  247. sage/modular/modsym/all__sagemath_flint.py +1 -0
  248. sage/modular/modsym/apply.cpython-312-aarch64-linux-gnu.so +0 -0
  249. sage/modular/modsym/apply.pxd +6 -0
  250. sage/modular/modsym/apply.pyx +113 -0
  251. sage/modular/modsym/heilbronn.cpython-312-aarch64-linux-gnu.so +0 -0
  252. sage/modular/modsym/heilbronn.pyx +966 -0
  253. sage/modular/pollack_stevens/all__sagemath_flint.py +1 -0
  254. sage/modular/pollack_stevens/dist.cpython-312-aarch64-linux-gnu.so +0 -0
  255. sage/modular/pollack_stevens/dist.pxd +38 -0
  256. sage/modular/pollack_stevens/dist.pyx +1439 -0
  257. sage/quivers/algebra.py +691 -0
  258. sage/quivers/algebra_elements.cpython-312-aarch64-linux-gnu.so +0 -0
  259. sage/quivers/algebra_elements.pxd +97 -0
  260. sage/quivers/algebra_elements.pxi +1324 -0
  261. sage/quivers/algebra_elements.pyx +1424 -0
  262. sage/quivers/all.py +1 -0
  263. sage/quivers/ar_quiver.py +917 -0
  264. sage/quivers/homspace.py +640 -0
  265. sage/quivers/morphism.py +1282 -0
  266. sage/quivers/path_semigroup.py +1155 -0
  267. sage/quivers/paths.cpython-312-aarch64-linux-gnu.so +0 -0
  268. sage/quivers/paths.pxd +13 -0
  269. sage/quivers/paths.pyx +809 -0
  270. sage/quivers/representation.py +2975 -0
  271. sage/rings/all__sagemath_flint.py +37 -0
  272. sage/rings/cif.py +4 -0
  273. sage/rings/complex_arb.cpython-312-aarch64-linux-gnu.so +0 -0
  274. sage/rings/complex_arb.pxd +29 -0
  275. sage/rings/complex_arb.pyx +5176 -0
  276. sage/rings/complex_interval.cpython-312-aarch64-linux-gnu.so +0 -0
  277. sage/rings/complex_interval.pxd +30 -0
  278. sage/rings/complex_interval.pyx +2475 -0
  279. sage/rings/complex_interval_field.py +711 -0
  280. sage/rings/convert/all.py +1 -0
  281. sage/rings/convert/mpfi.cpython-312-aarch64-linux-gnu.so +0 -0
  282. sage/rings/convert/mpfi.pxd +6 -0
  283. sage/rings/convert/mpfi.pyx +576 -0
  284. sage/rings/factorint_flint.cpython-312-aarch64-linux-gnu.so +0 -0
  285. sage/rings/factorint_flint.pyx +99 -0
  286. sage/rings/fraction_field_FpT.cpython-312-aarch64-linux-gnu.so +0 -0
  287. sage/rings/fraction_field_FpT.pxd +28 -0
  288. sage/rings/fraction_field_FpT.pyx +2043 -0
  289. sage/rings/imaginary_unit.py +5 -0
  290. sage/rings/monomials.py +73 -0
  291. sage/rings/number_field/S_unit_solver.py +2870 -0
  292. sage/rings/number_field/all__sagemath_flint.py +7 -0
  293. sage/rings/number_field/bdd_height.py +664 -0
  294. sage/rings/number_field/class_group.py +762 -0
  295. sage/rings/number_field/galois_group.py +1307 -0
  296. sage/rings/number_field/homset.py +612 -0
  297. sage/rings/number_field/maps.py +687 -0
  298. sage/rings/number_field/morphism.py +272 -0
  299. sage/rings/number_field/number_field.py +12820 -0
  300. sage/rings/number_field/number_field_element.cpython-312-aarch64-linux-gnu.so +0 -0
  301. sage/rings/number_field/number_field_element.pxd +59 -0
  302. sage/rings/number_field/number_field_element.pyx +5735 -0
  303. sage/rings/number_field/number_field_element_quadratic.cpython-312-aarch64-linux-gnu.so +0 -0
  304. sage/rings/number_field/number_field_element_quadratic.pxd +34 -0
  305. sage/rings/number_field/number_field_element_quadratic.pyx +3185 -0
  306. sage/rings/number_field/number_field_ideal_rel.py +925 -0
  307. sage/rings/number_field/number_field_morphisms.cpython-312-aarch64-linux-gnu.so +0 -0
  308. sage/rings/number_field/number_field_morphisms.pyx +781 -0
  309. sage/rings/number_field/number_field_rel.py +2734 -0
  310. sage/rings/number_field/order.py +2981 -0
  311. sage/rings/number_field/order_ideal.py +804 -0
  312. sage/rings/number_field/selmer_group.py +715 -0
  313. sage/rings/number_field/small_primes_of_degree_one.py +242 -0
  314. sage/rings/number_field/splitting_field.py +606 -0
  315. sage/rings/number_field/structure.py +380 -0
  316. sage/rings/number_field/unit_group.py +721 -0
  317. sage/rings/padics/all__sagemath_flint.py +3 -0
  318. sage/rings/polynomial/all__sagemath_flint.py +1 -0
  319. sage/rings/polynomial/complex_roots.py +312 -0
  320. sage/rings/polynomial/evaluation_flint.cpython-312-aarch64-linux-gnu.so +0 -0
  321. sage/rings/polynomial/evaluation_flint.pxd +7 -0
  322. sage/rings/polynomial/evaluation_flint.pyx +68 -0
  323. sage/rings/polynomial/hilbert.cpython-312-aarch64-linux-gnu.so +0 -0
  324. sage/rings/polynomial/hilbert.pyx +602 -0
  325. sage/rings/polynomial/polynomial_complex_arb.cpython-312-aarch64-linux-gnu.so +0 -0
  326. sage/rings/polynomial/polynomial_complex_arb.pxd +7 -0
  327. sage/rings/polynomial/polynomial_complex_arb.pyx +963 -0
  328. sage/rings/polynomial/polynomial_integer_dense_flint.cpython-312-aarch64-linux-gnu.so +0 -0
  329. sage/rings/polynomial/polynomial_integer_dense_flint.pxd +13 -0
  330. sage/rings/polynomial/polynomial_integer_dense_flint.pyx +1881 -0
  331. sage/rings/polynomial/polynomial_number_field.cpython-312-aarch64-linux-gnu.so +0 -0
  332. sage/rings/polynomial/polynomial_number_field.pyx +345 -0
  333. sage/rings/polynomial/polynomial_rational_flint.cpython-312-aarch64-linux-gnu.so +0 -0
  334. sage/rings/polynomial/polynomial_rational_flint.pxd +20 -0
  335. sage/rings/polynomial/polynomial_rational_flint.pyx +2598 -0
  336. sage/rings/polynomial/polynomial_zmod_flint.cpython-312-aarch64-linux-gnu.so +0 -0
  337. sage/rings/polynomial/polynomial_zmod_flint.pxd +20 -0
  338. sage/rings/polynomial/polynomial_zmod_flint.pyx +1063 -0
  339. sage/rings/polynomial/real_roots.cpython-312-aarch64-linux-gnu.so +0 -0
  340. sage/rings/polynomial/real_roots.pxd +81 -0
  341. sage/rings/polynomial/real_roots.pyx +4704 -0
  342. sage/rings/polynomial/refine_root.cpython-312-aarch64-linux-gnu.so +0 -0
  343. sage/rings/polynomial/refine_root.pyx +142 -0
  344. sage/rings/polynomial/weil/all.py +4 -0
  345. sage/rings/polynomial/weil/power_sums.h +46 -0
  346. sage/rings/polynomial/weil/weil_polynomials.cpython-312-aarch64-linux-gnu.so +0 -0
  347. sage/rings/polynomial/weil/weil_polynomials.pyx +596 -0
  348. sage/rings/qqbar.py +9025 -0
  349. sage/rings/real_arb.cpython-312-aarch64-linux-gnu.so +0 -0
  350. sage/rings/real_arb.pxd +21 -0
  351. sage/rings/real_arb.pyx +4065 -0
  352. sage/rings/real_interval_absolute.cpython-312-aarch64-linux-gnu.so +0 -0
  353. sage/rings/real_interval_absolute.pyx +1073 -0
  354. sage/rings/real_mpfi.cpython-312-aarch64-linux-gnu.so +0 -0
  355. sage/rings/real_mpfi.pyx +5428 -0
  356. sage/schemes/all__sagemath_flint.py +1 -0
  357. sage/schemes/elliptic_curves/all__sagemath_flint.py +1 -0
  358. sage/schemes/elliptic_curves/descent_two_isogeny.cpython-312-aarch64-linux-gnu.so +0 -0
  359. sage/schemes/elliptic_curves/descent_two_isogeny.pyx +1387 -0
  360. sage/schemes/elliptic_curves/descent_two_isogeny_pari.pxd +5 -0
@@ -0,0 +1,612 @@
1
+ # sage_setup: distribution = sagemath-flint
2
+ # sage.doctest: needs sage.rings.number_field
3
+ """
4
+ Sets of homomorphisms between number fields
5
+ """
6
+
7
+ # ****************************************************************************
8
+ # Copyright (C) 2007 William Stein <wstein@gmail.com>
9
+ # Copyright (C) 2020 Peter Bruin <P.J.Bruin@math.leidenuniv.nl>
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
+
18
+ from sage.misc.cachefunc import cached_method
19
+ from sage.rings.homset import RingHomset_generic
20
+ from sage.rings.number_field.morphism import (NumberFieldHomomorphism_im_gens,
21
+ RelativeNumberFieldHomomorphism_from_abs,
22
+ CyclotomicFieldHomomorphism_im_gens)
23
+ from sage.rings.integer import Integer
24
+ from sage.rings.finite_rings.integer_mod_ring import Zmod
25
+ from sage.structure.sequence import Sequence
26
+
27
+
28
+ class NumberFieldHomset(RingHomset_generic):
29
+ """
30
+ Set of homomorphisms with domain a given number field.
31
+
32
+ TESTS::
33
+
34
+ sage: H = Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'b'))
35
+ sage: TestSuite(H).run()
36
+ """
37
+
38
+ Element = NumberFieldHomomorphism_im_gens
39
+
40
+ def __init__(self, R, S, category=None):
41
+ """
42
+ TESTS:
43
+
44
+ Check that :issue:`23647` is fixed::
45
+
46
+ sage: x = polygen(ZZ, 'x')
47
+ sage: K.<a, b> = NumberField([x^2 - 2, x^2 - 3])
48
+ sage: e, u, v, w = End(K)
49
+ sage: e.abs_hom().parent().category()
50
+ Category of homsets of number fields
51
+ sage: (v*v).abs_hom().parent().category()
52
+ Category of homsets of number fields
53
+ """
54
+ if category is None:
55
+ from sage.categories.fields import Fields
56
+ from sage.categories.number_fields import NumberFields
57
+ if S in NumberFields():
58
+ category = NumberFields()
59
+ elif S in Fields():
60
+ category = Fields()
61
+ RingHomset_generic.__init__(self, R, S, category)
62
+
63
+ def _element_constructor_(self, x, check=True):
64
+ """
65
+ Construct an element of ``self`` from ``x``.
66
+
67
+ EXAMPLES::
68
+
69
+ sage: H = Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'b'))
70
+ sage: phi = H([H.domain().gen()]); phi
71
+ Ring morphism:
72
+ From: Number Field in a with defining polynomial x^2 + 1 with a = 1*I
73
+ To: Number Field in b with defining polynomial x^2 + 1 with b = 1*I
74
+ Defn: a |--> b
75
+ sage: H1 = End(QuadraticField(-1, 'a'))
76
+ sage: H1.coerce(loads(dumps(H1[1])))
77
+ Ring endomorphism of Number Field in a with defining polynomial x^2 + 1 with a = 1*I
78
+ Defn: a |--> -a
79
+
80
+ TESTS:
81
+
82
+ We can move morphisms between categories::
83
+
84
+ sage: f = H1.an_element()
85
+ sage: g = End(H1.domain(), category=Rings())(f)
86
+ sage: f == End(H1.domain(), category=NumberFields())(g)
87
+ True
88
+
89
+ Check that :issue:`28869` is fixed::
90
+
91
+ sage: K.<a> = CyclotomicField(8)
92
+ sage: L.<b> = K.absolute_field()
93
+ sage: H = L.Hom(K)
94
+ sage: phi = L.structure()[0]
95
+ sage: phi.parent() is H
96
+ True
97
+ sage: H(phi)
98
+ Isomorphism given by variable name change map:
99
+ From: Number Field in b with defining polynomial x^4 + 1
100
+ To: Cyclotomic Field of order 8 and degree 4
101
+ sage: R.<x> = L[]
102
+ sage: (x^2 + b).change_ring(phi)
103
+ x^2 + a
104
+ """
105
+ if not isinstance(x, NumberFieldHomomorphism_im_gens):
106
+ return self.element_class(self, x, check=check)
107
+ from sage.categories.number_fields import NumberFields
108
+ from sage.categories.rings import Rings
109
+ if (x.parent() == self or
110
+ (x.domain() == self.domain() and x.codomain() == self.codomain() and
111
+ # This would be the better check, however it returns False currently:
112
+ # self.homset_category().is_full_subcategory(x.category_for())
113
+ # So we check instead that this is a morphism anywhere between
114
+ # Rings and NumberFields where the hom spaces do not change.
115
+ NumberFields().is_subcategory(self.homset_category()) and
116
+ self.homset_category().is_subcategory(Rings()) and
117
+ NumberFields().is_subcategory(x.category_for()) and
118
+ x.category_for().is_subcategory(Rings()))):
119
+ return self.element_class(self, x.im_gens(), check=False)
120
+
121
+ def _an_element_(self):
122
+ r"""
123
+ Return an element of this set of embeddings.
124
+
125
+ EXAMPLES::
126
+
127
+ sage: H = Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'b'))
128
+ sage: H.an_element() # indirect doctest
129
+ Ring morphism:
130
+ From: Number Field in a with defining polynomial x^2 + 1 with a = 1*I
131
+ To: Number Field in b with defining polynomial x^2 + 1 with b = 1*I
132
+ Defn: a |--> b
133
+
134
+ sage: H = Hom(QuadraticField(-1, 'a'), QuadraticField(-2, 'b'))
135
+ sage: H.an_element()
136
+ Traceback (most recent call last):
137
+ ...
138
+ EmptySetError: There is no morphism from Number Field in a with defining polynomial x^2 + 1 with a = 1*I to Number Field in b with defining polynomial x^2 + 2 with b = 1.414213562373095?*I
139
+ """
140
+ L = self.list()
141
+ if len(L) != 0:
142
+ return L[0]
143
+ else:
144
+ from sage.categories.sets_cat import EmptySetError
145
+ raise EmptySetError("There is no morphism from {} to {}".format(
146
+ self.domain(), self.codomain()))
147
+
148
+ def _repr_(self):
149
+ r"""
150
+ String representation of this homset.
151
+
152
+ EXAMPLES::
153
+
154
+ sage: repr(Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'b'))) # indirect doctest
155
+ 'Set of field embeddings from Number Field in a with defining polynomial x^2 + 1 with a = 1*I to Number Field in b with defining polynomial x^2 + 1 with b = 1*I'
156
+ sage: repr(Hom(QuadraticField(-1, 'a'), QuadraticField(-1, 'a'))) # indirect doctest
157
+ 'Automorphism group of Number Field in a with defining polynomial x^2 + 1 with a = 1*I'
158
+ """
159
+ D = self.domain()
160
+ C = self.codomain()
161
+ if C == D:
162
+ return "Automorphism group of {}".format(D)
163
+ else:
164
+ return "Set of field embeddings from {} to {}".format(D, C)
165
+
166
+ def order(self):
167
+ """
168
+ Return the order of this set of field homomorphism.
169
+
170
+ EXAMPLES::
171
+
172
+ sage: x = polygen(ZZ, 'x')
173
+ sage: k.<a> = NumberField(x^2 + 1)
174
+ sage: End(k)
175
+ Automorphism group of Number Field in a with defining polynomial x^2 + 1
176
+ sage: End(k).order()
177
+ 2
178
+ sage: k.<a> = NumberField(x^3 + 2)
179
+ sage: End(k).order()
180
+ 1
181
+
182
+ sage: K.<a> = NumberField([x^3 + 2, x^2 + x + 1])
183
+ sage: End(K).order()
184
+ 6
185
+ """
186
+ return Integer(len(self.list()))
187
+
188
+ cardinality = order
189
+
190
+ @cached_method
191
+ def list(self):
192
+ """
193
+ Return a list of all the elements of ``self``.
194
+
195
+ EXAMPLES::
196
+
197
+ sage: x = polygen(ZZ, 'x')
198
+ sage: K.<a> = NumberField(x^3 - 3*x + 1)
199
+ sage: End(K).list()
200
+ [Ring endomorphism of Number Field in a with defining polynomial x^3 - 3*x + 1
201
+ Defn: a |--> a,
202
+ Ring endomorphism of Number Field in a with defining polynomial x^3 - 3*x + 1
203
+ Defn: a |--> a^2 - 2,
204
+ Ring endomorphism of Number Field in a with defining polynomial x^3 - 3*x + 1
205
+ Defn: a |--> -a^2 - a + 2]
206
+ sage: Hom(K, CyclotomicField(9))[0] # indirect doctest
207
+ Ring morphism:
208
+ From: Number Field in a with defining polynomial x^3 - 3*x + 1
209
+ To: Cyclotomic Field of order 9 and degree 6
210
+ Defn: a |--> -zeta9^4 + zeta9^2 - zeta9
211
+
212
+ An example where the codomain is a relative extension::
213
+
214
+ sage: K.<a> = NumberField(x^3 - 2)
215
+ sage: L.<b> = K.extension(x^2 + 3)
216
+ sage: Hom(K, L).list()
217
+ [Ring morphism:
218
+ From: Number Field in a with defining polynomial x^3 - 2
219
+ To: Number Field in b with defining polynomial x^2 + 3 over its base field
220
+ Defn: a |--> a,
221
+ Ring morphism:
222
+ From: Number Field in a with defining polynomial x^3 - 2
223
+ To: Number Field in b with defining polynomial x^2 + 3 over its base field
224
+ Defn: a |--> -1/2*a*b - 1/2*a,
225
+ Ring morphism:
226
+ From: Number Field in a with defining polynomial x^3 - 2
227
+ To: Number Field in b with defining polynomial x^2 + 3 over its base field
228
+ Defn: a |--> 1/2*a*b - 1/2*a]
229
+ """
230
+ D = self.domain()
231
+ C = self.codomain()
232
+ if D.degree().divides(C.absolute_degree()):
233
+ roots = D.polynomial().roots(ring=C, multiplicities=False)
234
+ v = [D.hom([r], codomain=C, check=False) for r in roots]
235
+ else:
236
+ v = []
237
+ return Sequence(v, universe=self, check=False, immutable=True, cr=bool(v))
238
+
239
+ def __getitem__(self, n):
240
+ r"""
241
+ Return the `n`-th element of ``self.list()``.
242
+
243
+ EXAMPLES::
244
+
245
+ sage: End(CyclotomicField(37))[3] # indirect doctest
246
+ Ring endomorphism of Cyclotomic Field of order 37 and degree 36
247
+ Defn: zeta37 |--> zeta37^4
248
+ """
249
+ return self.list()[n]
250
+
251
+
252
+ class RelativeNumberFieldHomset(NumberFieldHomset):
253
+ """
254
+ Set of homomorphisms with domain a given relative number field.
255
+
256
+ EXAMPLES:
257
+
258
+ We construct a homomorphism from a relative field by giving
259
+ the image of a generator::
260
+
261
+ sage: x = polygen(ZZ, 'x')
262
+ sage: L.<cuberoot2, zeta3> = CyclotomicField(3).extension(x^3 - 2)
263
+ sage: phi = L.hom([cuberoot2 * zeta3]); phi
264
+ Relative number field endomorphism of
265
+ Number Field in cuberoot2 with defining polynomial x^3 - 2 over its base field
266
+ Defn: cuberoot2 |--> zeta3*cuberoot2
267
+ zeta3 |--> zeta3
268
+ sage: phi(cuberoot2 + zeta3)
269
+ zeta3*cuberoot2 + zeta3
270
+
271
+ In fact, this ``phi`` is a generator for the Kummer Galois group of this
272
+ cyclic extension::
273
+
274
+ sage: phi(phi(cuberoot2 + zeta3))
275
+ (-zeta3 - 1)*cuberoot2 + zeta3
276
+ sage: phi(phi(phi(cuberoot2 + zeta3)))
277
+ cuberoot2 + zeta3
278
+ """
279
+
280
+ Element = RelativeNumberFieldHomomorphism_from_abs
281
+
282
+ def _element_constructor_(self, x, base_map=None, check=True):
283
+ """
284
+ Construct an element of ``self`` from ``x``.
285
+
286
+ INPUT:
287
+
288
+ - ``x`` -- one of the following (here `L` is the domain of
289
+ ``self`` and `K` is its base field):
290
+
291
+ - A homomorphism from `L`.
292
+
293
+ - A homomorphism from the absolute number field
294
+ corresponding to `L`.
295
+
296
+ - An element of a ring into which `K` coerces, specifying
297
+ the image of the distinguished generator of `L` over `K`.
298
+
299
+ - A pair consisting of an element of a ring `R` and a
300
+ homomorphism from `K` to `R`.
301
+
302
+ EXAMPLES::
303
+
304
+ sage: x = polygen(ZZ, 'x')
305
+ sage: K.<a> = NumberField(x^2 + 1)
306
+ sage: L.<b> = K.extension(x^4 - 2)
307
+ sage: E = End(L)
308
+ sage: E(E[0])
309
+ Relative number field endomorphism of Number Field in b with defining polynomial x^4 - 2 over its base field
310
+ Defn: b |--> b
311
+ a |--> a
312
+ sage: E(L.absolute_field('c').hom(b+a, L))
313
+ Relative number field endomorphism of Number Field in b with defining polynomial x^4 - 2 over its base field
314
+ Defn: b |--> b
315
+ a |--> -a
316
+ sage: E(-b*a)
317
+ Relative number field endomorphism of Number Field in b with defining polynomial x^4 - 2 over its base field
318
+ Defn: b |--> -a*b
319
+ a |--> a
320
+ sage: E(-a*b, K.hom([-a]))
321
+ Relative number field endomorphism of Number Field in b with defining polynomial x^4 - 2 over its base field
322
+ Defn: b |--> -a*b
323
+ a |--> -a
324
+
325
+ You can specify a map on the base field::
326
+
327
+ sage: R.<x> = ZZ[]
328
+ sage: K.<i> = NumberField(x^2 + 1)
329
+ sage: L.<b> = K.extension(x^2-17)
330
+ sage: cc = K.hom([-i])
331
+ sage: phi = L.hom([-b],base_map=cc); phi
332
+ Relative number field endomorphism of Number Field in b with defining polynomial x^2 - 17 over its base field
333
+ Defn: b |--> -b
334
+ i |--> -i
335
+
336
+ Using ``check=False``, it is possible to construct
337
+ homomorphisms into fields such as ``CC`` where calculations
338
+ are only approximate::
339
+
340
+ sage: K.<a> = QuadraticField(-7)
341
+ sage: f = K.hom([CC(sqrt(-7))], check=False) # needs sage.symbolic
342
+ sage: x = polygen(K)
343
+ sage: L.<b> = K.extension(x^2 - a - 5)
344
+ sage: L.Hom(CC)(f(a + 5).sqrt(), f, check=False) # needs sage.symbolic
345
+ Relative number field morphism:
346
+ From: Number Field in b with defining polynomial x^2 - a - 5 over its base field
347
+ To: Complex Field with 53 bits of precision
348
+ Defn: b |--> 2.30833860703888 + 0.573085617291335*I
349
+ a |--> -8.88178419700125e-16 + 2.64575131106459*I
350
+
351
+ TESTS::
352
+
353
+ sage: x = polygen(QQ)
354
+ sage: L.<a, b> = NumberField([x^3 - x + 1, x^2 + 23])
355
+ sage: E = End(L)
356
+ sage: E.coerce(loads(dumps(E[0])))
357
+ Relative number field endomorphism of Number Field in a with defining polynomial x^3 - x + 1 over its base field
358
+ Defn: a |--> a
359
+ b |--> b
360
+
361
+ Check that :issue:`28869` is fixed::
362
+
363
+ sage: K.<a,b> = NumberField((x^2 + 1, x^2 - 2))
364
+ sage: L.<c> = K.absolute_field()
365
+ sage: H = K.Hom(L)
366
+ sage: phi = L.structure()[1]; phi
367
+ Isomorphism map:
368
+ From: Number Field in a with defining polynomial x^2 + 1 over its base field
369
+ To: Number Field in c with defining polynomial x^4 - 2*x^2 + 9
370
+ sage: H(phi) is phi
371
+ True
372
+ sage: R.<x> = K[]
373
+ sage: (x^2 + a).change_ring(phi)
374
+ x^2 + 1/6*c^3 + 1/6*c
375
+ """
376
+ if isinstance(x, NumberFieldHomomorphism_im_gens):
377
+ # Then it must be a homomorphism from the corresponding
378
+ # absolute number field
379
+ if x.domain() != self.domain().absolute_field(x.domain().variable_name()):
380
+ raise TypeError("domain of morphism must be absolute field of domain.")
381
+ if x.codomain() != self.codomain():
382
+ raise ValueError("codomain of absolute homomorphism must be codomain of this homset.")
383
+ return self.element_class(self, x)
384
+ if (isinstance(x, RelativeNumberFieldHomomorphism_from_abs)
385
+ and x.parent() == self):
386
+ return self.element_class(self, x.abs_hom())
387
+ if base_map is None:
388
+ base_map = self.default_base_hom()
389
+ if isinstance(x, (list, tuple)) and len(x) == 1:
390
+ x = x[0]
391
+ if check:
392
+ x = self.codomain()(x)
393
+ return self._from_im(x, base_map=base_map, check=check)
394
+
395
+ def _from_im(self, im_gen, base_map, check=True):
396
+ """
397
+ Return the homomorphism that acts on the base as given and
398
+ sends the generator of the domain to im_gen.
399
+
400
+ EXAMPLES::
401
+
402
+ sage: x = polygen(ZZ, 'x')
403
+ sage: K.<a> = NumberField(x^2 + 23)
404
+ sage: L.<b> = K.extension(x^3 - x + 1)
405
+ sage: End(L)._from_im( -3/23*a*b^2 + (-9/46*a - 1/2)*b + 2/23*a, K.hom([-a], K))
406
+ Relative number field endomorphism of Number Field in b with defining polynomial x^3 - x + 1 over its base field
407
+ Defn: b |--> -3/23*a*b^2 + (-9/46*a - 1/2)*b + 2/23*a
408
+ a |--> -a
409
+ """
410
+ K = self.domain().absolute_field('a')
411
+ from_K, to_K = K.structure()
412
+ a = from_K(K.gen())
413
+ # We just have to figure out where a goes to
414
+ # under the morphism defined by im_gen and base_map.
415
+ L = self.codomain()
416
+ R = L['x']
417
+ f = R([base_map(x) for x in a.list()])
418
+ b = f(im_gen)
419
+ abs_hom = K.hom([b], check=check)
420
+ return self.element_class(self, abs_hom)
421
+
422
+ @cached_method
423
+ def default_base_hom(self):
424
+ r"""
425
+ Pick an embedding of the base field of ``self`` into the codomain of this
426
+ homset. This is done in an essentially arbitrary way.
427
+
428
+ EXAMPLES::
429
+
430
+ sage: x = polygen(ZZ, 'x')
431
+ sage: L.<a, b> = NumberField([x^3 - x + 1, x^2 + 23])
432
+ sage: M.<c> = NumberField(x^4 + 80*x^2 + 36)
433
+ sage: Hom(L, M).default_base_hom()
434
+ Ring morphism:
435
+ From: Number Field in b with defining polynomial x^2 + 23
436
+ To: Number Field in c with defining polynomial x^4 + 80*x^2 + 36
437
+ Defn: b |--> 1/12*c^3 + 43/6*c
438
+
439
+ TESTS:
440
+
441
+ Check that :issue:`30518` is fixed::
442
+
443
+ sage: K.<i> = QuadraticField(-1, embedding=QQbar.gen())
444
+ sage: L.<a> = K.extension(x^2 - 6*x - 4)
445
+ sage: a0, a1 = a.galois_conjugates(QQbar)
446
+ sage: f0 = hom(L, QQbar, a0)
447
+ sage: assert f0(i) == QQbar.gen()
448
+ sage: f1 = hom(L, QQbar, a1)
449
+ sage: assert f1(i) == QQbar.gen()
450
+
451
+ sage: K.<i> = QuadraticField(-1, embedding=-QQbar.gen())
452
+ sage: L.<a> = K.extension(x^2 - 6*x - 4)
453
+ sage: a0, a1 = a.galois_conjugates(QQbar)
454
+ sage: f0 = hom(L, QQbar, a0)
455
+ sage: assert f0(i) == -QQbar.gen()
456
+ sage: f1 = hom(L, QQbar, a1)
457
+ sage: assert f1(i) == -QQbar.gen()
458
+ """
459
+ K = self.domain().base_field()
460
+ C = self.codomain()
461
+ f = C.coerce_map_from(K)
462
+ if f is not None:
463
+ return f
464
+ v = K.embeddings(C)
465
+ if len(v) == 0:
466
+ raise ValueError("no way to map base field to codomain.")
467
+ return v[0]
468
+
469
+ @cached_method
470
+ def list(self):
471
+ """
472
+ Return a list of all the elements of ``self`` (for which the domain
473
+ is a relative number field).
474
+
475
+ EXAMPLES::
476
+
477
+ sage: x = polygen(ZZ, 'x')
478
+ sage: K.<a, b> = NumberField([x^2 + x + 1, x^3 + 2])
479
+ sage: End(K).list()
480
+ [Relative number field endomorphism of Number Field in a with defining polynomial x^2 + x + 1 over its base field
481
+ Defn: a |--> a
482
+ b |--> b,
483
+ ...
484
+ Relative number field endomorphism of Number Field in a with defining polynomial x^2 + x + 1 over its base field
485
+ Defn: a |--> a
486
+ b |--> -b*a - b]
487
+
488
+ An example with an absolute codomain::
489
+
490
+ sage: x = polygen(ZZ, 'x')
491
+ sage: K.<a, b> = NumberField([x^2 - 3, x^2 + 2])
492
+ sage: Hom(K, CyclotomicField(24, 'z')).list()
493
+ [Relative number field morphism:
494
+ From: Number Field in a with defining polynomial x^2 - 3 over its base field
495
+ To: Cyclotomic Field of order 24 and degree 8
496
+ Defn: a |--> z^6 - 2*z^2
497
+ b |--> -z^5 - z^3 + z,
498
+ ...
499
+ Relative number field morphism:
500
+ From: Number Field in a with defining polynomial x^2 - 3 over its base field
501
+ To: Cyclotomic Field of order 24 and degree 8
502
+ Defn: a |--> -z^6 + 2*z^2
503
+ b |--> z^5 + z^3 - z]
504
+ """
505
+ D = self.domain()
506
+ C = self.codomain()
507
+ D_abs = D.absolute_field('a')
508
+ v = [self(f, check=False) for f in D_abs.Hom(C).list()]
509
+ return Sequence(v, universe=self, check=False, immutable=True, cr=bool(v))
510
+
511
+
512
+ class CyclotomicFieldHomset(NumberFieldHomset):
513
+ """
514
+ Set of homomorphisms with domain a given cyclotomic field.
515
+
516
+ EXAMPLES::
517
+
518
+ sage: End(CyclotomicField(16))
519
+ Automorphism group of Cyclotomic Field of order 16 and degree 8
520
+ """
521
+
522
+ Element = CyclotomicFieldHomomorphism_im_gens
523
+
524
+ def _element_constructor_(self, x, check=True):
525
+ """
526
+ Construct an element of ``self`` from ``x``.
527
+
528
+ EXAMPLES::
529
+
530
+ sage: K.<z> = CyclotomicField(16)
531
+ sage: E = End(K)
532
+ sage: E(E[0])
533
+ Ring endomorphism of Cyclotomic Field of order 16 and degree 8
534
+ Defn: z |--> z
535
+ sage: E(z^5)
536
+ Ring endomorphism of Cyclotomic Field of order 16 and degree 8
537
+ Defn: z |--> z^5
538
+ sage: E(z^6)
539
+ Traceback (most recent call last):
540
+ ...
541
+ ValueError: relations do not all (canonically) map to 0 under map determined by images of generators
542
+
543
+ sage: E = End(CyclotomicField(16))
544
+ sage: E.coerce(E[0])
545
+ Ring endomorphism of Cyclotomic Field of order 16 and degree 8
546
+ Defn: zeta16 |--> zeta16
547
+ sage: E.coerce(17)
548
+ Traceback (most recent call last):
549
+ ...
550
+ TypeError: no canonical coercion from Integer Ring to Automorphism group of Cyclotomic Field of order 16 and degree 8
551
+
552
+ TESTS:
553
+
554
+ Check that :issue:`28869` is fixed::
555
+
556
+ sage: K.<a> = CyclotomicField(8)
557
+ sage: L.<b> = K.absolute_field()
558
+ sage: phi = L.structure()[1]; phi
559
+ Isomorphism given by variable name change map:
560
+ From: Cyclotomic Field of order 8 and degree 4
561
+ To: Number Field in b with defining polynomial x^4 + 1
562
+ sage: phi.parent() is K.Hom(L)
563
+ True
564
+ sage: R.<x> = K[]
565
+ sage: (x^2 + a).change_ring(phi)
566
+ x^2 + b
567
+ """
568
+ if (isinstance(x, CyclotomicFieldHomomorphism_im_gens)
569
+ and x.parent() == self):
570
+ return self.element_class(self, x.im_gens())
571
+ return self.element_class(self, x, check=check)
572
+
573
+ @cached_method
574
+ def list(self):
575
+ """
576
+ Return a list of all the elements of ``self`` (for which the domain
577
+ is a cyclotomic field).
578
+
579
+ EXAMPLES::
580
+
581
+ sage: K.<z> = CyclotomicField(12)
582
+ sage: G = End(K); G
583
+ Automorphism group of Cyclotomic Field of order 12 and degree 4
584
+ sage: [g(z) for g in G]
585
+ [z, z^3 - z, -z, -z^3 + z]
586
+ sage: x = polygen(ZZ, 'x')
587
+ sage: L.<a, b> = NumberField([x^2 + x + 1, x^4 + 1])
588
+ sage: L
589
+ Number Field in a with defining polynomial x^2 + x + 1 over its base field
590
+ sage: Hom(CyclotomicField(12), L)[3]
591
+ Ring morphism:
592
+ From: Cyclotomic Field of order 12 and degree 4
593
+ To: Number Field in a with defining polynomial x^2 + x + 1 over its base field
594
+ Defn: zeta12 |--> -b^2*a
595
+ sage: list(Hom(CyclotomicField(5), K))
596
+ []
597
+ sage: Hom(CyclotomicField(11), L).list()
598
+ []
599
+ """
600
+ D = self.domain()
601
+ C = self.codomain()
602
+ z = D.gen()
603
+ n = z.multiplicative_order()
604
+ if not n.divides(C.zeta_order()):
605
+ v = []
606
+ else:
607
+ if D == C:
608
+ w = z
609
+ else:
610
+ w = C.zeta(n)
611
+ v = [self([w**k], check=False) for k in Zmod(n) if k.is_unit()]
612
+ return Sequence(v, universe=self, check=False, immutable=True, cr=bool(v))