passagemath-modules 10.5.46__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 (320) hide show
  1. {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +49 -44
  2. {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +320 -314
  3. passagemath_modules.dylibs/libmpc.3.dylib +0 -0
  4. passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
  5. sage/algebras/clifford_algebra.py +2 -2
  6. sage/algebras/clifford_algebra_element.cpython-310-darwin.so +0 -0
  7. sage/algebras/clifford_algebra_element.pyx +4 -2
  8. sage/algebras/exterior_algebra_groebner.cpython-310-darwin.so +0 -0
  9. sage/algebras/exterior_algebra_groebner.pyx +2 -0
  10. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +83 -5
  11. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-310-darwin.so +0 -0
  12. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +2 -0
  13. sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +28 -3
  14. sage/algebras/finite_gca.py +1 -1
  15. sage/algebras/lie_algebras/bgg_dual_module.py +18 -11
  16. sage/algebras/lie_algebras/classical_lie_algebra.py +3 -3
  17. sage/algebras/lie_algebras/examples.py +2 -2
  18. sage/algebras/lie_algebras/free_lie_algebra.py +1 -1
  19. sage/algebras/lie_algebras/heisenberg.py +4 -4
  20. sage/algebras/lie_algebras/lie_algebra.py +1 -1
  21. sage/algebras/lie_algebras/lie_algebra_element.cpython-310-darwin.so +0 -0
  22. sage/algebras/lie_algebras/lie_algebra_element.pyx +63 -27
  23. sage/algebras/lie_algebras/quotient.py +40 -29
  24. sage/algebras/lie_algebras/subalgebra.py +76 -53
  25. sage/algebras/lie_algebras/verma_module.py +1 -3
  26. sage/algebras/octonion_algebra.cpython-310-darwin.so +0 -0
  27. sage/algebras/octonion_algebra.pyx +1 -1
  28. sage/algebras/orlik_solomon.py +4 -4
  29. sage/algebras/orlik_terao.py +4 -4
  30. sage/algebras/steenrod/steenrod_algebra.py +37 -30
  31. sage/algebras/steenrod/steenrod_algebra_bases.py +2 -2
  32. sage/algebras/steenrod/steenrod_algebra_misc.py +4 -4
  33. sage/algebras/steenrod/steenrod_algebra_mult.py +2 -2
  34. sage/all__sagemath_modules.py +1 -0
  35. sage/calculus/integration.cpython-310-darwin.so +0 -0
  36. sage/calculus/integration.pyx +6 -5
  37. sage/calculus/interpolation.cpython-310-darwin.so +0 -0
  38. sage/calculus/interpolators.cpython-310-darwin.so +0 -0
  39. sage/calculus/ode.cpython-310-darwin.so +0 -0
  40. sage/calculus/ode.pxd +2 -2
  41. sage/calculus/ode.pyx +6 -4
  42. sage/calculus/riemann.cpython-310-darwin.so +0 -0
  43. sage/calculus/riemann.pyx +68 -48
  44. sage/calculus/transforms/dwt.cpython-310-darwin.so +0 -0
  45. sage/calculus/transforms/fft.cpython-310-darwin.so +0 -0
  46. sage/coding/ag_code_decoders.cpython-310-darwin.so +0 -0
  47. sage/coding/ag_code_decoders.pyx +31 -31
  48. sage/coding/binary_code.cpython-310-darwin.so +0 -0
  49. sage/coding/binary_code.pxd +6 -6
  50. sage/coding/binary_code.pyx +212 -173
  51. sage/coding/guruswami_sudan/utils.py +3 -5
  52. sage/coding/kasami_codes.cpython-310-darwin.so +0 -0
  53. sage/coding/kasami_codes.pyx +20 -24
  54. sage/coding/linear_code.py +2 -2
  55. sage/coding/linear_code_no_metric.py +5 -5
  56. sage/coding/linear_rank_metric.py +81 -19
  57. sage/combinat/free_module.py +22 -2
  58. sage/combinat/root_system/ambient_space.py +1 -1
  59. sage/combinat/root_system/associahedron.py +4 -4
  60. sage/combinat/root_system/braid_move_calculator.py +1 -1
  61. sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
  62. sage/combinat/root_system/branching_rules.py +2 -2
  63. sage/combinat/root_system/cartan_type.py +14 -14
  64. sage/combinat/root_system/coxeter_group.py +2 -2
  65. sage/combinat/root_system/coxeter_type.py +11 -0
  66. sage/combinat/root_system/extended_affine_weyl_group.py +8 -8
  67. sage/combinat/root_system/fundamental_group.py +2 -4
  68. sage/combinat/root_system/hecke_algebra_representation.py +1 -1
  69. sage/combinat/root_system/pieri_factors.py +2 -2
  70. sage/combinat/root_system/root_lattice_realization_algebras.py +1 -1
  71. sage/combinat/root_system/root_lattice_realizations.py +1 -1
  72. sage/combinat/root_system/type_folded.py +3 -3
  73. sage/combinat/root_system/type_reducible.py +8 -7
  74. sage/combinat/root_system/type_super_A.py +2 -2
  75. sage/combinat/root_system/weight_lattice_realizations.py +9 -8
  76. sage/combinat/root_system/weyl_characters.py +1 -1
  77. sage/crypto/__init__.py +1 -0
  78. sage/crypto/block_cipher/des.py +1 -1
  79. sage/crypto/block_cipher/miniaes.py +3 -3
  80. sage/crypto/block_cipher/present.py +3 -3
  81. sage/crypto/block_cipher/sdes.py +3 -3
  82. sage/crypto/boolean_function.cpython-310-darwin.so +0 -0
  83. sage/crypto/boolean_function.pyx +22 -23
  84. sage/crypto/key_exchange/diffie_hellman.py +4 -9
  85. sage/crypto/mq/sr.py +1 -1
  86. sage/crypto/public_key/blum_goldwasser.py +3 -3
  87. sage/crypto/sbox.cpython-310-darwin.so +0 -0
  88. sage/crypto/sbox.pyx +1 -1
  89. sage/crypto/sboxes.py +22 -0
  90. sage/crypto/util.py +4 -6
  91. sage/ext/interpreters/__init__.py +1 -1
  92. sage/ext/interpreters/all__sagemath_modules.py +1 -1
  93. sage/ext/interpreters/wrapper_cc.cpython-310-darwin.so +0 -0
  94. sage/ext/interpreters/wrapper_cc.pxd +5 -5
  95. sage/ext/interpreters/wrapper_cc.pyx +1 -1
  96. sage/ext/interpreters/wrapper_cdf.cpython-310-darwin.so +0 -0
  97. sage/ext/interpreters/wrapper_cdf.pxd +5 -7
  98. sage/ext/interpreters/wrapper_cdf.pyx +4 -10
  99. sage/ext/interpreters/wrapper_rdf.cpython-310-darwin.so +0 -0
  100. sage/ext/interpreters/wrapper_rdf.pxd +1 -1
  101. sage/ext/interpreters/wrapper_rdf.pyx +1 -1
  102. sage/ext/interpreters/wrapper_rr.cpython-310-darwin.so +0 -0
  103. sage/ext/interpreters/wrapper_rr.pxd +5 -5
  104. sage/ext/interpreters/wrapper_rr.pyx +1 -2
  105. sage/geometry/toric_lattice.py +3 -3
  106. sage/geometry/toric_lattice_element.cpython-310-darwin.so +0 -0
  107. sage/groups/additive_abelian/additive_abelian_group.py +1 -1
  108. sage/groups/additive_abelian/qmodnz.py +4 -4
  109. sage/groups/matrix_gps/coxeter_group.py +17 -4
  110. sage/groups/matrix_gps/group_element.cpython-310-darwin.so +0 -0
  111. sage/groups/misc_gps/argument_groups.py +2 -2
  112. sage/groups/misc_gps/imaginary_groups.py +4 -4
  113. sage/groups/perm_gps/partn_ref/refinement_binary.cpython-310-darwin.so +0 -0
  114. sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-310-darwin.so +0 -0
  115. sage/homology/chain_complex.py +0 -2
  116. sage/homology/hochschild_complex.py +3 -3
  117. sage/homology/homology_morphism.py +6 -6
  118. sage/homology/homology_vector_space_with_basis.py +1 -1
  119. sage/libs/gsl/array.cpython-310-darwin.so +0 -0
  120. sage/libs/mpmath/utils.cpython-310-darwin.so +0 -0
  121. sage/matrix/action.cpython-310-darwin.so +0 -0
  122. sage/matrix/args.cpython-310-darwin.so +0 -0
  123. sage/matrix/args.pyx +25 -10
  124. sage/matrix/benchmark.py +8 -4
  125. sage/matrix/compute_J_ideal.py +2 -2
  126. sage/matrix/constructor.cpython-310-darwin.so +0 -0
  127. sage/matrix/echelon_matrix.cpython-310-darwin.so +0 -0
  128. sage/matrix/echelon_matrix.pyx +1 -1
  129. sage/matrix/matrix0.cpython-310-darwin.so +0 -0
  130. sage/matrix/matrix0.pxd +3 -3
  131. sage/matrix/matrix0.pyx +7 -5
  132. sage/matrix/matrix1.cpython-310-darwin.so +0 -0
  133. sage/matrix/matrix1.pyx +87 -48
  134. sage/matrix/matrix2.cpython-310-darwin.so +0 -0
  135. sage/matrix/matrix2.pxd +3 -3
  136. sage/matrix/matrix2.pyx +758 -75
  137. sage/matrix/matrix_cdv.cpython-310-darwin.so +0 -0
  138. sage/matrix/matrix_complex_double_dense.cpython-310-darwin.so +0 -0
  139. sage/matrix/matrix_complex_double_dense.pyx +1 -1
  140. sage/matrix/matrix_dense.cpython-310-darwin.so +0 -0
  141. sage/matrix/matrix_dense.pyx +2 -3
  142. sage/matrix/matrix_double_dense.cpython-310-darwin.so +0 -0
  143. sage/matrix/matrix_double_dense.pyx +11 -5
  144. sage/matrix/matrix_double_sparse.cpython-310-darwin.so +0 -0
  145. sage/matrix/matrix_generic_dense.cpython-310-darwin.so +0 -0
  146. sage/matrix/matrix_generic_sparse.cpython-310-darwin.so +0 -0
  147. sage/matrix/matrix_generic_sparse.pyx +1 -1
  148. sage/matrix/matrix_laurent_mpolynomial_dense.cpython-310-darwin.so +0 -0
  149. sage/matrix/matrix_numpy_dense.cpython-310-darwin.so +0 -0
  150. sage/matrix/matrix_numpy_integer_dense.cpython-310-darwin.so +0 -0
  151. sage/matrix/matrix_polynomial_dense.cpython-310-darwin.so +0 -0
  152. sage/matrix/matrix_polynomial_dense.pyx +952 -261
  153. sage/matrix/matrix_real_double_dense.cpython-310-darwin.so +0 -0
  154. sage/matrix/matrix_sparse.cpython-310-darwin.so +0 -0
  155. sage/matrix/matrix_sparse.pyx +2 -3
  156. sage/matrix/matrix_window.cpython-310-darwin.so +0 -0
  157. sage/matrix/matrix_window.pyx +2 -2
  158. sage/matrix/misc_mpfr.cpython-310-darwin.so +0 -0
  159. sage/matrix/operation_table.py +0 -2
  160. sage/matrix/special.py +4 -0
  161. sage/matrix/strassen.cpython-310-darwin.so +0 -0
  162. sage/matrix/strassen.pyx +1 -1
  163. sage/matroids/basis_exchange_matroid.cpython-310-darwin.so +0 -0
  164. sage/matroids/basis_matroid.cpython-310-darwin.so +0 -0
  165. sage/matroids/chow_ring.py +68 -65
  166. sage/matroids/chow_ring_ideal.py +41 -38
  167. sage/matroids/circuit_closures_matroid.cpython-310-darwin.so +0 -0
  168. sage/matroids/circuits_matroid.cpython-310-darwin.so +0 -0
  169. sage/matroids/database_matroids.py +16 -5
  170. sage/matroids/dual_matroid.py +2 -2
  171. sage/matroids/extension.cpython-310-darwin.so +0 -0
  172. sage/matroids/flats_matroid.cpython-310-darwin.so +0 -0
  173. sage/matroids/gammoid.py +1 -1
  174. sage/matroids/graphic_matroid.cpython-310-darwin.so +0 -0
  175. sage/matroids/graphic_matroid.pyx +3 -3
  176. sage/matroids/lean_matrix.cpython-310-darwin.so +0 -0
  177. sage/matroids/lean_matrix.pyx +22 -22
  178. sage/matroids/linear_matroid.cpython-310-darwin.so +0 -0
  179. sage/matroids/linear_matroid.pyx +13 -13
  180. sage/matroids/matroid.cpython-310-darwin.so +0 -0
  181. sage/matroids/matroid.pyx +15 -15
  182. sage/matroids/matroids_plot_helpers.py +48 -46
  183. sage/matroids/minor_matroid.py +2 -2
  184. sage/matroids/set_system.cpython-310-darwin.so +0 -0
  185. sage/matroids/transversal_matroid.cpython-310-darwin.so +0 -0
  186. sage/matroids/transversal_matroid.pyx +3 -3
  187. sage/matroids/union_matroid.cpython-310-darwin.so +0 -0
  188. sage/matroids/union_matroid.pyx +3 -0
  189. sage/matroids/unpickling.cpython-310-darwin.so +0 -0
  190. sage/matroids/utilities.py +2 -2
  191. sage/misc/c3.cpython-310-darwin.so +0 -0
  192. sage/misc/compat.py +1 -2
  193. sage/misc/pickle_old.cpython-310-darwin.so +0 -0
  194. sage/modules/diamond_cutting.py +117 -30
  195. sage/modules/fg_pid/fgp_module.py +3 -3
  196. sage/modules/filtered_vector_space.py +4 -4
  197. sage/modules/finite_submodule_iter.cpython-310-darwin.so +0 -0
  198. sage/modules/fp_graded/free_module.py +2 -2
  199. sage/modules/fp_graded/module.py +2 -2
  200. sage/modules/fp_graded/morphism.py +4 -4
  201. sage/modules/fp_graded/steenrod/morphism.py +1 -1
  202. sage/modules/free_module.py +144 -15
  203. sage/modules/free_module_element.cpython-310-darwin.so +0 -0
  204. sage/modules/free_module_element.pyx +4 -4
  205. sage/modules/free_module_integer.py +2 -2
  206. sage/modules/free_module_morphism.py +3 -3
  207. sage/modules/free_module_pseudohomspace.py +352 -0
  208. sage/modules/free_module_pseudomorphism.py +578 -0
  209. sage/modules/free_quadratic_module_integer_symmetric.py +24 -13
  210. sage/modules/matrix_morphism.py +9 -9
  211. sage/modules/multi_filtered_vector_space.py +4 -4
  212. sage/modules/ore_module.py +2208 -0
  213. sage/modules/ore_module_element.py +178 -0
  214. sage/modules/ore_module_homspace.py +147 -0
  215. sage/modules/ore_module_morphism.py +968 -0
  216. sage/modules/quotient_module.py +11 -1
  217. sage/modules/submodule.py +1 -1
  218. sage/modules/torsion_quadratic_module.py +1 -1
  219. sage/modules/vector_complex_double_dense.cpython-310-darwin.so +0 -0
  220. sage/modules/vector_double_dense.cpython-310-darwin.so +0 -0
  221. sage/modules/vector_integer_dense.cpython-310-darwin.so +0 -0
  222. sage/modules/vector_integer_sparse.cpython-310-darwin.so +0 -0
  223. sage/modules/vector_integer_sparse.pyx +4 -4
  224. sage/modules/vector_modn_dense.cpython-310-darwin.so +0 -0
  225. sage/modules/vector_modn_sparse.cpython-310-darwin.so +0 -0
  226. sage/modules/vector_numpy_dense.cpython-310-darwin.so +0 -0
  227. sage/modules/vector_numpy_integer_dense.cpython-310-darwin.so +0 -0
  228. sage/modules/vector_rational_dense.cpython-310-darwin.so +0 -0
  229. sage/modules/vector_rational_dense.pyx +1 -1
  230. sage/modules/vector_rational_sparse.cpython-310-darwin.so +0 -0
  231. sage/modules/vector_rational_sparse.pyx +5 -5
  232. sage/modules/vector_real_double_dense.cpython-310-darwin.so +0 -0
  233. sage/modules/vector_space_morphism.py +2 -2
  234. sage/modules/with_basis/cell_module.py +17 -0
  235. sage/modules/with_basis/indexed_element.cpython-310-darwin.so +0 -0
  236. sage/modules/with_basis/indexed_element.pyx +1 -1
  237. sage/modules/with_basis/invariant.py +1 -1
  238. sage/modules/with_basis/representation.py +0 -1
  239. sage/modules/with_basis/subquotient.py +2 -2
  240. sage/numerical/gauss_legendre.cpython-310-darwin.so +0 -0
  241. sage/probability/probability_distribution.cpython-310-darwin.so +0 -0
  242. sage/quadratic_forms/binary_qf.py +7 -7
  243. sage/quadratic_forms/bqf_class_group.py +26 -92
  244. sage/quadratic_forms/count_local_2.cpython-310-darwin.so +0 -0
  245. sage/quadratic_forms/extras.py +1 -1
  246. sage/quadratic_forms/quadratic_form.py +5 -4
  247. sage/quadratic_forms/quadratic_form__equivalence_testing.py +7 -4
  248. sage/quadratic_forms/quadratic_form__evaluate.cpython-310-darwin.so +0 -0
  249. sage/quadratic_forms/quadratic_form__local_field_invariants.py +10 -10
  250. sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +2 -2
  251. sage/quadratic_forms/ternary.cpython-310-darwin.so +0 -0
  252. sage/quadratic_forms/ternary_qf.py +50 -83
  253. sage/rings/complex_conversion.cpython-310-darwin.so +0 -0
  254. sage/rings/complex_double.cpython-310-darwin.so +0 -0
  255. sage/rings/complex_double.pxd +1 -0
  256. sage/rings/complex_double.pyx +37 -32
  257. sage/rings/complex_mpc.cpython-310-darwin.so +0 -0
  258. sage/rings/complex_mpc.pyx +27 -23
  259. sage/rings/complex_mpfr.cpython-310-darwin.so +0 -0
  260. sage/rings/complex_mpfr.pyx +11 -9
  261. sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +277 -21
  262. sage/rings/function_field/drinfeld_modules/drinfeld_module.py +10 -1
  263. sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1 -1
  264. sage/rings/function_field/drinfeld_modules/homset.py +1 -2
  265. sage/rings/function_field/drinfeld_modules/morphism.py +2 -2
  266. sage/rings/function_field/hermite_form_polynomial.cpython-310-darwin.so +0 -0
  267. sage/rings/function_field/khuri_makdisi.cpython-310-darwin.so +0 -0
  268. sage/rings/function_field/khuri_makdisi.pyx +27 -25
  269. sage/rings/invariants/invariant_theory.py +61 -60
  270. sage/rings/invariants/reconstruction.py +8 -8
  271. sage/rings/polynomial/laurent_polynomial_mpair.cpython-310-darwin.so +0 -0
  272. sage/rings/polynomial/ore_function_element.py +1 -1
  273. sage/rings/polynomial/ore_polynomial_element.cpython-310-darwin.so +0 -0
  274. sage/rings/polynomial/ore_polynomial_element.pyx +8 -8
  275. sage/rings/polynomial/ore_polynomial_ring.py +134 -17
  276. sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-310-darwin.so +0 -0
  277. sage/rings/polynomial/skew_polynomial_element.cpython-310-darwin.so +0 -0
  278. sage/rings/polynomial/skew_polynomial_finite_field.cpython-310-darwin.so +0 -0
  279. sage/rings/polynomial/skew_polynomial_finite_field.pyx +3 -4
  280. sage/rings/polynomial/skew_polynomial_finite_order.cpython-310-darwin.so +0 -0
  281. sage/rings/polynomial/skew_polynomial_finite_order.pyx +2 -5
  282. sage/rings/real_double_element_gsl.cpython-310-darwin.so +0 -0
  283. sage/rings/real_mpfr.cpython-310-darwin.so +0 -0
  284. sage/rings/real_mpfr.pyx +25 -7
  285. sage/rings/ring_extension.cpython-310-darwin.so +0 -0
  286. sage/rings/ring_extension.pyx +4 -2
  287. sage/rings/ring_extension_conversion.cpython-310-darwin.so +0 -0
  288. sage/rings/ring_extension_element.cpython-310-darwin.so +0 -0
  289. sage/rings/ring_extension_element.pyx +42 -0
  290. sage/rings/ring_extension_morphism.cpython-310-darwin.so +0 -0
  291. sage/schemes/projective/cohomology.py +2 -2
  292. sage/stats/basic_stats.py +9 -6
  293. sage/stats/distributions/dgs_misc.h +11 -4
  294. sage/stats/distributions/discrete_gaussian_integer.cpython-310-darwin.so +0 -0
  295. sage/stats/distributions/discrete_gaussian_integer.pyx +9 -7
  296. sage/stats/hmm/chmm.cpython-310-darwin.so +0 -0
  297. sage/stats/hmm/chmm.pyx +13 -13
  298. sage/stats/hmm/distributions.cpython-310-darwin.so +0 -0
  299. sage/stats/hmm/distributions.pxd +3 -3
  300. sage/stats/hmm/distributions.pyx +3 -3
  301. sage/stats/hmm/hmm.cpython-310-darwin.so +0 -0
  302. sage/stats/hmm/hmm.pxd +3 -3
  303. sage/stats/hmm/hmm.pyx +6 -6
  304. sage/stats/hmm/util.cpython-310-darwin.so +0 -0
  305. sage/stats/hmm/util.pyx +6 -6
  306. sage/stats/intlist.cpython-310-darwin.so +0 -0
  307. sage/stats/intlist.pxd +3 -3
  308. sage/stats/time_series.cpython-310-darwin.so +0 -0
  309. sage/tensor/modules/alternating_contr_tensor.py +3 -3
  310. sage/tensor/modules/comp.py +3 -3
  311. sage/tensor/modules/ext_pow_free_module.py +3 -3
  312. sage/tensor/modules/format_utilities.py +3 -3
  313. sage/tensor/modules/free_module_linear_group.py +3 -3
  314. sage/tensor/modules/free_module_morphism.py +0 -1
  315. sage/tensor/modules/tensor_free_module.py +3 -3
  316. sage/tensor/modules/tensor_free_submodule.py +1 -1
  317. sage/tensor/modules/tensor_free_submodule_basis.py +1 -1
  318. sage/tensor/modules/tensor_with_indices.py +5 -5
  319. {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +0 -0
  320. {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
@@ -985,7 +985,7 @@ class Module_free_ambient(Module):
985
985
  """
986
986
  return self.__degree
987
987
 
988
- def is_sparse(self):
988
+ def is_sparse(self) -> bool:
989
989
  """
990
990
  Return ``True`` if the underlying representation of this module uses
991
991
  sparse vectors, and ``False`` otherwise.
@@ -999,7 +999,7 @@ class Module_free_ambient(Module):
999
999
  """
1000
1000
  return self.__is_sparse
1001
1001
 
1002
- def is_exact(self):
1002
+ def is_exact(self) -> bool:
1003
1003
  """
1004
1004
  Test whether elements of this module are represented exactly.
1005
1005
 
@@ -1518,7 +1518,7 @@ class Module_free_ambient(Module):
1518
1518
  # in the same ambient space
1519
1519
  return self.is_submodule(other) and other.is_submodule(self)
1520
1520
 
1521
- def is_submodule(self, other):
1521
+ def is_submodule(self, other) -> bool:
1522
1522
  r"""
1523
1523
  Return ``True`` if ``self`` is a submodule of ``other``.
1524
1524
 
@@ -2307,7 +2307,7 @@ class FreeModule_generic(Module_free_ambient):
2307
2307
  return self.echelonized_basis_matrix() == other.echelonized_basis_matrix()
2308
2308
  return self.is_submodule(other) and other.is_submodule(self)
2309
2309
 
2310
- def is_submodule(self, other):
2310
+ def is_submodule(self, other) -> bool:
2311
2311
  r"""
2312
2312
  Return ``True`` if ``self`` is a submodule of ``other``.
2313
2313
 
@@ -3117,6 +3117,135 @@ class FreeModule_generic(Module_free_ambient):
3117
3117
  codomain = R**n
3118
3118
  return super().hom(im_gens, codomain, **kwds)
3119
3119
 
3120
+ def pseudoHom(self, twist, codomain=None):
3121
+ r"""
3122
+ Return the pseudo-Hom space corresponding to given data.
3123
+
3124
+ INPUT:
3125
+
3126
+ - ``twist`` -- the twisting morphism or the twisting derivation
3127
+
3128
+ - ``codomain`` -- (default: ``None``) the codomain of the pseudo
3129
+ morphisms; if ``None``, the codomain is the same as the domain
3130
+
3131
+ EXAMPLES::
3132
+
3133
+ sage: # needs sage.rings.finite_rings
3134
+ sage: F = GF(25)
3135
+ sage: Frob = F.frobenius_endomorphism()
3136
+ sage: M = F^2
3137
+ sage: M.pseudoHom(Frob)
3138
+ Set of Pseudoendomorphisms (twisted by z2 |--> z2^5) of Vector space of dimension 2 over Finite Field in z2 of size 5^2
3139
+
3140
+ .. SEEALSO::
3141
+
3142
+ :meth:`pseudohom`
3143
+ """
3144
+ from sage.modules.free_module_pseudohomspace import FreeModulePseudoHomspace
3145
+ if codomain is None:
3146
+ codomain = self
3147
+ return FreeModulePseudoHomspace(self, codomain, twist)
3148
+
3149
+ def pseudohom(self, f, twist, codomain=None, side="left"):
3150
+ r"""
3151
+ Return the pseudohomomorphism corresponding to the given data.
3152
+
3153
+ We recall that, given two `R`-modules `M` and `M'` together with
3154
+ a ring homomorphism `\theta: R \to R` and a `\theta`-derivation,
3155
+ `\delta: R \to R` (that is, a map such that
3156
+ `\delta(xy) = \theta(x)\delta(y) + \delta(x)y`), a
3157
+ pseudomorphism `f : M \to M'` is an additive map such that
3158
+
3159
+ .. MATH::
3160
+
3161
+ f(\lambda x) = \theta(\lambda) f(x) + \delta(\lambda) x
3162
+
3163
+ When `\delta` is nonzero, this requires that `M` coerces into `M'`.
3164
+
3165
+ .. NOTE::
3166
+
3167
+ Internally, pseudomorphisms are represented by matrices with
3168
+ coefficient in the base ring `R`. See class
3169
+ :class:`sage.modules.free_module_pseudomorphism.FreeModulePseudoMorphism`
3170
+ for details.
3171
+
3172
+ INPUT:
3173
+
3174
+ - ``f`` -- a matrix (or any other data) defining the
3175
+ pseudomorphism
3176
+
3177
+ - ``twist`` -- the twisting morphism or the twisting derivation
3178
+ (if a derivation is given, the corresponding morphism `\theta`
3179
+ is automatically infered;
3180
+ see also :class:`sage.rings.polynomial.ore_polynomial_ring.OrePolynomialRing`)
3181
+
3182
+ - ``codomain`` -- (default: ``None``) the codomain of the pseudo
3183
+ morphisms; if ``None``, the codomain is the same than the domain
3184
+
3185
+ - ``side`` -- (default: ``left``) side of the vectors acted on by
3186
+ the matrix
3187
+
3188
+ EXAMPLES::
3189
+
3190
+ sage: # needs sage.rings.finite_rings
3191
+ sage: K.<z> = GF(5^5)
3192
+ sage: Frob = K.frobenius_endomorphism()
3193
+ sage: V = K^2; W = K^3
3194
+ sage: f = V.pseudohom([[1, z, z^2], [1, z^2, z^4]], Frob, codomain=W)
3195
+ sage: f
3196
+ Free module pseudomorphism (twisted by z |--> z^5) defined by the matrix
3197
+ [ 1 z z^2]
3198
+ [ 1 z^2 z^4]
3199
+ Domain: Vector space of dimension 2 over Finite Field in z of size 5^5
3200
+ Codomain: Vector space of dimension 3 over Finite Field in z of size 5^5
3201
+
3202
+ We check that `f` is indeed semi-linear::
3203
+
3204
+ sage: # needs sage.rings.finite_rings
3205
+ sage: v = V([z+1, z+2])
3206
+ sage: f(z*v)
3207
+ (2*z^2 + z + 4, z^4 + 2*z^3 + 3*z^2 + z, 4*z^4 + 2*z^2 + 3*z + 2)
3208
+ sage: z^5 * f(v)
3209
+ (2*z^2 + z + 4, z^4 + 2*z^3 + 3*z^2 + z, 4*z^4 + 2*z^2 + 3*z + 2)
3210
+
3211
+ An example with a derivation::
3212
+
3213
+ sage: # needs sage.rings.finite_rings
3214
+ sage: R.<t> = ZZ[]
3215
+ sage: d = R.derivation()
3216
+ sage: M = R^2
3217
+ sage: Nabla = M.pseudohom([[1, t], [t^2, t^3]], d, side='right')
3218
+ sage: Nabla
3219
+ Free module pseudomorphism (twisted by d/dt) defined as left-multiplication by the matrix
3220
+ [ 1 t]
3221
+ [t^2 t^3]
3222
+ Domain: Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in t over Integer Ring
3223
+ Codomain: Ambient free module of rank 2 over the integral domain Univariate Polynomial Ring in t over Integer Ring
3224
+ sage: v = M([1,1])
3225
+ sage: Nabla(v)
3226
+ (t + 1, t^3 + t^2)
3227
+ sage: Nabla(t*v)
3228
+ (t^2 + t + 1, t^4 + t^3 + 1)
3229
+ sage: Nabla(t*v) == t * Nabla(v) + v
3230
+ True
3231
+
3232
+ If the twisting derivation is not zero, the domain must
3233
+ coerce into the codomain::
3234
+
3235
+ sage: # needs sage.rings.finite_rings
3236
+ sage: N = R^3
3237
+ sage: M.pseudohom([[1, t, t^2], [1, t^2, t^4]], d, codomain=N)
3238
+ Traceback (most recent call last):
3239
+ ...
3240
+ ValueError: the domain does not coerce into the codomain
3241
+
3242
+ .. SEEALSO::
3243
+
3244
+ :meth:`pseudoHom`
3245
+ """
3246
+ H = self.pseudoHom(twist, codomain)
3247
+ return H(f, side)
3248
+
3120
3249
  def inner_product_matrix(self):
3121
3250
  """
3122
3251
  Return the default identity inner product matrix associated to this
@@ -3164,7 +3293,7 @@ class FreeModule_generic(Module_free_ambient):
3164
3293
  """
3165
3294
  return True
3166
3295
 
3167
- def is_ambient(self):
3296
+ def is_ambient(self) -> bool:
3168
3297
  """
3169
3298
  Return ``False`` since this is not an ambient free module.
3170
3299
 
@@ -3189,7 +3318,7 @@ class FreeModule_generic(Module_free_ambient):
3189
3318
  """
3190
3319
  return False
3191
3320
 
3192
- def is_dense(self):
3321
+ def is_dense(self) -> bool:
3193
3322
  """
3194
3323
  Return ``True`` if the underlying representation of
3195
3324
  this module uses dense vectors, and ``False`` otherwise.
@@ -3203,7 +3332,7 @@ class FreeModule_generic(Module_free_ambient):
3203
3332
  """
3204
3333
  return not self.is_sparse()
3205
3334
 
3206
- def is_full(self):
3335
+ def is_full(self) -> bool:
3207
3336
  """
3208
3337
  Return ``True`` if the rank of this module equals its
3209
3338
  degree.
@@ -3218,7 +3347,7 @@ class FreeModule_generic(Module_free_ambient):
3218
3347
  """
3219
3348
  return self.rank() == self.degree()
3220
3349
 
3221
- def is_finite(self):
3350
+ def is_finite(self) -> bool:
3222
3351
  """
3223
3352
  Return ``True`` if the underlying set of this free module is finite.
3224
3353
 
@@ -4634,7 +4763,7 @@ class FreeModule_generic_field(FreeModule_generic_pid):
4634
4763
  B = [A1.linear_combination_of_rows(v.list()[:n]) for v in K.basis()]
4635
4764
  return self.ambient_vector_space().submodule(B, check=False)
4636
4765
 
4637
- def is_subspace(self, other):
4766
+ def is_subspace(self, other) -> bool:
4638
4767
  """
4639
4768
  ``True`` if this vector space is a subspace of ``other``.
4640
4769
 
@@ -5681,7 +5810,7 @@ class FreeModule_ambient(FreeModule_generic):
5681
5810
  t = "(%s)" % t
5682
5811
  return "%s^{%s}" % (t, self.rank())
5683
5812
 
5684
- def is_ambient(self):
5813
+ def is_ambient(self) -> bool:
5685
5814
  """
5686
5815
  Return ``True`` since this module is an ambient
5687
5816
  module.
@@ -7513,7 +7642,7 @@ class FreeModule_submodule_with_basis_pid(FreeModule_generic_pid):
7513
7642
  """
7514
7643
  return FreeModule(self.base_ring().fraction_field(), self.rank())(self.echelon_coordinates(v, check=check))
7515
7644
 
7516
- def has_user_basis(self):
7645
+ def has_user_basis(self) -> bool:
7517
7646
  """
7518
7647
  Return ``True`` if the basis of this free module is
7519
7648
  specified by the user, as opposed to being the default echelon
@@ -7663,7 +7792,7 @@ class FreeModule_submodule_pid(FreeModule_submodule_with_basis_pid):
7663
7792
  """
7664
7793
  return self.echelon_coordinate_vector(v, check=check)
7665
7794
 
7666
- def has_user_basis(self):
7795
+ def has_user_basis(self) -> bool:
7667
7796
  r"""
7668
7797
  Return ``True`` if the basis of this free module is
7669
7798
  specified by the user, as opposed to being the default echelon
@@ -7895,9 +8024,9 @@ class FreeModule_submodule_with_basis_field(FreeModule_generic_field, FreeModule
7895
8024
  # Return the first rank rows (i.e., the nonzero rows).
7896
8025
  return E.rows()[:E.rank()]
7897
8026
 
7898
- def is_ambient(self):
8027
+ def is_ambient(self) -> bool:
7899
8028
  """
7900
- Return False since this is not an ambient module.
8029
+ Return ``False`` since this is not an ambient module.
7901
8030
 
7902
8031
  EXAMPLES::
7903
8032
 
@@ -8150,7 +8279,7 @@ class FreeModule_submodule_field(FreeModule_submodule_with_basis_field):
8150
8279
  """
8151
8280
  return self.echelon_coordinate_vector(v, check=check)
8152
8281
 
8153
- def has_user_basis(self):
8282
+ def has_user_basis(self) -> bool:
8154
8283
  """
8155
8284
  Return ``True`` if the basis of this free module is
8156
8285
  specified by the user, as opposed to being the default echelon
@@ -3620,9 +3620,9 @@ cdef class FreeModuleElement(Vector): # abstract base class
3620
3620
  ...
3621
3621
  ArithmeticError: degrees (1 and 2) must be the same
3622
3622
  """
3623
- return (self.conjugate()).dot_product(right)
3623
+ return self.conjugate().dot_product(right)
3624
3624
 
3625
- def is_dense(self):
3625
+ def is_dense(self) -> bool:
3626
3626
  """
3627
3627
  Return ``True`` if this is a dense vector, which is just a
3628
3628
  statement about the data structure, not the number of nonzero
@@ -3640,7 +3640,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
3640
3640
  cdef bint is_dense_c(self) noexcept:
3641
3641
  return self.parent().is_dense()
3642
3642
 
3643
- def is_sparse(self):
3643
+ def is_sparse(self) -> bool:
3644
3644
  """
3645
3645
  Return ``True`` if this is a sparse vector, which is just a
3646
3646
  statement about the data structure, not the number of nonzero
@@ -3658,7 +3658,7 @@ cdef class FreeModuleElement(Vector): # abstract base class
3658
3658
  cdef bint is_sparse_c(self) noexcept:
3659
3659
  return self.parent().is_sparse()
3660
3660
 
3661
- def is_vector(self):
3661
+ def is_vector(self) -> bool:
3662
3662
  """
3663
3663
  Return ``True``, since this is a vector.
3664
3664
 
@@ -319,7 +319,7 @@ class FreeModule_submodule_with_basis_integer(FreeModule_submodule_with_basis_pi
319
319
  True
320
320
 
321
321
  sage: LLL = L.LLL()
322
- sage: LLL == L.reduced_basis or bool(LLL[0].norm() >= M[0].norm())
322
+ sage: LLL == L.reduced_basis or bool(LLL[0].norm() >= M[0].norm()) # needs sage.symbolic
323
323
  True
324
324
  """
325
325
  return self._reduced_basis
@@ -511,7 +511,7 @@ class FreeModule_submodule_with_basis_integer(FreeModule_submodule_with_basis_pi
511
511
  return abs(self.gram_matrix().determinant())
512
512
 
513
513
  @cached_method
514
- def is_unimodular(self):
514
+ def is_unimodular(self) -> bool:
515
515
  """
516
516
  Return ``True`` if this lattice is unimodular.
517
517
 
@@ -659,7 +659,7 @@ class BaseIsomorphism1D(Morphism):
659
659
  Multivariate Polynomial Ring in x, y over Rational Field
660
660
  To: Multivariate Polynomial Ring in x, y over Rational Field
661
661
  """
662
- def _repr_type(self):
662
+ def _repr_type(self) -> str:
663
663
  r"""
664
664
  EXAMPLES::
665
665
 
@@ -670,7 +670,7 @@ class BaseIsomorphism1D(Morphism):
670
670
  """
671
671
  return "Isomorphism"
672
672
 
673
- def is_injective(self):
673
+ def is_injective(self) -> bool:
674
674
  r"""
675
675
  EXAMPLES::
676
676
 
@@ -681,7 +681,7 @@ class BaseIsomorphism1D(Morphism):
681
681
  """
682
682
  return True
683
683
 
684
- def is_surjective(self):
684
+ def is_surjective(self) -> bool:
685
685
  r"""
686
686
  EXAMPLES::
687
687
 
@@ -0,0 +1,352 @@
1
+ # sage_setup: distribution = sagemath-modules
2
+ # sage.doctest: needs sage.rings.finite_rings
3
+ """
4
+ Space of 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
18
+ # of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
+ #
20
+ # See the GNU General Public License for more details; the full text
21
+ # is available at:
22
+ #
23
+ # https://www.gnu.org/licenses/
24
+ # ****************************************************************************
25
+
26
+ from sage.structure.unique_representation import UniqueRepresentation
27
+
28
+ from sage.categories.homset import HomsetWithBase
29
+ from sage.matrix.matrix_space import MatrixSpace
30
+ from sage.structure.sequence import Sequence
31
+ from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing
32
+ from sage.modules.free_module_pseudomorphism import FreeModulePseudoMorphism
33
+
34
+
35
+ class FreeModulePseudoHomspace(UniqueRepresentation, HomsetWithBase):
36
+ r"""
37
+ This class implements the space of pseudomorphisms with a fixed twist.
38
+
39
+ For free modules, the elements of a pseudomorphism correspond to matrices
40
+ which define the mapping on elements of a basis.
41
+
42
+ This class is not supposed to be instantiated directly; the user should
43
+ use instead the method :meth:`sage.rings.module.free_module.FreeModule_generic.pseudoHom`
44
+ to create a space of pseudomorphisms.
45
+
46
+ TESTS::
47
+
48
+ sage: F = GF(125)
49
+ sage: M = F^2
50
+ sage: Frob = F.frobenius_endomorphism()
51
+ sage: PHS = M.pseudoHom(Frob)
52
+ sage: h = PHS([[1, 2], [1, 1]])
53
+ sage: e = M((4*F.gen()^2 + F.gen() + 2, 4*F.gen()^2 + 4*F.gen() + 4))
54
+ sage: h(e)
55
+ (z3, 2*z3^2 + 3*z3 + 3)
56
+ """
57
+ Element = FreeModulePseudoMorphism
58
+
59
+ @staticmethod
60
+ def __classcall_private__(cls, domain, codomain, twist):
61
+ r"""
62
+ Constructs the space of pseudomorphisms with a given twist.
63
+
64
+ INPUT:
65
+
66
+ - ``domain`` -- a free module, the domain of this pseudomorphism
67
+
68
+ - ``codomain`` -- a free module, the codomain of this pseudomorphism
69
+
70
+ - ``twist`` -- a twisting morphism/derivation or the corresponding
71
+ Ore polynomial ring
72
+
73
+ TESTS::
74
+
75
+ sage: F = GF(125)
76
+ sage: Frob = F.frobenius_endomorphism()
77
+ sage: M = F^2
78
+ sage: H = M.pseudoHom(Frob)
79
+ sage: type(H)
80
+ <class 'sage.modules.free_module_pseudohomspace.FreeModulePseudoHomspace_with_category'>
81
+
82
+ sage: TestSuite(H).run()
83
+ """
84
+ ring = domain.base_ring()
85
+ if codomain.base_ring() is not ring:
86
+ raise ValueError("the domain and the codomain must be defined over the same ring")
87
+ if isinstance(twist, OrePolynomialRing):
88
+ ore = twist
89
+ if ore.base_ring() is not ring:
90
+ raise ValueError("base rings do not match")
91
+ else:
92
+ ore = OrePolynomialRing(ring, twist, names='x', polcast=False)
93
+ if ore._derivation is not None:
94
+ if not codomain.has_coerce_map_from(domain):
95
+ raise ValueError("the domain does not coerce into the codomain")
96
+ return cls.__classcall__(cls, domain, codomain, ore)
97
+
98
+ def __init__(self, domain, codomain, ore):
99
+ r"""
100
+ Initialize this pseudohom space.
101
+
102
+ INPUT:
103
+
104
+ - ``domain`` -- a free module, the domain of this pseudomorphism
105
+
106
+ - ``codomain`` -- a free module, the codomain of this pseudomorphism
107
+
108
+ - ``ore`` -- the underlying Ore polynomial ring (built from the
109
+ twisting morphism and derivation)
110
+
111
+ TESTS::
112
+
113
+ sage: F = GF(125)
114
+ sage: Frob = F.frobenius_endomorphism()
115
+ sage: M = F^2
116
+ sage: M.pseudoHom(Frob)
117
+ Set of Pseudoendomorphisms (twisted by z3 |--> z3^5) of
118
+ Vector space of dimension 2 over Finite Field in z3 of size 5^3
119
+ """
120
+ self._domain = domain
121
+ self._codomain = codomain
122
+ super().__init__(domain, codomain, category=None)
123
+ self._ore = ore
124
+ if isinstance(ore, OrePolynomialRing):
125
+ self._morphism = ore._morphism
126
+ self._derivation = ore._derivation
127
+ else:
128
+ self._morphism = self._derivation = None
129
+ ring = ore.base_ring()
130
+ self._matrix_space = MatrixSpace(ring, domain.dimension(), codomain.dimension())
131
+
132
+ def _element_constructor_(self, f, side="left"):
133
+ r"""
134
+ Return the element of this parent constructed from the
135
+ given data.
136
+
137
+ TESTS::
138
+
139
+ sage: F.<z> = GF(5^3)
140
+ sage: Frob = F.frobenius_endomorphism()
141
+ sage: V = F^2
142
+ sage: H = V.pseudoHom(Frob)
143
+
144
+ sage: H([[1, z], [z, z^2]])
145
+ Free module pseudomorphism (twisted by z |--> z^5) defined by the matrix
146
+ [ 1 z]
147
+ [ z z^2]
148
+ Domain: Vector space of dimension 2 over Finite Field in z of size 5^3
149
+ Codomain: Vector space of dimension 2 over Finite Field in z of size 5^3
150
+ """
151
+ return self.element_class(self, f, side)
152
+
153
+ def __reduce__(self):
154
+ r"""
155
+ TESTS::
156
+
157
+ sage: F = GF(125)
158
+ sage: Frob = F.frobenius_endomorphism()
159
+ sage: M = F^2
160
+ sage: H = M.pseudoHom(Frob)
161
+ sage: loads(dumps(M)) is M
162
+ True
163
+ """
164
+ if self._derivation is None:
165
+ twist = self._morphism
166
+ else:
167
+ twist = self._derivation
168
+ return FreeModulePseudoHomspace, (self.domain(), self.codomain(), twist)
169
+
170
+ def _repr_(self):
171
+ r"""
172
+ Returns a string representation of this pseudomorphism space.
173
+
174
+ EXAMPLES::
175
+
176
+ sage: Fq = GF(7^3)
177
+ sage: Frob = Fq.frobenius_endomorphism()
178
+ sage: V = Fq^2
179
+ sage: V.pseudoHom(Frob) # indirect doctest
180
+ Set of Pseudoendomorphisms (twisted by z3 |--> z3^7) of
181
+ Vector space of dimension 2 over Finite Field in z3 of size 7^3
182
+
183
+ ::
184
+
185
+ sage: V.pseudoHom(Frob, codomain=Fq^3) # indirect doctest
186
+ Set of Pseudomorphism (twisted by z3 |--> z3^7)
187
+ from Vector space of dimension 2 over Finite Field in z3 of size 7^3
188
+ to Vector space of dimension 3 over Finite Field in z3 of size 7^3
189
+
190
+ ::
191
+
192
+ sage: A.<t> = QQ[]
193
+ sage: d = A.derivation()
194
+ sage: M = A^3
195
+ sage: M.pseudoHom(d)
196
+ Set of Pseudoendomorphisms (twisted by d/dt) of Ambient free module of rank 3 over
197
+ the principal ideal domain Univariate Polynomial Ring in t over Rational Field
198
+ """
199
+ twist = self._ore._repr_twist()
200
+ if self.domain() is self.codomain():
201
+ return "Set of Pseudoendomorphisms (%s) of %s" % (twist, self.domain())
202
+ else:
203
+ return "Set of Pseudomorphism (%s) from %s to %s" % (twist, self.domain(), self.codomain())
204
+
205
+ def ore_ring(self, var='x'):
206
+ r"""
207
+ Return the underlying Ore polynomial ring, that is
208
+ the Ore polynomial ring over the base field twisted
209
+ by the twisting morphism and the twisting derivation
210
+ attached to this homspace.
211
+
212
+ INPUT:
213
+
214
+ - ``var`` -- string (default: ``x``) the name of
215
+ the variable
216
+
217
+ EXAMPLES::
218
+
219
+ sage: Fq.<z> = GF(7^3)
220
+ sage: Frob = Fq.frobenius_endomorphism()
221
+ sage: V = Fq^2
222
+ sage: H = V.pseudoHom(Frob)
223
+
224
+ sage: H.ore_ring()
225
+ Ore Polynomial Ring in x over Finite Field in z of size 7^3 twisted by z |--> z^7
226
+
227
+ sage: H.ore_ring('y')
228
+ Ore Polynomial Ring in y over Finite Field in z of size 7^3 twisted by z |--> z^7
229
+ """
230
+ return self._ore.change_var(var)
231
+
232
+ def matrix_space(self):
233
+ r"""
234
+ Return the matrix space used for representing the
235
+ pseudomorphisms in this space.
236
+
237
+ EXAMPLES::
238
+
239
+ sage: Fq.<z> = GF(7^3)
240
+ sage: Frob = Fq.frobenius_endomorphism()
241
+ sage: V = Fq^2
242
+ sage: W = Fq^3
243
+ sage: H = V.pseudoHom(Frob, codomain=W)
244
+ sage: H.matrix_space()
245
+ Full MatrixSpace of 2 by 3 dense matrices over Finite Field in z of size 7^3
246
+ """
247
+ return self._matrix_space
248
+
249
+ def basis(self, side="left"):
250
+ r"""
251
+ Return a basis for the underlying matrix space.
252
+
253
+ The result does not depend on the `side` of the homspace, i.e.
254
+ if matrices are acted upon on the left or on the right.
255
+
256
+ EXAMPLES::
257
+
258
+ sage: Fq = GF(7^3)
259
+ sage: Frob = Fq.frobenius_endomorphism()
260
+ sage: V = Fq^2
261
+ sage: PHS = V.pseudoHom(Frob)
262
+ sage: PHS.basis()
263
+ [Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix
264
+ [1 0]
265
+ [0 0]
266
+ Domain: Vector space of dimension 2 over Finite Field in z3 of size 7^3
267
+ Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3,
268
+ Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix
269
+ [0 1]
270
+ [0 0]
271
+ Domain: Vector space of dimension 2 over Finite Field in z3 of size 7^3
272
+ Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3,
273
+ Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix
274
+ [0 0]
275
+ [1 0]
276
+ Domain: Vector space of dimension 2 over Finite Field in z3 of size 7^3
277
+ Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3,
278
+ Free module pseudomorphism (twisted by z3 |--> z3^7) defined by the matrix
279
+ [0 0]
280
+ [0 1]
281
+ Domain: Vector space of dimension 2 over Finite Field in z3 of size 7^3
282
+ Codomain: Vector space of dimension 2 over Finite Field in z3 of size 7^3]
283
+ """
284
+ return Sequence(self(mat) for mat in self._matrix_space.basis())
285
+
286
+ def _test_additive_associativity(self, tester):
287
+ r"""
288
+ Test associativity for (not necessarily all) elements in this parent.
289
+
290
+ This test is not relevant for pseudomorphisms because they are not
291
+ stable by addition.
292
+
293
+ TESTS::
294
+
295
+ sage: Fq = GF(7^3)
296
+ sage: Frob = Fq.frobenius_endomorphism()
297
+ sage: V = Fq^2
298
+ sage: PHS = V.pseudoHom(Frob)
299
+ sage: TestSuite(PHS).run() # indirect doctest
300
+ """
301
+ pass
302
+
303
+ def _test_distributivity(self, tester):
304
+ r"""
305
+ Test distributivity for (not necessarily all) elements in this parent.
306
+
307
+ This test is not relevant for pseudomorphisms because they are not
308
+ stable by addition.
309
+
310
+ TESTS::
311
+
312
+ sage: Fq = GF(7^3)
313
+ sage: Frob = Fq.frobenius_endomorphism()
314
+ sage: V = Fq^2
315
+ sage: PHS = V.pseudoHom(Frob)
316
+ sage: TestSuite(PHS).run() # indirect doctest
317
+ """
318
+ pass
319
+
320
+ def _test_one(self, tester):
321
+ r"""
322
+ Test properties the identity element.
323
+
324
+ This test is not relevant for pseudomorphisms because the identity
325
+ is not a pseudomorphism in general.
326
+
327
+ TESTS::
328
+
329
+ sage: Fq = GF(7^3)
330
+ sage: Frob = Fq.frobenius_endomorphism()
331
+ sage: V = Fq^2
332
+ sage: PHS = V.pseudoHom(Frob)
333
+ sage: TestSuite(PHS).run() # indirect doctest
334
+ """
335
+ pass
336
+
337
+ def _test_zero(self, tester):
338
+ r"""
339
+ Test properties of the zero element.
340
+
341
+ This test is not relevant for pseudomorphisms because the zero
342
+ map is not a pseudomorphism in general.
343
+
344
+ TESTS::
345
+
346
+ sage: Fq = GF(7^3)
347
+ sage: Frob = Fq.frobenius_endomorphism()
348
+ sage: V = Fq^2
349
+ sage: PHS = V.pseudoHom(Frob)
350
+ sage: TestSuite(PHS).run() # indirect doctest
351
+ """
352
+ pass