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
@@ -572,7 +572,7 @@ class DrinfeldModule_finite(DrinfeldModule):
572
572
  Instead, use :meth:`frobenius_charpoly` with the option
573
573
  `algorithm='gekeler'`.
574
574
 
575
- .. WARNING:
575
+ .. WARNING::
576
576
 
577
577
  This algorithm only works in the generic case when the
578
578
  corresponding linear system is invertible. Notable cases
@@ -18,7 +18,7 @@ AUTHORS:
18
18
  # it under the terms of the GNU General Public License as published by
19
19
  # the Free Software Foundation, either version 2 of the License, or
20
20
  # (at your option) any later version.
21
- # http://www.gnu.org/licenses/
21
+ # https://www.gnu.org/licenses/
22
22
  # *****************************************************************************
23
23
 
24
24
  import operator
@@ -28,7 +28,6 @@ from sage.categories.homset import Homset
28
28
  from sage.categories.action import Action
29
29
  from sage.misc.latex import latex
30
30
  from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism
31
- from sage.structure.parent import Parent
32
31
 
33
32
 
34
33
  class DrinfeldModuleMorphismAction(Action):
@@ -745,7 +745,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation,
745
745
  sage: f.characteristic_polynomial()
746
746
  X^3 + (T + 1)*X^2 + (2*T + 3)*X + 2*T^3 + T + 1
747
747
 
748
- We verify, on an example, that the caracteristic polynomial
748
+ We verify, on an example, that the characteristic polynomial
749
749
  of a morphism corresponding to `\phi_a` is `(X-a)^r` where `r`
750
750
  is the rank::
751
751
 
@@ -804,7 +804,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation,
804
804
  Endomorphism of Drinfeld module defined by T |--> z*t^3 + t^2 + z
805
805
  Defn: 0
806
806
 
807
- We verify, on an example, that the caracteristic polynomial
807
+ We verify, on an example, that the characteristic polynomial
808
808
  of the morphism corresponding to `\phi_a` is `(X-a)^r` where `r`
809
809
  is the rank::
810
810
 
@@ -88,7 +88,6 @@ cdef class KhuriMakdisi_base(object):
88
88
 
89
89
  TESTS::
90
90
 
91
- sage: # long time
92
91
  sage: k = GF(7)
93
92
  sage: A.<x,y> = AffineSpace(k,2)
94
93
  sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure()
@@ -183,7 +182,6 @@ cdef class KhuriMakdisi_base(object):
183
182
 
184
183
  TESTS::
185
184
 
186
- sage: # long time
187
185
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
188
186
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
189
187
  sage: h = C.function(y/x).divisor_of_poles()
@@ -209,7 +207,6 @@ cdef class KhuriMakdisi_base(object):
209
207
 
210
208
  TESTS::
211
209
 
212
- sage: # long time
213
210
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
214
211
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
215
212
  sage: h = C.function(y/x).divisor_of_poles()
@@ -235,7 +232,6 @@ cdef class KhuriMakdisi_base(object):
235
232
 
236
233
  TESTS::
237
234
 
238
- sage: # long time
239
235
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
240
236
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
241
237
  sage: h = C.function(y/x).divisor_of_poles()
@@ -261,7 +257,6 @@ cdef class KhuriMakdisi_base(object):
261
257
 
262
258
  TESTS::
263
259
 
264
- sage: # long time
265
260
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
266
261
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
267
262
  sage: h = C.function(y/x).divisor_of_poles()
@@ -331,7 +326,6 @@ cdef class KhuriMakdisi_base(object):
331
326
 
332
327
  TESTS::
333
328
 
334
- sage: # long time
335
329
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
336
330
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
337
331
  sage: h = C.function(y/x).divisor_of_poles()
@@ -365,7 +359,6 @@ cdef class KhuriMakdisi_large(KhuriMakdisi_base):
365
359
 
366
360
  TESTS::
367
361
 
368
- sage: # long time
369
362
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
370
363
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
371
364
  sage: h = C.function(y/x).divisor_of_poles()
@@ -423,7 +416,6 @@ cdef class KhuriMakdisi_large(KhuriMakdisi_base):
423
416
 
424
417
  TESTS::
425
418
 
426
- sage: # long time
427
419
  sage: P2.<x,y,z> = ProjectiveSpace(GF(7), 2)
428
420
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
429
421
  sage: J = C.jacobian(model='km_large')
@@ -486,7 +478,6 @@ cdef class KhuriMakdisi_large(KhuriMakdisi_base):
486
478
 
487
479
  TESTS::
488
480
 
489
- sage: # long time
490
481
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
491
482
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
492
483
  sage: F = C.function_field()
