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
@@ -0,0 +1,578 @@
1
+ # sage_setup: distribution = sagemath-modules
2
+ # sage.doctest: needs sage.rings.finite_rings
3
+ """
4
+ Pseudomorphisms of free modules
5
+
6
+ AUTHORS:
7
+
8
+ - Xavier Caruso, Yossef Musleh (2024-09): initial version
9
+ """
10
+ # ****************************************************************************
11
+ # Copyright (C) 2024 Xavier Caruso <xavier.caruso@normalesup.org>
12
+ # Yossef Musleh <specialholonomy@gmail.com>
13
+ #
14
+ # Distributed under the terms of the GNU General Public License (GPL)
15
+ #
16
+ # This code is distributed in the hope that it will be useful,
17
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19
+ # General Public License for more details.
20
+ #
21
+ # The full text of the GPL is available at:
22
+ #
23
+ # http://www.gnu.org/licenses/
24
+ # ****************************************************************************
25
+
26
+ from sage.categories.morphism import Morphism
27
+ from sage.structure.richcmp import richcmp
28
+ from sage.modules.free_module_morphism import FreeModuleMorphism
29
+
30
+
31
+ class FreeModulePseudoMorphism(Morphism):
32
+ r"""
33
+ Let `M, M'` be modules over a ring `R`, `\theta: R \to R` a
34
+ ring homomorphism, and `\delta: R \to R` a `\theta`-derivation,
35
+ which is a map such that:
36
+
37
+ .. MATH::
38
+
39
+ \delta(xy) = \theta(x)\delta(y) + \delta(x)y.
40
+
41
+ A pseudomorphism `f : M \to M` is an additive map such that
42
+
43
+ .. MATH::
44
+
45
+ f(\lambda x) = \theta(\lambda)f(x) + \delta(\lambda) x
46
+
47
+ The map `\theta` (resp. `\delta`) is referred to as the
48
+ twisting endomorphism (resp. the twisting derivation) of `f`.
49
+
50
+ .. NOTE::
51
+
52
+ The implementation currently requires that `M` and `M'`
53
+ are free modules.
54
+
55
+ We represent pseudomorphisms by matrices with coefficient in the
56
+ base ring `R`. The matrix `\mathcal M_f` representing `f` is such
57
+ that its lines (resp. columns if ``side`` is ``"right"``) are the
58
+ coordinates of the images of the distinguished basis of the domain
59
+ (see also method :meth:`matrix`).
60
+ More concretely, let `n` (resp. `n'`) be the dimension of `M`
61
+ (resp. `M'`), let `(e_1, \dots, e_n)` be a basis of `M`.
62
+ For any `x = \sum_{i=1}^n x_i e_i \in M`, we have
63
+
64
+ .. MATH::
65
+
66
+ f(x) = \begin{pmatrix}
67
+ \theta(x_1) & \cdots & \theta(x_n)
68
+ \end{pmatrix}
69
+ \mathcal M_f
70
+ +
71
+ \begin{pmatrix}
72
+ \delta(x_1) & \cdots & \theta(x_n)
73
+ \end{pmatrix}
74
+ .
75
+
76
+ When ``side`` is ``"right"``, the formula is
77
+
78
+ .. MATH::
79
+
80
+ f(x) = \mathcal M_f
81
+ \begin{pmatrix}
82
+ \theta(x_1) \\ \vdots \\ \theta(x_n)
83
+ \end{pmatrix}
84
+ +
85
+ \begin{pmatrix}
86
+ \delta(x_1) \\ \vdots \\ \theta(x_n)
87
+ \end{pmatrix}
88
+ .
89
+
90
+ This class is not supposed to be instantiated directly; the user
91
+ should use instead the method
92
+ :meth:`sage.rings.module.free_module.FreeModule_generic.pseudohom`
93
+ to create a pseudomorphism.
94
+
95
+ TESTS::
96
+
97
+ sage: P.<x> = ZZ[]
98
+ sage: d = P.derivation()
99
+ sage: M = P^2
100
+ sage: f = M.pseudohom([[1, 2*x], [x, 1]], d); f
101
+ Free module pseudomorphism (twisted by d/dx) defined by the matrix
102
+ [ 1 2*x]
103
+ [ x 1]
104
+ Domain: Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in x over Integer Ring
105
+ Codomain: Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in x over Integer Ring
106
+ sage: e = M((2*x^2 + 3*x + 1, x^3 + 7*x + 4))
107
+ sage: f(e)
108
+ (x^4 + 9*x^2 + 11*x + 4, 5*x^3 + 9*x^2 + 9*x + 11)
109
+ sage: f = M.pseudohom([[1, 2], [1, 1]], d)
110
+ sage: f(e)
111
+ (x^3 + 2*x^2 + 14*x + 8, x^3 + 7*x^2 + 13*x + 13)
112
+
113
+ ::
114
+
115
+ sage: Fq.<z> = GF(7^3)
116
+ sage: Frob = Fq.frobenius_endomorphism()
117
+ sage: M = Fq^3
118
+ sage: N = Fq^2
119
+ sage: phi = M.pseudohom([[2, 3, 1], [1, 4, 6]], Frob, codomain=N, side="right")
120
+ sage: phi
121
+ Free module pseudomorphism (twisted by z |--> z^7) defined as left-multiplication by the matrix
122
+ [2 3 1]
123
+ [1 4 6]
124
+ Domain: Vector space of dimension 3 over Finite Field in z of size 7^3
125
+ Codomain: Vector space of dimension 2 over Finite Field in z of size 7^3
126
+ sage: v = (4*z^2 + 4*z + 3, 2, z + 5)
127
+ sage: phi(v)
128
+ (2*z + 1, 6*z^2 + 4*z + 5)
129
+ """
130
+ def __init__(self, parent, f, side):
131
+ """
132
+ Constructs a pseudomorphism of free modules.
133
+
134
+ INPUT:
135
+
136
+ - ``parent`` -- the parent space of pseudomorphisms
137
+
138
+ - ``f`` -- a pseudomorphism or a matrix defining this
139
+ pseudomorphism
140
+
141
+ - ``side`` -- side of the vectors acted on by the matrix
142
+
143
+ TESTS::
144
+
145
+ sage: F.<z> = GF(5^3)
146
+ sage: Frob = F.frobenius_endomorphism()
147
+ sage: M = F^2
148
+ sage: H = M.pseudoHom(Frob)
149
+ sage: H
150
+ Set of Pseudoendomorphisms (twisted by z |--> z^5) of Vector space of dimension 2 over Finite Field in z of size 5^3
151
+
152
+ The attribute ``f`` can be a matrix::
153
+
154
+ sage: mat = matrix(F, 2, [1, z, z^2, z^3])
155
+ sage: f = H(mat)
156
+ sage: f
157
+ Free module pseudomorphism (twisted by z |--> z^5) defined by the matrix
158
+ [ 1 z]
159
+ [ z^2 2*z + 2]
160
+ Domain: Vector space of dimension 2 over Finite Field in z of size 5^3
161
+ Codomain: Vector space of dimension 2 over Finite Field in z of size 5^3
162
+
163
+ sage: type(f)
164
+ <class 'sage.modules.free_module_pseudohomspace.FreeModulePseudoHomspace_with_category.element_class'>
165
+
166
+ or a pseudomorphism with the same parent::
167
+
168
+ sage: H(f)
169
+ Free module pseudomorphism (twisted by z |--> z^5) defined by the matrix
170
+ [ 1 z]
171
+ [ z^2 2*z + 2]
172
+ Domain: Vector space of dimension 2 over Finite Field in z of size 5^3
173
+ Codomain: Vector space of dimension 2 over Finite Field in z of size 5^3
174
+
175
+ When the twisting morphism and the twisting derivation are both trivial,
176
+ pseudomorphisms are just linear applications and coercion between those
177
+ works::
178
+
179
+ sage: id = End(F).identity()
180
+ sage: g = M.hom(mat)
181
+ sage: g2 = M.pseudoHom(id)(g)
182
+ sage: g2
183
+ Free module pseudomorphism (untwisted) defined by the matrix
184
+ [ 1 z]
185
+ [ z^2 2*z + 2]
186
+ Domain: Vector space of dimension 2 over Finite Field in z of size 5^3
187
+ Codomain: Vector space of dimension 2 over Finite Field in z of size 5^3
188
+
189
+ An example with ``side=right``::
190
+
191
+ sage: h = M.pseudohom(mat, Frob, side="right")
192
+ sage: h
193
+ Free module pseudomorphism (twisted by z |--> z^5) defined as left-multiplication by the matrix
194
+ [ 1 z]
195
+ [ z^2 2*z + 2]
196
+ Domain: Vector space of dimension 2 over Finite Field in z of size 5^3
197
+ Codomain: Vector space of dimension 2 over Finite Field in z of size 5^3
198
+
199
+ ::
200
+
201
+ sage: M.pseudohom(mat, Frob, side="middle")
202
+ Traceback (most recent call last):
203
+ ...
204
+ ValueError: the side must be either 'left' or 'right'
205
+
206
+ ::
207
+
208
+ sage: TestSuite(f).run()
209
+ sage: TestSuite(g2).run()
210
+ sage: TestSuite(h).run()
211
+ """
212
+ Morphism.__init__(self, parent)
213
+ dom = parent.domain()
214
+ codom = parent.codomain()
215
+ if side != "left" and side != "right":
216
+ raise ValueError("the side must be either 'left' or 'right'")
217
+ matrix_space = parent.matrix_space()
218
+ if ((isinstance(f, FreeModulePseudoMorphism) and f.parent() is parent)
219
+ or (isinstance(f, FreeModuleMorphism)
220
+ and f.domain() is dom and f.codomain() is codom
221
+ and parent._morphism is None and parent._derivation is None)):
222
+ if f.side() == 'right':
223
+ self._matrix = f.matrix().transpose()
224
+ else:
225
+ self._matrix = f.matrix()
226
+ else:
227
+ if side == "right":
228
+ self._matrix = matrix_space.transposed(f).transpose()
229
+ else:
230
+ self._matrix = matrix_space(f)
231
+ self._morphism = parent._morphism
232
+ self._derivation = parent._derivation
233
+ self._side = side
234
+
235
+ def _call_(self, x):
236
+ r"""
237
+ Return the result of applying this pseudomorphism to ``x``.
238
+
239
+ TESTS::
240
+
241
+ sage: Fq.<z> = GF(7^3)
242
+ sage: M = Fq^3
243
+ sage: Frob = Fq.frobenius_endomorphism()
244
+ sage: f = M.pseudohom([[1, z, 3], [0, 1, 1], [2, 1, 1]], Frob)
245
+ sage: e = M((3*z^2 + 5*z + 2, 6*z^2 + 2*z + 2, z + 4))
246
+ sage: f(e)
247
+ (3*z^2 + 4*z + 4, 6*z^2 + 5*z + 6, 6*z^2 + 5*z + 3)
248
+
249
+ ::
250
+
251
+ sage: g = M.pseudohom([[1, z, 3], [0, 1, 1], [2, 1, 1]], Frob, side="right")
252
+ sage: g(e)
253
+ (z^2 + 6*z + 2, z^2 + 2*z + 1, 2*z^2 + 4*z)
254
+ """
255
+ D = self.domain()
256
+ C = self.codomain()
257
+ if D.is_ambient():
258
+ x = x.element()
259
+ else:
260
+ x = D.coordinate_vector(x)
261
+ if self._morphism is None:
262
+ x_twist = x
263
+ else:
264
+ x_twist = D(list(map(self._morphism, x)))
265
+ v = x_twist * self._matrix
266
+ if C.is_ambient():
267
+ v = C(v.list())
268
+ else:
269
+ v = C.linear_combination_of_basis(v)
270
+ if self._derivation is not None:
271
+ v += D(list(map(self._derivation, x)))
272
+ return v
273
+
274
+ def _repr_(self):
275
+ r"""
276
+ Return the string representation of a pseudomorphism.
277
+
278
+ TESTS::
279
+
280
+ sage: Fq.<z> = GF(7^3)
281
+ sage: M = Fq^3
282
+ sage: Frob = Fq.frobenius_endomorphism()
283
+
284
+ sage: f = M.pseudohom([[1,1,1], [2,2,2], [3,3,3]], Frob)
285
+ sage: f # indirect doctest
286
+ Free module pseudomorphism (twisted by z |--> z^7) defined by the matrix
287
+ [1 1 1]
288
+ [2 2 2]
289
+ [3 3 3]
290
+ Domain: Vector space of dimension 3 over Finite Field in z of size 7^3
291
+ Codomain: Vector space of dimension 3 over Finite Field in z of size 7^3
292
+
293
+ sage: g = M.pseudohom([[1,1,1], [2,2,2], [3,3,3]], Frob, side="right")
294
+ sage: g # indirect doctest
295
+ Free module pseudomorphism (twisted by z |--> z^7) defined as left-multiplication by the matrix
296
+ [1 1 1]
297
+ [2 2 2]
298
+ [3 3 3]
299
+ Domain: Vector space of dimension 3 over Finite Field in z of size 7^3
300
+ Codomain: Vector space of dimension 3 over Finite Field in z of size 7^3
301
+ """
302
+ twist = self.parent()._ore._repr_twist()
303
+ s = "Free module pseudomorphism (%s) defined " % twist
304
+ if self._side == "right":
305
+ s += "as left-multiplication "
306
+ s += "by the matrix\n%s\n" % self.matrix()
307
+ s += "Domain: %s\n" % self.domain()
308
+ s += "Codomain: %s" % self.codomain()
309
+ return s
310
+
311
+ def matrix(self):
312
+ r"""
313
+ Return the underlying matrix of this pseudomorphism.
314
+
315
+ It is defined as the matrix `M` whose lines (resp. columns if
316
+ ``side`` is ``"right"``) are the coordinates of the images of
317
+ the distinguished basis of the domain.
318
+
319
+ EXAMPLES::
320
+
321
+ sage: Fq.<z> = GF(7^3)
322
+ sage: Frob = Fq.frobenius_endomorphism()
323
+ sage: M = Fq^3
324
+ sage: f = M.pseudohom([[1, z, 3], [0, 1, z^2], [z+1, 1, 1]], Frob)
325
+ sage: f.matrix()
326
+ [ 1 z 3]
327
+ [ 0 1 z^2]
328
+ [z + 1 1 1]
329
+
330
+ ::
331
+
332
+ sage: e1, e2, e3 = M.basis()
333
+ sage: f(e1)
334
+ (1, z, 3)
335
+ sage: f(e2)
336
+ (0, 1, z^2)
337
+ sage: f(e3)
338
+ (z + 1, 1, 1)
339
+
340
+ TESTS::
341
+
342
+ sage: v = M.random_element()
343
+ sage: f(v) == vector([Frob(c) for c in v]) * f.matrix()
344
+ True
345
+ """
346
+ if self._side == "left":
347
+ return self._matrix.__copy__()
348
+ else:
349
+ return self._matrix.transpose()
350
+
351
+ def twisting_derivation(self):
352
+ r"""
353
+ Return the twisting derivation of the pseudomorphism
354
+ (or ``None`` if the twisting derivation is zero).
355
+
356
+ EXAMPLES::
357
+
358
+ sage: P.<x> = ZZ[]
359
+ sage: d = P.derivation()
360
+ sage: M = P^2
361
+ sage: f = M.pseudohom([[1, 2*x], [x, 1]], d)
362
+ sage: f.twisting_derivation()
363
+ d/dx
364
+
365
+ ::
366
+
367
+ sage: Fq.<z> = GF(7^3)
368
+ sage: Frob = Fq.frobenius_endomorphism()
369
+ sage: V = Fq^2
370
+ sage: f = V.pseudohom([[1, z], [0, z^2]], Frob)
371
+ sage: f.twisting_derivation()
372
+ """
373
+ return self._derivation
374
+
375
+ def twisting_morphism(self):
376
+ r"""
377
+ Return the twisting morphism of the pseudomorphism
378
+ (or ``None`` if the twisting morphism is the identity).
379
+
380
+ EXAMPLES::
381
+
382
+ sage: Fq.<z> = GF(7^3)
383
+ sage: Frob = Fq.frobenius_endomorphism()
384
+ sage: V = Fq^2
385
+ sage: f = V.pseudohom([[1, z], [0, z^2]], Frob)
386
+ sage: f.twisting_morphism()
387
+ Frobenius endomorphism z |--> z^7 on Finite Field in z of size 7^3
388
+
389
+ ::
390
+
391
+ sage: P.<x> = ZZ[]
392
+ sage: d = P.derivation()
393
+ sage: M = P^2
394
+ sage: f = M.pseudohom([[1, 2*x], [x, 1]], d)
395
+ sage: f.twisting_morphism()
396
+ """
397
+ return self._morphism
398
+
399
+ def side(self):
400
+ """
401
+ Return the side of vectors acted on, relative to the matrix.
402
+
403
+ EXAMPLES::
404
+
405
+ sage: Fq.<z> = GF(7^3)
406
+ sage: Frob = Fq.frobenius_endomorphism()
407
+ sage: V = Fq^2
408
+
409
+ sage: m = matrix(2, [1, z, z^2, z^3])
410
+ sage: h1 = V.pseudohom(m, Frob)
411
+ sage: h1.side()
412
+ 'left'
413
+ sage: h1([1, 0])
414
+ (1, z)
415
+
416
+ sage: h2 = V.pseudohom(m, Frob, side="right")
417
+ sage: h2.side()
418
+ 'right'
419
+ sage: h2([1, 0])
420
+ (1, z^2)
421
+ """
422
+ return self._side
423
+
424
+ def side_switch(self):
425
+ """
426
+ Return the same morphism, acting on vectors on the opposite side.
427
+
428
+ EXAMPLES::
429
+
430
+ sage: Fq.<z> = GF(7^3)
431
+ sage: Frob = Fq.frobenius_endomorphism()
432
+ sage: V = Fq^2
433
+
434
+ sage: m = matrix(2, [1, z, z^2, z^3])
435
+ sage: h1 = V.pseudohom(m, Frob)
436
+ sage: h1
437
+ Free module pseudomorphism (twisted by z |--> z^7) defined by the matrix
438
+ [ 1 z]
439
+ [ z^2 z^2 + 3]
440
+ Domain: Vector space of dimension 2 over Finite Field in z of size 7^3
441
+ Codomain: Vector space of dimension 2 over Finite Field in z of size 7^3
442
+
443
+ sage: h2 = h1.side_switch()
444
+ sage: h2
445
+ Free module pseudomorphism (twisted by z |--> z^7) defined as left-multiplication by the matrix
446
+ [ 1 z^2]
447
+ [ z z^2 + 3]
448
+ Domain: Vector space of dimension 2 over Finite Field in z of size 7^3
449
+ Codomain: Vector space of dimension 2 over Finite Field in z of size 7^3
450
+
451
+ We check that ``h1`` and ``h2`` are the same::
452
+
453
+ sage: v = V.random_element()
454
+ sage: h1(v) == h2(v)
455
+ True
456
+ """
457
+ if self._side == "left":
458
+ side = "right"
459
+ mat = self._matrix.transpose()
460
+ else:
461
+ side = "left"
462
+ mat = self._matrix
463
+ return self.parent()(mat, side)
464
+
465
+ def __nonzero__(self):
466
+ return not (self._derivation is None and self._matrix)
467
+
468
+ def _richcmp_(self, other, op):
469
+ r"""
470
+ Compare this morphism with ``other``.
471
+
472
+ TESTS::
473
+
474
+ sage: Fq.<z> = GF(7^3)
475
+ sage: Frob = Fq.frobenius_endomorphism()
476
+ sage: V = Fq^2
477
+ sage: m = matrix(2, 2, [z, z^3, z^5, z^7])
478
+
479
+ sage: f = V.pseudohom(m, Frob)
480
+ sage: g = V.pseudohom(m.transpose(), Frob, side="right")
481
+ sage: f == g
482
+ True
483
+
484
+ sage: g = V.pseudohom(m.transpose(), Frob)
485
+ sage: f == g
486
+ False
487
+ sage: f < g
488
+ True
489
+ sage: f > g
490
+ False
491
+
492
+ ::
493
+
494
+ sage: g = V.pseudohom(m, Frob^2)
495
+ sage: f == g
496
+ False
497
+
498
+ sage: g = V.pseudohom(m, Frob^3)
499
+ sage: h = V.hom(m)
500
+ sage: g == h
501
+ True
502
+
503
+ ::
504
+
505
+ sage: f < V
506
+ Traceback (most recent call last):
507
+ ...
508
+ TypeError: unsupported operand parent(s) for <: 'Set of Pseudoendomorphisms (twisted by z |--> z^7) of Vector space of dimension 2 over Finite Field in z of size 7^3' and '<class 'sage.modules.free_module.FreeModule_ambient_field_with_category'>'
509
+ """
510
+ return richcmp(self._matrix, other._matrix, op)
511
+
512
+ def ore_module(self, names=None):
513
+ r"""
514
+ Return the Ore module over which the Ore variable acts
515
+ through this pseudomorphism.
516
+
517
+ INPUT:
518
+
519
+ - ``names`` -- a string, a list of strings or ``None``,
520
+ the names of the vector of the canonical basis of the
521
+ Ore module; if ``None``, elements are represented as
522
+ vectors in `K^d` (where `K` is the base ring)
523
+
524
+ EXAMPLES::
525
+
526
+ sage: Fq.<z> = GF(7^3)
527
+ sage: Frob = Fq.frobenius_endomorphism()
528
+ sage: V = Fq^2
529
+ sage: mat = matrix(2, [1, z, z^2, z^3])
530
+ sage: f = V.pseudohom(mat, Frob)
531
+
532
+ sage: M = f.ore_module()
533
+ sage: M
534
+ Ore module of rank 2 over Finite Field in z of size 7^3 twisted by z |--> z^7
535
+
536
+ Here `M` is a module over the Ore ring `\mathbb F_q[X; \text{Frob}]`
537
+ and the variable `X` acts on `M` through `f`::
538
+
539
+ sage: S.<X> = M.ore_ring()
540
+ sage: S
541
+ Ore Polynomial Ring in X over Finite Field in z of size 7^3 twisted by z |--> z^7
542
+ sage: v = M((1,0))
543
+ sage: X*v
544
+ (1, z)
545
+
546
+ The argument ``names`` can be used to give chosen names
547
+ to the vectors in the canonical basis::
548
+
549
+ sage: M = f.ore_module(names=('v', 'w'))
550
+ sage: M.basis()
551
+ [v, w]
552
+
553
+ or even::
554
+
555
+ sage: M = f.ore_module(names='e')
556
+ sage: M.basis()
557
+ [e0, e1]
558
+
559
+ Note that the bracket construction also works::
560
+
561
+ sage: M.<v,w> = f.ore_module()
562
+ sage: M.basis()
563
+ [v, w]
564
+ sage: v + w
565
+ v + w
566
+
567
+ We refer to :mod:`sage.modules.ore_module` for a
568
+ tutorial on Ore modules in SageMath.
569
+
570
+ .. SEEALSO::
571
+
572
+ :mod:`sage.modules.ore_module`
573
+ """
574
+ from sage.modules.ore_module import OreModule
575
+ return OreModule(self._matrix, self.parent()._ore, names)
576
+
577
+ def _test_nonzero_equal(self, tester):
578
+ pass
@@ -305,7 +305,7 @@ def IntegralLatticeDirectSum(Lattices, return_embeddings=False):
305
305
  [ 0 0 0 0 0 0 0 -1 2 -1 0]
