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
@@ -17,7 +17,6 @@ from cysignals.signals cimport sig_check
17
17
  cimport sage.matrix.matrix as matrix
18
18
  cimport sage.matrix.matrix0 as matrix0
19
19
  from sage.categories.rings import Rings
20
- from sage.calculus.functional import derivative
21
20
  from sage.structure.element cimport Element, Vector
22
21
  from sage.structure.richcmp cimport richcmp_item, rich_to_bool
23
22
 
@@ -937,18 +936,18 @@ cdef class Matrix_sparse(matrix.Matrix):
937
936
 
938
937
  cdef Py_ssize_t nrows, ncols, k, i, j
939
938
 
940
- ncols = PyList_GET_SIZE(columns)
941
- nrows = PyList_GET_SIZE(rows)
939
+ ncols = len(columns)
940
+ nrows = len(rows)
942
941
  cdef Matrix_sparse A = self.new_matrix(nrows=nrows, ncols=ncols)
943
942
 
944
943
  tmp = [el for el in columns if 0 <= el < self._ncols]
945
944
  columns = tmp
946
- if ncols != PyList_GET_SIZE(columns):
945
+ if ncols != len(columns):
947
946
  raise IndexError("column index out of range")
948
947
 
949
948
  tmp = [el for el in rows if 0 <= el < self._nrows]
950
949
  rows = tmp
951
- if nrows != PyList_GET_SIZE(rows):
950
+ if nrows != len(rows):
952
951
  raise IndexError("row index out of range")
953
952
 
954
953
  row_map = {}
@@ -1151,7 +1150,7 @@ cdef class Matrix_sparse(matrix.Matrix):
1151
1150
  sage: (v * m).parent() is m.row(0).parent()
1152
1151
  True
1153
1152
  """
1154
- cdef int i, j
1153
+ cdef Py_ssize_t i, j
1155
1154
  if self._nrows != v._degree:
1156
1155
  raise ArithmeticError("number of rows of matrix must equal degree of vector")
1157
1156
  parent = self.row_ambient_module(base_ring=None, sparse=v.is_sparse_c())
@@ -1204,7 +1203,7 @@ cdef class Matrix_sparse(matrix.Matrix):
1204
1203
  sage: M*w
1205
1204
  (x*y)
1206
1205
  """
1207
- cdef int i, j
1206
+ cdef Py_ssize_t i, j
1208
1207
  if self._ncols != v._degree:
1209
1208
  raise ArithmeticError("number of columns of matrix must equal degree of vector")
1210
1209
  parent = self.column_ambient_module(base_ring=None, sparse=v.is_sparse_c())
@@ -67,8 +67,8 @@ cdef class MatrixWindow:
67
67
  a = self._matrix.new_matrix(nrows, ncols)
68
68
  return self.new_matrix_window(a, 0, 0, nrows, ncols)
69
69
 
