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
@@ -535,11 +535,21 @@ class FreeModule_ambient_field_quotient(FreeModule_ambient_field):
535
535
 
536
536
  sage: Q((ZZ^3)([1,2,3]))
537
537
  (2, 3)
538
+
539
+ TESTS:
540
+
541
+ Ensure that :issue:`39507` is fixed::
542
+
543
+ sage: V = VectorSpace(GF(2),3)
544
+ sage: A = V.subspace([(0,1,0), (1,1,1)])
545
+ sage: B = A.subspace([])
546
+ sage: list(A/B)
547
+ [(0, 0), (1, 0), (0, 1), (1, 1)]
538
548
  """
539
549
  if isinstance(x, self.element_class) and x.parent() is self:
540
550
  return x
541
551
  if isinstance(x, (list, tuple)) and len(x) == self._domain.rank():
542
- return self.__quo_map(self._domain(x))
552
+ return self.__quo_map(self._domain.linear_combination_of_basis(x))
543
553
  return FreeModule_ambient_field._element_constructor_(self, x)
544
554
 
545
555
  def _coerce_map_from_(self, M):
sage/modules/submodule.py CHANGED
@@ -104,7 +104,7 @@ class Submodule_free_ambient(Module_free_ambient):
104
104
  sage: R.<x,y> = QQ[]
105
105
  sage: S = R.quotient([x*y])
106
106
  sage: M = FreeModule(S, 2)
107
- sage: M.zero_submodule()
107
+ sage: M.zero_submodule() # needs sage.libs.singular
108
108
  Submodule of Ambient free module of rank 2 over Quotient of Multivariate Polynomial Ring in x, y
109
109
  over Rational Field by the ideal (x*y)
110
110
  Generated by the rows of the matrix:
@@ -742,7 +742,7 @@ class TorsionQuadraticModule(FGP_Module_class, CachedRepresentation):
742
742
  return genus
743
743
  raise ValueError("this discriminant form and signature do not define a genus")
744
744
 
745
- def is_genus(self, signature_pair, even=True):
745
+ def is_genus(self, signature_pair, even=True) -> bool:
746
746
  r"""
747
747
  Return ``True`` if there is a lattice with this signature and discriminant form.
748
748
 
@@ -67,11 +67,11 @@ cdef Py_ssize_t mpz_binary_search0(mpz_t* v, Py_ssize_t n, mpz_t x) noexcept:
67
67
  j = n-1
68
68
  while i<=j:
69
69
  if i == j:
70
- if mpz_cmp(v[i],x) == 0:
70
+ if mpz_cmp(v[i], x) == 0:
71
71
  return i
72
72
  return -1
73
73
  k = (i+j)/2
74
- c = mpz_cmp(v[k],x)
74
+ c = mpz_cmp(v[k], x)
75
75
  if c > 0: # v[k] > x
76
76
  j = k-1
77
77
  elif c < 0: # v[k] < x