@@ -518,7 +509,7 @@ cdef class KhuriMakdisi_large(KhuriMakdisi_base):
518
509
 
519
510
  TESTS::
520
511
 
521
- sage: # long time
512
+ sage: # needs sage.combinat
522
513
  sage: k = GF(7)
523
514
  sage: A.<x,y> = AffineSpace(k,2)
524
515
  sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure()
@@ -549,7 +540,6 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
549
540
 
550
541
  TESTS::
551
542
 
552
- sage: # long time
553
543
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
554
544
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
555
545
  sage: h = C.function(y/x).divisor_of_poles()
@@ -601,7 +591,6 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
601
591
 
602
592
  TESTS::
603
593
 
604
- sage: # long time
605
594
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
606
595
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
607
596
  sage: h = C.function(y/x).divisor_of_poles()
@@ -637,7 +626,6 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
637
626
 
638
627
  TESTS::
639
628
 
640
- sage: # long time
641
629
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
642
630
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
643
631
  sage: h = C.function(y/x).divisor_of_poles()
@@ -657,7 +645,6 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
657
645
 
658
646
  We check the computation in other model::
659
647
 
660
- sage: # long time
661
648
  sage: J = C.jacobian(model='km_large', base_div=h)
662
649
  sage: G = J.group()
663
650
  sage: p1 = G.point(pl1 - b)
@@ -687,7 +674,7 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
687
674
 
688
675
  TESTS::
689
676
 
690
- sage: # long time
677
+ sage: # needs sage.combinat
691
678
  sage: k = GF(7)
692
679
  sage: A.<x,y> = AffineSpace(k,2)
693
680
  sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure()
@@ -719,7 +706,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
719
706
 
720
707
  TESTS::
721
708
 
722
- sage: # long time
723
709
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
724
710
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
725
711
  sage: b = C([0,1,0]).place()
@@ -777,7 +763,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
777
763
 
778
764
  TESTS::
779
765
 
780
- sage: # long time
781
766
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
782
767
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
783
768
  sage: b = C([0,1,0]).place()
@@ -812,7 +797,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
812
797
 
813
798
  TESTS::
814
799
 
815
- sage: # long time
816
800
  sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
817
801
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
818
802
  sage: b = C([0,1,0]).place()
@@ -832,7 +816,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
832
816
 
833
817
  We check the computation in other model::
834
818
 
835
- sage: # long time
836
819
  sage: h = C.function(y/x).divisor_of_poles()
837
820
  sage: Jl = C.jacobian(model='km_large', base_div=h)
838
821
  sage: G = J.group()
@@ -840,13 +823,34 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
840
823
  sage: q2 = G.point(pl2 - b)
841
824
  sage: G.point(af.divisor()) == q1.addflip(p2)
842
825
  True