70
- def __repr__(self):
71
- return "Matrix window of size %s x %s at (%s,%s):\n%s"%(
70
+ def __repr__(self) -> str:
71
+ return "Matrix window of size %s x %s at (%s,%s):\n%s" % (
72
72
  self._nrows, self._ncols, self._row, self._col, self._matrix)
73
73
 
74
74
  ############################
Binary file
@@ -15,8 +15,6 @@ This module implements general operation tables, which are very matrix-like.
15
15
  # https://www.gnu.org/licenses/
16
16
  # ****************************************************************************
17
17
 
18
- from copy import copy
19
-
20
18
  from sage.structure.sage_object import SageObject
21
19
  from sage.matrix.constructor import Matrix
22
20
 
sage/matrix/special.py CHANGED
@@ -3013,6 +3013,10 @@ def random_unimodular_matrix(parent, upper_bound=None, max_tries=100):
3013
3013
  sage: y = polygen(ZZ, 'y')
3014
3014
  sage: K = NumberField(y^2 - 2*y - 2, 'y')
3015
3015
  sage: C = random_matrix(K, 3, algorithm='unimodular')
3016
+ sage: C # random
3017
+ [ -1/7*y + 47/35 3/5*y - 127/70 -2917/70*y + 4419/70]
3018
+ [ 1 1/2*y - 1/2 -104/3*y + 211/6]
3019
+ [ 1/3*y - 1/3 y - 1 -35/6*y - 149/6]
3016
3020
  sage: det(C)
3017
3021
  1
3018
3022
  sage: C.base_ring() is K
@@ -3130,7 +3134,7 @@ def random_diagonalizable_matrix(parent, eigenvalues=None, dimensions=None):
3130
3134
  sage: M = random_matrix(K, 3, 3, algorithm="diagonalizable")
3131
3135
  sage: M.parent()
3132
3136
  Full MatrixSpace of 3 by 3 dense matrices over Finite Field of size 3
3133
- sage: M.is_diagonalizable()
3137
+ sage: M.is_diagonalizable() # needs sage.libs.pari
3134
3138
  True
3135
3139
  sage: M # random
3136
3140
  [0 0 1]
Binary file
sage/matrix/strassen.pyx CHANGED
@@ -806,7 +806,7 @@ def test(n, m, R, c=2):
806
806
 
807
807
  # TODO -- the doctests below are currently not
808
808
  # tested/enabled/working -- enable them when linear algebra
809
- # restructing gets going.
809
+ # restructuring gets going.
810
810
 
811
811
  # sage: dim1 = 64; dim2 = 83; dim3 = 101
812
812
  # sage: R = MatrixSpace(QQ, dim1, dim2)
@@ -188,25 +188,25 @@ class ChowRing(QuotientRing_generic):
188
188
 
189
189
  sage: ch = matroids.Uniform(3, 6).chow_ring(QQ, True, 'fy')
190
190
  sage: ch.basis()
191
- Family (1, B1, B1*B012345, B0, B0*B012345, B01, B01^2, B2,
192
- B2*B012345, B02, B02^2, B12, B12^2, B3, B3*B012345, B03, B03^2,
193
- B13, B13^2, B23, B23^2, B4, B4*B012345, B04, B04^2, B14, B14^2,
194
- B24, B24^2, B34, B34^2, B5, B5*B012345, B05, B05^2, B15, B15^2,
195
- B25, B25^2, B35, B35^2, B45, B45^2, B012345, B012345^2, B012345^3)
191
+ Family (1, B0, B0*B012345, B1, B1*B012345, B01, B01^2, B2,
192
+ B2*B012345, B12, B12^2, B02, B02^2, B3, B3*B012345, B23, B23^2,
193
+ B13, B13^2, B03, B03^2, B4, B4*B012345, B34, B34^2, B24, B24^2,
194
+ B14, B14^2, B04, B04^2, B5, B5*B012345, B45, B45^2, B35, B35^2,
195
+ B25, B25^2, B15, B15^2, B05, B05^2, B012345, B012345^2, B012345^3)
196
196
  sage: set(ch.defining_ideal().normal_basis()) == set(ch.basis())
197
197
  True
198
198
  sage: ch = matroids.catalog.Fano().chow_ring(QQ, False)
199
199
  sage: ch.basis()
200
- Family (1, Abcd, Aace, Aabf, Adef, Aadg, Abeg, Acfg, Aabcdefg,
201
- Aabcdefg^2)
200
+ Family (1, Abcd, Aace, Adef, Aabf, Acfg, Abeg, Aadg, Aabcdefg,
201
+ Aabcdefg^2)
202
202
  sage: set(ch.defining_ideal().normal_basis()) == set(ch.basis())
203
203
  True
204
204
  sage: ch = matroids.Wheel(3).chow_ring(QQ, True, 'atom-free')
205
205
  sage: ch.basis()
206
- Family (1, A0, A0*A012345, A2, A2*A012345, A3, A3*A012345, A23,
207
- A23^2, A1, A1*A012345, A013, A013^2, A4, A4*A012345, A04, A04^2,
208
- A124, A124^2, A5, A5*A012345, A025, A025^2, A15, A15^2, A345,
209
- A345^2, A012345, A012345^2, A012345^3)
206
+ Family (1, A0, A0*A012345, A1, A1*A012345, A2, A2*A012345, A3,
207
+ A3*A012345, A23, A23^2, A013, A013^2, A4, A4*A012345, A124, A124^2,
208
+ A04, A04^2, A5, A5*A012345, A345, A345^2, A15, A15^2, A025, A025^2,
209
+ A012345, A012345^2, A012345^3)
210
210
  sage: set(ch.defining_ideal().normal_basis()) == set(ch.basis())
211
211
  True
212
212
  """
@@ -247,12 +247,14 @@ class ChowRing(QuotientRing_generic):
247
247
  ....: basis_deg[deg].append(b)
248
248
  ....:
249
249
  sage: basis_deg
250
- {0: [1], 1: [A02, A12, A01, A012, A03, A13, A013, A23, A023,
251
- A123, A04, A14, A014, A24, A024, A124, A34, A034, A134, A234,
252
- A01234], 2: [A02*A01234, A12*A01234, A01*A01234, A012^2,
253
- A03*A01234, A13*A01234, A013^2, A23*A01234, A023^2, A123^2,
254
- A04*A01234, A14*A01234, A014^2, A24*A01234, A024^2, A124^2,
255
- A34*A01234, A034^2, A134^2, A234^2, A01234^2], 3: [A01234^3]}
250
+ {0: [1],
251
+ 1: [A01, A12, A02, A012, A23, A13, A123, A03, A013, A023, A34, A24,
252
+ A234, A14, A124, A134, A04, A014, A024, A034, A01234],
253
+ 2: [A01*A01234, A12*A01234, A02*A01234, A012^2, A23*A01234,
254
+ A13*A01234, A123^2, A03*A01234, A013^2, A023^2, A34*A01234,
255
+ A24*A01234, A234^2, A14*A01234, A124^2, A134^2, A04*A01234,
256
+ A014^2, A024^2, A034^2, A01234^2],
257
+ 3: [A01234^3]}
256
258
  sage: g_eq_maps = {}
257
259
  sage: lefschetz_el = ch.lefschetz_element(); lefschetz_el
258
260
  -2*A01 - 2*A02 - 2*A03 - 2*A04 - 2*A12 - 2*A13 - 2*A14 - 2*A23
@@ -264,37 +266,38 @@ class ChowRing(QuotientRing_generic):
264
266
  ....: g_eq_maps[deg].extend([i*lefschetz_el for i in basis_deg[deg]])
265
267
  ....:
266
268
  sage: g_eq_maps
267
- {0: [-2*A01 - 2*A02 - 2*A03 - 2*A04 - 2*A12 - 2*A13 - 2*A14
268
- - 2*A23 - 2*A24 - 2*A34 - 6*A012 - 6*A013 - 6*A014 - 6*A023
269
- - 6*A024 - 6*A034 - 6*A123 - 6*A124 - 6*A134 - 6*A234
270
- - 20*A01234], 1: [2*A012^2 + 2*A023^2 + 2*A024^2
271
- - 10*A02*A01234 + 2*A01234^2, 2*A012^2 + 2*A123^2 + 2*A124^2
272
- - 10*A12*A01234 + 2*A01234^2, 2*A012^2 + 2*A013^2 + 2*A014^2
273
- - 10*A01*A01234 + 2*A01234^2, -6*A012^2 + 2*A01*A01234
274
- + 2*A02*A01234 + 2*A12*A01234, 2*A013^2 + 2*A023^2 + 2*A034^2
275
- - 10*A03*A01234 + 2*A01234^2, 2*A013^2 + 2*A123^2 + 2*A134^2
276
- - 10*A13*A01234 + 2*A01234^2, -6*A013^2 + 2*A01*A01234
277
- + 2*A03*A01234 + 2*A13*A01234, 2*A023^2 + 2*A123^2 + 2*A234^2
278
- - 10*A23*A01234 + 2*A01234^2, -6*A023^2 + 2*A02*A01234
279
- + 2*A03*A01234 + 2*A23*A01234, -6*A123^2 + 2*A12*A01234
280
- + 2*A13*A01234 + 2*A23*A01234, 2*A014^2 + 2*A024^2 + 2*A034^2
281
- - 10*A04*A01234 + 2*A01234^2, 2*A014^2 + 2*A124^2 + 2*A134^2
282
- - 10*A14*A01234 + 2*A01234^2, -6*A014^2 + 2*A01*A01234
283
- + 2*A04*A01234 + 2*A14*A01234, 2*A024^2 + 2*A124^2 + 2*A234^2
284
- - 10*A24*A01234 + 2*A01234^2, -6*A024^2 + 2*A02*A01234
285
- + 2*A04*A01234 + 2*A24*A01234, -6*A124^2 + 2*A12*A01234
286
- + 2*A14*A01234 + 2*A24*A01234, 2*A034^2 + 2*A134^2 + 2*A234^2
287
- - 10*A34*A01234 + 2*A01234^2, -6*A034^2 + 2*A03*A01234
288
- + 2*A04*A01234 + 2*A34*A01234, -6*A134^2 + 2*A13*A01234
289
- + 2*A14*A01234 + 2*A34*A01234, -6*A234^2 + 2*A23*A01234
290
- + 2*A24*A01234 + 2*A34*A01234, -2*A01*A01234 - 2*A02*A01234
291
- - 2*A03*A01234 - 2*A04*A01234 - 2*A12*A01234 - 2*A13*A01234
292
- - 2*A14*A01234 - 2*A23*A01234 - 2*A24*A01234 - 2*A34*A01234
293
- - 20*A01234^2], 2: [2*A01234^3, 2*A01234^3, 2*A01234^3,
294
- 6*A01234^3, 2*A01234^3, 2*A01234^3, 6*A01234^3, 2*A01234^3,
295
- 6*A01234^3, 6*A01234^3, 2*A01234^3, 2*A01234^3, 6*A01234^3,
296
- 2*A01234^3, 6*A01234^3, 6*A01234^3, 2*A01234^3, 6*A01234^3,
297
- 6*A01234^3, 6*A01234^3, -20*A01234^3], 3: [0]}
269
+ {0: [-2*A01 - 2*A02 - 2*A03 - 2*A04 - 2*A12 - 2*A13 - 2*A14 - 2*A23
270
+ - 2*A24 - 2*A34 - 6*A012 - 6*A013 - 6*A014 - 6*A023 - 6*A024
271
+ - 6*A034 - 6*A123 - 6*A124 - 6*A134 - 6*A234 - 20*A01234],
272
+ 1: [2*A012^2 + 2*A013^2 + 2*A014^2 - 10*A01*A01234 + 2*A01234^2,
273
+ 2*A012^2 + 2*A123^2 + 2*A124^2 - 10*A12*A01234 + 2*A01234^2,
274
+ 2*A012^2 + 2*A023^2 + 2*A024^2 - 10*A02*A01234 + 2*A01234^2,
275
+ -6*A012^2 + 2*A01*A01234 + 2*A02*A01234 + 2*A12*A01234,
276
+ 2*A023^2 + 2*A123^2 + 2*A234^2 - 10*A23*A01234 + 2*A01234^2,
277
+ 2*A013^2 + 2*A123^2 + 2*A134^2 - 10*A13*A01234 + 2*A01234^2,
278
+ -6*A123^2 + 2*A12*A01234 + 2*A13*A01234 + 2*A23*A01234,
279
+ 2*A013^2 + 2*A023^2 + 2*A034^2 - 10*A03*A01234 + 2*A01234^2,
280
+ -6*A013^2 + 2*A01*A01234 + 2*A03*A01234 + 2*A13*A01234,
281
+ -6*A023^2 + 2*A02*A01234 + 2*A03*A01234 + 2*A23*A01234,
282
+ 2*A034^2 + 2*A134^2 + 2*A234^2 - 10*A34*A01234 + 2*A01234^2,
283
+ 2*A024^2 + 2*A124^2 + 2*A234^2 - 10*A24*A01234 + 2*A01234^2,
284
+ -6*A234^2 + 2*A23*A01234 + 2*A24*A01234 + 2*A34*A01234,
285
+ 2*A014^2 + 2*A124^2 + 2*A134^2 - 10*A14*A01234 + 2*A01234^2,
286
+ -6*A124^2 + 2*A12*A01234 + 2*A14*A01234 + 2*A24*A01234,
287
+ -6*A134^2 + 2*A13*A01234 + 2*A14*A01234 + 2*A34*A01234,
288
+ 2*A014^2 + 2*A024^2 + 2*A034^2 - 10*A04*A01234 + 2*A01234^2,
289
+ -6*A014^2 + 2*A01*A01234 + 2*A04*A01234 + 2*A14*A01234,
290
+ -6*A024^2 + 2*A02*A01234 + 2*A04*A01234 + 2*A24*A01234,
291
+ -6*A034^2 + 2*A03*A01234 + 2*A04*A01234 + 2*A34*A01234,
292
+ -2*A01*A01234 - 2*A02*A01234 - 2*A03*A01234 - 2*A04*A01234
293
+ - 2*A12*A01234 - 2*A13*A01234 - 2*A14*A01234 - 2*A23*A01234
294
+ - 2*A24*A01234 - 2*A34*A01234 - 20*A01234^2],
295
+ 2: [2*A01234^3, 2*A01234^3, 2*A01234^3, 6*A01234^3, 2*A01234^3,
296
+ 2*A01234^3, 6*A01234^3, 2*A01234^3, 6*A01234^3, 6*A01234^3,
297
+ 2*A01234^3, 2*A01234^3, 6*A01234^3, 2*A01234^3, 6*A01234^3,
298
+ 6*A01234^3, 2*A01234^3, 6*A01234^3, 6*A01234^3, 6*A01234^3,
299
+ -20*A01234^3],
300
+ 3: [0]}
298
301
  """
299
302
  w = sum(len(F) * (len(self.matroid().groundset()) - len(F)) * gen
300
303
  for F, gen in self.defining_ideal().flats_to_generator_dict().items())
@@ -338,7 +341,7 @@ class ChowRing(QuotientRing_generic):
338
341
  sage: v = ch.an_element(); v
339
342
  -A01 - A02 - A03 - A04 - A05 - A012345
340
343
  sage: v.to_vector()
341
- (0, -1, -1, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0)
344
+ (0, -1, 0, -1, 0, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, -1, -1, 0)
342
345
  """
343
346
  P = self.parent()
344
347
  B = P.basis()
@@ -379,20 +382,20 @@ class ChowRing(QuotientRing_generic):
379
382
  ....: print(b, b.degree())
380
383
  1 0
381
384
  A01 1
382
- A02 1
383
385
  A12 1
384
- A03 1
385
- A13 1
386
+ A02 1
386
387
  A23 1
387
- A04 1
388
- A14 1
389
- A24 1
388
+ A13 1
389
+ A03 1
390
390
  A34 1
391
- A05 1
392
- A15 1
393
- A25 1
394
- A35 1
391
+ A24 1
392
+ A14 1
393
+ A04 1
395
394
  A45 1
395
+ A35 1
396
+ A25 1
397
+ A15 1
398
+ A05 1
396
399
  A012345 1
397
400
  A012345^2 2
398
401
  sage: v = sum(ch.basis())
@@ -428,18 +431,18 @@ class ChowRing(QuotientRing_generic):
428
431
  Bace^2 2
429
432
  Bf 1
430
433
  Bf*Babcdefg 2
431
- Babf 1
432
- Babf^2 2
433
434
  Bdef 1
434
435
  Bdef^2 2
436
+ Babf 1
437
+ Babf^2 2
435
438
  Bg 1
436
439
  Bg*Babcdefg 2
437
- Badg 1
438
- Badg^2 2
439
- Bbeg 1
440
- Bbeg^2 2
441
440
  Bcfg 1
442
441
  Bcfg^2 2
442
+ Bbeg 1
443
+ Bbeg^2 2
444
+ Badg 1
445
+ Badg^2 2
443
446
  Babcdefg 1
444
447
  Babcdefg^2 2
445
448
  Babcdefg^3 3
@@ -17,12 +17,13 @@ AUTHORS:
17
17
  # https://www.gnu.org/licenses/
18
18
  # ****************************************************************************
19
19
 
20
- from sage.rings.polynomial.multi_polynomial_ideal import MPolynomialIdeal
20
+ from itertools import product
21
+
22
+ from sage.combinat.posets.posets import Poset
21
23
  from sage.matroids.utilities import cmp_elements_key
22
- from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
24
+ from sage.rings.polynomial.multi_polynomial_ideal import MPolynomialIdeal
23
25
  from sage.rings.polynomial.multi_polynomial_sequence import PolynomialSequence
24
- from sage.combinat.posets.posets import Poset
25
- from itertools import product
26
+ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
26
27
 
27
28
 
28
29
  class ChowRingIdeal(MPolynomialIdeal):
@@ -39,7 +40,7 @@ class ChowRingIdeal(MPolynomialIdeal):
39
40
  """
40
41
  return self._matroid
41
42
 
42
- def _lattice_flats(self):
43
+ def _lattice_flats(self) -> tuple:
43
44
  r"""
44
45
  Return the ranks and chains of lattice of flats of the matroid.
45
46
 
@@ -67,7 +68,7 @@ class ChowRingIdeal(MPolynomialIdeal):
67
68
  chains = lattice_flats.chains() # Only chains
68
69
  return (ranks, chains)
69
70
 
70
- def flats_to_generator_dict(self):
71
+ def flats_to_generator_dict(self) -> dict:
71
72
  r"""
72
73
  Return the corresponding generators of flats/groundset elements of
73
74
  Chow ring ideal.
@@ -148,7 +149,7 @@ class ChowRingIdeal_nonaug(ChowRingIdeal):
148
149
  Chow ring ideal of Fano: Binary matroid of rank 3 on 7 elements,
149
150
  type (3, 0) - non augmented
150
151
  """
151
- def __init__(self, M, R):
152
+ def __init__(self, M, R) -> None:
152
153
  r"""
153
154
  Initialize ``self``.
154
155
 
@@ -169,7 +170,7 @@ class ChowRingIdeal_nonaug(ChowRingIdeal):
169
170
  self._flats_generator = dict(zip(flats, gens))
170
171
  MPolynomialIdeal.__init__(self, poly_ring, self._gens_constructor(poly_ring))
171
172
 
172
- def _gens_constructor(self, poly_ring):
173
+ def _gens_constructor(self, poly_ring) -> list:
173
174
  r"""
174
175
  Return the generators of ``self``.
175
176
 
@@ -217,7 +218,7 @@ class ChowRingIdeal_nonaug(ChowRingIdeal):
217
218
  J = list(atoms_gen.values()) # Linear generators
218
219
  return I + J
219
220
 
220
- def _repr_(self):
221
+ def _repr_(self) -> str:
221
222
  r"""
222
223
  Return a string representation of ``self``.
223
224
 
@@ -230,7 +231,7 @@ class ChowRingIdeal_nonaug(ChowRingIdeal):
230
231
  """
231
232
  return "Chow ring ideal of {} - non augmented".format(self._matroid)
232
233
 
233
- def _latex_(self):
234
+ def _latex_(self) -> str:
234
235
  r"""
235
236
  Return a LaTeX representation of ``self``.
236
237
 
@@ -273,7 +274,7 @@ class ChowRingIdeal_nonaug(ChowRingIdeal):
273
274
  algorithm = 'constructed'
274
275
  if algorithm != 'constructed':
275
276
  return super().groebner_basis(algorithm=algorithm, *args, **kwargs)
276
- flats = sorted(list(self._flats_generator), key=len)
277
+ flats = sorted(self._flats_generator, key=len)
277
278
  ranks = {F: self._matroid.rank(F) for F in flats}
278
279
  gb = []
279
280
  R = self.ring()
@@ -291,7 +292,7 @@ class ChowRingIdeal_nonaug(ChowRingIdeal):
291
292
  term += flats_gen[G]
292
293
  for G in lattice_flats.order_ideal([F]):
293
294
  if G != F:
294
- gb.append(flats_gen[G]*(term) ** (ranks[F] - ranks[G]))
295
+ gb.append(flats_gen[G] * (term) ** (ranks[F] - ranks[G]))
295
296
 
296
297
  gb.append(term ** ranks[F])
297
298
 
@@ -306,14 +307,15 @@ class ChowRingIdeal_nonaug(ChowRingIdeal):
306
307
  sage: ch = matroids.Z(3).chow_ring(QQ, False)
307
308
  sage: I = ch.defining_ideal()
308
309
  sage: I.normal_basis()
309
- [1, Ax2x3y1, Ax1x3y2, Ax1x2y3, Ay1y2y3, Atx1y1, Atx2y2, Atx3y3, Atx1x2x3y1y2y3, Atx1x2x3y1y2y3^2]
310
+ [1, Ax2x3y1, Ax1x3y2, Ay1y2y3, Ax1x2y3, Atx3y3, Atx2y2, Atx1y1,
311
+ Atx1x2x3y1y2y3, Atx1x2x3y1y2y3^2]
310
312
  sage: set(I.gens().ideal().normal_basis()) == set(I.normal_basis())
311
313
  True
312
314
  sage: ch = matroids.AG(2,3).chow_ring(QQ, False)
313
315
  sage: I = ch.defining_ideal()
314
316
  sage: I.normal_basis()
315
- [1, A012, A236, A046, A156, A345, A247, A057, A137, A258, A678,
316
- A038, A148, A012345678, A012345678^2]
317
+ [1, A012, A345, A236, A156, A046, A247, A137, A057, A678, A258,
318
+ A148, A038, A012345678, A012345678^2]
317
319
  sage: set(I.gens().ideal().normal_basis()) == set(I.normal_basis())
318
320
  True
319
321
  """
@@ -421,7 +423,7 @@ class AugmentedChowRingIdeal_fy(ChowRingIdeal):
421
423
  Augmented Chow ring ideal of Wheel(3): Regular matroid of rank 3 on 6
422
424
  elements with 16 bases of Feitchner-Yuzvinsky presentation
423
425
  """
424
- def __init__(self, M, R):
426
+ def __init__(self, M, R) -> None:
425
427
  r"""
426
428
  Initialize ``self``.
427
429
 
@@ -451,7 +453,7 @@ class AugmentedChowRingIdeal_fy(ChowRingIdeal):
451
453
  self._flats_containing[x].append(F)
452
454
  MPolynomialIdeal.__init__(self, poly_ring, self._gens_constructor(poly_ring))
453
455
 
454
- def _gens_constructor(self, poly_ring):
456
+ def _gens_constructor(self, poly_ring) -> list:
455
457
  r"""
456
458
  Return the generators of ``self``.
457
459
 
@@ -489,12 +491,13 @@ class AugmentedChowRingIdeal_fy(ChowRingIdeal):
489
491
  A4*B, A3*B, A2*B, A1*B, A0*B]
