passagemath-modules 10.5.32__cp310-cp310-macosx_14_0_arm64.whl → 10.6.20__cp310-cp310-macosx_14_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of passagemath-modules might be problematic. Click here for more details.

Files changed (334) hide show
  1. {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +51 -46
  2. {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +333 -323
  3. {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +1 -1
  4. passagemath_modules.dylibs/libgcc_s.1.1.dylib +0 -0
  5. passagemath_modules.dylibs/libgfortran.5.dylib +0 -0
  6. passagemath_modules.dylibs/libgsl.28.dylib +0 -0
  7. passagemath_modules.dylibs/libmpc.3.dylib +0 -0
  8. passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
  9. passagemath_modules.dylibs/libquadmath.0.dylib +0 -0
  10. sage/algebras/clifford_algebra.py +2 -2
  11. sage/algebras/clifford_algebra_element.cpython-310-darwin.so +0 -0
  12. sage/algebras/clifford_algebra_element.pyx +4 -2
  13. sage/algebras/exterior_algebra_groebner.cpython-310-darwin.so +0 -0
  14. sage/algebras/exterior_algebra_groebner.pyx +2 -0
  15. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +83 -5
  16. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-310-darwin.so +0 -0
  17. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +2 -0
  18. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +28 -3
  19. sage/algebras/finite_gca.py +1 -1
  20. sage/algebras/lie_algebras/bgg_dual_module.py +18 -11
  21. sage/algebras/lie_algebras/classical_lie_algebra.py +3 -3
  22. sage/algebras/lie_algebras/examples.py +2 -2
  23. sage/algebras/lie_algebras/free_lie_algebra.py +1 -1
  24. sage/algebras/lie_algebras/heisenberg.py +4 -4
  25. sage/algebras/lie_algebras/lie_algebra.py +1 -1
  26. sage/algebras/lie_algebras/lie_algebra_element.cpython-310-darwin.so +0 -0
  27. sage/algebras/lie_algebras/lie_algebra_element.pyx +65 -28
  28. sage/algebras/lie_algebras/quotient.py +40 -29
  29. sage/algebras/lie_algebras/subalgebra.py +76 -53
  30. sage/algebras/lie_algebras/verma_module.py +1 -3
  31. sage/algebras/octonion_algebra.cpython-310-darwin.so +0 -0
  32. sage/algebras/octonion_algebra.pyx +1 -1
  33. sage/algebras/orlik_solomon.py +4 -4
  34. sage/algebras/orlik_terao.py +4 -4
  35. sage/algebras/steenrod/steenrod_algebra.py +37 -30
  36. sage/algebras/steenrod/steenrod_algebra_bases.py +2 -2
  37. sage/algebras/steenrod/steenrod_algebra_misc.py +4 -4
  38. sage/algebras/steenrod/steenrod_algebra_mult.py +2 -2
  39. sage/all__sagemath_modules.py +1 -0
  40. sage/calculus/integration.cpython-310-darwin.so +0 -0
  41. sage/calculus/integration.pyx +6 -5
  42. sage/calculus/interpolation.cpython-310-darwin.so +0 -0
  43. sage/calculus/interpolators.cpython-310-darwin.so +0 -0
  44. sage/calculus/ode.cpython-310-darwin.so +0 -0
  45. sage/calculus/ode.pxd +2 -2
  46. sage/calculus/ode.pyx +6 -4
  47. sage/calculus/riemann.cpython-310-darwin.so +0 -0
  48. sage/calculus/riemann.pyx +68 -48
  49. sage/calculus/transforms/dwt.cpython-310-darwin.so +0 -0
  50. sage/calculus/transforms/fft.cpython-310-darwin.so +0 -0
  51. sage/coding/ag_code_decoders.cpython-310-darwin.so +0 -0
  52. sage/coding/ag_code_decoders.pyx +31 -31
  53. sage/coding/binary_code.cpython-310-darwin.so +0 -0
  54. sage/coding/binary_code.pxd +6 -6
  55. sage/coding/binary_code.pyx +212 -173
  56. sage/coding/guruswami_sudan/utils.py +3 -5
  57. sage/coding/kasami_codes.cpython-310-darwin.so +0 -0
  58. sage/coding/kasami_codes.pyx +20 -24
  59. sage/coding/linear_code.py +2 -2
  60. sage/coding/linear_code_no_metric.py +5 -5
  61. sage/coding/linear_rank_metric.py +81 -19
  62. sage/combinat/cartesian_product.py +1 -1
  63. sage/combinat/free_module.py +22 -2
  64. sage/combinat/root_system/all.py +1 -1
  65. sage/combinat/root_system/ambient_space.py +1 -1
  66. sage/combinat/root_system/associahedron.py +4 -4
  67. sage/combinat/root_system/braid_move_calculator.py +2 -2
  68. sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
  69. sage/combinat/root_system/braid_orbit.pyx +1 -1
  70. sage/combinat/root_system/branching_rules.py +3 -3
  71. sage/combinat/root_system/cartan_type.py +14 -14
  72. sage/combinat/root_system/coxeter_group.py +3 -3
  73. sage/combinat/root_system/coxeter_matrix.py +1 -1
  74. sage/combinat/root_system/coxeter_type.py +12 -1
  75. sage/combinat/root_system/extended_affine_weyl_group.py +9 -9
  76. sage/combinat/root_system/fundamental_group.py +3 -5
  77. sage/combinat/root_system/hecke_algebra_representation.py +1 -1
  78. sage/combinat/root_system/integrable_representations.py +1 -1
  79. sage/combinat/root_system/pieri_factors.py +3 -3
  80. sage/combinat/root_system/root_lattice_realization_algebras.py +1 -1
  81. sage/combinat/root_system/root_lattice_realizations.py +1 -1
  82. sage/combinat/root_system/type_folded.py +3 -3
  83. sage/combinat/root_system/type_reducible.py +8 -7
  84. sage/combinat/root_system/type_super_A.py +2 -2
  85. sage/combinat/root_system/weight_lattice_realizations.py +9 -8
  86. sage/combinat/root_system/weyl_characters.py +2 -2
  87. sage/crypto/__init__.py +1 -0
  88. sage/crypto/block_cipher/des.py +1 -1
  89. sage/crypto/block_cipher/miniaes.py +3 -3
  90. sage/crypto/block_cipher/present.py +3 -3
  91. sage/crypto/block_cipher/sdes.py +3 -3
  92. sage/crypto/boolean_function.cpython-310-darwin.so +0 -0
  93. sage/crypto/boolean_function.pyx +22 -23
  94. sage/crypto/key_exchange/diffie_hellman.py +4 -9
  95. sage/crypto/mq/sr.py +1 -1
  96. sage/crypto/public_key/blum_goldwasser.py +3 -3
  97. sage/crypto/sbox.cpython-310-darwin.so +0 -0
  98. sage/crypto/sbox.pyx +1 -1
  99. sage/crypto/sboxes.py +22 -0
  100. sage/crypto/util.py +4 -6
  101. sage/ext/interpreters/__init__.py +1 -1
  102. sage/ext/interpreters/all__sagemath_modules.py +1 -1
  103. sage/ext/interpreters/wrapper_cc.cpython-310-darwin.so +0 -0
  104. sage/ext/interpreters/wrapper_cc.pxd +5 -5
  105. sage/ext/interpreters/wrapper_cc.pyx +1 -1
  106. sage/ext/interpreters/wrapper_cdf.cpython-310-darwin.so +0 -0
  107. sage/ext/interpreters/wrapper_cdf.pxd +5 -7
  108. sage/ext/interpreters/wrapper_cdf.pyx +4 -10
  109. sage/ext/interpreters/wrapper_rdf.cpython-310-darwin.so +0 -0
  110. sage/ext/interpreters/wrapper_rdf.pxd +1 -1
  111. sage/ext/interpreters/wrapper_rdf.pyx +1 -1
  112. sage/ext/interpreters/wrapper_rr.cpython-310-darwin.so +0 -0
  113. sage/ext/interpreters/wrapper_rr.pxd +5 -5
  114. sage/ext/interpreters/wrapper_rr.pyx +1 -2
  115. sage/geometry/toric_lattice.py +3 -3
  116. sage/geometry/toric_lattice_element.cpython-310-darwin.so +0 -0
  117. sage/groups/additive_abelian/additive_abelian_group.py +1 -1
  118. sage/groups/additive_abelian/qmodnz.py +4 -4
  119. sage/groups/matrix_gps/coxeter_group.py +17 -4
  120. sage/groups/matrix_gps/group_element.cpython-310-darwin.so +0 -0
  121. sage/groups/misc_gps/argument_groups.py +2 -2
  122. sage/groups/misc_gps/imaginary_groups.py +4 -4
  123. sage/groups/perm_gps/partn_ref/refinement_binary.cpython-310-darwin.so +0 -0
  124. sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-310-darwin.so +0 -0
  125. sage/homology/chain_complex.py +0 -2
  126. sage/homology/hochschild_complex.py +3 -3
  127. sage/homology/homology_morphism.py +6 -6
  128. sage/homology/homology_vector_space_with_basis.py +1 -1
  129. sage/libs/gsl/array.cpython-310-darwin.so +0 -0
  130. sage/libs/mpmath/utils.cpython-310-darwin.so +0 -0
  131. sage/matrix/action.cpython-310-darwin.so +0 -0
  132. sage/matrix/args.cpython-310-darwin.so +0 -0
  133. sage/matrix/args.pyx +25 -10
  134. sage/matrix/benchmark.py +8 -4
  135. sage/matrix/compute_J_ideal.py +2 -2
  136. sage/matrix/constructor.cpython-310-darwin.so +0 -0
  137. sage/matrix/echelon_matrix.cpython-310-darwin.so +0 -0
  138. sage/matrix/echelon_matrix.pyx +1 -1
  139. sage/matrix/matrix0.cpython-310-darwin.so +0 -0
  140. sage/matrix/matrix0.pxd +3 -3
  141. sage/matrix/matrix0.pyx +7 -5
  142. sage/matrix/matrix1.cpython-310-darwin.so +0 -0
  143. sage/matrix/matrix1.pyx +87 -48
  144. sage/matrix/matrix2.cpython-310-darwin.so +0 -0
  145. sage/matrix/matrix2.pxd +3 -3
  146. sage/matrix/matrix2.pyx +1261 -63
  147. sage/matrix/matrix_cdv.cpython-310-darwin.so +0 -0
  148. sage/matrix/matrix_complex_double_dense.cpython-310-darwin.so +0 -0
  149. sage/matrix/matrix_complex_double_dense.pyx +1 -1
  150. sage/matrix/matrix_dense.cpython-310-darwin.so +0 -0
  151. sage/matrix/matrix_dense.pyx +2 -3
  152. sage/matrix/matrix_double_dense.cpython-310-darwin.so +0 -0
  153. sage/matrix/matrix_double_dense.pyx +11 -5
  154. sage/matrix/matrix_double_sparse.cpython-310-darwin.so +0 -0
  155. sage/matrix/matrix_generic_dense.cpython-310-darwin.so +0 -0
  156. sage/matrix/matrix_generic_sparse.cpython-310-darwin.so +0 -0
  157. sage/matrix/matrix_generic_sparse.pyx +1 -1
  158. sage/matrix/matrix_laurent_mpolynomial_dense.cpython-310-darwin.so +0 -0
  159. sage/matrix/matrix_numpy_dense.cpython-310-darwin.so +0 -0
  160. sage/matrix/matrix_numpy_integer_dense.cpython-310-darwin.so +0 -0
  161. sage/matrix/matrix_polynomial_dense.cpython-310-darwin.so +0 -0
  162. sage/matrix/matrix_polynomial_dense.pyx +952 -261
  163. sage/matrix/matrix_real_double_dense.cpython-310-darwin.so +0 -0
  164. sage/matrix/matrix_sparse.cpython-310-darwin.so +0 -0
  165. sage/matrix/matrix_sparse.pyx +6 -7
  166. sage/matrix/matrix_window.cpython-310-darwin.so +0 -0
  167. sage/matrix/matrix_window.pyx +2 -2
  168. sage/matrix/misc_mpfr.cpython-310-darwin.so +0 -0
  169. sage/matrix/operation_table.py +0 -2
  170. sage/matrix/special.py +5 -1
  171. sage/matrix/strassen.cpython-310-darwin.so +0 -0
  172. sage/matrix/strassen.pyx +1 -1
  173. sage/matroids/basis_exchange_matroid.cpython-310-darwin.so +0 -0
  174. sage/matroids/basis_matroid.cpython-310-darwin.so +0 -0
  175. sage/matroids/chow_ring.py +68 -65
  176. sage/matroids/chow_ring_ideal.py +41 -38
  177. sage/matroids/circuit_closures_matroid.cpython-310-darwin.so +0 -0
  178. sage/matroids/circuits_matroid.cpython-310-darwin.so +0 -0
  179. sage/matroids/database_matroids.py +16 -5
  180. sage/matroids/dual_matroid.py +2 -2
  181. sage/matroids/extension.cpython-310-darwin.so +0 -0
  182. sage/matroids/flats_matroid.cpython-310-darwin.so +0 -0
  183. sage/matroids/gammoid.py +1 -1
  184. sage/matroids/graphic_matroid.cpython-310-darwin.so +0 -0
  185. sage/matroids/graphic_matroid.pyx +3 -3
  186. sage/matroids/lean_matrix.cpython-310-darwin.so +0 -0
  187. sage/matroids/lean_matrix.pyx +22 -22
  188. sage/matroids/linear_matroid.cpython-310-darwin.so +0 -0
  189. sage/matroids/linear_matroid.pyx +13 -13
  190. sage/matroids/matroid.cpython-310-darwin.so +0 -0
  191. sage/matroids/matroid.pyx +15 -15
  192. sage/matroids/matroids_plot_helpers.py +48 -46
  193. sage/matroids/minor_matroid.py +2 -2
  194. sage/matroids/set_system.cpython-310-darwin.so +0 -0
  195. sage/matroids/transversal_matroid.cpython-310-darwin.so +0 -0
  196. sage/matroids/transversal_matroid.pyx +3 -3
  197. sage/matroids/union_matroid.cpython-310-darwin.so +0 -0
  198. sage/matroids/union_matroid.pyx +3 -0
  199. sage/matroids/unpickling.cpython-310-darwin.so +0 -0
  200. sage/matroids/utilities.py +2 -2
  201. sage/misc/c3.cpython-310-darwin.so +0 -0
  202. sage/misc/compat.py +1 -2
  203. sage/misc/pickle_old.cpython-310-darwin.so +0 -0
  204. sage/modules/diamond_cutting.py +117 -30
  205. sage/modules/fg_pid/fgp_module.py +3 -3
  206. sage/modules/filtered_vector_space.py +4 -4
  207. sage/modules/finite_submodule_iter.cpython-310-darwin.so +0 -0
  208. sage/modules/fp_graded/free_module.py +2 -2
  209. sage/modules/fp_graded/module.py +2 -2
  210. sage/modules/fp_graded/morphism.py +4 -4
  211. sage/modules/fp_graded/steenrod/morphism.py +1 -1
  212. sage/modules/free_module.py +162 -26
  213. sage/modules/free_module_element.cpython-310-darwin.so +0 -0
  214. sage/modules/free_module_element.pyx +4 -4
  215. sage/modules/free_module_integer.py +2 -2
  216. sage/modules/free_module_morphism.py +3 -3
  217. sage/modules/free_module_pseudohomspace.py +352 -0
  218. sage/modules/free_module_pseudomorphism.py +578 -0
  219. sage/modules/free_quadratic_module_integer_symmetric.py +24 -13
  220. sage/modules/matrix_morphism.py +9 -9
  221. sage/modules/multi_filtered_vector_space.py +4 -4
  222. sage/modules/ore_module.py +2208 -0
  223. sage/modules/ore_module_element.py +178 -0
  224. sage/modules/ore_module_homspace.py +147 -0
  225. sage/modules/ore_module_morphism.py +968 -0
  226. sage/modules/quotient_module.py +11 -1
  227. sage/modules/submodule.py +1 -1
  228. sage/modules/torsion_quadratic_module.py +1 -1
  229. sage/modules/vector_complex_double_dense.cpython-310-darwin.so +0 -0
  230. sage/modules/vector_double_dense.cpython-310-darwin.so +0 -0
  231. sage/modules/vector_integer_dense.cpython-310-darwin.so +0 -0
  232. sage/modules/vector_integer_sparse.cpython-310-darwin.so +0 -0
  233. sage/modules/vector_integer_sparse.pyx +4 -4
  234. sage/modules/vector_modn_dense.cpython-310-darwin.so +0 -0
  235. sage/modules/vector_modn_sparse.cpython-310-darwin.so +0 -0
  236. sage/modules/vector_numpy_dense.cpython-310-darwin.so +0 -0
  237. sage/modules/vector_numpy_integer_dense.cpython-310-darwin.so +0 -0
  238. sage/modules/vector_rational_dense.cpython-310-darwin.so +0 -0
  239. sage/modules/vector_rational_dense.pyx +1 -1
  240. sage/modules/vector_rational_sparse.cpython-310-darwin.so +0 -0
  241. sage/modules/vector_rational_sparse.pyx +5 -5
  242. sage/modules/vector_real_double_dense.cpython-310-darwin.so +0 -0
  243. sage/modules/vector_space_morphism.py +2 -2
  244. sage/modules/with_basis/cell_module.py +17 -0
  245. sage/modules/with_basis/indexed_element.cpython-310-darwin.so +0 -0
  246. sage/modules/with_basis/indexed_element.pyx +1 -1
  247. sage/modules/with_basis/invariant.py +1 -1
  248. sage/modules/with_basis/representation.py +0 -1
  249. sage/modules/with_basis/subquotient.py +2 -2
  250. sage/numerical/gauss_legendre.cpython-310-darwin.so +0 -0
  251. sage/probability/probability_distribution.cpython-310-darwin.so +0 -0
  252. sage/quadratic_forms/binary_qf.py +11 -11
  253. sage/quadratic_forms/bqf_class_group.py +26 -92
  254. sage/quadratic_forms/count_local_2.cpython-310-darwin.so +0 -0
  255. sage/quadratic_forms/extras.py +1 -1
  256. sage/quadratic_forms/quadratic_form.py +5 -4
  257. sage/quadratic_forms/quadratic_form__equivalence_testing.py +7 -4
  258. sage/quadratic_forms/quadratic_form__evaluate.cpython-310-darwin.so +0 -0
  259. sage/quadratic_forms/quadratic_form__local_field_invariants.py +10 -10
  260. sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +2 -2
  261. sage/quadratic_forms/ternary.cpython-310-darwin.so +0 -0
  262. sage/quadratic_forms/ternary_qf.py +50 -83
  263. sage/rings/cfinite_sequence.py +16 -17
  264. sage/rings/complex_conversion.cpython-310-darwin.so +0 -0
  265. sage/rings/complex_double.cpython-310-darwin.so +0 -0
  266. sage/rings/complex_double.pxd +1 -0
  267. sage/rings/complex_double.pyx +37 -32
  268. sage/rings/complex_mpc.cpython-310-darwin.so +0 -0
  269. sage/rings/complex_mpc.pyx +27 -23
  270. sage/rings/complex_mpfr.cpython-310-darwin.so +0 -0
  271. sage/rings/complex_mpfr.pyx +11 -11
  272. sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +277 -21
  273. sage/rings/function_field/drinfeld_modules/drinfeld_module.py +10 -1
  274. sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1 -1
  275. sage/rings/function_field/drinfeld_modules/homset.py +1 -2
  276. sage/rings/function_field/drinfeld_modules/morphism.py +2 -2
  277. sage/rings/function_field/hermite_form_polynomial.cpython-310-darwin.so +0 -0
  278. sage/rings/function_field/khuri_makdisi.cpython-310-darwin.so +0 -0
  279. sage/rings/function_field/khuri_makdisi.pyx +27 -25
  280. sage/rings/invariants/invariant_theory.py +61 -60
  281. sage/rings/invariants/reconstruction.py +8 -8
  282. sage/rings/polynomial/laurent_polynomial_mpair.cpython-310-darwin.so +0 -0
  283. sage/rings/polynomial/ore_function_element.py +1 -1
  284. sage/rings/polynomial/ore_polynomial_element.cpython-310-darwin.so +0 -0
  285. sage/rings/polynomial/ore_polynomial_element.pyx +8 -8
  286. sage/rings/polynomial/ore_polynomial_ring.py +134 -17
  287. sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-310-darwin.so +0 -0
  288. sage/rings/polynomial/skew_polynomial_element.cpython-310-darwin.so +0 -0
  289. sage/rings/polynomial/skew_polynomial_finite_field.cpython-310-darwin.so +0 -0
  290. sage/rings/polynomial/skew_polynomial_finite_field.pyx +3 -4
  291. sage/rings/polynomial/skew_polynomial_finite_order.cpython-310-darwin.so +0 -0
  292. sage/rings/polynomial/skew_polynomial_finite_order.pyx +2 -5
  293. sage/rings/real_double_element_gsl.cpython-310-darwin.so +0 -0
  294. sage/rings/real_mpfr.cpython-310-darwin.so +0 -0
  295. sage/rings/real_mpfr.pyx +25 -7
  296. sage/rings/ring_extension.cpython-310-darwin.so +0 -0
  297. sage/rings/ring_extension.pyx +4 -2
  298. sage/rings/ring_extension_conversion.cpython-310-darwin.so +0 -0
  299. sage/rings/ring_extension_element.cpython-310-darwin.so +0 -0
  300. sage/rings/ring_extension_element.pyx +42 -0
  301. sage/rings/ring_extension_morphism.cpython-310-darwin.so +0 -0
  302. sage/schemes/all__sagemath_modules.py +1 -0
  303. sage/schemes/projective/all__sagemath_modules.py +1 -0
  304. sage/schemes/projective/coherent_sheaf.py +300 -0
  305. sage/schemes/projective/cohomology.py +510 -0
  306. sage/stats/basic_stats.py +17 -15
  307. sage/stats/distributions/dgs_misc.h +11 -4
  308. sage/stats/distributions/discrete_gaussian_integer.cpython-310-darwin.so +0 -0
  309. sage/stats/distributions/discrete_gaussian_integer.pyx +9 -7
  310. sage/stats/hmm/chmm.cpython-310-darwin.so +0 -0
  311. sage/stats/hmm/chmm.pyx +13 -13
  312. sage/stats/hmm/distributions.cpython-310-darwin.so +0 -0
  313. sage/stats/hmm/distributions.pxd +3 -3
  314. sage/stats/hmm/distributions.pyx +3 -3
  315. sage/stats/hmm/hmm.cpython-310-darwin.so +0 -0
  316. sage/stats/hmm/hmm.pxd +3 -3
  317. sage/stats/hmm/hmm.pyx +6 -6
  318. sage/stats/hmm/util.cpython-310-darwin.so +0 -0
  319. sage/stats/hmm/util.pyx +6 -6
  320. sage/stats/intlist.cpython-310-darwin.so +0 -0
  321. sage/stats/intlist.pxd +3 -3
  322. sage/stats/time_series.cpython-310-darwin.so +0 -0
  323. sage/tensor/modules/alternating_contr_tensor.py +3 -3
  324. sage/tensor/modules/comp.py +3 -3
  325. sage/tensor/modules/ext_pow_free_module.py +3 -3
  326. sage/tensor/modules/format_utilities.py +3 -3
  327. sage/tensor/modules/free_module_linear_group.py +3 -3
  328. sage/tensor/modules/free_module_morphism.py +0 -1
  329. sage/tensor/modules/tensor_free_module.py +3 -3
  330. sage/tensor/modules/tensor_free_submodule.py +1 -1
  331. sage/tensor/modules/tensor_free_submodule_basis.py +1 -1
  332. sage/tensor/modules/tensor_with_indices.py +5 -5
  333. passagemath_modules.dylibs/libopenblas_armv8p-r0.3.28.dylib +0 -0
  334. {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
@@ -347,7 +347,7 @@ cdef class MPComplexField_class(Field):
347
347
  z.init = 1
348
348
  return z
349
349
 
350
- def _repr_ (self):
350
+ def _repr_ (self) -> str:
351
351
  """
352
352
  Return a string representation of ``self``.
353
353
 
@@ -356,12 +356,12 @@ cdef class MPComplexField_class(Field):
356
356
  sage: MPComplexField(200, 'RNDDU') # indirect doctest
357
357
  Complex Field with 200 bits of precision and rounding RNDDU
358
358
  """
359
- s = "Complex Field with %s bits of precision"%self._prec
359
+ s = "Complex Field with %s bits of precision" % self._prec
360
360
  if self.__rnd != MPC_RNDNN:
361
- s = s + " and rounding %s"%(self.__rnd_str)
361
+ s = s + " and rounding %s" % (self.__rnd_str)
362
362
  return s
363
363
 
364
- def _latex_(self):
364
+ def _latex_(self) -> str:
365
365
  r"""
366
366
  Return a latex representation of ``self``.
367
367
 
@@ -616,7 +616,7 @@ cdef class MPComplexField_class(Field):
616
616
  sage: C = MPComplexField(10, 'RNDNZ'); C.name()
617
617
  'MPComplexField10_RNDNZ'
618
618
  """
619
- return "MPComplexField%s_%s"%(self._prec, self.__rnd_str)
619
+ return "MPComplexField%s_%s" % (self._prec, self.__rnd_str)
620
620
 
621
621
  def __hash__(self):
622
622
  """
@@ -1368,8 +1368,10 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1368
1368
 
1369
1369
  ALGORITHM: Uses the PARI C-library :pari:`algdep` command.
1370
1370
 
1371
- INPUT: Type ``algdep?`` at the top level prompt. All additional
1372
- parameters are passed onto the top-level algdep command.
1371
+ INPUT: Type ``algebraic_dependency?`` at the top level prompt.
1372
+
1373
+ All additional parameters are passed onto the top-level
1374
+ ``algebraic_dependency`` command.
1373
1375
 
1374
1376
  EXAMPLES::
1375
1377
 
@@ -1383,8 +1385,10 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1383
1385
  sage: p(z)
1384
1386
  1.11022302462516e-16
1385
1387
  """
1386
- from sage.arith.misc import algdep
1387
- return algdep(self, n, **kwds)
1388
+ from sage.arith.misc import algebraic_dependency
1389
+ return algebraic_dependency(self, n, **kwds)
1390
+
1391
+ algdep = algebraic_dependency
1388
1392
 
1389
1393
  ################################
1390
1394
  # Basic Arithmetic
@@ -1546,7 +1550,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1546
1550
  """
1547
1551
  cdef RealNumber x
1548
1552
  x = RealNumber(self._parent._real_field())
1549
- mpc_abs (x.value, self.value, (<RealField_class>x._parent).rnd)
1553
+ mpc_abs(x.value, self.value, (<RealField_class>x._parent).rnd)
1550
1554
  return x
1551
1555
 
1552
1556
  def norm(self):
@@ -1649,7 +1653,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1649
1653
  """
1650
1654
  cdef MPComplexNumber z
1651
1655
  z = self._new()
1652
- mpc_cos (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1656
+ mpc_cos(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1653
1657
  return z
1654
1658
 
1655
1659
  def sin(self):
@@ -1669,7 +1673,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1669
1673
  """
1670
1674
  cdef MPComplexNumber z
1671
1675
  z = self._new()
1672
- mpc_sin (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1676
+ mpc_sin(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1673
1677
  return z
1674
1678
 
1675
1679
  def tan(self):
@@ -1689,7 +1693,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1689
1693
  """
1690
1694
  cdef MPComplexNumber z
1691
1695
  z = self._new()
1692
- mpc_tan (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1696
+ mpc_tan(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1693
1697
  return z
1694
1698
 
1695
1699
  def cosh(self):
@@ -1709,7 +1713,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1709
1713
  """
1710
1714
  cdef MPComplexNumber z
1711
1715
  z = self._new()
1712
- mpc_cosh (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1716
+ mpc_cosh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1713
1717
  return z
1714
1718
 
1715
1719
  def sinh(self):
@@ -1729,7 +1733,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1729
1733
  """
1730
1734
  cdef MPComplexNumber z
1731
1735
  z = self._new()
1732
- mpc_sinh (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1736
+ mpc_sinh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1733
1737
  return z
1734
1738
 
1735
1739
  def tanh(self):
@@ -1749,7 +1753,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1749
1753
  """
1750
1754
  cdef MPComplexNumber z
1751
1755
  z = self._new()
1752
- mpc_tanh (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1756
+ mpc_tanh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1753
1757
  return z
1754
1758
 
1755
1759
  def arccos(self):
@@ -1765,7 +1769,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1765
1769
  """
1766
1770
  cdef MPComplexNumber z
1767
1771
  z = self._new()
1768
- mpc_acos (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1772
+ mpc_acos(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1769
1773
  return z
1770
1774
 
1771
1775
  def arcsin(self):
@@ -1781,7 +1785,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1781
1785
  """
1782
1786
  cdef MPComplexNumber z
1783
1787
  z = self._new()
1784
- mpc_asin (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1788
+ mpc_asin(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1785
1789
  return z
1786
1790
 
1787
1791
  def arctan(self):
@@ -1797,7 +1801,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1797
1801
  """
1798
1802
  cdef MPComplexNumber z
1799
1803
  z = self._new()
1800
- mpc_atan (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1804
+ mpc_atan(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1801
1805
  return z
1802
1806
 
1803
1807
  def arccosh(self):
@@ -1813,7 +1817,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1813
1817
  """
1814
1818
  cdef MPComplexNumber z
1815
1819
  z = self._new()
1816
- mpc_acosh (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1820
+ mpc_acosh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1817
1821
  return z
1818
1822
 
1819
1823
  def arcsinh(self):
@@ -1829,7 +1833,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1829
1833
  """
1830
1834
  cdef MPComplexNumber z
1831
1835
  z = self._new()
1832
- mpc_asinh (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1836
+ mpc_asinh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1833
1837
  return z
1834
1838
 
1835
1839
  def arctanh(self):
@@ -1845,7 +1849,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
1845
1849
  """
1846
1850
  cdef MPComplexNumber z
1847
1851
  z = self._new()
1848
- mpc_atanh (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1852
+ mpc_atanh(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
1849
1853
  return z
1850
1854
 
1851
1855
  def coth(self):
@@ -2028,7 +2032,7 @@ cdef class MPComplexNumber(sage.structure.element.FieldElement):
2028
2032
  """
2029
2033
  cdef MPComplexNumber z
2030
2034
  z = self._new()
2031
- mpc_sqr (z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
2035
+ mpc_sqr(z.value, self.value, (<MPComplexField_class>self._parent).__rnd)
2032
2036
  return z
2033
2037
 
2034
2038
  def sqrt(self):
@@ -33,8 +33,6 @@ AUTHORS:
33
33
  import re
34
34
  import weakref
35
35
 
36
- import sage.misc.misc
37
-
38
36
  from sage.libs.mpfr cimport *
39
37
 
40
38
  from sage.structure.parent cimport Parent
@@ -621,7 +619,7 @@ class ComplexField_class(sage.rings.abc.ComplexField):
621
619
  return self._generic_coerce_map(S)
622
620
  return self._coerce_map_via([CLF], S)
623
621
 
624
- def _repr_(self):
622
+ def _repr_(self) -> str:
625
623
  """
626
624
  Return a string representation of ``self``.
627
625
 
@@ -632,9 +630,9 @@ class ComplexField_class(sage.rings.abc.ComplexField):
632
630
  sage: ComplexField(15) # indirect doctest
633
631
  Complex Field with 15 bits of precision
634
632
  """
635
- return "Complex Field with %s bits of precision"%self._prec
633
+ return "Complex Field with %s bits of precision" % self._prec
636
634
 
637
- def _latex_(self):
635
+ def _latex_(self) -> str:
638
636
  r"""
639
637
  Return a latex representation of ``self``.
640
638
 
@@ -1333,7 +1331,7 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
1333
1331
 
1334
1332
  INPUT:
1335
1333
 
1336
- - ``format_spec`` -- string; a floating point format specificier as
1334
+ - ``format_spec`` -- string; a floating point format specifier as
1337
1335
  defined by :python:`the format specification mini-language
1338
1336
  <library/string.html#formatspec>` in Python
1339
1337
 
@@ -3261,8 +3259,10 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
3261
3259
 
3262
3260
  ALGORITHM: Uses the PARI C-library :pari:`algdep` command.
3263
3261
 
3264
- INPUT: Type ``algdep?`` at the top level prompt. All additional
3265
- parameters are passed onto the top-level :func:`algdep` command.
3262
+ INPUT: Type ``algebraic_dependency?`` at the top level prompt.
3263
+
3264
+ All additional parameters are passed onto the top-level
3265
+ :func:`algebraic_dependency` command.
3266
3266
 
3267
3267
  EXAMPLES::
3268
3268
 
@@ -3270,13 +3270,13 @@ cdef class ComplexNumber(sage.structure.element.FieldElement):
3270
3270
  sage: C = ComplexField()
3271
3271
  sage: z = (1/2)*(1 + sqrt(3.0) *C.0); z
3272
3272
  0.500000000000000 + 0.866025403784439*I
3273
- sage: p = z.algdep(5); p
3273
+ sage: p = z.algebraic_dependency(5); p
3274
3274
  x^2 - x + 1
3275
3275
  sage: p(z)
3276
3276
  1.11022302462516e-16
3277
3277
  """
3278
- from sage.arith.misc import algdep
3279
- return algdep(self, n, **kwds)
3278
+ from sage.arith.misc import algebraic_dependency
3279
+ return algebraic_dependency(self, n, **kwds)
3280
3280
 
3281
3281
  # Alias
3282
3282
  algdep = algebraic_dependency
@@ -3,14 +3,16 @@
3
3
  r"""
4
4
  Drinfeld modules over rings of characteristic zero
5
5
 
6
- This module provides the class
7
- :class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_charzero`,
8
- which inherits
6
+ This module provides the classes
7
+ :class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_charzero` and
8
+ :class:`sage.rings.function_fields.drinfeld_module.charzero_drinfeld_module.DrinfeldModule_rational`,
9
+ which both inherit
9
10
  :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`.
10
11
 
11
12
  AUTHORS:
12
13
 
13
14
  - David Ayotte (2023-09)
15
+ - Xavier Caruso (2024-12) - computation of class polynomials
14
16
  """
15
17
 
16
18
  # *****************************************************************************
@@ -26,11 +28,16 @@ AUTHORS:
26
28
  from .drinfeld_module import DrinfeldModule
27
29
 
28
30
  from sage.rings.integer_ring import ZZ
31
+ from sage.rings.infinity import Infinity
32
+
33
+ from sage.matrix.constructor import matrix
34
+ from sage.modules.free_module_element import vector
29
35
 
30
36
  from sage.misc.cachefunc import cached_method
31
37
  from sage.misc.lazy_import import lazy_import
32
38
 
33
39
  lazy_import('sage.rings.lazy_series_ring', 'LazyPowerSeriesRing')
40
+ lazy_import('sage.rings.power_series_ring', 'PowerSeriesRing')
34
41
 
35
42
 
36
43
  class DrinfeldModule_charzero(DrinfeldModule):
@@ -150,7 +157,7 @@ class DrinfeldModule_charzero(DrinfeldModule):
150
157
  c += self._compute_coefficient_exp(i)*self._compute_coefficient_log(j)**(q**i)
151
158
  return -c
152
159
 
153
- def exponential(self, name='z'):
160
+ def exponential(self, prec=Infinity, name='z'):
154
161
  r"""
155
162
  Return the exponential of this Drinfeld module.
156
163
 
@@ -159,28 +166,38 @@ class DrinfeldModule_charzero(DrinfeldModule):
159
166
 
160
167
  INPUT:
161
168
 
169
+ - ``prec`` -- an integer or ``Infinity`` (default: ``Infinity``);
170
+ the precision at which the series is returned; if ``Infinity``,
171
+ a lazy power series in returned, else, a classical power series
172
+ is returned.
173
+
162
174
  - ``name`` -- string (default: ``'z'``); the name of the
163
175
  generator of the lazy power series ring
164
176
 
165
- OUTPUT: a lazy power series over the base field
166
-
167
177
  EXAMPLES::
168
178
 
169
179
  sage: A = GF(2)['T']
170
180
  sage: K.<T> = Frac(A)
171
181
  sage: phi = DrinfeldModule(A, [T, 1])
172
182
  sage: q = A.base_ring().cardinality()
173
- sage: exp = phi.exponential(); exp
174
- z + ((1/(T^2+T))*z^2) + ((1/(T^8+T^6+T^5+T^3))*z^4) + O(z^8)
175
183
 
176
- The exponential is returned as a lazy power series, meaning that
177
- any of its coefficients can be computed on demands::
184
+ When ``prec`` is ``Infinity`` (which is the default),
185
+ the exponential is returned as a lazy power series, meaning
186
+ that any of its coefficients can be computed on demands::
178
187
 
188
+ sage: exp = phi.exponential(); exp
189
+ z + ((1/(T^2+T))*z^2) + ((1/(T^8+T^6+T^5+T^3))*z^4) + O(z^8)
179
190
  sage: exp[2^4]
180
191
  1/(T^64 + T^56 + T^52 + ... + T^27 + T^23 + T^15)
181
192
  sage: exp[2^5]
182
193
  1/(T^160 + T^144 + T^136 + ... + T^55 + T^47 + T^31)
183
194
 
195
+ On the contrary, when ``prec`` is a finite number, all the
196
+ required coefficients are computed at once::
197
+
198
+ sage: phi.exponential(prec=10)
199
+ z + (1/(T^2 + T))*z^2 + (1/(T^8 + T^6 + T^5 + T^3))*z^4 + (1/(T^24 + T^20 + T^18 + T^17 + T^14 + T^13 + T^11 + T^7))*z^8 + O(z^10)
200
+
184
201
  Example in higher rank::
185
202
 
186
203
  sage: A = GF(5)['T']
@@ -217,7 +234,6 @@ class DrinfeldModule_charzero(DrinfeldModule):
217
234
  See section 4.6 of [Gos1998]_ for the definition of the
218
235
  exponential.
219
236
  """
220
- L = LazyPowerSeriesRing(self._base, name)
221
237
  zero = self._base.zero()
222
238
  q = self._Fq.cardinality()
223
239
 
@@ -229,7 +245,12 @@ class DrinfeldModule_charzero(DrinfeldModule):
229
245
  return self._compute_coefficient_exp(v)
230
246
  else:
231
247
  return zero
232
- return L(coeff_exp, valuation=1)
248
+
249
+ if prec is Infinity:
250
+ L = LazyPowerSeriesRing(self._base, name)
251
+ return L(coeff_exp, valuation=1)
252
+ L = PowerSeriesRing(self._base, name, default_prec=prec)
253
+ return L([0] + [coeff_exp(i) for i in range(1,prec)], prec=prec)
233
254
 
234
255
  @cached_method
235
256
  def _compute_coefficient_log(self, k):
@@ -265,7 +286,7 @@ class DrinfeldModule_charzero(DrinfeldModule):
265
286
  c += self._compute_coefficient_log(i)*self._gen[j]**(q**i)
266
287
  return c/(T - T**(q**k))
267
288
 
268
- def logarithm(self, name='z'):
289
+ def logarithm(self, prec=Infinity, name='z'):
269
290
  r"""
270
291
  Return the logarithm of the given Drinfeld module.
271
292
 
@@ -276,27 +297,36 @@ class DrinfeldModule_charzero(DrinfeldModule):
276
297
 
277
298
  INPUT:
278
299
 
300
+ - ``prec`` -- an integer or ``Infinity`` (default: ``Infinity``);
301
+ the precision at which the series is returned; if ``Infinity``,
302
+ a lazy power series in returned
303
+
279
304
  - ``name`` -- string (default: ``'z'``); the name of the
280
305
  generator of the lazy power series ring
281
306
 
282
- OUTPUT: a lazy power series over the base field
283
-
284
307
  EXAMPLES::
285
308
 
286
309
  sage: A = GF(2)['T']
287
310
  sage: K.<T> = Frac(A)
288
311
  sage: phi = DrinfeldModule(A, [T, 1])
289
- sage: log = phi.logarithm(); log
290
- z + ((1/(T^2+T))*z^2) + ((1/(T^6+T^5+T^3+T^2))*z^4) + O(z^8)
291
312
 
292
- The logarithm is returned as a lazy power series, meaning that
293
- any of its coefficients can be computed on demands::
313
+ When ``prec`` is ``Infinity`` (which is the default),
314
+ the logarithm is returned as a lazy power series, meaning
315
+ that any of its coefficients can be computed on demands::
294
316
 
317
+ sage: log = phi.logarithm(); log
318
+ z + ((1/(T^2+T))*z^2) + ((1/(T^6+T^5+T^3+T^2))*z^4) + O(z^8)
295
319
  sage: log[2^4]
296
320
  1/(T^30 + T^29 + T^27 + ... + T^7 + T^5 + T^4)
297
321
  sage: log[2^5]
298
322
  1/(T^62 + T^61 + T^59 + ... + T^8 + T^6 + T^5)
299
323
 
324
+ If ``prec`` is a finite number, all the
325
+ required coefficients are computed at once::
326
+
327
+ sage: phi.logarithm(prec=10)
328
+ z + (1/(T^2 + T))*z^2 + (1/(T^6 + T^5 + T^3 + T^2))*z^4 + (1/(T^14 + T^13 + T^11 + T^10 + T^7 + T^6 + T^4 + T^3))*z^8 + O(z^10)
329
+
300
330
  Example in higher rank::
301
331
 
302
332
  sage: A = GF(5)['T']
@@ -318,7 +348,6 @@ class DrinfeldModule_charzero(DrinfeldModule):
318
348
  sage: log[2**3] == -1/((T**q - T)*(T**(q**2) - T)*(T**(q**3) - T)) # expected value
319
349
  True
320
350
  """
321
- L = LazyPowerSeriesRing(self._base, name)
322
351
  q = self._Fq.cardinality()
323
352
 
324
353
  def coeff_log(k):
@@ -329,7 +358,12 @@ class DrinfeldModule_charzero(DrinfeldModule):
329
358
  return self._compute_coefficient_log(v)
330
359
  else:
331
360
  return self._base.zero()
332
- return L(coeff_log, valuation=1)
361
+
362
+ if prec is Infinity:
363
+ L = LazyPowerSeriesRing(self._base, name)
364
+ return L(coeff_log, valuation=1)
365
+ L = PowerSeriesRing(self._base, name, default_prec=prec)
366
+ return L([0] + [coeff_log(i) for i in range(1, prec)], prec=prec)
333
367
 
334
368
  @cached_method
335
369
  def _compute_goss_polynomial(self, n, q, poly_ring, X):
@@ -415,3 +449,225 @@ class DrinfeldModule_charzero(DrinfeldModule):
415
449
  X = poly_ring.gen()
416
450
  q = self._Fq.cardinality()
417
451
  return self._compute_goss_polynomial(n, q, poly_ring, X)
452
+
453
+
454
+ class DrinfeldModule_rational(DrinfeldModule_charzero):
455
+ """
456
+ A class for Drinfeld modules defined over the fraction
457
+ field of the underlying function field.
458
+
459
+ TESTS::
460
+
461
+ sage: q = 9
462
+ sage: Fq = GF(q)
463
+ sage: A = Fq['T']
464
+ sage: K.<T> = Frac(A)
465
+ sage: C = DrinfeldModule(A, [T, 1]); C
466
+ Drinfeld module defined by T |--> t + T
467
+ sage: type(C)
468
+ <class 'sage.rings.function_field.drinfeld_modules.charzero_drinfeld_module.DrinfeldModule_rational_with_category'>
469
+ """
470
+ def coefficient_in_function_ring(self, n):
471
+ r"""
472
+ Return the `n`-th coefficient of this Drinfeld module as
473
+ an element of the underlying function ring.
474
+
475
+ INPUT:
476
+
477
+ - ``n`` -- an integer
478
+
479
+ EXAMPLES::
480
+
481
+ sage: q = 5
482
+ sage: Fq = GF(q)
483
+ sage: A = Fq['T']
484
+ sage: R = Fq['U']
485
+ sage: K.<U> = Frac(R)
486
+ sage: phi = DrinfeldModule(A, [U, 0, U^2, U^3])
487
+ sage: phi.coefficient_in_function_ring(2)
488
+ T^2
489
+
490
+ Compare with the method meth:`coefficient`::
491
+
492
+ sage: phi.coefficient(2)
493
+ U^2
494
+
495
+ If the required coefficient is not a polynomials,
496
+ an error is raised::
497
+
498
+ sage: psi = DrinfeldModule(A, [U, 1/U])
499
+ sage: psi.coefficient_in_function_ring(0)
500
+ T
501
+ sage: psi.coefficient_in_function_ring(1)
502
+ Traceback (most recent call last):
503
+ ...
504
+ ValueError: coefficient is not polynomial
505
+ """
506
+ A = self.function_ring()
507
+ g = self.coefficient(n)
508
+ g = g.backend(force=True)
509
+ if g.denominator().is_one():
510
+ return A(g.numerator().list())
511
+ else:
512
+ raise ValueError("coefficient is not polynomial")
513
+
514
+ def coefficients_in_function_ring(self, sparse=True):
515
+ r"""
516
+ Return the coefficients of this Drinfeld module as elements
517
+ of the underlying function ring.
518
+
519
+ INPUT:
520
+
521
+ - ``sparse`` -- a boolean (default: ``True``); if ``True``,
522
+ only return the nonzero coefficients; otherwise, return
523
+ all of them.
524
+
525
+ EXAMPLES::
526
+
527
+ sage: q = 5
528
+ sage: Fq = GF(q)
529
+ sage: A = Fq['T']
530
+ sage: R = Fq['U']
531
+ sage: K.<U> = Frac(R)
532
+ sage: phi = DrinfeldModule(A, [U, 0, U^2, U^3])
533
+ sage: phi.coefficients_in_function_ring()
534
+ [T, T^2, T^3]
535
+ sage: phi.coefficients_in_function_ring(sparse=False)
536
+ [T, 0, T^2, T^3]
537
+
538
+ Compare with the method meth:`coefficients`::
539
+
540
+ sage: phi.coefficients()
541
+ [U, U^2, U^3]
542
+
543
+ If the coefficients are not polynomials, an error is raised::
544
+
545
+ sage: psi = DrinfeldModule(A, [U, 1/U])
546
+ sage: psi.coefficients_in_function_ring()
547
+ Traceback (most recent call last):
548
+ ...
549
+ ValueError: coefficients are not polynomials
550
+ """
551
+ A = self.function_ring()
552
+ gs = []
553
+ for g in self.coefficients(sparse):
554
+ g = g.backend(force=True)
555
+ if g.denominator().is_one():
556
+ gs.append(A(g.numerator().list()))
557
+ else:
558
+ raise ValueError("coefficients are not polynomials")
559
+ return gs
560
+
561
+ def class_polynomial(self):
562
+ r"""
563
+ Return the class polynomial, that is the Fitting ideal
564
+ of the class module, of this Drinfeld module.
565
+
566
+ We refer to [Tae2012]_ for the definition and basic
567
+ properties of the class module.
568
+
569
+ EXAMPLES:
570
+
571
+ We check that the class module of the Carlitz module
572
+ is trivial::
573
+
574
+ sage: q = 5
575
+ sage: Fq = GF(q)
576
+ sage: A = Fq['T']
577
+ sage: K.<T> = Frac(A)
578
+ sage: C = DrinfeldModule(A, [T, 1]); C
579
+ Drinfeld module defined by T |--> t + T
580
+ sage: C.class_polynomial()
581
+ 1
582
+
583
+ When the coefficients of the Drinfeld module have small
584
+ enough degrees, the class module is always trivial::
585
+
586
+ sage: gs = [T] + [A.random_element(degree = q^i)
587
+ ....: for i in range(1, 5)]
588
+ sage: phi = DrinfeldModule(A, gs)
589
+ sage: phi.class_polynomial()
590
+ 1
591
+
592
+ Here is an example with a nontrivial class module::
593
+
594
+ sage: phi = DrinfeldModule(A, [T, 2*T^14 + 2*T^4])
595
+ sage: phi.class_polynomial()
596
+ T + 3
597
+
598
+ TESTS:
599
+
600
+ The Drinfeld module must have polynomial coefficients::
601
+
602
+ sage: phi = DrinfeldModule(A, [T, 1/T])
603
+ sage: phi.class_polynomial()
604
+ Traceback (most recent call last):
605
+ ...
606
+ ValueError: coefficients are not polynomials
607
+ """
608
+ # The algorithm is based on the following remark:
609
+ # writing phi_T = g_0 + g_1*tau + ... + g_r*tau^r,
610
+ # if s > deg(g_i/(q^i - 1)) - 1 for all i, then the
611
+ # class module is equal to
612
+ # H := E(Kinfty/A) / < T^(-s), T^(-s-1), ... >
613
+ # where E(Kinfty/A) is Kinfty/A equipped with the
614
+ # A-module structure coming from phi.
615
+
616
+ A = self.function_ring()
617
+ Fq = A.base_ring()
618
+ q = Fq.cardinality()
619
+ r = self.rank()
620
+
621
+ # We compute the bound s
622
+ gs = self.coefficients_in_function_ring(sparse=False)
623
+ s = max(gs[i].degree() // (q**i - 1) for i in range(1, r+1))
624
+ if s == 0:
625
+ return A.one()
626
+
627
+ # We compute the matrix of phi_T acting on the quotient
628
+ # M := (Kinfty/A) / < T^(-s), T^(-s-1), ... >
629
+ # (for the standard structure of A-module!)
630
+ M = matrix(Fq, s)
631
+ qk = 1
632
+ for k in range(r+1):
633
+ for i in range(s):
634
+ e = (i+1)*qk
635
+ for j in range(s):
636
+ e -= 1
637
+ if e < 0:
638
+ break
639
+ M[i, j] += gs[k][e]
640
+ qk *= q
641
+
642
+ # We compute the subspace of E(Kinfty/A) (for the twisted
643
+ # structure of A-module!)
644
+ # V = < T^(-s), T^(-s+1), ... >
645
+ # It is also the phi_T-saturation of T^(-s+1) in M, i.e.
646
+ # the Fq-vector space generated by the phi_T^i(T^(-s+1))
647
+ # for i varying in NN.
648
+ v = vector(Fq, s)
649
+ v[s-1] = 1
650
+ vs = [v]
651
+ for i in range(s-1):
652
+ v = v*M
653
+ vs.append(v)
654
+ V = matrix(vs)
655
+ V.echelonize()
656
+
657
+ # We compute the action of phi_T on H = M/V
658
+ # as an Fq-linear map (encoded in the matrix N)
659
+ dim = V.rank()
660
+ pivots = V.pivots()
661
+ j = ip = 0
662
+ for i in range(dim, s):
663
+ while ip < dim and j == pivots[ip]:
664
+ j += 1
665
+ ip += 1
666
+ V[i,j] = 1
667
+ N = (V * M * ~V).submatrix(dim, dim)
668
+
669
+ # The class module is now H where the action of T
670
+ # is given by the matrix N
671
+ # The class polynomial is then the characteristic
672
+ # polynomial of N
673
+ return A(N.charpoly())
@@ -37,6 +37,7 @@ from sage.misc.lazy_string import _LazyString
37
37
  from sage.misc.misc_c import prod
38
38
  from sage.rings.integer import Integer
39
39
  from sage.rings.integer_ring import ZZ
40
+ from sage.rings.fraction_field import FractionField_generic
40
41
  from sage.rings.polynomial.ore_polynomial_element import OrePolynomial
41
42
  from sage.rings.polynomial.polynomial_ring import PolynomialRing_generic
42
43
  from sage.structure.parent import Parent
@@ -622,9 +623,17 @@ class DrinfeldModule(Parent, UniqueRepresentation):
622
623
  raise ValueError('generator must have positive degree')
623
624
 
624
625
  # Instantiate the appropriate class:
625
- if base_field.is_finite():
626
+ backend = base_field.backend(force=True)
627
+ if backend.is_finite():
626
628
  from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import DrinfeldModule_finite
627
629
  return DrinfeldModule_finite(gen, category)
630
+ if isinstance(backend, FractionField_generic):
631
+ ring = backend.ring()
632
+ if (isinstance(ring, PolynomialRing_generic)
633
+ and ring.base_ring() is function_ring_base
634
+ and base_morphism(T) == ring.gen()):
635
+ from .charzero_drinfeld_module import DrinfeldModule_rational
636
+ return DrinfeldModule_rational(gen, category)
628
637
  if not category._characteristic:
629
638
  from .charzero_drinfeld_module import DrinfeldModule_charzero
630
639
  return DrinfeldModule_charzero(gen, category)