passagemath-flint 10.6.1rc10__cp311-cp311-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-311-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-311-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-311-x86_64-linux-gnu.so +0 -0
  26. sage/graphs/chrompoly.pyx +555 -0
  27. sage/graphs/matchpoly.cpython-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-x86_64-linux-gnu.so +0 -0
  221. sage/matrix/change_ring.pyx +43 -0
  222. sage/matrix/matrix_complex_ball_dense.cpython-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-x86_64-linux-gnu.so +0 -0
  286. sage/rings/factorint_flint.pyx +99 -0
  287. sage/rings/fraction_field_FpT.cpython-311-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-311-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-311-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-311-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-311-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-311-x86_64-linux-gnu.so +0 -0
  325. sage/rings/polynomial/hilbert.pyx +602 -0
  326. sage/rings/polynomial/polynomial_complex_arb.cpython-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-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-311-x86_64-linux-gnu.so +0 -0
  354. sage/rings/real_interval_absolute.pyx +1073 -0
  355. sage/rings/real_mpfi.cpython-311-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-311-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,687 @@
1
+ # sage_setup: distribution = sagemath-flint
2
+ # sage.doctest: needs sage.rings.number_field
3
+ r"""
4
+ Structure maps for number fields
5
+
6
+ This module provides isomorphisms between relative and absolute presentations,
7
+ to and from vector spaces, name changing maps, etc.
8
+
9
+ EXAMPLES::
10
+
11
+ sage: x = polygen(ZZ, 'x')
12
+ sage: L.<cuberoot2, zeta3> = CyclotomicField(3).extension(x^3 - 2)
13
+ sage: K = L.absolute_field('a')
14
+ sage: from_K, to_K = K.structure()
15
+ sage: from_K
16
+ Isomorphism map:
17
+ From: Number Field in a with defining polynomial
18
+ x^6 - 3*x^5 + 6*x^4 - 11*x^3 + 12*x^2 + 3*x + 1
19
+ To: Number Field in cuberoot2 with defining polynomial
20
+ x^3 - 2 over its base field
21
+ sage: to_K
22
+ Isomorphism map:
23
+ From: Number Field in cuberoot2 with defining polynomial
24
+ x^3 - 2 over its base field
25
+ To: Number Field in a with defining polynomial
26
+ x^6 - 3*x^5 + 6*x^4 - 11*x^3 + 12*x^2 + 3*x + 1
27
+ """
28
+
29
+ #*****************************************************************************
30
+ # Copyright (C) 2008 William Stein <wstein@gmail.com>
31
+ #
32
+ # Distributed under the terms of the GNU General Public License (GPL)
33
+ #
34
+ # This code is distributed in the hope that it will be useful,
35
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
36
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
37
+ # General Public License for more details.
38
+ #
39
+ # The full text of the GPL is available at:
40
+ #
41
+ # http://www.gnu.org/licenses/
42
+ #*****************************************************************************
43
+
44
+ from sage.categories.map import Map
45
+ from sage.categories.homset import Hom
46
+ from sage.categories.morphism import IdentityMorphism
47
+
48
+ import sage.rings.rational_field as rational_field
49
+
50
+
51
+ QQ = rational_field.RationalField()
52
+
53
+ IdentityMap = IdentityMorphism
54
+
55
+
56
+ class NumberFieldIsomorphism(Map):
57
+ r"""
58
+ A base class for various isomorphisms between number fields and
59
+ vector spaces.
60
+
61
+ EXAMPLES::
62
+
63
+ sage: x = polygen(ZZ, 'x')
64
+ sage: K.<a> = NumberField(x^4 + 3*x + 1)
65
+ sage: V, fr, to = K.vector_space()
66
+ sage: isinstance(fr, sage.rings.number_field.maps.NumberFieldIsomorphism)
67
+ True
68
+ """
69
+ def _repr_type(self):
70
+ r"""
71
+ EXAMPLES::
72
+
73
+ sage: x = polygen(ZZ, 'x')
74
+ sage: K.<a> = NumberField(x^4 + 3*x + 1)
75
+ sage: V, fr, to = K.vector_space()
76
+ sage: fr._repr_type()
77
+ 'Isomorphism'
78
+ """
79
+ return "Isomorphism"
80
+
81
+ def is_injective(self):
82
+ r"""
83
+ EXAMPLES::
84
+
85
+ sage: x = polygen(ZZ, 'x')
86
+ sage: K.<a> = NumberField(x^4 + 3*x + 1)
87
+ sage: V, fr, to = K.vector_space()
88
+ sage: fr.is_injective()
89
+ True
90
+ """
91
+ return True
92
+
93
+ def is_surjective(self):
94
+ r"""
95
+ EXAMPLES::
96
+
97
+ sage: x = polygen(ZZ, 'x')
98
+ sage: K.<a> = NumberField(x^4 + 3*x + 1)
99
+ sage: V, fr, to = K.vector_space()
100
+ sage: fr.is_surjective()
101
+ True
102
+ """
103
+ return True
104
+
105
+
106
+ class MapVectorSpaceToNumberField(NumberFieldIsomorphism):
107
+ r"""
108
+ The map to an absolute number field from its underlying `\QQ`-vector space.
109
+
110
+ EXAMPLES::
111
+
112
+ sage: x = polygen(ZZ, 'x')
113
+ sage: K.<a> = NumberField(x^4 + 3*x + 1)
114
+ sage: V, fr, to = K.vector_space()
115
+ sage: V
116
+ Vector space of dimension 4 over Rational Field
117
+ sage: fr
118
+ Isomorphism map:
119
+ From: Vector space of dimension 4 over Rational Field
120
+ To: Number Field in a with defining polynomial x^4 + 3*x + 1
121
+ sage: to
122
+ Isomorphism map:
123
+ From: Number Field in a with defining polynomial x^4 + 3*x + 1
124
+ To: Vector space of dimension 4 over Rational Field
125
+ sage: type(fr), type(to)
126
+ (<class 'sage.rings.number_field.maps.MapVectorSpaceToNumberField'>,
127
+ <class 'sage.rings.number_field.maps.MapNumberFieldToVectorSpace'>)
128
+
129
+ sage: fr.is_injective(), fr.is_surjective()
130
+ (True, True)
131
+
132
+ sage: fr.domain(), to.codomain()
133
+ (Vector space of dimension 4 over Rational Field,
134
+ Vector space of dimension 4 over Rational Field)
135
+ sage: to.domain(), fr.codomain()
136
+ (Number Field in a with defining polynomial x^4 + 3*x + 1,
137
+ Number Field in a with defining polynomial x^4 + 3*x + 1)
138
+ sage: fr * to
139
+ Composite map:
140
+ From: Number Field in a with defining polynomial x^4 + 3*x + 1
141
+ To: Number Field in a with defining polynomial x^4 + 3*x + 1
142
+ Defn: Isomorphism map:
143
+ From: Number Field in a with defining polynomial x^4 + 3*x + 1
144
+ To: Vector space of dimension 4 over Rational Field
145
+ then
146
+ Isomorphism map:
147
+ From: Vector space of dimension 4 over Rational Field
148
+ To: Number Field in a with defining polynomial x^4 + 3*x + 1
149
+ sage: to * fr
150
+ Composite map:
151
+ From: Vector space of dimension 4 over Rational Field
152
+ To: Vector space of dimension 4 over Rational Field
153
+ Defn: Isomorphism map:
154
+ From: Vector space of dimension 4 over Rational Field
155
+ To: Number Field in a with defining polynomial x^4 + 3*x + 1
156
+ then
157
+ Isomorphism map:
158
+ From: Number Field in a with defining polynomial x^4 + 3*x + 1
159
+ To: Vector space of dimension 4 over Rational Field
160
+
161
+ sage: to(a), to(a + 1)
162
+ ((0, 1, 0, 0), (1, 1, 0, 0))
163
+ sage: fr(to(a)), fr(V([0, 1, 2, 3]))
164
+ (a, 3*a^3 + 2*a^2 + a)
165
+ """
166
+
167
+ def __init__(self, V, K):
168
+ r"""
169
+ EXAMPLES::
170
+
171
+ sage: x = polygen(ZZ, 'x')
172
+ sage: K.<c> = NumberField(x^9 + 3)
173
+ sage: V, fr, to = K.vector_space(); fr # indirect doctest
174
+ Isomorphism map:
175
+ From: Vector space of dimension 9 over Rational Field
176
+ To: Number Field in c with defining polynomial x^9 + 3
177
+ sage: type(fr)
178
+ <class 'sage.rings.number_field.maps.MapVectorSpaceToNumberField'>
179
+ """
180
+ NumberFieldIsomorphism.__init__(self, Hom(V, K))
181
+
182
+ def _call_(self, v):
183
+ r"""
184
+ EXAMPLES::
185
+
186
+ sage: x = polygen(ZZ, 'x')
187
+ sage: K.<c> = NumberField(x^9 + 3)
188
+ sage: V, fr, to = K.vector_space()
189
+ sage: list(map(fr, V.gens())) # indirect doctest
190
+ [1, c, c^2, c^3, c^4, c^5, c^6, c^7, c^8]
191
+ """
192
+ K = self.codomain()
193
+ f = K.polynomial_ring()(v.list())
194
+ return K._element_class(K, f)
195
+
196
+
197
+ class MapNumberFieldToVectorSpace(Map):
198
+ r"""
199
+ A class for the isomorphism from an absolute number field to its underlying
200
+ `\QQ`-vector space.
201
+
202
+ EXAMPLES::
203
+
204
+ sage: x = polygen(ZZ, 'x')
205
+ sage: L.<a> = NumberField(x^3 - x + 1)
206
+ sage: V, fr, to = L.vector_space()
207
+ sage: type(to)
208
+ <class 'sage.rings.number_field.maps.MapNumberFieldToVectorSpace'>
209
+ """
210
+ def __init__(self, K, V):
211
+ r"""
212
+ Standard initialisation function.
213
+
214
+ EXAMPLES::
215
+
216
+ sage: x = polygen(ZZ, 'x')
217
+ sage: L.<a> = NumberField(x^3 - x + 1)
218
+ sage: L.vector_space()[2] # indirect doctest
219
+ Isomorphism map:
220
+ From: Number Field in a with defining polynomial x^3 - x + 1
221
+ To: Vector space of dimension 3 over Rational Field
222
+ """
223
+ NumberFieldIsomorphism.__init__(self, Hom(K, V))
224
+
225
+ def _repr_type(self):
226
+ r"""
227
+ EXAMPLES::
228
+
229
+ sage: x = polygen(ZZ, 'x')
230
+ sage: L.<a, b> = NumberField([x^2 + 1, x^2 - 3])
231
+ sage: V, fr, to = L.relative_vector_space()
232
+ sage: fr._repr_type()
233
+ 'Isomorphism'
234
+ """
235
+ return "Isomorphism"
236
+
237
+ def _call_(self, x):
238
+ r"""
239
+ EXAMPLES::
240
+
241
+ sage: x = polygen(ZZ, 'x')
242
+ sage: L.<a> = NumberField(x^3 - x + 1)
243
+ sage: V, _, to = L.vector_space()
244
+ sage: v = to(a^2 - a/37 + 56); v # indirect doctest
245
+ (56, -1/37, 1)
246
+ sage: v.parent() is V
247
+ True
248
+ """
249
+ v = x._coefficients()
250
+ k = self.domain().degree() - len(v)
251
+ if k > 0:
252
+ v = v + [QQ.zero()] * k
253
+ return self.codomain()(v)
254
+
255
+
256
+ class MapRelativeVectorSpaceToRelativeNumberField(NumberFieldIsomorphism):
257
+ r"""
258
+ EXAMPLES::
259
+
260
+ sage: x = polygen(ZZ, 'x')
261
+ sage: L.<b> = NumberField(x^4 + 3*x^2 + 1)
262
+ sage: K = L.relativize(L.subfields(2)[0][1], 'a'); K
263
+ Number Field in a with defining polynomial x^2 - b0*x + 1 over its base field
264
+ sage: V, fr, to = K.relative_vector_space()
265
+ sage: V
266
+ Vector space of dimension 2 over Number Field in b0 with defining polynomial x^2 + 1
267
+ sage: fr
268
+ Isomorphism map:
269
+ From: Vector space of dimension 2
270
+ over Number Field in b0 with defining polynomial x^2 + 1
271
+ To: Number Field in a
272
+ with defining polynomial x^2 - b0*x + 1 over its base field
273
+ sage: type(fr)
274
+ <class 'sage.rings.number_field.maps.MapRelativeVectorSpaceToRelativeNumberField'>
275
+
276
+ sage: a0 = K.gen(); b0 = K.base_field().gen()
277
+ sage: fr(to(a0 + 2*b0)), fr(V([0, 1])), fr(V([b0, 2*b0]))
278
+ (a + 2*b0, a, 2*b0*a + b0)
279
+ sage: (fr * to)(K.gen()) == K.gen()
280
+ True
281
+ sage: (to * fr)(V([1, 2])) == V([1, 2])
282
+ True
283
+ """
284
+ def __init__(self, V, K):
285
+ r"""
286
+
287
+ EXAMPLES::
288
+
289
+ sage: x = polygen(ZZ, 'x')
290
+ sage: K.<a, b> = NumberField([x^2 + 1, x^2 - 2])
291
+ sage: V, _, to = K.relative_vector_space(); to # indirect doctest
292
+ Isomorphism map:
293
+ From: Number Field in a with defining polynomial x^2 + 1 over its base field
294
+ To: Vector space of dimension 2 over Number Field in b with defining polynomial x^2 - 2
295
+ """
296
+ NumberFieldIsomorphism.__init__(self, Hom(V, K))
297
+
298
+ def _call_(self, v):
299
+ r"""
300
+ EXAMPLES::
301
+
302
+ sage: x = polygen(ZZ, 'x')
303
+ sage: L.<b> = NumberField(x^4 + 3*x^2 + 1)
304
+ sage: K = L.relativize(L.subfields(2)[0][1], 'a')
305
+ sage: a0 = K.gen(); b0 = K.base_field().gen()
306
+ sage: V, fr, to = K.relative_vector_space()
307
+ sage: fr(to(a0 + 2*b0)), fr(V([0, 1])), fr(V([b0, 2*b0])) # indirect doctest
308
+ (a + 2*b0, a, 2*b0*a + b0)
309
+ """
310
+ from sage.libs.pari import pari
311
+
312
+ K = self.codomain()
313
+ B = K.base_field().absolute_field('a')
314
+ # Convert v to a PARI polynomial in x with coefficients that
315
+ # are polynomials in y.
316
+ _, to_B = B.structure()
317
+ h = pari([to_B(a).__pari__('y') for a in v]).Polrev()
318
+ # Rewrite the polynomial in terms of an absolute generator for
319
+ # the relative number field.
320
+ g = K._pari_rnfeq()._eltreltoabs(h)
321
+ return K._element_class(K, g)
322
+
323
+
324
+ class MapRelativeNumberFieldToRelativeVectorSpace(NumberFieldIsomorphism):
325
+ r"""
326
+ EXAMPLES::
327
+
328
+ sage: x = polygen(ZZ, 'x')
329
+ sage: K.<a, b> = NumberField([x^3 - x + 1, x^2 + 23])
330
+ sage: V, fr, to = K.relative_vector_space()
331
+ sage: type(to)
332
+ <class 'sage.rings.number_field.maps.MapRelativeNumberFieldToRelativeVectorSpace'>
333
+ """
334
+
335
+ def __init__(self, K, V):
336
+ r"""
337
+ EXAMPLES::
338
+
339
+ sage: x = polygen(ZZ, 'x')
340
+ sage: L.<b> = NumberField(x^4 + 3*x^2 + 1)
341
+ sage: K = L.relativize(L.subfields(2)[0][1], 'a')
342
+ sage: V, fr, to = K.relative_vector_space()
343
+ sage: to
344
+ Isomorphism map:
345
+ From: Number Field in a with defining polynomial x^2 - b0*x + 1 over its base field
346
+ To: Vector space of dimension 2 over Number Field in b0 with defining polynomial x^2 + 1
347
+ """
348
+ NumberFieldIsomorphism.__init__(self, Hom(K, V))
349
+
350
+ def _call_(self, alpha):
351
+ """
352
+ TESTS::
353
+
354
+ sage: x = polygen(ZZ, 'x')
355
+ sage: K.<a> = NumberField(x^5 + 2)
356
+ sage: R.<y> = K[]
357
+ sage: D.<x0> = K.extension(y + a + 1)
358
+ sage: D(a)
359
+ a
360
+ sage: V, from_V, to_V = D.relative_vector_space()
361
+ sage: to_V(a) # indirect doctest
362
+ (a)
363
+ sage: to_V(a^3) # indirect doctest
364
+ (a^3)
365
+ sage: to_V(x0) # indirect doctest
366
+ (-a - 1)
367
+
368
+ sage: K.<a> = QuadraticField(-3)
369
+ sage: L.<b> = K.extension(x-5)
370
+ sage: L(a)
371
+ a
372
+ sage: a*b
373
+ 5*a
374
+ sage: b
375
+ 5
376
+ sage: V, from_V, to_V = L.relative_vector_space()
377
+ sage: to_V(a) # indirect doctest
378
+ (a)
379
+ """
380
+ from sage.libs.pari import pari
381
+
382
+ K = self.domain()
383
+ # The element alpha is represented internally by an absolute
384
+ # polynomial over QQ, and f is its PARI representation.
385
+ f = alpha._pari_polynomial('x')
386
+ # Convert f to a relative polynomial g; this is a polynomial
387
+ # in x whose coefficients are polynomials in y.
388
+ g = K._pari_rnfeq()._eltabstorel_lift(f)
389
+ # Now g is a polynomial in the standard generator of the PARI
390
+ # field; convert it to a polynomial in the Sage generator.
391
+ if g.poldegree() > 0:
392
+ beta = K._pari_relative_structure()[2]
393
+ g = g(beta).lift()
394
+ # Convert the coefficients to elements of the base field.
395
+ B, from_B, _ = K.absolute_base_field()
396
+ return self.codomain()([from_B(B(z.lift(), check=False)) for z in g.Vecrev(K.relative_degree())])
397
+
398
+
399
+ class NameChangeMap(NumberFieldIsomorphism):
400
+ r"""
401
+ A map between two isomorphic number fields with the same defining
402
+ polynomial but different variable names.
403
+
404
+ EXAMPLES::
405
+
406
+ sage: x = polygen(ZZ, 'x')
407
+ sage: K.<a> = NumberField(x^2 - 3)
408
+ sage: L.<b> = K.change_names()
409
+ sage: from_L, to_L = L.structure()
410
+ sage: from_L
411
+ Isomorphism given by variable name change map:
412
+ From: Number Field in b with defining polynomial x^2 - 3
413
+ To: Number Field in a with defining polynomial x^2 - 3
414
+ sage: to_L
415
+ Isomorphism given by variable name change map:
416
+ From: Number Field in a with defining polynomial x^2 - 3
417
+ To: Number Field in b with defining polynomial x^2 - 3
418
+ sage: type(from_L), type(to_L)
419
+ (<class 'sage.rings.number_field.maps.NameChangeMap'>,
420
+ <class 'sage.rings.number_field.maps.NameChangeMap'>)
421
+ """
422
+ def __init__(self, K, L):
423
+ r"""
424
+ EXAMPLES::
425
+
426
+ sage: x = polygen(ZZ, 'x')
427
+ sage: K.<a, b> = NumberField([x^2 - 3, x^2 + 7])
428
+ sage: L.<c, d> = K.change_names()
429
+ sage: L.structure()
430
+ (Isomorphism given by variable name change map:
431
+ From: Number Field in c with defining polynomial x^2 - 3 over its base field
432
+ To: Number Field in a with defining polynomial x^2 - 3 over its base field,
433
+ Isomorphism given by variable name change map:
434
+ From: Number Field in a with defining polynomial x^2 - 3 over its base field
435
+ To: Number Field in c with defining polynomial x^2 - 3 over its base field)
436
+ """
437
+ NumberFieldIsomorphism.__init__(self, Hom(K, L))
438
+
439
+ def _repr_type(self):
440
+ r"""
441
+ EXAMPLES::
442
+
443
+ sage: x = polygen(ZZ, 'x')
444
+ sage: K.<a> = NumberField(x^2 - 3)
445
+ sage: L.<b> = K.change_names()
446
+ sage: from_L, to_L = L.structure()
447
+ sage: from_L._repr_type()
448
+ 'Isomorphism given by variable name change'
449
+ """
450
+ return "Isomorphism given by variable name change"
451
+
452
+ def _call_(self, x):
453
+ r"""
454
+ EXAMPLES::
455
+
456
+ sage: x = polygen(ZZ, 'x')
457
+ sage: K.<a, b> = NumberField([x^2 - 3, x^2 + 7])
458
+ sage: L.<c, d> = K.change_names()
459
+ sage: to_K, from_K = L.structure()
460
+ sage: from_K(a + 17*b) # indirect doctest
461
+ c + 17*d
462
+ sage: to_K(57*c + 19/8*d) # indirect doctest
463
+ 57*a + 19/8*b
464
+ """
465
+ y = x._copy_for_parent(self.codomain())
466
+ return y
467
+
468
+
469
+ class MapRelativeToAbsoluteNumberField(NumberFieldIsomorphism):
470
+ r"""
471
+ EXAMPLES::
472
+
473
+ sage: x = polygen(ZZ, 'x')
474
+ sage: K.<a> = NumberField(x^6 + 4*x^2 + 200)
475
+ sage: L = K.relativize(K.subfields(3)[0][1], 'b'); L
476
+ Number Field in b with defining polynomial x^2 + a0 over its base field
477
+ sage: fr, to = L.structure()
478
+ sage: fr
479
+ Relative number field morphism:
480
+ From: Number Field in b with defining polynomial x^2 + a0 over its base field
481
+ To: Number Field in a with defining polynomial x^6 + 4*x^2 + 200
482
+ Defn: b |--> a
483
+ a0 |--> -a^2
484
+ sage: to
485
+ Ring morphism:
486
+ From: Number Field in a with defining polynomial x^6 + 4*x^2 + 200
487
+ To: Number Field in b with defining polynomial x^2 + a0 over its base field
488
+ Defn: a |--> b
489
+ sage: type(fr), type(to)
490
+ (<class 'sage.rings.number_field.homset.RelativeNumberFieldHomset_with_category.element_class'>,
491
+ <class 'sage.rings.number_field.homset.NumberFieldHomset_with_category.element_class'>)
492
+
493
+ sage: M.<c> = L.absolute_field(); M
494
+ Number Field in c with defining polynomial x^6 + 4*x^2 + 200
495
+ sage: fr, to = M.structure()
496
+ sage: fr
497
+ Isomorphism map:
498
+ From: Number Field in c with defining polynomial x^6 + 4*x^2 + 200
499
+ To: Number Field in b with defining polynomial x^2 + a0 over its base field
500
+ sage: to
501
+ Isomorphism map:
502
+ From: Number Field in b with defining polynomial x^2 + a0 over its base field
503
+ To: Number Field in c with defining polynomial x^6 + 4*x^2 + 200
504
+ sage: type(fr), type(to)
505
+ (<class 'sage.rings.number_field.maps.MapAbsoluteToRelativeNumberField'>,
506
+ <class 'sage.rings.number_field.maps.MapRelativeToAbsoluteNumberField'>)
507
+ sage: fr(M.gen()), to(fr(M.gen())) == M.gen()
508
+ (b, True)
509
+ sage: to(L.gen()), fr(to(L.gen())) == L.gen()
510
+ (c, True)
511
+ sage: (to * fr)(M.gen()) == M.gen(), (fr * to)(L.gen()) == L.gen()
512
+ (True, True)
513
+ """
514
+
515
+ def __init__(self, R, A):
516
+ r"""
517
+ EXAMPLES::
518
+
519
+ sage: x = polygen(ZZ, 'x')
520
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
521
+ sage: K.<c> = L.absolute_field()
522
+ sage: f = K.structure()[1]; f
523
+ Isomorphism map:
524
+ From: Number Field in a with defining polynomial x^2 + 3 over its base field
525
+ To: Number Field in c with defining polynomial x^4 + 16*x^2 + 4
526
+ sage: type(f)
527
+ <class 'sage.rings.number_field.maps.MapRelativeToAbsoluteNumberField'>
528
+ """
529
+ NumberFieldIsomorphism.__init__(self, Hom(R, A))
530
+
531
+ def _call_(self, x):
532
+ r"""
533
+ EXAMPLES::
534
+
535
+ sage: x = polygen(ZZ, 'x')
536
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
537
+ sage: K.<c> = L.absolute_field()
538
+ sage: f = K.structure()[1]
539
+ sage: f(a + 3*b) # indirect doctest
540
+ -c^3 - 17*c
541
+ """
542
+ A = self.codomain() # absolute field
543
+ f = x.polynomial()
544
+ return A._element_class(A, f)
545
+
546
+
547
+ class MapAbsoluteToRelativeNumberField(NumberFieldIsomorphism):
548
+ r"""
549
+ See :class:`~MapRelativeToAbsoluteNumberField` for examples.
550
+ """
551
+ def __init__(self, A, R):
552
+ r"""
553
+ EXAMPLES::
554
+
555
+ sage: x = polygen(ZZ, 'x')
556
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
557
+ sage: K.<c> = L.absolute_field()
558
+ sage: f = K.structure()[0] # indirect doctest
559
+ sage: type(f)
560
+ <class 'sage.rings.number_field.maps.MapAbsoluteToRelativeNumberField'>
561
+ """
562
+ NumberFieldIsomorphism.__init__(self, Hom(A, R))
563
+
564
+ def _call_(self, x):
565
+ r"""
566
+ EXAMPLES::
567
+
568
+ sage: x = polygen(ZZ, 'x')
569
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
570
+ sage: K.<c> = L.absolute_field()
571
+ sage: f = K.structure()[0]
572
+ sage: f(c + 13*c^2) # indirect doctest
573
+ (-26*b + 1)*a - b - 104
574
+ """
575
+ R = self.codomain() # relative field
576
+ f = x.polynomial()
577
+ return R._element_class(R, f)
578
+
579
+
580
+ class MapVectorSpaceToRelativeNumberField(NumberFieldIsomorphism):
581
+ r"""
582
+ The isomorphism to a relative number field from its underlying `\QQ`-vector
583
+ space. Compare :class:`~MapRelativeVectorSpaceToRelativeNumberField`.
584
+
585
+ EXAMPLES::
586
+
587
+ sage: x = polygen(ZZ, 'x')
588
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
589
+ sage: V, fr, to = L.absolute_vector_space()
590
+ sage: type(fr)
591
+ <class 'sage.rings.number_field.maps.MapVectorSpaceToRelativeNumberField'>
592
+ """
593
+
594
+ def __init__(self, V, L, from_V, from_K):
595
+ r"""
596
+ EXAMPLES::
597
+
598
+ sage: x = polygen(ZZ, 'x')
599
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
600
+ sage: V, fr, to = L.absolute_vector_space() # indirect doctest
601
+ sage: fr
602
+ Isomorphism map:
603
+ From: Vector space of dimension 4 over Rational Field
604
+ To: Number Field in a with defining polynomial x^2 + 3 over its base field
605
+ """
606
+ self._from_V = from_V
607
+ self._from_K = from_K
608
+ NumberFieldIsomorphism.__init__(self, Hom(V, L))
609
+
610
+ def _call_(self, x):
611
+ r"""
612
+ EXAMPLES::
613
+
614
+ sage: x = polygen(ZZ, 'x')
615
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
616
+ sage: V, fr, to = L.absolute_vector_space()
617
+ sage: fr(V([1,3,0,1/17])) # indirect doctest
618
+ 33/17*a - 37/17*b + 1
619
+ sage: fr(to(a)), fr(to(b)) # indirect doctest
620
+ (a, b)
621
+ """
622
+ return self._from_K(self._from_V(x))
623
+
624
+
625
+ class MapRelativeNumberFieldToVectorSpace(NumberFieldIsomorphism):
626
+ r"""
627
+ The isomorphism from a relative number field to its underlying `\QQ`-vector
628
+ space. Compare :class:`~MapRelativeNumberFieldToRelativeVectorSpace`.
629
+
630
+ EXAMPLES::
631
+
632
+ sage: x = polygen(ZZ, 'x')
633
+ sage: K.<a> = NumberField(x^8 + 100*x^6 + x^2 + 5)
634
+ sage: L = K.relativize(K.subfields(4)[0][1], 'b'); L
635
+ Number Field in b with defining polynomial x^2 + a0 over its base field
636
+ sage: L_to_K, K_to_L = L.structure()
637
+
638
+ sage: V, fr, to = L.absolute_vector_space()
639
+ sage: V
640
+ Vector space of dimension 8 over Rational Field
641
+ sage: fr
642
+ Isomorphism map:
643
+ From: Vector space of dimension 8 over Rational Field
644
+ To: Number Field in b with defining polynomial x^2 + a0 over its base field
645
+ sage: to
646
+ Isomorphism map:
647
+ From: Number Field in b with defining polynomial x^2 + a0 over its base field
648
+ To: Vector space of dimension 8 over Rational Field
649
+ sage: type(fr), type(to)
650
+ (<class 'sage.rings.number_field.maps.MapVectorSpaceToRelativeNumberField'>,
651
+ <class 'sage.rings.number_field.maps.MapRelativeNumberFieldToVectorSpace'>)
652
+
653
+ sage: v = V([1, 1, 1, 1, 0, 1, 1, 1])
654
+ sage: fr(v), to(fr(v)) == v
655
+ ((-a0^3 + a0^2 - a0 + 1)*b - a0^3 - a0 + 1, True)
656
+ sage: to(L.gen()), fr(to(L.gen())) == L.gen()
657
+ ((0, 1, 0, 0, 0, 0, 0, 0), True)
658
+ """
659
+ def __init__(self, L, V, to_K, to_V):
660
+ r"""
661
+ EXAMPLES::
662
+
663
+ sage: x = polygen(ZZ, 'x')
664
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
665
+ sage: V, fr, to = L.absolute_vector_space() # indirect doctest
666
+ sage: to
667
+ Isomorphism map:
668
+ From: Number Field in a with defining polynomial x^2 + 3 over its base field
669
+ To: Vector space of dimension 4 over Rational Field
670
+ """
671
+ self._to_K = to_K
672
+ self._to_V = to_V
673
+ NumberFieldIsomorphism.__init__(self, Hom(L, V))
674
+
675
+ def _call_(self, x):
676
+ r"""
677
+ EXAMPLES::
678
+
679
+ sage: x = polygen(ZZ, 'x')
680
+ sage: L.<a, b> = NumberField([x^2 + 3, x^2 + 5])
681
+ sage: V, fr, to = L.absolute_vector_space()
682
+ sage: to(1 + 2*a + 3*b + 4*a*b) # indirect doctest
683
+ (-15, -41/2, -2, -5/4)
684
+ sage: to(fr(V([1,3,0,1/17]))) # indirect doctest
685
+ (1, 3, 0, 1/17)
686
+ """
687
+ return self._to_V(self._to_K(x))