490
492
  """
491
493
  E = list(self._matroid.groundset())
492
- Q = []
493
494
  L = []
494
495
  lattice_flats = Poset((self._flats, lambda x, y: x <= y))
495
496
  antichains = lattice_flats.antichains().elements_of_depth_iterator(2)
496
- for F, G in antichains:
497
- Q.append(self._flats_generator[F] * self._flats_generator[G]) # Quadratic generators
497
+
498
+ # Quadratic generators
499
+ Q = [self._flats_generator[F] * self._flats_generator[G]
500
+ for F, G in antichains]
498
501
 
499
502
  for x in E:
500
503
  term = poly_ring.zero()
@@ -509,7 +512,7 @@ class AugmentedChowRingIdeal_fy(ChowRingIdeal):
509
512
  L.append(term1)
510
513
  return Q + L
511
514
 
512
- def _repr_(self):
515
+ def _repr_(self) -> str:
513
516
  r"""
514
517
  EXAMPLES::
515
518
 
@@ -520,7 +523,7 @@ class AugmentedChowRingIdeal_fy(ChowRingIdeal):
520
523
  """
521
524
  return "Augmented Chow ring ideal of {} of Feitchner-Yuzvinsky presentation".format(self._matroid)
522
525
 
523
- def _latex_(self):
526
+ def _latex_(self) -> str:
524
527
  r"""
