passagemath-modules 10.6.31rc3__cp314-cp314-musllinux_1_2_aarch64.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.31rc3.dist-info/METADATA +281 -0
- passagemath_modules-10.6.31rc3.dist-info/RECORD +807 -0
- passagemath_modules-10.6.31rc3.dist-info/WHEEL +5 -0
- passagemath_modules-10.6.31rc3.dist-info/top_level.txt +2 -0
- passagemath_modules.libs/libgcc_s-2d945d6c.so.1 +0 -0
- passagemath_modules.libs/libgfortran-67378ab2.so.5.0.0 +0 -0
- passagemath_modules.libs/libgmp-28992bcb.so.10.5.0 +0 -0
- passagemath_modules.libs/libgsl-23768756.so.28.0.0 +0 -0
- passagemath_modules.libs/libmpc-7897025b.so.3.3.1 +0 -0
- passagemath_modules.libs/libmpfr-e34bb864.so.6.2.1 +0 -0
- passagemath_modules.libs/libopenblasp-r0-503f0c35.3.29.so +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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/calculus/integration.pyx +698 -0
- sage/calculus/interpolation.cpython-314-aarch64-linux-musl.so +0 -0
- sage/calculus/interpolation.pxd +13 -0
- sage/calculus/interpolation.pyx +387 -0
- sage/calculus/interpolators.cpython-314-aarch64-linux-musl.so +0 -0
- sage/calculus/interpolators.pyx +326 -0
- sage/calculus/ode.cpython-314-aarch64-linux-musl.so +0 -0
- sage/calculus/ode.pxd +5 -0
- sage/calculus/ode.pyx +610 -0
- sage/calculus/riemann.cpython-314-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/libs/mpmath/utils.pxd +4 -0
- sage/libs/mpmath/utils.pyx +319 -0
- sage/matrix/action.cpython-314-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/matrix/constructor.pyx +750 -0
- sage/matrix/docs.py +430 -0
- sage/matrix/echelon_matrix.cpython-314-aarch64-linux-musl.so +0 -0
- sage/matrix/echelon_matrix.pyx +155 -0
- sage/matrix/matrix.pxd +2 -0
- sage/matrix/matrix0.cpython-314-aarch64-linux-musl.so +0 -0
- sage/matrix/matrix0.pxd +68 -0
- sage/matrix/matrix0.pyx +6324 -0
- sage/matrix/matrix1.cpython-314-aarch64-linux-musl.so +0 -0
- sage/matrix/matrix1.pxd +8 -0
- sage/matrix/matrix1.pyx +2851 -0
- sage/matrix/matrix2.cpython-314-aarch64-linux-musl.so +0 -0
- sage/matrix/matrix2.pxd +25 -0
- sage/matrix/matrix2.pyx +20181 -0
- sage/matrix/matrix_cdv.cpython-314-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/matroids/extension.pxd +34 -0
- sage/matroids/extension.pyx +519 -0
- sage/matroids/flats_matroid.cpython-314-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/matroids/linear_matroid.pxd +180 -0
- sage/matroids/linear_matroid.pyx +6649 -0
- sage/matroids/matroid.cpython-314-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/matroids/union_matroid.pxd +20 -0
- sage/matroids/union_matroid.pyx +331 -0
- sage/matroids/unpickling.cpython-314-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/rings/function_field/hermite_form_polynomial.pyx +188 -0
- sage/rings/function_field/khuri_makdisi.cpython-314-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/stats/hmm/chmm.pyx +1595 -0
- sage/stats/hmm/distributions.cpython-314-aarch64-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-aarch64-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-aarch64-linux-musl.so +0 -0
- sage/stats/hmm/util.pxd +7 -0
- sage/stats/hmm/util.pyx +165 -0
- sage/stats/intlist.cpython-314-aarch64-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-aarch64-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,1074 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-modules
|
|
2
|
+
r"""
|
|
3
|
+
Free module bases
|
|
4
|
+
|
|
5
|
+
The class :class:`FreeModuleBasis` implements bases on a free module `M` of
|
|
6
|
+
finite rank over a commutative ring,
|
|
7
|
+
while the class :class:`FreeModuleCoBasis` implements the dual bases (i.e.
|
|
8
|
+
bases of the dual module `M^*`).
|
|
9
|
+
|
|
10
|
+
AUTHORS:
|
|
11
|
+
|
|
12
|
+
- Eric Gourgoulhon, Michal Bejger (2014-2015): initial version
|
|
13
|
+
- Travis Scrimshaw (2016): ABC Basis_abstract and list functionality for bases
|
|
14
|
+
(:issue:`20770`)
|
|
15
|
+
- Eric Gourgoulhon (2018): some refactoring and more functionalities in the
|
|
16
|
+
choice of symbols for basis elements (:issue:`24792`)
|
|
17
|
+
|
|
18
|
+
REFERENCES:
|
|
19
|
+
|
|
20
|
+
- Chap. 10 of R. Godement : *Algebra* [God1968]_
|
|
21
|
+
- Chap. 3 of S. Lang : *Algebra* [Lan2002]_
|
|
22
|
+
"""
|
|
23
|
+
#******************************************************************************
|
|
24
|
+
# Copyright (C) 2015, 2018 Eric Gourgoulhon <eric.gourgoulhon@obspm.fr>
|
|
25
|
+
# Copyright (C) 2015 Michal Bejger <bejger@camk.edu.pl>
|
|
26
|
+
# Copyright (C) 2016 Travis Scrimshaw <tscrimsh@umn.edu>
|
|
27
|
+
#
|
|
28
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
29
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
30
|
+
# the License, or (at your option) any later version.
|
|
31
|
+
# http://www.gnu.org/licenses/
|
|
32
|
+
#******************************************************************************
|
|
33
|
+
|
|
34
|
+
from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets
|
|
35
|
+
from sage.rings.integer_ring import ZZ
|
|
36
|
+
from sage.sets.family import AbstractFamily
|
|
37
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class Basis_abstract(UniqueRepresentation, AbstractFamily):
|
|
41
|
+
"""
|
|
42
|
+
Abstract base class for (dual) bases of free modules.
|
|
43
|
+
|
|
44
|
+
A basis is an :class:`~sage.sets.family.AbstractFamily`, hence like
|
|
45
|
+
:class:`collections.abc.Mapping` subclasses such as :class:`dict`, it is
|
|
46
|
+
an associative :class:`Container`, providing methods :meth:`keys`,
|
|
47
|
+
:meth:`values`, and :meth:`items`. Thus, ``e[i]`` returns the element
|
|
48
|
+
of the basis ``e`` indexed by the key ``i``. However, in contrast to
|
|
49
|
+
:class:`Mapping` subclasses, not the :meth:`keys` but the
|
|
50
|
+
:meth:`values` are considered the elements.
|
|
51
|
+
|
|
52
|
+
EXAMPLES::
|
|
53
|
+
|
|
54
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M', start_index=1)
|
|
55
|
+
sage: e = M.basis('e'); e
|
|
56
|
+
Basis (e_1,e_2,e_3) on the Rank-3 free module M over the Integer Ring
|
|
57
|
+
sage: list(e)
|
|
58
|
+
[Element e_1 of the Rank-3 free module M over the Integer Ring,
|
|
59
|
+
Element e_2 of the Rank-3 free module M over the Integer Ring,
|
|
60
|
+
Element e_3 of the Rank-3 free module M over the Integer Ring]
|
|
61
|
+
sage: e.category()
|
|
62
|
+
Category of facade finite enumerated sets
|
|
63
|
+
sage: list(e.keys())
|
|
64
|
+
[1, 2, 3]
|
|
65
|
+
sage: list(e.values())
|
|
66
|
+
[Element e_1 of the Rank-3 free module M over the Integer Ring,
|
|
67
|
+
Element e_2 of the Rank-3 free module M over the Integer Ring,
|
|
68
|
+
Element e_3 of the Rank-3 free module M over the Integer Ring]
|
|
69
|
+
sage: list(e.items())
|
|
70
|
+
[(1, Element e_1 of the Rank-3 free module M over the Integer Ring),
|
|
71
|
+
(2, Element e_2 of the Rank-3 free module M over the Integer Ring),
|
|
72
|
+
(3, Element e_3 of the Rank-3 free module M over the Integer Ring)]
|
|
73
|
+
"""
|
|
74
|
+
def __init__(self, fmodule, symbol, latex_symbol, indices, latex_indices):
|
|
75
|
+
"""
|
|
76
|
+
Initialize ``self``.
|
|
77
|
+
|
|
78
|
+
EXAMPLES::
|
|
79
|
+
|
|
80
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
81
|
+
sage: e = M.basis('e')
|
|
82
|
+
sage: e._fmodule is M
|
|
83
|
+
True
|
|
84
|
+
"""
|
|
85
|
+
self._fmodule = fmodule
|
|
86
|
+
self._symbol = symbol
|
|
87
|
+
self._latex_symbol = latex_symbol
|
|
88
|
+
self._indices = indices
|
|
89
|
+
self._latex_indices = latex_indices
|
|
90
|
+
super().__init__(category=FiniteEnumeratedSets(), facade=fmodule)
|
|
91
|
+
|
|
92
|
+
def keys(self):
|
|
93
|
+
"""
|
|
94
|
+
Return the keys (indices) of the family.
|
|
95
|
+
|
|
96
|
+
EXAMPLES::
|
|
97
|
+
|
|
98
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
99
|
+
sage: e = M.basis('e')
|
|
100
|
+
sage: list(e.keys())
|
|
101
|
+
[0, 1, 2]
|
|
102
|
+
"""
|
|
103
|
+
return self._fmodule.irange()
|
|
104
|
+
|
|
105
|
+
def values(self):
|
|
106
|
+
"""
|
|
107
|
+
Return the basis elements of ``self``.
|
|
108
|
+
|
|
109
|
+
EXAMPLES::
|
|
110
|
+
|
|
111
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
112
|
+
sage: e = M.basis('e')
|
|
113
|
+
sage: list(e.values())
|
|
114
|
+
[Element e_0 of the Rank-3 free module M over the Integer Ring,
|
|
115
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring,
|
|
116
|
+
Element e_2 of the Rank-3 free module M over the Integer Ring]
|
|
117
|
+
"""
|
|
118
|
+
return self._vec
|
|
119
|
+
|
|
120
|
+
def _element_constructor_(self, x):
|
|
121
|
+
"""
|
|
122
|
+
Test whether ``x`` is an element of ``self``.
|
|
123
|
+
|
|
124
|
+
EXAMPLES::
|
|
125
|
+
|
|
126
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
127
|
+
sage: e = M.basis('e')
|
|
128
|
+
sage: e(e[1])
|
|
129
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring
|
|
130
|
+
sage: f = M.basis('f')
|
|
131
|
+
sage: e(f[1])
|
|
132
|
+
Traceback (most recent call last):
|
|
133
|
+
...
|
|
134
|
+
ValueError: no common basis for the comparison
|
|
135
|
+
"""
|
|
136
|
+
if x in self.values():
|
|
137
|
+
return x
|
|
138
|
+
raise ValueError(f'{x} is not in {self}')
|
|
139
|
+
|
|
140
|
+
def __iter__(self):
|
|
141
|
+
r"""
|
|
142
|
+
Return an iterator for the basis elements of ``self``.
|
|
143
|
+
|
|
144
|
+
EXAMPLES::
|
|
145
|
+
|
|
146
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
147
|
+
sage: e = M.basis('e')
|
|
148
|
+
sage: list(e)
|
|
149
|
+
[Element e_0 of the Rank-3 free module M over the Integer Ring,
|
|
150
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring,
|
|
151
|
+
Element e_2 of the Rank-3 free module M over the Integer Ring]
|
|
152
|
+
sage: ed = e.dual_basis()
|
|
153
|
+
sage: list(ed)
|
|
154
|
+
[Linear form e^0 on the Rank-3 free module M over the Integer Ring,
|
|
155
|
+
Linear form e^1 on the Rank-3 free module M over the Integer Ring,
|
|
156
|
+
Linear form e^2 on the Rank-3 free module M over the Integer Ring]
|
|
157
|
+
|
|
158
|
+
An example with indices starting at 1 instead of 0::
|
|
159
|
+
|
|
160
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M1',
|
|
161
|
+
....: start_index=1)
|
|
162
|
+
sage: e = M.basis('e')
|
|
163
|
+
sage: list(e)
|
|
164
|
+
[Element e_1 of the Rank-3 free module M1 over the Integer Ring,
|
|
165
|
+
Element e_2 of the Rank-3 free module M1 over the Integer Ring,
|
|
166
|
+
Element e_3 of the Rank-3 free module M1 over the Integer Ring]
|
|
167
|
+
"""
|
|
168
|
+
yield from self.values()
|
|
169
|
+
|
|
170
|
+
def _test_iter_len(self, **options):
|
|
171
|
+
r"""
|
|
172
|
+
Test that __iter__ and __len__ work correctly.
|
|
173
|
+
|
|
174
|
+
EXAMPLES::
|
|
175
|
+
|
|
176
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
177
|
+
sage: e = M.basis('e')
|
|
178
|
+
sage: e._test_iter_len()
|
|
179
|
+
"""
|
|
180
|
+
tester = self._tester(**options)
|
|
181
|
+
g = iter(self)
|
|
182
|
+
b = list(g)
|
|
183
|
+
for x in b:
|
|
184
|
+
tester.assertIn(x, self.free_module())
|
|
185
|
+
tester.assertEqual(len(b), len(self))
|
|
186
|
+
tester.assertEqual(len(b), self.free_module().rank())
|
|
187
|
+
|
|
188
|
+
def __len__(self):
|
|
189
|
+
r"""
|
|
190
|
+
Return the basis length, i.e. the rank of the free module.
|
|
191
|
+
|
|
192
|
+
.. NOTE::
|
|
193
|
+
|
|
194
|
+
the method ``__len__()`` is required for the basis to act as a
|
|
195
|
+
"frame" in the class :class:`~sage.tensor.modules.comp.Components`.
|
|
196
|
+
|
|
197
|
+
EXAMPLES::
|
|
198
|
+
|
|
199
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
200
|
+
sage: e = M.basis('e')
|
|
201
|
+
sage: e.__len__()
|
|
202
|
+
3
|
|
203
|
+
sage: len(e)
|
|
204
|
+
3
|
|
205
|
+
"""
|
|
206
|
+
return self._fmodule._rank
|
|
207
|
+
|
|
208
|
+
def cardinality(self):
|
|
209
|
+
r"""
|
|
210
|
+
Return the basis length, i.e. the rank of the free module.
|
|
211
|
+
|
|
212
|
+
EXAMPLES::
|
|
213
|
+
|
|
214
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
215
|
+
sage: e = M.basis('e')
|
|
216
|
+
sage: e.cardinality()
|
|
217
|
+
3
|
|
218
|
+
"""
|
|
219
|
+
return ZZ(self._fmodule._rank)
|
|
220
|
+
|
|
221
|
+
def __getitem__(self, index):
|
|
222
|
+
r"""
|
|
223
|
+
Return the basis element corresponding to a given index.
|
|
224
|
+
|
|
225
|
+
INPUT:
|
|
226
|
+
|
|
227
|
+
- ``index`` -- the index of the basis element
|
|
228
|
+
|
|
229
|
+
EXAMPLES::
|
|
230
|
+
|
|
231
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
232
|
+
sage: e = M.basis('e')
|
|
233
|
+
sage: e.__getitem__(0)
|
|
234
|
+
Element e_0 of the Rank-3 free module M over the Integer Ring
|
|
235
|
+
sage: e.__getitem__(1)
|
|
236
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring
|
|
237
|
+
sage: e.__getitem__(2)
|
|
238
|
+
Element e_2 of the Rank-3 free module M over the Integer Ring
|
|
239
|
+
sage: e[1] is e.__getitem__(1)
|
|
240
|
+
True
|
|
241
|
+
sage: e[1].parent() is M
|
|
242
|
+
True
|
|
243
|
+
sage: e[:]
|
|
244
|
+
(Element e_0 of the Rank-3 free module M over the Integer Ring,
|
|
245
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring,
|
|
246
|
+
Element e_2 of the Rank-3 free module M over the Integer Ring)
|
|
247
|
+
sage: f = e.dual_basis()
|
|
248
|
+
sage: f[0]
|
|
249
|
+
Linear form e^0 on the Rank-3 free module M over the Integer Ring
|
|
250
|
+
|
|
251
|
+
Examples with ``start_index=1``::
|
|
252
|
+
|
|
253
|
+
sage: M1 = FiniteRankFreeModule(ZZ, 3, name='M', start_index=1)
|
|
254
|
+
sage: e1 = M1.basis('e')
|
|
255
|
+
sage: e1.__getitem__(1)
|
|
256
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring
|
|
257
|
+
sage: e1.__getitem__(2)
|
|
258
|
+
Element e_2 of the Rank-3 free module M over the Integer Ring
|
|
259
|
+
sage: e1.__getitem__(3)
|
|
260
|
+
Element e_3 of the Rank-3 free module M over the Integer Ring
|
|
261
|
+
"""
|
|
262
|
+
si = self._fmodule._sindex
|
|
263
|
+
if isinstance(index, slice):
|
|
264
|
+
start, stop = index.start, index.stop
|
|
265
|
+
if start is not None:
|
|
266
|
+
start -= si
|
|
267
|
+
if stop is not None:
|
|
268
|
+
stop -= si
|
|
269
|
+
return self._vec[start:stop:index.step]
|
|
270
|
+
n = self._fmodule._rank
|
|
271
|
+
i = index - si
|
|
272
|
+
if i < 0 or i > n-1:
|
|
273
|
+
raise IndexError("out of range: {} not in [{},{}]".format(i+si, si,
|
|
274
|
+
n-1+si))
|
|
275
|
+
return self._vec[i]
|
|
276
|
+
|
|
277
|
+
def _latex_(self):
|
|
278
|
+
r"""
|
|
279
|
+
Return a LaTeX representation of ``self``.
|
|
280
|
+
|
|
281
|
+
EXAMPLES::
|
|
282
|
+
|
|
283
|
+
sage: FiniteRankFreeModule._clear_cache_() # for doctests only
|
|
284
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
285
|
+
sage: e = M.basis('e')
|
|
286
|
+
sage: e._latex_()
|
|
287
|
+
'\\left(e_{0},e_{1},e_{2}\\right)'
|
|
288
|
+
sage: latex(e)
|
|
289
|
+
\left(e_{0},e_{1},e_{2}\right)
|
|
290
|
+
sage: f = M.basis('eps', latex_symbol=r'\epsilon')
|
|
291
|
+
sage: f._latex_()
|
|
292
|
+
'\\left(\\epsilon_{0},\\epsilon_{1},\\epsilon_{2}\\right)'
|
|
293
|
+
sage: latex(f)
|
|
294
|
+
\left(\epsilon_{0},\epsilon_{1},\epsilon_{2}\right)
|
|
295
|
+
|
|
296
|
+
::
|
|
297
|
+
|
|
298
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
299
|
+
sage: e = M.basis('e')
|
|
300
|
+
sage: f = e.dual_basis()
|
|
301
|
+
sage: f._latex_()
|
|
302
|
+
'\\left(e^{0},e^{1},e^{2}\\right)'
|
|
303
|
+
"""
|
|
304
|
+
return self._latex_name
|
|
305
|
+
|
|
306
|
+
def free_module(self):
|
|
307
|
+
"""
|
|
308
|
+
Return the free module of ``self``.
|
|
309
|
+
|
|
310
|
+
EXAMPLES::
|
|
311
|
+
|
|
312
|
+
sage: M = FiniteRankFreeModule(QQ, 2, name='M', start_index=1)
|
|
313
|
+
sage: e = M.basis('e')
|
|
314
|
+
sage: e.free_module() is M
|
|
315
|
+
True
|
|
316
|
+
"""
|
|
317
|
+
return self._fmodule
|
|
318
|
+
|
|
319
|
+
def set_name(self, symbol, latex_symbol=None, indices=None,
|
|
320
|
+
latex_indices=None, index_position='down'):
|
|
321
|
+
r"""
|
|
322
|
+
Set (or change) the text name and LaTeX name of ``self``.
|
|
323
|
+
|
|
324
|
+
INPUT:
|
|
325
|
+
|
|
326
|
+
- ``symbol`` -- either a string, to be used as a common base for the
|
|
327
|
+
symbols of the elements of ``self``, or a list of strings,
|
|
328
|
+
representing the individual symbols of the elements of ``self``
|
|
329
|
+
- ``latex_symbol`` -- (default: ``None``) either a string, to be used
|
|
330
|
+
as a common base for the LaTeX symbols of the elements of ``self``,
|
|
331
|
+
or a list of strings, representing the individual LaTeX symbols of
|
|
332
|
+
the elements of ``self``; if ``None``, ``symbol`` is used in place
|
|
333
|
+
of ``latex_symbol``
|
|
334
|
+
- ``indices`` -- (default: ``None``; used only if ``symbol`` is a
|
|
335
|
+
single string) tuple of strings representing the indices labelling
|
|
336
|
+
the elements of ``self``; if ``None``, the indices will be generated
|
|
337
|
+
as integers within the range declared on the free module on which
|
|
338
|
+
``self`` is defined
|
|
339
|
+
- ``latex_indices`` -- (default: ``None``) list of strings representing
|
|
340
|
+
the indices for the LaTeX symbols of the elements of ``self``; if
|
|
341
|
+
``None``, ``indices`` is used instead
|
|
342
|
+
- ``index_position`` -- (default: ``'down'``) determines the position
|
|
343
|
+
of the indices labelling the individual elements of ``self``; can be
|
|
344
|
+
either ``'down'`` or ``'up'``
|
|
345
|
+
|
|
346
|
+
EXAMPLES::
|
|
347
|
+
|
|
348
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
349
|
+
sage: e = M.basis('e'); e
|
|
350
|
+
Basis (e_0,e_1,e_2) on the Rank-3 free module M over the Integer Ring
|
|
351
|
+
sage: e.set_name('f'); e
|
|
352
|
+
Basis (f_0,f_1,f_2) on the Rank-3 free module M over the Integer Ring
|
|
353
|
+
sage: e.set_name(['a', 'b', 'c']); e
|
|
354
|
+
Basis (a,b,c) on the Rank-3 free module M over the Integer Ring
|
|
355
|
+
sage: e.set_name('e', indices=['x', 'y', 'z']); e
|
|
356
|
+
Basis (e_x,e_y,e_z) on the Rank-3 free module M over the Integer Ring
|
|
357
|
+
sage: e.set_name('e', index_position='up'); e
|
|
358
|
+
Basis (e^0,e^1,e^2) on the Rank-3 free module M over the Integer Ring
|
|
359
|
+
sage: latex(e)
|
|
360
|
+
\left(e^{0},e^{1},e^{2}\right)
|
|
361
|
+
sage: e.set_name('e', latex_symbol=r'\epsilon'); e
|
|
362
|
+
Basis (e_0,e_1,e_2) on the Rank-3 free module M over the Integer Ring
|
|
363
|
+
sage: latex(e)
|
|
364
|
+
\left(\epsilon_{0},\epsilon_{1},\epsilon_{2}\right)
|
|
365
|
+
sage: e.set_name('e', latex_symbol=[r'\alpha', r'\beta', r'\gamma'])
|
|
366
|
+
sage: latex(e)
|
|
367
|
+
\left(\alpha,\beta,\gamma\right)
|
|
368
|
+
sage: e.set_name('e', latex_symbol='E',
|
|
369
|
+
....: latex_indices=[r'\alpha', r'\beta', r'\gamma'])
|
|
370
|
+
sage: latex(e)
|
|
371
|
+
\left(E_{\alpha},E_{\beta},E_{\gamma}\right)
|
|
372
|
+
sage: e.set_name('e') # back to the default
|
|
373
|
+
"""
|
|
374
|
+
n = self._fmodule._rank
|
|
375
|
+
if index_position == "down":
|
|
376
|
+
pos = "_"
|
|
377
|
+
else:
|
|
378
|
+
pos = "^"
|
|
379
|
+
if latex_symbol is None:
|
|
380
|
+
latex_symbol = symbol
|
|
381
|
+
self._symbol = symbol
|
|
382
|
+
self._latex_symbol = latex_symbol
|
|
383
|
+
self._indices = indices
|
|
384
|
+
self._latex_indices = latex_indices
|
|
385
|
+
# Text symbols:
|
|
386
|
+
if isinstance(symbol, (list, tuple)):
|
|
387
|
+
if len(symbol) != n:
|
|
388
|
+
raise ValueError("symbol must contain {} strings".format(n))
|
|
389
|
+
if len(set(symbol)) != n:
|
|
390
|
+
raise ValueError("the individual symbols must be different")
|
|
391
|
+
else:
|
|
392
|
+
if indices is None:
|
|
393
|
+
indices = [str(i) for i in self._fmodule.irange()]
|
|
394
|
+
elif len(indices) != n:
|
|
395
|
+
raise ValueError("indices must contain {} elements".format(n))
|
|
396
|
+
symbol0 = symbol + pos
|
|
397
|
+
symbol = [symbol0 + i for i in indices]
|
|
398
|
+
# LaTeX symbols:
|
|
399
|
+
if isinstance(latex_symbol, (list, tuple)):
|
|
400
|
+
if len(latex_symbol) != n:
|
|
401
|
+
raise ValueError(
|
|
402
|
+
"latex_symbol must contain {} strings".format(n))
|
|
403
|
+
if len(set(latex_symbol)) != n:
|
|
404
|
+
raise ValueError("the individual symbols must be different")
|
|
405
|
+
else:
|
|
406
|
+
if latex_indices is None:
|
|
407
|
+
if indices is None:
|
|
408
|
+
latex_indices = [str(i) for i in self._fmodule.irange()]
|
|
409
|
+
else:
|
|
410
|
+
latex_indices = indices
|
|
411
|
+
elif len(latex_indices) != n:
|
|
412
|
+
raise ValueError(
|
|
413
|
+
"latex_indices must contain {} elements".format(n))
|
|
414
|
+
symbol0 = latex_symbol + pos
|
|
415
|
+
latex_symbol = [symbol0 + "{" + i + "}" for i in latex_indices]
|
|
416
|
+
# Setting the names
|
|
417
|
+
self._name = "(" + ",".join(symbol) + ")"
|
|
418
|
+
self._latex_name = r"\left(" + ",".join(latex_symbol) + r"\right)"
|
|
419
|
+
for i in range(n):
|
|
420
|
+
self._vec[i].set_name(symbol[i], latex_name=latex_symbol[i])
|
|
421
|
+
|
|
422
|
+
#******************************************************************************
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
class FreeModuleCoBasis(Basis_abstract):
|
|
426
|
+
r"""
|
|
427
|
+
Dual basis of a free module over a commutative ring.
|
|
428
|
+
|
|
429
|
+
INPUT:
|
|
430
|
+
|
|
431
|
+
- ``basis`` -- basis of a free module `M` of which ``self`` is the dual
|
|
432
|
+
(must be an instance of :class:`FreeModuleBasis`)
|
|
433
|
+
- ``symbol`` -- either a string, to be used as a common base for the
|
|
434
|
+
symbols of the elements of the cobasis, or a tuple of strings,
|
|
435
|
+
representing the individual symbols of the elements of the cobasis
|
|
436
|
+
- ``latex_symbol`` -- (default: ``None``) either a string, to be used
|
|
437
|
+
as a common base for the LaTeX symbols of the elements of the cobasis,
|
|
438
|
+
or a tuple of strings, representing the individual LaTeX symbols of
|
|
439
|
+
the elements of the cobasis; if ``None``, ``symbol`` is used in place
|
|
440
|
+
of ``latex_symbol``
|
|
441
|
+
- ``indices`` -- (default: ``None``; used only if ``symbol`` is a single
|
|
442
|
+
string) tuple of strings representing the indices labelling
|
|
443
|
+
the elements of the cobasis; if ``None``, the indices will be generated
|
|
444
|
+
as integers within the range declared on the free module on which the
|
|
445
|
+
cobasis is defined
|
|
446
|
+
- ``latex_indices`` -- (default: ``None``) tuple of strings representing
|
|
447
|
+
the indices for the LaTeX symbols of the elements of the cobasis; if
|
|
448
|
+
``None``, ``indices`` is used instead
|
|
449
|
+
|
|
450
|
+
EXAMPLES:
|
|
451
|
+
|
|
452
|
+
Dual basis on a rank-3 free module::
|
|
453
|
+
|
|
454
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M', start_index=1)
|
|
455
|
+
sage: e = M.basis('e') ; e
|
|
456
|
+
Basis (e_1,e_2,e_3) on the Rank-3 free module M over the Integer Ring
|
|
457
|
+
sage: from sage.tensor.modules.free_module_basis import FreeModuleCoBasis
|
|
458
|
+
sage: f = FreeModuleCoBasis(e, 'f') ; f
|
|
459
|
+
Dual basis (f^1,f^2,f^3) on the Rank-3 free module M over the Integer Ring
|
|
460
|
+
|
|
461
|
+
Instead of importing ``FreeModuleCoBasis`` in the global name space, it is
|
|
462
|
+
recommended to use the method
|
|
463
|
+
:meth:`~sage.tensor.modules.free_module_basis.FreeModuleBasis.dual_basis`
|
|
464
|
+
of the basis ``e``::
|
|
465
|
+
|
|
466
|
+
sage: f = e.dual_basis() ; f
|
|
467
|
+
Dual basis (e^1,e^2,e^3) on the Rank-3 free module M over the Integer Ring
|
|
468
|
+
|
|
469
|
+
Let us check that the elements of ``f`` are in the dual of ``M``::
|
|
470
|
+
|
|
471
|
+
sage: f[1]
|
|
472
|
+
Linear form e^1 on the Rank-3 free module M over the Integer Ring
|
|
473
|
+
sage: f[1] in M.dual()
|
|
474
|
+
True
|
|
475
|
+
|
|
476
|
+
and that ``f`` is indeed the dual of ``e``::
|
|
477
|
+
|
|
478
|
+
sage: f[1](e[1]), f[1](e[2]), f[1](e[3])
|
|
479
|
+
(1, 0, 0)
|
|
480
|
+
sage: f[2](e[1]), f[2](e[2]), f[2](e[3])
|
|
481
|
+
(0, 1, 0)
|
|
482
|
+
sage: f[3](e[1]), f[3](e[2]), f[3](e[3])
|
|
483
|
+
(0, 0, 1)
|
|
484
|
+
|
|
485
|
+
TESTS::
|
|
486
|
+
|
|
487
|
+
sage: TestSuite(f).run()
|
|
488
|
+
"""
|
|
489
|
+
def __init__(self, basis, symbol, latex_symbol=None, indices=None,
|
|
490
|
+
latex_indices=None):
|
|
491
|
+
r"""
|
|
492
|
+
TESTS::
|
|
493
|
+
|
|
494
|
+
sage: from sage.tensor.modules.free_module_basis import FreeModuleCoBasis
|
|
495
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
496
|
+
sage: e = M.basis('e')
|
|
497
|
+
sage: f = FreeModuleCoBasis(e, 'f')
|
|
498
|
+
sage: TestSuite(f).run()
|
|
499
|
+
"""
|
|
500
|
+
self._basis = basis
|
|
501
|
+
Basis_abstract.__init__(self, basis._fmodule, symbol, latex_symbol,
|
|
502
|
+
indices, latex_indices)
|
|
503
|
+
# The individual linear forms:
|
|
504
|
+
vl = []
|
|
505
|
+
fmodule = self._fmodule
|
|
506
|
+
ring_one = fmodule._ring.one()
|
|
507
|
+
for i in fmodule.irange():
|
|
508
|
+
v = fmodule.linear_form()
|
|
509
|
+
v.set_comp(basis)[i] = ring_one
|
|
510
|
+
vl.append(v)
|
|
511
|
+
self._vec = tuple(vl)
|
|
512
|
+
# The names:
|
|
513
|
+
self.set_name(symbol, latex_symbol=latex_symbol, indices=indices,
|
|
514
|
+
latex_indices=latex_indices, index_position='up')
|
|
515
|
+
|
|
516
|
+
def _test_iter_len(self, **options):
|
|
517
|
+
r"""
|
|
518
|
+
Test that __iter__ and __len__ work correctly.
|
|
519
|
+
|
|
520
|
+
This method overrides ``Basis_abstract`` so that containment
|
|
521
|
+
of elements in the dual of ``self.free_module()`` is tested instead.
|
|
522
|
+
|
|
523
|
+
EXAMPLES::
|
|
524
|
+
|
|
525
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
526
|
+
sage: e = M.basis('e')
|
|
527
|
+
sage: f = e.dual_basis()
|
|
528
|
+
sage: f._test_iter_len()
|
|
529
|
+
"""
|
|
530
|
+
tester = self._tester(**options)
|
|
531
|
+
g = iter(self)
|
|
532
|
+
b = list(g)
|
|
533
|
+
for x in b:
|
|
534
|
+
tester.assertIn(x, self.free_module().dual())
|
|
535
|
+
tester.assertEqual(len(b), len(self))
|
|
536
|
+
tester.assertEqual(len(b), self.free_module().rank())
|
|
537
|
+
|
|
538
|
+
def _repr_(self):
|
|
539
|
+
r"""
|
|
540
|
+
Return a string representation of ``self``.
|
|
541
|
+
|
|
542
|
+
EXAMPLES::
|
|
543
|
+
|
|
544
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
545
|
+
sage: e = M.basis('e')
|
|
546
|
+
sage: f = e.dual_basis()
|
|
547
|
+
sage: f
|
|
548
|
+
Dual basis (e^0,e^1,e^2) on the
|
|
549
|
+
Rank-3 free module M over the Integer Ring
|
|
550
|
+
"""
|
|
551
|
+
return "Dual basis {} on the {}".format(self._name, self._fmodule)
|
|
552
|
+
|
|
553
|
+
#******************************************************************************
|
|
554
|
+
|
|
555
|
+
|
|
556
|
+
class FreeModuleBasis(Basis_abstract):
|
|
557
|
+
r"""
|
|
558
|
+
Basis of a free module over a commutative ring `R`.
|
|
559
|
+
|
|
560
|
+
INPUT:
|
|
561
|
+
|
|
562
|
+
- ``fmodule`` -- free module `M` (as an instance of
|
|
563
|
+
:class:`FiniteRankFreeModule`)
|
|
564
|
+
- ``symbol`` -- either a string, to be used as a common base for the
|
|
565
|
+
symbols of the elements of the basis, or a tuple of strings,
|
|
566
|
+
representing the individual symbols of the elements of the basis
|
|
567
|
+
- ``latex_symbol`` -- (default: ``None``) either a string, to be used
|
|
568
|
+
as a common base for the LaTeX symbols of the elements of the basis,
|
|
569
|
+
or a tuple of strings, representing the individual LaTeX symbols of
|
|
570
|
+
the elements of the basis; if ``None``, ``symbol`` is used in place
|
|
571
|
+
of ``latex_symbol``
|
|
572
|
+
- ``indices`` -- (default: ``None``; used only if ``symbol`` is a single
|
|
573
|
+
string) tuple of strings representing the indices labelling
|
|
574
|
+
the elements of the basis; if ``None``, the indices will be generated
|
|
575
|
+
as integers within the range declared on ``fmodule``
|
|
576
|
+
- ``latex_indices`` -- (default: ``None``) tuple of strings representing
|
|
577
|
+
the indices for the LaTeX symbols of the elements of the basis; if
|
|
578
|
+
``None``, ``indices`` is used instead
|
|
579
|
+
- ``symbol_dual`` -- (default: ``None``) same as ``symbol`` but for the
|
|
580
|
+
dual basis; if ``None``, ``symbol`` must be a string and is used
|
|
581
|
+
for the common base of the symbols of the elements of the dual basis
|
|
582
|
+
- ``latex_symbol_dual`` -- (default: ``None``) same as ``latex_symbol``
|
|
583
|
+
but for the dual basis
|
|
584
|
+
|
|
585
|
+
EXAMPLES:
|
|
586
|
+
|
|
587
|
+
A basis on a rank-3 free module over `\ZZ`::
|
|
588
|
+
|
|
589
|
+
sage: M0 = FiniteRankFreeModule(ZZ, 3, name='M_0')
|
|
590
|
+
sage: from sage.tensor.modules.free_module_basis import FreeModuleBasis
|
|
591
|
+
sage: e = FreeModuleBasis(M0, 'e') ; e
|
|
592
|
+
Basis (e_0,e_1,e_2) on the Rank-3 free module M_0 over the Integer Ring
|
|
593
|
+
|
|
594
|
+
Instead of importing ``FreeModuleBasis`` in the global name space, it is
|
|
595
|
+
recommended to use the module's method
|
|
596
|
+
:meth:`~sage.tensor.modules.finite_rank_free_module.FiniteRankFreeModule.basis`::
|
|
597
|
+
|
|
598
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
599
|
+
sage: e = M.basis('e') ; e
|
|
600
|
+
Basis (e_0,e_1,e_2) on the Rank-3 free module M over the Integer Ring
|
|
601
|
+
|
|
602
|
+
The individual elements constituting the basis are accessed via the
|
|
603
|
+
square bracket operator::
|
|
604
|
+
|
|
605
|
+
sage: e[0]
|
|
606
|
+
Element e_0 of the Rank-3 free module M over the Integer Ring
|
|
607
|
+
sage: e[0] in M
|
|
608
|
+
True
|
|
609
|
+
|
|
610
|
+
The slice operator ``:`` can be used to access to more than one element::
|
|
611
|
+
|
|
612
|
+
sage: e[0:2]
|
|
613
|
+
(Element e_0 of the Rank-3 free module M over the Integer Ring,
|
|
614
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring)
|
|
615
|
+
sage: e[:]
|
|
616
|
+
(Element e_0 of the Rank-3 free module M over the Integer Ring,
|
|
617
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring,
|
|
618
|
+
Element e_2 of the Rank-3 free module M over the Integer Ring)
|
|
619
|
+
|
|
620
|
+
The LaTeX symbol can be set explicitly::
|
|
621
|
+
|
|
622
|
+
sage: latex(e)
|
|
623
|
+
\left(e_{0},e_{1},e_{2}\right)
|
|
624
|
+
sage: eps = M.basis('eps', latex_symbol=r'\epsilon') ; eps
|
|
625
|
+
Basis (eps_0,eps_1,eps_2) on the Rank-3 free module M over the Integer
|
|
626
|
+
Ring
|
|
627
|
+
sage: latex(eps)
|
|
628
|
+
\left(\epsilon_{0},\epsilon_{1},\epsilon_{2}\right)
|
|
629
|
+
|
|
630
|
+
The individual elements of the basis are labelled according the
|
|
631
|
+
parameter ``start_index`` provided at the free module construction::
|
|
632
|
+
|
|
633
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M', start_index=1)
|
|
634
|
+
sage: e = M.basis('e') ; e
|
|
635
|
+
Basis (e_1,e_2,e_3) on the Rank-3 free module M over the Integer Ring
|
|
636
|
+
sage: e[1]
|
|
637
|
+
Element e_1 of the Rank-3 free module M over the Integer Ring
|
|
638
|
+
|
|
639
|
+
It is also possible to fully customize the labels, via the argument
|
|
640
|
+
``indices``::
|
|
641
|
+
|
|
642
|
+
sage: f = M.basis('f', indices=('x', 'y', 'z')); f
|
|
643
|
+
Basis (f_x,f_y,f_z) on the Rank-3 free module M over the Integer Ring
|
|
644
|
+
sage: f[1]
|
|
645
|
+
Element f_x of the Rank-3 free module M over the Integer Ring
|
|
646
|
+
|
|
647
|
+
The symbol of each element of the basis can also be freely chosen, by
|
|
648
|
+
providing a tuple of symbols as the first argument of ``basis``; it is then
|
|
649
|
+
mandatory to specify some symbols for the dual basis as well::
|
|
650
|
+
|
|
651
|
+
sage: g = M.basis(('a', 'b', 'c'), symbol_dual=('A', 'B', 'C')); g
|
|
652
|
+
Basis (a,b,c) on the Rank-3 free module M over the Integer Ring
|
|
653
|
+
sage: g[1]
|
|
654
|
+
Element a of the Rank-3 free module M over the Integer Ring
|
|
655
|
+
sage: g.dual_basis()[1]
|
|
656
|
+
Linear form A on the Rank-3 free module M over the Integer Ring
|
|
657
|
+
|
|
658
|
+
TESTS::
|
|
659
|
+
|
|
660
|
+
sage: TestSuite(e).run()
|
|
661
|
+
sage: TestSuite(f).run()
|
|
662
|
+
sage: TestSuite(g).run()
|
|
663
|
+
"""
|
|
664
|
+
# The following class attribute must be redefined by any derived class:
|
|
665
|
+
_cobasis_class = FreeModuleCoBasis
|
|
666
|
+
|
|
667
|
+
@staticmethod
|
|
668
|
+
def __classcall_private__(cls, fmodule, symbol, latex_symbol=None,
|
|
669
|
+
indices=None, latex_indices=None,
|
|
670
|
+
symbol_dual=None, latex_symbol_dual=None):
|
|
671
|
+
"""
|
|
672
|
+
Normalize input to ensure a unique representation.
|
|
673
|
+
|
|
674
|
+
TESTS::
|
|
675
|
+
|
|
676
|
+
sage: from sage.tensor.modules.free_module_basis import FreeModuleBasis
|
|
677
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
678
|
+
sage: e = FreeModuleBasis(M, 'e', latex_symbol='e')
|
|
679
|
+
sage: e is FreeModuleBasis(M, 'e')
|
|
680
|
+
True
|
|
681
|
+
"""
|
|
682
|
+
if latex_symbol is None:
|
|
683
|
+
latex_symbol = symbol
|
|
684
|
+
# Only tuples are valid entries for the unique representation of
|
|
685
|
+
# FreeModuleBasis:
|
|
686
|
+
if isinstance(symbol, list):
|
|
687
|
+
symbol = tuple(symbol)
|
|
688
|
+
if isinstance(latex_symbol, list):
|
|
689
|
+
latex_symbol = tuple(latex_symbol)
|
|
690
|
+
if isinstance(indices, list):
|
|
691
|
+
indices = tuple(indices)
|
|
692
|
+
if isinstance(latex_indices, list):
|
|
693
|
+
latex_indices = tuple(latex_indices)
|
|
694
|
+
if isinstance(symbol_dual, list):
|
|
695
|
+
symbol_dual = tuple(symbol_dual)
|
|
696
|
+
if isinstance(latex_symbol_dual, list):
|
|
697
|
+
latex_symbol_dual = tuple(latex_symbol_dual)
|
|
698
|
+
return super().__classcall__(cls, fmodule, symbol,
|
|
699
|
+
latex_symbol=latex_symbol,
|
|
700
|
+
indices=indices,
|
|
701
|
+
latex_indices=latex_indices,
|
|
702
|
+
symbol_dual=symbol_dual,
|
|
703
|
+
latex_symbol_dual=latex_symbol_dual)
|
|
704
|
+
|
|
705
|
+
def __init__(self, fmodule, symbol, latex_symbol=None, indices=None,
|
|
706
|
+
latex_indices=None, symbol_dual=None, latex_symbol_dual=None):
|
|
707
|
+
r"""
|
|
708
|
+
Initialize ``self``.
|
|
709
|
+
|
|
710
|
+
TESTS::
|
|
711
|
+
|
|
712
|
+
sage: FiniteRankFreeModule._clear_cache_() # for doctests only
|
|
713
|
+
sage: from sage.tensor.modules.free_module_basis import FreeModuleBasis
|
|
714
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
715
|
+
sage: e = FreeModuleBasis(M, 'e', latex_symbol=r'\epsilon')
|
|
716
|
+
sage: TestSuite(e).run()
|
|
717
|
+
"""
|
|
718
|
+
Basis_abstract.__init__(self, fmodule, symbol, latex_symbol, indices,
|
|
719
|
+
latex_indices)
|
|
720
|
+
# The basis is added to the module list of bases
|
|
721
|
+
fmodule._known_bases.append(self)
|
|
722
|
+
# The individual vectors:
|
|
723
|
+
vl = []
|
|
724
|
+
ring_one = fmodule._ring.one()
|
|
725
|
+
for i in fmodule.irange():
|
|
726
|
+
v = fmodule.element_class(fmodule)
|
|
727
|
+
v.set_comp(self)[i] = ring_one
|
|
728
|
+
vl.append(v)
|
|
729
|
+
self._vec = tuple(vl)
|
|
730
|
+
# The names:
|
|
731
|
+
self.set_name(symbol, latex_symbol=latex_symbol, indices=indices,
|
|
732
|
+
latex_indices=latex_indices, index_position='down')
|
|
733
|
+
# The first defined basis is considered as the default one:
|
|
734
|
+
if fmodule._def_basis is None:
|
|
735
|
+
fmodule._def_basis = self
|
|
736
|
+
# Initialization of the components w.r.t the current basis of the zero
|
|
737
|
+
# elements of all tensor modules constructed up to now (including the
|
|
738
|
+
# base module itself, since it is considered as a type-(1,0) tensor
|
|
739
|
+
# module):
|
|
740
|
+
for t in fmodule._all_modules:
|
|
741
|
+
t.zero()._add_comp_unsafe(self)
|
|
742
|
+
# (since new components are initialized to zero)
|
|
743
|
+
# Initialization of the components w.r.t. the current basis of the
|
|
744
|
+
# identity map of the general linear group:
|
|
745
|
+
if fmodule._general_linear_group is not None:
|
|
746
|
+
from .comp import KroneckerDelta
|
|
747
|
+
gl = fmodule._general_linear_group
|
|
748
|
+
gl.one()._components[self] = KroneckerDelta(fmodule._ring, self,
|
|
749
|
+
start_index=fmodule._sindex,
|
|
750
|
+
output_formatter=fmodule._output_formatter)
|
|
751
|
+
# The dual basis:
|
|
752
|
+
self._symbol_dual = symbol_dual
|
|
753
|
+
self._latex_symbol_dual = latex_symbol_dual
|
|
754
|
+
if symbol_dual is None:
|
|
755
|
+
if isinstance(symbol, (list, tuple)):
|
|
756
|
+
raise ValueError("symbol_dual must be provided")
|
|
757
|
+
else:
|
|
758
|
+
symbol_dual = symbol
|
|
759
|
+
elif latex_symbol_dual is None:
|
|
760
|
+
latex_symbol_dual = symbol_dual
|
|
761
|
+
if latex_symbol_dual is None:
|
|
762
|
+
latex_symbol_dual = latex_symbol
|
|
763
|
+
self._dual_basis = type(self)._cobasis_class(self, symbol_dual,
|
|
764
|
+
latex_symbol=latex_symbol_dual,
|
|
765
|
+
indices=indices,
|
|
766
|
+
latex_indices=latex_indices)
|
|
767
|
+
|
|
768
|
+
###### Methods to be redefined by derived classes of FreeModuleBasis ######
|
|
769
|
+
|
|
770
|
+
def _repr_(self):
|
|
771
|
+
r"""
|
|
772
|
+
Return a string representation of ``self``.
|
|
773
|
+
|
|
774
|
+
EXAMPLES::
|
|
775
|
+
|
|
776
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
777
|
+
sage: e = M.basis('e')
|
|
778
|
+
sage: e
|
|
779
|
+
Basis (e_0,e_1,e_2) on the Rank-3 free module M over the Integer Ring
|
|
780
|
+
sage: M1 = FiniteRankFreeModule(ZZ, 3, name='M', start_index=1)
|
|
781
|
+
sage: e1 = M1.basis('e')
|
|
782
|
+
sage: e1
|
|
783
|
+
Basis (e_1,e_2,e_3) on the Rank-3 free module M over the Integer Ring
|
|
784
|
+
"""
|
|
785
|
+
return "Basis {} on the {}".format(self._name, self._fmodule)
|
|
786
|
+
|
|
787
|
+
def _new_instance(self, symbol, latex_symbol=None, indices=None,
|
|
788
|
+
latex_indices=None, symbol_dual=None,
|
|
789
|
+
latex_symbol_dual=None):
|
|
790
|
+
r"""
|
|
791
|
+
Construct a new basis on the same module as ``self``.
|
|
792
|
+
|
|
793
|
+
INPUT:
|
|
794
|
+
|
|
795
|
+
- ``symbol`` -- either a string, to be used as a common base for the
|
|
796
|
+
symbols of the elements of the basis, or a tuple of strings,
|
|
797
|
+
representing the individual symbols of the elements of the basis
|
|
798
|
+
- ``latex_symbol`` -- (default: ``None``) either a string, to be used
|
|
799
|
+
as a common base for the LaTeX symbols of the elements of the basis,
|
|
800
|
+
or a tuple of strings, representing the individual LaTeX symbols of
|
|
801
|
+
the elements of the basis; if ``None``, ``symbol`` is used in place
|
|
802
|
+
of ``latex_symbol``
|
|
803
|
+
- ``indices`` -- (default: ``None``; used only if ``symbol`` is a
|
|
804
|
+
single string) tuple of strings representing the indices labelling
|
|
805
|
+
the elements of the basis; if ``None``, the indices will be generated
|
|
806
|
+
as integers within the range declared on the free module on which the
|
|
807
|
+
``self`` is defined
|
|
808
|
+
- ``latex_indices`` -- (default: ``None``) tuple of strings
|
|
809
|
+
representing the indices for the LaTeX symbols of the elements of the
|
|
810
|
+
basis; if ``None``, ``indices`` is used instead
|
|
811
|
+
- ``symbol_dual`` -- (default: ``None``) same as ``symbol`` but for the
|
|
812
|
+
dual basis; if ``None``, ``symbol`` must be a string and is used
|
|
813
|
+
for the common base of the symbols of the elements of the dual basis
|
|
814
|
+
- ``latex_symbol_dual`` -- (default: ``None``) same as ``latex_symbol``
|
|
815
|
+
but for the dual basis
|
|
816
|
+
|
|
817
|
+
OUTPUT: instance of :class:`FreeModuleBasis`
|
|
818
|
+
|
|
819
|
+
EXAMPLES::
|
|
820
|
+
|
|
821
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
822
|
+
sage: e = M.basis('e')
|
|
823
|
+
sage: e._new_instance('f')
|
|
824
|
+
Basis (f_0,f_1,f_2) on the Rank-3 free module M over the Integer Ring
|
|
825
|
+
sage: e._new_instance(('a', 'b', 'c'), symbol_dual=('A', 'B', 'C'))
|
|
826
|
+
Basis (a,b,c) on the Rank-3 free module M over the Integer Ring
|
|
827
|
+
sage: _.dual_basis()
|
|
828
|
+
Dual basis (A,B,C) on the Rank-3 free module M over the Integer Ring
|
|
829
|
+
sage: e._new_instance('E', indices=('x', 'y', 'z'))
|
|
830
|
+
Basis (E_x,E_y,E_z) on the Rank-3 free module M over the Integer Ring
|
|
831
|
+
sage: _.dual_basis()
|
|
832
|
+
Dual basis (E^x,E^y,E^z) on the Rank-3 free module M over the Integer Ring
|
|
833
|
+
"""
|
|
834
|
+
return FreeModuleBasis(self._fmodule, symbol, latex_symbol=latex_symbol,
|
|
835
|
+
indices=indices, latex_indices=latex_indices,
|
|
836
|
+
symbol_dual=symbol_dual,
|
|
837
|
+
latex_symbol_dual=latex_symbol_dual)
|
|
838
|
+
|
|
839
|
+
###### End of methods to be redefined by derived classes ######
|
|
840
|
+
|
|
841
|
+
def _init_from_family(self, family):
|
|
842
|
+
r"""
|
|
843
|
+
Identify ``self`` to a linearly independent spanning family of
|
|
844
|
+
module elements.
|
|
845
|
+
|
|
846
|
+
INPUT:
|
|
847
|
+
|
|
848
|
+
- ``family`` -- a family of elements of ``self.free_module()`` that are
|
|
849
|
+
linearly independent and spanning ``self.free_module()``
|
|
850
|
+
|
|
851
|
+
EXAMPLES::
|
|
852
|
+
|
|
853
|
+
sage: M = FiniteRankFreeModule(QQ, 2, name='M', start_index=1)
|
|
854
|
+
sage: e = M.basis('e')
|
|
855
|
+
sage: f1 = e[1] + e[2]
|
|
856
|
+
sage: f2 = e[1] - e[2]
|
|
857
|
+
sage: f = M.basis('f')
|
|
858
|
+
sage: f._init_from_family([f1, f2])
|
|
859
|
+
sage: (f[1], f[2]) == (f1, f2)
|
|
860
|
+
True
|
|
861
|
+
sage: f[1].display()
|
|
862
|
+
f_1 = e_1 + e_2
|
|
863
|
+
sage: f[2].display()
|
|
864
|
+
f_2 = e_1 - e_2
|
|
865
|
+
sage: e[1].display(f)
|
|
866
|
+
e_1 = 1/2 f_1 + 1/2 f_2
|
|
867
|
+
sage: e[2].display(f)
|
|
868
|
+
e_2 = 1/2 f_1 - 1/2 f_2
|
|
869
|
+
"""
|
|
870
|
+
fmodule = self._fmodule
|
|
871
|
+
n = fmodule.rank()
|
|
872
|
+
if len(family) != n:
|
|
873
|
+
raise ValueError("the size of the family must be {}".format(n))
|
|
874
|
+
# Copy of the components of each element of the family:
|
|
875
|
+
for i, ff in enumerate(family):
|
|
876
|
+
if ff not in fmodule:
|
|
877
|
+
raise TypeError("{} is not an element of {}".format(ff,
|
|
878
|
+
fmodule))
|
|
879
|
+
vs = self._vec[i]
|
|
880
|
+
for basis, comp in ff._components.items():
|
|
881
|
+
vs._components[basis] = comp.copy()
|
|
882
|
+
# Automorphisms relating the family to previously defined bases are
|
|
883
|
+
# constructed from the components of the family elements and are
|
|
884
|
+
# registered as changes of basis to ``self``:
|
|
885
|
+
ff0 = family[0]
|
|
886
|
+
for basis in ff0._components:
|
|
887
|
+
try:
|
|
888
|
+
comps = [ff.components(basis) for ff in family]
|
|
889
|
+
except ValueError:
|
|
890
|
+
continue
|
|
891
|
+
aut = fmodule.automorphism()
|
|
892
|
+
mat = [[c[[i]] for c in comps] for i in fmodule.irange()]
|
|
893
|
+
aut.add_comp(basis)[:] = mat
|
|
894
|
+
aut.add_comp(self)[:] = mat
|
|
895
|
+
fmodule.set_change_of_basis(basis, self, aut)
|
|
896
|
+
|
|
897
|
+
def module(self):
|
|
898
|
+
r"""
|
|
899
|
+
Return the free module on which the basis is defined.
|
|
900
|
+
|
|
901
|
+
OUTPUT:
|
|
902
|
+
|
|
903
|
+
- instance of
|
|
904
|
+
:class:`~sage.tensor.modules.finite_rank_free_module.FiniteRankFreeModule`
|
|
905
|
+
representing the free module of which ``self`` is a basis
|
|
906
|
+
|
|
907
|
+
EXAMPLES::
|
|
908
|
+
|
|
909
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M')
|
|
910
|
+
sage: e = M.basis('e')
|
|
911
|
+
sage: e.module()
|
|
912
|
+
Rank-3 free module M over the Integer Ring
|
|
913
|
+
sage: e.module() is M
|
|
914
|
+
True
|
|
915
|
+
"""
|
|
916
|
+
return self._fmodule
|
|
917
|
+
|
|
918
|
+
def dual_basis(self):
|
|
919
|
+
r"""
|
|
920
|
+
Return the basis dual to ``self``.
|
|
921
|
+
|
|
922
|
+
OUTPUT:
|
|
923
|
+
|
|
924
|
+
- instance of :class:`FreeModuleCoBasis` representing the dual of
|
|
925
|
+
``self``
|
|
926
|
+
|
|
927
|
+
EXAMPLES:
|
|
928
|
+
|
|
929
|
+
Dual basis on a rank-3 free module::
|
|
930
|
+
|
|
931
|
+
sage: M = FiniteRankFreeModule(ZZ, 3, name='M', start_index=1)
|
|
932
|
+
sage: e = M.basis('e') ; e
|
|
933
|
+
Basis (e_1,e_2,e_3) on the Rank-3 free module M over the Integer Ring
|
|
934
|
+
sage: f = e.dual_basis() ; f
|
|
935
|
+
Dual basis (e^1,e^2,e^3) on the Rank-3 free module M over the Integer Ring
|
|
936
|
+
|
|
937
|
+
Let us check that the elements of f are elements of the dual of M::
|
|
938
|
+
|
|
939
|
+
sage: f[1] in M.dual()
|
|
940
|
+
True
|
|
941
|
+
sage: f[1]
|
|
942
|
+
Linear form e^1 on the Rank-3 free module M over the Integer Ring
|
|
943
|
+
|
|
944
|
+
and that f is indeed the dual of e::
|
|
945
|
+
|
|
946
|
+
sage: f[1](e[1]), f[1](e[2]), f[1](e[3])
|
|
947
|
+
(1, 0, 0)
|
|
948
|
+
sage: f[2](e[1]), f[2](e[2]), f[2](e[3])
|
|
949
|
+
(0, 1, 0)
|
|
950
|
+
sage: f[3](e[1]), f[3](e[2]), f[3](e[3])
|
|
951
|
+
(0, 0, 1)
|
|
952
|
+
"""
|
|
953
|
+
return self._dual_basis
|
|
954
|
+
|
|
955
|
+
def new_basis(self, change_of_basis, symbol, latex_symbol=None,
|
|
956
|
+
indices=None, latex_indices=None, symbol_dual=None,
|
|
957
|
+
latex_symbol_dual=None):
|
|
958
|
+
r"""
|
|
959
|
+
Define a new module basis from ``self``.
|
|
960
|
+
|
|
961
|
+
The new basis is defined by means of a module automorphism.
|
|
962
|
+
|
|
963
|
+
INPUT:
|
|
964
|
+
|
|
965
|
+
- ``change_of_basis`` -- instance of
|
|
966
|
+
:class:`~sage.tensor.modules.free_module_automorphism.FreeModuleAutomorphism`
|
|
967
|
+
describing the automorphism `P` that relates the current basis
|
|
968
|
+
`(e_i)` (described by ``self``) to the new basis `(n_i)` according
|
|
969
|
+
to `n_i = P(e_i)`
|
|
970
|
+
- ``symbol`` -- either a string, to be used as a common base for the
|
|
971
|
+
symbols of the elements of the basis, or a tuple of strings,
|
|
972
|
+
representing the individual symbols of the elements of the basis
|
|
973
|
+
- ``latex_symbol`` -- (default: ``None``) either a string, to be used
|
|
974
|
+
as a common base for the LaTeX symbols of the elements of the basis,
|
|
975
|
+
or a tuple of strings, representing the individual LaTeX symbols of
|
|
976
|
+
the elements of the basis; if ``None``, ``symbol`` is used in place
|
|
977
|
+
of ``latex_symbol``
|
|
978
|
+
- ``indices`` -- (default: ``None``; used only if ``symbol`` is a
|
|
979
|
+
single string) tuple of strings representing the indices labelling
|
|
980
|
+
the elements of the basis; if ``None``, the indices will be generated
|
|
981
|
+
as integers within the range declared on the free module on which
|
|
982
|
+
``self`` is defined
|
|
983
|
+
- ``latex_indices`` -- (default: ``None``) tuple of strings
|
|
984
|
+
representing the indices for the LaTeX symbols of the elements of the
|
|
985
|
+
basis; if ``None``, ``indices`` is used instead
|
|
986
|
+
- ``symbol_dual`` -- (default: ``None``) same as ``symbol`` but for the
|
|
987
|
+
dual basis; if ``None``, ``symbol`` must be a string and is used
|
|
988
|
+
for the common base of the symbols of the elements of the dual basis
|
|
989
|
+
- ``latex_symbol_dual`` -- (default: ``None``) same as ``latex_symbol``
|
|
990
|
+
but for the dual basis
|
|
991
|
+
|
|
992
|
+
OUTPUT:
|
|
993
|
+
|
|
994
|
+
- the new basis `(n_i)`, as an instance of :class:`FreeModuleBasis`
|
|
995
|
+
|
|
996
|
+
EXAMPLES:
|
|
997
|
+
|
|
998
|
+
Change of basis on a vector space of dimension 2::
|
|
999
|
+
|
|
1000
|
+
sage: M = FiniteRankFreeModule(QQ, 2, name='M', start_index=1)
|
|
1001
|
+
sage: e = M.basis('e')
|
|
1002
|
+
sage: a = M.automorphism()
|
|
1003
|
+
sage: a[:] = [[1, 2], [-1, 3]]
|
|
1004
|
+
sage: f = e.new_basis(a, 'f') ; f
|
|
1005
|
+
Basis (f_1,f_2) on the 2-dimensional vector space M over the
|
|
1006
|
+
Rational Field
|
|
1007
|
+
sage: f[1].display()
|
|
1008
|
+
f_1 = e_1 - e_2
|
|
1009
|
+
sage: f[2].display()
|
|
1010
|
+
f_2 = 2 e_1 + 3 e_2
|
|
1011
|
+
sage: e[1].display(f)
|
|
1012
|
+
e_1 = 3/5 f_1 + 1/5 f_2
|
|
1013
|
+
sage: e[2].display(f)
|
|
1014
|
+
e_2 = -2/5 f_1 + 1/5 f_2
|
|
1015
|
+
|
|
1016
|
+
Use of some keyword arguments::
|
|
1017
|
+
|
|
1018
|
+
sage: b = e.new_basis(a, 'b', indices=('x', 'y'),
|
|
1019
|
+
....: symbol_dual=('A', 'B'))
|
|
1020
|
+
sage: b
|
|
1021
|
+
Basis (b_x,b_y) on the 2-dimensional vector space M over the
|
|
1022
|
+
Rational Field
|
|
1023
|
+
sage: b.dual_basis()
|
|
1024
|
+
Dual basis (A,B) on the 2-dimensional vector space M over the
|
|
1025
|
+
Rational Field
|
|
1026
|
+
"""
|
|
1027
|
+
from .free_module_automorphism import FreeModuleAutomorphism
|
|
1028
|
+
if not isinstance(change_of_basis, FreeModuleAutomorphism):
|
|
1029
|
+
raise TypeError("the argument change_of_basis must be some " +
|
|
1030
|
+
"instance of FreeModuleAutomorphism")
|
|
1031
|
+
fmodule = self._fmodule
|
|
1032
|
+
# self._new_instance used instead of FreeModuleBasis for a correct
|
|
1033
|
+
# construction in case of derived classes:
|
|
1034
|
+
the_new_basis = self._new_instance(symbol, latex_symbol=latex_symbol,
|
|
1035
|
+
indices=indices,
|
|
1036
|
+
latex_indices=latex_indices,
|
|
1037
|
+
symbol_dual=symbol_dual,
|
|
1038
|
+
latex_symbol_dual=latex_symbol_dual)
|
|
1039
|
+
transf = change_of_basis.copy()
|
|
1040
|
+
inv_transf = change_of_basis.inverse().copy()
|
|
1041
|
+
si = fmodule._sindex
|
|
1042
|
+
# Components of the new basis vectors in the old basis:
|
|
1043
|
+
for i in fmodule.irange():
|
|
1044
|
+
for j in fmodule.irange():
|
|
1045
|
+
the_new_basis._vec[i-si].add_comp(self)[[j]] = \
|
|
1046
|
+
transf.comp(self)[[j,i]]
|
|
1047
|
+
# Components of the new dual-basis elements in the old dual basis:
|
|
1048
|
+
for i in fmodule.irange():
|
|
1049
|
+
for j in fmodule.irange():
|
|
1050
|
+
the_new_basis._dual_basis._vec[i-si].add_comp(self)[[j]] = \
|
|
1051
|
+
inv_transf.comp(self)[[i,j]]
|
|
1052
|
+
# The components of the transformation and its inverse are the same in
|
|
1053
|
+
# the two bases:
|
|
1054
|
+
for i in fmodule.irange():
|
|
1055
|
+
for j in fmodule.irange():
|
|
1056
|
+
transf.add_comp(the_new_basis)[[i,j]] = transf.comp(self)[[i,j]]
|
|
1057
|
+
inv_transf.add_comp(the_new_basis)[[i,j]] = \
|
|
1058
|
+
inv_transf.comp(self)[[i,j]]
|
|
1059
|
+
# Components of the old basis vectors in the new basis:
|
|
1060
|
+
for i in fmodule.irange():
|
|
1061
|
+
for j in fmodule.irange():
|
|
1062
|
+
self._vec[i-si].add_comp(the_new_basis)[[j]] = \
|
|
1063
|
+
inv_transf.comp(self)[[j,i]]
|
|
1064
|
+
# Components of the old dual-basis elements in the new cobasis:
|
|
1065
|
+
for i in fmodule.irange():
|
|
1066
|
+
for j in fmodule.irange():
|
|
1067
|
+
self._dual_basis._vec[i-si].add_comp(the_new_basis)[[j]] = \
|
|
1068
|
+
transf.comp(self)[[i,j]]
|
|
1069
|
+
# The automorphism and its inverse are added to the module's dictionary
|
|
1070
|
+
# of changes of bases:
|
|
1071
|
+
fmodule._basis_changes[(self, the_new_basis)] = transf
|
|
1072
|
+
fmodule._basis_changes[(the_new_basis, self)] = inv_transf
|
|
1073
|
+
|
|
1074
|
+
return the_new_basis
|