826
+
827
+ Check that :issue:`40237` is fixed::
828
+
829
+ sage: K = GF(2)
830
+ sage: F.<x> = FunctionField(K)
831
+ sage: t = polygen(F)
832
+ sage: E.<y> = F.extension(t^3 + (x^2 + x + 1)*t^2 + (x^3 + x + 1)*t + x^5 + x^4)
833
+ sage: O = E.maximal_order()
834
+ sage: Oinf = E.maximal_order_infinite()
835
+ sage: D1 = (-5*O.ideal(x, y).divisor() + O.ideal(x + 1, y^2 + y + 1).divisor()
836
+ ....: + O.ideal(x^3 + x^2 + 1, y + x + 1).divisor())
837
+ sage: D2 = (Oinf.ideal(1/x, y/x^2 + 1).divisor() - 5*O.ideal(x, y).divisor()
838
+ ....: + O.ideal(x^4 + x^3 + 1, y + x).divisor())
839
+ sage: J = E.jacobian('km_small', base_div=5*O.ideal(x, y).divisor())
840
+ sage: JD1 = J(D1)
841
+ sage: JD2 = J(D2)
842
+ sage: JD1 + JD2 == JD2 + JD1
843
+ True
843
844
  """
844
845
  cdef int d0 = self.d0
845
846
  cdef int g = self.g
846
847
  cdef Matrix w1, w2, w3, w4, w5
847
848
 
848
849
  w1 = self.mu_image(wd1, wd2, self.mu_mat33, 4*d0 - g + 1)
849
- w2 = self.mu_preimage(self.wV3, w1, self.mu_mat33, 2*d0)
850
+ # The row space of w2 represents H^0(O(3D_0 - D1 - D2)), whose
851
+ # dimension is at least d0 - g + 1. Hence the codimension is at most
852
+ # 2*d0, and we cannot provide an expected_codim argument for mu_preimage.
853
+ w2 = self.mu_preimage(self.wV3, w1, self.mu_mat33)
850
854
  w3 = self.mu_preimage(self.wV2, w1, self.mu_mat42, 2*d0)
851
855
  # efficient than
852
856
  # wf = matrix(w2[0])
@@ -861,7 +865,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
861
865
 
862
866
  TESTS::
863
867
 
864
- sage: # long time
865
868
  sage: P2.<x,y,z> = ProjectiveSpace(GF(7), 2)
866
869
  sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
867
870
  sage: b = C([0,1,0]).place()
@@ -876,7 +879,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
876
879
 
877
880
  Check that :issue:`39148` is fixed::
878
881
 
879
- sage: # long time
880
882
  sage: k.<x> = FunctionField(GF(17)); t = polygen(k)
881
883
  sage: F.<y> = k.extension(t^4 + (14*x + 14)*t^3 + 9*t^2 + (10*x^2 + 15*x + 8)*t
882
884
  ....: + 7*x^3 + 15*x^2 + 6*x + 16)
@@ -895,8 +897,8 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
895
897
 
896
898
  w1 = self.mu_image(self.wV2, wd, self.mu_mat23, 4*d0 - g + 1)
897
899
  # The row space of w2 represents H^0(O(2D_0 - D)), whose dimension is
898
- # at least d0 - g + 1, and hence the codimension is at most d0. Thus,
899
- # we cannot provide an expected_codim argument for mu_preimage.
900
+ # at least d0 - g + 1. Hence the codimension is at most d0, and we
901
+ # cannot provide an expected_codim argument for mu_preimage.
900
902
  w2 = self.mu_preimage(self.wV3, w1, self.mu_mat23)
901
903
  # efficient than
902
904
  # wf = matrix(w2[0])
@@ -914,7 +916,7 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
914
916
 
915
917
  TESTS::
916
918
 
917
- sage: # long time
919
+ sage: # needs sage.combinat
918
920
  sage: k = GF(7)
919
921
  sage: A.<x,y> = AffineSpace(k,2)
920
922
  sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure()
@@ -119,7 +119,7 @@ import sage.rings.invariants.reconstruction as reconstruction
119
119
 
120
120
 
121
121
  ######################################################################
122
- def _guess_variables(polynomial, *args):
122
+ def _guess_variables(polynomial, *args) -> tuple:
123
123
  """
124
124
  Return the polynomial variables.
125
125
 
@@ -276,16 +276,16 @@ def transvectant(f, g, h=1, scale='default'):
276
276
  from sage.functions.other import binomial, factorial
277
277
  if scale == 'default':
278
278
  scalar = factorial(f._d-h) * factorial(g._d-h) \
279
- * R(factorial(f._d)*factorial(g._d))**(-1)
279
+ * R(factorial(f._d)*factorial(g._d))**(-1)
280
280
  elif scale == 'none':
281
281
  scalar = 1
282
282
  else:
283
283
  raise ValueError('unknown scale type: %s' % scale)
284
284
 
285
285
  def diff(j):
286
- df = f.form().derivative(x,j).derivative(y,h-j)
287
- dg = g.form().derivative(x,h-j).derivative(y,j)
288
- return (-1)**j * binomial(h,j) * df * dg
286
+ df = f.form().derivative(x, j).derivative(y, h-j)
287
+ dg = g.form().derivative(x, h-j).derivative(y, j)
288
+ return (-1)**j * binomial(h, j) * df * dg
289
289
  tv = scalar * sum([diff(j) for j in range(h+1)])
290
290
  if tv.parent() is not R:
291
291
  S = tv.parent()
@@ -368,7 +368,7 @@ class FormsBase(SageObject):
368
368
  dp_dz = d*p - sum(x*dp_dx for x, dp_dx in zip(variables, grad))
369
369
  grad.append(dp_dz)
370
370
  return grad
371
- jac = [diff(p,d) for p,d in args]
371
+ jac = [diff(p, d) for p, d in args]
372
372
  return matrix(self._ring, jac).det()
373
373
 
374
374
  def ring(self):
@@ -608,7 +608,7 @@ class AlgebraicForm(FormsBase):
608
608
  g = random_matrix(F, self._n, algorithm='unimodular')
609
609
  v = vector(self.variables())
610
610
  g_v = g * v
611
- transform = dict( (v[i], g_v[i]) for i in range(self._n) )
611
+ transform = {v[i]: g_v[i] for i in range(self._n)}
612
612
  # The covariant of the transformed polynomial
613
613
  g_self = self.__class__(self._n, self._d, self.form().subs(transform), self.variables())
614
614
  cov_g = getattr(g_self, method_name)()
@@ -917,7 +917,7 @@ class AlgebraicForm(FormsBase):
917
917
  from sage.modules.free_module_element import vector