525
528
  Return a LaTeX representation of ``self``.
526
529
 
@@ -555,11 +558,12 @@ class AugmentedChowRingIdeal_fy(ChowRingIdeal):
555
558
  gb = [] # reduced groebner basis with two eliminated cases
556
559
  E = list(self._matroid.groundset())
557
560
  poly_ring = self.ring()
558
- reln = lambda x,y: x <= y
559
- lattice_flats = Poset((self._flats, reln))
561
+
562
+ lattice_flats = Poset((self._flats, lambda x, y: x <= y))
560
563
  antichains = lattice_flats.antichains().elements_of_depth_iterator(2)
561
564
  for F, G in antichains:
562
- gb.append(self._flats_generator[F] * self._flats_generator[G]) # non-nested flats
565
+ # non-nested flats
566
+ gb.append(self._flats_generator[F] * self._flats_generator[G])
563
567
  for i in E:
564
568
  term = poly_ring.zero()
565
569
  for H in self._flats_containing[i]:
@@ -576,7 +580,7 @@ class AugmentedChowRingIdeal_fy(ChowRingIdeal):
576
580
  order_ideal_modified = lattice_flats.order_ideal([F])
577
581
  order_ideal_modified.remove(F)
578
582
  for G in order_ideal_modified: # nested flats