306
306
  [ 0 0 0 0 0 0 0 0 -1 2 -1]
307
307
  [ 0 0 0 0 0 0 0 0 0 -1 2]
308
- sage: [L, phi] = IntegralLatticeDirectSum([L1, L2, L3], True)
308
+ sage: L, phi = IntegralLatticeDirectSum([L1, L2, L3], True)
309
309
  sage: LL3 = L.sublattice(phi[2].image().basis_matrix())
310
310
  sage: L3.discriminant() == LL3.discriminant()
311
311
  True
@@ -326,7 +326,7 @@ def IntegralLatticeDirectSum(Lattices, return_embeddings=False):
326
326
 
327
327
  sage: L1 = IntegralLattice(2 * matrix.identity(2), [[1/2, 1/2]])
328
328
  sage: L2 = IntegralLattice("A3", [[1, 1, 2]]) # needs sage.graphs
329
- sage: [L, phi] = IntegralLatticeDirectSum([L1, L2], True) # needs sage.graphs
329
+ sage: L, phi = IntegralLatticeDirectSum([L1, L2], True) # needs sage.graphs
330
330
  sage: L # needs sage.graphs
331
331
  Lattice of degree 5 and rank 2 over Integer Ring
332
332
  Basis matrix:
@@ -346,7 +346,7 @@ def IntegralLatticeDirectSum(Lattices, return_embeddings=False):
346
346
  dims = [L_i.dimension() for L_i in Lattices]
