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
|
@@ -6,9 +6,12 @@ Subalgebras and ideals of Lie algebras
|
|
|
6
6
|
AUTHORS:
|
|
7
7
|
|
|
8
8
|
- Eero Hakavuori (2018-08-29): initial version
|
|
9
|
+
- Travis Scrimshaw (2025-05-21): make all Lie subalgebras use elements
|
|
10
|
+
in the ambient Lie algebra
|
|
9
11
|
"""
|
|
10
12
|
# ****************************************************************************
|
|
11
13
|
# Copyright (C) 2018 Eero Hakavuori <eero.hakavuori@gmail.com>
|
|
14
|
+
# 2025 Travis Scrimshaw <tcscrims at gmail.com>
|
|
12
15
|
#
|
|
13
16
|
# This program is free software: you can redistribute it and/or modify
|
|
14
17
|
# it under the terms of the GNU General Public License as published by
|
|
@@ -26,7 +29,7 @@ from sage.misc.lazy_attribute import lazy_attribute
|
|
|
26
29
|
from sage.sets.family import Family
|
|
27
30
|
from sage.sets.finite_enumerated_set import FiniteEnumeratedSet
|
|
28
31
|
from sage.structure.parent import Parent
|
|
29
|
-
from sage.structure.element import parent
|
|
32
|
+
from sage.structure.element import parent, Element
|
|
30
33
|
from sage.structure.unique_representation import UniqueRepresentation
|
|
31
34
|
|
|
32
35
|
|
|
@@ -59,10 +62,10 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
59
62
|
|
|
60
63
|
sage: S = L.subalgebra(Y)
|
|
61
64
|
sage: S.basis()
|
|
62
|
-
|
|
65
|
+
Finite family {'q1': q1}
|
|
63
66
|
sage: I = L.ideal(Y)
|
|
64
67
|
sage: I.basis()
|
|
65
|
-
|
|
68
|
+
Finite family {'q1': q1, 'z': z}
|
|
66
69
|
|
|
67
70
|
The zero dimensional subalgebra can be created by giving 0 as a generator
|
|
68
71
|
or with an empty list of generators::
|
|
@@ -73,7 +76,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
73
76
|
sage: S1 is S2
|
|
74
77
|
True
|
|
75
78
|
sage: S1.basis()
|
|
76
|
-
|
|
79
|
+
Finite family {}
|
|
77
80
|
|
|
78
81
|
Elements of the ambient Lie algebra can be reduced modulo an
|
|
79
82
|
ideal or subalgebra::
|
|
@@ -94,7 +97,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
94
97
|
sage: # needs sage.symbolic
|
|
95
98
|
sage: I = L.ideal(X + Y)
|
|
96
99
|
sage: I.basis()
|
|
97
|
-
|
|
100
|
+
Finite family {'Y': X + Y, 'Z': Z}
|
|
98
101
|
sage: el = var('x')*X + var('y')*Y + var('z')*Z; el
|
|
99
102
|
x*X + y*Y + z*Z
|
|
100
103
|
sage: I.reduce(el)
|
|
@@ -104,7 +107,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
104
107
|
|
|
105
108
|
sage: I = L.ideal(X + Y, order=lambda s: ['Z','Y','X'].index(s)) # needs sage.symbolic
|
|
106
109
|
sage: I.basis() # needs sage.symbolic
|
|
107
|
-
|
|
110
|
+
Finite family {'Z': Z, 'X': X + Y}
|
|
108
111
|
sage: I.reduce(el) # needs sage.symbolic
|
|
109
112
|
(-x+y)*Y
|
|
110
113
|
|
|
@@ -126,20 +129,22 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
126
129
|
sage: J = I.ideal(Z); J
|
|
127
130
|
Ideal (Z) of Ideal (Y) of Lie algebra on 4 generators (X, Y, Z, W) over Rational Field
|
|
128
131
|
sage: J.basis()
|
|
129
|
-
|
|
132
|
+
Finite family {'Z': Z}
|
|
130
133
|
sage: J.is_ideal(L)
|
|
131
134
|
False
|
|
132
135
|
sage: K = L.ideal(J.basis().list())
|
|
133
136
|
sage: K.basis()
|
|
134
|
-
|
|
137
|
+
Finite family {'Z': Z, 'W': W}
|
|
135
138
|
|
|
136
139
|
TESTS:
|
|
137
140
|
|
|
138
141
|
Test suites::
|
|
139
142
|
|
|
140
|
-
sage:
|
|
143
|
+
sage: sc = {('X','Y'): {'Z': 1}, ('X','Z'): {'W': 1}}
|
|
144
|
+
sage: L.<X,Y,Z,W> = LieAlgebra(QQ, sc)
|
|
145
|
+
sage: S = L.subalgebra(X + Y)
|
|
141
146
|
sage: TestSuite(S).run()
|
|
142
|
-
sage: I =
|
|
147
|
+
sage: I = L.ideal(X + Y)
|
|
143
148
|
sage: TestSuite(I).run()
|
|
144
149
|
|
|
145
150
|
Verify that subalgebras and ideals of nilpotent Lie algebras are nilpotent::
|
|
@@ -167,7 +172,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
167
172
|
W
|
|
168
173
|
"""
|
|
169
174
|
@staticmethod
|
|
170
|
-
def __classcall_private__(cls, ambient, gens,
|
|
175
|
+
def __classcall_private__(cls, ambient, gens, ideal_of=None,
|
|
171
176
|
order=None, category=None):
|
|
172
177
|
"""
|
|
173
178
|
Normalize input to ensure a unique representation.
|
|
@@ -216,15 +221,32 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
216
221
|
Subalgebra generated by (a, a, b, e) of Lie algebra on
|
|
217
222
|
5 generators (a, b, c, d, e) over Rational Field
|
|
218
223
|
sage: S.basis()
|
|
219
|
-
|
|
224
|
+
Finite family {'a': a, 'b': b, 'e': e}
|
|
225
|
+
|
|
226
|
+
Check that other container-like objects are handled properly
|
|
227
|
+
(:issue:`40137`)::
|
|
228
|
+
|
|
229
|
+
sage: L.<a,b,c,d> = LieAlgebra(QQ, {('a','b'): {'c': 1, 'd':1}})
|
|
230
|
+
sage: A = L.ideal([b, c, d])
|
|
231
|
+
sage: B = L.ideal([b, c+d])
|
|
232
|
+
sage: A.ideal(B)
|
|
233
|
+
Ideal (b, c + d) of Ideal (b, c, d) of Lie algebra on 4 generators
|
|
234
|
+
(a, b, c, d) over Rational Field
|
|
235
|
+
sage: A.ideal(B.basis())
|
|
236
|
+
Ideal (b, c + d) of Ideal (b, c, d) of Lie algebra on 4 generators
|
|
237
|
+
(a, b, c, d) over Rational Field
|
|
220
238
|
"""
|
|
239
|
+
if isinstance(ambient, LieSubalgebra_finite_dimensional_with_basis):
|
|
240
|
+
ambient = ambient._ambient
|
|
221
241
|
if isinstance(gens, LieSubalgebra_finite_dimensional_with_basis):
|
|
222
|
-
if
|
|
242
|
+
if gens._ideal_of is ideal_of:
|
|
223
243
|
return gens
|
|
224
244
|
gens = gens.lie_algebra_generators()
|
|
225
|
-
if
|
|
245
|
+
if isinstance(gens, Element):
|
|
226
246
|
gens = [gens]
|
|
227
247
|
new_gens = []
|
|
248
|
+
|
|
249
|
+
# make sure all elements belong to the ambient Lie algebra
|
|
228
250
|
for gen in gens:
|
|
229
251
|
if isinstance(gen, LieSubalgebra_finite_dimensional_with_basis):
|
|
230
252
|
new_gens.extend(ambient(b) for b in gen.basis())
|
|
@@ -232,21 +254,15 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
232
254
|
new_gens.append(ambient(gen))
|
|
233
255
|
gens = tuple(new_gens)
|
|
234
256
|
|
|
235
|
-
if not ideal and isinstance(ambient,
|
|
236
|
-
LieSubalgebra_finite_dimensional_with_basis):
|
|
237
|
-
# a nested subalgebra is a subalgebra
|
|
238
|
-
gens = tuple(ambient.lift(gen) for gen in gens)
|
|
239
|
-
ambient = ambient.ambient()
|
|
240
|
-
|
|
241
257
|
cat = LieAlgebras(ambient.base_ring()).FiniteDimensional().WithBasis()
|
|
242
258
|
category = cat.Subobjects().or_subcategory(category)
|
|
243
259
|
if ambient in LieAlgebras(ambient.base_ring()).Nilpotent():
|
|
244
260
|
category = category.Nilpotent()
|
|
245
261
|
|
|
246
|
-
return super().__classcall__(cls, ambient, gens,
|
|
262
|
+
return super().__classcall__(cls, ambient, gens, ideal_of,
|
|
247
263
|
order, category)
|
|
248
264
|
|
|
249
|
-
def __init__(self, ambient, gens,
|
|
265
|
+
def __init__(self, ambient, gens, ideal_of, order=None, category=None):
|
|
250
266
|
r"""
|
|
251
267
|
Initialize ``self``.
|
|
252
268
|
|
|
@@ -264,7 +280,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
264
280
|
True
|
|
265
281
|
"""
|
|
266
282
|
self._ambient = ambient
|
|
267
|
-
self.
|
|
283
|
+
self._ideal_of = ideal_of
|
|
268
284
|
|
|
269
285
|
# initialize helper variables for ordering
|
|
270
286
|
if order is None:
|
|
@@ -352,16 +368,10 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
352
368
|
sage: L.ideal([X, Y])
|
|
353
369
|
Ideal (X, Y) of Abelian Lie algebra on 2 generators (X, Y) over Rational Field
|
|
354
370
|
"""
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
gens = gens[0]
|
|
358
|
-
|
|
359
|
-
if self._is_ideal:
|
|
360
|
-
basestr = "Ideal"
|
|
361
|
-
else:
|
|
362
|
-
basestr = "Subalgebra generated by"
|
|
371
|
+
if self._ideal_of is not None:
|
|
372
|
+
return "Ideal {} of {}".format(self._repr_short(), self._ideal_of)
|
|
363
373
|
|
|
364
|
-
return "
|
|
374
|
+
return "Subalgebra generated by {} of {}".format(self._repr_short(), self.ambient())
|
|
365
375
|
|
|
366
376
|
def _repr_short(self):
|
|
367
377
|
"""
|
|
@@ -390,7 +400,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
390
400
|
sage: S._an_element_()
|
|
391
401
|
X
|
|
392
402
|
"""
|
|
393
|
-
return self.lie_algebra_generators()
|
|
403
|
+
return next(iter(self.lie_algebra_generators()))
|
|
394
404
|
|
|
395
405
|
def _element_constructor_(self, x):
|
|
396
406
|
"""
|
|
@@ -538,7 +548,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
538
548
|
sage: L.<x,y,z> = LieAlgebra(QQ, abelian=True)
|
|
539
549
|
sage: S = L.subalgebra([x, y])
|
|
540
550
|
sage: S._indices
|
|
541
|
-
{
|
|
551
|
+
{'x', 'y'}
|
|
542
552
|
sage: [S.basis()[k] for k in S._indices]
|
|
543
553
|
[x, y]
|
|
544
554
|
"""
|
|
@@ -551,11 +561,11 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
551
561
|
EXAMPLES::
|
|
552
562
|
|
|
553
563
|
sage: L.<x,y,z> = LieAlgebra(QQ, abelian=True)
|
|
554
|
-
sage: S = L.subalgebra([x,
|
|
564
|
+
sage: S = L.subalgebra([x+y, z])
|
|
555
565
|
sage: S.indices()
|
|
556
|
-
{
|
|
566
|
+
{'y', 'z'}
|
|
557
567
|
sage: [S.basis()[k] for k in S.indices()]
|
|
558
|
-
[x,
|
|
568
|
+
[x + y, z]
|
|
559
569
|
"""
|
|
560
570
|
return self._indices
|
|
561
571
|
|
|
@@ -643,12 +653,13 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
643
653
|
by (X_1, X_2) of Free Nilpotent Lie algebra on 6 generators
|
|
644
654
|
(X_1, X_2, X_3, X_12, X_13, X_23) over Rational Field
|
|
645
655
|
"""
|
|
656
|
+
X = self._ambient(X)
|
|
646
657
|
if X not in self:
|
|
647
658
|
raise ValueError("the element %s is not in %s" % (X, self))
|
|
648
659
|
|
|
649
660
|
return self.element_class(self, X)
|
|
650
661
|
|
|
651
|
-
def gens(self):
|
|
662
|
+
def gens(self) -> tuple:
|
|
652
663
|
r"""
|
|
653
664
|
Return the generating set of ``self``.
|
|
654
665
|
|
|
@@ -678,9 +689,9 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
678
689
|
|
|
679
690
|
sage: I = L.ideal(x)
|
|
680
691
|
sage: I.lie_algebra_generators()
|
|
681
|
-
|
|
692
|
+
Finite family {'x': x, 'z': z}
|
|
682
693
|
"""
|
|
683
|
-
if self.
|
|
694
|
+
if self._ideal_of is not None:
|
|
684
695
|
return self.basis()
|
|
685
696
|
return self._gens
|
|
686
697
|
|
|
@@ -696,14 +707,14 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
696
707
|
sage: sc = {('a','b'): {'c': 1}, ('a','c'): {'d': 1}}
|
|
697
708
|
sage: L.<a,b,c,d> = LieAlgebra(QQ, sc)
|
|
698
709
|
sage: L.subalgebra([a + b, c + d]).basis()
|
|
699
|
-
|
|
710
|
+
Finite family {'b': a + b, 'c': c, 'd': d}
|
|
700
711
|
|
|
701
712
|
A basis of an ideal::
|
|
702
713
|
|
|
703
714
|
sage: sc = {('x','y'): {'z': 1}, ('x','z'): {'w': 1}}
|
|
704
715
|
sage: L.<x,y,z,w> = LieAlgebra(QQ, sc)
|
|
705
716
|
sage: L.ideal([x + y + z + w]).basis()
|
|
706
|
-
|
|
717
|
+
Finite family {'y': x + y, 'z': z, 'w': w}
|
|
707
718
|
|
|
708
719
|
This also works for Lie algebras whose natural basis elements
|
|
709
720
|
are not comparable (but have a well-defined basis ordering)::
|
|
@@ -718,27 +729,36 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
718
729
|
sage: sl3.subalgebra(e).dimension()
|
|
719
730
|
3
|
|
720
731
|
"""
|
|
721
|
-
|
|
722
|
-
|
|
732
|
+
ambient = self._ambient
|
|
733
|
+
if self._ideal_of is not None:
|
|
734
|
+
L = self._ideal_of
|
|
735
|
+
B = [self._to_m(ambient(X)) for X in L.basis()]
|
|
736
|
+
else:
|
|
737
|
+
L = ambient
|
|
738
|
+
B = [self._to_m(X) for X in ambient.basis()]
|
|
723
739
|
|
|
724
|
-
m =
|
|
740
|
+
m = ambient.module()
|
|
725
741
|
sm = m.submodule([self._to_m(X.value) for X in self.gens()])
|
|
726
742
|
d = 0
|
|
727
743
|
|
|
728
744
|
while sm.dimension() > d:
|
|
729
745
|
d = sm.dimension()
|
|
730
746
|
SB = sm.basis()
|
|
731
|
-
if
|
|
747
|
+
if self._ideal_of is None:
|
|
732
748
|
B = SB
|
|
733
749
|
|
|
734
|
-
brackets = [self._to_m(
|
|
750
|
+
brackets = [self._to_m(ambient.bracket(self._from_m(v), self._from_m(w)))
|
|
735
751
|
for v in B for w in SB]
|
|
736
752
|
sm = m.submodule(sm.basis() + brackets)
|
|
737
753
|
|
|
738
754
|
basis = [self.element_class(self, self._from_m(v))
|
|
739
755
|
for v in sm.echelonized_basis()]
|
|
740
|
-
|
|
741
|
-
|
|
756
|
+
|
|
757
|
+
indices = [self.lift(X).leading_support(key=self._order) for X in basis]
|
|
758
|
+
basis = dict(zip(indices, basis))
|
|
759
|
+
indices.sort(key=self._order)
|
|
760
|
+
|
|
761
|
+
return Family(indices, basis.__getitem__)
|
|
742
762
|
|
|
743
763
|
@cached_method
|
|
744
764
|
def leading_monomials(self):
|
|
@@ -753,7 +773,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
753
773
|
sage: L.<a,b,c,d> = LieAlgebra(ZZ, sc)
|
|
754
774
|
sage: I = L.ideal(a + b)
|
|
755
775
|
sage: I.basis()
|
|
756
|
-
|
|
776
|
+
Finite family {'b': a + b, 'c': 2*c, 'd': 4*d}
|
|
757
777
|
sage: I.leading_monomials()
|
|
758
778
|
Family (b, c, d)
|
|
759
779
|
|
|
@@ -762,7 +782,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
762
782
|
sage: key = lambda s: ['d','c','b','a'].index(s)
|
|
763
783
|
sage: I = L.ideal(a + b, order=key)
|
|
764
784
|
sage: I.basis()
|
|
765
|
-
|
|
785
|
+
Finite family {'d': 4*d, 'c': 2*c, 'a': a + b}
|
|
766
786
|
sage: I.leading_monomials()
|
|
767
787
|
Family (d, c, a)
|
|
768
788
|
"""
|
|
@@ -885,7 +905,7 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
885
905
|
sage: L.is_ideal(I)
|
|
886
906
|
False
|
|
887
907
|
"""
|
|
888
|
-
if A
|
|
908
|
+
if A is self._ideal_of:
|
|
889
909
|
return True
|
|
890
910
|
return super().is_ideal(A)
|
|
891
911
|
|
|
@@ -900,7 +920,10 @@ class LieSubalgebra_finite_dimensional_with_basis(Parent, UniqueRepresentation):
|
|
|
900
920
|
sage: m = MS([[0, -1], [1, 0]])
|
|
901
921
|
sage: L = LieAlgebra(associative=MS)
|
|
902
922
|
sage: S = L.subalgebra([m])
|
|
903
|
-
sage:
|
|
923
|
+
sage: S.basis()
|
|
924
|
+
Finite family {(1, 0): [ 0 -1]
|
|
925
|
+
[ 1 0]}
|
|
926
|
+
sage: x = S.basis()[1,0]
|
|
904
927
|
sage: x.parent() is S
|
|
905
928
|
True
|
|
906
929
|
sage: x.adjoint_matrix()
|
|
@@ -30,11 +30,9 @@ from sage.categories.morphism import Morphism
|
|
|
30
30
|
from sage.categories.homset import Hom, Homset
|
|
31
31
|
from sage.monoids.indexed_free_monoid import IndexedFreeAbelianMonoid
|
|
32
32
|
from sage.combinat.free_module import CombinatorialFreeModule
|
|
33
|
-
from sage.modules.free_module_element import vector
|
|
34
33
|
from sage.sets.family import Family
|
|
35
34
|
from sage.structure.richcmp import richcmp
|
|
36
35
|
from sage.rings.integer_ring import ZZ
|
|
37
|
-
from sage.rings.rational_field import QQ
|
|
38
36
|
|
|
39
37
|
|
|
40
38
|
class ModulePrinting:
|
|
@@ -358,7 +356,7 @@ class VermaModule(ModulePrinting, CombinatorialFreeModule):
|
|
|
358
356
|
return self._from_dict({self._indices.one(): one},
|
|
359
357
|
remove_zeros=False, coerce=False)
|
|
360
358
|
|
|
361
|
-
def gens(self):
|
|
359
|
+
def gens(self) -> tuple:
|
|
362
360
|
r"""
|
|
363
361
|
Return the generators of ``self`` as a `U(\mathfrak{g})`-module.
|
|
364
362
|
|
|
Binary file
|
sage/algebras/orlik_solomon.py
CHANGED
|
@@ -193,7 +193,7 @@ class OrlikSolomonAlgebra(CombinatorialFreeModule):
|
|
|
193
193
|
|
|
194
194
|
sage: M = matroids.Wheel(3)
|
|
195
195
|
sage: OS = M.orlik_solomon_algebra(QQ)
|
|
196
|
-
sage: OS.one_basis() == frozenset(
|
|
196
|
+
sage: OS.one_basis() == frozenset()
|
|
197
197
|
True
|
|
198
198
|
"""
|
|
199
199
|
return frozenset({})
|
|
@@ -348,7 +348,7 @@ class OrlikSolomonAlgebra(CombinatorialFreeModule):
|
|
|
348
348
|
[[(1, 2), (1, 4), (2, 3), (3, 4)],
|
|
349
349
|
[(3, 5), (3, 6), (5, 6)]]
|
|
350
350
|
sage: OSMG = MG.orlik_solomon_algebra(QQ, ordering=s)
|
|
351
|
-
sage: OSMG.subset_image(frozenset(
|
|
351
|
+
sage: OSMG.subset_image(frozenset())
|
|
352
352
|
OS{}
|
|
353
353
|
sage: OSMG.subset_image(frozenset([(1,2),(3,4),(1,4),(2,3)]))
|
|
354
354
|
0
|
|
@@ -376,7 +376,7 @@ class OrlikSolomonAlgebra(CombinatorialFreeModule):
|
|
|
376
376
|
[0, 3, 5], [1, 2, 4], [1, 2, 5], [1, 3, 4],
|
|
377
377
|
[1, 3, 5], [2, 3], [4, 5]]
|
|
378
378
|
sage: OSMG = MG.orlik_solomon_algebra(QQ)
|
|
379
|
-
sage: OSMG.subset_image(frozenset(
|
|
379
|
+
sage: OSMG.subset_image(frozenset())
|
|
380
380
|
OS{}
|
|
381
381
|
sage: OSMG.subset_image(frozenset([1, 2, 3]))
|
|
382
382
|
0
|
|
@@ -395,7 +395,7 @@ class OrlikSolomonAlgebra(CombinatorialFreeModule):
|
|
|
395
395
|
sage: sorted([sorted(c) for c in MG.circuits()])
|
|
396
396
|
[[0, 1], [2, 3, 4]]
|
|
397
397
|
sage: OSMG = MG.orlik_solomon_algebra(QQ)
|
|
398
|
-
sage: OSMG.subset_image(frozenset(
|
|
398
|
+
sage: OSMG.subset_image(frozenset())
|
|
399
399
|
OS{}
|
|
400
400
|
sage: OSMG.subset_image(frozenset([1, 3, 4]))
|
|
401
401
|
-OS{0, 2, 3} + OS{0, 2, 4}
|
sage/algebras/orlik_terao.py
CHANGED
|
@@ -243,7 +243,7 @@ class OrlikTeraoAlgebra(CombinatorialFreeModule):
|
|
|
243
243
|
|
|
244
244
|
sage: M = matroids.Wheel(3)
|
|
245
245
|
sage: OT = M.orlik_terao_algebra(QQ)
|
|
246
|
-
sage: OT.one_basis() == frozenset(
|
|
246
|
+
sage: OT.one_basis() == frozenset()
|
|
247
247
|
True
|
|
248
248
|
"""
|
|
249
249
|
return frozenset({})
|
|
@@ -392,7 +392,7 @@ class OrlikTeraoAlgebra(CombinatorialFreeModule):
|
|
|
392
392
|
[[(1, 2), (1, 4), (2, 3), (3, 4)],
|
|
393
393
|
[(3, 5), (3, 6), (5, 6)]]
|
|
394
394
|
sage: OT = M.orlik_terao_algebra(QQ, ordering=s)
|
|
395
|
-
sage: OT.subset_image(frozenset(
|
|
395
|
+
sage: OT.subset_image(frozenset())
|
|
396
396
|
OT{}
|
|
397
397
|
sage: OT.subset_image(frozenset([(1,2),(3,4),(1,4),(2,3)]))
|
|
398
398
|
0
|
|
@@ -420,7 +420,7 @@ class OrlikTeraoAlgebra(CombinatorialFreeModule):
|
|
|
420
420
|
[0, 3, 5], [1, 2, 4], [1, 2, 5], [1, 3, 4],
|
|
421
421
|
[1, 3, 5], [2, 3], [4, 5]]
|
|
422
422
|
sage: OT = M.orlik_terao_algebra()
|
|
423
|
-
sage: OT.subset_image(frozenset(
|
|
423
|
+
sage: OT.subset_image(frozenset())
|
|
424
424
|
OT{}
|
|
425
425
|
sage: OT.subset_image(frozenset([1, 2, 3]))
|
|
426
426
|
0
|
|
@@ -439,7 +439,7 @@ class OrlikTeraoAlgebra(CombinatorialFreeModule):
|
|
|
439
439
|
sage: sorted([sorted(c) for c in M.circuits()])
|
|
440
440
|
[[0, 1], [2, 3, 4]]
|
|
441
441
|
sage: OT = M.orlik_terao_algebra(QQ)
|
|
442
|
-
sage: OT.subset_image(frozenset(
|
|
442
|
+
sage: OT.subset_image(frozenset())
|
|
443
443
|
OT{}
|
|
444
444
|
sage: OT.subset_image(frozenset([1, 3, 4]))
|
|
445
445
|
-OT{0, 2, 3} + OT{0, 2, 4}
|
|
@@ -453,12 +453,13 @@ examples.
|
|
|
453
453
|
# Distributed under the terms of the GNU General Public License (GPL)
|
|
454
454
|
# ****************************************************************************
|
|
455
455
|
|
|
456
|
-
from sage.
|
|
457
|
-
from sage.misc.lazy_attribute import lazy_attribute
|
|
458
|
-
from sage.misc.cachefunc import cached_method
|
|
456
|
+
from sage.categories.homset import Hom
|
|
459
457
|
from sage.categories.modules_with_basis import ModulesWithBasis
|
|
460
458
|
from sage.categories.tensor import tensor
|
|
461
|
-
from sage.
|
|
459
|
+
from sage.combinat.free_module import CombinatorialFreeModule
|
|
460
|
+
from sage.misc.cachefunc import cached_method
|
|
461
|
+
from sage.misc.lazy_attribute import lazy_attribute
|
|
462
|
+
from sage.sets.family import Family
|
|
462
463
|
|
|
463
464
|
######################################################
|
|
464
465
|
# the main class
|
|
@@ -2109,7 +2110,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2109
2110
|
sage: A1._element_constructor_(Sq(4)) # Sq(4) not in A1
|
|
2110
2111
|
Traceback (most recent call last):
|
|
2111
2112
|
...
|
|
2112
|
-
ValueError:
|
|
2113
|
+
ValueError: element does not lie in this Steenrod algebra
|
|
2113
2114
|
sage: A1({(2,): 1, (1,): 13})
|
|
2114
2115
|
Sq(1) + Sq(2)
|
|
2115
2116
|
"""
|
|
@@ -2131,7 +2132,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2131
2132
|
if self.basis_name() == 'milnor':
|
|
2132
2133
|
return a
|
|
2133
2134
|
return a.change_basis(self.basis_name())
|
|
2134
|
-
raise ValueError("
|
|
2135
|
+
raise ValueError("element does not lie in this Steenrod algebra")
|
|
2135
2136
|
|
|
2136
2137
|
def __contains__(self, x):
|
|
2137
2138
|
r"""
|
|
@@ -2343,7 +2344,8 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2343
2344
|
"""
|
|
2344
2345
|
from sage.rings.integer import Integer
|
|
2345
2346
|
if self.basis_name() != 'milnor':
|
|
2346
|
-
return self(SteenrodAlgebra(p=self.prime(),
|
|
2347
|
+
return self(SteenrodAlgebra(p=self.prime(),
|
|
2348
|
+
generic=self._generic).P(*nums))
|
|
2347
2349
|
while nums and nums[-1] == 0:
|
|
2348
2350
|
nums = nums[:-1]
|
|
2349
2351
|
if len(nums) == 0 or (len(nums) == 1 and nums[0] == 0):
|
|
@@ -2359,10 +2361,11 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2359
2361
|
else:
|
|
2360
2362
|
t = ((), nums)
|
|
2361
2363
|
if self._check_profile_on_basis(t):
|
|
2362
|
-
A = SteenrodAlgebra_generic(p=self.prime(),
|
|
2364
|
+
A = SteenrodAlgebra_generic(p=self.prime(),
|
|
2365
|
+
generic=self._generic)
|
|
2363
2366
|
a = A.monomial(t)
|
|
2364
2367
|
return self(a)
|
|
2365
|
-
raise ValueError("
|
|
2368
|
+
raise ValueError("element not in this algebra")
|
|
2366
2369
|
|
|
2367
2370
|
def Q_exp(self, *nums):
|
|
2368
2371
|
r"""
|
|
@@ -2399,7 +2402,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2399
2402
|
Q_0 Q_2
|
|
2400
2403
|
"""
|
|
2401
2404
|
if not all(x in (0, 1) for x in nums):
|
|
2402
|
-
raise ValueError("
|
|
2405
|
+
raise ValueError("the tuple %s should consist " % (nums,) +
|
|
2403
2406
|
"only of 0s and 1s")
|
|
2404
2407
|
else:
|
|
2405
2408
|
if self.basis_name() != 'milnor':
|
|
@@ -2452,13 +2455,14 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2452
2455
|
sage: H.Q(4)
|
|
2453
2456
|
Traceback (most recent call last):
|
|
2454
2457
|
...
|
|
2455
|
-
ValueError:
|
|
2458
|
+
ValueError: element not in this algebra
|
|
2456
2459
|
"""
|
|
2457
2460
|
if len(nums) != len(set(nums)):
|
|
2458
2461
|
return self(0)
|
|
2459
2462
|
else:
|
|
2460
2463
|
if self.basis_name() != 'milnor':
|
|
2461
|
-
return self(SteenrodAlgebra(p=self.prime(),
|
|
2464
|
+
return self(SteenrodAlgebra(p=self.prime(),
|
|
2465
|
+
generic=self._generic).Q(*nums))
|
|
2462
2466
|
if not self._generic:
|
|
2463
2467
|
if len(nums) == 0:
|
|
2464
2468
|
return self.one()
|
|
@@ -2474,9 +2478,9 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2474
2478
|
t = answer.leading_support()
|
|
2475
2479
|
if self._check_profile_on_basis(t):
|
|
2476
2480
|
return answer
|
|
2477
|
-
raise ValueError("
|
|
2481
|
+
raise ValueError("element not in this algebra")
|
|
2478
2482
|
|
|
2479
|
-
def
|
|
2483
|
+
def _an_element_(self):
|
|
2480
2484
|
"""
|
|
2481
2485
|
An element of this Steenrod algebra.
|
|
2482
2486
|
|
|
@@ -2509,29 +2513,32 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2509
2513
|
return self.one()
|
|
2510
2514
|
|
|
2511
2515
|
if basis == 'milnor' and not self._generic:
|
|
2512
|
-
return self.monomial((2,1))
|
|
2516
|
+
return self.monomial((2, 1))
|
|
2513
2517
|
if basis == 'milnor' and self._generic:
|
|
2514
|
-
return self.term(((1,3), (2,1)), GF(p)(p-1))
|
|
2518
|
+
return self.term(((1, 3), (2, 1)), GF(p)(p - 1))
|
|
2515
2519
|
if basis == 'serre-cartan' and not self._generic:
|
|
2516
|
-
return self.monomial((4,2,1))
|
|
2520
|
+
return self.monomial((4, 2, 1))
|
|
2517
2521
|
if basis == 'serre-cartan' and self._generic:
|
|
2518
|
-
return self.term((1,p,0,1,0), GF(p)(p-1))
|
|
2522
|
+
return self.term((1, p, 0, 1, 0), GF(p)(p - 1))
|
|
2519
2523
|
if basis == 'woody' or basis == 'woodz':
|
|
2520
|
-
return self._from_dict({((3,0),): 1,
|
|
2524
|
+
return self._from_dict({((3, 0),): 1,
|
|
2525
|
+
((1, 1), (1, 0)): 1}, coerce=True)
|
|
2521
2526
|
if basis.find('wall') >= 0:
|
|
2522
|
-
return self._from_dict({((1,1), (1,
|
|
2527
|
+
return self._from_dict({((1, 1), (1, 0)): 1,
|
|
2528
|
+
((2, 2), (0, 0)): 1}, coerce=True)
|
|
2523
2529
|
if basis.find('arnona') >= 0:
|
|
2524
|
-
return self._from_dict({((3,3),): 1,
|
|
2530
|
+
return self._from_dict({((3, 3),): 1,
|
|
2531
|
+
((1, 1), (2, 1)): 1}, coerce=True)
|
|
2525
2532
|
if basis == 'arnonc':
|
|
2526
2533
|
return self._from_dict({(8,): 1, (4, 4): 1}, coerce=True)
|
|
2527
2534
|
if basis.find('pst') >= 0:
|
|
2528
2535
|
if not self._generic:
|
|
2529
2536
|
return self.monomial(((3, 1),))
|
|
2530
|
-
return self.term(((1,), (((1,1), 2),)), GF(p)(p-1))
|
|
2537
|
+
return self.term(((1,), (((1, 1), 2),)), GF(p)(p - 1))
|
|
2531
2538
|
if basis.find('comm') >= 0:
|
|
2532
2539
|
if not self._generic:
|
|
2533
2540
|
return self.monomial(((1, 2),))
|
|
2534
|
-
return self.term(((), (((1,2), 1),)), GF(p)(p-1))
|
|
2541
|
+
return self.term(((), (((1, 2), 1),)), GF(p)(p - 1))
|
|
2535
2542
|
|
|
2536
2543
|
def pst(self, s, t):
|
|
2537
2544
|
r"""
|
|
@@ -2564,7 +2571,8 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2564
2571
|
"""
|
|
2565
2572
|
from sage.rings.integer import Integer
|
|
2566
2573
|
if self.basis_name() != 'milnor':
|
|
2567
|
-
return self(SteenrodAlgebra(p=self.prime(),
|
|
2574
|
+
return self(SteenrodAlgebra(p=self.prime(),
|
|
2575
|
+
generic=self._generic).pst(s, t))
|
|
2568
2576
|
if not isinstance(s, (Integer, int)) and s >= 0:
|
|
2569
2577
|
raise ValueError("%s is not a nonnegative integer" % s)
|
|
2570
2578
|
if not isinstance(t, (Integer, int)) and t > 0:
|
|
@@ -2620,7 +2628,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2620
2628
|
return sum(self._profile)
|
|
2621
2629
|
return sum(self._profile[0]) + len([a for a in self._profile[1] if a == 2])
|
|
2622
2630
|
|
|
2623
|
-
def gens(self):
|
|
2631
|
+
def gens(self) -> Family:
|
|
2624
2632
|
r"""
|
|
2625
2633
|
Family of generators for this algebra.
|
|
2626
2634
|
|
|
@@ -2677,7 +2685,6 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2677
2685
|
sage: SteenrodAlgebra(p=5, profile=[[2,1], [2,2,2]]).algebra_generators()
|
|
2678
2686
|
Family (Q_0, P(1), P(5))
|
|
2679
2687
|
"""
|
|
2680
|
-
from sage.sets.family import Family
|
|
2681
2688
|
from sage.sets.non_negative_integers import NonNegativeIntegers
|
|
2682
2689
|
from sage.rings.infinity import Infinity
|
|
2683
2690
|
n = self.ngens()
|
|
@@ -2739,7 +2746,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2739
2746
|
sage: SteenrodAlgebra(profile=[1,2,1]).gen(5)
|
|
2740
2747
|
Traceback (most recent call last):
|
|
2741
2748
|
...
|
|
2742
|
-
ValueError:
|
|
2749
|
+
ValueError: this algebra only has 4 generators, so call gen(i) with 0 <= i < 4
|
|
2743
2750
|
|
|
2744
2751
|
sage: D = SteenrodAlgebra(profile=lambda n: n)
|
|
2745
2752
|
sage: [D.gen(n) for n in range(5)]
|
|
@@ -2761,11 +2768,11 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
2761
2768
|
num = self.ngens()
|
|
2762
2769
|
if num < Infinity:
|
|
2763
2770
|
if i >= num:
|
|
2764
|
-
raise ValueError("
|
|
2771
|
+
raise ValueError("this algebra only has %s generators, so call gen(i) with 0 <= i < %s" % (num, num))
|
|
2765
2772
|
# check to see if equal to A(n) for some n.
|
|
2766
2773
|
n = self.profile(1)
|
|
2767
2774
|
if not self._generic and self._profile == AA(n-1, p=p)._profile:
|
|
2768
|
-
return self.pst(i,1)
|
|
2775
|
+
return self.pst(i, 1)
|
|
2769
2776
|
if self._generic and self._profile == AA(n, p=p)._profile:
|
|
2770
2777
|
if i == 0:
|
|
2771
2778
|
return self.Q(0)
|
|
@@ -3053,7 +3060,7 @@ class SteenrodAlgebra_generic(CombinatorialFreeModule):
|
|
|
3053
3060
|
"""
|
|
3054
3061
|
return self.is_field()
|
|
3055
3062
|
|
|
3056
|
-
def is_noetherian(self):
|
|
3063
|
+
def is_noetherian(self) -> bool:
|
|
3057
3064
|
"""
|
|
3058
3065
|
This algebra is Noetherian if and only if it is finite.
|
|
3059
3066
|
|
|
@@ -355,7 +355,7 @@ def steenrod_algebra_basis(n, basis='milnor', p=2, **kwds):
|
|
|
355
355
|
profile = kwds.get("profile", None)
|
|
356
356
|
if (profile is not None and profile != () and profile != ((), ())
|
|
357
357
|
and basis != 'milnor' and basis.find('pst') == -1):
|
|
358
|
-
raise ValueError("
|
|
358
|
+
raise ValueError("profile functions may only be used with the Milnor or pst bases")
|
|
359
359
|
|
|
360
360
|
# Milnor basis
|
|
361
361
|
if basis_name == 'milnor':
|
|
@@ -377,7 +377,7 @@ def steenrod_algebra_basis(n, basis='milnor', p=2, **kwds):
|
|
|
377
377
|
elif not generic and basis == 'arnonc':
|
|
378
378
|
return arnonC_basis(n)
|
|
379
379
|
else:
|
|
380
|
-
raise ValueError("
|
|
380
|
+
raise ValueError("unknown basis: %s at the prime %s" % (basis, p))
|
|
381
381
|
|
|
382
382
|
|
|
383
383
|
# helper functions for producing bases
|