918
918
  v = vector(self._ring, self._variables)
919
919
  g_v = vector(self._ring, g*v)
920
- transform = dict( (v[i], g_v[i]) for i in range(self._n) )
920
+ transform = {v[i]: g_v[i] for i in range(self._n)}
921
921
  # The covariant of the transformed polynomial
922
922
  return self.__class__(self._n, self._d,
923
923
  self.form().subs(transform), self.variables())
@@ -1124,12 +1124,12 @@ class QuadraticForm(AlgebraicForm):
1124
1124
  coeff = self.scaled_coeffs()
1125
1125
  A = matrix(self._ring, self._n)
1126
1126
  for i in range(self._n):
1127
- A[i,i] = coeff[i]
1127
+ A[i, i] = coeff[i]
1128
1128
  ij = self._n
1129
1129
  for i in range(self._n):
1130
1130
  for j in range(i+1, self._n):
1131
- A[i,j] = coeff[ij]
1132
- A[j,i] = coeff[ij]
1131
+ A[i, j] = coeff[ij]
1132
+ A[j, i] = coeff[ij]
1133
1133
  ij += 1
1134
1134
  return A
1135
1135
 
@@ -1260,7 +1260,7 @@ class QuadraticForm(AlgebraicForm):
1260
1260
  else:
1261
1261
  var = self._variables[0:-1] + (1, )
1262
1262
  n = self._n
1263
- p = sum([ sum([ Aadj[i,j]*var[i]*var[j] for i in range(n) ]) for j in range(n)])
1263
+ p = sum(Aadj[i, j] * var[i] * var[j] for i in range(n) for j in range(n))
1264
1264
  return invariant_theory.quadratic_form(p, self.variables())
1265
1265
 
1266
1266
  def as_QuadraticForm(self):
@@ -2540,7 +2540,7 @@ class TernaryQuadratic(QuadraticForm):
2540
2540
  (x^2, y^2, z^2, x*y, x*z, y*z)
2541
2541
  """
2542
2542
  R = self._ring
2543
- x,y,z = self._x, self._y, self._z
2543
+ x, y, z = self._x, self._y, self._z
2544
2544
  if self._homogeneous:
2545
2545
  return (x**2, y**2, z**2, x*y, x*z, y*z)
2546
2546
  else:
@@ -2715,7 +2715,7 @@ class TernaryCubic(AlgebraicForm):
2715
2715
  (x^3, y^3, z^3, x^2*y, x^2*z, x*y^2, y^2*z, x*z^2, y*z^2, x*y*z)
2716
2716
  """
2717
2717
  R = self._ring
2718
- x,y,z = self._x, self._y, self._z
2718
+ x, y, z = self._x, self._y, self._z
2719
2719
  if self._homogeneous:
2720
2720
  return (x**3, y**3, z**3, x**2*y, x**2*z, x*y**2,
2721
2721
  y**2*z, x*z**2, y*z**2, x*y*z)
@@ -2805,14 +2805,14 @@ class TernaryCubic(AlgebraicForm):
2805
2805
  sage: cubic.S_invariant()
2806
2806
  -1/1296
2807
2807
  """
2808
- a,b,c,a2,a3,b1,b3,c1,c2,m = self.scaled_coeffs()
2809
- S = ( a*b*c*m-(b*c*a2*a3+c*a*b1*b3+a*b*c1*c2)
2810
- - m*(a*b3*c2+b*c1*a3+c*a2*b1)
2811
- + (a*b1*c2**2+a*c1*b3**2+b*a2*c1**2+b*c2*a3**2+c*b3*a2**2+c*a3*b1**2)
2812
- - m**4+2*m**2*(b1*c1+c2*a2+a3*b3)
2813
- - 3*m*(a2*b3*c1+a3*b1*c2)
2814
- - (b1**2*c1**2+c2**2*a2**2+a3**2*b3**2)
2815
- + (c2*a2*a3*b3+a3*b3*b1*c1+b1*c1*c2*a2) )
2808
+ a, b, c, a2, a3, b1, b3, c1, c2, m = self.scaled_coeffs()
2809
+ S = (a*b*c*m-(b*c*a2*a3+c*a*b1*b3+a*b*c1*c2)
2810
+ - m*(a*b3*c2+b*c1*a3+c*a2*b1)
2811
+ + (a*b1*c2**2+a*c1*b3**2+b*a2*c1**2+b*c2*a3**2+c*b3*a2**2+c*a3*b1**2)
2812
+ - m**4+2*m**2*(b1*c1+c2*a2+a3*b3)
2813
+ - 3*m*(a2*b3*c1+a3*b1*c2)
2814
+ - (b1**2*c1**2+c2**2*a2**2+a3**2*b3**2)
2815
+ + (c2*a2*a3*b3+a3*b3*b1*c1+b1*c1*c2*a2))
2816
2816
  return S
2817
2817
 
2818
2818
  def T_invariant(self):
@@ -2831,38 +2831,38 @@ class TernaryCubic(AlgebraicForm):
2831
2831
  sage: cubic.T_invariant()
2832
2832
  -t^6 - t^3 + 1
2833
2833
  """