347
347
  degrees = [L_i.degree() for L_i in Lattices]
348
348
  degree_tot = sum(degrees)
349
- sum_degree = [sum(degrees[:i]) for i in range(N+1)]
349
+ sum_degree = [sum(degrees[:i]) for i in range(N + 1)]
350
350
  inner_product_list = [copy(L_i.inner_product_matrix()) for L_i in Lattices]
351
351
  IM = matrix.block_diagonal(inner_product_list)
352
352
  ambient = FreeQuadraticModule(ZZ,
@@ -392,8 +392,9 @@ def IntegralLatticeGluing(Lattices, glue, return_embeddings=False):
392
392
 
393
393
  A single lattice can be glued. This is the same as taking an overlattice::
394
394
 
395
- sage: # needs sage.libs.pari
396
395
  sage: from sage.modules.free_quadratic_module_integer_symmetric import IntegralLatticeGluing
396
+
397
+ sage: # needs sage.libs.pari
397
398
  sage: L1 = IntegralLattice(matrix([[4]]))
398
399
  sage: g1 = L1.discriminant_group().gens()[0]
399
400
  sage: glue = [[2 * g1]]
@@ -450,7 +451,7 @@ def IntegralLatticeGluing(Lattices, glue, return_embeddings=False):
450
451
  sage: g1 = L1.discriminant_group().gens()[0]
451
452
  sage: g2 = L2.discriminant_group().gens()[0]
452
453
  sage: glue = [[g1, 2 * g2]]
453
- sage: [V, phi] = IntegralLatticeGluing([L1, L2], glue, True)
454
+ sage: V, phi = IntegralLatticeGluing([L1, L2], glue, True)
454
455
  sage: V
455
456
  Lattice of degree 8 and rank 8 over Integer Ring
456
457
  Basis matrix:
@@ -543,7 +544,7 @@ def IntegralLatticeGluing(Lattices, glue, return_embeddings=False):
543
544
  sage: D5 = IntegralLattice("D5")
544
545
  sage: gA7 = A7.discriminant_group().gens()[0]
545
546
  sage: gD5 = D5.discriminant_group().gens()[0]
546
- sage: [L, phi] = IntegralLatticeGluing([A7, A7, D5, D5],
547
+ sage: L, phi = IntegralLatticeGluing([A7, A7, D5, D5],
547
548
  ....: [[gA7, gA7, gD5, 2 * gD5],
548
549
  ....: [gA7, 7 * gA7, 2 * gD5, gD5]], True)
549
550
  sage: L.determinant()
@@ -557,9 +558,9 @@ def IntegralLatticeGluing(Lattices, glue, return_embeddings=False):
557
558
  sage: # needs sage.graphs
558
559
  sage: L1 = IntegralLattice("D4", [[1, 1, 0, 0], [0, 1, 1, 0]])
559
560
  sage: L2 = IntegralLattice("E6", [[0, 2, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1]])
560
- sage: [f1, f2] = L1.discriminant_group().gens()
561
- sage: [g1, g2] = L2.discriminant_group().gens()
562
- sage: [L, phi] = IntegralLatticeGluing([L1, L2],
561
+ sage: f1, f2 = L1.discriminant_group().gens()
562
+ sage: g1, g2 = L2.discriminant_group().gens()
563
+ sage: L, phi = IntegralLatticeGluing([L1, L2],
563
564
  ....: [[f1, g1], [f2, 2 * g2]], True)
564
565
  sage: phi[0]
565
566
  Free module morphism defined by the matrix
@@ -595,7 +596,7 @@ def IntegralLatticeGluing(Lattices, glue, return_embeddings=False):
595
596
  sage: B * L.gram_matrix() * B.transpose() == L1.gram_matrix()
596
597
  True
597
598
  """
598
- [direct_sum, phi] = IntegralLatticeDirectSum(Lattices, return_embeddings=True)
599
+ direct_sum, phi = IntegralLatticeDirectSum(Lattices, return_embeddings=True)
599
600
  N = len(Lattices)
600
601
  for g in glue:
601
602
  if not len(g) == N:
@@ -735,7 +736,7 @@ class FreeQuadraticModule_integer_symmetric(FreeQuadraticModule_submodule_with_b
735
736
  return s
736
737
 
737
738
  @cached_method
738
- def is_even(self):
739
+ def is_even(self) -> bool:
739
740
  r"""
740
741
  Return whether the diagonal entries of the Gram matrix are even.
741
742
 
@@ -1522,6 +1523,15 @@ class FreeQuadraticModule_integer_symmetric(FreeQuadraticModule_submodule_with_b
1522
1523
  [[(0, 0)], [], [(1, 1), (-1, -1), (0, 1), (0, -1), (1, 0), (-1, 0)]]
1523
1524
  sage: A2.short_vectors(3, up_to_sign_flag=True) # needs sage.graphs sage.libs.pari
1524
1525
  [[(0, 0)], [], [(1, 1), (0, 1), (1, 0)]]
1526
+
1527
+ TESTS:
1528
+
1529
+ Check that keyword arguments are passed to :meth:`sage.quadratic_forms.short_vector_list_up_to_length`
1530
+ (:issue:`39848`)::
1531
+
1532
+ sage: A2 = IntegralLattice('A2') # needs sage.graphs
1533
+ sage: A2.short_vectors(3, up_to_sign_flag=False) # needs sage.graphs sage.libs.pari
1534
+ [[(0, 0)], [], [(1, 1), (-1, -1), (0, 1), (0, -1), (1, 0), (-1, 0)]]
1525
1535
  """
1526
1536
  p, m = self.signature_pair()
1527
1537
  if p * m != 0:
@@ -1531,8 +1541,9 @@ class FreeQuadraticModule_integer_symmetric(FreeQuadraticModule_submodule_with_b
1531
1541
  e = -2
1532
1542
  from sage.quadratic_forms.quadratic_form import QuadraticForm
1533
1543
  q = QuadraticForm(e * self.gram_matrix())
1534
- short = q.short_vector_list_up_to_length(n, *kwargs)
1535
- return [[self(v * self.basis_matrix()) for v in L] for L in short]
1544
+ short = q.short_vector_list_up_to_length(n, **kwargs)
1545
+ # (matrix(L)* B ).rows() is faster than [v * B for v in L]
1546
+ return [[self(r, check=False) for r in matrix(L) * self.basis_matrix()] if L else [] for L in short]
1536
1547
 
1537
1548
  def _fplll_enumerate(self, target=None):
1538
1549
  r"""