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
@@ -617,7 +617,7 @@ def is_hyperbolic(self, p) -> bool:
617
617
  self.hasse_invariant(p) == 1)
618
618
 
619
619
 
620
- def is_anisotropic(self, p):
620
+ def is_anisotropic(self, p) -> bool:
621
621
  r"""
622
622
  Check if the quadratic form is anisotropic over the `p`-adic numbers `\QQ_p` or `\RR`.
623
623
 
@@ -687,7 +687,7 @@ def is_anisotropic(self, p):
687
687
  raise NotImplementedError("we have not established a convention for 0-dim'l quadratic forms")
688
688
 
689
689
 
690
- def is_isotropic(self, p):
690
+ def is_isotropic(self, p) -> bool:
691
691
  r"""
692
692
  Check if `Q` is isotropic over the `p`-adic numbers `\QQ_p` or `\RR`.
693
693
 
@@ -926,9 +926,9 @@ def compute_definiteness_string_by_determinants(self):
926
926
  return "pos_def" if first_coeff > 0 else "neg_def"
927
927
 
928
928
 
929
- def is_positive_definite(self):
929
+ def is_positive_definite(self) -> bool:
930
930
  """
931
- Determines if the given quadratic form is positive-definite.
931
+ Determine if the given quadratic form is positive-definite.
932
932
 
933
933
  .. NOTE::
934
934
 
@@ -963,9 +963,9 @@ def is_positive_definite(self):
963
963
  return (def_str == "pos_def") or (def_str == "zero")
964
964
 
965
965
 
966
- def is_negative_definite(self):
966
+ def is_negative_definite(self) -> bool:
967
967
  """
968
- Determines if the given quadratic form is negative-definite.
968
+ Determine if the given quadratic form is negative-definite.
969
969
 
970
970
  .. NOTE::
971
971
 
@@ -1000,9 +1000,9 @@ def is_negative_definite(self):
1000
1000
  return (def_str == "neg_def") or (def_str == "zero")
1001
1001
 
1002
1002
 
1003
- def is_indefinite(self):
1003
+ def is_indefinite(self) -> bool:
1004
1004
  """
1005
- Determines if the given quadratic form is indefinite.
1005
+ Determine if the given quadratic form is indefinite.
1006
1006
 
1007
1007
  .. NOTE::
1008
1008
 
@@ -1037,9 +1037,9 @@ def is_indefinite(self):
1037
1037
  return def_str == "indefinite"
1038
1038
 
1039
1039
 
1040
- def is_definite(self):
1040
+ def is_definite(self) -> bool:
1041
1041
  """
1042
- Determines if the given quadratic form is (positive or negative) definite.
1042
+ Determine if the given quadratic form is (positive or negative) definite.
1043
1043
 
1044
1044
  .. NOTE::
1045
1045
 
@@ -90,7 +90,7 @@ def content(self):
90
90
 
91
91
 
92
92
  # in quadratic_form.py
93
- # def is_primitive(self):
93
+ # def is_primitive(self) -> bool:
94
94
  # """
95
95
  # Checks if the form is a multiple of another form... only over ZZ for now.
96
96
  # """
@@ -111,7 +111,7 @@ def content(self):
111
111
 
112
112
  def adjoint(self):
113
113
  """
114
- This gives the adjoint (integral) quadratic form associated to the
114
+ Return the adjoint (integral) quadratic form associated to the
115
115
  given form, essentially defined by taking the adjoint of the matrix.
116
116
 
117
117
  EXAMPLES::
@@ -71,7 +71,8 @@ class TernaryQF(SageObject):
71
71
  sage: TestSuite(TernaryQF).run()
72
72
  """
73
73
 
74
- __slots__ = ['_a', '_b', '_c', '_r', '_s', '_t', '_automorphisms', '_number_of_automorphisms']
74
+ __slots__ = ['_a', '_b', '_c', '_r', '_s', '_t',
75
+ '_automorphisms', '_number_of_automorphisms']
75
76
 
76
77
  possible_automorphisms = None
77
78
 
@@ -91,7 +92,6 @@ class TernaryQF(SageObject):
91
92
  [1 2 3]
92
93
  [4 5 6]