579
- gb.append(self._flats_generator[G]*term1**(self._matroid.rank(F) - self._matroid.rank(G)))
583
+ gb.append(self._flats_generator[G] * term1**(self._matroid.rank(F) - self._matroid.rank(G)))
580
584
 
581
585
  return PolynomialSequence(poly_ring, [gb])
582
586
 
@@ -612,10 +616,9 @@ class AugmentedChowRingIdeal_fy(ChowRingIdeal):
612
616
  monomial_basis.append(R.one())
613
617
  else:
614
618
  k = len(subset)
615
- max_powers = []
616
- max_powers.append(ranks[subset[0]])
617
- for i in range(1, k):
618
- max_powers.append(ranks[subset[i]] - ranks[subset[i-1]])
619
+ max_powers = [ranks[subset[0]]]
620
+ max_powers.extend(ranks[subset[i]] - ranks[subset[i - 1]]
621
+ for i in range(1, k))
619
622
  ranges = [range(1, p) for p in max_powers]
620
623
  ranges[0] = range(1, max_powers[0] + 1)
621
624
  for combination in product(*(r for r in ranges)):
@@ -675,7 +678,7 @@ class AugmentedChowRingIdeal_atom_free(ChowRingIdeal):
675
678
  Augmented Chow ring ideal of Wheel(3): Regular matroid of rank 3 on 6