2834
- a,b,c,a2,a3,b1,b3,c1,c2,m = self.scaled_coeffs()
2835
- T = ( a**2*b**2*c**2-6*a*b*c*(a*b3*c2+b*c1*a3+c*a2*b1)
2836
- - 20*a*b*c*m**3+12*a*b*c*m*(b1*c1+c2*a2+a3*b3)
2837
- + 6*a*b*c*(a2*b3*c1+a3*b1*c2) +
2838
- 4*(a**2*b*c2**3+a**2*c*b3**3+b**2*c*a3**3 +
2839
- b**2*a*c1**3+c**2*a*b1**3+c**2*b*a2**3)
2840
- + 36*m**2*(b*c*a2*a3+c*a*b1*b3+a*b*c1*c2)
2841
- - 24*m*(b*c*b1*a3**2+b*c*c1*a2**2+c*a*c2*b1**2+c*a*a2*b3**2+a*b*a3*c2**2 +
2834
+ a, b, c, a2, a3, b1, b3, c1, c2, m = self.scaled_coeffs()
2835
+ T = (a**2*b**2*c**2-6*a*b*c*(a*b3*c2+b*c1*a3+c*a2*b1)
2836
+ - 20*a*b*c*m**3+12*a*b*c*m*(b1*c1+c2*a2+a3*b3)
2837
+ + 6*a*b*c*(a2*b3*c1+a3*b1*c2) +
2838
+ 4*(a**2*b*c2**3+a**2*c*b3**3+b**2*c*a3**3 +
2839
+ b**2*a*c1**3+c**2*a*b1**3+c**2*b*a2**3)
2840
+ + 36*m**2*(b*c*a2*a3+c*a*b1*b3+a*b*c1*c2)
2841
+ - 24*m*(b*c*b1*a3**2+b*c*c1*a2**2+c*a*c2*b1**2+c*a*a2*b3**2+a*b*a3*c2**2 +
2842
2842
  a*b*b3*c1**2)
2843
- - 3*(a**2*b3**2*c2**2+b**2*c1**2*a3**2+c**2*a2**2*b1**2) +
2844
- 18*(b*c*b1*c1*a2*a3+c*a*c2*a2*b3*b1+a*b*a3*b3*c1*c2)
2845
- - 12*(b*c*c2*a3*a2**2+b*c*b3*a2*a3**2+c*a*c1*b3*b1**2 +
2843
+ - 3*(a**2*b3**2*c2**2+b**2*c1**2*a3**2+c**2*a2**2*b1**2) +
2844
+ 18*(b*c*b1*c1*a2*a3+c*a*c2*a2*b3*b1+a*b*a3*b3*c1*c2)
2845
+ - 12*(b*c*c2*a3*a2**2+b*c*b3*a2*a3**2+c*a*c1*b3*b1**2 +
2846
2846
  c*a*a3*b1*b3**2+a*b*a2*c1*c2**2+a*b*b1*c2*c1**2)
2847
- - 12*m**3*(a*b3*c2+b*c1*a3+c*a2*b1)
2848
- + 12*m**2*(a*b1*c2**2+a*c1*b3**2+b*a2*c1**2 +
2847
+ - 12*m**3*(a*b3*c2+b*c1*a3+c*a2*b1)
2848
+ + 12*m**2*(a*b1*c2**2+a*c1*b3**2+b*a2*c1**2 +
2849
2849
  b*c2*a3**2+c*b3*a2**2+c*a3*b1**2)
2850
- - 60*m*(a*b1*b3*c1*c2+b*c1*c2*a2*a3+c*a2*a3*b1*b3)
2851
- + 12*m*(a*a2*b3*c2**2+a*a3*c2*b3**2+b*b3*c1*a3**2 +
2850
+ - 60*m*(a*b1*b3*c1*c2+b*c1*c2*a2*a3+c*a2*a3*b1*b3)
2851
+ + 12*m*(a*a2*b3*c2**2+a*a3*c2*b3**2+b*b3*c1*a3**2 +
2852
2852
  b*b1*a3*c1**2+c*c1*a2*b1**2+c*c2*b1*a2**2)
2853
- + 6*(a*b3*c2+b*c1*a3+c*a2*b1)*(a2*b3*c1+a3*b1*c2)
2854
- + 24*(a*b1*b3**2*c1**2+a*c1*c2**2*b1**2+b*c2*c1**2*a2**2
2853
+ + 6*(a*b3*c2+b*c1*a3+c*a2*b1)*(a2*b3*c1+a3*b1*c2)
2854
+ + 24*(a*b1*b3**2*c1**2+a*c1*c2**2*b1**2+b*c2*c1**2*a2**2
2855
2855
  + b*a2*a3**2*c2**2+c*a3*a2**2*b3**2+c*b3*b1**2*a3**2)
2856
- - 12*(a*a2*b1*c2**3+a*a3*c1*b3**3+b*b3*c2*a3**3+b*b1*a2*c1**3
2856
+ - 12*(a*a2*b1*c2**3+a*a3*c1*b3**3+b*b3*c2*a3**3+b*b1*a2*c1**3
2857
2857
  + c*c1*a3*b1**3+c*c2*b3*a2**3)
2858
- - 8*m**6+24*m**4*(b1*c1+c2*a2+a3*b3)-36*m**3*(a2*b3*c1+a3*b1*c2)
2859
- - 12*m**2*(b1*c1*c2*a2+c2*a2*a3*b3+a3*b3*b1*c1)
2860
- - 24*m**2*(b1**2*c1**2+c2**2*a2**2+a3**2*b3**2)
2861
- + 36*m*(a2*b3*c1+a3*b1*c2)*(b1*c1+c2*a2+a3*b3)
2862
- + 8*(b1**3*c1**3+c2**3*a2**3+a3**3*b3**3)
2863
- - 27*(a2**2*b3**2*c1**2+a3**2*b1**2*c2**2)-6*b1*c1*c2*a2*a3*b3
2864
- - 12*(b1**2*c1**2*c2*a2+b1**2*c1**2*a3*b3+c2**2*a2**2*a3*b3 +
2865
- c2**2*a2**2*b1*c1+a3**2*b3**2*b1*c1+a3**2*b3**2*c2*a2) )
2858
+ - 8*m**6+24*m**4*(b1*c1+c2*a2+a3*b3)-36*m**3*(a2*b3*c1+a3*b1*c2)
2859
+ - 12*m**2*(b1*c1*c2*a2+c2*a2*a3*b3+a3*b3*b1*c1)
2860
+ - 24*m**2*(b1**2*c1**2+c2**2*a2**2+a3**2*b3**2)
2861
+ + 36*m*(a2*b3*c1+a3*b1*c2)*(b1*c1+c2*a2+a3*b3)
2862
+ + 8*(b1**3*c1**3+c2**3*a2**3+a3**3*b3**3)
2863
+ - 27*(a2**2*b3**2*c1**2+a3**2*b1**2*c2**2)-6*b1*c1*c2*a2*a3*b3
2864
+ - 12*(b1**2*c1**2*c2*a2+b1**2*c1**2*a3*b3+c2**2*a2**2*a3*b3 +
2865
+ c2**2*a2**2*b1*c1+a3**2*b3**2*b1*c1+a3**2*b3**2*c2*a2))
2866
2866
  return T
2867
2867
 
2868
2868
  @cached_method
@@ -2897,9 +2897,9 @@ class TernaryCubic(AlgebraicForm):
2897
2897
  """
2898
2898
  a30, a03, a00, a21, a20, a12, a02, a10, a01, a11 = self.coeffs()
2899
2899
  if self._homogeneous:
2900
- x,y,z = self.variables()
2900
+ x, y, z = self.variables()
2901
2901
  else:
2902
- x,y,z = (self._x, self._y, 1)
2902
+ x, y, z = (self._x, self._y, 1)
2903
2903
  F = self._ring.base_ring()
2904
2904
  A00 = 3*x*a30 + y*a21 + z*a20
2905
2905
  A11 = x*a12 + 3*y*a03 + z*a02
@@ -2907,8 +2907,7 @@ class TernaryCubic(AlgebraicForm):
2907
2907
  A01 = x*a21 + y*a12 + 1/F(2)*z*a11
2908
2908
  A02 = x*a20 + 1/F(2)*y*a11 + z*a10
2909
2909
  A12 = 1/F(2)*x*a11 + y*a02 + z*a01
2910
- polar = matrix(self._ring, [[A00, A01, A02],[A01, A11, A12],[A02, A12, A22]])
2911
- return polar
2910
+ return matrix(self._ring, [[A00, A01, A02], [A01, A11, A12], [A02, A12, A22]])
2912
2911
 
2913
2912
  @cached_method
2914
2913
  def Hessian(self):
@@ -2943,7 +2942,9 @@ class TernaryCubic(AlgebraicForm):
2943
2942
  Uyy = 2*x*a12 + 6*y*a03 + 2*z*a02
2944
2943
  Uyz = x*a11 + 2*y*a02 + 2*z*a01
2945
2944
  Uzz = 2*x*a10 + 2*y*a01 + 6*z*a00
2946
- H = matrix(self._ring, [[Uxx, Uxy, Uxz],[Uxy, Uyy, Uyz],[Uxz, Uyz, Uzz]])
2945
+ H = matrix(self._ring, [[Uxx, Uxy, Uxz],
2946
+ [Uxy, Uyy, Uyz],
2947
+ [Uxz, Uyz, Uzz]])
2947
2948
  F = self._ring.base_ring()
2948
2949
  return 1/F(216) * H.det()
2949
2950
 
@@ -2971,11 +2972,11 @@ class TernaryCubic(AlgebraicForm):
2971
2972
  6952
2972
2973
  """
2973
2974
  U_conic = self.polar_conic().adjugate()
2974
- U_coeffs = ( U_conic[0,0], U_conic[1,1], U_conic[2,2],
2975
- U_conic[0,1], U_conic[0,2], U_conic[1,2] )
2975
+ U_coeffs = (U_conic[0, 0], U_conic[1, 1], U_conic[2, 2],
2976
+ U_conic[0, 1], U_conic[0, 2], U_conic[1, 2])
2976
2977
  H_conic = TernaryCubic(3, 3, self.Hessian(), self.variables()).polar_conic().adjugate()
2977
- H_coeffs = ( H_conic[0,0], H_conic[1,1], H_conic[2,2],
2978
- H_conic[0,1], H_conic[0,2], H_conic[1,2] )
2978
+ H_coeffs = (H_conic[0, 0], H_conic[1, 1], H_conic[2, 2],
2979
+ H_conic[0, 1], H_conic[0, 2], H_conic[1, 2])
2979
2980
  quadratic = TernaryQuadratic(3, 2, self._ring.zero(), self.variables())
2980
2981
  F = self._ring.base_ring()
2981
2982
  return 1/F(9) * _covariant_conic(U_coeffs, H_coeffs, quadratic.monomials())
@@ -3258,7 +3259,7 @@ class SeveralAlgebraicForms(FormsBase):
3258
3259
  g = random_matrix(F, self._n, algorithm='unimodular')
3259
3260
  v = vector(self.variables())
3260
3261
  g_v = g*v
3261
- transform = dict( (v[i], g_v[i]) for i in range(self._n) )
3262
+ transform = {v[i]: g_v[i] for i in range(self._n)}
3262
3263
  # The covariant of the transformed form
3263
3264
  transformed = [f.transformed(transform) for f in self._forms]
3264
3265
  g_self = self.__class__(transformed)
@@ -4358,9 +4359,9 @@ class InvariantTheoryFactory:
4358
4359
  from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
4359
4360
  K = FractionField(Sequence(list(invariants)).universe())
4360
4361
  if variables is None:
4361
- x,z = PolynomialRing(K, 'x,z').gens()
4362
+ x, z = PolynomialRing(K, 'x,z').gens()
4362
4363
  elif len(variables) == 2:
4363
- x,z = variables
4364
+ x, z = variables
4364
4365
  else:
4365
4366
  raise ValueError('incorrect number of variables provided, '
4366
4367
  'exactly two variables should be provided')
@@ -187,7 +187,7 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
187
187
  If the invariant `M` vanishes, then the coefficients are computed in a
188
188
  different way::
189
189
 
190
- sage: [A,B,C] = [3,1,2]
190
+ sage: A, B, C = 3, 1, 2
191
191
  sage: M = 2*A*B - 3*C
192
192
  sage: M
193
193
  0
@@ -266,7 +266,7 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
266
266
  M = 2*A*B - 3*C
267
267
  N = K(2)**-1 * (A*C-B**2)
268
268
  R2 = -K(2)**-1 * (A*N**2-2*B*M*N+C*M**2)
269
- scale = [1,1,1,1,1,1]
269
+ scale = [1, 1, 1, 1, 1, 1]
270
270
  from sage.arith.misc import binomial
271
271
  from sage.misc.functional import sqrt
272
272
  if len(invariants) == 3:
@@ -275,8 +275,8 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
275
275
  else:
276
276
  # if R2 is not a square, we scale the invariants in a suitable way
277
277
  # so that the 'new' R2 is a square
278
- [A, B, C] = [R2*A, R2**2*B, R2**3*C]
279
- [M, N] = [R2**3*M, R2**4*N]
278
+ A, B, C = R2 * A, R2**2 * B, R2**3 * C
279
+ M, N = R2**3 * M, R2**4 * N
280
280
  R = R2**5
281
281
  elif len(invariants) == 4:
282
282
  if invariants[3]**2 != R2:
@@ -293,17 +293,17 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
293
293
  'quintics with a treefold linear factor')
294
294
  else:
295
295
  if B == 0:
296
- return (1,0,0,0,0,1)
296
+ return (1, 0, 0, 0, 0, 1)
297
297
  else:
298
- return (0,1,0,0,1,0)
298
+ return (0, 1, 0, 0, 1, 0)
299
299
  else:
300
300
  # case corresponding to using alpha and gamma as coordinates
301
301
  if A == 0:
302
- return (1,0,0,0,1,0)
302
+ return (1, 0, 0, 0, 1, 0)
303
303
  else:
304
304
  if scaling == 'normalized':
305
305
  # scaling z by (R/A**3)
306
- scale = [ (-N)**-5*A**6*(R/A**3)**i for i in range(6) ]
306
+ scale = [(-N)**-5*A**6*(R/A**3)**i for i in range(6)]
307
307
  D = -N
308
308
  Delta = C
309
309
  a = [0]
@@ -930,7 +930,7 @@ class OreFunction_with_large_center(OreFunction):
930
930
  (x^6 + 4)^(-1) * (x^3 + 2)
931
931
 
932
932
  By default, the name of the central variable is usually ``z`` (see
933
- :meth:`sage.rings.polynomial.skew_polynomial_ring.SkewPolynomiaRing_finite_order.center`
933
+ :meth:`sage.rings.polynomial.skew_polynomial_ring.SkewPolynomialRing_finite_order.center`
934
934
  for more details about this).
935
935
  However, the user can specify a different variable name if desired::
936
936
 
@@ -907,7 +907,7 @@ cdef class OrePolynomial(AlgebraElement):
907
907
  raise TypeError("the base ring must be a field")
908
908
  cdef OrePolynomial G = self
909
909
  cdef OrePolynomial U = self._parent.one()
910
- cdef OrePolynomial V, V1, V2, Q, R, T
910
+ cdef OrePolynomial V, V1, Q, R, T
911
911
  cdef Morphism m
912
912
  if not other:
913
913
  V = self._parent.zero()
@@ -2569,7 +2569,7 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
2569
2569
  sage: a + a == 2*a
2570
2570
  True
2571
2571
  """
2572
- cdef Py_ssize_t i, min
2572
+ cdef Py_ssize_t i
2573
2573
  cdef list x = (<OrePolynomial_generic_dense>self)._coeffs
2574
2574
  cdef list y = (<OrePolynomial_generic_dense>right)._coeffs
2575
2575
  cdef Py_ssize_t dx = len(x), dy = len(y)
@@ -2600,7 +2600,7 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
2600
2600
  sage: c - c == 0
2601
2601
  True
2602
2602
  """
2603
- cdef Py_ssize_t i, min
2603
+ cdef Py_ssize_t i
2604
2604
  cdef list x = (<OrePolynomial_generic_dense>self)._coeffs
2605
2605
  cdef list y = (<OrePolynomial_generic_dense>right)._coeffs
2606
2606
  cdef Py_ssize_t dx = len(x), dy = len(y)
@@ -2868,7 +2868,6 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
2868
2868
  sage: a.coefficients(sparse=False)
2869
2869
  [t^2 + 1, 0, t + 1, 0, 1]
2870
2870
  """
2871
- zero = self.parent().base_ring().zero()
2872
2871
  if sparse:
2873
2872
  return [c for c in self._coeffs if not c.is_zero()]
2874
2873
  else:
@@ -2876,8 +2875,9 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
2876
2875
 
2877
2876
  def hilbert_shift(self, s, var=None):
2878
2877
  r"""
2879
- Return this Ore polynomial with variable shifted by `s`,
2880
- i.e. if this Ore polynomial is `P(x)`, return `P(x+s)`.
2878
+ Return this Ore polynomial with variable shifted by `s`.
2879
+
2880
+ If this Ore polynomial is `P(x)`, this returns `P(x+s)`.
2881
2881
 
2882
2882
  INPUT:
2883
2883
 
@@ -2952,9 +2952,9 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
2952
2952
  if var is None:
2953
2953
  var = parent.variable_name()
2954
2954
  if derivation is None:
2955
- S = OrePolynomialRing(k, morphism, var)
2955
+ S = OrePolynomialRing(k, morphism, var, polcast=False)
2956
2956
  else:
2957
- S = OrePolynomialRing(k, derivation, var)
2957
+ S = OrePolynomialRing(k, derivation, var, polcast=False)
2958
2958
  if not self:
2959
2959
  return S.zero()
2960
2960
  X = S.gen() + s