@@ -104,9 +104,9 @@ cdef Py_ssize_t mpz_binary_search(mpz_t* v, Py_ssize_t n, mpz_t x, Py_ssize_t* i
104
104
  return -1
105
105
  i = 0
106
106
  j = n-1
107
- while i<=j:
107
+ while i <= j:
108
108
  if i == j:
109
- c = mpz_cmp(v[i],x)
109
+ c = mpz_cmp(v[i], x)
110
110
  if c == 0: # v[i] == x
111
111
  ins[0] = i
112
112
  return i
@@ -309,7 +309,7 @@ cdef class Vector_rational_dense(free_module_element.FreeModuleElement):
309
309
  r = right
310
310
  z = self._new_c()
311
311
  cdef Py_ssize_t i
312
- for i in range(self._degree):
312
+ for i in range(self._degree):
313
313
  mpq_mul(z._entries[i], self._entries[i], r._entries[i])
314
314
  return z
315
315
 
@@ -74,11 +74,11 @@ cdef Py_ssize_t mpq_binary_search0(mpq_t* v, Py_ssize_t n, mpq_t x) noexcept:
74
74
  j = n-1
75
75
  while i<=j:
76
76
  if i == j:
77
- if mpq_equal(v[i],x):
77
+ if mpq_equal(v[i], x):
78
78
  return i
79
79
  return -1
80
80
  k = (i+j)/2
81
- c = mpq_cmp(v[k],x)
81
+ c = mpq_cmp(v[k], x)
82
82
  if c > 0: # v[k] > x
83
83
  j = k-1
84
84
  elif c < 0: # v[k] < x
@@ -113,7 +113,7 @@ cdef Py_ssize_t mpq_binary_search(mpq_t* v, Py_ssize_t n, mpq_t x, Py_ssize_t* i
113
113
  j = n-1
114
114
  while i<=j:
115
115
  if i == j:
116
- c = mpq_cmp(v[i],x)
116
+ c = mpq_cmp(v[i], x)
117
117
  if c == 0: # v[i] == x
118
118
  ins[0] = i
119
119
  return i
@@ -148,7 +148,7 @@ cdef int mpq_vector_get_entry(mpq_t ans, mpq_vector* v, Py_ssize_t n) except -1:
148
148
  cdef Py_ssize_t m
149
149
  m = binary_search0(v.positions, v.num_nonzero, n)
150
150
  if m == -1:
151
- mpq_set_si(ans, 0,1)
151
+ mpq_set_si(ans, 0, 1)
152
152
  return 0
153
153
  mpq_set(ans, v.entries[m])
154
154
  return 0
@@ -280,7 +280,7 @@ cdef int add_mpq_vector_init(mpq_vector* sum,
280
280
 
281
281
  mpq_init(tmp)
282
282
  # Do not do the multiply if the multiple is 1.
283
- do_multiply = mpq_cmp_si(multiple, 1,1)
283
+ do_multiply = mpq_cmp_si(multiple, 1, 1)
284
284
 
285
285
  z = sum
286
286
  # ALGORITHM:
@@ -891,9 +891,9 @@ class VectorSpaceMorphism(free_module_morphism.FreeModuleMorphism):
891
891
  A = homspace._matrix_space(side)(A)
892
892
  free_module_morphism.FreeModuleMorphism.__init__(self, homspace, A, side)
893
893
 
894
- def is_invertible(self):
894
+ def is_invertible(self) -> bool:
895
895
  r"""
896
- Determines if the vector space morphism has an inverse.
896
+ Determine if the vector space morphism has an inverse.
897
897
 
898
898
  OUTPUT:
899
899
 
@@ -172,6 +172,15 @@ class CellModule(CombinatorialFreeModule):
172
172
  sage: matrix([[W._bilinear_form_on_basis(s, t) for t in K] for s in K])
173
173
  [1 0]
174
174
  [0 1]
175
+
176
+ TESTS::
177
+
178
+ sage: C5.<z5> = CyclotomicField(5)
179
+ sage: TL = TemperleyLiebAlgebra(2, z5 + ~z5, C5)
180
+ sage: m = TL.cell_module(0)
181
+ sage: c = m.basis().keys()[0]
182
+ sage: m._bilinear_form_on_basis(c, c)
183
+ -z5^3 - z5^2 - 1
175
184
  """
176
185
  B = self._algebra.basis()
177
186
  elt = B[(self._la, s, s)] * B[(self._la, t, t)]
@@ -243,6 +252,14 @@ class CellModule(CombinatorialFreeModule):
243
252
  sage: W = S.cell_module([2,1])
244
253
  sage: W.nonzero_bilinear_form()
245
254
  True
255
+
256
+ TESTS::
257
+
258
+ sage: C5.<z5> = CyclotomicField(5)
259
+ sage: TL = TemperleyLiebAlgebra(2, z5 + ~z5, C5)
260
+ sage: m = TL.cell_module(0)
261
+ sage: m.nonzero_bilinear_form()
262
+ True
246
263
  """
247
264
  C = list(self.basis().keys())
248
265
  # Since the bilinear form is symmetric, it is sufficient
@@ -863,7 +863,7 @@ cdef class IndexedFreeModuleElement(ModuleElement):
863
863
  zero = free_module.base_ring().zero()
864
864
  if sparse:
865
865
  if order is None:
866
- order = {k: i for i,k in enumerate(self._parent.get_order())}
866
+ order = {k: i for i, k in enumerate(self._parent.get_order())}
867
867
  return free_module.element_class(free_module,
868
868
  {order[k]: c for k, c in d.items()},
869
869
  coerce=True, copy=False)
@@ -998,7 +998,7 @@ class FiniteDimensionalTwistedInvariantModule(SubmoduleWithBasis):
998
998
  but you still may pass elements of ``M``, which is an instance of
999
999
  :class:`~sage.combinat.free_module.CombinatorialFreeModule`,
1000
1000
  because the underlying ``Representation`` is built off of ``M``
1001
- and we can cannonically construct elements of the ``Representation``
1001
+ and we can canonically construct elements of the ``Representation``
1002
1002
  from elements of ``M``.
1003
1003
 
1004
1004
  ::
@@ -2879,7 +2879,6 @@ class SchurFunctorRepresentation(Subrepresentation):
2879
2879
  from sage.combinat.symmetric_group_algebra import SymmetricGroupAlgebra
2880
2880
  from sage.groups.perm_gps.permgroup_named import SymmetricGroup
2881
2881
  from sage.categories.tensor import tensor
2882
- from sage.matrix.matrix_space import MatrixSpace
2883
2882
 
2884
2883
  R = V.base_ring()
2885
2884
  self._shape = shape
@@ -357,7 +357,7 @@ class SubmoduleWithBasis(CombinatorialFreeModule):
357
357
  """
358
358
  return self.lift.section()
359
359
 
360
- def is_submodule(self, other):
360
+ def is_submodule(self, other) -> bool:
361
361
  r"""
362
362
  Return whether ``self`` is a submodule of ``other``.
363
363
 
@@ -485,7 +485,7 @@ class SubmoduleWithBasis(CombinatorialFreeModule):
485
485
  V = A.submodule([A([vec[supp] for supp in supp_order]) for vec in other._basis], check=False)
486
486
  return (U, V)
487
487
 
488
- def is_equal_subspace(self, other):
488
+ def is_equal_subspace(self, other) -> bool:
489
489
  r"""
490
490
  Return whether ``self`` is an equal submodule to ``other``.
491
491
 
@@ -1223,7 +1223,7 @@ class BinaryQF(SageObject):
1223
1223
  self._cycle_list = C
1224
1224
  return self._cycle_list
1225
1225
 
1226
- def is_positive_definite(self):
1226
+ def is_positive_definite(self) -> bool:
1227
1227
  """
1228
1228
  Return ``True`` if ``self`` is positive definite, i.e., has
1229
1229
  negative discriminant with `a > 0`.
@@ -1241,7 +1241,7 @@ class BinaryQF(SageObject):
1241
1241
 
1242
1242
  is_posdef = is_positive_definite
1243
1243
 
1244
- def is_negative_definite(self):
1244
+ def is_negative_definite(self) -> bool:
1245
1245
  """
1246
1246
  Return ``True`` if ``self`` is negative definite, i.e., has
1247
1247
  negative discriminant with `a < 0`.
@@ -1258,7 +1258,7 @@ class BinaryQF(SageObject):
1258
1258
 
1259
1259
  is_negdef = is_negative_definite
1260
1260
 
1261
- def is_indefinite(self):
1261
+ def is_indefinite(self) -> bool:
1262
1262
  """
1263
1263
  Return whether ``self`` is indefinite, i.e., has positive discriminant.
1264
1264
 
@@ -1272,7 +1272,7 @@ class BinaryQF(SageObject):
1272
1272
 
1273
1273
  is_indef = is_indefinite
1274
1274
 
1275
- def is_singular(self):
1275
+ def is_singular(self) -> bool:
1276
1276
  """
1277
1277
  Return whether ``self`` is singular, i.e., has zero discriminant.
1278
1278
 
@@ -1287,7 +1287,7 @@ class BinaryQF(SageObject):
1287
1287
  """
1288
1288
  return self.discriminant().is_zero()
1289
1289
 
1290
- def is_nonsingular(self):
1290
+ def is_nonsingular(self) -> bool:
1291
1291
  """
1292
1292
  Return whether this form is nonsingular, i.e., has nonzero discriminant.
1293
1293
 
@@ -1302,7 +1302,7 @@ class BinaryQF(SageObject):
1302
1302
  """
1303
1303
  return not self.discriminant().is_zero()
1304
1304
 
1305
- def is_equivalent(self, other, proper=True):
1305
+ def is_equivalent(self, other, proper=True) -> bool:
1306
1306
  """
1307
1307
  Return whether ``self`` is equivalent to ``other``.
1308
1308
 
@@ -1432,7 +1432,7 @@ class BinaryQF(SageObject):
1432
1432
  return False
1433
1433
 
1434
1434
  @cached_method
1435
- def is_reduced(self):
1435
+ def is_reduced(self) -> bool:
1436
1436
  r"""
1437
1437
  Return whether ``self`` is reduced.
1438
1438
 
@@ -574,7 +574,7 @@ class BQFClassGroup_element(AdditiveGroupElement):
574
574
  """
575
575
  return self._form < other._form
576
576
 
577
- def __bool__(self):
577
+ def __bool__(self) -> bool:
578
578
  r"""
579
579
  Return ``True`` if this form class is *not* the principal class
580
580
  and ``False`` otherwise.
@@ -589,7 +589,7 @@ class BQFClassGroup_element(AdditiveGroupElement):
589
589
  """
590
590
  return self != self.parent().zero()
591
591
 
592
- def is_zero(self):
592
+ def is_zero(self) -> bool:
593
593
  r"""
594
594
  Return ``True`` if this form class is the principal class and
595
595
  ``False`` otherwise.
@@ -604,7 +604,7 @@ class BQFClassGroup_element(AdditiveGroupElement):
604
604
  """
605
605
  return not self
606
606
 
607
- def __repr__(self):
607
+ def __repr__(self) -> str:
608
608
  r"""
609
609
  Return a string representation of this form class.
610
610
 
@@ -651,89 +651,18 @@ class BQFClassGroup_element(AdditiveGroupElement):
651
651
  return order_from_multiple(self, self.parent().cardinality())
652
652
 
653
653
 
654
- def _project_bqf(bqf, q):
655
- r"""
656
- Internal helper function to compute the image of a
657
- :class:`BQFClassGroup_element` of discriminant `D`
658
- in the form class group of discriminant `D/q^2`.
659
-
660
- ALGORITHM: Find a class representative with `q^2 \mid a`
661
- (and `q \mid b`) and substitute `x\mapsto x/q`.
662
-
663
- EXAMPLES::
664
-
665
- sage: from sage.quadratic_forms.bqf_class_group import _project_bqf
666
- sage: f1 = BinaryQF([4, 2, 105])
667
- sage: f2 = _project_bqf(f1, 2); f2
668
- x^2 + x*y + 105*y^2
669
- sage: f1.discriminant().factor()
670
- -1 * 2^2 * 419
671
- sage: f2.discriminant().factor()
672
- -1 * 419
673
-
674
- ::
675
-
676
- sage: f1 = BinaryQF([109, 92, 113])
677
- sage: f2 = _project_bqf(f1, 101); f2
678
- 53*x^2 - 152*x*y + 109*y^2
679
- sage: f1.discriminant().factor()
680
- -1 * 2^2 * 101^2
681
- sage: f2.discriminant().factor()
682
- -1 * 2^2
683
- """
684
- q2 = q**2
685
- disc = bqf.discriminant()
686
- if not q2.divides(disc) or disc//q2 % 4 not in (0, 1):
687
- raise ValueError('discriminant not divisible by q^2')
688
-
689
- a, b, c = bqf
690
-
691
- # lucky case: q^2|c (and q|b)
692
- if q2.divides(c):
693
- a, b, c = c, -b, a
694
-
695
- # general case: neither q^2|a nor q^2|c
696
- elif not q2.divides(a):
697
-
698
- # represent some multiple of q^2
699
- R = Zmod(q2)
700
- x = polygen(R)
701
- for v in R:
702
- eq = a*x**2 + b*x*v + c*v**2
703
- try:
704
- u = eq.any_root()
705
- except (ValueError, IndexError): # why IndexError? see #37034
706
- continue
707
- if u or v:
708
- break
709
- else:
710
- assert False
711
-
712
- # find equivalent form with q^2|a (and q|b)
713
- u, v = map(ZZ, (u, v))
714
- assert q2.divides(bqf(u, v))
715
- if not v:
716
- v += q
717
- g, r, s = u.xgcd(v)
718
- assert g.is_one()
719
- M = matrix(ZZ, [[u, -v], [s, r]])
720
- assert M.det().is_one()
721
- a, b, c = bqf * M
722
-
723
- # remaining case: q^2|a (and q|b)
724
- assert q2.divides(a)
725
- assert q.divides(b)
726
- return BinaryQF(a//q2, b//q, c)
727
-
728
-
729
654
  class BQFClassGroupQuotientMorphism(Morphism):
730
655
  r"""
731
656
  Let `D` be a discriminant and `f > 0` an integer.
732
657
 
733
658
  Given the class groups `G` and `H` of discriminants `f^2 D` and `D`,
734
659
  this class represents the natural projection morphism `G \to H` which
735
- is defined by finding a class representative `[a,b,c]` satisfying
736
- `f^2 \mid a` and `f \mid b` and substituting `x \mapsto x/f`.
660
+ is defined by composing the class representative `[a,b,c]` with the
661
+ principal form of the target discriminant.
662
+
663
+ Alternatively, evaluating this map can be characterized as finding a
664
+ class representative `[a,b,c]` satisfying `f^2 \mid a` and `f \mid b`
665
+ and substituting `x \mapsto x/f`.
737
666
 
738
667
  This map is a well-defined group homomorphism.
739
668
 
@@ -763,6 +692,17 @@ class BQFClassGroupQuotientMorphism(Morphism):
763
692
  sage: elt2 = G.random_element()
764
693
  sage: proj(elt1 + elt2) == proj(elt1) + proj(elt2)
765
694
  True
695
+
696
+ Check that it satisfies compatibility::
697
+
698
+ sage: ff = f * randrange(1, 10^3)
699
+ sage: F = BQFClassGroup(ff^2*D)
700
+ sage: proj = F.hom(H)
701
+ sage: proj1 = F.hom(G)
702
+ sage: proj2 = G.hom(H)
703
+ sage: elt = F.random_element()
704
+ sage: proj(elt) == proj2(proj1(elt))
705
+ True
766
706
  """
767
707
  def __init__(self, G, H):
768
708
  r"""
@@ -781,9 +721,8 @@ class BQFClassGroupQuotientMorphism(Morphism):
781
721
  raise TypeError('G needs to be a BQFClassGroup')
782
722
  if not isinstance(H, BQFClassGroup):
783
723
  raise TypeError('H needs to be a BQFClassGroup')
784
- try:
785
- self.f = ZZ((G.discriminant() / H.discriminant()).sqrt(extend=False)).factor()
786
- except ValueError:
724
+ f2 = ZZ(G.discriminant() / H.discriminant())
725
+ if not f2.is_square():
787
726
  raise ValueError('morphism only defined when disc(G) = f^2 * disc(H)')
788
727
  super().__init__(G, H)
789
728
 
@@ -793,22 +732,17 @@ class BQFClassGroupQuotientMorphism(Morphism):
793
732
 
794
733
  EXAMPLES::
795
734
 
796
- sage: from sage.quadratic_forms.bqf_class_group import BQFClassGroupQuotientMorphism, _project_bqf
735
+ sage: from sage.quadratic_forms.bqf_class_group import BQFClassGroupQuotientMorphism
797
736
  sage: G = BQFClassGroup(-4*117117)
798
737
  sage: H = BQFClassGroup(-4*77)
799
738
  sage: proj = BQFClassGroupQuotientMorphism(G, H)
800
739
  sage: elt = G(BinaryQF(333, 306, 422))
801
740
  sage: proj(elt)
802
741
  Class of 9*x^2 + 4*x*y + 9*y^2
803
- sage: proj(elt) == H(_project_bqf(_project_bqf(elt.form(), 3), 13))
804
- True
805
- sage: proj(elt) == H(_project_bqf(_project_bqf(elt.form(), 13), 3))
806
- True
807
742
 
808
- ALGORITHM: Repeated application of :func:`_project_bqf` for the prime factors in `f`.
743
+ ALGORITHM: [Buell89]_, Theorem 7.9
809
744
  """
745
+ one = BinaryQF.principal(self.codomain().discriminant())
810
746
  bqf = elt.form()
811
- for q, m in self.f:
812
- for _ in range(m):
813
- bqf = _project_bqf(bqf, q)
747
+ bqf *= one
814
748
  return self.codomain()(bqf)
@@ -9,7 +9,7 @@ from sage.arith.misc import legendre_symbol
9
9
  from sage.rings.integer_ring import ZZ
10
10
 
11
11
 
12
- def is_triangular_number(n, return_value=False):
12
+ def is_triangular_number(n, return_value=False) -> bool | tuple:
13
13
  """
14
14
  Return whether ``n`` is a triangular number.
15
15
 
@@ -84,7 +84,7 @@ def quadratic_form_from_invariants(F, rk, det, P, sminus):
84
84
 
85
85
  OUTPUT: a quadratic form with the specified invariants
86
86
 
87
- Let `(a_1, \ldots, a_n)` be the gram marix of a regular quadratic space.
87
+ Let `(a_1, \ldots, a_n)` be the Gram matrix of a regular quadratic space.
88
88
  Then Cassel's Hasse invariant is defined as
89
89
 
90
90
  .. MATH::
@@ -1216,7 +1216,7 @@ class QuadraticForm(SageObject):
1216
1216
  sage: A.base_ring()
1217
1217
  Integer Ring
1218
1218
  """
1219
- A = (ZZ(1) / ZZ(2)) * self.matrix()
1219
+ A = (ZZ.one() / ZZ(2)) * self.matrix()
1220
1220
  n = self.dim()
1221
1221
 
1222
1222
  # Test to see if it has an integral Gram matrix
@@ -1230,11 +1230,12 @@ class QuadraticForm(SageObject):
1230
1230
  return MatrixSpace(self.base_ring(), n, n)(A)
1231
1231
  raise TypeError("this form does not have an integral Gram matrix")
1232
1232
 
1233
- def has_integral_Gram_matrix(self):
1233
+ def has_integral_Gram_matrix(self) -> bool:
1234
1234
  r"""
1235
1235
  Return whether the quadratic form has an integral Gram matrix (with respect to its base ring).
1236
1236
 
1237
- A warning is issued if the form is defined over a field, since in that case the return is trivially true.
1237
+ A warning is issued if the form is defined over a field,
1238
+ since in that case the return is trivially true.
1238
1239
 
1239
1240
  EXAMPLES::
1240
1241
 
@@ -6,6 +6,8 @@ AUTHORS:
6
6
 
7
7
  - Anna Haensch (2014-12-01): added test for rational isometry
8
8
  """
9
+ from typing import Any
10
+
9
11
  from sage.arith.misc import (hilbert_symbol,
10
12
  GCD,
11
13
  is_prime,
@@ -21,7 +23,7 @@ from sage.rings.rational_field import QQ
21
23
  # (For now, we require both forms to be positive definite.) #
22
24
  ##############################################################################
23
25
 
24
- def is_globally_equivalent_to(self, other, return_matrix=False):
26
+ def is_globally_equivalent_to(self, other, return_matrix=False) -> bool | Any:
25
27
  r"""
26
28
  Determine if the current quadratic form is equivalent to the
27
29
  given form over `\ZZ`.
@@ -115,7 +117,8 @@ def is_globally_equivalent_to(self, other, return_matrix=False):
115
117
  return True
116
118
 
117
119
 
118
- def is_locally_equivalent_to(self, other, check_primes_only=False, force_jordan_equivalence_test=False):
120
+ def is_locally_equivalent_to(self, other, check_primes_only=False,
121
+ force_jordan_equivalence_test=False) -> bool:
119
122
  r"""
120
123
  Determine if the current quadratic form (defined over `\ZZ`) is
121
124
  locally equivalent to the given form over the real numbers and the
@@ -173,7 +176,7 @@ def is_locally_equivalent_to(self, other, check_primes_only=False, force_jordan_
173
176
  return True
174
177
 
175
178
 
176
- def has_equivalent_Jordan_decomposition_at_prime(self, other, p):
179
+ def has_equivalent_Jordan_decomposition_at_prime(self, other, p) -> bool:
177
180
  """
178
181
  Determine if the given quadratic form has a Jordan decomposition
179
182
  equivalent to that of ``self``.
@@ -299,7 +302,7 @@ def has_equivalent_Jordan_decomposition_at_prime(self, other, p):
299
302
  raise TypeError("this should not have happened")
300
303
 
301
304
 
302
- def is_rationally_isometric(self, other, return_matrix=False):
305
+ def is_rationally_isometric(self, other, return_matrix=False) -> bool | Any:
303
306
  """
304
307
  Determine if two regular quadratic forms over a number field are isometric.
305
308
 
@@ -617,7 +617,7 @@ def is_hyperbolic(self, p) -> bool:
617
617
  self.hasse_invariant(p) == 1)
618
618
 
619
619
 
620
- def is_anisotropic(self, p):
620
+ def is_anisotropic(self, p) -> bool:
621
621
  r"""
622
622
  Check if the quadratic form is anisotropic over the `p`-adic numbers `\QQ_p` or `\RR`.
623
623
 
@@ -687,7 +687,7 @@ def is_anisotropic(self, p):
687
687
  raise NotImplementedError("we have not established a convention for 0-dim'l quadratic forms")
688
688
 
689
689
 
690
- def is_isotropic(self, p):
690
+ def is_isotropic(self, p) -> bool:
691
691
  r"""
692
692
  Check if `Q` is isotropic over the `p`-adic numbers `\QQ_p` or `\RR`.
693
693
 
@@ -926,9 +926,9 @@ def compute_definiteness_string_by_determinants(self):
926
926
  return "pos_def" if first_coeff > 0 else "neg_def"
927
927
 
928
928
 
929
- def is_positive_definite(self):
929
+ def is_positive_definite(self) -> bool:
930
930
  """
931
- Determines if the given quadratic form is positive-definite.
931
+ Determine if the given quadratic form is positive-definite.
932
932
 
933
933
  .. NOTE::
934
934
 
@@ -963,9 +963,9 @@ def is_positive_definite(self):
963
963
  return (def_str == "pos_def") or (def_str == "zero")
964
964
 
965
965
 
966
- def is_negative_definite(self):
966
+ def is_negative_definite(self) -> bool:
967
967
  """
968
- Determines if the given quadratic form is negative-definite.
968
+ Determine if the given quadratic form is negative-definite.
969
969
 
970
970
  .. NOTE::
971
971
 
@@ -1000,9 +1000,9 @@ def is_negative_definite(self):
1000
1000
  return (def_str == "neg_def") or (def_str == "zero")
1001
1001
 
1002
1002
 
1003
- def is_indefinite(self):
1003
+ def is_indefinite(self) -> bool:
1004
1004
  """
1005
- Determines if the given quadratic form is indefinite.
1005
+ Determine if the given quadratic form is indefinite.
1006
1006
 
1007
1007
  .. NOTE::
1008
1008
 
@@ -1037,9 +1037,9 @@ def is_indefinite(self):
1037
1037
  return def_str == "indefinite"
1038
1038
 
1039
1039
 
1040
- def is_definite(self):
1040
+ def is_definite(self) -> bool:
1041
1041
  """
1042
- Determines if the given quadratic form is (positive or negative) definite.
1042
+ Determine if the given quadratic form is (positive or negative) definite.
1043
1043
 
1044
1044
  .. NOTE::
1045
1045
 
@@ -90,7 +90,7 @@ def content(self):
90
90
 
91
91
 
92
92
  # in quadratic_form.py
93
- # def is_primitive(self):
93
+ # def is_primitive(self) -> bool:
94
94
  # """
95
95
  # Checks if the form is a multiple of another form... only over ZZ for now.
96
96
  # """
@@ -111,7 +111,7 @@ def content(self):
111
111
 
112
112
  def adjoint(self):
113
113
  """
114
- This gives the adjoint (integral) quadratic form associated to the
114
+ Return the adjoint (integral) quadratic form associated to the
115
115
  given form, essentially defined by taking the adjoint of the matrix.
116
116
 
117
117
  EXAMPLES::