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.
- {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +49 -44
- {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +320 -314
- passagemath_modules.dylibs/libmpc.3.dylib +0 -0
- passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
- sage/algebras/clifford_algebra.py +2 -2
- sage/algebras/clifford_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/clifford_algebra_element.pyx +4 -2
- sage/algebras/exterior_algebra_groebner.cpython-310-darwin.so +0 -0
- sage/algebras/exterior_algebra_groebner.pyx +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +83 -5
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +28 -3
- sage/algebras/finite_gca.py +1 -1
- sage/algebras/lie_algebras/bgg_dual_module.py +18 -11
- sage/algebras/lie_algebras/classical_lie_algebra.py +3 -3
- sage/algebras/lie_algebras/examples.py +2 -2
- sage/algebras/lie_algebras/free_lie_algebra.py +1 -1
- sage/algebras/lie_algebras/heisenberg.py +4 -4
- sage/algebras/lie_algebras/lie_algebra.py +1 -1
- sage/algebras/lie_algebras/lie_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/lie_algebras/lie_algebra_element.pyx +63 -27
- sage/algebras/lie_algebras/quotient.py +40 -29
- sage/algebras/lie_algebras/subalgebra.py +76 -53
- sage/algebras/lie_algebras/verma_module.py +1 -3
- sage/algebras/octonion_algebra.cpython-310-darwin.so +0 -0
- sage/algebras/octonion_algebra.pyx +1 -1
- sage/algebras/orlik_solomon.py +4 -4
- sage/algebras/orlik_terao.py +4 -4
- sage/algebras/steenrod/steenrod_algebra.py +37 -30
- sage/algebras/steenrod/steenrod_algebra_bases.py +2 -2
- sage/algebras/steenrod/steenrod_algebra_misc.py +4 -4
- sage/algebras/steenrod/steenrod_algebra_mult.py +2 -2
- sage/all__sagemath_modules.py +1 -0
- sage/calculus/integration.cpython-310-darwin.so +0 -0
- sage/calculus/integration.pyx +6 -5
- sage/calculus/interpolation.cpython-310-darwin.so +0 -0
- sage/calculus/interpolators.cpython-310-darwin.so +0 -0
- sage/calculus/ode.cpython-310-darwin.so +0 -0
- sage/calculus/ode.pxd +2 -2
- sage/calculus/ode.pyx +6 -4
- sage/calculus/riemann.cpython-310-darwin.so +0 -0
- sage/calculus/riemann.pyx +68 -48
- sage/calculus/transforms/dwt.cpython-310-darwin.so +0 -0
- sage/calculus/transforms/fft.cpython-310-darwin.so +0 -0
- sage/coding/ag_code_decoders.cpython-310-darwin.so +0 -0
- sage/coding/ag_code_decoders.pyx +31 -31
- sage/coding/binary_code.cpython-310-darwin.so +0 -0
- sage/coding/binary_code.pxd +6 -6
- sage/coding/binary_code.pyx +212 -173
- sage/coding/guruswami_sudan/utils.py +3 -5
- sage/coding/kasami_codes.cpython-310-darwin.so +0 -0
- sage/coding/kasami_codes.pyx +20 -24
- sage/coding/linear_code.py +2 -2
- sage/coding/linear_code_no_metric.py +5 -5
- sage/coding/linear_rank_metric.py +81 -19
- sage/combinat/free_module.py +22 -2
- sage/combinat/root_system/ambient_space.py +1 -1
- sage/combinat/root_system/associahedron.py +4 -4
- sage/combinat/root_system/braid_move_calculator.py +1 -1
- sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
- sage/combinat/root_system/branching_rules.py +2 -2
- sage/combinat/root_system/cartan_type.py +14 -14
- sage/combinat/root_system/coxeter_group.py +2 -2
- sage/combinat/root_system/coxeter_type.py +11 -0
- sage/combinat/root_system/extended_affine_weyl_group.py +8 -8
- sage/combinat/root_system/fundamental_group.py +2 -4
- sage/combinat/root_system/hecke_algebra_representation.py +1 -1
- sage/combinat/root_system/pieri_factors.py +2 -2
- sage/combinat/root_system/root_lattice_realization_algebras.py +1 -1
- sage/combinat/root_system/root_lattice_realizations.py +1 -1
- sage/combinat/root_system/type_folded.py +3 -3
- sage/combinat/root_system/type_reducible.py +8 -7
- sage/combinat/root_system/type_super_A.py +2 -2
- sage/combinat/root_system/weight_lattice_realizations.py +9 -8
- sage/combinat/root_system/weyl_characters.py +1 -1
- sage/crypto/__init__.py +1 -0
- sage/crypto/block_cipher/des.py +1 -1
- sage/crypto/block_cipher/miniaes.py +3 -3
- sage/crypto/block_cipher/present.py +3 -3
- sage/crypto/block_cipher/sdes.py +3 -3
- sage/crypto/boolean_function.cpython-310-darwin.so +0 -0
- sage/crypto/boolean_function.pyx +22 -23
- sage/crypto/key_exchange/diffie_hellman.py +4 -9
- sage/crypto/mq/sr.py +1 -1
- sage/crypto/public_key/blum_goldwasser.py +3 -3
- sage/crypto/sbox.cpython-310-darwin.so +0 -0
- sage/crypto/sbox.pyx +1 -1
- sage/crypto/sboxes.py +22 -0
- sage/crypto/util.py +4 -6
- sage/ext/interpreters/__init__.py +1 -1
- sage/ext/interpreters/all__sagemath_modules.py +1 -1
- sage/ext/interpreters/wrapper_cc.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_cc.pxd +5 -5
- sage/ext/interpreters/wrapper_cc.pyx +1 -1
- sage/ext/interpreters/wrapper_cdf.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_cdf.pxd +5 -7
- sage/ext/interpreters/wrapper_cdf.pyx +4 -10
- sage/ext/interpreters/wrapper_rdf.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_rdf.pxd +1 -1
- sage/ext/interpreters/wrapper_rdf.pyx +1 -1
- sage/ext/interpreters/wrapper_rr.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_rr.pxd +5 -5
- sage/ext/interpreters/wrapper_rr.pyx +1 -2
- sage/geometry/toric_lattice.py +3 -3
- sage/geometry/toric_lattice_element.cpython-310-darwin.so +0 -0
- sage/groups/additive_abelian/additive_abelian_group.py +1 -1
- sage/groups/additive_abelian/qmodnz.py +4 -4
- sage/groups/matrix_gps/coxeter_group.py +17 -4
- sage/groups/matrix_gps/group_element.cpython-310-darwin.so +0 -0
- sage/groups/misc_gps/argument_groups.py +2 -2
- sage/groups/misc_gps/imaginary_groups.py +4 -4
- sage/groups/perm_gps/partn_ref/refinement_binary.cpython-310-darwin.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-310-darwin.so +0 -0
- sage/homology/chain_complex.py +0 -2
- sage/homology/hochschild_complex.py +3 -3
- sage/homology/homology_morphism.py +6 -6
- sage/homology/homology_vector_space_with_basis.py +1 -1
- sage/libs/gsl/array.cpython-310-darwin.so +0 -0
- sage/libs/mpmath/utils.cpython-310-darwin.so +0 -0
- sage/matrix/action.cpython-310-darwin.so +0 -0
- sage/matrix/args.cpython-310-darwin.so +0 -0
- sage/matrix/args.pyx +25 -10
- sage/matrix/benchmark.py +8 -4
- sage/matrix/compute_J_ideal.py +2 -2
- sage/matrix/constructor.cpython-310-darwin.so +0 -0
- sage/matrix/echelon_matrix.cpython-310-darwin.so +0 -0
- sage/matrix/echelon_matrix.pyx +1 -1
- sage/matrix/matrix0.cpython-310-darwin.so +0 -0
- sage/matrix/matrix0.pxd +3 -3
- sage/matrix/matrix0.pyx +7 -5
- sage/matrix/matrix1.cpython-310-darwin.so +0 -0
- sage/matrix/matrix1.pyx +87 -48
- sage/matrix/matrix2.cpython-310-darwin.so +0 -0
- sage/matrix/matrix2.pxd +3 -3
- sage/matrix/matrix2.pyx +758 -75
- sage/matrix/matrix_cdv.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_double_dense.pyx +1 -1
- sage/matrix/matrix_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_dense.pyx +2 -3
- sage/matrix/matrix_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_double_dense.pyx +11 -5
- sage/matrix/matrix_double_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_sparse.pyx +1 -1
- sage/matrix/matrix_laurent_mpolynomial_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_numpy_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_numpy_integer_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_polynomial_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_polynomial_dense.pyx +952 -261
- sage/matrix/matrix_real_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_sparse.pyx +2 -3
- sage/matrix/matrix_window.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_window.pyx +2 -2
- sage/matrix/misc_mpfr.cpython-310-darwin.so +0 -0
- sage/matrix/operation_table.py +0 -2
- sage/matrix/special.py +4 -0
- sage/matrix/strassen.cpython-310-darwin.so +0 -0
- sage/matrix/strassen.pyx +1 -1
- sage/matroids/basis_exchange_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/basis_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/chow_ring.py +68 -65
- sage/matroids/chow_ring_ideal.py +41 -38
- sage/matroids/circuit_closures_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/circuits_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/database_matroids.py +16 -5
- sage/matroids/dual_matroid.py +2 -2
- sage/matroids/extension.cpython-310-darwin.so +0 -0
- sage/matroids/flats_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/gammoid.py +1 -1
- sage/matroids/graphic_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/graphic_matroid.pyx +3 -3
- sage/matroids/lean_matrix.cpython-310-darwin.so +0 -0
- sage/matroids/lean_matrix.pyx +22 -22
- sage/matroids/linear_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/linear_matroid.pyx +13 -13
- sage/matroids/matroid.cpython-310-darwin.so +0 -0
- sage/matroids/matroid.pyx +15 -15
- sage/matroids/matroids_plot_helpers.py +48 -46
- sage/matroids/minor_matroid.py +2 -2
- sage/matroids/set_system.cpython-310-darwin.so +0 -0
- sage/matroids/transversal_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/transversal_matroid.pyx +3 -3
- sage/matroids/union_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/union_matroid.pyx +3 -0
- sage/matroids/unpickling.cpython-310-darwin.so +0 -0
- sage/matroids/utilities.py +2 -2
- sage/misc/c3.cpython-310-darwin.so +0 -0
- sage/misc/compat.py +1 -2
- sage/misc/pickle_old.cpython-310-darwin.so +0 -0
- sage/modules/diamond_cutting.py +117 -30
- sage/modules/fg_pid/fgp_module.py +3 -3
- sage/modules/filtered_vector_space.py +4 -4
- sage/modules/finite_submodule_iter.cpython-310-darwin.so +0 -0
- sage/modules/fp_graded/free_module.py +2 -2
- sage/modules/fp_graded/module.py +2 -2
- sage/modules/fp_graded/morphism.py +4 -4
- sage/modules/fp_graded/steenrod/morphism.py +1 -1
- sage/modules/free_module.py +144 -15
- sage/modules/free_module_element.cpython-310-darwin.so +0 -0
- sage/modules/free_module_element.pyx +4 -4
- sage/modules/free_module_integer.py +2 -2
- sage/modules/free_module_morphism.py +3 -3
- sage/modules/free_module_pseudohomspace.py +352 -0
- sage/modules/free_module_pseudomorphism.py +578 -0
- sage/modules/free_quadratic_module_integer_symmetric.py +24 -13
- sage/modules/matrix_morphism.py +9 -9
- sage/modules/multi_filtered_vector_space.py +4 -4
- sage/modules/ore_module.py +2208 -0
- sage/modules/ore_module_element.py +178 -0
- sage/modules/ore_module_homspace.py +147 -0
- sage/modules/ore_module_morphism.py +968 -0
- sage/modules/quotient_module.py +11 -1
- sage/modules/submodule.py +1 -1
- sage/modules/torsion_quadratic_module.py +1 -1
- sage/modules/vector_complex_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_sparse.pyx +4 -4
- sage/modules/vector_modn_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_modn_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_numpy_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_numpy_integer_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_dense.pyx +1 -1
- sage/modules/vector_rational_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_sparse.pyx +5 -5
- sage/modules/vector_real_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_space_morphism.py +2 -2
- sage/modules/with_basis/cell_module.py +17 -0
- sage/modules/with_basis/indexed_element.cpython-310-darwin.so +0 -0
- sage/modules/with_basis/indexed_element.pyx +1 -1
- sage/modules/with_basis/invariant.py +1 -1
- sage/modules/with_basis/representation.py +0 -1
- sage/modules/with_basis/subquotient.py +2 -2
- sage/numerical/gauss_legendre.cpython-310-darwin.so +0 -0
- sage/probability/probability_distribution.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/binary_qf.py +7 -7
- sage/quadratic_forms/bqf_class_group.py +26 -92
- sage/quadratic_forms/count_local_2.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/extras.py +1 -1
- sage/quadratic_forms/quadratic_form.py +5 -4
- sage/quadratic_forms/quadratic_form__equivalence_testing.py +7 -4
- sage/quadratic_forms/quadratic_form__evaluate.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/quadratic_form__local_field_invariants.py +10 -10
- sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +2 -2
- sage/quadratic_forms/ternary.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/ternary_qf.py +50 -83
- sage/rings/complex_conversion.cpython-310-darwin.so +0 -0
- sage/rings/complex_double.cpython-310-darwin.so +0 -0
- sage/rings/complex_double.pxd +1 -0
- sage/rings/complex_double.pyx +37 -32
- sage/rings/complex_mpc.cpython-310-darwin.so +0 -0
- sage/rings/complex_mpc.pyx +27 -23
- sage/rings/complex_mpfr.cpython-310-darwin.so +0 -0
- sage/rings/complex_mpfr.pyx +11 -9
- sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +277 -21
- sage/rings/function_field/drinfeld_modules/drinfeld_module.py +10 -1
- sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1 -1
- sage/rings/function_field/drinfeld_modules/homset.py +1 -2
- sage/rings/function_field/drinfeld_modules/morphism.py +2 -2
- sage/rings/function_field/hermite_form_polynomial.cpython-310-darwin.so +0 -0
- sage/rings/function_field/khuri_makdisi.cpython-310-darwin.so +0 -0
- sage/rings/function_field/khuri_makdisi.pyx +27 -25
- sage/rings/invariants/invariant_theory.py +61 -60
- sage/rings/invariants/reconstruction.py +8 -8
- sage/rings/polynomial/laurent_polynomial_mpair.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/ore_function_element.py +1 -1
- sage/rings/polynomial/ore_polynomial_element.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/ore_polynomial_element.pyx +8 -8
- sage/rings/polynomial/ore_polynomial_ring.py +134 -17
- sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_element.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.pyx +3 -4
- sage/rings/polynomial/skew_polynomial_finite_order.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_order.pyx +2 -5
- sage/rings/real_double_element_gsl.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfr.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfr.pyx +25 -7
- sage/rings/ring_extension.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension.pyx +4 -2
- sage/rings/ring_extension_conversion.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension_element.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension_element.pyx +42 -0
- sage/rings/ring_extension_morphism.cpython-310-darwin.so +0 -0
- sage/schemes/projective/cohomology.py +2 -2
- sage/stats/basic_stats.py +9 -6
- sage/stats/distributions/dgs_misc.h +11 -4
- sage/stats/distributions/discrete_gaussian_integer.cpython-310-darwin.so +0 -0
- sage/stats/distributions/discrete_gaussian_integer.pyx +9 -7
- sage/stats/hmm/chmm.cpython-310-darwin.so +0 -0
- sage/stats/hmm/chmm.pyx +13 -13
- sage/stats/hmm/distributions.cpython-310-darwin.so +0 -0
- sage/stats/hmm/distributions.pxd +3 -3
- sage/stats/hmm/distributions.pyx +3 -3
- sage/stats/hmm/hmm.cpython-310-darwin.so +0 -0
- sage/stats/hmm/hmm.pxd +3 -3
- sage/stats/hmm/hmm.pyx +6 -6
- sage/stats/hmm/util.cpython-310-darwin.so +0 -0
- sage/stats/hmm/util.pyx +6 -6
- sage/stats/intlist.cpython-310-darwin.so +0 -0
- sage/stats/intlist.pxd +3 -3
- sage/stats/time_series.cpython-310-darwin.so +0 -0
- sage/tensor/modules/alternating_contr_tensor.py +3 -3
- sage/tensor/modules/comp.py +3 -3
- sage/tensor/modules/ext_pow_free_module.py +3 -3
- sage/tensor/modules/format_utilities.py +3 -3
- sage/tensor/modules/free_module_linear_group.py +3 -3
- sage/tensor/modules/free_module_morphism.py +0 -1
- sage/tensor/modules/tensor_free_module.py +3 -3
- sage/tensor/modules/tensor_free_submodule.py +1 -1
- sage/tensor/modules/tensor_free_submodule_basis.py +1 -1
- sage/tensor/modules/tensor_with_indices.py +5 -5
- {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +0 -0
- {passagemath_modules-10.5.46.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
|
@@ -88,7 +88,6 @@ cdef class KhuriMakdisi_base(object):
|
|
|
88
88
|
|
|
89
89
|
TESTS::
|
|
90
90
|
|
|
91
|
-
sage: # long time
|
|
92
91
|
sage: k = GF(7)
|
|
93
92
|
sage: A.<x,y> = AffineSpace(k,2)
|
|
94
93
|
sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure()
|
|
@@ -183,7 +182,6 @@ cdef class KhuriMakdisi_base(object):
|
|
|
183
182
|
|
|
184
183
|
TESTS::
|
|
185
184
|
|
|
186
|
-
sage: # long time
|
|
187
185
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
188
186
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
189
187
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -209,7 +207,6 @@ cdef class KhuriMakdisi_base(object):
|
|
|
209
207
|
|
|
210
208
|
TESTS::
|
|
211
209
|
|
|
212
|
-
sage: # long time
|
|
213
210
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
214
211
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
215
212
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -235,7 +232,6 @@ cdef class KhuriMakdisi_base(object):
|
|
|
235
232
|
|
|
236
233
|
TESTS::
|
|
237
234
|
|
|
238
|
-
sage: # long time
|
|
239
235
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
240
236
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
241
237
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -261,7 +257,6 @@ cdef class KhuriMakdisi_base(object):
|
|
|
261
257
|
|
|
262
258
|
TESTS::
|
|
263
259
|
|
|
264
|
-
sage: # long time
|
|
265
260
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
266
261
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
267
262
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -331,7 +326,6 @@ cdef class KhuriMakdisi_base(object):
|
|
|
331
326
|
|
|
332
327
|
TESTS::
|
|
333
328
|
|
|
334
|
-
sage: # long time
|
|
335
329
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
336
330
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
337
331
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -365,7 +359,6 @@ cdef class KhuriMakdisi_large(KhuriMakdisi_base):
|
|
|
365
359
|
|
|
366
360
|
TESTS::
|
|
367
361
|
|
|
368
|
-
sage: # long time
|
|
369
362
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
370
363
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
371
364
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -423,7 +416,6 @@ cdef class KhuriMakdisi_large(KhuriMakdisi_base):
|
|
|
423
416
|
|
|
424
417
|
TESTS::
|
|
425
418
|
|
|
426
|
-
sage: # long time
|
|
427
419
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(7), 2)
|
|
428
420
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
429
421
|
sage: J = C.jacobian(model='km_large')
|
|
@@ -486,7 +478,6 @@ cdef class KhuriMakdisi_large(KhuriMakdisi_base):
|
|
|
486
478
|
|
|
487
479
|
TESTS::
|
|
488
480
|
|
|
489
|
-
sage: # long time
|
|
490
481
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
491
482
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
492
483
|
sage: F = C.function_field()
|
|
@@ -518,7 +509,7 @@ cdef class KhuriMakdisi_large(KhuriMakdisi_base):
|
|
|
518
509
|
|
|
519
510
|
TESTS::
|
|
520
511
|
|
|
521
|
-
sage: #
|
|
512
|
+
sage: # needs sage.combinat
|
|
522
513
|
sage: k = GF(7)
|
|
523
514
|
sage: A.<x,y> = AffineSpace(k,2)
|
|
524
515
|
sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure()
|
|
@@ -549,7 +540,6 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
|
|
|
549
540
|
|
|
550
541
|
TESTS::
|
|
551
542
|
|
|
552
|
-
sage: # long time
|
|
553
543
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
554
544
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
555
545
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -601,7 +591,6 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
|
|
|
601
591
|
|
|
602
592
|
TESTS::
|
|
603
593
|
|
|
604
|
-
sage: # long time
|
|
605
594
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
606
595
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
607
596
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -637,7 +626,6 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
|
|
|
637
626
|
|
|
638
627
|
TESTS::
|
|
639
628
|
|
|
640
|
-
sage: # long time
|
|
641
629
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
642
630
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
643
631
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
@@ -657,7 +645,6 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
|
|
|
657
645
|
|
|
658
646
|
We check the computation in other model::
|
|
659
647
|
|
|
660
|
-
sage: # long time
|
|
661
648
|
sage: J = C.jacobian(model='km_large', base_div=h)
|
|
662
649
|
sage: G = J.group()
|
|
663
650
|
sage: p1 = G.point(pl1 - b)
|
|
@@ -687,7 +674,7 @@ cdef class KhuriMakdisi_medium(KhuriMakdisi_base):
|
|
|
687
674
|
|
|
688
675
|
TESTS::
|
|
689
676
|
|
|
690
|
-
sage: #
|
|
677
|
+
sage: # needs sage.combinat
|
|
691
678
|
sage: k = GF(7)
|
|
692
679
|
sage: A.<x,y> = AffineSpace(k,2)
|
|
693
680
|
sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure()
|
|
@@ -719,7 +706,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
719
706
|
|
|
720
707
|
TESTS::
|
|
721
708
|
|
|
722
|
-
sage: # long time
|
|
723
709
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
724
710
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
725
711
|
sage: b = C([0,1,0]).place()
|
|
@@ -777,7 +763,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
777
763
|
|
|
778
764
|
TESTS::
|
|
779
765
|
|
|
780
|
-
sage: # long time
|
|
781
766
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
782
767
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
783
768
|
sage: b = C([0,1,0]).place()
|
|
@@ -812,7 +797,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
812
797
|
|
|
813
798
|
TESTS::
|
|
814
799
|
|
|
815
|
-
sage: # long time
|
|
816
800
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(17), 2)
|
|
817
801
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
818
802
|
sage: b = C([0,1,0]).place()
|
|
@@ -832,7 +816,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
832
816
|
|
|
833
817
|
We check the computation in other model::
|
|
834
818
|
|
|
835
|
-
sage: # long time
|
|
836
819
|
sage: h = C.function(y/x).divisor_of_poles()
|
|
837
820
|
sage: Jl = C.jacobian(model='km_large', base_div=h)
|
|
838
821
|
sage: G = J.group()
|
|
@@ -840,13 +823,34 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
840
823
|
sage: q2 = G.point(pl2 - b)
|
|
841
824
|
sage: G.point(af.divisor()) == q1.addflip(p2)
|
|
842
825
|
True
|
|
826
|
+
|
|
827
|
+
Check that :issue:`40237` is fixed::
|
|
828
|
+
|
|
829
|
+
sage: K = GF(2)
|
|
830
|
+
sage: F.<x> = FunctionField(K)
|
|
831
|
+
sage: t = polygen(F)
|
|
832
|
+
sage: E.<y> = F.extension(t^3 + (x^2 + x + 1)*t^2 + (x^3 + x + 1)*t + x^5 + x^4)
|
|
833
|
+
sage: O = E.maximal_order()
|
|
834
|
+
sage: Oinf = E.maximal_order_infinite()
|
|
835
|
+
sage: D1 = (-5*O.ideal(x, y).divisor() + O.ideal(x + 1, y^2 + y + 1).divisor()
|
|
836
|
+
....: + O.ideal(x^3 + x^2 + 1, y + x + 1).divisor())
|
|
837
|
+
sage: D2 = (Oinf.ideal(1/x, y/x^2 + 1).divisor() - 5*O.ideal(x, y).divisor()
|
|
838
|
+
....: + O.ideal(x^4 + x^3 + 1, y + x).divisor())
|
|
839
|
+
sage: J = E.jacobian('km_small', base_div=5*O.ideal(x, y).divisor())
|
|
840
|
+
sage: JD1 = J(D1)
|
|
841
|
+
sage: JD2 = J(D2)
|
|
842
|
+
sage: JD1 + JD2 == JD2 + JD1
|
|
843
|
+
True
|
|
843
844
|
"""
|
|
844
845
|
cdef int d0 = self.d0
|
|
845
846
|
cdef int g = self.g
|
|
846
847
|
cdef Matrix w1, w2, w3, w4, w5
|
|
847
848
|
|
|
848
849
|
w1 = self.mu_image(wd1, wd2, self.mu_mat33, 4*d0 - g + 1)
|
|
849
|
-
w2
|
|
850
|
+
# The row space of w2 represents H^0(O(3D_0 - D1 - D2)), whose
|
|
851
|
+
# dimension is at least d0 - g + 1. Hence the codimension is at most
|
|
852
|
+
# 2*d0, and we cannot provide an expected_codim argument for mu_preimage.
|
|
853
|
+
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat33)
|
|
850
854
|
w3 = self.mu_preimage(self.wV2, w1, self.mu_mat42, 2*d0)
|
|
851
855
|
# efficient than
|
|
852
856
|
# wf = matrix(w2[0])
|
|
@@ -861,7 +865,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
861
865
|
|
|
862
866
|
TESTS::
|
|
863
867
|
|
|
864
|
-
sage: # long time
|
|
865
868
|
sage: P2.<x,y,z> = ProjectiveSpace(GF(7), 2)
|
|
866
869
|
sage: C = Curve(x^3 + 5*z^3 - y^2*z, P2)
|
|
867
870
|
sage: b = C([0,1,0]).place()
|
|
@@ -876,7 +879,6 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
876
879
|
|
|
877
880
|
Check that :issue:`39148` is fixed::
|
|
878
881
|
|
|
879
|
-
sage: # long time
|
|
880
882
|
sage: k.<x> = FunctionField(GF(17)); t = polygen(k)
|
|
881
883
|
sage: F.<y> = k.extension(t^4 + (14*x + 14)*t^3 + 9*t^2 + (10*x^2 + 15*x + 8)*t
|
|
882
884
|
....: + 7*x^3 + 15*x^2 + 6*x + 16)
|
|
@@ -895,8 +897,8 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
895
897
|
|
|
896
898
|
w1 = self.mu_image(self.wV2, wd, self.mu_mat23, 4*d0 - g + 1)
|
|
897
899
|
# The row space of w2 represents H^0(O(2D_0 - D)), whose dimension is
|
|
898
|
-
# at least d0 - g + 1
|
|
899
|
-
#
|
|
900
|
+
# at least d0 - g + 1. Hence the codimension is at most d0, and we
|
|
901
|
+
# cannot provide an expected_codim argument for mu_preimage.
|
|
900
902
|
w2 = self.mu_preimage(self.wV3, w1, self.mu_mat23)
|
|
901
903
|
# efficient than
|
|
902
904
|
# wf = matrix(w2[0])
|
|
@@ -914,7 +916,7 @@ cdef class KhuriMakdisi_small(KhuriMakdisi_base):
|
|
|
914
916
|
|
|
915
917
|
TESTS::
|
|
916
918
|
|
|
917
|
-
sage: #
|
|
919
|
+
sage: # needs sage.combinat
|
|
918
920
|
sage: k = GF(7)
|
|
919
921
|
sage: A.<x,y> = AffineSpace(k,2)
|
|
920
922
|
sage: C = Curve(y^2 + x^3 + 2*x + 1).projective_closure()
|
|
@@ -119,7 +119,7 @@ import sage.rings.invariants.reconstruction as reconstruction
|
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
######################################################################
|
|
122
|
-
def _guess_variables(polynomial, *args):
|
|
122
|
+
def _guess_variables(polynomial, *args) -> tuple:
|
|
123
123
|
"""
|
|
124
124
|
Return the polynomial variables.
|
|
125
125
|
|
|
@@ -276,16 +276,16 @@ def transvectant(f, g, h=1, scale='default'):
|
|
|
276
276
|
from sage.functions.other import binomial, factorial
|
|
277
277
|
if scale == 'default':
|
|
278
278
|
scalar = factorial(f._d-h) * factorial(g._d-h) \
|
|
279
|
-
|
|
279
|
+
* R(factorial(f._d)*factorial(g._d))**(-1)
|
|
280
280
|
elif scale == 'none':
|
|
281
281
|
scalar = 1
|
|
282
282
|
else:
|
|
283
283
|
raise ValueError('unknown scale type: %s' % scale)
|
|
284
284
|
|
|
285
285
|
def diff(j):
|
|
286
|
-
df = f.form().derivative(x,j).derivative(y,h-j)
|
|
287
|
-
dg = g.form().derivative(x,h-j).derivative(y,j)
|
|
288
|
-
return (-1)**j * binomial(h,j) * df * dg
|
|
286
|
+
df = f.form().derivative(x, j).derivative(y, h-j)
|
|
287
|
+
dg = g.form().derivative(x, h-j).derivative(y, j)
|
|
288
|
+
return (-1)**j * binomial(h, j) * df * dg
|
|
289
289
|
tv = scalar * sum([diff(j) for j in range(h+1)])
|
|
290
290
|
if tv.parent() is not R:
|
|
291
291
|
S = tv.parent()
|
|
@@ -368,7 +368,7 @@ class FormsBase(SageObject):
|
|
|
368
368
|
dp_dz = d*p - sum(x*dp_dx for x, dp_dx in zip(variables, grad))
|
|
369
369
|
grad.append(dp_dz)
|
|
370
370
|
return grad
|
|
371
|
-
jac = [diff(p,d) for p,d in args]
|
|
371
|
+
jac = [diff(p, d) for p, d in args]
|
|
372
372
|
return matrix(self._ring, jac).det()
|
|
373
373
|
|
|
374
374
|
def ring(self):
|
|
@@ -608,7 +608,7 @@ class AlgebraicForm(FormsBase):
|
|
|
608
608
|
g = random_matrix(F, self._n, algorithm='unimodular')
|
|
609
609
|
v = vector(self.variables())
|
|
610
610
|
g_v = g * v
|
|
611
|
-
transform =
|
|
611
|
+
transform = {v[i]: g_v[i] for i in range(self._n)}
|
|
612
612
|
# The covariant of the transformed polynomial
|
|
613
613
|
g_self = self.__class__(self._n, self._d, self.form().subs(transform), self.variables())
|
|
614
614
|
cov_g = getattr(g_self, method_name)()
|
|
@@ -917,7 +917,7 @@ class AlgebraicForm(FormsBase):
|
|
|
917
917
|
from sage.modules.free_module_element import vector
|
|
918
918
|
v = vector(self._ring, self._variables)
|
|
919
919
|
g_v = vector(self._ring, g*v)
|
|
920
|
-
transform =
|
|
920
|
+
transform = {v[i]: g_v[i] for i in range(self._n)}
|
|
921
921
|
# The covariant of the transformed polynomial
|
|
922
922
|
return self.__class__(self._n, self._d,
|
|
923
923
|
self.form().subs(transform), self.variables())
|
|
@@ -1124,12 +1124,12 @@ class QuadraticForm(AlgebraicForm):
|
|
|
1124
1124
|
coeff = self.scaled_coeffs()
|
|
1125
1125
|
A = matrix(self._ring, self._n)
|
|
1126
1126
|
for i in range(self._n):
|
|
1127
|
-
A[i,i] = coeff[i]
|
|
1127
|
+
A[i, i] = coeff[i]
|
|
1128
1128
|
ij = self._n
|
|
1129
1129
|
for i in range(self._n):
|
|
1130
1130
|
for j in range(i+1, self._n):
|
|
1131
|
-
A[i,j] = coeff[ij]
|
|
1132
|
-
A[j,i] = coeff[ij]
|
|
1131
|
+
A[i, j] = coeff[ij]
|
|
1132
|
+
A[j, i] = coeff[ij]
|
|
1133
1133
|
ij += 1
|
|
1134
1134
|
return A
|
|
1135
1135
|
|
|
@@ -1260,7 +1260,7 @@ class QuadraticForm(AlgebraicForm):
|
|
|
1260
1260
|
else:
|
|
1261
1261
|
var = self._variables[0:-1] + (1, )
|
|
1262
1262
|
n = self._n
|
|
1263
|
-
p = sum(
|
|
1263
|
+
p = sum(Aadj[i, j] * var[i] * var[j] for i in range(n) for j in range(n))
|
|
1264
1264
|
return invariant_theory.quadratic_form(p, self.variables())
|
|
1265
1265
|
|
|
1266
1266
|
def as_QuadraticForm(self):
|
|
@@ -2540,7 +2540,7 @@ class TernaryQuadratic(QuadraticForm):
|
|
|
2540
2540
|
(x^2, y^2, z^2, x*y, x*z, y*z)
|
|
2541
2541
|
"""
|
|
2542
2542
|
R = self._ring
|
|
2543
|
-
x,y,z = self._x, self._y, self._z
|
|
2543
|
+
x, y, z = self._x, self._y, self._z
|
|
2544
2544
|
if self._homogeneous:
|
|
2545
2545
|
return (x**2, y**2, z**2, x*y, x*z, y*z)
|
|
2546
2546
|
else:
|
|
@@ -2715,7 +2715,7 @@ class TernaryCubic(AlgebraicForm):
|
|
|
2715
2715
|
(x^3, y^3, z^3, x^2*y, x^2*z, x*y^2, y^2*z, x*z^2, y*z^2, x*y*z)
|
|
2716
2716
|
"""
|
|
2717
2717
|
R = self._ring
|
|
2718
|
-
x,y,z = self._x, self._y, self._z
|
|
2718
|
+
x, y, z = self._x, self._y, self._z
|
|
2719
2719
|
if self._homogeneous:
|
|
2720
2720
|
return (x**3, y**3, z**3, x**2*y, x**2*z, x*y**2,
|
|
2721
2721
|
y**2*z, x*z**2, y*z**2, x*y*z)
|
|
@@ -2805,14 +2805,14 @@ class TernaryCubic(AlgebraicForm):
|
|
|
2805
2805
|
sage: cubic.S_invariant()
|
|
2806
2806
|
-1/1296
|
|
2807
2807
|
"""
|
|
2808
|
-
a,b,c,a2,a3,b1,b3,c1,c2,m = self.scaled_coeffs()
|
|
2809
|
-
S = (
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2808
|
+
a, b, c, a2, a3, b1, b3, c1, c2, m = self.scaled_coeffs()
|
|
2809
|
+
S = (a*b*c*m-(b*c*a2*a3+c*a*b1*b3+a*b*c1*c2)
|
|
2810
|
+
- m*(a*b3*c2+b*c1*a3+c*a2*b1)
|
|
2811
|
+
+ (a*b1*c2**2+a*c1*b3**2+b*a2*c1**2+b*c2*a3**2+c*b3*a2**2+c*a3*b1**2)
|
|
2812
|
+
- m**4+2*m**2*(b1*c1+c2*a2+a3*b3)
|
|
2813
|
+
- 3*m*(a2*b3*c1+a3*b1*c2)
|
|
2814
|
+
- (b1**2*c1**2+c2**2*a2**2+a3**2*b3**2)
|
|
2815
|
+
+ (c2*a2*a3*b3+a3*b3*b1*c1+b1*c1*c2*a2))
|
|
2816
2816
|
return S
|
|
2817
2817
|
|
|
2818
2818
|
def T_invariant(self):
|
|
@@ -2831,38 +2831,38 @@ class TernaryCubic(AlgebraicForm):
|
|
|
2831
2831
|
sage: cubic.T_invariant()
|
|
2832
2832
|
-t^6 - t^3 + 1
|
|
2833
2833
|
"""
|
|
2834
|
-
a,b,c,a2,a3,b1,b3,c1,c2,m = self.scaled_coeffs()
|
|
2835
|
-
T = (
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2834
|
+
a, b, c, a2, a3, b1, b3, c1, c2, m = self.scaled_coeffs()
|
|
2835
|
+
T = (a**2*b**2*c**2-6*a*b*c*(a*b3*c2+b*c1*a3+c*a2*b1)
|
|
2836
|
+
- 20*a*b*c*m**3+12*a*b*c*m*(b1*c1+c2*a2+a3*b3)
|
|
2837
|
+
+ 6*a*b*c*(a2*b3*c1+a3*b1*c2) +
|
|
2838
|
+
4*(a**2*b*c2**3+a**2*c*b3**3+b**2*c*a3**3 +
|
|
2839
|
+
b**2*a*c1**3+c**2*a*b1**3+c**2*b*a2**3)
|
|
2840
|
+
+ 36*m**2*(b*c*a2*a3+c*a*b1*b3+a*b*c1*c2)
|
|
2841
|
+
- 24*m*(b*c*b1*a3**2+b*c*c1*a2**2+c*a*c2*b1**2+c*a*a2*b3**2+a*b*a3*c2**2 +
|
|
2842
2842
|
a*b*b3*c1**2)
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2843
|
+
- 3*(a**2*b3**2*c2**2+b**2*c1**2*a3**2+c**2*a2**2*b1**2) +
|
|
2844
|
+
18*(b*c*b1*c1*a2*a3+c*a*c2*a2*b3*b1+a*b*a3*b3*c1*c2)
|
|
2845
|
+
- 12*(b*c*c2*a3*a2**2+b*c*b3*a2*a3**2+c*a*c1*b3*b1**2 +
|
|
2846
2846
|
c*a*a3*b1*b3**2+a*b*a2*c1*c2**2+a*b*b1*c2*c1**2)
|
|
2847
|
-
|
|
2848
|
-
|
|
2847
|
+
- 12*m**3*(a*b3*c2+b*c1*a3+c*a2*b1)
|
|
2848
|
+
+ 12*m**2*(a*b1*c2**2+a*c1*b3**2+b*a2*c1**2 +
|
|
2849
2849
|
b*c2*a3**2+c*b3*a2**2+c*a3*b1**2)
|
|
2850
|
-
|
|
2851
|
-
|
|
2850
|
+
- 60*m*(a*b1*b3*c1*c2+b*c1*c2*a2*a3+c*a2*a3*b1*b3)
|
|
2851
|
+
+ 12*m*(a*a2*b3*c2**2+a*a3*c2*b3**2+b*b3*c1*a3**2 +
|
|
2852
2852
|
b*b1*a3*c1**2+c*c1*a2*b1**2+c*c2*b1*a2**2)
|
|
2853
|
-
|
|
2854
|
-
|
|
2853
|
+
+ 6*(a*b3*c2+b*c1*a3+c*a2*b1)*(a2*b3*c1+a3*b1*c2)
|
|
2854
|
+
+ 24*(a*b1*b3**2*c1**2+a*c1*c2**2*b1**2+b*c2*c1**2*a2**2
|
|
2855
2855
|
+ b*a2*a3**2*c2**2+c*a3*a2**2*b3**2+c*b3*b1**2*a3**2)
|
|
2856
|
-
|
|
2856
|
+
- 12*(a*a2*b1*c2**3+a*a3*c1*b3**3+b*b3*c2*a3**3+b*b1*a2*c1**3
|
|
2857
2857
|
+ c*c1*a3*b1**3+c*c2*b3*a2**3)
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
c2**2*a2**2*b1*c1+a3**2*b3**2*b1*c1+a3**2*b3**2*c2*a2)
|
|
2858
|
+
- 8*m**6+24*m**4*(b1*c1+c2*a2+a3*b3)-36*m**3*(a2*b3*c1+a3*b1*c2)
|
|
2859
|
+
- 12*m**2*(b1*c1*c2*a2+c2*a2*a3*b3+a3*b3*b1*c1)
|
|
2860
|
+
- 24*m**2*(b1**2*c1**2+c2**2*a2**2+a3**2*b3**2)
|
|
2861
|
+
+ 36*m*(a2*b3*c1+a3*b1*c2)*(b1*c1+c2*a2+a3*b3)
|
|
2862
|
+
+ 8*(b1**3*c1**3+c2**3*a2**3+a3**3*b3**3)
|
|
2863
|
+
- 27*(a2**2*b3**2*c1**2+a3**2*b1**2*c2**2)-6*b1*c1*c2*a2*a3*b3
|
|
2864
|
+
- 12*(b1**2*c1**2*c2*a2+b1**2*c1**2*a3*b3+c2**2*a2**2*a3*b3 +
|
|
2865
|
+
c2**2*a2**2*b1*c1+a3**2*b3**2*b1*c1+a3**2*b3**2*c2*a2))
|
|
2866
2866
|
return T
|
|
2867
2867
|
|
|
2868
2868
|
@cached_method
|
|
@@ -2897,9 +2897,9 @@ class TernaryCubic(AlgebraicForm):
|
|
|
2897
2897
|
"""
|
|
2898
2898
|
a30, a03, a00, a21, a20, a12, a02, a10, a01, a11 = self.coeffs()
|
|
2899
2899
|
if self._homogeneous:
|
|
2900
|
-
x,y,z = self.variables()
|
|
2900
|
+
x, y, z = self.variables()
|
|
2901
2901
|
else:
|
|
2902
|
-
x,y,z = (self._x, self._y, 1)
|
|
2902
|
+
x, y, z = (self._x, self._y, 1)
|
|
2903
2903
|
F = self._ring.base_ring()
|
|
2904
2904
|
A00 = 3*x*a30 + y*a21 + z*a20
|
|
2905
2905
|
A11 = x*a12 + 3*y*a03 + z*a02
|
|
@@ -2907,8 +2907,7 @@ class TernaryCubic(AlgebraicForm):
|
|
|
2907
2907
|
A01 = x*a21 + y*a12 + 1/F(2)*z*a11
|
|
2908
2908
|
A02 = x*a20 + 1/F(2)*y*a11 + z*a10
|
|
2909
2909
|
A12 = 1/F(2)*x*a11 + y*a02 + z*a01
|
|
2910
|
-
|
|
2911
|
-
return polar
|
|
2910
|
+
return matrix(self._ring, [[A00, A01, A02], [A01, A11, A12], [A02, A12, A22]])
|
|
2912
2911
|
|
|
2913
2912
|
@cached_method
|
|
2914
2913
|
def Hessian(self):
|
|
@@ -2943,7 +2942,9 @@ class TernaryCubic(AlgebraicForm):
|
|
|
2943
2942
|
Uyy = 2*x*a12 + 6*y*a03 + 2*z*a02
|
|
2944
2943
|
Uyz = x*a11 + 2*y*a02 + 2*z*a01
|
|
2945
2944
|
Uzz = 2*x*a10 + 2*y*a01 + 6*z*a00
|
|
2946
|
-
H = matrix(self._ring, [[Uxx, Uxy, Uxz],
|
|
2945
|
+
H = matrix(self._ring, [[Uxx, Uxy, Uxz],
|
|
2946
|
+
[Uxy, Uyy, Uyz],
|
|
2947
|
+
[Uxz, Uyz, Uzz]])
|
|
2947
2948
|
F = self._ring.base_ring()
|
|
2948
2949
|
return 1/F(216) * H.det()
|
|
2949
2950
|
|
|
@@ -2971,11 +2972,11 @@ class TernaryCubic(AlgebraicForm):
|
|
|
2971
2972
|
6952
|
|
2972
2973
|
"""
|
|
2973
2974
|
U_conic = self.polar_conic().adjugate()
|
|
2974
|
-
U_coeffs = (
|
|
2975
|
-
|
|
2975
|
+
U_coeffs = (U_conic[0, 0], U_conic[1, 1], U_conic[2, 2],
|
|
2976
|
+
U_conic[0, 1], U_conic[0, 2], U_conic[1, 2])
|
|
2976
2977
|
H_conic = TernaryCubic(3, 3, self.Hessian(), self.variables()).polar_conic().adjugate()
|
|
2977
|
-
H_coeffs = (
|
|
2978
|
-
|
|
2978
|
+
H_coeffs = (H_conic[0, 0], H_conic[1, 1], H_conic[2, 2],
|
|
2979
|
+
H_conic[0, 1], H_conic[0, 2], H_conic[1, 2])
|
|
2979
2980
|
quadratic = TernaryQuadratic(3, 2, self._ring.zero(), self.variables())
|
|
2980
2981
|
F = self._ring.base_ring()
|
|
2981
2982
|
return 1/F(9) * _covariant_conic(U_coeffs, H_coeffs, quadratic.monomials())
|
|
@@ -3258,7 +3259,7 @@ class SeveralAlgebraicForms(FormsBase):
|
|
|
3258
3259
|
g = random_matrix(F, self._n, algorithm='unimodular')
|
|
3259
3260
|
v = vector(self.variables())
|
|
3260
3261
|
g_v = g*v
|
|
3261
|
-
transform =
|
|
3262
|
+
transform = {v[i]: g_v[i] for i in range(self._n)}
|
|
3262
3263
|
# The covariant of the transformed form
|
|
3263
3264
|
transformed = [f.transformed(transform) for f in self._forms]
|
|
3264
3265
|
g_self = self.__class__(transformed)
|
|
@@ -4358,9 +4359,9 @@ class InvariantTheoryFactory:
|
|
|
4358
4359
|
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
4359
4360
|
K = FractionField(Sequence(list(invariants)).universe())
|
|
4360
4361
|
if variables is None:
|
|
4361
|
-
x,z = PolynomialRing(K, 'x,z').gens()
|
|
4362
|
+
x, z = PolynomialRing(K, 'x,z').gens()
|
|
4362
4363
|
elif len(variables) == 2:
|
|
4363
|
-
x,z = variables
|
|
4364
|
+
x, z = variables
|
|
4364
4365
|
else:
|
|
4365
4366
|
raise ValueError('incorrect number of variables provided, '
|
|
4366
4367
|
'exactly two variables should be provided')
|
|
@@ -187,7 +187,7 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
|
|
|
187
187
|
If the invariant `M` vanishes, then the coefficients are computed in a
|
|
188
188
|
different way::
|
|
189
189
|
|
|
190
|
-
sage:
|
|
190
|
+
sage: A, B, C = 3, 1, 2
|
|
191
191
|
sage: M = 2*A*B - 3*C
|
|
192
192
|
sage: M
|
|
193
193
|
0
|
|
@@ -266,7 +266,7 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
|
|
|
266
266
|
M = 2*A*B - 3*C
|
|
267
267
|
N = K(2)**-1 * (A*C-B**2)
|
|
268
268
|
R2 = -K(2)**-1 * (A*N**2-2*B*M*N+C*M**2)
|
|
269
|
-
scale = [1,1,1,1,1,1]
|
|
269
|
+
scale = [1, 1, 1, 1, 1, 1]
|
|
270
270
|
from sage.arith.misc import binomial
|
|
271
271
|
from sage.misc.functional import sqrt
|
|
272
272
|
if len(invariants) == 3:
|
|
@@ -275,8 +275,8 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
|
|
|
275
275
|
else:
|
|
276
276
|
# if R2 is not a square, we scale the invariants in a suitable way
|
|
277
277
|
# so that the 'new' R2 is a square
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
A, B, C = R2 * A, R2**2 * B, R2**3 * C
|
|
279
|
+
M, N = R2**3 * M, R2**4 * N
|
|
280
280
|
R = R2**5
|
|
281
281
|
elif len(invariants) == 4:
|
|
282
282
|
if invariants[3]**2 != R2:
|
|
@@ -293,17 +293,17 @@ def binary_quintic_coefficients_from_invariants(invariants, K=None, invariant_ch
|
|
|
293
293
|
'quintics with a treefold linear factor')
|
|
294
294
|
else:
|
|
295
295
|
if B == 0:
|
|
296
|
-
return (1,0,0,0,0,1)
|
|
296
|
+
return (1, 0, 0, 0, 0, 1)
|
|
297
297
|
else:
|
|
298
|
-
return (0,1,0,0,1,0)
|
|
298
|
+
return (0, 1, 0, 0, 1, 0)
|
|
299
299
|
else:
|
|
300
300
|
# case corresponding to using alpha and gamma as coordinates
|
|
301
301
|
if A == 0:
|
|
302
|
-
return (1,0,0,0,1,0)
|
|
302
|
+
return (1, 0, 0, 0, 1, 0)
|
|
303
303
|
else:
|
|
304
304
|
if scaling == 'normalized':
|
|
305
305
|
# scaling z by (R/A**3)
|
|
306
|
-
scale = [
|
|
306
|
+
scale = [(-N)**-5*A**6*(R/A**3)**i for i in range(6)]
|
|
307
307
|
D = -N
|
|
308
308
|
Delta = C
|
|
309
309
|
a = [0]
|
|
Binary file
|
|
@@ -930,7 +930,7 @@ class OreFunction_with_large_center(OreFunction):
|
|
|
930
930
|
(x^6 + 4)^(-1) * (x^3 + 2)
|
|
931
931
|
|
|
932
932
|
By default, the name of the central variable is usually ``z`` (see
|
|
933
|
-
:meth:`sage.rings.polynomial.skew_polynomial_ring.
|
|
933
|
+
:meth:`sage.rings.polynomial.skew_polynomial_ring.SkewPolynomialRing_finite_order.center`
|
|
934
934
|
for more details about this).
|
|
935
935
|
However, the user can specify a different variable name if desired::
|
|
936
936
|
|
|
Binary file
|
|
@@ -907,7 +907,7 @@ cdef class OrePolynomial(AlgebraElement):
|
|
|
907
907
|
raise TypeError("the base ring must be a field")
|
|
908
908
|
cdef OrePolynomial G = self
|
|
909
909
|
cdef OrePolynomial U = self._parent.one()
|
|
910
|
-
cdef OrePolynomial V, V1,
|
|
910
|
+
cdef OrePolynomial V, V1, Q, R, T
|
|
911
911
|
cdef Morphism m
|
|
912
912
|
if not other:
|
|
913
913
|
V = self._parent.zero()
|
|
@@ -2569,7 +2569,7 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
|
|
|
2569
2569
|
sage: a + a == 2*a
|
|
2570
2570
|
True
|
|
2571
2571
|
"""
|
|
2572
|
-
cdef Py_ssize_t i
|
|
2572
|
+
cdef Py_ssize_t i
|
|
2573
2573
|
cdef list x = (<OrePolynomial_generic_dense>self)._coeffs
|
|
2574
2574
|
cdef list y = (<OrePolynomial_generic_dense>right)._coeffs
|
|
2575
2575
|
cdef Py_ssize_t dx = len(x), dy = len(y)
|
|
@@ -2600,7 +2600,7 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
|
|
|
2600
2600
|
sage: c - c == 0
|
|
2601
2601
|
True
|
|
2602
2602
|
"""
|
|
2603
|
-
cdef Py_ssize_t i
|
|
2603
|
+
cdef Py_ssize_t i
|
|
2604
2604
|
cdef list x = (<OrePolynomial_generic_dense>self)._coeffs
|
|
2605
2605
|
cdef list y = (<OrePolynomial_generic_dense>right)._coeffs
|
|
2606
2606
|
cdef Py_ssize_t dx = len(x), dy = len(y)
|
|
@@ -2868,7 +2868,6 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
|
|
|
2868
2868
|
sage: a.coefficients(sparse=False)
|
|
2869
2869
|
[t^2 + 1, 0, t + 1, 0, 1]
|
|
2870
2870
|
"""
|
|
2871
|
-
zero = self.parent().base_ring().zero()
|
|
2872
2871
|
if sparse:
|
|
2873
2872
|
return [c for c in self._coeffs if not c.is_zero()]
|
|
2874
2873
|
else:
|
|
@@ -2876,8 +2875,9 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
|
|
|
2876
2875
|
|
|
2877
2876
|
def hilbert_shift(self, s, var=None):
|
|
2878
2877
|
r"""
|
|
2879
|
-
Return this Ore polynomial with variable shifted by `s
|
|
2880
|
-
|
|
2878
|
+
Return this Ore polynomial with variable shifted by `s`.
|
|
2879
|
+
|
|
2880
|
+
If this Ore polynomial is `P(x)`, this returns `P(x+s)`.
|
|
2881
2881
|
|
|
2882
2882
|
INPUT:
|
|
2883
2883
|
|
|
@@ -2952,9 +2952,9 @@ cdef class OrePolynomial_generic_dense(OrePolynomial):
|
|
|
2952
2952
|
if var is None:
|
|
2953
2953
|
var = parent.variable_name()
|
|
2954
2954
|
if derivation is None:
|
|
2955
|
-
S = OrePolynomialRing(k, morphism, var)
|
|
2955
|
+
S = OrePolynomialRing(k, morphism, var, polcast=False)
|
|
2956
2956
|
else:
|
|
2957
|
-
S = OrePolynomialRing(k, derivation, var)
|
|
2957
|
+
S = OrePolynomialRing(k, derivation, var, polcast=False)
|
|
2958
2958
|
if not self:
|
|
2959
2959
|
return S.zero()
|
|
2960
2960
|
X = S.gen() + s
|