676
679
  elements with 16 bases in the atom-free presentation
677
680
  """
678
- def __init__(self, M, R):
681
+ def __init__(self, M, R) -> None:
679
682
  r"""
680
683
  Initialize ``self``.
681
684
 
@@ -696,7 +699,7 @@ class AugmentedChowRingIdeal_atom_free(ChowRingIdeal):
696
699
  self._flats_generator = dict(zip(self._flats, gens))
697
700
  MPolynomialIdeal.__init__(self, poly_ring, self._gens_constructor(poly_ring))
698
701
 
699
- def _gens_constructor(self, poly_ring):
702
+ def _gens_constructor(self, poly_ring) -> list:
700
703
  r"""
701
704
  Return the generators of ``self``.
702
705
 
@@ -715,8 +718,7 @@ class AugmentedChowRingIdeal_atom_free(ChowRingIdeal):
715
718
  for F in self._flats:
716
719
  for x in F:
717
720
  flats_containing[x].append(F)
718
- reln = lambda x,y: x <= y
719
- lattice_flats = Poset((self._flats, reln))
721
+ lattice_flats = Poset((self._flats, lambda x, y: x <= y))
720
722
  antichains = lattice_flats.antichains().elements_of_depth_iterator(2)
721
723
  for F, G in antichains:
722
724
  Q.append(self._flats_generator[F] * self._flats_generator[G])
@@ -728,11 +730,12 @@ class AugmentedChowRingIdeal_atom_free(ChowRingIdeal):
728
730
  if term**2 not in Q:
729
731
  Q.append(term**2)
730
732
 
731
- if F not in flats_containing[x]: # generators for every set of flats not containing element
732
- Q.append(self._flats_generator[F]*term)
733
+ if F not in flats_containing[x]:
734
+ # generators for every set of flats not containing element
735
+ Q.append(self._flats_generator[F] * term)
733
736
  return Q
734
737
 
735
- def _repr_(self):
738
+ def _repr_(self) -> str:
736
739
  r"""