93
94
  """
94
-
95
95
  if len(v) != 6:
96
96
  # Check we have six coefficients
97
97
  raise ValueError("Ternary quadratic form must be given by a list of six coefficients")
@@ -99,9 +99,9 @@ class TernaryQF(SageObject):
99
99
  self._automorphisms = None
100
100
  self._number_of_automorphisms = None
101
101
 
102
- def coefficients(self):
102
+ def coefficients(self) -> tuple:
103
103
  r"""
104
- Return the list of coefficients of the ternary quadratic form.
104
+ Return the tuple of coefficients of the ternary quadratic form.
105
105
 
106
106
  EXAMPLES::
107
107
 
@@ -114,7 +114,7 @@ class TernaryQF(SageObject):
114
114
  """
115
115
  return self._a, self._b, self._c, self._r, self._s, self._t
116
116
 
117
- def __hash__(self):
117
+ def __hash__(self) -> int:
118
118
  """
119
119
  Return a hash for ``self``.
120
120
 
@@ -125,7 +125,6 @@ class TernaryQF(SageObject):
125
125
  5881802312257552497 # 64-bit
126
126
  1770036893 # 32-bit
127
127
  """
128
-
129
128
  return hash(self.coefficients())
130
129
 
131
130
  def coefficient(self, n):
@@ -167,7 +166,7 @@ class TernaryQF(SageObject):
167
166
  x, y, z = polygens(ZZ, names)
168
167
  return self._a * x**2 + self._b * y**2 + self._c * z**2 + self._t * x*y + self._s * x*z + self._r * y*z
169
168
 
170
- def _repr_(self):
169
+ def _repr_(self) -> str:
171
170
  r"""
172
171
  Display the quadratic form.
173
172
 
@@ -231,19 +230,19 @@ class TernaryQF(SageObject):
231
230
  # Check if v has 3 cols
232
231
  if v.ncols() == 3:
233
232
  M = v.transpose() * self.matrix() * v
