passagemath-modules 10.5.32__cp310-cp310-macosx_14_0_arm64.whl → 10.6.20__cp310-cp310-macosx_14_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-modules might be problematic. Click here for more details.
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +51 -46
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +333 -323
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +1 -1
- passagemath_modules.dylibs/libgcc_s.1.1.dylib +0 -0
- passagemath_modules.dylibs/libgfortran.5.dylib +0 -0
- passagemath_modules.dylibs/libgsl.28.dylib +0 -0
- passagemath_modules.dylibs/libmpc.3.dylib +0 -0
- passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
- passagemath_modules.dylibs/libquadmath.0.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 +65 -28
- 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/cartesian_product.py +1 -1
- sage/combinat/free_module.py +22 -2
- sage/combinat/root_system/all.py +1 -1
- 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 +2 -2
- sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
- sage/combinat/root_system/braid_orbit.pyx +1 -1
- sage/combinat/root_system/branching_rules.py +3 -3
- sage/combinat/root_system/cartan_type.py +14 -14
- sage/combinat/root_system/coxeter_group.py +3 -3
- sage/combinat/root_system/coxeter_matrix.py +1 -1
- sage/combinat/root_system/coxeter_type.py +12 -1
- sage/combinat/root_system/extended_affine_weyl_group.py +9 -9
- sage/combinat/root_system/fundamental_group.py +3 -5
- sage/combinat/root_system/hecke_algebra_representation.py +1 -1
- sage/combinat/root_system/integrable_representations.py +1 -1
- sage/combinat/root_system/pieri_factors.py +3 -3
- 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 +2 -2
- 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 +1261 -63
- 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 +6 -7
- 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 +5 -1
- 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 +162 -26
- 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 +11 -11
- 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/cfinite_sequence.py +16 -17
- 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 -11
- 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/all__sagemath_modules.py +1 -0
- sage/schemes/projective/all__sagemath_modules.py +1 -0
- sage/schemes/projective/coherent_sheaf.py +300 -0
- sage/schemes/projective/cohomology.py +510 -0
- sage/stats/basic_stats.py +17 -15
- 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.dylibs/libopenblas_armv8p-r0.3.28.dylib +0 -0
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
|
@@ -9,7 +9,7 @@ AUTHORS:
|
|
|
9
9
|
- David Lucas, ported the original implementation in Sage
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
# ***************************************************************************
|
|
13
13
|
# Copyright (C) 2015 David Lucas <david.lucas@inria.fr>
|
|
14
14
|
# 2015 Johan S. R. Nielsen <jsrn@jsrn.dk>
|
|
15
15
|
#
|
|
@@ -17,12 +17,10 @@ AUTHORS:
|
|
|
17
17
|
# it under the terms of the GNU General Public License as published by
|
|
18
18
|
# the Free Software Foundation, either version 2 of the License, or
|
|
19
19
|
# (at your option) any later version.
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
# https://www.gnu.org/licenses/
|
|
21
|
+
# ***************************************************************************
|
|
23
22
|
|
|
24
23
|
from sage.arith.misc import integer_floor as floor
|
|
25
|
-
from sage.misc.lazy_import import lazy_import
|
|
26
24
|
from sage.misc.functional import sqrt
|
|
27
25
|
from sage.rings.integer_ring import ZZ
|
|
28
26
|
from sage.rings.integer import Integer
|
|
Binary file
|
sage/coding/kasami_codes.pyx
CHANGED
|
@@ -166,26 +166,25 @@ class KasamiCode(AbstractLinearCode):
|
|
|
166
166
|
ValueError: The parameter t(=5) must be a power of 2
|
|
167
167
|
"""
|
|
168
168
|
# Check validity of s and t
|
|
169
|
-
|
|
169
|
+
p, i = is_prime_power(t, get_data=True)
|
|
170
170
|
if p != 2:
|
|
171
171
|
raise ValueError(f"The parameter t(={t}) must be a power of 2")
|
|
172
172
|
|
|
173
|
-
if s != t*t:
|
|
173
|
+
if s != t * t:
|
|
174
174
|
# then we must have s=q^{2j+1} and t = q^m
|
|
175
|
-
|
|
175
|
+
p, k = is_prime_power(s, get_data=True)
|
|
176
176
|
if p != 2:
|
|
177
177
|
raise ValueError(f"The parameter s(={s}) must be a power of 2")
|
|
178
178
|
|
|
179
179
|
# q= 2^l here l = gcd(k,i)
|
|
180
|
-
l = gcd(i,k)
|
|
181
|
-
q = 2**l
|
|
180
|
+
l = gcd(i, k)
|
|
182
181
|
m = i // l
|
|
183
182
|
|
|
184
|
-
if (k//l) % 2 == 0:
|
|
183
|
+
if (k // l) % 2 == 0:
|
|
185
184
|
raise ValueError(
|
|
186
185
|
f"The parameter s(={s}) is invalid. Check the documentation")
|
|
187
186
|
|
|
188
|
-
j = ((k//l) - 1) // 2
|
|
187
|
+
j = ((k // l) - 1) // 2
|
|
189
188
|
|
|
190
189
|
# gcd(m,2*j+1) = gcd( i/l, k/l) = 1
|
|
191
190
|
if m > j:
|
|
@@ -220,7 +219,7 @@ class KasamiCode(AbstractLinearCode):
|
|
|
220
219
|
sage: C.parameters()
|
|
221
220
|
(8, 2)
|
|
222
221
|
"""
|
|
223
|
-
return (self._s,self._t)
|
|
222
|
+
return (self._s, self._t)
|
|
224
223
|
|
|
225
224
|
def __eq__(self, other):
|
|
226
225
|
r"""
|
|
@@ -240,10 +239,10 @@ class KasamiCode(AbstractLinearCode):
|
|
|
240
239
|
# Check that s, t, extended values of both
|
|
241
240
|
# objects are the same
|
|
242
241
|
return isinstance(other, KasamiCode) \
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
and self.parameters() == other.parameters() \
|
|
243
|
+
and self._extended == other._extended
|
|
245
244
|
|
|
246
|
-
def _repr_(self):
|
|
245
|
+
def _repr_(self) -> str:
|
|
247
246
|
r"""
|
|
248
247
|
Return a string representation of ``self``.
|
|
249
248
|
|
|
@@ -252,13 +251,12 @@ class KasamiCode(AbstractLinearCode):
|
|
|
252
251
|
sage: codes.KasamiCode(4,2,extended=True)
|
|
253
252
|
[4, 0] Extended (4, 2)-Kasami code
|
|
254
253
|
"""
|
|
255
|
-
ext = ""
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
% (self.length(),self.dimension(), ext, self._s, self._t)
|
|
254
|
+
ext = " Extended" if self._extended else ""
|
|
255
|
+
return "[%s, %s]%s (%s, %s)-Kasami code" % (self.length(),
|
|
256
|
+
self.dimension(), ext,
|
|
257
|
+
self._s, self._t)
|
|
260
258
|
|
|
261
|
-
def _latex_(self):
|
|
259
|
+
def _latex_(self) -> str:
|
|
262
260
|
r"""
|
|
263
261
|
Return a latex representation of ``self``.
|
|
264
262
|
|
|
@@ -268,11 +266,9 @@ class KasamiCode(AbstractLinearCode):
|
|
|
268
266
|
sage: latex(C)
|
|
269
267
|
[16, 9]\textnormal{ Extended} (16, 4)\textnormal{-Kasami code}
|
|
270
268
|
"""
|
|
271
|
-
ext = ""
|
|
272
|
-
if self._extended:
|
|
273
|
-
ext = " Extended"
|
|
269
|
+
ext = " Extended" if self._extended else ""
|
|
274
270
|
return "[%s, %s]\\textnormal{%s} (%s, %s)\\textnormal{-Kasami code}"\
|
|
275
|
-
|
|
271
|
+
% (self.length(), self.dimension(), ext, self._s, self._t)
|
|
276
272
|
|
|
277
273
|
def generator_matrix(self):
|
|
278
274
|
r"""
|
|
@@ -330,11 +326,11 @@ class KasamiCode(AbstractLinearCode):
|
|
|
330
326
|
|
|
331
327
|
def exp(row):
|
|
332
328
|
return matrix(F,
|
|
333
|
-
[x + [0]*(m - len(x)) for x in
|
|
334
|
-
|
|
329
|
+
[x + [0] * (m - len(x)) for x in
|
|
330
|
+
[a.polynomial().list() for a in row]]).transpose()
|
|
335
331
|
|
|
336
332
|
# Parity check matrix over GF(s)
|
|
337
|
-
Hs = matrix(F, [[1]*self._s,
|
|
333
|
+
Hs = matrix(F, [[1] * self._s,
|
|
338
334
|
F.list(),
|
|
339
335
|
[a**(self._t + 1) for a in F]])
|
|
340
336
|
|
sage/coding/linear_code.py
CHANGED
|
@@ -99,10 +99,10 @@ Further references
|
|
|
99
99
|
------------------
|
|
100
100
|
|
|
101
101
|
If you want to get started on Sage's linear codes library, see
|
|
102
|
-
https://
|
|
102
|
+
https://passagemath.org/docs/latest/html/en/thematic_tutorials/coding_theory.html
|
|
103
103
|
|
|
104
104
|
If you want to learn more on the design of this library, see
|
|
105
|
-
https://
|
|
105
|
+
https://passagemath.org/docs/latest/html/en/thematic_tutorials/structures_in_coding_theory.html
|
|
106
106
|
|
|
107
107
|
REFERENCES:
|
|
108
108
|
|
|
@@ -375,18 +375,18 @@ class AbstractLinearCodeNoMetric(AbstractCode, Module):
|
|
|
375
375
|
return self.dimension() / self.length()
|
|
376
376
|
|
|
377
377
|
@cached_method
|
|
378
|
-
def gens(self) ->
|
|
378
|
+
def gens(self) -> tuple:
|
|
379
379
|
r"""
|
|
380
|
-
Return the generators of this code as a
|
|
380
|
+
Return the generators of this code as a tuple of vectors.
|
|
381
381
|
|
|
382
382
|
EXAMPLES::
|
|
383
383
|
|
|
384
384
|
sage: C = codes.HammingCode(GF(2), 3)
|
|
385
385
|
sage: C.gens()
|
|
386
|
-
|
|
387
|
-
(0, 0, 1, 0, 1, 1, 0), (0, 0, 0, 1, 1, 1, 1)
|
|
386
|
+
((1, 0, 0, 0, 0, 1, 1), (0, 1, 0, 0, 1, 0, 1),
|
|
387
|
+
(0, 0, 1, 0, 1, 1, 0), (0, 0, 0, 1, 1, 1, 1))
|
|
388
388
|
"""
|
|
389
|
-
return self.generator_matrix().rows()
|
|
389
|
+
return tuple(self.generator_matrix().rows())
|
|
390
390
|
|
|
391
391
|
def basis(self):
|
|
392
392
|
r"""
|
|
@@ -92,6 +92,7 @@ Read more about
|
|
|
92
92
|
AUTHORS:
|
|
93
93
|
|
|
94
94
|
- Marketa Slukova (2019-08-16): initial version
|
|
95
|
+
- Camille Garnier and Rubén Muñoz-\-Bertrand (2024-02-13): added rank_support_of_vector, and corrected the documentation
|
|
95
96
|
|
|
96
97
|
TESTS::
|
|
97
98
|
|
|
@@ -147,9 +148,9 @@ def to_matrix_representation(v, sub_field=None, basis=None):
|
|
|
147
148
|
specified, it is the prime subfield `\GF{p}` of `\GF{q^m}`
|
|
148
149
|
|
|
149
150
|
- ``basis`` -- (default: ``None``) a basis of `\GF{q^m}` as a vector space over
|
|
150
|
-
``sub_field``. If not specified,
|
|
151
|
-
`1,\beta,\ldots,\beta^{
|
|
152
|
-
|
|
151
|
+
``sub_field``. If not specified, the default basis is
|
|
152
|
+
`1,\beta,\ldots,\beta^{m-1}` where `\beta` is the generator of `\GF{q^m}`
|
|
153
|
+
given by SageMath.
|
|
153
154
|
|
|
154
155
|
EXAMPLES::
|
|
155
156
|
|
|
@@ -199,9 +200,9 @@ def from_matrix_representation(w, base_field=None, basis=None):
|
|
|
199
200
|
``w``.
|
|
200
201
|
|
|
201
202
|
- ``basis`` -- (default: ``None``) a basis of `\GF{q^m}` as a vector space over
|
|
202
|
-
`\GF{q}`. If not specified,
|
|
203
|
-
`1,\beta,\ldots,\beta^{
|
|
204
|
-
|
|
203
|
+
`\GF{q}`. If not specified, the default basis is
|
|
204
|
+
`1,\beta,\ldots,\beta^{m-1}` where `\beta` is the generator
|
|
205
|
+
of `\GF{q^m}` given by SageMath.
|
|
205
206
|
|
|
206
207
|
EXAMPLES::
|
|
207
208
|
|
|
@@ -231,7 +232,7 @@ def rank_weight(c, sub_field=None, basis=None):
|
|
|
231
232
|
Return the rank of ``c`` as a matrix over ``sub_field``.
|
|
232
233
|
|
|
233
234
|
If ``c`` is a vector over some field `\GF{q^m}`, the function converts it
|
|
234
|
-
into a matrix over
|
|
235
|
+
into a matrix over ``sub_field```.
|
|
235
236
|
|
|
236
237
|
INPUT:
|
|
237
238
|
|
|
@@ -241,9 +242,9 @@ def rank_weight(c, sub_field=None, basis=None):
|
|
|
241
242
|
specified, it is the prime subfield `\GF{p}` of `\GF{q^m}`
|
|
242
243
|
|
|
243
244
|
- ``basis`` -- (default: ``None``) a basis of `\GF{q^m}` as a vector space over
|
|
244
|
-
``sub_field``. If not specified,
|
|
245
|
-
`1,\beta,\ldots,\beta^{
|
|
246
|
-
|
|
245
|
+
``sub_field``. If not specified, the default basis is
|
|
246
|
+
`1,\beta,\ldots,\beta^{m-1}` where `\beta` is the generator
|
|
247
|
+
of `\GF{q^m}` given by SageMath.
|
|
247
248
|
|
|
248
249
|
EXAMPLES::
|
|
249
250
|
|
|
@@ -279,9 +280,9 @@ def rank_distance(a, b, sub_field=None, basis=None):
|
|
|
279
280
|
specified, it is the prime subfield `\GF{p}` of `\GF{q^m}`
|
|
280
281
|
|
|
281
282
|
- ``basis`` -- (default: ``None``) a basis of `\GF{q^m}` as a vector space over
|
|
282
|
-
``sub_field``. If not specified,
|
|
283
|
-
`1,\beta,\ldots,\beta^{
|
|
284
|
-
|
|
283
|
+
``sub_field``. If not specified, the default basis is
|
|
284
|
+
`1,\beta,\ldots,\beta^{m-1}` where `\beta` is the generator
|
|
285
|
+
of `\GF{q^m}` given by SageMath.
|
|
285
286
|
|
|
286
287
|
EXAMPLES::
|
|
287
288
|
|
|
@@ -380,9 +381,9 @@ class AbstractLinearRankMetricCode(AbstractLinearCodeNoMetric):
|
|
|
380
381
|
- ``default_decoder_name`` -- the name of the default decoder of ``self``
|
|
381
382
|
|
|
382
383
|
- ``basis`` -- (default: ``None``) a basis of `\GF{q^m}` as a vector space over
|
|
383
|
-
``sub_field``. If not specified,
|
|
384
|
-
`1,\beta,\ldots,\beta^{
|
|
385
|
-
|
|
384
|
+
``sub_field``. If not specified, the default basis is
|
|
385
|
+
`1,\beta,\ldots,\beta^{m-1}` where `\beta` is the generator
|
|
386
|
+
of `\GF{q^m}` given by SageMath.
|
|
386
387
|
|
|
387
388
|
EXAMPLES:
|
|
388
389
|
|
|
@@ -589,6 +590,67 @@ class AbstractLinearRankMetricCode(AbstractLinearCodeNoMetric):
|
|
|
589
590
|
"""
|
|
590
591
|
return rank_weight(word, self.sub_field())
|
|
591
592
|
|
|
593
|
+
def rank_support_of_vector(self, word, sub_field=None, basis=None):
|
|
594
|
+
r"""
|
|
595
|
+
Return the rank support of ``word`` over ``sub_field``, i.e. the vector space over
|
|
596
|
+
``sub_field`` generated by its coefficients.
|
|
597
|
+
|
|
598
|
+
If ``word`` is a vector over some field `\GF{q^m}`, and ``sub_field`` is a subfield of
|
|
599
|
+
`\GF{q^m}`, the function converts it into a matrix over ``sub_field``, with
|
|
600
|
+
respect to the basis ``basis``.
|
|
601
|
+
|
|
602
|
+
INPUT:
|
|
603
|
+
|
|
604
|
+
- ``word`` -- a vector over the ``base_field`` of ``self``.
|
|
605
|
+
|
|
606
|
+
- ``sub_field`` -- (default: ``None``) a sub field of the
|
|
607
|
+
``base_field`` of ``self``; if not specified, it is the prime
|
|
608
|
+
subfield of `\GF{p}` the ``base_field`` of ``self``.
|
|
609
|
+
|
|
610
|
+
- ``basis`` -- (default: ``None``) a basis of ``base_field`` of
|
|
611
|
+
``self`` as a vector space over ``sub_field``. If not specified,
|
|
612
|
+
the default basis is `1,\beta,\ldots,\beta^{m-1}`, where `\beta` is
|
|
613
|
+
the generator of `\GF{q^m}` given by SageMath.
|
|
614
|
+
|
|
615
|
+
EXAMPLES::
|
|
616
|
+
|
|
617
|
+
sage: G = Matrix(GF(64), [[1,1,0], [0,0,1]])
|
|
618
|
+
sage: C = codes.LinearRankMetricCode(G, GF(4))
|
|
619
|
+
sage: a = GF(64).gen()
|
|
620
|
+
sage: c = vector([a^4 + a^3 + 1, a^4 + a^3 + 1, a^4 + a^3 + a^2 + 1])
|
|
621
|
+
sage: c in C
|
|
622
|
+
True
|
|
623
|
+
sage: C.rank_support_of_vector(c)
|
|
624
|
+
Vector space of degree 6 and dimension 2 over Finite Field of size 2
|
|
625
|
+
Basis matrix:
|
|
626
|
+
[1 0 0 1 1 0]
|
|
627
|
+
[0 0 1 0 0 0]
|
|
628
|
+
|
|
629
|
+
An example with a non canonical basis::
|
|
630
|
+
|
|
631
|
+
sage: K.<a> = GF(2^3)
|
|
632
|
+
sage: G = Matrix(K, [[1,1,0], [0,0,1]])
|
|
633
|
+
sage: C = codes.LinearRankMetricCode(G)
|
|
634
|
+
sage: c = vector([a^2, a^2, 0])
|
|
635
|
+
sage: basis = [a, a+1, a^2]
|
|
636
|
+
sage: C.rank_support_of_vector(c, basis=basis)
|
|
637
|
+
Vector space of degree 3 and dimension 1 over Finite Field of size 2
|
|
638
|
+
Basis matrix:
|
|
639
|
+
[0 0 1]
|
|
640
|
+
|
|
641
|
+
TESTS::
|
|
642
|
+
|
|
643
|
+
sage: C.rank_support_of_vector(c, GF(2^4))
|
|
644
|
+
Traceback (most recent call last):
|
|
645
|
+
...
|
|
646
|
+
TypeError: the input subfield Finite Field in z4 of size 2^4 is not a subfield of Finite Field in a of size 2^3
|
|
647
|
+
"""
|
|
648
|
+
word = self.ambient_space()(word)
|
|
649
|
+
if sub_field is not None:
|
|
650
|
+
if self.base_field().degree() % sub_field.degree() != 0:
|
|
651
|
+
raise TypeError(f"the input subfield {sub_field} is not a subfield of {self.base_field()}")
|
|
652
|
+
return to_matrix_representation(word, sub_field, basis).column_module()
|
|
653
|
+
|
|
592
654
|
def matrix_form_of_vector(self, word):
|
|
593
655
|
r"""
|
|
594
656
|
Return the matrix representation of a word.
|
|
@@ -680,9 +742,9 @@ class LinearRankMetricCode(AbstractLinearRankMetricCode):
|
|
|
680
742
|
specified, it is the prime field of ``base_field``
|
|
681
743
|
|
|
682
744
|
- ``basis`` -- (default: ``None``) a basis of `\GF{q^m}` as a vector space over
|
|
683
|
-
``sub_field``. If not specified,
|
|
684
|
-
`1,\beta,\ldots,\beta^{
|
|
685
|
-
|
|
745
|
+
``sub_field``. If not specified, the default basis is
|
|
746
|
+
`1,\beta,\ldots,\beta^{m-1}` where `\beta` is the generator `\GF{q^m}`
|
|
747
|
+
given by SageMath.
|
|
686
748
|
|
|
687
749
|
EXAMPLES::
|
|
688
750
|
|
sage/combinat/free_module.py
CHANGED
|
@@ -1777,6 +1777,26 @@ class CombinatorialFreeModule_CartesianProduct(CombinatorialFreeModule):
|
|
|
1777
1777
|
sage: S = cartesian_product([cartesian_product([F, G]), H]) # todo: not implemented
|
|
1778
1778
|
F (+) G (+) H
|
|
1779
1779
|
"""
|
|
1780
|
+
@staticmethod
|
|
1781
|
+
def __classcall_private__(cls, modules, category, **options):
|
|
1782
|
+
"""
|
|
1783
|
+
Dispatch to the appropriate class based on the input.
|
|
1784
|
+
|
|
1785
|
+
EXAMPLES::
|
|
1786
|
+
|
|
1787
|
+
sage: # needs sage.combinat sage.groups
|
|
1788
|
+
sage: Q = RootSystem(['A',3]).root_space(GF(3))
|
|
1789
|
+
sage: W = WeylGroup(['A',3], prefix='s')
|
|
1790
|
+
sage: CP = cartesian_product([Q, W])
|
|
1791
|
+
sage: type(CP)
|
|
1792
|
+
<class 'sage.sets.cartesian_product.CartesianProduct_with_category'>
|
|
1793
|
+
"""
|
|
1794
|
+
R = modules[0].base_ring()
|
|
1795
|
+
Cat = ModulesWithBasis(R)
|
|
1796
|
+
if any(module not in Cat for module in modules):
|
|
1797
|
+
from sage.sets.cartesian_product import CartesianProduct
|
|
1798
|
+
return CartesianProduct(modules, category, **options)
|
|
1799
|
+
return super().__classcall__(cls, modules, category=category, **options)
|
|
1780
1800
|
|
|
1781
1801
|
def __init__(self, modules, **options):
|
|
1782
1802
|
r"""
|
|
@@ -1788,9 +1808,9 @@ class CombinatorialFreeModule_CartesianProduct(CombinatorialFreeModule):
|
|
|
1788
1808
|
Free module generated by {2, 4, 5} over Integer Ring (+) Free module generated by {2, 4, 7} over Integer Ring
|
|
1789
1809
|
sage: TestSuite(C).run()
|
|
1790
1810
|
"""
|
|
1791
|
-
assert
|
|
1811
|
+
assert len(modules) # TODO: generalize to a family or tuple
|
|
1792
1812
|
R = modules[0].base_ring()
|
|
1793
|
-
assert
|
|
1813
|
+
assert all(module in ModulesWithBasis(R) for module in modules)
|
|
1794
1814
|
# should check the base ring
|
|
1795
1815
|
self._sets = modules
|
|
1796
1816
|
CombinatorialFreeModule.__init__(self, R,
|
sage/combinat/root_system/all.py
CHANGED
|
@@ -194,7 +194,7 @@ class AmbientSpace(CombinatorialFreeModule):
|
|
|
194
194
|
# This adds coercion from a list
|
|
195
195
|
if isinstance(v, (list, tuple)):
|
|
196
196
|
K = self.base_ring()
|
|
197
|
-
return self._from_dict(
|
|
197
|
+
return self._from_dict({i: K(c) for i, c in enumerate(v) if c})
|
|
198
198
|
else:
|
|
199
199
|
return CombinatorialFreeModule.__call__(self, v)
|
|
200
200
|
|
|
@@ -120,8 +120,8 @@ def Associahedron(cartan_type, backend='ppl'):
|
|
|
120
120
|
|
|
121
121
|
sage: p1 = polytopes.associahedron(['A',4], backend='normaliz') # optional - pynormaliz
|
|
122
122
|
sage: TestSuite(p1).run(skip='_test_pickling') # optional - pynormaliz
|
|
123
|
-
sage: p2 = polytopes.associahedron(['A',4], backend='cdd')
|
|
124
|
-
sage: TestSuite(p2).run()
|
|
123
|
+
sage: p2 = polytopes.associahedron(['A',4], backend='cdd') # needs cddexec_gmp
|
|
124
|
+
sage: TestSuite(p2).run() # needs cddexec_gmp
|
|
125
125
|
sage: p3 = polytopes.associahedron(['A',4], backend='field')
|
|
126
126
|
sage: TestSuite(p3).run()
|
|
127
127
|
"""
|
|
@@ -141,7 +141,7 @@ class Associahedron_class_base:
|
|
|
141
141
|
|
|
142
142
|
sage: Asso = polytopes.associahedron(['A',2]); Asso
|
|
143
143
|
Generalized associahedron of type ['A', 2] with 5 vertices
|
|
144
|
-
sage: TestSuite(Asso).run()
|
|
144
|
+
sage: TestSuite(Asso).run() # needs cddexec
|
|
145
145
|
"""
|
|
146
146
|
def __new__(typ, parent=None, Vrep=None, Hrep=None, cartan_type=None, **kwds):
|
|
147
147
|
r"""
|
|
@@ -181,7 +181,7 @@ class Associahedron_class_base:
|
|
|
181
181
|
A 4-dimensional polyhedron in QQ^4 defined as the convex hull of 42 vertices
|
|
182
182
|
sage: A.dilation(2)
|
|
183
183
|
A 4-dimensional polyhedron in QQ^4 defined as the convex hull of 42 vertices
|
|
184
|
-
sage: A.dilation(2.0)
|
|
184
|
+
sage: A.dilation(2.0) # needs cddexec
|
|
185
185
|
A 4-dimensional polyhedron in RDF^4 defined as the convex hull of 42 vertices
|
|
186
186
|
sage: A.convex_hull(A)
|
|
187
187
|
A 4-dimensional polyhedron in QQ^4 defined as the convex hull of 42 vertices
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-modules
|
|
2
|
-
# sage.doctest: needs sage.libs.gap
|
|
2
|
+
# sage.doctest: needs sage.graphs sage.libs.gap
|
|
3
3
|
"""
|
|
4
|
-
Branching
|
|
4
|
+
Branching rules
|
|
5
5
|
"""
|
|
6
6
|
# ****************************************************************************
|
|
7
7
|
# Copyright (C) 2014 Daniel Bump <bump at match.stanford.edu>
|
|
@@ -645,7 +645,7 @@ def branch_weyl_character(chi, R, S, rule='default'):
|
|
|
645
645
|
These embeddings are described more completely (with references
|
|
646
646
|
to the literature) in the thematic tutorial at:
|
|
647
647
|
|
|
648
|
-
https://
|
|
648
|
+
https://passagemath.org/docs/latest/html/en/thematic_tutorials/lie.html
|
|
649
649
|
|
|
650
650
|
EXAMPLES::
|
|
651
651
|
|
|
@@ -1740,10 +1740,10 @@ class CartanType_crystallographic(CartanType_abstract):
|
|
|
1740
1740
|
from sage.matrix.constructor import matrix, diagonal_matrix
|
|
1741
1741
|
m = self.cartan_matrix()
|
|
1742
1742
|
n = m.nrows()
|
|
1743
|
-
M = matrix(ZZ, n, n*n, sparse=True)
|
|
1744
|
-
for
|
|
1745
|
-
M[i, n * i + j] = m[i,j]
|
|
1746
|
-
M[j, n * i + j] -= m[j,i]
|
|
1743
|
+
M = matrix(ZZ, n, n * n, sparse=True)
|
|
1744
|
+
for i, j in m.nonzero_positions():
|
|
1745
|
+
M[i, n * i + j] = m[i, j]
|
|
1746
|
+
M[j, n * i + j] -= m[j, i]
|
|
1747
1747
|
kern = M.integer_kernel()
|
|
1748
1748
|
c = len(self.dynkin_diagram().connected_components(sort=False))
|
|
1749
1749
|
if kern.dimension() < c:
|
|
@@ -1758,7 +1758,7 @@ class CartanType_crystallographic(CartanType_abstract):
|
|
|
1758
1758
|
D = sum(kern.basis())
|
|
1759
1759
|
assert diagonal_matrix(D) * m == m.transpose() * diagonal_matrix(D)
|
|
1760
1760
|
I = self.index_set()
|
|
1761
|
-
return Family(
|
|
1761
|
+
return Family({I[i]: D[i] for i in range(n)})
|
|
1762
1762
|
|
|
1763
1763
|
def index_set_bipartition(self):
|
|
1764
1764
|
r"""
|
|
@@ -2132,7 +2132,7 @@ class CartanType_affine(CartanType_simple, CartanType_crystallographic):
|
|
|
2132
2132
|
raise ValueError("the kernel is not 1 dimensional")
|
|
2133
2133
|
assert (all(coef > 0 for coef in annihilator_basis[0]))
|
|
2134
2134
|
|
|
2135
|
-
return Family(
|
|
2135
|
+
return Family({i: annihilator_basis[0][i] for i in self.index_set()})
|
|
2136
2136
|
|
|
2137
2137
|
acheck = row_annihilator
|
|
2138
2138
|
|
|
@@ -2206,8 +2206,8 @@ class CartanType_affine(CartanType_simple, CartanType_crystallographic):
|
|
|
2206
2206
|
"""
|
|
2207
2207
|
a = self.a()
|
|
2208
2208
|
acheck = self.acheck()
|
|
2209
|
-
return Family(
|
|
2210
|
-
|
|
2209
|
+
return Family({i: max(ZZ.one(), a[i] // acheck[i])
|
|
2210
|
+
for i in self.index_set()})
|
|
2211
2211
|
|
|
2212
2212
|
def translation_factors(self):
|
|
2213
2213
|
r"""
|
|
@@ -2373,21 +2373,21 @@ class CartanType_affine(CartanType_simple, CartanType_crystallographic):
|
|
|
2373
2373
|
|
|
2374
2374
|
REFERENCES:
|
|
2375
2375
|
|
|
2376
|
-
.. [HST09] \F. Hivert, A. Schilling, and N. M.
|
|
2376
|
+
.. [HST09] \F. Hivert, A. Schilling, and N. M. Thiéry,
|
|
2377
2377
|
*Hecke group algebras as quotients of affine Hecke
|
|
2378
2378
|
algebras at level 0*, JCT A, Vol. 116, (2009) p. 844-863
|
|
2379
2379
|
:arxiv:`0804.3781`
|
|
2380
2380
|
"""
|
|
2381
2381
|
a = self.a()
|
|
2382
2382
|
acheck = self.acheck()
|
|
2383
|
-
|
|
2383
|
+
s = set(a[i] / acheck[i] for i in self.index_set())
|
|
2384
|
+
if ~ZZ(2) in s and 2 in s:
|
|
2384
2385
|
# The test above and the formula below are rather meaningless
|
|
2385
2386
|
# But they detect properly type BC or dual and return the correct value
|
|
2386
|
-
return Family(
|
|
2387
|
-
|
|
2387
|
+
return Family({i: min(ZZ.one(), a[i] / acheck[i])
|
|
2388
|
+
for i in self.index_set()})
|
|
2388
2389
|
|
|
2389
|
-
|
|
2390
|
-
return self.c()
|
|
2390
|
+
return self.c()
|
|
2391
2391
|
|
|
2392
2392
|
def _test_dual_classical(self, **options):
|
|
2393
2393
|
r"""
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-modules
|
|
2
2
|
# sage.doctest: needs sage.graphs
|
|
3
3
|
"""
|
|
4
|
-
Coxeter
|
|
4
|
+
Coxeter groups
|
|
5
5
|
"""
|
|
6
6
|
# ***************************************************************************
|
|
7
7
|
# Copyright (C) 2010 Nicolas Thiery <nthiery at users.sf.net>
|
|
@@ -105,12 +105,12 @@ def CoxeterGroup(data, implementation='reflection', base_ring=None, index_set=No
|
|
|
105
105
|
|
|
106
106
|
We use the different options for the "reflection" implementation::
|
|
107
107
|
|
|
108
|
-
sage: W = CoxeterGroup(["H",3], implementation='reflection', base_ring=RR); W # needs sage.libs.gap
|
|
108
|
+
sage: W = CoxeterGroup(["H",3], implementation='reflection', base_ring=RR); W # needs sage.libs.gap sage.symbolic
|
|
109
109
|
Finite Coxeter group over Real Field with 53 bits of precision with Coxeter matrix:
|
|
110
110
|
[1 3 2]
|
|
111
111
|
[3 1 5]
|
|
112
112
|
[2 5 1]
|
|
113
|
-
sage: W = CoxeterGroup([[1,10],[10,1]], implementation='reflection', # needs sage.
|
|
113
|
+
sage: W = CoxeterGroup([[1,10],[10,1]], implementation='reflection', # needs sage.symbolic
|
|
114
114
|
....: index_set=['a','b'], base_ring=SR); W
|
|
115
115
|
Finite Coxeter group over Symbolic Ring with Coxeter matrix:
|
|
116
116
|
[ 1 10]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-modules
|
|
2
2
|
# sage.doctest: needs sage.graphs
|
|
3
3
|
"""
|
|
4
|
-
Coxeter
|
|
4
|
+
Coxeter matrices
|
|
5
5
|
"""
|
|
6
6
|
# ****************************************************************************
|
|
7
7
|
# Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# sage_setup: distribution = sagemath-modules
|
|
2
2
|
"""
|
|
3
|
-
Coxeter
|
|
3
|
+
Coxeter types
|
|
4
4
|
"""
|
|
5
5
|
# ****************************************************************************
|
|
6
6
|
# Copyright (C) 2015 Travis Scrimshaw <tscrim at ucdavis.edu>,
|
|
@@ -397,6 +397,17 @@ class CoxeterType(SageObject, metaclass=ClasscallMetaclass):
|
|
|
397
397
|
return R((E(2*x) + ~E(2*x)).to_cyclotomic_field()) / R(-2)
|
|
398
398
|
else:
|
|
399
399
|
return R(x)
|
|
400
|
+
elif all(mat[i,j] in (1, 2, 3) or mat[i, j] <= -1 for i in range(n) for j in range(n)):
|
|
401
|
+
def val(x):
|
|
402
|
+
if x > -1:
|
|
403
|
+
if x == 1:
|
|
404
|
+
return R(1)
|
|
405
|
+
elif x == 2:
|
|
406
|
+
return R(0)
|
|
407
|
+
elif x == 3:
|
|
408
|
+
return R(1)/R(-2)
|
|
409
|
+
else:
|
|
410
|
+
return R(x)
|
|
400
411
|
else:
|
|
401
412
|
from sage.functions.trig import cos
|
|
402
413
|
from sage.symbolic.constants import pi
|