737
740
  EXAMPLES::
738
741
 
@@ -743,7 +746,7 @@ class AugmentedChowRingIdeal_atom_free(ChowRingIdeal):
743
746
  """
744
747
  return "Augmented Chow ring ideal of {} in the atom-free presentation".format(self._matroid)
745
748
 
746
- def _latex_(self):
749
+ def _latex_(self) -> str:
747
750
  r"""
748
751
  Return the LaTeX output of the ring and generators of ``self``.
749
752
 
@@ -2142,7 +2142,7 @@ def Z(r, t=True, groundset=None):
2142
2142
  Id = Matrix(GF(2), identity_matrix(r))
2143
2143
  J = Matrix(GF(2), ones_matrix(r))
2144
2144
  tip = Matrix(GF(2), ones_matrix(r, 1))
2145
- A = Id.augment(J-Id).augment(tip)
2145
+ A = Id.augment(J - Id).augment(tip)
2146
2146
 
2147
2147
  M = Matroid(A)
2148
2148
  X = [f'x{i}' for i in range(1, r + 1)]
@@ -2259,7 +2259,7 @@ def Spike(r, t=True, C3=[], groundset=None):
2259
2259
  else:
2260
2260
  for S in C3:
2261
2261
  for xy in S:
2262
- if xy not in X+Y:
2262
+ if xy not in X + Y:
2263
2263
  raise ValueError(
2264
2264
  "The sets in C3 must contain elements xi and yi only."
2265
2265
  )