234
- return TernaryQF([M[0, 0]//2, M[1, 1]//2, M[2, 2]//2,
233
+ return TernaryQF([M[0, 0] // 2, M[1, 1] // 2, M[2, 2] // 2,
235
234
  M[1, 2], M[0, 2], M[0, 1]])
236
- else:
237
- return QuadraticForm(ZZ, v.transpose() * self.matrix() * v)
238
- elif isinstance(v, (Vector, list, tuple)):
235
+
236
+ return QuadraticForm(ZZ, v.transpose() * self.matrix() * v)
237
+ if isinstance(v, (Vector, list, tuple)):
239
238
  # Check that v has length 3
240
239
  if len(v) != 3:
241
240
  raise TypeError("your vector needs to have length 3")
242
241
  v0, v1, v2 = v
243
242
  a, b, c, r, s, t = self.coefficients()
244
243
  return a*v0**2 + b*v1**2 + c*v2**2 + r*v1*v2 + s*v0*v2 + t*v0*v1
245
- else:
246
- raise TypeError("presently we can only evaluate a quadratic form on a list, tuple, vector or matrix")
244
+
245
+ raise TypeError("presently we can only evaluate a quadratic form on a list, tuple, vector or matrix")
247
246
 
248
247
  def quadratic_form(self):
249
248
  r"""
@@ -261,11 +260,13 @@ class TernaryQF(SageObject):
261
260
  sage: bool(QF1 == QF2)
262
261
  True
263
262
  """
264
- return QuadraticForm(ZZ, 3, [self._a, self._t, self._s, self._b, self._r, self._c])
263
+ return QuadraticForm(ZZ, 3, [self._a, self._t, self._s,
264
+ self._b, self._r, self._c])
265
265
 
266
266
  def matrix(self):
267
267
  r"""
268
268
  Return the Hessian matrix associated to the ternary quadratic form.
269
+
269
270
  That is, if `Q` is a ternary quadratic form, `Q(x,y,z) = a\cdot x^2 + b\cdot y^2 + c\cdot z^2 + r\cdot y\cdot z + s\cdot x\cdot z + t\cdot x\cdot y`,
270
271
  then the Hessian matrix associated to `Q` is
271
272
  ::
@@ -290,12 +291,15 @@ class TernaryQF(SageObject):
290
291
  sage: (v*M*v.column())[0]//2
291
292
  28
292
293
  """
293
- M = matrix(ZZ, 3, [2*self._a, self._t, self._s, self._t, 2*self._b, self._r, self._s, self._r, 2*self._c])
294
- return M
294
+ return matrix(ZZ, 3, 3, [2 * self._a, self._t, self._s,
295
+ self._t, 2 * self._b, self._r,
296
+ self._s, self._r, 2 * self._c])
295
297
 
296
298
  def disc(self):
297
299
  r"""
298
- Return the discriminant of the ternary quadratic form, this is the determinant of the matrix divided by 2.
300
+ Return the discriminant of the ternary quadratic form.
301
+
302
+ This is the determinant of the matrix divided by 2.
299
303
 
300
304
  EXAMPLES::
301
305
 
@@ -305,7 +309,8 @@ class TernaryQF(SageObject):
305
309
  sage: Q.matrix().det()
306
310
  -50
307
311
  """
308
- return 4*self._a*self._b*self._c + self._r*self._s*self._t - self._a*self._r**2 - self._b*self._s**2 - self._c*self._t**2
312
+ return (4*self._a*self._b*self._c + self._r*self._s*self._t
313
+ - self._a*self._r**2 - self._b*self._s**2 - self._c*self._t**2)
309
314
 
310
315
  def is_definite(self) -> bool:
311
316
  """
@@ -325,28 +330,13 @@ class TernaryQF(SageObject):
325
330
  d1 = self._a
326
331
  if d1 == 0:
327
332
  return False
328
- d2 = 4*self._a*self._b-self._t**2
329
- if d2 == 0:
333
+ d2 = 4 * self._a * self._b - self._t**2
334
+ if d2 <= 0:
330
335
  return False
331
336
  d3 = self.disc()
332
337
  if d3 == 0:
333
338
  return False
334
- if d1 > 0:
335
- if d2 > 0:
336
- if d3 > 0:
337
- return True
338
- else:
339
- return False
340
- else:
341
- return False
342
- else:
343
- if d2 > 0:
344
- if d3 < 0:
345
- return True
346
- else:
347
- return False
348
- else:
349
- return False
339
+ return (d1 > 0) == (d3 > 0)
350
340
 
351
341
  def is_positive_definite(self) -> bool:
352
342
  """
@@ -371,22 +361,13 @@ class TernaryQF(SageObject):
371
361
  d1 = self._a
372
362
  if d1 == 0:
373
363
  return False
374
- d2 = 4*self._a*self._b-self._t**2
375
- if d2 == 0:
364
+ d2 = 4 * self._a * self._b - self._t**2
365
+ if d2 <= 0:
376
366
  return False
377
367
  d3 = self.disc()
378
368
  if d3 == 0:
379
369
  return False
380
- if d1 > 0:
381
- if d2 > 0:
382
- if d3 > 0:
383
- return True
384
- else:
385
- return False
386
- else:
387
- return False
388
- else:
389
- return False
370
+ return d1 > 0 and d3 > 0
390
371
 
391
372
  def is_negative_definite(self) -> bool:
392
373
  """
@@ -406,22 +387,13 @@ class TernaryQF(SageObject):
406
387
  d1 = self._a
407
388
  if d1 == 0:
408
389
  return False
409
- d2 = 4*self._a*self._b-self._t**2
410
- if d2 == 0:
390
+ d2 = 4 * self._a * self._b - self._t**2
391
+ if d2 <= 0:
411
392
  return False
412
393
  d3 = self.disc()
413
394
  if d3 == 0:
414
395
  return False
415
- if d1 < 0:
416
- if d2 > 0:
417
- if d3 < 0:
418
- return True
419
- else:
420
- return False
421
- else:
422
- return False
423
- else:
424
- return False
396
+ return d1 < 0 and d3 < 0
425
397
 
426
398
  def __neg__(self):
427
399
  """
@@ -488,7 +460,7 @@ class TernaryQF(SageObject):
488
460
  """
489
461
  l = self.coefficients()
490
462
  g = gcd(l)
491
- return TernaryQF([a//g for a in l])
463
+ return TernaryQF([a // g for a in l])
492
464
 
493
465
  def scale_by_factor(self, k):
494
466
  """
@@ -951,7 +923,6 @@ class TernaryQF(SageObject):
951
923
  sage: neig.count(Q2)
952
924
  3
953
925
  """
954
-
955
926
  z = self.find_zeros_mod_p(p)
956
927
  return [self.find_p_neighbor_from_vec(p, v, mat) for v in z]
957
928
 
@@ -965,7 +936,6 @@ class TernaryQF(SageObject):
965
936
  sage: Q.basic_lemma(3)
966
937
  4
967
938
  """
968
-
969
939
  return _basic_lemma(self._a, self._b, self._c, self._r, self._s, self._t, p)
970
940
 
971
941
  def xi(self, p):
@@ -1056,7 +1026,7 @@ class TernaryQF(SageObject):
1056
1026
 
1057
1027
  return identity_matrix(3) - v.column()*matrix(v)*self.matrix()/self(v)
1058
1028
 
1059
- def automorphism_symmetries(self, A):
1029
+ def automorphism_symmetries(self, A) -> list:
1060
1030
  """
1061
1031
  Given the automorphism `A`, if `A` is the identity, return the empty list.
1062
1032
  Otherwise, return a list of two vectors `v_1`, `v_2` such that the product of
@@ -1086,20 +1056,15 @@ class TernaryQF(SageObject):
1086
1056
  sage: Q.automorphism_symmetries(identity_matrix(ZZ,3))
1087
1057
  []
1088
1058
  """
1089
-
1090
1059
  if A == identity_matrix(3):
1091
1060
  return []
1092
- else:
1093
- bs = (A - 1).columns()
1094
- for b1 in bs:
1095
- if b1 != 0:
1096
- break
1097
- A1 = self.symmetry(b1)*A
1098
- bs = (A1 - 1).columns()
1099
- for b2 in bs:
1100
- if b2 != 0:
1101
- break
1102
- return [b1, b2]
1061
+
1062
+ bs = (A - 1).columns()
1063
+ b1 = next(v for v in bs if v)
1064
+ A1 = self.symmetry(b1) * A
1065
+ bs = (A1 - 1).columns()
1066
+ b2 = next(v for v in bs if v)
1067
+ return [b1, b2]
1103
1068
 
1104
1069
  def automorphism_spin_norm(self, A):
1105
1070
  """
@@ -1118,14 +1083,17 @@ class TernaryQF(SageObject):
1118
1083
  """
1119
1084
  if A == identity_matrix(ZZ, 3):
1120
1085
  return 1
1121
- bs = self.automorphism_symmetries(A)
1122
- s = self(bs[0]) * self(bs[1])
1086
+ b1, b2 = self.automorphism_symmetries(A)
1087
+ s = self(b1) * self(b2)
1123
1088
  return s.squarefree_part()
1124
1089
 
1125
- def _border(self, n):
1090
+ def _border(self, n) -> bool:
1126
1091
  """
1127
1092
  Auxiliary function to find the automorphisms of a positive definite ternary quadratic form.
1128
- It return a boolean whether the n-condition is true. If Q = TernaryQF([a,b,c,r,s,t]), the conditions are:
1093
+
1094
+ It returns a boolean whether the n-condition is true.
1095
+
1096
+ If ``Q = TernaryQF([a,b,c,r,s,t])``, the conditions are:
1129
1097
 
1130
1098
  1. a = t, s = 2r.
1131
1099
  2. a = s, t = 2r.
@@ -1195,7 +1163,6 @@ class TernaryQF(SageObject):
1195
1163
  sage: Q16._border(16)
1196
1164
  True
1197
1165
  """
1198
-
1199
1166
  a, b, c, r, s, t = self.coefficients()
1200
1167
  if n == 1:
1201
1168
  return (a == t) and (s == 2*r)
@@ -1308,7 +1275,6 @@ class TernaryQF(SageObject):
1308
1275
  sage: Q._automorphisms_reduced_fast()
1309
1276
  [(1, 0, 0, 0, 1, 0, 0, 0, 1)]
1310
1277
  """
1311
-
1312
1278
  if self._border(1):
1313
1279
  if self._border(2):
1314
1280
  if self._border(14):
@@ -1673,6 +1639,7 @@ class TernaryQF(SageObject):
1673
1639
  def _automorphisms_reduced_slow(self):
1674
1640
  """
1675
1641
  Return the automorphisms of the reduced ternary quadratic form.
1642
+
1676
1643
  It searches over all 3x3 matrices with coefficients -1, 0, 1,
1677
1644
  determinant 1 and finite order, because Eisenstein reduced forms
1678
1645
  are Minkowski reduced. See Cassels.
@@ -2024,7 +1991,7 @@ def find_all_ternary_qf_by_level_disc(N, d):
2024
1991
  ...
2025
1992
  ValueError: There are no ternary forms of this level and discriminant
2026
1993
  """
2027
- return [TernaryQF(_) for _ in _find_all_ternary_qf_by_level_disc(N, d)]
1994
+ return [TernaryQF(qf) for qf in _find_all_ternary_qf_by_level_disc(N, d)]
2028
1995
 
2029
1996
 
2030
1997
  def find_a_ternary_qf_by_level_disc(N, d):
@@ -1,6 +1,6 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
2
  r"""
3
- C-Finite Sequences
3
+ C-finite sequences
4
4
 
5
5
  C-finite infinite sequences satisfy homogeneous linear recurrences with constant coefficients:
6
6
 
@@ -8,7 +8,7 @@ C-finite infinite sequences satisfy homogeneous linear recurrences with constant
8
8
 
9
9
  a_{n+d} = c_0a_n + c_1a_{n+1} + \cdots + c_{d-1}a_{n+d-1}, \quad d>0.
10
10
 
11
- CFiniteSequences are completely defined by their ordinary generating function (o.g.f., which
11
+ They are completely defined by their ordinary generating function (o.g.f., which
12
12
  is always a :mod:`fraction <sage.rings.fraction_field_element>` of
13
13
  :mod:`polynomials <sage.rings.polynomial.polynomial_element>` over `\ZZ` or `\QQ` ).
14
14
 
@@ -69,9 +69,17 @@ can be guessed::
69
69
 
70
70
  :func:`fibonacci`, :class:`BinaryRecurrenceSequence`
71
71
 
72
- AUTHORS:
72
+ .. TODO::
73
73
 
74
- - Ralf Stephan (2014): initial version
74
+ Implement a feature enabling::
75
+
76
+ sage: # not implemented
77
+ sage: CFiniteSequence(x+x^2+x^3+x^4+x^5+O(x^6))
78
+ sage: latex(r)
79
+ \big\{a_{n\ge0}\big|a_{n+2}=\sum_{i=0}^{1}c_ia_{n+i}, c=\{1,1\}, a_{n<2}=\{0,0,0,1\}\big\}
80
+ sage: r.egf()
81
+ exp(2*x)
82
+ sage: r = CFiniteSequence(1/(1-y-x*y), x)
75
83
 
76
84
  REFERENCES:
77
85
 
@@ -79,6 +87,10 @@ REFERENCES:
79
87
  - [KP2011]_
80
88
  - [SZ1994]_
81
89
  - [Zei2011]_
90
+
91
+ AUTHORS:
92
+
93
+ - Ralf Stephan (2014): initial version
82
94
  """
83
95
 
84
96
  # ****************************************************************************
@@ -1292,16 +1304,3 @@ class CFiniteSequences_generic(Parent, UniqueRepresentation):
1292
1304
  if num == 0 or sequence != S(num / den).list():
1293
1305
  return 0
1294
1306
  return CFiniteSequence(num / den)
1295
-
1296
-
1297
- r"""
1298
- .. TODO::
1299
-
1300
- sage: # not implemented
1301
- sage: CFiniteSequence(x+x^2+x^3+x^4+x^5+O(x^6))
1302
- sage: latex(r)
1303
- \big\{a_{n\ge0}\big|a_{n+2}=\sum_{i=0}^{1}c_ia_{n+i}, c=\{1,1\}, a_{n<2}=\{0,0,0,1\}\big\}
1304
- sage: r.egf()
1305
- exp(2*x)
1306
- sage: r = CFiniteSequence(1/(1-y-x*y), x)
1307
- """
@@ -1,4 +1,5 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
+
2
3
  from sage.libs.gsl.types cimport gsl_complex
3
4
 
4
5
  cimport sage.structure.element
@@ -1,6 +1,8 @@
1
1
  # sage_setup: distribution = sagemath-modules
2
2
  # distutils: extra_compile_args = -D_XPG6
3
- # distutils: libraries = m
3
+ # distutils: libraries = M_LIBRARIES
4
+ # distutils: language = c++
5
+ # distutils: extra_compile_args = -std=c++11
4
6
  r"""
5
7
  Double precision floating point complex numbers
6
8
 
@@ -75,9 +77,8 @@ from sage.misc.randstate cimport randstate, current_randstate
75
77
 
76
78
  from sage.libs.gsl.complex cimport *
77
79
 
78
- cdef extern from "<complex.h>":
79
- double complex csqrt(double complex)
80
- double cabs(double complex)
80
+ cimport libcpp.complex
81
+ from libcpp.complex cimport abs, sqrt
81
82
 
82
83
  import sage.rings.abc
83
84
  cimport sage.rings.integer
@@ -1077,7 +1078,7 @@ cdef class ComplexDoubleElement(FieldElement):
1077
1078
 
1078
1079
  INPUT:
1079
1080
 
1080
- - ``format_spec`` -- string; a floating point format specificier as
1081
+ - ``format_spec`` -- string; a floating point format specifier as
1081
1082
  defined by :python:`the format specification mini-language
1082
1083
  <library/string.html#formatspec>` in Python
1083
1084
 
@@ -2289,10 +2290,10 @@ cdef class ComplexDoubleElement(FieldElement):
2289
2290
 
2290
2291
  sage: a = CDF(-0.95,-0.65)
2291
2292
  sage: b = CDF(0.683,0.747)
2292
- sage: a.agm(b, algorithm='optimal')
2293
- -0.3715916523517613 + 0.31989466020683*I
2294
- sage: a.agm(b, algorithm='principal') # rel tol 1e-15
2295
- 0.33817546298618006 - 0.013532696956540503*I
2293
+ sage: a.agm(b, algorithm='optimal') # rel tol 1e-15
2294
+ -0.3715916523517613 + 0.31989466020683005*I
2295
+ sage: a.agm(b, algorithm='principal') # rel tol 2e-15
2296
+ 0.33817546298618006 - 0.013532696956540483*I
2296
2297
  sage: a.agm(b, algorithm='pari') # needs sage.libs.pari
2297
2298
  -0.37159165235176134 + 0.31989466020683005*I
2298
2299
 
@@ -2305,7 +2306,7 @@ cdef class ComplexDoubleElement(FieldElement):
2305
2306
  sage: a.agm(-a)
2306
2307
  0.0
2307
2308
  """
2308
- cdef double complex a, b, a1, b1, r
2309
+ cdef libcpp.complex.complex[double] a, b, a1, b1, r
2309
2310
  cdef double d, e, eps = 2.0**-51
2310
2311
 
2311
2312
  if algorithm == "pari":
@@ -2326,21 +2327,21 @@ cdef class ComplexDoubleElement(FieldElement):
2326
2327
  if algorithm=="optimal":
2327
2328
  while True:
2328
2329
  a1 = (a+b)/2
2329
- b1 = csqrt(a*b)
2330
+ b1 = sqrt(a*b)
2330
2331
  r = b1/a1
2331
- d = cabs(r-1)
2332
- e = cabs(r+1)
2332
+ d = abs(r-1)
2333
+ e = abs(r+1)
2333
2334
  if e < d:
2334
2335
  b1=-b1
2335
2336
  d = e
2336
- if d < eps: return ComplexDoubleElement_from_doubles(a1.real, a1.imag)
2337
+ if d < eps: return ComplexDoubleElement_from_doubles(a1.real(), a1.imag())
2337
2338
  a, b = a1, b1
2338
2339
 
2339
2340
  elif algorithm=="principal":
2340
2341
  while True:
2341
2342
  a1 = (a+b)/2
2342
- b1 = csqrt(a*b)
2343
- if cabs((b1/a1)-1) < eps: return ComplexDoubleElement_from_doubles(a1.real, a1.imag)
2343
+ b1 = sqrt(a*b)
2344
+ if abs((b1/a1)-1) < eps: return ComplexDoubleElement_from_doubles(a1.real(), a1.imag())
2344
2345
  a, b = a1, b1
2345
2346
 
2346
2347
  else:
@@ -2441,34 +2442,38 @@ cdef class ComplexDoubleElement(FieldElement):
2441
2442
  from sage.libs.pari.convert_sage_complex_double import complex_double_element_zeta
2442
2443
  return complex_double_element_zeta(self)
2443
2444
 
2444
- def algdep(self, long n):
2445
+ def algebraic_dependency(self, long n):
2445
2446
  """
2446
2447
  Return a polynomial of degree at most `n` which is
2447
- approximately satisfied by this complex number. Note that the
2448
- returned polynomial need not be irreducible, and indeed usually
2449
- won't be if `z` is a good approximation to an algebraic
2450
- number of degree less than `n`.
2448
+ approximately satisfied by this complex number.
2451
2449
 
2452
- ALGORITHM: Uses the PARI C-library algdep command.
2450
+ Note that the returned polynomial need not be irreducible, and
2451
+ indeed usually will not be if `z` is a good approximation to an
2452
+ algebraic number of degree less than `n`.
2453
+
2454
+ ALGORITHM: Uses the PARI C-library :pari:`algdep` command.
2453
2455
 
2454
2456
  EXAMPLES::
2455
2457
 
2456
2458
  sage: z = (1/2)*(1 + RDF(sqrt(3)) * CDF.0); z # abs tol 1e-16 # needs sage.symbolic
2457
2459
  0.5 + 0.8660254037844387*I
2458
- sage: p = z.algdep(5); p # needs sage.libs.pari sage.symbolic
2460
+ sage: p = z.algebraic_dependency(5); p # needs sage.libs.pari sage.symbolic
2459
2461
  x^2 - x + 1
2460
2462
  sage: abs(z^2 - z + 1) < 1e-14 # needs sage.symbolic
2461
2463
  True
2462
2464
 
2463
2465
  ::
2464
2466
 
2465
- sage: CDF(0,2).algdep(10) # needs sage.libs.pari
2467
+ sage: CDF(0,2).algebraic_dependency(10) # needs sage.libs.pari
2466
2468
  x^2 + 4
2467
- sage: CDF(1,5).algdep(2) # needs sage.libs.pari
2469
+ sage: CDF(1,5).algebraic_dependency(2) # needs sage.libs.pari
2468
2470
  x^2 - 2*x + 26
2469
2471
  """
2470
- from sage.arith.misc import algdep
2471
- return algdep(self, n)
2472
+ from sage.arith.misc import algebraic_dependency
2473
+ return algebraic_dependency(self, n)
2474
+
2475
+ algdep = algebraic_dependency
2476
+
2472
2477
 
2473
2478
  cdef class FloatToCDF(Morphism):
2474
2479
  """
@@ -2624,13 +2629,13 @@ def ComplexDoubleField():
2624
2629
  from sage.misc.parser import Parser
2625
2630
  cdef cdf_parser = Parser(float, float, {"I": _CDF.gen(), "i": _CDF.gen()})
2626
2631
 
2627
- cdef inline double complex extract_double_complex(ComplexDoubleElement x) noexcept:
2632
+ cdef inline libcpp.complex.complex[double] extract_double_complex(ComplexDoubleElement x) noexcept:
2628
2633
  """
2629
- Return the value of ``x`` as a c99 complex double.
2634
+ Return the value of ``x`` as a C++ complex<double>
2630
2635
  """
2631
- cdef double complex z
2632
- z.real = GSL_REAL(x._complex)
2633
- z.imag = GSL_IMAG(x._complex)
2636
+ cdef libcpp.complex.complex[double] z
2637
+ z.real(GSL_REAL(x._complex))
2638
+ z.imag(GSL_IMAG(x._complex))
2634
2639
  return z
2635
2640
 
2636
2641