passagemath-modules 10.6.31__cp314-cp314-musllinux_1_2_x86_64.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.6.31.dist-info/METADATA +281 -0
- passagemath_modules-10.6.31.dist-info/RECORD +808 -0
- passagemath_modules-10.6.31.dist-info/WHEEL +5 -0
- passagemath_modules-10.6.31.dist-info/top_level.txt +2 -0
- passagemath_modules.libs/libgcc_s-0cd532bd.so.1 +0 -0
- passagemath_modules.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
- passagemath_modules.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
- passagemath_modules.libs/libgsl-42cda06f.so.28.0.0 +0 -0
- passagemath_modules.libs/libmpc-d8ebe4b5.so.3.3.1 +0 -0
- passagemath_modules.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
- passagemath_modules.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
- passagemath_modules.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
- sage/algebras/all__sagemath_modules.py +20 -0
- sage/algebras/catalog.py +148 -0
- sage/algebras/clifford_algebra.py +3107 -0
- sage/algebras/clifford_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/clifford_algebra_element.pxd +16 -0
- sage/algebras/clifford_algebra_element.pyx +997 -0
- sage/algebras/commutative_dga.py +4252 -0
- sage/algebras/exterior_algebra_groebner.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/exterior_algebra_groebner.pxd +55 -0
- sage/algebras/exterior_algebra_groebner.pyx +727 -0
- sage/algebras/finite_dimensional_algebras/all.py +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +1029 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +12 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +706 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py +196 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py +255 -0
- sage/algebras/finite_gca.py +528 -0
- sage/algebras/group_algebra.py +232 -0
- sage/algebras/lie_algebras/abelian.py +197 -0
- sage/algebras/lie_algebras/affine_lie_algebra.py +1213 -0
- sage/algebras/lie_algebras/all.py +25 -0
- sage/algebras/lie_algebras/all__sagemath_modules.py +1 -0
- sage/algebras/lie_algebras/bch.py +177 -0
- sage/algebras/lie_algebras/bgg_dual_module.py +1184 -0
- sage/algebras/lie_algebras/bgg_resolution.py +232 -0
- sage/algebras/lie_algebras/center_uea.py +767 -0
- sage/algebras/lie_algebras/classical_lie_algebra.py +2516 -0
- sage/algebras/lie_algebras/examples.py +683 -0
- sage/algebras/lie_algebras/free_lie_algebra.py +973 -0
- sage/algebras/lie_algebras/heisenberg.py +820 -0
- sage/algebras/lie_algebras/lie_algebra.py +1562 -0
- sage/algebras/lie_algebras/lie_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/lie_algebras/lie_algebra_element.pxd +68 -0
- sage/algebras/lie_algebras/lie_algebra_element.pyx +2122 -0
- sage/algebras/lie_algebras/morphism.py +661 -0
- sage/algebras/lie_algebras/nilpotent_lie_algebra.py +457 -0
- sage/algebras/lie_algebras/onsager.py +1324 -0
- sage/algebras/lie_algebras/poincare_birkhoff_witt.py +816 -0
- sage/algebras/lie_algebras/quotient.py +462 -0
- sage/algebras/lie_algebras/rank_two_heisenberg_virasoro.py +355 -0
- sage/algebras/lie_algebras/representation.py +1040 -0
- sage/algebras/lie_algebras/structure_coefficients.py +459 -0
- sage/algebras/lie_algebras/subalgebra.py +967 -0
- sage/algebras/lie_algebras/symplectic_derivation.py +289 -0
- sage/algebras/lie_algebras/verma_module.py +1630 -0
- sage/algebras/lie_algebras/virasoro.py +1186 -0
- sage/algebras/octonion_algebra.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/octonion_algebra.pxd +20 -0
- sage/algebras/octonion_algebra.pyx +987 -0
- sage/algebras/orlik_solomon.py +907 -0
- sage/algebras/orlik_terao.py +779 -0
- sage/algebras/steenrod/all.py +7 -0
- sage/algebras/steenrod/steenrod_algebra.py +4258 -0
- sage/algebras/steenrod/steenrod_algebra_bases.py +1179 -0
- sage/algebras/steenrod/steenrod_algebra_misc.py +1167 -0
- sage/algebras/steenrod/steenrod_algebra_mult.py +954 -0
- sage/algebras/weyl_algebra.py +1126 -0
- sage/all__sagemath_modules.py +62 -0
- sage/calculus/all__sagemath_modules.py +19 -0
- sage/calculus/expr.py +205 -0
- sage/calculus/integration.cpython-314-x86_64-linux-musl.so +0 -0
- sage/calculus/integration.pyx +698 -0
- sage/calculus/interpolation.cpython-314-x86_64-linux-musl.so +0 -0
- sage/calculus/interpolation.pxd +13 -0
- sage/calculus/interpolation.pyx +387 -0
- sage/calculus/interpolators.cpython-314-x86_64-linux-musl.so +0 -0
- sage/calculus/interpolators.pyx +326 -0
- sage/calculus/ode.cpython-314-x86_64-linux-musl.so +0 -0
- sage/calculus/ode.pxd +5 -0
- sage/calculus/ode.pyx +610 -0
- sage/calculus/riemann.cpython-314-x86_64-linux-musl.so +0 -0
- sage/calculus/riemann.pyx +1521 -0
- sage/calculus/test_sympy.py +201 -0
- sage/calculus/transforms/all.py +7 -0
- sage/calculus/transforms/dft.py +844 -0
- sage/calculus/transforms/dwt.cpython-314-x86_64-linux-musl.so +0 -0
- sage/calculus/transforms/dwt.pxd +7 -0
- sage/calculus/transforms/dwt.pyx +160 -0
- sage/calculus/transforms/fft.cpython-314-x86_64-linux-musl.so +0 -0
- sage/calculus/transforms/fft.pxd +12 -0
- sage/calculus/transforms/fft.pyx +487 -0
- sage/calculus/wester.py +662 -0
- sage/coding/abstract_code.py +1108 -0
- sage/coding/ag_code.py +868 -0
- sage/coding/ag_code_decoders.cpython-314-x86_64-linux-musl.so +0 -0
- sage/coding/ag_code_decoders.pyx +2639 -0
- sage/coding/all.py +15 -0
- sage/coding/bch_code.py +494 -0
- sage/coding/binary_code.cpython-314-x86_64-linux-musl.so +0 -0
- sage/coding/binary_code.pxd +124 -0
- sage/coding/binary_code.pyx +4139 -0
- sage/coding/bounds_catalog.py +43 -0
- sage/coding/channel.py +819 -0
- sage/coding/channels_catalog.py +29 -0
- sage/coding/code_bounds.py +755 -0
- sage/coding/code_constructions.py +804 -0
- sage/coding/codes_catalog.py +111 -0
- sage/coding/cyclic_code.py +1329 -0
- sage/coding/databases.py +316 -0
- sage/coding/decoder.py +373 -0
- sage/coding/decoders_catalog.py +88 -0
- sage/coding/delsarte_bounds.py +709 -0
- sage/coding/encoder.py +390 -0
- sage/coding/encoders_catalog.py +64 -0
- sage/coding/extended_code.py +468 -0
- sage/coding/gabidulin_code.py +1058 -0
- sage/coding/golay_code.py +404 -0
- sage/coding/goppa_code.py +441 -0
- sage/coding/grs_code.py +2371 -0
- sage/coding/guava.py +107 -0
- sage/coding/guruswami_sudan/all.py +1 -0
- sage/coding/guruswami_sudan/gs_decoder.py +897 -0
- sage/coding/guruswami_sudan/interpolation.py +409 -0
- sage/coding/guruswami_sudan/utils.py +176 -0
- sage/coding/hamming_code.py +176 -0
- sage/coding/information_set_decoder.py +1032 -0
- sage/coding/kasami_codes.cpython-314-x86_64-linux-musl.so +0 -0
- sage/coding/kasami_codes.pyx +351 -0
- sage/coding/linear_code.py +3067 -0
- sage/coding/linear_code_no_metric.py +1354 -0
- sage/coding/linear_rank_metric.py +961 -0
- sage/coding/parity_check_code.py +353 -0
- sage/coding/punctured_code.py +719 -0
- sage/coding/reed_muller_code.py +999 -0
- sage/coding/self_dual_codes.py +942 -0
- sage/coding/source_coding/all.py +2 -0
- sage/coding/source_coding/huffman.py +553 -0
- sage/coding/subfield_subcode.py +423 -0
- sage/coding/two_weight_db.py +399 -0
- sage/combinat/all__sagemath_modules.py +7 -0
- sage/combinat/cartesian_product.py +347 -0
- sage/combinat/family.py +11 -0
- sage/combinat/free_module.py +1977 -0
- sage/combinat/root_system/all.py +147 -0
- sage/combinat/root_system/ambient_space.py +527 -0
- sage/combinat/root_system/associahedron.py +471 -0
- sage/combinat/root_system/braid_move_calculator.py +143 -0
- sage/combinat/root_system/braid_orbit.cpython-314-x86_64-linux-musl.so +0 -0
- sage/combinat/root_system/braid_orbit.pyx +144 -0
- sage/combinat/root_system/branching_rules.py +2301 -0
- sage/combinat/root_system/cartan_matrix.py +1245 -0
- sage/combinat/root_system/cartan_type.py +3069 -0
- sage/combinat/root_system/coxeter_group.py +162 -0
- sage/combinat/root_system/coxeter_matrix.py +1261 -0
- sage/combinat/root_system/coxeter_type.py +681 -0
- sage/combinat/root_system/dynkin_diagram.py +900 -0
- sage/combinat/root_system/extended_affine_weyl_group.py +2993 -0
- sage/combinat/root_system/fundamental_group.py +795 -0
- sage/combinat/root_system/hecke_algebra_representation.py +1203 -0
- sage/combinat/root_system/integrable_representations.py +1227 -0
- sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +1965 -0
- sage/combinat/root_system/pieri_factors.py +1147 -0
- sage/combinat/root_system/plot.py +1615 -0
- sage/combinat/root_system/root_lattice_realization_algebras.py +1214 -0
- sage/combinat/root_system/root_lattice_realizations.py +4628 -0
- sage/combinat/root_system/root_space.py +487 -0
- sage/combinat/root_system/root_system.py +882 -0
- sage/combinat/root_system/type_A.py +348 -0
- sage/combinat/root_system/type_A_affine.py +227 -0
- sage/combinat/root_system/type_A_infinity.py +241 -0
- sage/combinat/root_system/type_B.py +347 -0
- sage/combinat/root_system/type_BC_affine.py +287 -0
- sage/combinat/root_system/type_B_affine.py +216 -0
- sage/combinat/root_system/type_C.py +317 -0
- sage/combinat/root_system/type_C_affine.py +188 -0
- sage/combinat/root_system/type_D.py +357 -0
- sage/combinat/root_system/type_D_affine.py +208 -0
- sage/combinat/root_system/type_E.py +641 -0
- sage/combinat/root_system/type_E_affine.py +231 -0
- sage/combinat/root_system/type_F.py +387 -0
- sage/combinat/root_system/type_F_affine.py +137 -0
- sage/combinat/root_system/type_G.py +293 -0
- sage/combinat/root_system/type_G_affine.py +132 -0
- sage/combinat/root_system/type_H.py +105 -0
- sage/combinat/root_system/type_I.py +110 -0
- sage/combinat/root_system/type_Q.py +150 -0
- sage/combinat/root_system/type_affine.py +509 -0
- sage/combinat/root_system/type_dual.py +704 -0
- sage/combinat/root_system/type_folded.py +301 -0
- sage/combinat/root_system/type_marked.py +748 -0
- sage/combinat/root_system/type_reducible.py +601 -0
- sage/combinat/root_system/type_relabel.py +730 -0
- sage/combinat/root_system/type_super_A.py +837 -0
- sage/combinat/root_system/weight_lattice_realizations.py +1188 -0
- sage/combinat/root_system/weight_space.py +639 -0
- sage/combinat/root_system/weyl_characters.py +2238 -0
- sage/crypto/__init__.py +4 -0
- sage/crypto/all.py +28 -0
- sage/crypto/block_cipher/all.py +7 -0
- sage/crypto/block_cipher/des.py +1065 -0
- sage/crypto/block_cipher/miniaes.py +2171 -0
- sage/crypto/block_cipher/present.py +909 -0
- sage/crypto/block_cipher/sdes.py +1527 -0
- sage/crypto/boolean_function.cpython-314-x86_64-linux-musl.so +0 -0
- sage/crypto/boolean_function.pxd +10 -0
- sage/crypto/boolean_function.pyx +1487 -0
- sage/crypto/cipher.py +78 -0
- sage/crypto/classical.py +3668 -0
- sage/crypto/classical_cipher.py +569 -0
- sage/crypto/cryptosystem.py +387 -0
- sage/crypto/key_exchange/all.py +7 -0
- sage/crypto/key_exchange/catalog.py +24 -0
- sage/crypto/key_exchange/diffie_hellman.py +323 -0
- sage/crypto/key_exchange/key_exchange_scheme.py +107 -0
- sage/crypto/lattice.py +312 -0
- sage/crypto/lfsr.py +295 -0
- sage/crypto/lwe.py +840 -0
- sage/crypto/mq/__init__.py +4 -0
- sage/crypto/mq/mpolynomialsystemgenerator.py +204 -0
- sage/crypto/mq/rijndael_gf.py +2345 -0
- sage/crypto/mq/sbox.py +7 -0
- sage/crypto/mq/sr.py +3344 -0
- sage/crypto/public_key/all.py +5 -0
- sage/crypto/public_key/blum_goldwasser.py +776 -0
- sage/crypto/sbox.cpython-314-x86_64-linux-musl.so +0 -0
- sage/crypto/sbox.pyx +2090 -0
- sage/crypto/sboxes.py +2090 -0
- sage/crypto/stream.py +390 -0
- sage/crypto/stream_cipher.py +297 -0
- sage/crypto/util.py +519 -0
- sage/ext/all__sagemath_modules.py +1 -0
- sage/ext/interpreters/__init__.py +1 -0
- sage/ext/interpreters/all__sagemath_modules.py +2 -0
- sage/ext/interpreters/wrapper_cc.cpython-314-x86_64-linux-musl.so +0 -0
- sage/ext/interpreters/wrapper_cc.pxd +30 -0
- sage/ext/interpreters/wrapper_cc.pyx +252 -0
- sage/ext/interpreters/wrapper_cdf.cpython-314-x86_64-linux-musl.so +0 -0
- sage/ext/interpreters/wrapper_cdf.pxd +26 -0
- sage/ext/interpreters/wrapper_cdf.pyx +245 -0
- sage/ext/interpreters/wrapper_rdf.cpython-314-x86_64-linux-musl.so +0 -0
- sage/ext/interpreters/wrapper_rdf.pxd +23 -0
- sage/ext/interpreters/wrapper_rdf.pyx +221 -0
- sage/ext/interpreters/wrapper_rr.cpython-314-x86_64-linux-musl.so +0 -0
- sage/ext/interpreters/wrapper_rr.pxd +28 -0
- sage/ext/interpreters/wrapper_rr.pyx +335 -0
- sage/geometry/all__sagemath_modules.py +5 -0
- sage/geometry/toric_lattice.py +1745 -0
- sage/geometry/toric_lattice_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/geometry/toric_lattice_element.pyx +432 -0
- sage/groups/abelian_gps/abelian_group.py +1925 -0
- sage/groups/abelian_gps/abelian_group_element.py +164 -0
- sage/groups/abelian_gps/all__sagemath_modules.py +5 -0
- sage/groups/abelian_gps/dual_abelian_group.py +421 -0
- sage/groups/abelian_gps/dual_abelian_group_element.py +179 -0
- sage/groups/abelian_gps/element_base.py +341 -0
- sage/groups/abelian_gps/values.py +488 -0
- sage/groups/additive_abelian/additive_abelian_group.py +476 -0
- sage/groups/additive_abelian/additive_abelian_wrapper.py +857 -0
- sage/groups/additive_abelian/all.py +4 -0
- sage/groups/additive_abelian/qmodnz.py +231 -0
- sage/groups/additive_abelian/qmodnz_element.py +349 -0
- sage/groups/affine_gps/affine_group.py +535 -0
- sage/groups/affine_gps/all.py +1 -0
- sage/groups/affine_gps/catalog.py +17 -0
- sage/groups/affine_gps/euclidean_group.py +246 -0
- sage/groups/affine_gps/group_element.py +562 -0
- sage/groups/all__sagemath_modules.py +12 -0
- sage/groups/galois_group.py +479 -0
- sage/groups/matrix_gps/all.py +4 -0
- sage/groups/matrix_gps/all__sagemath_modules.py +13 -0
- sage/groups/matrix_gps/catalog.py +26 -0
- sage/groups/matrix_gps/coxeter_group.py +927 -0
- sage/groups/matrix_gps/finitely_generated.py +487 -0
- sage/groups/matrix_gps/group_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/groups/matrix_gps/group_element.pxd +11 -0
- sage/groups/matrix_gps/group_element.pyx +431 -0
- sage/groups/matrix_gps/linear.py +440 -0
- sage/groups/matrix_gps/matrix_group.py +617 -0
- sage/groups/matrix_gps/named_group.py +296 -0
- sage/groups/matrix_gps/orthogonal.py +544 -0
- sage/groups/matrix_gps/symplectic.py +251 -0
- sage/groups/matrix_gps/unitary.py +436 -0
- sage/groups/misc_gps/all__sagemath_modules.py +1 -0
- sage/groups/misc_gps/argument_groups.py +1905 -0
- sage/groups/misc_gps/imaginary_groups.py +479 -0
- sage/groups/perm_gps/all__sagemath_modules.py +1 -0
- sage/groups/perm_gps/partn_ref/all__sagemath_modules.py +1 -0
- sage/groups/perm_gps/partn_ref/refinement_binary.cpython-314-x86_64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_binary.pxd +41 -0
- sage/groups/perm_gps/partn_ref/refinement_binary.pyx +1167 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-314-x86_64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.pxd +31 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +385 -0
- sage/homology/algebraic_topological_model.py +595 -0
- sage/homology/all.py +2 -0
- sage/homology/all__sagemath_modules.py +8 -0
- sage/homology/chain_complex.py +2148 -0
- sage/homology/chain_complex_homspace.py +165 -0
- sage/homology/chain_complex_morphism.py +629 -0
- sage/homology/chain_homotopy.py +604 -0
- sage/homology/chains.py +653 -0
- sage/homology/free_resolution.py +923 -0
- sage/homology/graded_resolution.py +567 -0
- sage/homology/hochschild_complex.py +756 -0
- sage/homology/homology_group.py +188 -0
- sage/homology/homology_morphism.py +422 -0
- sage/homology/homology_vector_space_with_basis.py +1454 -0
- sage/homology/koszul_complex.py +169 -0
- sage/homology/matrix_utils.py +205 -0
- sage/libs/all__sagemath_modules.py +1 -0
- sage/libs/gsl/__init__.py +1 -0
- sage/libs/gsl/airy.pxd +56 -0
- sage/libs/gsl/all.pxd +66 -0
- sage/libs/gsl/array.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/gsl/array.pxd +5 -0
- sage/libs/gsl/array.pyx +102 -0
- sage/libs/gsl/bessel.pxd +208 -0
- sage/libs/gsl/blas.pxd +116 -0
- sage/libs/gsl/blas_types.pxd +34 -0
- sage/libs/gsl/block.pxd +52 -0
- sage/libs/gsl/chebyshev.pxd +37 -0
- sage/libs/gsl/clausen.pxd +12 -0
- sage/libs/gsl/combination.pxd +47 -0
- sage/libs/gsl/complex.pxd +151 -0
- sage/libs/gsl/coulomb.pxd +30 -0
- sage/libs/gsl/coupling.pxd +21 -0
- sage/libs/gsl/dawson.pxd +12 -0
- sage/libs/gsl/debye.pxd +24 -0
- sage/libs/gsl/dilog.pxd +14 -0
- sage/libs/gsl/eigen.pxd +46 -0
- sage/libs/gsl/elementary.pxd +12 -0
- sage/libs/gsl/ellint.pxd +48 -0
- sage/libs/gsl/elljac.pxd +8 -0
- sage/libs/gsl/erf.pxd +32 -0
- sage/libs/gsl/errno.pxd +26 -0
- sage/libs/gsl/exp.pxd +44 -0
- sage/libs/gsl/expint.pxd +44 -0
- sage/libs/gsl/fermi_dirac.pxd +44 -0
- sage/libs/gsl/fft.pxd +121 -0
- sage/libs/gsl/fit.pxd +50 -0
- sage/libs/gsl/gamma.pxd +94 -0
- sage/libs/gsl/gegenbauer.pxd +26 -0
- sage/libs/gsl/histogram.pxd +176 -0
- sage/libs/gsl/hyperg.pxd +52 -0
- sage/libs/gsl/integration.pxd +69 -0
- sage/libs/gsl/interp.pxd +109 -0
- sage/libs/gsl/laguerre.pxd +24 -0
- sage/libs/gsl/lambert.pxd +16 -0
- sage/libs/gsl/legendre.pxd +90 -0
- sage/libs/gsl/linalg.pxd +185 -0
- sage/libs/gsl/log.pxd +26 -0
- sage/libs/gsl/math.pxd +43 -0
- sage/libs/gsl/matrix.pxd +143 -0
- sage/libs/gsl/matrix_complex.pxd +130 -0
- sage/libs/gsl/min.pxd +67 -0
- sage/libs/gsl/monte.pxd +56 -0
- sage/libs/gsl/ntuple.pxd +32 -0
- sage/libs/gsl/odeiv.pxd +70 -0
- sage/libs/gsl/permutation.pxd +78 -0
- sage/libs/gsl/poly.pxd +40 -0
- sage/libs/gsl/pow_int.pxd +12 -0
- sage/libs/gsl/psi.pxd +28 -0
- sage/libs/gsl/qrng.pxd +29 -0
- sage/libs/gsl/random.pxd +257 -0
- sage/libs/gsl/rng.pxd +100 -0
- sage/libs/gsl/roots.pxd +72 -0
- sage/libs/gsl/sort.pxd +36 -0
- sage/libs/gsl/statistics.pxd +59 -0
- sage/libs/gsl/sum.pxd +55 -0
- sage/libs/gsl/synchrotron.pxd +16 -0
- sage/libs/gsl/transport.pxd +24 -0
- sage/libs/gsl/trig.pxd +58 -0
- sage/libs/gsl/types.pxd +137 -0
- sage/libs/gsl/vector.pxd +101 -0
- sage/libs/gsl/vector_complex.pxd +83 -0
- sage/libs/gsl/wavelet.pxd +49 -0
- sage/libs/gsl/zeta.pxd +28 -0
- sage/libs/mpc/__init__.pxd +114 -0
- sage/libs/mpc/types.pxd +28 -0
- sage/libs/mpfr/__init__.pxd +299 -0
- sage/libs/mpfr/types.pxd +26 -0
- sage/libs/mpmath/__init__.py +1 -0
- sage/libs/mpmath/all.py +27 -0
- sage/libs/mpmath/all__sagemath_modules.py +1 -0
- sage/libs/mpmath/utils.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/mpmath/utils.pxd +4 -0
- sage/libs/mpmath/utils.pyx +319 -0
- sage/matrix/action.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/action.pxd +26 -0
- sage/matrix/action.pyx +596 -0
- sage/matrix/all.py +9 -0
- sage/matrix/args.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/args.pxd +144 -0
- sage/matrix/args.pyx +1668 -0
- sage/matrix/benchmark.py +1258 -0
- sage/matrix/berlekamp_massey.py +95 -0
- sage/matrix/compute_J_ideal.py +926 -0
- sage/matrix/constructor.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/constructor.pyx +750 -0
- sage/matrix/docs.py +430 -0
- sage/matrix/echelon_matrix.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/echelon_matrix.pyx +155 -0
- sage/matrix/matrix.pxd +2 -0
- sage/matrix/matrix0.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix0.pxd +68 -0
- sage/matrix/matrix0.pyx +6324 -0
- sage/matrix/matrix1.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix1.pxd +8 -0
- sage/matrix/matrix1.pyx +2851 -0
- sage/matrix/matrix2.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix2.pxd +25 -0
- sage/matrix/matrix2.pyx +20181 -0
- sage/matrix/matrix_cdv.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_cdv.pxd +4 -0
- sage/matrix/matrix_cdv.pyx +93 -0
- sage/matrix/matrix_complex_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_complex_double_dense.pxd +5 -0
- sage/matrix/matrix_complex_double_dense.pyx +98 -0
- sage/matrix/matrix_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_dense.pxd +5 -0
- sage/matrix/matrix_dense.pyx +343 -0
- sage/matrix/matrix_domain_dense.pxd +5 -0
- sage/matrix/matrix_domain_sparse.pxd +5 -0
- sage/matrix/matrix_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_double_dense.pxd +7 -0
- sage/matrix/matrix_double_dense.pyx +3906 -0
- sage/matrix/matrix_double_sparse.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_double_sparse.pxd +6 -0
- sage/matrix/matrix_double_sparse.pyx +248 -0
- sage/matrix/matrix_generic_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_generic_dense.pxd +7 -0
- sage/matrix/matrix_generic_dense.pyx +354 -0
- sage/matrix/matrix_generic_sparse.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_generic_sparse.pxd +7 -0
- sage/matrix/matrix_generic_sparse.pyx +461 -0
- sage/matrix/matrix_laurent_mpolynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_laurent_mpolynomial_dense.pxd +5 -0
- sage/matrix/matrix_laurent_mpolynomial_dense.pyx +115 -0
- sage/matrix/matrix_misc.py +313 -0
- sage/matrix/matrix_numpy_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_numpy_dense.pxd +14 -0
- sage/matrix/matrix_numpy_dense.pyx +450 -0
- sage/matrix/matrix_numpy_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_numpy_integer_dense.pxd +7 -0
- sage/matrix/matrix_numpy_integer_dense.pyx +59 -0
- sage/matrix/matrix_polynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_polynomial_dense.pxd +5 -0
- sage/matrix/matrix_polynomial_dense.pyx +5341 -0
- sage/matrix/matrix_real_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_real_double_dense.pxd +7 -0
- sage/matrix/matrix_real_double_dense.pyx +122 -0
- sage/matrix/matrix_space.py +2848 -0
- sage/matrix/matrix_sparse.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_sparse.pxd +5 -0
- sage/matrix/matrix_sparse.pyx +1222 -0
- sage/matrix/matrix_window.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_window.pxd +37 -0
- sage/matrix/matrix_window.pyx +242 -0
- sage/matrix/misc_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/misc_mpfr.pyx +80 -0
- sage/matrix/operation_table.py +1182 -0
- sage/matrix/special.py +3666 -0
- sage/matrix/strassen.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/strassen.pyx +851 -0
- sage/matrix/symplectic_basis.py +541 -0
- sage/matrix/template.pxd +6 -0
- sage/matrix/tests.py +71 -0
- sage/matroids/advanced.py +77 -0
- sage/matroids/all.py +13 -0
- sage/matroids/basis_exchange_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/basis_exchange_matroid.pxd +96 -0
- sage/matroids/basis_exchange_matroid.pyx +2344 -0
- sage/matroids/basis_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/basis_matroid.pxd +45 -0
- sage/matroids/basis_matroid.pyx +1217 -0
- sage/matroids/catalog.py +44 -0
- sage/matroids/chow_ring.py +473 -0
- sage/matroids/chow_ring_ideal.py +849 -0
- sage/matroids/circuit_closures_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/circuit_closures_matroid.pxd +16 -0
- sage/matroids/circuit_closures_matroid.pyx +559 -0
- sage/matroids/circuits_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/circuits_matroid.pxd +38 -0
- sage/matroids/circuits_matroid.pyx +947 -0
- sage/matroids/constructor.py +1086 -0
- sage/matroids/database_collections.py +365 -0
- sage/matroids/database_matroids.py +5338 -0
- sage/matroids/dual_matroid.py +583 -0
- sage/matroids/extension.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/extension.pxd +34 -0
- sage/matroids/extension.pyx +519 -0
- sage/matroids/flats_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/flats_matroid.pxd +28 -0
- sage/matroids/flats_matroid.pyx +715 -0
- sage/matroids/gammoid.py +600 -0
- sage/matroids/graphic_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/graphic_matroid.pxd +39 -0
- sage/matroids/graphic_matroid.pyx +2024 -0
- sage/matroids/lean_matrix.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/lean_matrix.pxd +126 -0
- sage/matroids/lean_matrix.pyx +3667 -0
- sage/matroids/linear_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/linear_matroid.pxd +180 -0
- sage/matroids/linear_matroid.pyx +6649 -0
- sage/matroids/matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/matroid.pxd +243 -0
- sage/matroids/matroid.pyx +8759 -0
- sage/matroids/matroids_catalog.py +190 -0
- sage/matroids/matroids_plot_helpers.py +890 -0
- sage/matroids/minor_matroid.py +480 -0
- sage/matroids/minorfix.h +9 -0
- sage/matroids/named_matroids.py +5 -0
- sage/matroids/rank_matroid.py +268 -0
- sage/matroids/set_system.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/set_system.pxd +38 -0
- sage/matroids/set_system.pyx +800 -0
- sage/matroids/transversal_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/transversal_matroid.pxd +14 -0
- sage/matroids/transversal_matroid.pyx +893 -0
- sage/matroids/union_matroid.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/union_matroid.pxd +20 -0
- sage/matroids/union_matroid.pyx +331 -0
- sage/matroids/unpickling.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matroids/unpickling.pyx +843 -0
- sage/matroids/utilities.py +809 -0
- sage/misc/all__sagemath_modules.py +20 -0
- sage/misc/c3.cpython-314-x86_64-linux-musl.so +0 -0
- sage/misc/c3.pyx +238 -0
- sage/misc/compat.py +87 -0
- sage/misc/element_with_label.py +173 -0
- sage/misc/func_persist.py +79 -0
- sage/misc/pickle_old.cpython-314-x86_64-linux-musl.so +0 -0
- sage/misc/pickle_old.pyx +19 -0
- sage/misc/proof.py +7 -0
- sage/misc/replace_dot_all.py +472 -0
- sage/misc/sagedoc_conf.py +168 -0
- sage/misc/sphinxify.py +167 -0
- sage/misc/test_class_pickling.py +85 -0
- sage/modules/all.py +42 -0
- sage/modules/complex_double_vector.py +25 -0
- sage/modules/diamond_cutting.py +380 -0
- sage/modules/fg_pid/all.py +1 -0
- sage/modules/fg_pid/fgp_element.py +456 -0
- sage/modules/fg_pid/fgp_module.py +2091 -0
- sage/modules/fg_pid/fgp_morphism.py +550 -0
- sage/modules/filtered_vector_space.py +1271 -0
- sage/modules/finite_submodule_iter.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/finite_submodule_iter.pxd +27 -0
- sage/modules/finite_submodule_iter.pyx +452 -0
- sage/modules/fp_graded/all.py +1 -0
- sage/modules/fp_graded/element.py +346 -0
- sage/modules/fp_graded/free_element.py +298 -0
- sage/modules/fp_graded/free_homspace.py +53 -0
- sage/modules/fp_graded/free_module.py +1060 -0
- sage/modules/fp_graded/free_morphism.py +217 -0
- sage/modules/fp_graded/homspace.py +563 -0
- sage/modules/fp_graded/module.py +1340 -0
- sage/modules/fp_graded/morphism.py +1990 -0
- sage/modules/fp_graded/steenrod/all.py +1 -0
- sage/modules/fp_graded/steenrod/homspace.py +65 -0
- sage/modules/fp_graded/steenrod/module.py +477 -0
- sage/modules/fp_graded/steenrod/morphism.py +404 -0
- sage/modules/fp_graded/steenrod/profile.py +241 -0
- sage/modules/free_module.py +8447 -0
- sage/modules/free_module_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/free_module_element.pxd +22 -0
- sage/modules/free_module_element.pyx +5445 -0
- sage/modules/free_module_homspace.py +369 -0
- sage/modules/free_module_integer.py +896 -0
- sage/modules/free_module_morphism.py +823 -0
- sage/modules/free_module_pseudohomspace.py +352 -0
- sage/modules/free_module_pseudomorphism.py +578 -0
- sage/modules/free_quadratic_module.py +1706 -0
- sage/modules/free_quadratic_module_integer_symmetric.py +1790 -0
- sage/modules/matrix_morphism.py +1745 -0
- sage/modules/misc.py +103 -0
- sage/modules/module_functors.py +192 -0
- sage/modules/multi_filtered_vector_space.py +719 -0
- 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 +699 -0
- sage/modules/real_double_vector.py +22 -0
- sage/modules/submodule.py +255 -0
- sage/modules/tensor_operations.py +567 -0
- sage/modules/torsion_quadratic_module.py +1352 -0
- sage/modules/tutorial_free_modules.py +248 -0
- sage/modules/vector_complex_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_complex_double_dense.pxd +6 -0
- sage/modules/vector_complex_double_dense.pyx +117 -0
- sage/modules/vector_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_double_dense.pxd +6 -0
- sage/modules/vector_double_dense.pyx +604 -0
- sage/modules/vector_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_integer_dense.pxd +15 -0
- sage/modules/vector_integer_dense.pyx +361 -0
- sage/modules/vector_integer_sparse.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_integer_sparse.pxd +29 -0
- sage/modules/vector_integer_sparse.pyx +406 -0
- sage/modules/vector_modn_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_modn_dense.pxd +12 -0
- sage/modules/vector_modn_dense.pyx +394 -0
- sage/modules/vector_modn_sparse.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_modn_sparse.pxd +21 -0
- sage/modules/vector_modn_sparse.pyx +298 -0
- sage/modules/vector_numpy_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_numpy_dense.pxd +15 -0
- sage/modules/vector_numpy_dense.pyx +304 -0
- sage/modules/vector_numpy_integer_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_numpy_integer_dense.pxd +7 -0
- sage/modules/vector_numpy_integer_dense.pyx +54 -0
- sage/modules/vector_rational_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_rational_dense.pxd +15 -0
- sage/modules/vector_rational_dense.pyx +387 -0
- sage/modules/vector_rational_sparse.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_rational_sparse.pxd +30 -0
- sage/modules/vector_rational_sparse.pyx +413 -0
- sage/modules/vector_real_double_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/vector_real_double_dense.pxd +6 -0
- sage/modules/vector_real_double_dense.pyx +126 -0
- sage/modules/vector_space_homspace.py +430 -0
- sage/modules/vector_space_morphism.py +989 -0
- sage/modules/with_basis/all.py +15 -0
- sage/modules/with_basis/cell_module.py +494 -0
- sage/modules/with_basis/indexed_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/modules/with_basis/indexed_element.pxd +13 -0
- sage/modules/with_basis/indexed_element.pyx +1058 -0
- sage/modules/with_basis/invariant.py +1075 -0
- sage/modules/with_basis/morphism.py +1636 -0
- sage/modules/with_basis/representation.py +2939 -0
- sage/modules/with_basis/subquotient.py +685 -0
- sage/numerical/all__sagemath_modules.py +6 -0
- sage/numerical/gauss_legendre.cpython-314-x86_64-linux-musl.so +0 -0
- sage/numerical/gauss_legendre.pyx +381 -0
- sage/numerical/optimize.py +910 -0
- sage/probability/all.py +10 -0
- sage/probability/probability_distribution.cpython-314-x86_64-linux-musl.so +0 -0
- sage/probability/probability_distribution.pyx +1242 -0
- sage/probability/random_variable.py +411 -0
- sage/quadratic_forms/all.py +4 -0
- sage/quadratic_forms/all__sagemath_modules.py +15 -0
- sage/quadratic_forms/binary_qf.py +2042 -0
- sage/quadratic_forms/bqf_class_group.py +748 -0
- sage/quadratic_forms/constructions.py +93 -0
- sage/quadratic_forms/count_local_2.cpython-314-x86_64-linux-musl.so +0 -0
- sage/quadratic_forms/count_local_2.pyx +365 -0
- sage/quadratic_forms/extras.py +195 -0
- sage/quadratic_forms/quadratic_form.py +1753 -0
- sage/quadratic_forms/quadratic_form__count_local_2.py +221 -0
- sage/quadratic_forms/quadratic_form__equivalence_testing.py +708 -0
- sage/quadratic_forms/quadratic_form__evaluate.cpython-314-x86_64-linux-musl.so +0 -0
- sage/quadratic_forms/quadratic_form__evaluate.pyx +139 -0
- sage/quadratic_forms/quadratic_form__local_density_congruence.py +977 -0
- sage/quadratic_forms/quadratic_form__local_field_invariants.py +1072 -0
- sage/quadratic_forms/quadratic_form__neighbors.py +424 -0
- sage/quadratic_forms/quadratic_form__reduction_theory.py +488 -0
- sage/quadratic_forms/quadratic_form__split_local_covering.py +416 -0
- sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +657 -0
- sage/quadratic_forms/quadratic_form__theta.py +352 -0
- sage/quadratic_forms/quadratic_form__variable_substitutions.py +370 -0
- sage/quadratic_forms/random_quadraticform.py +209 -0
- sage/quadratic_forms/ternary.cpython-314-x86_64-linux-musl.so +0 -0
- sage/quadratic_forms/ternary.pyx +1154 -0
- sage/quadratic_forms/ternary_qf.py +2027 -0
- sage/rings/all__sagemath_modules.py +28 -0
- sage/rings/asymptotic/all__sagemath_modules.py +1 -0
- sage/rings/asymptotic/misc.py +1252 -0
- sage/rings/cc.py +4 -0
- sage/rings/cfinite_sequence.py +1306 -0
- sage/rings/complex_conversion.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/complex_conversion.pxd +8 -0
- sage/rings/complex_conversion.pyx +23 -0
- sage/rings/complex_double.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/complex_double.pxd +21 -0
- sage/rings/complex_double.pyx +2654 -0
- sage/rings/complex_mpc.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/complex_mpc.pxd +21 -0
- sage/rings/complex_mpc.pyx +2576 -0
- sage/rings/complex_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/complex_mpfr.pxd +18 -0
- sage/rings/complex_mpfr.pyx +3602 -0
- sage/rings/derivation.py +2334 -0
- sage/rings/finite_rings/all__sagemath_modules.py +1 -0
- sage/rings/finite_rings/maps_finite_field.py +191 -0
- sage/rings/function_field/all__sagemath_modules.py +8 -0
- sage/rings/function_field/derivations.py +102 -0
- sage/rings/function_field/derivations_rational.py +132 -0
- sage/rings/function_field/differential.py +853 -0
- sage/rings/function_field/divisor.py +1107 -0
- sage/rings/function_field/drinfeld_modules/action.py +199 -0
- sage/rings/function_field/drinfeld_modules/all.py +1 -0
- sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +673 -0
- sage/rings/function_field/drinfeld_modules/drinfeld_module.py +2087 -0
- sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1131 -0
- sage/rings/function_field/drinfeld_modules/homset.py +420 -0
- sage/rings/function_field/drinfeld_modules/morphism.py +820 -0
- sage/rings/function_field/hermite_form_polynomial.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/function_field/hermite_form_polynomial.pyx +188 -0
- sage/rings/function_field/khuri_makdisi.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/function_field/khuri_makdisi.pyx +935 -0
- sage/rings/invariants/all.py +4 -0
- sage/rings/invariants/invariant_theory.py +4597 -0
- sage/rings/invariants/reconstruction.py +395 -0
- sage/rings/polynomial/all__sagemath_modules.py +17 -0
- sage/rings/polynomial/integer_valued_polynomials.py +1230 -0
- sage/rings/polynomial/laurent_polynomial_mpair.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/laurent_polynomial_mpair.pxd +15 -0
- sage/rings/polynomial/laurent_polynomial_mpair.pyx +2023 -0
- sage/rings/polynomial/ore_function_element.py +952 -0
- sage/rings/polynomial/ore_function_field.py +1028 -0
- sage/rings/polynomial/ore_polynomial_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/ore_polynomial_element.pxd +48 -0
- sage/rings/polynomial/ore_polynomial_element.pyx +3145 -0
- sage/rings/polynomial/ore_polynomial_ring.py +1334 -0
- sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/polynomial_real_mpfr_dense.pyx +788 -0
- sage/rings/polynomial/q_integer_valued_polynomials.py +1264 -0
- sage/rings/polynomial/skew_polynomial_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/skew_polynomial_element.pxd +9 -0
- sage/rings/polynomial/skew_polynomial_element.pyx +684 -0
- sage/rings/polynomial/skew_polynomial_finite_field.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.pxd +19 -0
- sage/rings/polynomial/skew_polynomial_finite_field.pyx +1093 -0
- sage/rings/polynomial/skew_polynomial_finite_order.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_order.pxd +10 -0
- sage/rings/polynomial/skew_polynomial_finite_order.pyx +567 -0
- sage/rings/polynomial/skew_polynomial_ring.py +908 -0
- sage/rings/real_double_element_gsl.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/real_double_element_gsl.pxd +8 -0
- sage/rings/real_double_element_gsl.pyx +794 -0
- sage/rings/real_field.py +58 -0
- sage/rings/real_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/real_mpfr.pxd +29 -0
- sage/rings/real_mpfr.pyx +6122 -0
- sage/rings/ring_extension.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/ring_extension.pxd +42 -0
- sage/rings/ring_extension.pyx +2779 -0
- sage/rings/ring_extension_conversion.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/ring_extension_conversion.pxd +16 -0
- sage/rings/ring_extension_conversion.pyx +462 -0
- sage/rings/ring_extension_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/ring_extension_element.pxd +21 -0
- sage/rings/ring_extension_element.pyx +1635 -0
- sage/rings/ring_extension_homset.py +64 -0
- sage/rings/ring_extension_morphism.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/ring_extension_morphism.pxd +35 -0
- sage/rings/ring_extension_morphism.pyx +920 -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/all.py +15 -0
- sage/stats/basic_stats.py +489 -0
- sage/stats/distributions/all.py +7 -0
- sage/stats/distributions/catalog.py +34 -0
- sage/stats/distributions/dgs.h +50 -0
- sage/stats/distributions/dgs.pxd +111 -0
- sage/stats/distributions/dgs_bern.h +400 -0
- sage/stats/distributions/dgs_gauss.h +614 -0
- sage/stats/distributions/dgs_misc.h +104 -0
- sage/stats/distributions/discrete_gaussian_integer.cpython-314-x86_64-linux-musl.so +0 -0
- sage/stats/distributions/discrete_gaussian_integer.pxd +14 -0
- sage/stats/distributions/discrete_gaussian_integer.pyx +498 -0
- sage/stats/distributions/discrete_gaussian_lattice.py +908 -0
- sage/stats/distributions/discrete_gaussian_polynomial.py +141 -0
- sage/stats/hmm/all.py +15 -0
- sage/stats/hmm/chmm.cpython-314-x86_64-linux-musl.so +0 -0
- sage/stats/hmm/chmm.pyx +1595 -0
- sage/stats/hmm/distributions.cpython-314-x86_64-linux-musl.so +0 -0
- sage/stats/hmm/distributions.pxd +29 -0
- sage/stats/hmm/distributions.pyx +531 -0
- sage/stats/hmm/hmm.cpython-314-x86_64-linux-musl.so +0 -0
- sage/stats/hmm/hmm.pxd +17 -0
- sage/stats/hmm/hmm.pyx +1388 -0
- sage/stats/hmm/util.cpython-314-x86_64-linux-musl.so +0 -0
- sage/stats/hmm/util.pxd +7 -0
- sage/stats/hmm/util.pyx +165 -0
- sage/stats/intlist.cpython-314-x86_64-linux-musl.so +0 -0
- sage/stats/intlist.pxd +14 -0
- sage/stats/intlist.pyx +588 -0
- sage/stats/r.py +49 -0
- sage/stats/time_series.cpython-314-x86_64-linux-musl.so +0 -0
- sage/stats/time_series.pxd +6 -0
- sage/stats/time_series.pyx +2546 -0
- sage/tensor/all.py +2 -0
- sage/tensor/modules/all.py +8 -0
- sage/tensor/modules/alternating_contr_tensor.py +761 -0
- sage/tensor/modules/comp.py +5598 -0
- sage/tensor/modules/ext_pow_free_module.py +824 -0
- sage/tensor/modules/finite_rank_free_module.py +3589 -0
- sage/tensor/modules/format_utilities.py +333 -0
- sage/tensor/modules/free_module_alt_form.py +858 -0
- sage/tensor/modules/free_module_automorphism.py +1207 -0
- sage/tensor/modules/free_module_basis.py +1074 -0
- sage/tensor/modules/free_module_element.py +284 -0
- sage/tensor/modules/free_module_homset.py +652 -0
- sage/tensor/modules/free_module_linear_group.py +564 -0
- sage/tensor/modules/free_module_morphism.py +1581 -0
- sage/tensor/modules/free_module_tensor.py +3289 -0
- sage/tensor/modules/reflexive_module.py +386 -0
- sage/tensor/modules/tensor_free_module.py +780 -0
- sage/tensor/modules/tensor_free_submodule.py +538 -0
- sage/tensor/modules/tensor_free_submodule_basis.py +140 -0
- sage/tensor/modules/tensor_with_indices.py +1043 -0
|
@@ -0,0 +1,1562 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-modules
|
|
2
|
+
# sage.doctest: needs sage.combinat sage.graphs sage.groups
|
|
3
|
+
"""
|
|
4
|
+
Lie Algebras
|
|
5
|
+
|
|
6
|
+
AUTHORS:
|
|
7
|
+
|
|
8
|
+
- Travis Scrimshaw (2013-05-03): Initial version
|
|
9
|
+
"""
|
|
10
|
+
# ****************************************************************************
|
|
11
|
+
# Copyright (C) 2013-2017 Travis Scrimshaw <tcscrims at gmail.com>
|
|
12
|
+
#
|
|
13
|
+
# This program is free software: you can redistribute it and/or modify
|
|
14
|
+
# it under the terms of the GNU General Public License as published by
|
|
15
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
16
|
+
# (at your option) any later version.
|
|
17
|
+
# https://www.gnu.org/licenses/
|
|
18
|
+
# ****************************************************************************
|
|
19
|
+
|
|
20
|
+
from sage.misc.cachefunc import cached_method
|
|
21
|
+
from sage.misc.lazy_attribute import lazy_attribute
|
|
22
|
+
from sage.structure.indexed_generators import standardize_names_index_set
|
|
23
|
+
from sage.structure.parent import Parent
|
|
24
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
25
|
+
|
|
26
|
+
from sage.categories.algebras import Algebras
|
|
27
|
+
from sage.categories.lie_algebras import LieAlgebras, LiftMorphism
|
|
28
|
+
from sage.categories.rings import Rings
|
|
29
|
+
from sage.categories.morphism import SetMorphism
|
|
30
|
+
from sage.categories.homset import Hom
|
|
31
|
+
|
|
32
|
+
from sage.algebras.lie_algebras.lie_algebra_element import (LieAlgebraElementWrapper,
|
|
33
|
+
LieAlgebraMatrixWrapper)
|
|
34
|
+
from sage.rings.integer_ring import ZZ
|
|
35
|
+
from sage.matrix.matrix_space import MatrixSpace
|
|
36
|
+
from sage.sets.family import Family, AbstractFamily
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class LieAlgebra(Parent, UniqueRepresentation): # IndexedGenerators):
|
|
40
|
+
r"""
|
|
41
|
+
A Lie algebra `L` over a base ring `R`.
|
|
42
|
+
|
|
43
|
+
A Lie algebra is an `R`-module `L` with a bilinear operation called
|
|
44
|
+
Lie bracket `[\cdot, \cdot] : L \times L \to L` such that
|
|
45
|
+
`[x, x] = 0` and the following relation holds:
|
|
46
|
+
|
|
47
|
+
.. MATH::
|
|
48
|
+
|
|
49
|
+
\bigl[ x, [y, z] \bigr] + \bigl[ y, [z, x] \bigr]
|
|
50
|
+
+ \bigl[ z, [x, y] \bigr] = 0.
|
|
51
|
+
|
|
52
|
+
This relation is known as the *Jacobi identity* (or sometimes the Jacobi
|
|
53
|
+
relation). We note that from `[x, x] = 0`, we have `[x + y, x + y] = 0`.
|
|
54
|
+
Next from bilinearity, we see that
|
|
55
|
+
|
|
56
|
+
.. MATH::
|
|
57
|
+
|
|
58
|
+
0 = [x + y, x + y] = [x, x] + [x, y] + [y, x] + [y, y]
|
|
59
|
+
= [x, y] + [y, x],
|
|
60
|
+
|
|
61
|
+
thus `[x, y] = -[y, x]` and the Lie bracket is antisymmetric.
|
|
62
|
+
|
|
63
|
+
Lie algebras are closely related to Lie groups. Let `G` be a Lie group
|
|
64
|
+
and fix some `g \in G`. We can construct the Lie algebra `L` of `G` by
|
|
65
|
+
considering the tangent space at `g`. We can also (partially) recover `G`
|
|
66
|
+
from `L` by using what is known as the exponential map.
|
|
67
|
+
|
|
68
|
+
Given any associative algebra `A`, we can construct a Lie algebra `L`
|
|
69
|
+
on the `R`-module `A` by defining the Lie bracket to be the commutator
|
|
70
|
+
`[a, b] = ab - ba`. We call an associative algebra `A` which contains
|
|
71
|
+
`L` in this fashion an *enveloping algebra* of `L`. The embedding
|
|
72
|
+
`L \to A` which sends the Lie bracket to the commutator will be called
|
|
73
|
+
a Lie embedding. Now if we are given a Lie algebra `L`, we
|
|
74
|
+
can construct an enveloping algebra `U_L` with Lie embedding `h : L \to
|
|
75
|
+
U_L` which has the following universal property: for any enveloping
|
|
76
|
+
algebra `A` with Lie embedding `f : L \to A`, there exists a unique unital
|
|
77
|
+
algebra homomorphism `g : U_L \to A` such that `f = g \circ h`. The
|
|
78
|
+
algebra `U_L` is known as the *universal enveloping algebra* of `L`.
|
|
79
|
+
|
|
80
|
+
INPUT:
|
|
81
|
+
|
|
82
|
+
See examples below for various input options.
|
|
83
|
+
|
|
84
|
+
EXAMPLES:
|
|
85
|
+
|
|
86
|
+
**1.** The simplest examples of Lie algebras are *abelian Lie
|
|
87
|
+
algebras*. These are Lie algebras whose Lie bracket is (identically)
|
|
88
|
+
zero. We can create them using the ``abelian`` keyword::
|
|
89
|
+
|
|
90
|
+
sage: L.<x,y,z> = LieAlgebra(QQ, abelian=True); L
|
|
91
|
+
Abelian Lie algebra on 3 generators (x, y, z) over Rational Field
|
|
92
|
+
|
|
93
|
+
**2.** A Lie algebra can be built from any associative algebra by
|
|
94
|
+
defining the Lie bracket to be the commutator. For example, we can
|
|
95
|
+
start with the descent algebra::
|
|
96
|
+
|
|
97
|
+
sage: D = DescentAlgebra(QQ, 4).D()
|
|
98
|
+
sage: L = LieAlgebra(associative=D); L
|
|
99
|
+
Lie algebra of Descent algebra of 4 over Rational Field
|
|
100
|
+
in the standard basis
|
|
101
|
+
sage: L(D[2]).bracket(L(D[3]))
|
|
102
|
+
D{1, 2} - D{1, 3} + D{2} - D{3}
|
|
103
|
+
|
|
104
|
+
Next we use a free algebra and do some simple computations::
|
|
105
|
+
|
|
106
|
+
sage: R.<a,b,c> = FreeAlgebra(QQ, 3)
|
|
107
|
+
sage: L.<x,y,z> = LieAlgebra(associative=R.gens())
|
|
108
|
+
sage: x-y+z
|
|
109
|
+
a - b + c
|
|
110
|
+
sage: L.bracket(x-y, x-z)
|
|
111
|
+
a*b - a*c - b*a + b*c + c*a - c*b
|
|
112
|
+
sage: L.bracket(x-y, L.bracket(x,y))
|
|
113
|
+
a^2*b - 2*a*b*a + a*b^2 + b*a^2 - 2*b*a*b + b^2*a
|
|
114
|
+
|
|
115
|
+
We can also use a subset of the elements as a generating set
|
|
116
|
+
of the Lie algebra::
|
|
117
|
+
|
|
118
|
+
sage: R.<a,b,c> = FreeAlgebra(QQ, 3)
|
|
119
|
+
sage: L.<x,y> = LieAlgebra(associative=[a,b+c])
|
|
120
|
+
sage: L.bracket(x, y)
|
|
121
|
+
a*b + a*c - b*a - c*a
|
|
122
|
+
|
|
123
|
+
Now for a more complicated example using the group ring of `S_3` as our
|
|
124
|
+
base algebra::
|
|
125
|
+
|
|
126
|
+
sage: G = SymmetricGroup(3)
|
|
127
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
128
|
+
sage: L.<x,y> = LieAlgebra(associative=S.gens())
|
|
129
|
+
sage: L.bracket(x, y)
|
|
130
|
+
(2,3) - (1,3)
|
|
131
|
+
sage: L.bracket(x, y-x)
|
|
132
|
+
(2,3) - (1,3)
|
|
133
|
+
sage: L.bracket(L.bracket(x, y), y)
|
|
134
|
+
2*(1,2,3) - 2*(1,3,2)
|
|
135
|
+
sage: L.bracket(x, L.bracket(x, y))
|
|
136
|
+
(2,3) - 2*(1,2) + (1,3)
|
|
137
|
+
sage: L.bracket(x, L.bracket(L.bracket(x, y), y))
|
|
138
|
+
0
|
|
139
|
+
|
|
140
|
+
Here is an example using matrices::
|
|
141
|
+
|
|
142
|
+
sage: MS = MatrixSpace(QQ,2)
|
|
143
|
+
sage: m1 = MS([[0, -1], [1, 0]])
|
|
144
|
+
sage: m2 = MS([[-1, 4], [3, 2]])
|
|
145
|
+
sage: L.<x,y> = LieAlgebra(associative=[m1, m2])
|
|
146
|
+
sage: x
|
|
147
|
+
[ 0 -1]
|
|
148
|
+
[ 1 0]
|
|
149
|
+
sage: y
|
|
150
|
+
[-1 4]
|
|
151
|
+
[ 3 2]
|
|
152
|
+
sage: L.bracket(x,y)
|
|
153
|
+
[-7 -3]
|
|
154
|
+
[-3 7]
|
|
155
|
+
sage: L.bracket(y,y)
|
|
156
|
+
[0 0]
|
|
157
|
+
[0 0]
|
|
158
|
+
sage: L.bracket(y,x)
|
|
159
|
+
[ 7 3]
|
|
160
|
+
[ 3 -7]
|
|
161
|
+
sage: L.bracket(x, L.bracket(y,x))
|
|
162
|
+
[-6 14]
|
|
163
|
+
[14 6]
|
|
164
|
+
|
|
165
|
+
(See :class:`LieAlgebraFromAssociative` for other examples.)
|
|
166
|
+
|
|
167
|
+
**3.** We can also creating a Lie algebra by inputting a set of
|
|
168
|
+
structure coefficients. For example, we can create the Lie algebra
|
|
169
|
+
of `\QQ^3` under the Lie bracket `\times` (cross-product)::
|
|
170
|
+
|
|
171
|
+
sage: d = {('x','y'): {'z':1}, ('y','z'): {'x':1}, ('z','x'): {'y':1}}
|
|
172
|
+
sage: L.<x,y,z> = LieAlgebra(QQ, d)
|
|
173
|
+
sage: L
|
|
174
|
+
Lie algebra on 3 generators (x, y, z) over Rational Field
|
|
175
|
+
|
|
176
|
+
To compute the Lie bracket of two elements, you cannot use the ``*``
|
|
177
|
+
operator. Indeed, this automatically lifts up to the universal
|
|
178
|
+
enveloping algebra and takes the (associative) product there.
|
|
179
|
+
To get elements in the Lie algebra, you must use :meth:`bracket`::
|
|
180
|
+
|
|
181
|
+
sage: L = LieAlgebra(QQ, {('e','h'): {'e':-2}, ('f','h'): {'f':2},
|
|
182
|
+
....: ('e','f'): {'h':1}}, names='e,f,h')
|
|
183
|
+
sage: e,f,h = L.lie_algebra_generators()
|
|
184
|
+
sage: L.bracket(h, e)
|
|
185
|
+
2*e
|
|
186
|
+
sage: elt = h*e; elt
|
|
187
|
+
e*h + 2*e
|
|
188
|
+
sage: P = elt.parent(); P
|
|
189
|
+
Noncommutative Multivariate Polynomial Ring in e, f, h over Rational Field,
|
|
190
|
+
nc-relations: {...}
|
|
191
|
+
sage: R = P.relations()
|
|
192
|
+
sage: for rhs in sorted(R, key=str): print("{} = {}".format(rhs, R[rhs]))
|
|
193
|
+
f*e = e*f - h
|
|
194
|
+
h*e = e*h + 2*e
|
|
195
|
+
h*f = f*h - 2*f
|
|
196
|
+
|
|
197
|
+
For convenience, there are two shorthand notations for computing
|
|
198
|
+
Lie brackets::
|
|
199
|
+
|
|
200
|
+
sage: L([h,e])
|
|
201
|
+
2*e
|
|
202
|
+
sage: L([h,[e,f]])
|
|
203
|
+
0
|
|
204
|
+
sage: L([[h,e],[e,f]])
|
|
205
|
+
-4*e
|
|
206
|
+
sage: L[h, e]
|
|
207
|
+
2*e
|
|
208
|
+
sage: L[h, L[e, f]]
|
|
209
|
+
0
|
|
210
|
+
|
|
211
|
+
.. WARNING::
|
|
212
|
+
|
|
213
|
+
Because this is a modified (abused) version of python syntax, it
|
|
214
|
+
does **NOT** work with addition. For example ``L([e + [h, f], h])``
|
|
215
|
+
and ``L[e + [h, f], h]`` will both raise errors. Instead you must
|
|
216
|
+
use ``L[e + L[h, f], h]``.
|
|
217
|
+
|
|
218
|
+
**4.** We can construct a Lie algebra from a Cartan type by using
|
|
219
|
+
the ``cartan_type`` option::
|
|
220
|
+
|
|
221
|
+
sage: L = LieAlgebra(ZZ, cartan_type=['C', 3])
|
|
222
|
+
sage: L.inject_variables()
|
|
223
|
+
Defining e1, e2, e3, f1, f2, f3, h1, h2, h3
|
|
224
|
+
sage: e1.bracket(e2)
|
|
225
|
+
-E[alpha[1] + alpha[2]]
|
|
226
|
+
sage: L([[e1, e2], e2])
|
|
227
|
+
0
|
|
228
|
+
sage: L([[e2, e3], e3])
|
|
229
|
+
0
|
|
230
|
+
sage: L([e2, [e2, e3]])
|
|
231
|
+
2*E[2*alpha[2] + alpha[3]]
|
|
232
|
+
|
|
233
|
+
sage: L = LieAlgebra(ZZ, cartan_type=['E', 6])
|
|
234
|
+
sage: L
|
|
235
|
+
Lie algebra of ['E', 6] in the Chevalley basis
|
|
236
|
+
|
|
237
|
+
When the Cartan type is finite type and simply-laced, we can also
|
|
238
|
+
specify an asymmetry function from [Ka1990]_ using a Dynkin diagram
|
|
239
|
+
orientation with the ``epsilon`` option::
|
|
240
|
+
|
|
241
|
+
sage: L = LieAlgebra(QQ, cartan_type=['A', 2], epsilon=[(1, 2)])
|
|
242
|
+
sage: e1, e2 = L.e()
|
|
243
|
+
sage: L[e1, e2]
|
|
244
|
+
-E[alpha[1] + alpha[2]]
|
|
245
|
+
|
|
246
|
+
sage: L = LieAlgebra(QQ, cartan_type=['A', 2], epsilon=[(2, 1)])
|
|
247
|
+
sage: e1, e2 = L.e()
|
|
248
|
+
sage: L[e1, e2]
|
|
249
|
+
E[alpha[1] + alpha[2]]
|
|
250
|
+
|
|
251
|
+
We also have matrix versions of the classical Lie algebras::
|
|
252
|
+
|
|
253
|
+
sage: L = LieAlgebra(ZZ, cartan_type=['A', 2], representation='matrix')
|
|
254
|
+
sage: L.gens()
|
|
255
|
+
(
|
|
256
|
+
[0 1 0] [0 0 0] [0 0 0] [0 0 0] [ 1 0 0] [ 0 0 0]
|
|
257
|
+
[0 0 0] [0 0 1] [1 0 0] [0 0 0] [ 0 -1 0] [ 0 1 0]
|
|
258
|
+
[0 0 0], [0 0 0], [0 0 0], [0 1 0], [ 0 0 0], [ 0 0 -1]
|
|
259
|
+
)
|
|
260
|
+
|
|
261
|
+
There is also the compact real form of matrix Lie algebras
|
|
262
|
+
implemented (the base ring must currently be a field)::
|
|
263
|
+
|
|
264
|
+
sage: L = LieAlgebra(QQ, cartan_type=['A', 2], representation="compact real")
|
|
265
|
+
sage: list(L.basis())
|
|
266
|
+
[
|
|
267
|
+
[ 0 1 0] [ 0 0 1] [ 0 0 0] [ i 0 0] [0 i 0] [0 0 i]
|
|
268
|
+
[-1 0 0] [ 0 0 0] [ 0 0 1] [ 0 0 0] [i 0 0] [0 0 0]
|
|
269
|
+
[ 0 0 0], [-1 0 0], [ 0 -1 0], [ 0 0 -i], [0 0 0], [i 0 0],
|
|
270
|
+
<BLANKLINE>
|
|
271
|
+
[ 0 0 0] [0 0 0]
|
|
272
|
+
[ 0 i 0] [0 0 i]
|
|
273
|
+
[ 0 0 -i], [0 i 0]
|
|
274
|
+
]
|
|
275
|
+
|
|
276
|
+
**5.** We construct a free Lie algebra in a few different ways. There are
|
|
277
|
+
two primary representations, as brackets and as polynomials::
|
|
278
|
+
|
|
279
|
+
sage: L = LieAlgebra(QQ, 'x,y,z'); L
|
|
280
|
+
Free Lie algebra generated by (x, y, z) over Rational Field
|
|
281
|
+
sage: P.<a,b,c> = LieAlgebra(QQ, representation='polynomial'); P
|
|
282
|
+
Lie algebra generated by (a, b, c) in
|
|
283
|
+
Free Algebra on 3 generators (a, b, c) over Rational Field
|
|
284
|
+
|
|
285
|
+
This has the basis given by Hall and the one indexed by Lyndon words.
|
|
286
|
+
We do some computations and convert between the bases::
|
|
287
|
+
|
|
288
|
+
sage: H = L.Hall()
|
|
289
|
+
doctest:warning...:
|
|
290
|
+
FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known
|
|
291
|
+
See https://github.com/sagemath/sage/issues/16823 for details.
|
|
292
|
+
sage: H
|
|
293
|
+
Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis
|
|
294
|
+
sage: Lyn = L.Lyndon()
|
|
295
|
+
sage: Lyn
|
|
296
|
+
Free Lie algebra generated by (x, y, z) over Rational Field in the Lyndon basis
|
|
297
|
+
sage: x,y,z = Lyn.lie_algebra_generators()
|
|
298
|
+
sage: a = Lyn([x, [[z, [x, y]], [y, x]]]); a
|
|
299
|
+
-[x, [[x, y], [x, [y, z]]]] - [x, [[x, y], [[x, z], y]]]
|
|
300
|
+
sage: H(a)
|
|
301
|
+
[[x, y], [z, [x, [x, y]]]] - [[x, y], [[x, y], [x, z]]]
|
|
302
|
+
+ [[x, [x, y]], [z, [x, y]]]
|
|
303
|
+
|
|
304
|
+
We also have the free Lie algebra given in the polynomial
|
|
305
|
+
representation, which is the canonical embedding of the free
|
|
306
|
+
Lie algebra into the free algebra (i.e., the ring of
|
|
307
|
+
noncommutative polynomials).
|
|
308
|
+
So the generators of the free Lie algebra are the generators of the
|
|
309
|
+
free algebra and the Lie bracket is the commutator::
|
|
310
|
+
|
|
311
|
+
sage: P.<a,b,c> = LieAlgebra(QQ, representation='polynomial'); P
|
|
312
|
+
Lie algebra generated by (a, b, c) in
|
|
313
|
+
Free Algebra on 3 generators (a, b, c) over Rational Field
|
|
314
|
+
sage: P.bracket(a, b) + P.bracket(a - c, b + 3*c)
|
|
315
|
+
2*a*b + 3*a*c - 2*b*a + b*c - 3*c*a - c*b
|
|
316
|
+
|
|
317
|
+
**6.** Nilpotent Lie algebras are Lie algebras such that there exists an
|
|
318
|
+
integer `s` such that all iterated brackets of length longer than `s`
|
|
319
|
+
are zero. They can be constructed from structural coefficients using the
|
|
320
|
+
``nilpotent`` keyword::
|
|
321
|
+
|
|
322
|
+
sage: L.<X,Y,Z> = LieAlgebra(QQ, {('X','Y'): {'Z': 1}}, nilpotent=True)
|
|
323
|
+
sage: L
|
|
324
|
+
Nilpotent Lie algebra on 3 generators (X, Y, Z) over Rational Field
|
|
325
|
+
sage: L.category()
|
|
326
|
+
Category of finite dimensional nilpotent Lie algebras with basis over Rational Field
|
|
327
|
+
|
|
328
|
+
A second example defining the Engel Lie algebra::
|
|
329
|
+
|
|
330
|
+
sage: sc = {('X','Y'): {'Z': 1}, ('X','Z'): {'W': 1}}
|
|
331
|
+
sage: E.<X,Y,Z,W> = LieAlgebra(QQ, sc, nilpotent=True); E
|
|
332
|
+
Nilpotent Lie algebra on 4 generators (X, Y, Z, W) over Rational Field
|
|
333
|
+
sage: E.step()
|
|
334
|
+
3
|
|
335
|
+
sage: E[X, Y + Z]
|
|
336
|
+
Z + W
|
|
337
|
+
sage: E[X, [X, Y + Z]]
|
|
338
|
+
W
|
|
339
|
+
sage: E[X, [X, [X, Y + Z]]]
|
|
340
|
+
0
|
|
341
|
+
|
|
342
|
+
A nilpotent Lie algebra will also be constructed if given a ``category``
|
|
343
|
+
of a nilpotent Lie algebra::
|
|
344
|
+
|
|
345
|
+
sage: C = LieAlgebras(QQ).Nilpotent().FiniteDimensional().WithBasis()
|
|
346
|
+
sage: L.<X,Y,Z> = LieAlgebra(QQ, {('X','Y'): {'Z': 1}}, category=C); L
|
|
347
|
+
Nilpotent Lie algebra on 3 generators (X, Y, Z) over Rational Field
|
|
348
|
+
|
|
349
|
+
**7.** Free nilpotent Lie algebras are the truncated versions of the free
|
|
350
|
+
Lie algebras. That is, the only relations other than anticommutativity
|
|
351
|
+
and the Jacobi identity among the Lie brackets are that brackets of
|
|
352
|
+
length higher than the nilpotency step vanish. They can be created by
|
|
353
|
+
using the ``step`` keyword::
|
|
354
|
+
|
|
355
|
+
sage: L = LieAlgebra(ZZ, 2, step=3); L
|
|
356
|
+
Free Nilpotent Lie algebra on 5 generators (X_1, X_2, X_12, X_112, X_122) over Integer Ring
|
|
357
|
+
sage: L.step()
|
|
358
|
+
3
|
|
359
|
+
|
|
360
|
+
REFERENCES:
|
|
361
|
+
|
|
362
|
+
- [deG2000]_ Willem A. de Graaf. *Lie Algebras: Theory and Algorithms*.
|
|
363
|
+
- [Ka1990]_ Victor Kac, *Infinite dimensional Lie algebras*.
|
|
364
|
+
- :wikipedia:`Lie_algebra`
|
|
365
|
+
"""
|
|
366
|
+
# This works because it is an abstract base class and this
|
|
367
|
+
# __classcall_private__ will only be called when calling LieAlgebra
|
|
368
|
+
@staticmethod
|
|
369
|
+
def __classcall_private__(cls, R=None, arg0=None, arg1=None, names=None,
|
|
370
|
+
index_set=None, abelian=False, nilpotent=False,
|
|
371
|
+
category=None, **kwds):
|
|
372
|
+
"""
|
|
373
|
+
Select the correct parent based upon input.
|
|
374
|
+
|
|
375
|
+
TESTS::
|
|
376
|
+
|
|
377
|
+
sage: LieAlgebra(QQ, abelian=True, names='x,y,z')
|
|
378
|
+
Abelian Lie algebra on 3 generators (x, y, z) over Rational Field
|
|
379
|
+
sage: LieAlgebra(QQ, {('e','h'): {'e':-2}, ('f','h'): {'f':2},
|
|
380
|
+
....: ('e','f'): {'h':1}}, names='e,f,h')
|
|
381
|
+
Lie algebra on 3 generators (e, f, h) over Rational Field
|
|
382
|
+
"""
|
|
383
|
+
# Parse associative algebra input
|
|
384
|
+
# -----
|
|
385
|
+
|
|
386
|
+
assoc = kwds.get("associative", None)
|
|
387
|
+
if assoc is not None:
|
|
388
|
+
return LieAlgebraFromAssociative(assoc, names=names, index_set=index_set,
|
|
389
|
+
category=category)
|
|
390
|
+
|
|
391
|
+
# Parse input as a Cartan type
|
|
392
|
+
# -----
|
|
393
|
+
|
|
394
|
+
ct = kwds.pop("cartan_type", None)
|
|
395
|
+
if ct is not None:
|
|
396
|
+
from sage.combinat.root_system.cartan_type import CartanType
|
|
397
|
+
ct = CartanType(ct)
|
|
398
|
+
if ct.is_affine():
|
|
399
|
+
from sage.algebras.lie_algebras.affine_lie_algebra import AffineLieAlgebra
|
|
400
|
+
return AffineLieAlgebra(R, cartan_type=ct,
|
|
401
|
+
kac_moody=kwds.get("kac_moody", True))
|
|
402
|
+
if not ct.is_finite():
|
|
403
|
+
raise NotImplementedError("non-finite types are not implemented yet, see trac #14901 for details")
|
|
404
|
+
rep = kwds.pop("representation", "bracket")
|
|
405
|
+
if rep == 'bracket':
|
|
406
|
+
from sage.algebras.lie_algebras.classical_lie_algebra import LieAlgebraChevalleyBasis
|
|
407
|
+
return LieAlgebraChevalleyBasis(R, ct, **kwds)
|
|
408
|
+
if rep == 'matrix':
|
|
409
|
+
from sage.algebras.lie_algebras.classical_lie_algebra import ClassicalMatrixLieAlgebra
|
|
410
|
+
return ClassicalMatrixLieAlgebra(R, ct, **kwds)
|
|
411
|
+
if rep == 'compact real':
|
|
412
|
+
from sage.algebras.lie_algebras.classical_lie_algebra import MatrixCompactRealForm
|
|
413
|
+
return MatrixCompactRealForm(R, ct, **kwds)
|
|
414
|
+
raise ValueError("invalid representation")
|
|
415
|
+
|
|
416
|
+
# Parse the remaining arguments
|
|
417
|
+
# -----
|
|
418
|
+
|
|
419
|
+
if R is None:
|
|
420
|
+
raise ValueError("invalid arguments")
|
|
421
|
+
|
|
422
|
+
def check_assoc(A):
|
|
423
|
+
return (isinstance(A, MatrixSpace)
|
|
424
|
+
or A in Rings()
|
|
425
|
+
or A in Algebras(R).Associative())
|
|
426
|
+
if arg0 in ZZ or check_assoc(arg1):
|
|
427
|
+
# Check if we need to swap the arguments
|
|
428
|
+
arg0, arg1 = arg1, arg0
|
|
429
|
+
|
|
430
|
+
# Parse the first argument
|
|
431
|
+
# -----
|
|
432
|
+
|
|
433
|
+
if isinstance(arg0, dict):
|
|
434
|
+
if not arg0:
|
|
435
|
+
from sage.algebras.lie_algebras.abelian import AbelianLieAlgebra
|
|
436
|
+
return AbelianLieAlgebra(R, names, index_set)
|
|
437
|
+
elif isinstance(next(iter(arg0.keys())), (list, tuple)):
|
|
438
|
+
# We assume it is some structure coefficients
|
|
439
|
+
arg1, arg0 = arg0, arg1
|
|
440
|
+
|
|
441
|
+
if isinstance(arg0, (list, tuple)):
|
|
442
|
+
if all(isinstance(x, str) for x in arg0):
|
|
443
|
+
# If they are all strings, then it is a list of variables
|
|
444
|
+
names = tuple(arg0)
|
|
445
|
+
|
|
446
|
+
if isinstance(arg0, str):
|
|
447
|
+
names = tuple(arg0.split(','))
|
|
448
|
+
elif isinstance(names, str):
|
|
449
|
+
names = tuple(names.split(','))
|
|
450
|
+
|
|
451
|
+
# Parse the second argument
|
|
452
|
+
|
|
453
|
+
if isinstance(arg1, dict):
|
|
454
|
+
# Assume it is some structure coefficients
|
|
455
|
+
if nilpotent or (category is not None and category.is_subcategory(LieAlgebras(R).Nilpotent())):
|
|
456
|
+
from sage.algebras.lie_algebras.nilpotent_lie_algebra import NilpotentLieAlgebra_dense
|
|
457
|
+
return NilpotentLieAlgebra_dense(R, arg1, names, index_set,
|
|
458
|
+
category=category, **kwds)
|
|
459
|
+
|
|
460
|
+
from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients
|
|
461
|
+
return LieAlgebraWithStructureCoefficients(R, arg1, names, index_set,
|
|
462
|
+
category=category, **kwds)
|
|
463
|
+
|
|
464
|
+
# Otherwise it must be either a free (nilpotent) or abelian Lie algebra
|
|
465
|
+
|
|
466
|
+
if arg1 in ZZ:
|
|
467
|
+
step = kwds.get("step", None)
|
|
468
|
+
if step:
|
|
469
|
+
# Parse input as a free nilpotent Lie algebra
|
|
470
|
+
from sage.algebras.lie_algebras.nilpotent_lie_algebra import FreeNilpotentLieAlgebra
|
|
471
|
+
del kwds["step"]
|
|
472
|
+
return FreeNilpotentLieAlgebra(R, arg1, step, names=names, **kwds)
|
|
473
|
+
elif nilpotent:
|
|
474
|
+
raise ValueError("free nilpotent Lie algebras must have a"
|
|
475
|
+
" 'step' parameter given")
|
|
476
|
+
|
|
477
|
+
if isinstance(arg0, str):
|
|
478
|
+
names = arg0
|
|
479
|
+
if names is None:
|
|
480
|
+
index_set = list(range(arg1))
|
|
481
|
+
else:
|
|
482
|
+
if isinstance(names, str):
|
|
483
|
+
names = tuple(names.split(','))
|
|
484
|
+
if arg1 != 1 and len(names) == 1:
|
|
485
|
+
names = tuple('{}{}'.format(names[0], i)
|
|
486
|
+
for i in range(arg1))
|
|
487
|
+
if arg1 != len(names):
|
|
488
|
+
raise ValueError("the number of names must equal the"
|
|
489
|
+
" number of generators")
|
|
490
|
+
|
|
491
|
+
if "step" in kwds or nilpotent:
|
|
492
|
+
raise ValueError("free nilpotent Lie algebras must have both"
|
|
493
|
+
" a number of generators and step parameters"
|
|
494
|
+
" specified")
|
|
495
|
+
|
|
496
|
+
if abelian:
|
|
497
|
+
from sage.algebras.lie_algebras.abelian import AbelianLieAlgebra
|
|
498
|
+
return AbelianLieAlgebra(R, names, index_set)
|
|
499
|
+
|
|
500
|
+
# Otherwise it is the free Lie algebra
|
|
501
|
+
rep = kwds.get("representation", "bracket")
|
|
502
|
+
if rep == "polynomial":
|
|
503
|
+
# Construct the free Lie algebra from polynomials in the
|
|
504
|
+
# free (associative unital) algebra
|
|
505
|
+
# TODO: Change this to accept an index set once FreeAlgebra accepts one
|
|
506
|
+
from sage.algebras.free_algebra import FreeAlgebra
|
|
507
|
+
F = FreeAlgebra(R, names)
|
|
508
|
+
if index_set is None:
|
|
509
|
+
index_set = F.variable_names()
|
|
510
|
+
# TODO: As part of #16823, this should instead construct a
|
|
511
|
+
# subclass with specialized methods for the free Lie algebra
|
|
512
|
+
return LieAlgebraFromAssociative(F, F.gens(), names=names, index_set=index_set)
|
|
513
|
+
|
|
514
|
+
from sage.algebras.lie_algebras.free_lie_algebra import FreeLieAlgebra
|
|
515
|
+
return FreeLieAlgebra(R, names, index_set)
|
|
516
|
+
|
|
517
|
+
def __init__(self, R, names=None, category=None):
|
|
518
|
+
"""
|
|
519
|
+
The Lie algebra.
|
|
520
|
+
|
|
521
|
+
INPUT:
|
|
522
|
+
|
|
523
|
+
- ``R`` -- the base ring
|
|
524
|
+
|
|
525
|
+
- ``names`` -- (optional) the names of the generators
|
|
526
|
+
|
|
527
|
+
- ``category`` -- the category of the Lie algebra; the default is the
|
|
528
|
+
category of Lie algebras over ``R``
|
|
529
|
+
|
|
530
|
+
EXAMPLES::
|
|
531
|
+
|
|
532
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
533
|
+
sage: L.category()
|
|
534
|
+
Category of finite dimensional nilpotent Lie algebras with basis over Rational Field
|
|
535
|
+
"""
|
|
536
|
+
category = LieAlgebras(R).or_subcategory(category)
|
|
537
|
+
Parent.__init__(self, base=R, names=names, category=category)
|
|
538
|
+
|
|
539
|
+
def _element_constructor_(self, x):
|
|
540
|
+
"""
|
|
541
|
+
Convert ``x`` into ``self``.
|
|
542
|
+
|
|
543
|
+
EXAMPLES::
|
|
544
|
+
|
|
545
|
+
sage: L.<x,y> = LieAlgebra(QQ, representation='polynomial')
|
|
546
|
+
sage: elt = L([x, y]); elt
|
|
547
|
+
x*y - y*x
|
|
548
|
+
sage: elt.parent() is L
|
|
549
|
+
True
|
|
550
|
+
|
|
551
|
+
TESTS:
|
|
552
|
+
|
|
553
|
+
Check that `0` gives the zero element::
|
|
554
|
+
|
|
555
|
+
sage: L = lie_algebras.pwitt(GF(5), 5)
|
|
556
|
+
sage: L(0)
|
|
557
|
+
0
|
|
558
|
+
"""
|
|
559
|
+
if isinstance(x, list) and len(x) == 2:
|
|
560
|
+
return self(x[0])._bracket_(self(x[1]))
|
|
561
|
+
|
|
562
|
+
if x == 0:
|
|
563
|
+
return self.zero()
|
|
564
|
+
|
|
565
|
+
try:
|
|
566
|
+
if x in self.module():
|
|
567
|
+
return self.from_vector(x)
|
|
568
|
+
except AttributeError:
|
|
569
|
+
pass
|
|
570
|
+
|
|
571
|
+
if x in self.base_ring():
|
|
572
|
+
# We have already handled the case when x == 0
|
|
573
|
+
raise ValueError("can only convert the scalar 0 into a Lie algebra element")
|
|
574
|
+
|
|
575
|
+
return self.element_class(self, x)
|
|
576
|
+
|
|
577
|
+
def __getitem__(self, x):
|
|
578
|
+
"""
|
|
579
|
+
If ``x`` is a pair `(a, b)`, return the Lie bracket `[a, b]
|
|
580
|
+
(including if `a` or `b` are Lie (sub)algebras, in which case the
|
|
581
|
+
corresponding ideal is constructed).
|
|
582
|
+
Otherwise try to return the `x`-th element of ``self``.
|
|
583
|
+
|
|
584
|
+
EXAMPLES::
|
|
585
|
+
|
|
586
|
+
sage: L.<x,y> = LieAlgebra(QQ, representation='polynomial')
|
|
587
|
+
sage: L[x, [y, x]]
|
|
588
|
+
-x^2*y + 2*x*y*x - y*x^2
|
|
589
|
+
|
|
590
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
591
|
+
sage: L[L, L]
|
|
592
|
+
Ideal () of Abelian Lie algebra on 2 generators (x, y) over Rational Field
|
|
593
|
+
|
|
594
|
+
sage: L = lie_algebras.Heisenberg(QQ, 1)
|
|
595
|
+
sage: Z = L[L, L]; Z
|
|
596
|
+
Ideal (z) of Heisenberg algebra of rank 1 over Rational Field
|
|
597
|
+
sage: L[Z, L]
|
|
598
|
+
Ideal () of Heisenberg algebra of rank 1 over Rational Field
|
|
599
|
+
|
|
600
|
+
sage: p,q,z = L.basis(); (p, q, z)
|
|
601
|
+
(p1, q1, z)
|
|
602
|
+
sage: L[p, L]
|
|
603
|
+
Ideal (p1) of Heisenberg algebra of rank 1 over Rational Field
|
|
604
|
+
sage: L[L, p+q]
|
|
605
|
+
Ideal (p1 + q1) of Heisenberg algebra of rank 1 over Rational Field
|
|
606
|
+
"""
|
|
607
|
+
if isinstance(x, tuple) and len(x) == 2:
|
|
608
|
+
# Check if we need to construct an ideal
|
|
609
|
+
if x[0] in LieAlgebras:
|
|
610
|
+
if x[1] in LieAlgebras:
|
|
611
|
+
return x[0].product_space(x[1])
|
|
612
|
+
return x[0].ideal(x[1])
|
|
613
|
+
elif x[1] in LieAlgebras:
|
|
614
|
+
return x[1].ideal(x[0])
|
|
615
|
+
# Otherwise it is the bracket of two elements
|
|
616
|
+
return self(x[0])._bracket_(self(x[1]))
|
|
617
|
+
return super().__getitem__(x)
|
|
618
|
+
|
|
619
|
+
def _coerce_map_from_(self, R):
|
|
620
|
+
"""
|
|
621
|
+
Return ``True`` if there is a coercion from ``R`` into ``self`` and
|
|
622
|
+
``False`` otherwise.
|
|
623
|
+
|
|
624
|
+
The things that coerce into ``self`` are:
|
|
625
|
+
|
|
626
|
+
- Lie algebras in the same variables over a base with a coercion
|
|
627
|
+
map into ``self.base_ring()``.
|
|
628
|
+
|
|
629
|
+
- A module which coerces into the base vector space of ``self``.
|
|
630
|
+
|
|
631
|
+
TESTS::
|
|
632
|
+
|
|
633
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
634
|
+
sage: L._coerce_map_from_(L.module())
|
|
635
|
+
True
|
|
636
|
+
sage: L._coerce_map_from_(FreeModule(ZZ, 2))
|
|
637
|
+
True
|
|
638
|
+
"""
|
|
639
|
+
if not isinstance(R, LieAlgebra):
|
|
640
|
+
# Should be moved to LieAlgebrasWithBasis somehow since it is a generic coercion
|
|
641
|
+
if self.module is not NotImplemented:
|
|
642
|
+
return self.module().has_coerce_map_from(R)
|
|
643
|
+
return False
|
|
644
|
+
|
|
645
|
+
# We check if it is a subalgebra of something that can coerce into ``self``
|
|
646
|
+
# from sage.algebras.lie_algebras.subalgebra import LieSubalgebra
|
|
647
|
+
# if isinstance(R, LieSubalgebra) and self.has_coerce_map_from(R._ambient):
|
|
648
|
+
# return R.ambient_lift
|
|
649
|
+
|
|
650
|
+
# Lie algebras in the same indices over any base that coerces in
|
|
651
|
+
if R._indices != self._indices:
|
|
652
|
+
return False
|
|
653
|
+
|
|
654
|
+
return self.base_ring().has_coerce_map_from(R.base_ring())
|
|
655
|
+
|
|
656
|
+
def _Hom_(self, Y, category):
|
|
657
|
+
"""
|
|
658
|
+
Return the homset from ``self`` to ``Y`` in the category ``category``.
|
|
659
|
+
|
|
660
|
+
INPUT:
|
|
661
|
+
|
|
662
|
+
- ``Y`` -- a Lie algebra
|
|
663
|
+
- ``category`` -- a subcategory of :class:`LieAlgebras` or ``None``
|
|
664
|
+
|
|
665
|
+
The sole purpose of this method is to construct the homset
|
|
666
|
+
as a :class:`~sage.algebras.lie_algebras.morphism.LieAlgebraHomset`.
|
|
667
|
+
|
|
668
|
+
This method is not meant to be called directly. Please use
|
|
669
|
+
:func:`sage.categories.homset.Hom` instead.
|
|
670
|
+
|
|
671
|
+
EXAMPLES::
|
|
672
|
+
|
|
673
|
+
sage: L.<x,y> = LieAlgebra(QQ)
|
|
674
|
+
sage: H = L.Hall()
|
|
675
|
+
sage: Hom(H, H)
|
|
676
|
+
Set of Lie algebra morphisms from
|
|
677
|
+
Free Lie algebra generated by (x, y) over Rational Field in the Hall basis
|
|
678
|
+
to Free Lie algebra generated by (x, y) over Rational Field in the Hall basis
|
|
679
|
+
"""
|
|
680
|
+
cat = LieAlgebras(self.base_ring())
|
|
681
|
+
if category is not None and not category.is_subcategory(cat):
|
|
682
|
+
raise TypeError(f"{category} is not a subcategory of Lie algebras")
|
|
683
|
+
if Y not in cat:
|
|
684
|
+
raise TypeError(f"{Y} is not a Lie algebra")
|
|
685
|
+
from sage.algebras.lie_algebras.morphism import LieAlgebraHomset
|
|
686
|
+
return LieAlgebraHomset(self, Y, category=category)
|
|
687
|
+
|
|
688
|
+
@cached_method
|
|
689
|
+
def zero(self):
|
|
690
|
+
"""
|
|
691
|
+
Return the element `0`.
|
|
692
|
+
|
|
693
|
+
EXAMPLES::
|
|
694
|
+
|
|
695
|
+
sage: L.<x,y> = LieAlgebra(QQ, representation='polynomial')
|
|
696
|
+
sage: L.zero()
|
|
697
|
+
0
|
|
698
|
+
"""
|
|
699
|
+
return self.element_class(self, {})
|
|
700
|
+
|
|
701
|
+
# The following methods should belong to ModulesWithBasis?
|
|
702
|
+
def _from_dict(self, d, coerce=False, remove_zeros=True):
|
|
703
|
+
"""
|
|
704
|
+
Construct an element of ``self`` from an ``{index: coefficient}``
|
|
705
|
+
dictionary.
|
|
706
|
+
|
|
707
|
+
INPUT:
|
|
708
|
+
|
|
709
|
+
- ``d`` -- dictionary ``{index: coeff}`` where each ``index`` is the
|
|
710
|
+
index of a basis element and each ``coeff`` belongs to the
|
|
711
|
+
coefficient ring ``self.base_ring()``
|
|
712
|
+
|
|
713
|
+
- ``coerce`` -- boolean (default: ``False``); whether to coerce the
|
|
714
|
+
``coeff`` to the coefficient ring
|
|
715
|
+
|
|
716
|
+
- ``remove_zeros`` -- boolean (default: ``True``); if some
|
|
717
|
+
``coeff`` may be zero and should therefore be removed
|
|
718
|
+
|
|
719
|
+
EXAMPLES::
|
|
720
|
+
|
|
721
|
+
sage: L = lie_algebras.Heisenberg(QQ, oo)
|
|
722
|
+
sage: d = {'p1': 4, 'q3': 1/2, 'z': -2}
|
|
723
|
+
sage: L._from_dict(d)
|
|
724
|
+
4*p1 + 1/2*q3 - 2*z
|
|
725
|
+
"""
|
|
726
|
+
assert isinstance(d, dict)
|
|
727
|
+
if coerce:
|
|
728
|
+
R = self.base_ring()
|
|
729
|
+
d = {key: R(coeff) for key, coeff in d.items()}
|
|
730
|
+
if remove_zeros:
|
|
731
|
+
d = {key: coeff for key, coeff in d.items() if coeff}
|
|
732
|
+
return self.element_class(self, d)
|
|
733
|
+
|
|
734
|
+
def monomial(self, i):
|
|
735
|
+
"""
|
|
736
|
+
Return the monomial indexed by ``i``.
|
|
737
|
+
|
|
738
|
+
EXAMPLES::
|
|
739
|
+
|
|
740
|
+
sage: L = lie_algebras.Heisenberg(QQ, oo)
|
|
741
|
+
sage: L.monomial('p1')
|
|
742
|
+
p1
|
|
743
|
+
"""
|
|
744
|
+
return self.element_class(self, {i: self.base_ring().one()})
|
|
745
|
+
|
|
746
|
+
def term(self, i, c=None):
|
|
747
|
+
"""
|
|
748
|
+
Return the term indexed by ``i`` with coefficient ``c``.
|
|
749
|
+
|
|
750
|
+
EXAMPLES::
|
|
751
|
+
|
|
752
|
+
sage: L = lie_algebras.Heisenberg(QQ, oo)
|
|
753
|
+
sage: L.term('p1', 4)
|
|
754
|
+
4*p1
|
|
755
|
+
"""
|
|
756
|
+
if c is None:
|
|
757
|
+
c = self.base_ring().one()
|
|
758
|
+
else:
|
|
759
|
+
c = self.base_ring()(c)
|
|
760
|
+
return self.element_class(self, {i: c})
|
|
761
|
+
|
|
762
|
+
def get_order(self):
|
|
763
|
+
"""
|
|
764
|
+
Return an ordering of the basis indices.
|
|
765
|
+
|
|
766
|
+
.. TODO::
|
|
767
|
+
|
|
768
|
+
Remove this method and in :class:`CombinatorialFreeModule`
|
|
769
|
+
in favor of a method in the category of (finite dimensional)
|
|
770
|
+
modules with basis.
|
|
771
|
+
|
|
772
|
+
EXAMPLES::
|
|
773
|
+
|
|
774
|
+
sage: L.<x,y> = LieAlgebra(QQ, {})
|
|
775
|
+
sage: L.get_order()
|
|
776
|
+
('x', 'y')
|
|
777
|
+
"""
|
|
778
|
+
try:
|
|
779
|
+
return self._basis_ordering
|
|
780
|
+
except AttributeError:
|
|
781
|
+
raise ValueError("the Lie algebra is not finite dimensional with a basis")
|
|
782
|
+
|
|
783
|
+
# Element = LieAlgebraElement # Default for all Lie algebras
|
|
784
|
+
|
|
785
|
+
|
|
786
|
+
class LieAlgebraWithGenerators(LieAlgebra):
|
|
787
|
+
"""
|
|
788
|
+
A Lie algebra with distinguished generators.
|
|
789
|
+
"""
|
|
790
|
+
def __init__(self, R, names=None, index_set=None, category=None, prefix='L', **kwds):
|
|
791
|
+
"""
|
|
792
|
+
The Lie algebra.
|
|
793
|
+
|
|
794
|
+
INPUT:
|
|
795
|
+
|
|
796
|
+
- ``R`` -- the base ring
|
|
797
|
+
- ``names`` -- (optional) the names of the generators
|
|
798
|
+
- ``index_set`` -- (optional) the indexing set
|
|
799
|
+
- ``category`` -- the category of the Lie algebra; the default is the
|
|
800
|
+
category of Lie algebras over ``R``
|
|
801
|
+
- ``prefix`` -- (optional) the prefix for the generator representation
|
|
802
|
+
- any keyword accepted by
|
|
803
|
+
:class:`~sage.structure.indexed_generators.IndexedGenerators`
|
|
804
|
+
|
|
805
|
+
EXAMPLES::
|
|
806
|
+
|
|
807
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
808
|
+
sage: L.category()
|
|
809
|
+
Category of finite dimensional nilpotent Lie algebras with basis over Rational Field
|
|
810
|
+
"""
|
|
811
|
+
self._indices = index_set
|
|
812
|
+
LieAlgebra.__init__(self, R, names, category)
|
|
813
|
+
|
|
814
|
+
@cached_method
|
|
815
|
+
def lie_algebra_generators(self):
|
|
816
|
+
"""
|
|
817
|
+
Return the generators of ``self`` as a Lie algebra.
|
|
818
|
+
|
|
819
|
+
EXAMPLES::
|
|
820
|
+
|
|
821
|
+
sage: L.<x,y> = LieAlgebra(QQ, representation='polynomial')
|
|
822
|
+
sage: L.lie_algebra_generators()
|
|
823
|
+
Finite family {'x': x, 'y': y}
|
|
824
|
+
"""
|
|
825
|
+
return Family(self._indices, self.monomial, name="monomial map")
|
|
826
|
+
|
|
827
|
+
@cached_method
|
|
828
|
+
def gens(self) -> tuple:
|
|
829
|
+
"""
|
|
830
|
+
Return a tuple whose entries are the generators for this
|
|
831
|
+
object, in some order.
|
|
832
|
+
|
|
833
|
+
EXAMPLES::
|
|
834
|
+
|
|
835
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
836
|
+
sage: L.gens()
|
|
837
|
+
(x, y)
|
|
838
|
+
"""
|
|
839
|
+
G = self.lie_algebra_generators()
|
|
840
|
+
try:
|
|
841
|
+
return tuple(G[i] for i in self.variable_names())
|
|
842
|
+
except (KeyError, IndexError):
|
|
843
|
+
return tuple(G[i] for i in self.indices())
|
|
844
|
+
except ValueError:
|
|
845
|
+
return tuple(G)
|
|
846
|
+
|
|
847
|
+
def gen(self, i):
|
|
848
|
+
"""
|
|
849
|
+
Return the ``i``-th generator of ``self``.
|
|
850
|
+
|
|
851
|
+
EXAMPLES::
|
|
852
|
+
|
|
853
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
854
|
+
sage: L.gen(0)
|
|
855
|
+
x
|
|
856
|
+
"""
|
|
857
|
+
return self.gens()[i]
|
|
858
|
+
|
|
859
|
+
def indices(self):
|
|
860
|
+
"""
|
|
861
|
+
Return the indices of ``self``.
|
|
862
|
+
|
|
863
|
+
EXAMPLES::
|
|
864
|
+
|
|
865
|
+
sage: L.<x,y> = LieAlgebra(QQ, representation='polynomial')
|
|
866
|
+
sage: L.indices()
|
|
867
|
+
{'x', 'y'}
|
|
868
|
+
"""
|
|
869
|
+
return self._indices
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
class FinitelyGeneratedLieAlgebra(LieAlgebraWithGenerators):
|
|
873
|
+
r"""
|
|
874
|
+
A finitely generated Lie algebra.
|
|
875
|
+
"""
|
|
876
|
+
def __init__(self, R, names=None, index_set=None, category=None):
|
|
877
|
+
"""
|
|
878
|
+
Initialize ``self``.
|
|
879
|
+
|
|
880
|
+
INPUT:
|
|
881
|
+
|
|
882
|
+
- ``R`` -- the base ring
|
|
883
|
+
|
|
884
|
+
- ``names`` -- the names of the generators
|
|
885
|
+
|
|
886
|
+
- ``index_set`` -- the index set of the generators
|
|
887
|
+
|
|
888
|
+
- ``category`` -- the category of the Lie algebra
|
|
889
|
+
|
|
890
|
+
EXAMPLES::
|
|
891
|
+
|
|
892
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
893
|
+
sage: L.category()
|
|
894
|
+
Category of finite dimensional nilpotent Lie algebras with basis over Rational Field
|
|
895
|
+
"""
|
|
896
|
+
LieAlgebraWithGenerators.__init__(self, R, names, index_set, category)
|
|
897
|
+
self.__ngens = len(self._indices)
|
|
898
|
+
|
|
899
|
+
def _repr_(self) -> str:
|
|
900
|
+
"""
|
|
901
|
+
Return a string representation of ``self``.
|
|
902
|
+
|
|
903
|
+
EXAMPLES::
|
|
904
|
+
|
|
905
|
+
sage: F.<x,y> = LieAlgebra(QQ, {('x','y'): {'x': 1}})
|
|
906
|
+
sage: F
|
|
907
|
+
Lie algebra on 2 generators (x, y) over Rational Field
|
|
908
|
+
"""
|
|
909
|
+
if self.__ngens == 1:
|
|
910
|
+
return "Lie algebra on the generator {} over {}".format(
|
|
911
|
+
self.gen(0), self.base_ring())
|
|
912
|
+
return "Lie algebra on {} generators {} over {}".format(
|
|
913
|
+
self.__ngens, self.gens(), self.base_ring())
|
|
914
|
+
|
|
915
|
+
@lazy_attribute
|
|
916
|
+
def _ordered_indices(self):
|
|
917
|
+
"""
|
|
918
|
+
Return the index set of the basis of ``self`` in (some) order.
|
|
919
|
+
|
|
920
|
+
EXAMPLES::
|
|
921
|
+
|
|
922
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
923
|
+
sage: L._ordered_indices
|
|
924
|
+
('x', 'y')
|
|
925
|
+
"""
|
|
926
|
+
return tuple(self.basis().keys())
|
|
927
|
+
|
|
928
|
+
def _an_element_(self):
|
|
929
|
+
"""
|
|
930
|
+
Return an element of ``self``.
|
|
931
|
+
|
|
932
|
+
EXAMPLES::
|
|
933
|
+
|
|
934
|
+
sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
935
|
+
sage: L.an_element()
|
|
936
|
+
x + y
|
|
937
|
+
"""
|
|
938
|
+
return self.sum(self.lie_algebra_generators())
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
class InfinitelyGeneratedLieAlgebra(LieAlgebraWithGenerators):
|
|
942
|
+
r"""
|
|
943
|
+
An infinitely generated Lie algebra.
|
|
944
|
+
"""
|
|
945
|
+
def _an_element_(self):
|
|
946
|
+
"""
|
|
947
|
+
Return an element of ``self``.
|
|
948
|
+
|
|
949
|
+
EXAMPLES::
|
|
950
|
+
|
|
951
|
+
sage: L = lie_algebras.Heisenberg(QQ, oo)
|
|
952
|
+
sage: L._an_element_()
|
|
953
|
+
p2 + q2 - 1/2*q3 + z
|
|
954
|
+
"""
|
|
955
|
+
return self.lie_algebra_generators()[self._indices.an_element()]
|
|
956
|
+
|
|
957
|
+
# Do we want this to return lie_algebra_generators()? Perhaps in the category?
|
|
958
|
+
# def gens(self):
|
|
959
|
+
# """
|
|
960
|
+
# Return a tuple whose entries are the generators for this
|
|
961
|
+
# object, in some order.
|
|
962
|
+
#
|
|
963
|
+
# EXAMPLES::
|
|
964
|
+
#
|
|
965
|
+
# sage: L.<x,y> = LieAlgebra(QQ, abelian=True)
|
|
966
|
+
# sage: L.gens()
|
|
967
|
+
# (x, y)
|
|
968
|
+
# """
|
|
969
|
+
# return self.lie_algebra_generators()
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
class LieAlgebraFromAssociative(LieAlgebraWithGenerators):
|
|
973
|
+
"""
|
|
974
|
+
A Lie algebra whose elements are from an associative algebra and whose
|
|
975
|
+
bracket is the commutator.
|
|
976
|
+
|
|
977
|
+
.. TODO::
|
|
978
|
+
|
|
979
|
+
Split this class into 2 classes, the base class for the Lie
|
|
980
|
+
algebra corresponding to the full associative algebra and a
|
|
981
|
+
subclass for the Lie subalgebra (of the full algebra)
|
|
982
|
+
generated by a generating set?
|
|
983
|
+
|
|
984
|
+
.. TODO::
|
|
985
|
+
|
|
986
|
+
Return the subalgebra generated by the basis
|
|
987
|
+
elements of ``self`` for the universal enveloping algebra.
|
|
988
|
+
|
|
989
|
+
EXAMPLES:
|
|
990
|
+
|
|
991
|
+
For the first example, we start with a commutative algebra.
|
|
992
|
+
Note that the bracket of everything will be 0::
|
|
993
|
+
|
|
994
|
+
sage: R = SymmetricGroupAlgebra(QQ, 2)
|
|
995
|
+
sage: L = LieAlgebra(associative=R)
|
|
996
|
+
sage: x, y = L.basis()
|
|
997
|
+
sage: L.bracket(x, y)
|
|
998
|
+
0
|
|
999
|
+
|
|
1000
|
+
Next we use a free algebra and do some simple computations::
|
|
1001
|
+
|
|
1002
|
+
sage: R.<a,b> = FreeAlgebra(QQ, 2)
|
|
1003
|
+
sage: L = LieAlgebra(associative=R)
|
|
1004
|
+
sage: x,y = L(a), L(b)
|
|
1005
|
+
sage: x-y
|
|
1006
|
+
a - b
|
|
1007
|
+
sage: L.bracket(x-y, x)
|
|
1008
|
+
a*b - b*a
|
|
1009
|
+
sage: L.bracket(x-y, L.bracket(x,y))
|
|
1010
|
+
a^2*b - 2*a*b*a + a*b^2 + b*a^2 - 2*b*a*b + b^2*a
|
|
1011
|
+
|
|
1012
|
+
We can also use a subset of the generators as a generating set
|
|
1013
|
+
of the Lie algebra::
|
|
1014
|
+
|
|
1015
|
+
sage: R.<a,b,c> = FreeAlgebra(QQ, 3)
|
|
1016
|
+
sage: L.<x,y> = LieAlgebra(associative=[a,b])
|
|
1017
|
+
|
|
1018
|
+
Now for a more complicated example using the group ring of `S_3`
|
|
1019
|
+
as our base algebra::
|
|
1020
|
+
|
|
1021
|
+
sage: G = SymmetricGroup(3)
|
|
1022
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1023
|
+
sage: L.<x,y> = LieAlgebra(associative=S.gens())
|
|
1024
|
+
sage: L.bracket(x, y)
|
|
1025
|
+
(2,3) - (1,3)
|
|
1026
|
+
sage: L.bracket(x, y-x)
|
|
1027
|
+
(2,3) - (1,3)
|
|
1028
|
+
sage: L.bracket(L.bracket(x, y), y)
|
|
1029
|
+
2*(1,2,3) - 2*(1,3,2)
|
|
1030
|
+
sage: L.bracket(x, L.bracket(x, y))
|
|
1031
|
+
(2,3) - 2*(1,2) + (1,3)
|
|
1032
|
+
sage: L.bracket(x, L.bracket(L.bracket(x, y), y))
|
|
1033
|
+
0
|
|
1034
|
+
|
|
1035
|
+
Here is an example using matrices::
|
|
1036
|
+
|
|
1037
|
+
sage: MS = MatrixSpace(QQ,2)
|
|
1038
|
+
sage: m1 = MS([[0, -1], [1, 0]])
|
|
1039
|
+
sage: m2 = MS([[-1, 4], [3, 2]])
|
|
1040
|
+
sage: L.<x,y> = LieAlgebra(associative=[m1, m2])
|
|
1041
|
+
sage: x
|
|
1042
|
+
[ 0 -1]
|
|
1043
|
+
[ 1 0]
|
|
1044
|
+
sage: y
|
|
1045
|
+
[-1 4]
|
|
1046
|
+
[ 3 2]
|
|
1047
|
+
sage: L.bracket(x,y)
|
|
1048
|
+
[-7 -3]
|
|
1049
|
+
[-3 7]
|
|
1050
|
+
sage: L.bracket(y,y)
|
|
1051
|
+
[0 0]
|
|
1052
|
+
[0 0]
|
|
1053
|
+
sage: L.bracket(y,x)
|
|
1054
|
+
[ 7 3]
|
|
1055
|
+
[ 3 -7]
|
|
1056
|
+
sage: L.bracket(x, L.bracket(y,x))
|
|
1057
|
+
[-6 14]
|
|
1058
|
+
[14 6]
|
|
1059
|
+
"""
|
|
1060
|
+
@staticmethod
|
|
1061
|
+
def __classcall_private__(cls, A, gens=None, names=None, index_set=None,
|
|
1062
|
+
free_lie_algebra=False, category=None):
|
|
1063
|
+
"""
|
|
1064
|
+
Normalize input to ensure a unique representation.
|
|
1065
|
+
|
|
1066
|
+
TESTS::
|
|
1067
|
+
|
|
1068
|
+
sage: G = SymmetricGroup(3)
|
|
1069
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1070
|
+
sage: L1 = LieAlgebra(associative=tuple(S.gens()), names=['x','y'])
|
|
1071
|
+
sage: L2 = LieAlgebra(associative=[ S(G((1,2,3))), S(G((1,2))) ], names='x,y')
|
|
1072
|
+
sage: L1 is L2
|
|
1073
|
+
True
|
|
1074
|
+
|
|
1075
|
+
sage: F.<x,y,z> = FreeAlgebra(QQ)
|
|
1076
|
+
sage: L1 = LieAlgebra(associative=F.algebra_generators(), names='x,y,z')
|
|
1077
|
+
sage: L2.<x,y,z> = LieAlgebra(associative=F.gens())
|
|
1078
|
+
sage: L1 is L2
|
|
1079
|
+
True
|
|
1080
|
+
"""
|
|
1081
|
+
# If A is not a ring, then we treat it as a set of generators
|
|
1082
|
+
if isinstance(A, Parent) and A.category().is_subcategory(Rings()):
|
|
1083
|
+
if gens is None and index_set is None:
|
|
1084
|
+
# Use the indexing set of the basis
|
|
1085
|
+
try:
|
|
1086
|
+
index_set = A.basis().keys()
|
|
1087
|
+
except (AttributeError, NotImplementedError):
|
|
1088
|
+
pass
|
|
1089
|
+
else:
|
|
1090
|
+
gens = A
|
|
1091
|
+
A = None
|
|
1092
|
+
|
|
1093
|
+
if index_set is None:
|
|
1094
|
+
# See if we can get an index set from the generators
|
|
1095
|
+
try:
|
|
1096
|
+
index_set = gens.keys()
|
|
1097
|
+
except (AttributeError, ValueError):
|
|
1098
|
+
pass
|
|
1099
|
+
|
|
1100
|
+
ngens = None
|
|
1101
|
+
if isinstance(gens, AbstractFamily):
|
|
1102
|
+
if index_set is None and names is None:
|
|
1103
|
+
index_set = gens.keys()
|
|
1104
|
+
if gens.cardinality() < float('inf'):
|
|
1105
|
+
# TODO: This makes the generators of a finitely generated
|
|
1106
|
+
# Lie algebra into an ordered list for uniqueness and then
|
|
1107
|
+
# reconstructs the family. Instead create a key for the
|
|
1108
|
+
# cache this way and then pass the family.
|
|
1109
|
+
try:
|
|
1110
|
+
gens = tuple([gens[i] for i in index_set])
|
|
1111
|
+
except KeyError:
|
|
1112
|
+
gens = tuple(gens)
|
|
1113
|
+
ngens = len(gens)
|
|
1114
|
+
|
|
1115
|
+
elif isinstance(gens, dict):
|
|
1116
|
+
if index_set is None and names is None:
|
|
1117
|
+
index_set = gens.keys()
|
|
1118
|
+
gens = gens.values()
|
|
1119
|
+
ngens = len(gens)
|
|
1120
|
+
elif gens is not None: # Assume it is list-like
|
|
1121
|
+
gens = tuple(gens)
|
|
1122
|
+
ngens = len(gens)
|
|
1123
|
+
if index_set is None and names is None:
|
|
1124
|
+
index_set = list(range(ngens))
|
|
1125
|
+
|
|
1126
|
+
if ngens is not None:
|
|
1127
|
+
if A is None:
|
|
1128
|
+
A = gens[0].parent()
|
|
1129
|
+
# Make sure all the generators have the same parent of A
|
|
1130
|
+
gens = tuple([A(g) for g in gens])
|
|
1131
|
+
|
|
1132
|
+
names, index_set = standardize_names_index_set(names, index_set, ngens)
|
|
1133
|
+
|
|
1134
|
+
# We strip the following axioms from the category of the assoc. algebra:
|
|
1135
|
+
# FiniteDimensional and WithBasis
|
|
1136
|
+
category = LieAlgebras(A.base_ring()).or_subcategory(category)
|
|
1137
|
+
if 'FiniteDimensional' in A.category().axioms():
|
|
1138
|
+
category = category.FiniteDimensional()
|
|
1139
|
+
if 'WithBasis' in A.category().axioms() and gens is None:
|
|
1140
|
+
category = category.WithBasis()
|
|
1141
|
+
|
|
1142
|
+
if isinstance(A, MatrixSpace):
|
|
1143
|
+
if gens is not None:
|
|
1144
|
+
for g in gens:
|
|
1145
|
+
g.set_immutable()
|
|
1146
|
+
return MatrixLieAlgebraFromAssociative(A, gens, names=names,
|
|
1147
|
+
index_set=index_set,
|
|
1148
|
+
category=category)
|
|
1149
|
+
|
|
1150
|
+
return super().__classcall__(cls, A, gens, names=names,
|
|
1151
|
+
index_set=index_set, category=category)
|
|
1152
|
+
|
|
1153
|
+
def __init__(self, A, gens=None, names=None, index_set=None, category=None):
|
|
1154
|
+
"""
|
|
1155
|
+
Initialize ``self``.
|
|
1156
|
+
|
|
1157
|
+
EXAMPLES::
|
|
1158
|
+
|
|
1159
|
+
sage: G = SymmetricGroup(3)
|
|
1160
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1161
|
+
sage: L = LieAlgebra(associative=S)
|
|
1162
|
+
sage: TestSuite(L).run()
|
|
1163
|
+
|
|
1164
|
+
TESTS::
|
|
1165
|
+
|
|
1166
|
+
sage: from sage.algebras.lie_algebras.lie_algebra import LieAlgebraFromAssociative as LAFA
|
|
1167
|
+
sage: LAFA(MatrixSpace(QQ, 0, sparse=True), [], names=())
|
|
1168
|
+
Lie algebra generated by () in Full MatrixSpace of 0 by 0 sparse matrices over Rational Field
|
|
1169
|
+
"""
|
|
1170
|
+
self._assoc = A
|
|
1171
|
+
R = self._assoc.base_ring()
|
|
1172
|
+
|
|
1173
|
+
LieAlgebraWithGenerators.__init__(self, R, names, index_set, category)
|
|
1174
|
+
|
|
1175
|
+
if isinstance(gens, tuple):
|
|
1176
|
+
# This guarantees that the generators have a specified ordering
|
|
1177
|
+
d = {self._indices[i]: self.element_class(self, v)
|
|
1178
|
+
for i, v in enumerate(gens)}
|
|
1179
|
+
gens = Family(self._indices, lambda i: d[i])
|
|
1180
|
+
elif gens is not None: # It is a family
|
|
1181
|
+
gens = Family(self._indices,
|
|
1182
|
+
lambda i: self.element_class(self, gens[i]),
|
|
1183
|
+
name="generator map")
|
|
1184
|
+
self._gens = gens
|
|
1185
|
+
|
|
1186
|
+
# We don't need to store the original generators because we can
|
|
1187
|
+
# get them from lifting this object's generators
|
|
1188
|
+
|
|
1189
|
+
# We construct the lift map to the ambient associative algebra
|
|
1190
|
+
LiftMorphismToAssociative(self, self._assoc).register_as_coercion()
|
|
1191
|
+
|
|
1192
|
+
def _repr_option(self, key):
|
|
1193
|
+
"""
|
|
1194
|
+
Metadata about the :meth:`_repr_` output.
|
|
1195
|
+
|
|
1196
|
+
See :meth:`sage.structure.parent._repr_option` for details.
|
|
1197
|
+
|
|
1198
|
+
EXAMPLES::
|
|
1199
|
+
|
|
1200
|
+
sage: MS = MatrixSpace(QQ,2)
|
|
1201
|
+
sage: L.<x> = LieAlgebra(associative=[MS.one()])
|
|
1202
|
+
sage: L._repr_option('element_ascii_art')
|
|
1203
|
+
True
|
|
1204
|
+
"""
|
|
1205
|
+
return self._assoc._repr_option(key)
|
|
1206
|
+
|
|
1207
|
+
def _repr_(self):
|
|
1208
|
+
"""
|
|
1209
|
+
Return a string representation of ``self``.
|
|
1210
|
+
|
|
1211
|
+
EXAMPLES::
|
|
1212
|
+
|
|
1213
|
+
sage: G = SymmetricGroup(3)
|
|
1214
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1215
|
+
sage: LieAlgebra(associative=S)
|
|
1216
|
+
Lie algebra of Symmetric group algebra of order 3
|
|
1217
|
+
over Rational Field
|
|
1218
|
+
sage: LieAlgebra(associative=S.gens())
|
|
1219
|
+
Lie algebra generated by ((1,2,3), (1,2))
|
|
1220
|
+
in Symmetric group algebra of order 3 over Rational Field
|
|
1221
|
+
"""
|
|
1222
|
+
if self._gens is not None:
|
|
1223
|
+
return "Lie algebra generated by {} in {}".format(tuple(self._gens), self._assoc)
|
|
1224
|
+
return "Lie algebra of {}".format(self._assoc)
|
|
1225
|
+
|
|
1226
|
+
def _element_constructor_(self, x):
|
|
1227
|
+
"""
|
|
1228
|
+
Convert ``x`` into ``self``.
|
|
1229
|
+
|
|
1230
|
+
EXAMPLES::
|
|
1231
|
+
|
|
1232
|
+
sage: S = SymmetricGroupAlgebra(QQ, 3)
|
|
1233
|
+
sage: L = LieAlgebra(associative=S)
|
|
1234
|
+
sage: x,y = S.algebra_generators()
|
|
1235
|
+
sage: elt = L(x - y); elt
|
|
1236
|
+
[2, 1, 3] - [2, 3, 1]
|
|
1237
|
+
sage: elt.parent() is L
|
|
1238
|
+
True
|
|
1239
|
+
sage: elt == L(x) - L(y)
|
|
1240
|
+
True
|
|
1241
|
+
sage: L([x, y])
|
|
1242
|
+
-[1, 3, 2] + [3, 2, 1]
|
|
1243
|
+
sage: L(2)
|
|
1244
|
+
2*[1, 2, 3]
|
|
1245
|
+
"""
|
|
1246
|
+
if isinstance(x, list) and len(x) == 2:
|
|
1247
|
+
return self(x[0])._bracket_(self(x[1]))
|
|
1248
|
+
return self.element_class(self, self._assoc(x))
|
|
1249
|
+
|
|
1250
|
+
def associative_algebra(self):
|
|
1251
|
+
"""
|
|
1252
|
+
Return the associative algebra used to construct ``self``.
|
|
1253
|
+
|
|
1254
|
+
EXAMPLES::
|
|
1255
|
+
|
|
1256
|
+
sage: G = SymmetricGroup(3)
|
|
1257
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1258
|
+
sage: L = LieAlgebra(associative=S)
|
|
1259
|
+
sage: L.associative_algebra() is S
|
|
1260
|
+
True
|
|
1261
|
+
"""
|
|
1262
|
+
return self._assoc
|
|
1263
|
+
|
|
1264
|
+
def lie_algebra_generators(self):
|
|
1265
|
+
"""
|
|
1266
|
+
Return the Lie algebra generators of ``self``.
|
|
1267
|
+
|
|
1268
|
+
EXAMPLES::
|
|
1269
|
+
|
|
1270
|
+
sage: G = SymmetricGroup(3)
|
|
1271
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1272
|
+
sage: L = LieAlgebra(associative=S)
|
|
1273
|
+
sage: L.lie_algebra_generators()
|
|
1274
|
+
Finite family {(): (), (1,3,2): (1,3,2), (1,2,3): (1,2,3),
|
|
1275
|
+
(2,3): (2,3), (1,3): (1,3), (1,2): (1,2)}
|
|
1276
|
+
"""
|
|
1277
|
+
if self._gens is not None:
|
|
1278
|
+
return self._gens
|
|
1279
|
+
try:
|
|
1280
|
+
ngens = self._indices.cardinality()
|
|
1281
|
+
except AttributeError:
|
|
1282
|
+
ngens = len(self._indices)
|
|
1283
|
+
if ngens < float('inf'):
|
|
1284
|
+
return Family(list(self._indices), self.monomial)
|
|
1285
|
+
return Family(self._indices, self.monomial, name="generator map")
|
|
1286
|
+
|
|
1287
|
+
def monomial(self, i):
|
|
1288
|
+
"""
|
|
1289
|
+
Return the monomial indexed by ``i``.
|
|
1290
|
+
|
|
1291
|
+
EXAMPLES::
|
|
1292
|
+
|
|
1293
|
+
sage: F.<x,y> = FreeAlgebra(QQ)
|
|
1294
|
+
sage: L = LieAlgebra(associative=F)
|
|
1295
|
+
sage: L.monomial(x.leading_support())
|
|
1296
|
+
x
|
|
1297
|
+
"""
|
|
1298
|
+
if i not in self._assoc.basis().keys():
|
|
1299
|
+
# return self(self._assoc.monomial(i))
|
|
1300
|
+
raise ValueError("not an index")
|
|
1301
|
+
return self.element_class(self, self._assoc.monomial(i))
|
|
1302
|
+
|
|
1303
|
+
def term(self, i, c=None):
|
|
1304
|
+
"""
|
|
1305
|
+
Return the term indexed by ``i`` with coefficient ``c``.
|
|
1306
|
+
|
|
1307
|
+
EXAMPLES::
|
|
1308
|
+
|
|
1309
|
+
sage: F.<x,y> = FreeAlgebra(QQ)
|
|
1310
|
+
sage: L = LieAlgebra(associative=F)
|
|
1311
|
+
sage: L.term(x.leading_support(), 4)
|
|
1312
|
+
4*x
|
|
1313
|
+
"""
|
|
1314
|
+
if i not in self._assoc.basis().keys():
|
|
1315
|
+
# return self(self._assoc.term(i, c))
|
|
1316
|
+
raise ValueError("not an index")
|
|
1317
|
+
return self.element_class(self, self._assoc.term(i, c))
|
|
1318
|
+
|
|
1319
|
+
@cached_method
|
|
1320
|
+
def zero(self):
|
|
1321
|
+
"""
|
|
1322
|
+
Return the element `0` in ``self``.
|
|
1323
|
+
|
|
1324
|
+
EXAMPLES::
|
|
1325
|
+
|
|
1326
|
+
sage: G = SymmetricGroup(3)
|
|
1327
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1328
|
+
sage: L = LieAlgebra(associative=S)
|
|
1329
|
+
sage: L.zero()
|
|
1330
|
+
0
|
|
1331
|
+
"""
|
|
1332
|
+
return self.element_class(self, self._assoc.zero())
|
|
1333
|
+
|
|
1334
|
+
def is_abelian(self):
|
|
1335
|
+
"""
|
|
1336
|
+
Return ``True`` if ``self`` is abelian.
|
|
1337
|
+
|
|
1338
|
+
EXAMPLES::
|
|
1339
|
+
|
|
1340
|
+
sage: R = FreeAlgebra(QQ, 2, 'x,y')
|
|
1341
|
+
sage: L = LieAlgebra(associative=R.gens())
|
|
1342
|
+
sage: L.is_abelian()
|
|
1343
|
+
False
|
|
1344
|
+
|
|
1345
|
+
sage: R = PolynomialRing(QQ, 'x,y')
|
|
1346
|
+
sage: L = LieAlgebra(associative=R.gens())
|
|
1347
|
+
sage: L.is_abelian()
|
|
1348
|
+
True
|
|
1349
|
+
|
|
1350
|
+
An example with a Lie algebra from the group algebra::
|
|
1351
|
+
|
|
1352
|
+
sage: G = SymmetricGroup(3)
|
|
1353
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1354
|
+
sage: L = LieAlgebra(associative=S)
|
|
1355
|
+
sage: L.is_abelian()
|
|
1356
|
+
False
|
|
1357
|
+
|
|
1358
|
+
Now we construct a Lie algebra from commuting elements in the group
|
|
1359
|
+
algebra::
|
|
1360
|
+
|
|
1361
|
+
sage: G = SymmetricGroup(5)
|
|
1362
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1363
|
+
sage: gens = map(S, [G((1, 2)), G((3, 4))])
|
|
1364
|
+
sage: L.<x,y> = LieAlgebra(associative=gens)
|
|
1365
|
+
sage: L.is_abelian()
|
|
1366
|
+
True
|
|
1367
|
+
"""
|
|
1368
|
+
if self._assoc.is_commutative():
|
|
1369
|
+
return True
|
|
1370
|
+
return super().is_abelian()
|
|
1371
|
+
|
|
1372
|
+
def _an_element_(self):
|
|
1373
|
+
"""
|
|
1374
|
+
Return an element of ``self``.
|
|
1375
|
+
|
|
1376
|
+
EXAMPLES::
|
|
1377
|
+
|
|
1378
|
+
sage: F.<x,y> = FreeAlgebra(QQ)
|
|
1379
|
+
|
|
1380
|
+
An infinitely generated example::
|
|
1381
|
+
|
|
1382
|
+
sage: L = LieAlgebra(associative=F)
|
|
1383
|
+
sage: L.an_element()
|
|
1384
|
+
1
|
|
1385
|
+
|
|
1386
|
+
A finitely generated example::
|
|
1387
|
+
|
|
1388
|
+
sage: L = LieAlgebra(associative=F.gens())
|
|
1389
|
+
sage: L.an_element()
|
|
1390
|
+
x + y
|
|
1391
|
+
"""
|
|
1392
|
+
G = self.lie_algebra_generators()
|
|
1393
|
+
if G.cardinality() < float('inf'):
|
|
1394
|
+
return self.sum(G)
|
|
1395
|
+
return G[self._indices.an_element()]
|
|
1396
|
+
|
|
1397
|
+
class Element(LieAlgebraElementWrapper):
|
|
1398
|
+
def _bracket_(self, rhs):
|
|
1399
|
+
"""
|
|
1400
|
+
Return the bracket ``[self, rhs]``.
|
|
1401
|
+
|
|
1402
|
+
EXAMPLES::
|
|
1403
|
+
|
|
1404
|
+
sage: L.<x,y,z> = LieAlgebra(QQ, representation='polynomial')
|
|
1405
|
+
sage: L.bracket(x, y)
|
|
1406
|
+
x*y - y*x
|
|
1407
|
+
|
|
1408
|
+
sage: G = SymmetricGroup(3)
|
|
1409
|
+
sage: S = GroupAlgebra(G, QQ)
|
|
1410
|
+
sage: L.<x,y> = LieAlgebra(associative=S.gens())
|
|
1411
|
+
sage: L.bracket(x, y)
|
|
1412
|
+
(2,3) - (1,3)
|
|
1413
|
+
|
|
1414
|
+
sage: L = lie_algebras.sl(QQ, 2, representation='matrix')
|
|
1415
|
+
sage: L.bracket(L.gen(0), L.gen(1))
|
|
1416
|
+
[ 1 0]
|
|
1417
|
+
[ 0 -1]
|
|
1418
|
+
"""
|
|
1419
|
+
ret = self.value * rhs.value - rhs.value * self.value
|
|
1420
|
+
return self.__class__(self.parent(), ret)
|
|
1421
|
+
|
|
1422
|
+
def lift_associative(self):
|
|
1423
|
+
"""
|
|
1424
|
+
Lift ``self`` to the ambient associative algebra (which
|
|
1425
|
+
might be smaller than the universal enveloping algebra).
|
|
1426
|
+
|
|
1427
|
+
EXAMPLES::
|
|
1428
|
+
|
|
1429
|
+
sage: R = FreeAlgebra(QQ, 3, 'x,y,z')
|
|
1430
|
+
sage: L.<x,y,z> = LieAlgebra(associative=R.gens())
|
|
1431
|
+
sage: x.lift_associative()
|
|
1432
|
+
x
|
|
1433
|
+
sage: x.lift_associative().parent()
|
|
1434
|
+
Free Algebra on 3 generators (x, y, z) over Rational Field
|
|
1435
|
+
"""
|
|
1436
|
+
return self.value
|
|
1437
|
+
|
|
1438
|
+
def monomial_coefficients(self, copy=True):
|
|
1439
|
+
"""
|
|
1440
|
+
Return the monomial coefficients of ``self`` (if this
|
|
1441
|
+
notion makes sense for ``self.parent()``).
|
|
1442
|
+
|
|
1443
|
+
EXAMPLES::
|
|
1444
|
+
|
|
1445
|
+
sage: R.<x,y,z> = FreeAlgebra(QQ)
|
|
1446
|
+
sage: L = LieAlgebra(associative=R)
|
|
1447
|
+
sage: elt = L(x) + 2*L(y) - L(z)
|
|
1448
|
+
sage: sorted(elt.monomial_coefficients().items())
|
|
1449
|
+
[(x, 1), (y, 2), (z, -1)]
|
|
1450
|
+
|
|
1451
|
+
sage: L = LieAlgebra(associative=[x,y])
|
|
1452
|
+
sage: elt = L(x) + 2*L(y)
|
|
1453
|
+
sage: elt.monomial_coefficients()
|
|
1454
|
+
Traceback (most recent call last):
|
|
1455
|
+
...
|
|
1456
|
+
NotImplementedError: the basis is not defined
|
|
1457
|
+
"""
|
|
1458
|
+
if self.parent()._gens is not None:
|
|
1459
|
+
raise NotImplementedError("the basis is not defined")
|
|
1460
|
+
return self.value.monomial_coefficients(copy)
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
class LiftMorphismToAssociative(LiftMorphism):
|
|
1464
|
+
"""
|
|
1465
|
+
The natural lifting morphism from a Lie algebra constructed from
|
|
1466
|
+
an associative algebra `A` to `A`.
|
|
1467
|
+
"""
|
|
1468
|
+
def preimage(self, x):
|
|
1469
|
+
"""
|
|
1470
|
+
Return the preimage of ``x`` under ``self``.
|
|
1471
|
+
|
|
1472
|
+
EXAMPLES::
|
|
1473
|
+
|
|
1474
|
+
sage: R = FreeAlgebra(QQ, 3, 'a,b,c')
|
|
1475
|
+
sage: L = LieAlgebra(associative=R)
|
|
1476
|
+
sage: x,y,z = R.gens()
|
|
1477
|
+
sage: f = R.coerce_map_from(L)
|
|
1478
|
+
sage: p = f.preimage(x*y - z); p
|
|
1479
|
+
-c + a*b
|
|
1480
|
+
sage: p.parent() is L
|
|
1481
|
+
True
|
|
1482
|
+
"""
|
|
1483
|
+
return self.domain().element_class(self.domain(), x)
|
|
1484
|
+
|
|
1485
|
+
def _call_(self, x):
|
|
1486
|
+
"""
|
|
1487
|
+
Return the image of ``x`` under ``self``.
|
|
1488
|
+
|
|
1489
|
+
EXAMPLES::
|
|
1490
|
+
|
|
1491
|
+
sage: R = FreeAlgebra(QQ, 3, 'x,y,z')
|
|
1492
|
+
sage: L.<x,y,z> = LieAlgebra(associative=R.gens())
|
|
1493
|
+
sage: f = R.coerce_map_from(L)
|
|
1494
|
+
sage: a = f(L([x,y]) + z); a
|
|
1495
|
+
z + x*y - y*x
|
|
1496
|
+
sage: a.parent() is R
|
|
1497
|
+
True
|
|
1498
|
+
"""
|
|
1499
|
+
return x.value
|
|
1500
|
+
|
|
1501
|
+
def section(self):
|
|
1502
|
+
"""
|
|
1503
|
+
Return the section map of ``self``.
|
|
1504
|
+
|
|
1505
|
+
EXAMPLES::
|
|
1506
|
+
|
|
1507
|
+
sage: R = FreeAlgebra(QQ, 3, 'x,y,z')
|
|
1508
|
+
sage: L.<x,y,z> = LieAlgebra(associative=R.gens())
|
|
1509
|
+
sage: f = R.coerce_map_from(L)
|
|
1510
|
+
sage: f.section()
|
|
1511
|
+
Generic morphism:
|
|
1512
|
+
From: Free Algebra on 3 generators (x, y, z) over Rational Field
|
|
1513
|
+
To: Lie algebra generated by (x, y, z) in Free Algebra on 3 generators (x, y, z) over Rational Field
|
|
1514
|
+
"""
|
|
1515
|
+
return SetMorphism(Hom(self.codomain(), self.domain()),
|
|
1516
|
+
self.preimage)
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
class MatrixLieAlgebraFromAssociative(LieAlgebraFromAssociative):
|
|
1520
|
+
"""
|
|
1521
|
+
A Lie algebra constructed from a matrix algebra.
|
|
1522
|
+
|
|
1523
|
+
This means a Lie algebra consisting of matrices,
|
|
1524
|
+
with commutator as Lie bracket.
|
|
1525
|
+
"""
|
|
1526
|
+
class Element(LieAlgebraMatrixWrapper, LieAlgebraFromAssociative.Element):
|
|
1527
|
+
def matrix(self):
|
|
1528
|
+
r"""
|
|
1529
|
+
Return ``self`` as element of the underlying matrix algebra.
|
|
1530
|
+
|
|
1531
|
+
OUTPUT: an instance of the element class of MatrixSpace
|
|
1532
|
+
|
|
1533
|
+
EXAMPLES::
|
|
1534
|
+
|
|
1535
|
+
sage: sl3m = lie_algebras.sl(ZZ, 3, representation='matrix')
|
|
1536
|
+
sage: e1,e2, f1, f2, h1, h2 = sl3m.gens()
|
|
1537
|
+
sage: h1m = h1.matrix(); h1m
|
|
1538
|
+
[ 1 0 0]
|
|
1539
|
+
[ 0 -1 0]
|
|
1540
|
+
[ 0 0 0]
|
|
1541
|
+
sage: h1m.parent()
|
|
1542
|
+
Full MatrixSpace of 3 by 3 sparse matrices over Integer Ring
|
|
1543
|
+
sage: matrix(h2)
|
|
1544
|
+
[ 0 0 0]
|
|
1545
|
+
[ 0 1 0]
|
|
1546
|
+
[ 0 0 -1]
|
|
1547
|
+
sage: L = lie_algebras.so(QQ['z'], 5, representation='matrix')
|
|
1548
|
+
sage: matrix(L.an_element())
|
|
1549
|
+
[ 1 1 0 0 0]
|
|
1550
|
+
[ 1 1 0 0 2]
|
|
1551
|
+
[ 0 0 -1 -1 0]
|
|
1552
|
+
[ 0 0 -1 -1 -1]
|
|
1553
|
+
[ 0 1 0 -2 0]
|
|
1554
|
+
|
|
1555
|
+
sage: gl2 = lie_algebras.gl(QQ, 2)
|
|
1556
|
+
sage: matrix(gl2.an_element())
|
|
1557
|
+
[1 1]
|
|
1558
|
+
[1 1]
|
|
1559
|
+
"""
|
|
1560
|
+
return self.value
|
|
1561
|
+
|
|
1562
|
+
_matrix_ = matrix
|