@@ -2431,13 +2431,13 @@ def Psi(r, groundset=None):
2431
2431
  for i in range(0, r):
2432
2432
  for k in range(1, r - 2):
2433
2433
  I0 = [f'a{i}', f'b{i}']
2434
- IK = [f'a{(i+k) % r}', f'b{(i+k) % r}']
2434
+ IK = [f'a{(i + k) % r}', f'b{(i + k) % r}']
2435
2435
  for AB in generate_binary_strings(k - 1):
2436
2436
  C = []
2437
2437
  C += I0 + IK
2438
2438
  j = 1
2439
2439
  for z in AB:
2440
- C += [f'{z}{(i+j) % r}']
2440
+ C += [f'{z}{(i + j) % r}']
2441
2441
  j += 1
2442
2442
  NSC += [C]
2443
2443
 
@@ -5104,6 +5104,17 @@ def BetsyRoss(groundset=None):
5104
5104
  'cjk', 'dfk', 'dgh', 'dij', 'efj', 'egk', 'ehi']
5105
5105
  M = Matroid(rank=3, nonspanning_circuits=NSC)
5106
5106
  M = _rename_and_relabel(M, "BetsyRoss", groundset)
5107
+ pos = {'a': (0, 1.61000000000000),
5108
+ 'c': (0.946334256190882, -1.30251736094367),
5109
+ 'b': (1.53120099123520, 0.497517360943665),
5110
+ 'e': (-1.53120099123520, 0.497517360943665),
5111
+ 'd': (-0.946334256190882, -1.30251736094367),
5112
+ 'g': (0.590718333102580, -0.191936021350899),
5113
+ 'f': (0.365084007635076, 0.502495027562079),
5114
+ 'i': (-0.590718333102580, -0.191936021350899),
5115
+ 'h': (0, -0.621118012422360),
5116
+ 'k': (0, 0), 'j': (-0.365084007635076, 0.502495027562079)}
5117
+ M._fix_positions(pos_dict=pos)
5107
5118
  return M
5108
5119
 
5109
5120
 
@@ -5322,6 +5333,6 @@ def _rename_and_relabel(M, name=None, groundset=None):
5322
5333
  M = M.relabel(dict(zip(M.groundset(), groundset)))
5323
5334
 
5324
5335
  if name is not None:
5325
- M.rename(name+": " + repr(M))
5336
+ M.rename(name + ": " + repr(M))
5326
5337
 
5327
5338
  return M
@@ -333,8 +333,8 @@ class DualMatroid(Matroid):
333
333
  EXAMPLES::
334
334
 
335
335
  sage: M = matroids.catalog.Vamos().dual()
336
- sage: N = M._minor(contractions=set(['a']), deletions=set([]))
337
- sage: N._minor(contractions=set([]), deletions=set(['b', 'c']))
336
+ sage: N = M._minor(contractions=set(['a']), deletions=set())
337
+ sage: N._minor(contractions=set(), deletions=set(['b', 'c']))
338
338
  Dual of 'M / {'b', 'c'} \ {'a'}, where M is Vamos:
339
339
  Matroid of rank 4 on 8 elements with circuit-closures
340
340
  {3: {{'a', 'b', 'c', 'd'}, {'a', 'b', 'e', 'f'},