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,1182 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-modules
|
|
2
|
+
r"""
|
|
3
|
+
Operation Tables
|
|
4
|
+
|
|
5
|
+
This module implements general operation tables, which are very matrix-like.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
# ****************************************************************************
|
|
9
|
+
# Copyright (C) 2010 Rob Beezer <beezer at ups.edu>
|
|
10
|
+
#
|
|
11
|
+
# This program is free software: you can redistribute it and/or modify
|
|
12
|
+
# it under the terms of the GNU General Public License as published by
|
|
13
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
14
|
+
# (at your option) any later version.
|
|
15
|
+
# https://www.gnu.org/licenses/
|
|
16
|
+
# ****************************************************************************
|
|
17
|
+
|
|
18
|
+
from sage.structure.sage_object import SageObject
|
|
19
|
+
from sage.matrix.constructor import Matrix
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class OperationTable(SageObject):
|
|
23
|
+
r"""
|
|
24
|
+
An object that represents a binary operation as a table.
|
|
25
|
+
|
|
26
|
+
Primarily this object is used to provide a
|
|
27
|
+
:meth:`~sage.categories.magmas.Magmas.ParentMethods.multiplication_table`
|
|
28
|
+
for objects in the category of magmas (monoids, groups, ...) and
|
|
29
|
+
:meth:`~sage.categories.additive_magmas.AdditiveMagmas.ParentMethods.addition_table`
|
|
30
|
+
for objects in the category of commutative additive magmas
|
|
31
|
+
(additive monoids, groups, ...).
|
|
32
|
+
|
|
33
|
+
INPUT:
|
|
34
|
+
|
|
35
|
+
- ``S`` -- a finite algebraic structure (or finite iterable)
|
|
36
|
+
|
|
37
|
+
- ``operation`` -- a function of two variables that accepts pairs
|
|
38
|
+
of elements from ``S``. A natural source of such functions is
|
|
39
|
+
the Python :mod:`operator` module, and in particular
|
|
40
|
+
:func:`operator.add` and :func:`operator.mul`. This may also
|
|
41
|
+
be a function defined with ``lambda`` or ``def.``
|
|
42
|
+
|
|
43
|
+
- ``names`` -- (default: ``'letters'``) The type of names
|
|
44
|
+
used, values are:
|
|
45
|
+
|
|
46
|
+
* ``'letters'`` -- lowercase ASCII letters are used
|
|
47
|
+
for a base 26 representation of the elements'
|
|
48
|
+
positions in the list given by
|
|
49
|
+
:meth:`~sage.matrix.operation_table.OperationTable.column_keys`,
|
|
50
|
+
padded to a common width with leading 'a's.
|
|
51
|
+
* ``'digits'`` -- base 10 representation of the
|
|
52
|
+
elements' positions in the list given by
|
|
53
|
+
:meth:`~sage.matrix.operation_table.OperationTable.column_keys`,
|
|
54
|
+
padded to a common width with leading zeros.
|
|
55
|
+
* ``'elements'`` -- the string representations
|
|
56
|
+
of the elements themselves.
|
|
57
|
+
* a list - a list of strings, where the length
|
|
58
|
+
of the list equals the number of elements.
|
|
59
|
+
|
|
60
|
+
- ``elements`` -- (default: ``None``) A list of elements of ``S``,
|
|
61
|
+
in forms that can be coerced into the structure, eg. their
|
|
62
|
+
string representations. This may be used to impose an alternate
|
|
63
|
+
ordering on the elements of ``S``, perhaps when this is used in
|
|
64
|
+
the context of a particular structure. The default is to use
|
|
65
|
+
whatever ordering the ``S.list()`` method returns. ``elements``
|
|
66
|
+
can also be a subset which is closed under the operation, useful
|
|
67
|
+
perhaps when the set is infinite.
|
|
68
|
+
|
|
69
|
+
OUTPUT:
|
|
70
|
+
|
|
71
|
+
An object with methods that abstracts multiplication tables,
|
|
72
|
+
addition tables, Cayley tables, etc. It should be general
|
|
73
|
+
enough to be useful for any finite algebraic structure
|
|
74
|
+
whose elements can be combined with a binary operation.
|
|
75
|
+
This is not necessarily meant be constructed directly, but instead
|
|
76
|
+
should be useful for constructing operation tables of various
|
|
77
|
+
algebraic structures that have binary operations.
|
|
78
|
+
|
|
79
|
+
EXAMPLES:
|
|
80
|
+
|
|
81
|
+
In its most basic use, the table needs a structure and an operation::
|
|
82
|
+
|
|
83
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
84
|
+
sage: G = SymmetricGroup(3) # needs sage.groups
|
|
85
|
+
sage: OperationTable(G, operation=operator.mul) # needs sage.groups
|
|
86
|
+
* a b c d e f
|
|
87
|
+
+------------
|
|
88
|
+
a| a b c d e f
|
|
89
|
+
b| b a d c f e
|
|
90
|
+
c| c e a f b d
|
|
91
|
+
d| d f b e a c
|
|
92
|
+
e| e c f a d b
|
|
93
|
+
f| f d e b c a
|
|
94
|
+
|
|
95
|
+
With two operations present, we can specify which operation we
|
|
96
|
+
want::
|
|
97
|
+
|
|
98
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
99
|
+
sage: R = Integers(6)
|
|
100
|
+
sage: OperationTable(R, operation=operator.add)
|
|
101
|
+
+ a b c d e f
|
|
102
|
+
+------------
|
|
103
|
+
a| a b c d e f
|
|
104
|
+
b| b c d e f a
|
|
105
|
+
c| c d e f a b
|
|
106
|
+
d| d e f a b c
|
|
107
|
+
e| e f a b c d
|
|
108
|
+
f| f a b c d e
|
|
109
|
+
|
|
110
|
+
The default symbol set for elements is lowercase ASCII letters,
|
|
111
|
+
which take on a base 26 flavor for structures with more than
|
|
112
|
+
26 elements. ::
|
|
113
|
+
|
|
114
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
115
|
+
sage: G = DihedralGroup(14) # needs sage.groups
|
|
116
|
+
sage: OperationTable(G, operator.mul, names='letters') # needs sage.groups
|
|
117
|
+
* aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb
|
|
118
|
+
+------------------------------------------------------------------------------------
|
|
119
|
+
aa| aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az ba bb
|
|
120
|
+
ab| ab aa ad ac af ae ah ag aj ai al ak an am ap ao ar aq at as av au ax aw az ay bb ba
|
|
121
|
+
ac| ac ba aa ae ad ag af ai ah ak aj am al ao an aq ap as ar au at aw av ay ax bb ab az
|
|
122
|
+
ad| ad bb ab af ac ah ae aj ag al ai an ak ap am ar ao at aq av as ax au az aw ba aa ay
|
|
123
|
+
ae| ae az ba ag aa ai ad ak af am ah ao aj aq al as an au ap aw ar ay at bb av ab ac ax
|
|
124
|
+
af| af ay bb ah ab aj ac al ae an ag ap ai ar ak at am av ao ax aq az as ba au aa ad aw
|
|
125
|
+
ag| ag ax az ai ba ak aa am ad ao af aq ah as aj au al aw an ay ap bb ar ab at ac ae av
|
|
126
|
+
ah| ah aw ay aj bb al ab an ac ap ae ar ag at ai av ak ax am az ao ba aq aa as ad af au
|
|
127
|
+
ai| ai av ax ak az am ba ao aa aq ad as af au ah aw aj ay al bb an ab ap ac ar ae ag at
|
|
128
|
+
aj| aj au aw al ay an bb ap ab ar ac at ae av ag ax ai az ak ba am aa ao ad aq af ah as
|
|
129
|
+
ak| ak at av am ax ao az aq ba as aa au ad aw af ay ah bb aj ab al ac an ae ap ag ai ar
|
|
130
|
+
al| al as au an aw ap ay ar bb at ab av ac ax ae az ag ba ai aa ak ad am af ao ah aj aq
|
|
131
|
+
am| am ar at ao av aq ax as az au ba aw aa ay ad bb af ab ah ac aj ae al ag an ai ak ap
|
|
132
|
+
an| an aq as ap au ar aw at ay av bb ax ab az ac ba ae aa ag ad ai af ak ah am aj al ao
|
|
133
|
+
ao| ao ap ar aq at as av au ax aw az ay ba bb aa ab ad ac af ae ah ag aj ai al ak am an
|
|
134
|
+
ap| ap ao aq ar as at au av aw ax ay az bb ba ab aa ac ad ae af ag ah ai aj ak al an am
|
|
135
|
+
aq| aq an ap as ar au at aw av ay ax bb az ab ba ac aa ae ad ag af ai ah ak aj am ao al
|
|
136
|
+
ar| ar am ao at aq av as ax au az aw ba ay aa bb ad ab af ac ah ae aj ag al ai an ap ak
|
|
137
|
+
as| as al an au ap aw ar ay at bb av ab ax ac az ae ba ag aa ai ad ak af am ah ao aq aj
|
|
138
|
+
at| at ak am av ao ax aq az as ba au aa aw ad ay af bb ah ab aj ac al ae an ag ap ar ai
|
|
139
|
+
au| au aj al aw an ay ap bb ar ab at ac av ae ax ag az ai ba ak aa am ad ao af aq as ah
|
|
140
|
+
av| av ai ak ax am az ao ba aq aa as ad au af aw ah ay aj bb al ab an ac ap ae ar at ag
|
|
141
|
+
aw| aw ah aj ay al bb an ab ap ac ar ae at ag av ai ax ak az am ba ao aa aq ad as au af
|
|
142
|
+
ax| ax ag ai az ak ba am aa ao ad aq af as ah au aj aw al ay an bb ap ab ar ac at av ae
|
|
143
|
+
ay| ay af ah bb aj ab al ac an ae ap ag ar ai at ak av am ax ao az aq ba as aa au aw ad
|
|
144
|
+
az| az ae ag ba ai aa ak ad am af ao ah aq aj as al au an aw ap ay ar bb at ab av ax ac
|
|
145
|
+
ba| ba ac ae aa ag ad ai af ak ah am aj ao al aq an as ap au ar aw at ay av bb ax az ab
|
|
146
|
+
bb| bb ad af ab ah ac aj ae al ag an ai ap ak ar am at ao av aq ax as az au ba aw ay aa
|
|
147
|
+
|
|
148
|
+
Another symbol set is base 10 digits, padded with leading
|
|
149
|
+
zeros to make a common width. ::
|
|
150
|
+
|
|
151
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
152
|
+
sage: G = AlternatingGroup(4) # needs sage.groups
|
|
153
|
+
sage: OperationTable(G, operator.mul, names='digits') # needs sage.groups
|
|
154
|
+
* 00 01 02 03 04 05 06 07 08 09 10 11
|
|
155
|
+
+------------------------------------
|
|
156
|
+
00| 00 01 02 03 04 05 06 07 08 09 10 11
|
|
157
|
+
01| 01 02 00 05 03 04 07 08 06 11 09 10
|
|
158
|
+
02| 02 00 01 04 05 03 08 06 07 10 11 09
|
|
159
|
+
03| 03 06 09 00 07 10 01 04 11 02 05 08
|
|
160
|
+
04| 04 08 10 02 06 11 00 05 09 01 03 07
|
|
161
|
+
05| 05 07 11 01 08 09 02 03 10 00 04 06
|
|
162
|
+
06| 06 09 03 10 00 07 04 11 01 08 02 05
|
|
163
|
+
07| 07 11 05 09 01 08 03 10 02 06 00 04
|
|
164
|
+
08| 08 10 04 11 02 06 05 09 00 07 01 03
|
|
165
|
+
09| 09 03 06 07 10 00 11 01 04 05 08 02
|
|
166
|
+
10| 10 04 08 06 11 02 09 00 05 03 07 01
|
|
167
|
+
11| 11 05 07 08 09 01 10 02 03 04 06 00
|
|
168
|
+
|
|
169
|
+
If the group's elements are not too cumbersome,
|
|
170
|
+
or the group is small, then the string representation
|
|
171
|
+
of the elements can be used. ::
|
|
172
|
+
|
|
173
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
174
|
+
sage: G = AlternatingGroup(3) # needs sage.groups
|
|
175
|
+
sage: OperationTable(G, operator.mul, names='elements') # needs sage.groups
|
|
176
|
+
* () (1,2,3) (1,3,2)
|
|
177
|
+
+------------------------
|
|
178
|
+
()| () (1,2,3) (1,3,2)
|
|
179
|
+
(1,2,3)| (1,2,3) (1,3,2) ()
|
|
180
|
+
(1,3,2)| (1,3,2) () (1,2,3)
|
|
181
|
+
|
|
182
|
+
You can give the elements any names you like, but they need to be ordered
|
|
183
|
+
in the same order as returned by the
|
|
184
|
+
:meth:`~sage.matrix.operation_table.OperationTable.column_keys`
|
|
185
|
+
method. ::
|
|
186
|
+
|
|
187
|
+
sage: # needs sage.groups
|
|
188
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
189
|
+
sage: G = QuaternionGroup()
|
|
190
|
+
sage: T = OperationTable(G, operator.mul)
|
|
191
|
+
sage: T.column_keys()
|
|
192
|
+
((), (1,2,3,4)(5,6,7,8), ..., (1,8,3,6)(2,7,4,5))
|
|
193
|
+
sage: names=['1', 'I', '-1', '-I', 'J', '-K', '-J', 'K']
|
|
194
|
+
sage: T.change_names(names=names)
|
|
195
|
+
sage: sorted(T.translation().items())
|
|
196
|
+
[('-1', (1,3)(2,4)(5,7)(6,8)), ..., ('K', (1,8,3,6)(2,7,4,5))]
|
|
197
|
+
sage: T
|
|
198
|
+
* 1 I -1 -I J -K -J K
|
|
199
|
+
+------------------------
|
|
200
|
+
1| 1 I -1 -I J -K -J K
|
|
201
|
+
I| I -1 -I 1 K J -K -J
|
|
202
|
+
-1| -1 -I 1 I -J K J -K
|
|
203
|
+
-I| -I 1 I -1 -K -J K J
|
|
204
|
+
J| J -K -J K -1 -I 1 I
|
|
205
|
+
-K| -K -J K J I -1 -I 1
|
|
206
|
+
-J| -J K J -K 1 I -1 -I
|
|
207
|
+
K| K J -K -J -I 1 I -1
|
|
208
|
+
|
|
209
|
+
With the right functions and a list comprehension, custom
|
|
210
|
+
names can be easier. A multiplication table for hex digits
|
|
211
|
+
(without carries)::
|
|
212
|
+
|
|
213
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
214
|
+
sage: R = Integers(16)
|
|
215
|
+
sage: names=['{:x}'.format(Integer(a)) for a in R]
|
|
216
|
+
sage: OperationTable(R, operation=operator.mul, names=names)
|
|
217
|
+
* 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
|
218
|
+
+--------------------------------
|
|
219
|
+
0| 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
220
|
+
1| 0 1 2 3 4 5 6 7 8 9 a b c d e f
|
|
221
|
+
2| 0 2 4 6 8 a c e 0 2 4 6 8 a c e
|
|
222
|
+
3| 0 3 6 9 c f 2 5 8 b e 1 4 7 a d
|
|
223
|
+
4| 0 4 8 c 0 4 8 c 0 4 8 c 0 4 8 c
|
|
224
|
+
5| 0 5 a f 4 9 e 3 8 d 2 7 c 1 6 b
|
|
225
|
+
6| 0 6 c 2 8 e 4 a 0 6 c 2 8 e 4 a
|
|
226
|
+
7| 0 7 e 5 c 3 a 1 8 f 6 d 4 b 2 9
|
|
227
|
+
8| 0 8 0 8 0 8 0 8 0 8 0 8 0 8 0 8
|
|
228
|
+
9| 0 9 2 b 4 d 6 f 8 1 a 3 c 5 e 7
|
|
229
|
+
a| 0 a 4 e 8 2 c 6 0 a 4 e 8 2 c 6
|
|
230
|
+
b| 0 b 6 1 c 7 2 d 8 3 e 9 4 f a 5
|
|
231
|
+
c| 0 c 8 4 0 c 8 4 0 c 8 4 0 c 8 4
|
|
232
|
+
d| 0 d a 7 4 1 e b 8 5 2 f c 9 6 3
|
|
233
|
+
e| 0 e c a 8 6 4 2 0 e c a 8 6 4 2
|
|
234
|
+
f| 0 f e d c b a 9 8 7 6 5 4 3 2 1
|
|
235
|
+
|
|
236
|
+
This should be flexible enough to create a variety
|
|
237
|
+
of such tables. ::
|
|
238
|
+
|
|
239
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
240
|
+
sage: from operator import xor
|
|
241
|
+
sage: T=OperationTable(ZZ, xor, elements=range(8))
|
|
242
|
+
sage: T
|
|
243
|
+
. a b c d e f g h
|
|
244
|
+
+----------------
|
|
245
|
+
a| a b c d e f g h
|
|
246
|
+
b| b a d c f e h g
|
|
247
|
+
c| c d a b g h e f
|
|
248
|
+
d| d c b a h g f e
|
|
249
|
+
e| e f g h a b c d
|
|
250
|
+
f| f e h g b a d c
|
|
251
|
+
g| g h e f c d a b
|
|
252
|
+
h| h g f e d c b a
|
|
253
|
+
sage: names=['000', '001','010','011','100','101','110','111']
|
|
254
|
+
sage: T.change_names(names)
|
|
255
|
+
sage: T.set_print_symbols('^', '\\land')
|
|
256
|
+
sage: T
|
|
257
|
+
^ 000 001 010 011 100 101 110 111
|
|
258
|
+
+--------------------------------
|
|
259
|
+
000| 000 001 010 011 100 101 110 111
|
|
260
|
+
001| 001 000 011 010 101 100 111 110
|
|
261
|
+
010| 010 011 000 001 110 111 100 101
|
|
262
|
+
011| 011 010 001 000 111 110 101 100
|
|
263
|
+
100| 100 101 110 111 000 001 010 011
|
|
264
|
+
101| 101 100 111 110 001 000 011 010
|
|
265
|
+
110| 110 111 100 101 010 011 000 001
|
|
266
|
+
111| 111 110 101 100 011 010 001 000
|
|
267
|
+
|
|
268
|
+
sage: T = OperationTable([False, True], operator.or_, names = 'elements')
|
|
269
|
+
sage: T
|
|
270
|
+
. False True
|
|
271
|
+
+------------
|
|
272
|
+
False| False True
|
|
273
|
+
True| True True
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
TESTS:
|
|
277
|
+
|
|
278
|
+
Empty structures behave acceptably, though the ASCII table looks a bit
|
|
279
|
+
odd. The LaTeX version works much better. ::
|
|
280
|
+
|
|
281
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
282
|
+
sage: L = FiniteSemigroups().example(())
|
|
283
|
+
sage: L
|
|
284
|
+
An example of a finite semigroup: the left regular band generated by ()
|
|
285
|
+
sage: T = OperationTable(L, operation=operator.mul)
|
|
286
|
+
sage: T
|
|
287
|
+
*
|
|
288
|
+
+
|
|
289
|
+
sage: T._latex_()
|
|
290
|
+
'{\\setlength{\\arraycolsep}{2ex}\n\\begin{array}{r|*{0}{r}}\n\\multicolumn{1}{c|}{\\ast}\\\\\\hline\n\\end{array}}'
|
|
291
|
+
|
|
292
|
+
If the algebraic structure cannot be listed (like when it is infinite)
|
|
293
|
+
then there is no way to create a table. ::
|
|
294
|
+
|
|
295
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
296
|
+
sage: OperationTable(ZZ, operator.mul)
|
|
297
|
+
Traceback (most recent call last):
|
|
298
|
+
...
|
|
299
|
+
ValueError: Integer Ring is infinite
|
|
300
|
+
|
|
301
|
+
The value of ``elements`` must be a subset of the algebraic
|
|
302
|
+
structure, in forms that can be coerced into the structure.
|
|
303
|
+
Here we demonstrate the proper use first::
|
|
304
|
+
|
|
305
|
+
sage: # needs sage.groups
|
|
306
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
307
|
+
sage: H = CyclicPermutationGroup(4)
|
|
308
|
+
sage: H.list()
|
|
309
|
+
[(), (1,2,3,4), (1,3)(2,4), (1,4,3,2)]
|
|
310
|
+
sage: elts = ['()', '(1,3)(2,4)']
|
|
311
|
+
sage: OperationTable(H, operator.mul, elements=elts)
|
|
312
|
+
* a b
|
|
313
|
+
+----
|
|
314
|
+
a| a b
|
|
315
|
+
b| b a
|
|
316
|
+
|
|
317
|
+
This can be rewritten so as to pass the actual elements of the
|
|
318
|
+
group ``H``, using a simple ``for`` loop::
|
|
319
|
+
|
|
320
|
+
sage: # needs sage.groups
|
|
321
|
+
sage: L = H.list() #list of elements of the group H
|
|
322
|
+
sage: elts = [L[i] for i in {0, 2}]
|
|
323
|
+
sage: elts
|
|
324
|
+
[(), (1,3)(2,4)]
|
|
325
|
+
sage: OperationTable(H, operator.mul, elements=elts)
|
|
326
|
+
* a b
|
|
327
|
+
+----
|
|
328
|
+
a| a b
|
|
329
|
+
b| b a
|
|
330
|
+
|
|
331
|
+
Here are a couple of improper uses::
|
|
332
|
+
|
|
333
|
+
sage: # needs sage.groups
|
|
334
|
+
sage: elts.append(5)
|
|
335
|
+
sage: OperationTable(H, operator.mul, elements=elts)
|
|
336
|
+
Traceback (most recent call last):
|
|
337
|
+
...
|
|
338
|
+
TypeError: unable to coerce 5 into Cyclic group of order 4 as a permutation group
|
|
339
|
+
sage: elts[2] = '(1,3,2,4)'
|
|
340
|
+
sage: OperationTable(H, operator.mul, elements=elts)
|
|
341
|
+
Traceback (most recent call last):
|
|
342
|
+
...
|
|
343
|
+
TypeError: unable to coerce (1,3,2,4) into Cyclic group of order 4 as a permutation group
|
|
344
|
+
sage: elts[2] = '(1,2,3,4)'
|
|
345
|
+
sage: OperationTable(H, operator.mul, elements=elts)
|
|
346
|
+
Traceback (most recent call last):
|
|
347
|
+
...
|
|
348
|
+
ValueError: (1,3)(2,4)*(1,2,3,4)=(1,4,3,2), and so the set is not closed
|
|
349
|
+
|
|
350
|
+
Unusable functions should be recognized as such::
|
|
351
|
+
|
|
352
|
+
sage: H = CyclicPermutationGroup(4) # needs sage.groups
|
|
353
|
+
sage: OperationTable(H, operator.add) # needs sage.groups
|
|
354
|
+
Traceback (most recent call last):
|
|
355
|
+
...
|
|
356
|
+
TypeError: elements () and () of Cyclic group of order 4 as a permutation group are incompatible with operation: <built-in function add>
|
|
357
|
+
sage: from operator import xor
|
|
358
|
+
sage: OperationTable(H, xor) # needs sage.groups
|
|
359
|
+
Traceback (most recent call last):
|
|
360
|
+
...
|
|
361
|
+
TypeError: elements () and () of Cyclic group of order 4 as a permutation group are incompatible with operation: <built-in function xor>
|
|
362
|
+
|
|
363
|
+
We construct the multiplication table for a finite finitely presented
|
|
364
|
+
group, where there is no normalization done when computing the hash::
|
|
365
|
+
|
|
366
|
+
sage: GU.<s,t> = FreeGroup() # needs sage.groups
|
|
367
|
+
sage: gr0 = GU / (s^(-2)*t*s*t, t^(-2)*s*t*s, s*t*s*t) # needs sage.groups
|
|
368
|
+
sage: gr0.multiplication_table() # needs sage.groups
|
|
369
|
+
* a b c d e f g h i j k l
|
|
370
|
+
+------------------------
|
|
371
|
+
a| a b c d e f g h i j k l
|
|
372
|
+
b| b e f g a i j k c d l h
|
|
373
|
+
c| c g a h l k b d j i f e
|
|
374
|
+
d| d k h a i g f c e l b j
|
|
375
|
+
e| e a i j b c d l f g h k
|
|
376
|
+
f| f j b k h l e g d c i a
|
|
377
|
+
g| g l k b c j i f a h e d
|
|
378
|
+
h| h f d c j b k a l e g i
|
|
379
|
+
i| i d e l k h a j g f c b
|
|
380
|
+
j| j h l e f d c i b k a g
|
|
381
|
+
k| k i g f d e l b h a j c
|
|
382
|
+
l| l c j i g a h e k b d f
|
|
383
|
+
|
|
384
|
+
AUTHORS:
|
|
385
|
+
|
|
386
|
+
- Rob Beezer (2010-03-15)
|
|
387
|
+
- Bruno Edwards (2022-10-31)
|
|
388
|
+
"""
|
|
389
|
+
|
|
390
|
+
def __init__(self, S, operation, names='letters', elements=None):
|
|
391
|
+
r"""
|
|
392
|
+
TESTS::
|
|
393
|
+
|
|
394
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
395
|
+
sage: G = SymmetricGroup(3) # needs sage.groups
|
|
396
|
+
sage: T = OperationTable(G, operator.mul) # needs sage.groups
|
|
397
|
+
sage: TestSuite(T).run() # needs sage.groups
|
|
398
|
+
"""
|
|
399
|
+
# Determine the elements of S, specified or not
|
|
400
|
+
# If elements are given, we check if they are all in S
|
|
401
|
+
# Note: there exist listable infinite objects (like ZZ)
|
|
402
|
+
if (elements is None):
|
|
403
|
+
if hasattr(S, 'is_finite'):
|
|
404
|
+
if not S.is_finite():
|
|
405
|
+
raise ValueError('%s is infinite' % S)
|
|
406
|
+
try:
|
|
407
|
+
try:
|
|
408
|
+
elems = sorted(S)
|
|
409
|
+
except TypeError:
|
|
410
|
+
elems = list(S)
|
|
411
|
+
except Exception:
|
|
412
|
+
raise ValueError('unable to determine elements of %s' % S)
|
|
413
|
+
else:
|
|
414
|
+
elems = []
|
|
415
|
+
try:
|
|
416
|
+
for e in elements:
|
|
417
|
+
coerced = S(e)
|
|
418
|
+
if coerced not in elems:
|
|
419
|
+
elems.append(coerced)
|
|
420
|
+
except Exception:
|
|
421
|
+
raise TypeError('unable to coerce %s into %s' % (e, S))
|
|
422
|
+
self._elts = tuple(elems)
|
|
423
|
+
self._n = len(self._elts)
|
|
424
|
+
self._name_dict = {}
|
|
425
|
+
|
|
426
|
+
# Map elements to strings
|
|
427
|
+
self._width, self._names, self._name_dict = self._name_maker(names)
|
|
428
|
+
|
|
429
|
+
# Determine the operation, if given by a string
|
|
430
|
+
# Some simple symbols are supported,
|
|
431
|
+
# Add support for other symbols in the supported dictionary
|
|
432
|
+
# Triple is (function, ascii-symbol, latex-symbol)
|
|
433
|
+
# ascii-symbol must be exactly one character wide
|
|
434
|
+
# Note double-backslash to escape properly for latex
|
|
435
|
+
from operator import add, mul
|
|
436
|
+
supported = {
|
|
437
|
+
add: (add, '+', '+'),
|
|
438
|
+
mul: (mul, '*', '\\ast')
|
|
439
|
+
}
|
|
440
|
+
# default symbols for upper-left-hand-corner of table
|
|
441
|
+
self._ascii_symbol = '.'
|
|
442
|
+
self._latex_symbol = '\\cdot'
|
|
443
|
+
if operation in supported.keys():
|
|
444
|
+
chosen = supported[operation]
|
|
445
|
+
operation = chosen[0]
|
|
446
|
+
self._ascii_symbol = chosen[1]
|
|
447
|
+
self._latex_symbol = chosen[2]
|
|
448
|
+
self._operation = operation
|
|
449
|
+
# We assume now that operation is a function that acts
|
|
450
|
+
# as a closed binary operation on the elements.
|
|
451
|
+
# If not, we'll discover that next in actual use.
|
|
452
|
+
|
|
453
|
+
self._table = []
|
|
454
|
+
|
|
455
|
+
# the elements might not be hashable. But if they are it is much
|
|
456
|
+
# faster to lookup in a hash table rather than in a list!
|
|
457
|
+
try:
|
|
458
|
+
get_row = {e: i for i, e in enumerate(self._elts)}.__getitem__
|
|
459
|
+
except TypeError:
|
|
460
|
+
get_row = self._elts.index
|
|
461
|
+
|
|
462
|
+
for g in self._elts:
|
|
463
|
+
row = []
|
|
464
|
+
for h in self._elts:
|
|
465
|
+
try:
|
|
466
|
+
result = self._operation(g, h)
|
|
467
|
+
except Exception:
|
|
468
|
+
raise TypeError('elements %s and %s of %s are incompatible with operation: %s' % (
|
|
469
|
+
g, h, S, self._operation))
|
|
470
|
+
|
|
471
|
+
try:
|
|
472
|
+
r = get_row(result)
|
|
473
|
+
except (KeyError, ValueError):
|
|
474
|
+
failed = True
|
|
475
|
+
# There might be an issue with the hashing, fall back to
|
|
476
|
+
# getting the index (which simply uses ==).
|
|
477
|
+
if get_row != self._elts.index:
|
|
478
|
+
failed = False
|
|
479
|
+
get_row = self._elts.index
|
|
480
|
+
try:
|
|
481
|
+
r = get_row(result)
|
|
482
|
+
except (KeyError, ValueError):
|
|
483
|
+
failed = True
|
|
484
|
+
if failed:
|
|
485
|
+
raise ValueError('%s%s%s=%s, and so the set is not closed' % (
|
|
486
|
+
g, self._ascii_symbol, h, result))
|
|
487
|
+
|
|
488
|
+
row.append(r)
|
|
489
|
+
self._table.append(row)
|
|
490
|
+
|
|
491
|
+
def _name_maker(self, names):
|
|
492
|
+
r"""
|
|
493
|
+
Helper function to create names of elements of algebraic structures.
|
|
494
|
+
|
|
495
|
+
INPUT:
|
|
496
|
+
|
|
497
|
+
Identical to the input for :class:`OperationTable` and :meth:`change_names`,
|
|
498
|
+
so look there for details.
|
|
499
|
+
|
|
500
|
+
OUTPUT:
|
|
501
|
+
|
|
502
|
+
- ``width`` -- integer giving the maximum width of the strings
|
|
503
|
+
describing the elements. This is used for formatting the ASCII
|
|
504
|
+
version of the table.
|
|
505
|
+
- ``name_list`` -- list of strings naming the elements, in the
|
|
506
|
+
same order as given by the :meth:`list` method
|
|
507
|
+
- ``name_dict`` -- dictionary giving the correspondence between the
|
|
508
|
+
strings and the actual elements. So the keys are the strings and
|
|
509
|
+
the values are the elements of the structure.
|
|
510
|
+
|
|
511
|
+
EXAMPLES:
|
|
512
|
+
|
|
513
|
+
This routine is tested extensively in the :class:`OperationTable`
|
|
514
|
+
and :meth:`change_names` methods. So we just demonstrate
|
|
515
|
+
the nature of the output here. ::
|
|
516
|
+
|
|
517
|
+
sage: # needs sage.groups
|
|
518
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
519
|
+
sage: G = SymmetricGroup(3)
|
|
520
|
+
sage: T = OperationTable(G, operator.mul)
|
|
521
|
+
sage: w, l, d = T._name_maker('letters')
|
|
522
|
+
sage: w
|
|
523
|
+
1
|
|
524
|
+
sage: l[0]
|
|
525
|
+
'a'
|
|
526
|
+
sage: d['a']
|
|
527
|
+
()
|
|
528
|
+
|
|
529
|
+
TESTS:
|
|
530
|
+
|
|
531
|
+
We test the error conditions here, rather than as part of the
|
|
532
|
+
doctests for the :class:`OperationTable` and :meth:`change_names`
|
|
533
|
+
methods that rely on this one. ::
|
|
534
|
+
|
|
535
|
+
sage: # needs sage.groups
|
|
536
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
537
|
+
sage: G = AlternatingGroup(3)
|
|
538
|
+
sage: T = OperationTable(G, operator.mul)
|
|
539
|
+
sage: T._name_maker(['x'])
|
|
540
|
+
Traceback (most recent call last):
|
|
541
|
+
...
|
|
542
|
+
ValueError: list of element names must be the same size as the set, 1 != 3
|
|
543
|
+
sage: T._name_maker(['x', 'y', 4])
|
|
544
|
+
Traceback (most recent call last):
|
|
545
|
+
...
|
|
546
|
+
ValueError: list of element names must only contain strings, not 4
|
|
547
|
+
sage: T._name_maker('blatzo')
|
|
548
|
+
Traceback (most recent call last):
|
|
549
|
+
...
|
|
550
|
+
ValueError: element names must be a list, or one of the keywords: 'letters', 'digits', 'elements'
|
|
551
|
+
"""
|
|
552
|
+
from math import log, log10
|
|
553
|
+
name_list = []
|
|
554
|
+
if names == 'digits':
|
|
555
|
+
if self._n == 0 or self._n == 1:
|
|
556
|
+
width = 1
|
|
557
|
+
else:
|
|
558
|
+
width = int(log10(self._n - 1)) + 1
|
|
559
|
+
for i in range(self._n):
|
|
560
|
+
name_list.append('{0:0{1}d}'.format(i, width))
|
|
561
|
+
elif names == 'letters':
|
|
562
|
+
from string import ascii_lowercase as letters
|
|
563
|
+
from sage.rings.integer import Integer
|
|
564
|
+
base = len(letters)
|
|
565
|
+
if self._n == 0 or self._n == 1:
|
|
566
|
+
width = 1
|
|
567
|
+
else:
|
|
568
|
+
width = int(log(self._n - 1, base)) + 1
|
|
569
|
+
for i in range(self._n):
|
|
570
|
+
places = Integer(i).digits(
|
|
571
|
+
base=base, digits=letters, padto=width)
|
|
572
|
+
places.reverse()
|
|
573
|
+
name_list.append(''.join(places))
|
|
574
|
+
elif names == 'elements':
|
|
575
|
+
width = 0
|
|
576
|
+
for e in self._elts:
|
|
577
|
+
estr = repr(e)
|
|
578
|
+
width = max(len(estr), width)
|
|
579
|
+
name_list.append(estr)
|
|
580
|
+
elif isinstance(names, list):
|
|
581
|
+
if len(names) != self._n:
|
|
582
|
+
raise ValueError('list of element names must be the same size as the set, %s != %s' % (
|
|
583
|
+
len(names), self._n))
|
|
584
|
+
width = 0
|
|
585
|
+
for name in names:
|
|
586
|
+
if not isinstance(name, str):
|
|
587
|
+
raise ValueError(
|
|
588
|
+
'list of element names must only contain strings, not %s' % name)
|
|
589
|
+
width = max(len(name), width)
|
|
590
|
+
name_list.append(name)
|
|
591
|
+
else:
|
|
592
|
+
raise ValueError(
|
|
593
|
+
"element names must be a list, or one of the keywords: 'letters', 'digits', 'elements'")
|
|
594
|
+
name_dict = {}
|
|
595
|
+
for i in range(self._n):
|
|
596
|
+
name_dict[name_list[i]] = self._elts[i]
|
|
597
|
+
return width, name_list, name_dict
|
|
598
|
+
|
|
599
|
+
def __getitem__(self, pair):
|
|
600
|
+
r"""
|
|
601
|
+
Return the element of the table, given the elements indexing its position.
|
|
602
|
+
|
|
603
|
+
INPUT:
|
|
604
|
+
|
|
605
|
+
- ``pair`` -- two elements of the structure
|
|
606
|
+
|
|
607
|
+
OUTPUT:
|
|
608
|
+
|
|
609
|
+
The element of the structure computed by the operation for
|
|
610
|
+
the two input elements (in the order provided).
|
|
611
|
+
|
|
612
|
+
This uses the table as a look-up device. If you want to use
|
|
613
|
+
the operation, then use the operation.
|
|
614
|
+
|
|
615
|
+
EXAMPLES::
|
|
616
|
+
|
|
617
|
+
sage: # needs sage.groups
|
|
618
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
619
|
+
sage: G = DiCyclicGroup(3)
|
|
620
|
+
sage: T = OperationTable(G, operator.mul)
|
|
621
|
+
sage: T.column_keys()
|
|
622
|
+
((), (5,6,7), ..., (1,4,2,3)(5,7))
|
|
623
|
+
sage: T[G('(1,2)(3,4)(5,6,7)'), G('(1,3,2,4)(5,7)')]
|
|
624
|
+
(1,4,2,3)(5,6)
|
|
625
|
+
|
|
626
|
+
TESTS::
|
|
627
|
+
|
|
628
|
+
sage: # needs sage.groups
|
|
629
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
630
|
+
sage: G = DiCyclicGroup(3)
|
|
631
|
+
sage: T = OperationTable(G, operator.mul)
|
|
632
|
+
sage: T[G('(1,2)(3,4)(5,6,7)')]
|
|
633
|
+
Traceback (most recent call last):
|
|
634
|
+
...
|
|
635
|
+
TypeError: indexing into an operation table requires exactly two elements
|
|
636
|
+
sage: T[G('(1,2)(3,4)(5,6,7)'), G('(1,3,2,4)(5,7)'), G('(1,3,2,4)(5,7)')]
|
|
637
|
+
Traceback (most recent call last):
|
|
638
|
+
...
|
|
639
|
+
TypeError: indexing into an operation table requires exactly two elements
|
|
640
|
+
sage: T[2, 3]
|
|
641
|
+
Traceback (most recent call last):
|
|
642
|
+
...
|
|
643
|
+
IndexError: invalid indices of operation table: (2, 3)
|
|
644
|
+
sage: T['(1,512)', '(1,3,2,4)(5,7)']
|
|
645
|
+
Traceback (most recent call last):
|
|
646
|
+
...
|
|
647
|
+
IndexError: invalid indices of operation table: ((1,512), (1,3,2,4)(5,7))
|
|
648
|
+
"""
|
|
649
|
+
if not (isinstance(pair, tuple) and len(pair) == 2):
|
|
650
|
+
raise TypeError(
|
|
651
|
+
'indexing into an operation table requires exactly two elements')
|
|
652
|
+
g, h = pair
|
|
653
|
+
try:
|
|
654
|
+
row = self._elts.index(g)
|
|
655
|
+
col = self._elts.index(h)
|
|
656
|
+
except ValueError:
|
|
657
|
+
raise IndexError(
|
|
658
|
+
'invalid indices of operation table: (%s, %s)' % (g, h))
|
|
659
|
+
return self._elts[self._table[row][col]]
|
|
660
|
+
|
|
661
|
+
def __eq__(self, other):
|
|
662
|
+
r"""
|
|
663
|
+
Return the comparison between two tables.
|
|
664
|
+
|
|
665
|
+
INPUT:
|
|
666
|
+
|
|
667
|
+
- ``other`` -- a second table to compare to ``self``
|
|
668
|
+
|
|
669
|
+
OUTPUT:
|
|
670
|
+
|
|
671
|
+
Tables are equal if they have the same operation and elements.
|
|
672
|
+
|
|
673
|
+
EXAMPLES::
|
|
674
|
+
|
|
675
|
+
sage: # needs sage.groups
|
|
676
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
677
|
+
sage: G = CyclicPermutationGroup(6)
|
|
678
|
+
sage: H = CyclicPermutationGroup(3)
|
|
679
|
+
sage: P = OperationTable(G, operator.mul)
|
|
680
|
+
sage: Q = OperationTable(G, operator.mul)
|
|
681
|
+
sage: R = OperationTable(H, operator.mul)
|
|
682
|
+
sage: S = OperationTable(G, operator.truediv)
|
|
683
|
+
sage: P == P, P == Q, P == R, P == S
|
|
684
|
+
(True, True, False, False)
|
|
685
|
+
"""
|
|
686
|
+
return (self._elts == other._elts) and (self._operation == other._operation)
|
|
687
|
+
|
|
688
|
+
def __ne__(self, other):
|
|
689
|
+
"""
|
|
690
|
+
Inequality test, by negation of :meth:`.__eq__`.
|
|
691
|
+
|
|
692
|
+
EXAMPLES::
|
|
693
|
+
|
|
694
|
+
sage: # needs sage.groups
|
|
695
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
696
|
+
sage: G = CyclicPermutationGroup(6)
|
|
697
|
+
sage: H = CyclicPermutationGroup(3)
|
|
698
|
+
sage: P = OperationTable(G, operator.mul)
|
|
699
|
+
sage: Q = OperationTable(G, operator.mul)
|
|
700
|
+
sage: R = OperationTable(H, operator.mul)
|
|
701
|
+
sage: S = OperationTable(G, operator.truediv)
|
|
702
|
+
sage: P != P, P != Q, P != R, P != S
|
|
703
|
+
(False, False, True, True)
|
|
704
|
+
"""
|
|
705
|
+
return not self == other
|
|
706
|
+
|
|
707
|
+
def _repr_(self):
|
|
708
|
+
r"""
|
|
709
|
+
Return a printable version of the operation table.
|
|
710
|
+
|
|
711
|
+
EXAMPLES::
|
|
712
|
+
|
|
713
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
714
|
+
sage: R = Integers(5)
|
|
715
|
+
sage: T = OperationTable(R, operation=operator.add)
|
|
716
|
+
sage: print(T._repr_())
|
|
717
|
+
+ a b c d e
|
|
718
|
+
+----------
|
|
719
|
+
a| a b c d e
|
|
720
|
+
b| b c d e a
|
|
721
|
+
c| c d e a b
|
|
722
|
+
d| d e a b c
|
|
723
|
+
e| e a b c d
|
|
724
|
+
"""
|
|
725
|
+
return self._ascii_table()
|
|
726
|
+
|
|
727
|
+
def set_print_symbols(self, ascii, latex):
|
|
728
|
+
r"""
|
|
729
|
+
Set the symbols used for text and LaTeX printing of operation tables.
|
|
730
|
+
|
|
731
|
+
INPUT:
|
|
732
|
+
|
|
733
|
+
- ``ascii`` -- a single character for text table
|
|
734
|
+
- ``latex`` -- string to represent an operation in LaTeX math mode;
|
|
735
|
+
note the need for double-backslashes to escape properly
|
|
736
|
+
|
|
737
|
+
EXAMPLES::
|
|
738
|
+
|
|
739
|
+
sage: # needs sage.groups
|
|
740
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
741
|
+
sage: G = AlternatingGroup(3)
|
|
742
|
+
sage: T = OperationTable(G, operator.mul)
|
|
743
|
+
sage: T.set_print_symbols('@', '\\times')
|
|
744
|
+
sage: T
|
|
745
|
+
@ a b c
|
|
746
|
+
+------
|
|
747
|
+
a| a b c
|
|
748
|
+
b| b c a
|
|
749
|
+
c| c a b
|
|
750
|
+
sage: T._latex_()
|
|
751
|
+
'{\\setlength{\\arraycolsep}{2ex}\n\\begin{array}{r|*{3}{r}}\n\\multicolumn{1}{c|}{\\times}&a&b&c\\\\\\hline\n{}a&a&b&c\\\\\n{}b&b&c&a\\\\\n{}c&c&a&b\\\\\n\\end{array}}'
|
|
752
|
+
|
|
753
|
+
TESTS::
|
|
754
|
+
|
|
755
|
+
sage: # needs sage.groups
|
|
756
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
757
|
+
sage: G = AlternatingGroup(3)
|
|
758
|
+
sage: T = OperationTable(G, operator.mul)
|
|
759
|
+
sage: T.set_print_symbols('@', 5)
|
|
760
|
+
Traceback (most recent call last):
|
|
761
|
+
...
|
|
762
|
+
ValueError: LaTeX symbol must be a string, not 5
|
|
763
|
+
sage: T.set_print_symbols('@x@', '\\times')
|
|
764
|
+
Traceback (most recent call last):
|
|
765
|
+
...
|
|
766
|
+
ValueError: ASCII symbol should be a single character, not @x@
|
|
767
|
+
sage: T.set_print_symbols(5, '\\times')
|
|
768
|
+
Traceback (most recent call last):
|
|
769
|
+
...
|
|
770
|
+
ValueError: ASCII symbol should be a single character, not 5
|
|
771
|
+
"""
|
|
772
|
+
if not isinstance(ascii, str) or not len(ascii) == 1:
|
|
773
|
+
raise ValueError(
|
|
774
|
+
'ASCII symbol should be a single character, not %s' % ascii)
|
|
775
|
+
if not isinstance(latex, str):
|
|
776
|
+
raise ValueError('LaTeX symbol must be a string, not %s' % latex)
|
|
777
|
+
self._ascii_symbol = ascii
|
|
778
|
+
self._latex_symbol = latex
|
|
779
|
+
|
|
780
|
+
def column_keys(self):
|
|
781
|
+
r"""
|
|
782
|
+
Return a tuple of the elements used to build the table.
|
|
783
|
+
|
|
784
|
+
.. NOTE:: ``column_keys`` and ``row_keys`` are identical.
|
|
785
|
+
Both list the elements in the order used to label the table.
|
|
786
|
+
|
|
787
|
+
OUTPUT:
|
|
788
|
+
|
|
789
|
+
The elements of the algebraic structure used to build
|
|
790
|
+
the table, as a list. But most importantly, elements are
|
|
791
|
+
present in the list in the order which they appear in
|
|
792
|
+
the table's column headings.
|
|
793
|
+
|
|
794
|
+
EXAMPLES::
|
|
795
|
+
|
|
796
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
797
|
+
sage: G = AlternatingGroup(3) # needs sage.groups
|
|
798
|
+
sage: T = OperationTable(G, operator.mul) # needs sage.groups
|
|
799
|
+
sage: T.column_keys() # needs sage.groups
|
|
800
|
+
((), (1,2,3), (1,3,2))
|
|
801
|
+
"""
|
|
802
|
+
return self._elts
|
|
803
|
+
|
|
804
|
+
# The ordered list of row and column elements are identical
|
|
805
|
+
# given the current design, so these methods are aliases. If
|
|
806
|
+
# expanded to allow different orderings (maybe interesting in
|
|
807
|
+
# non-commutative cases?), then these will need to be
|
|
808
|
+
# implemented separately.
|
|
809
|
+
row_keys = column_keys
|
|
810
|
+
|
|
811
|
+
def translation(self):
|
|
812
|
+
r"""
|
|
813
|
+
Return a dictionary associating names with elements.
|
|
814
|
+
|
|
815
|
+
OUTPUT:
|
|
816
|
+
|
|
817
|
+
A dictionary whose keys are strings used as names
|
|
818
|
+
for entries of the table and values that are the
|
|
819
|
+
actual elements of the algebraic structure.
|
|
820
|
+
|
|
821
|
+
EXAMPLES::
|
|
822
|
+
|
|
823
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
824
|
+
sage: G = AlternatingGroup(3) # needs sage.groups
|
|
825
|
+
sage: T = OperationTable(G, operator.mul, names=['p','q','r']) # needs sage.groups
|
|
826
|
+
sage: T.translation() # needs sage.groups
|
|
827
|
+
{'p': (), 'q': (1,2,3), 'r': (1,3,2)}
|
|
828
|
+
"""
|
|
829
|
+
return self._name_dict
|
|
830
|
+
|
|
831
|
+
def table(self):
|
|
832
|
+
r"""
|
|
833
|
+
Return the table as a list of lists,
|
|
834
|
+
using integers to reference the elements.
|
|
835
|
+
|
|
836
|
+
OUTPUT:
|
|
837
|
+
|
|
838
|
+
The rows of the table, as a list of rows, each row
|
|
839
|
+
being a list of integer entries. The integers correspond
|
|
840
|
+
to the order of the elements in the headings of the table
|
|
841
|
+
and the order of the output of the :meth:`list` method.
|
|
842
|
+
|
|
843
|
+
EXAMPLES::
|
|
844
|
+
|
|
845
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
846
|
+
sage: C = CyclicPermutationGroup(3) # needs sage.groups
|
|
847
|
+
sage: T=OperationTable(C, operator.mul) # needs sage.groups
|
|
848
|
+
sage: T.table() # needs sage.groups
|
|
849
|
+
[[0, 1, 2], [1, 2, 0], [2, 0, 1]]
|
|
850
|
+
"""
|
|
851
|
+
return self._table
|
|
852
|
+
|
|
853
|
+
def change_names(self, names):
|
|
854
|
+
r"""
|
|
855
|
+
For an existing operation table, change the names used for the elements.
|
|
856
|
+
|
|
857
|
+
INPUT:
|
|
858
|
+
|
|
859
|
+
- ``names`` -- the type of names used, values are:
|
|
860
|
+
|
|
861
|
+
* ``'letters'`` -- lowercase ASCII letters are used
|
|
862
|
+
for a base 26 representation of the elements'
|
|
863
|
+
positions in the list given by :meth:`list`,
|
|
864
|
+
padded to a common width with leading 'a's.
|
|
865
|
+
* ``'digits'`` -- base 10 representation of the
|
|
866
|
+
elements' positions in the list given by
|
|
867
|
+
:meth:`list`, padded to a common width
|
|
868
|
+
with leading zeros.
|
|
869
|
+
* ``'elements'`` -- the string representations
|
|
870
|
+
of the elements themselves.
|
|
871
|
+
* a list - a list of strings, where the length
|
|
872
|
+
of the list equals the number of elements.
|
|
873
|
+
|
|
874
|
+
OUTPUT:
|
|
875
|
+
``None``. This method changes the table "in-place",
|
|
876
|
+
so any printed version will change and the output of
|
|
877
|
+
the :meth:`dict` will also change. So any items of
|
|
878
|
+
interest about a particular table need to be copied/saved
|
|
879
|
+
prior to calling this method.
|
|
880
|
+
|
|
881
|
+
EXAMPLES:
|
|
882
|
+
|
|
883
|
+
More examples can be found in the documentation for
|
|
884
|
+
:class:`OperationTable` since creating a new
|
|
885
|
+
operation table uses the same routine. ::
|
|
886
|
+
|
|
887
|
+
sage: # needs sage.groups
|
|
888
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
889
|
+
sage: D = DihedralGroup(2)
|
|
890
|
+
sage: T = OperationTable(D, operator.mul)
|
|
891
|
+
sage: T
|
|
892
|
+
* a b c d
|
|
893
|
+
+--------
|
|
894
|
+
a| a b c d
|
|
895
|
+
b| b a d c
|
|
896
|
+
c| c d a b
|
|
897
|
+
d| d c b a
|
|
898
|
+
sage: T.translation()['c']
|
|
899
|
+
(1,2)
|
|
900
|
+
sage: T.change_names('digits')
|
|
901
|
+
sage: T
|
|
902
|
+
* 0 1 2 3
|
|
903
|
+
+--------
|
|
904
|
+
0| 0 1 2 3
|
|
905
|
+
1| 1 0 3 2
|
|
906
|
+
2| 2 3 0 1
|
|
907
|
+
3| 3 2 1 0
|
|
908
|
+
sage: T.translation()['2']
|
|
909
|
+
(1,2)
|
|
910
|
+
sage: T.change_names('elements')
|
|
911
|
+
sage: T
|
|
912
|
+
* () (3,4) (1,2) (1,2)(3,4)
|
|
913
|
+
+--------------------------------------------
|
|
914
|
+
()| () (3,4) (1,2) (1,2)(3,4)
|
|
915
|
+
(3,4)| (3,4) () (1,2)(3,4) (1,2)
|
|
916
|
+
(1,2)| (1,2) (1,2)(3,4) () (3,4)
|
|
917
|
+
(1,2)(3,4)| (1,2)(3,4) (1,2) (3,4) ()
|
|
918
|
+
sage: T.translation()['(1,2)']
|
|
919
|
+
(1,2)
|
|
920
|
+
sage: T.change_names(['w', 'x', 'y', 'z'])
|
|
921
|
+
sage: T
|
|
922
|
+
* w x y z
|
|
923
|
+
+--------
|
|
924
|
+
w| w x y z
|
|
925
|
+
x| x w z y
|
|
926
|
+
y| y z w x
|
|
927
|
+
z| z y x w
|
|
928
|
+
sage: T.translation()['y']
|
|
929
|
+
(1,2)
|
|
930
|
+
"""
|
|
931
|
+
self._width, self._names, self._name_dict = self._name_maker(names)
|
|
932
|
+
|
|
933
|
+
def matrix_of_variables(self):
|
|
934
|
+
r"""
|
|
935
|
+
This method provides some backward compatibility for
|
|
936
|
+
Cayley tables of groups, whose output was
|
|
937
|
+
restricted to this single format.
|
|
938
|
+
|
|
939
|
+
EXAMPLES:
|
|
940
|
+
|
|
941
|
+
The output here is from the doctests for the old
|
|
942
|
+
``cayley_table()`` method for permutation groups. ::
|
|
943
|
+
|
|
944
|
+
sage: # needs sage.groups
|
|
945
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
946
|
+
sage: G = PermutationGroup(['(1,2,3)', '(2,3)'])
|
|
947
|
+
sage: T = OperationTable(G, operator.mul)
|
|
948
|
+
sage: T.matrix_of_variables()
|
|
949
|
+
[x0 x1 x2 x3 x4 x5]
|
|
950
|
+
[x1 x0 x3 x2 x5 x4]
|
|
951
|
+
[x2 x4 x0 x5 x1 x3]
|
|
952
|
+
[x3 x5 x1 x4 x0 x2]
|
|
953
|
+
[x4 x2 x5 x0 x3 x1]
|
|
954
|
+
[x5 x3 x4 x1 x2 x0]
|
|
955
|
+
sage: T.column_keys()[2]*T.column_keys()[2] == T.column_keys()[0]
|
|
956
|
+
True
|
|
957
|
+
"""
|
|
958
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
959
|
+
from sage.matrix.matrix_space import MatrixSpace
|
|
960
|
+
from sage.rings.rational_field import QQ
|
|
961
|
+
R = PolynomialRing(QQ, 'x', self._n)
|
|
962
|
+
MS = MatrixSpace(R, self._n, self._n)
|
|
963
|
+
entries = [R('x'+str(self._table[i][j]))
|
|
964
|
+
for i in range(self._n) for j in range(self._n)]
|
|
965
|
+
return MS(entries)
|
|
966
|
+
|
|
967
|
+
def color_table(self, element_names=True, cmap=None, **options):
|
|
968
|
+
r"""
|
|
969
|
+
Return a graphic image as a square grid where entries are color coded.
|
|
970
|
+
|
|
971
|
+
INPUT:
|
|
972
|
+
|
|
973
|
+
- ``element_names`` -- (default: ``True``) whether to display text with
|
|
974
|
+
element names on the image
|
|
975
|
+
|
|
976
|
+
- ``cmap`` -- (default: :obj:`matplotlib.cm.gist_rainbow`) color map for plot, see :mod:`matplotlib.cm`
|
|
977
|
+
|
|
978
|
+
- ``**options`` -- passed on to :func:`~sage.plot.matrix_plot.matrix_plot`
|
|
979
|
+
|
|
980
|
+
EXAMPLES::
|
|
981
|
+
|
|
982
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
983
|
+
sage: OTa = OperationTable(SymmetricGroup(3), operation=operator.mul) # needs sage.groups
|
|
984
|
+
sage: OTa.color_table() # needs sage.groups sage.plot
|
|
985
|
+
Graphics object consisting of 37 graphics primitives
|
|
986
|
+
|
|
987
|
+
.. PLOT::
|
|
988
|
+
|
|
989
|
+
from sage.matrix.operation_table import OperationTable
|
|
990
|
+
OTa = OperationTable(SymmetricGroup(3), operation=operator.mul)
|
|
991
|
+
sphinx_plot(OTa.color_table(), figsize=(3.0, 3.0))
|
|
992
|
+
"""
|
|
993
|
+
from sage.plot.matrix_plot import matrix_plot
|
|
994
|
+
from sage.plot.text import text
|
|
995
|
+
|
|
996
|
+
if cmap is None:
|
|
997
|
+
from matplotlib.cm import gist_rainbow as cmap
|
|
998
|
+
|
|
999
|
+
# Base matrix plot object, without text
|
|
1000
|
+
plot = matrix_plot(Matrix(self._table), cmap=cmap,
|
|
1001
|
+
frame=False, **options)
|
|
1002
|
+
|
|
1003
|
+
if element_names:
|
|
1004
|
+
|
|
1005
|
+
# adapted from ._ascii_table()
|
|
1006
|
+
# prepare widenames[] list for labelling on image
|
|
1007
|
+
n = self._n
|
|
1008
|
+
width = self._width
|
|
1009
|
+
|
|
1010
|
+
widenames = []
|
|
1011
|
+
for name in self._names:
|
|
1012
|
+
widenames.append("{0: >{1}s}".format(name, width))
|
|
1013
|
+
|
|
1014
|
+
# iterate through each element
|
|
1015
|
+
for g in range(n):
|
|
1016
|
+
for h in range(n):
|
|
1017
|
+
# add text to the plot
|
|
1018
|
+
tPos = (h, g)
|
|
1019
|
+
tText = widenames[self._table[g][h]]
|
|
1020
|
+
t = text(tText, tPos, rgbcolor=(0, 0, 0))
|
|
1021
|
+
plot = plot + t
|
|
1022
|
+
|
|
1023
|
+
# https://moyix.blogspot.com/2022/09/someones-been-messing-with-my-subnormals.html
|
|
1024
|
+
import warnings
|
|
1025
|
+
warnings.filterwarnings("ignore", message="The value of the smallest subnormal for")
|
|
1026
|
+
|
|
1027
|
+
return plot
|
|
1028
|
+
|
|
1029
|
+
def gray_table(self, **options):
|
|
1030
|
+
r"""
|
|
1031
|
+
Return a graphic image as a square grid where entries are displayed in grayscale.
|
|
1032
|
+
|
|
1033
|
+
INPUT:
|
|
1034
|
+
|
|
1035
|
+
- ``element_names`` -- boolean (default: ``True``); whether to display
|
|
1036
|
+
text with element names on the image
|
|
1037
|
+
|
|
1038
|
+
- ``**options`` -- passed on to :func:`~sage.plot.matrix_plot.matrix_plot`
|
|
1039
|
+
|
|
1040
|
+
EXAMPLES::
|
|
1041
|
+
|
|
1042
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
1043
|
+
sage: OTa = OperationTable(SymmetricGroup(3), operation=operator.mul) # needs sage.groups
|
|
1044
|
+
sage: OTa.gray_table() # needs sage.groups sage.plot
|
|
1045
|
+
Graphics object consisting of 37 graphics primitives
|
|
1046
|
+
|
|
1047
|
+
.. PLOT::
|
|
1048
|
+
|
|
1049
|
+
from sage.matrix.operation_table import OperationTable
|
|
1050
|
+
OTa = OperationTable(SymmetricGroup(3), operation=operator.mul)
|
|
1051
|
+
sphinx_plot(OTa.gray_table(), figsize=(3.0, 3.0))
|
|
1052
|
+
"""
|
|
1053
|
+
from matplotlib.cm import Greys
|
|
1054
|
+
return self.color_table(cmap=Greys, **options)
|
|
1055
|
+
|
|
1056
|
+
def _ascii_table(self):
|
|
1057
|
+
r"""
|
|
1058
|
+
Return a string that is an ASCII version of the table.
|
|
1059
|
+
|
|
1060
|
+
EXAMPLES::
|
|
1061
|
+
|
|
1062
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
1063
|
+
sage: R = Integers(5)
|
|
1064
|
+
sage: T = OperationTable(R, operator.add)
|
|
1065
|
+
sage: print(T._ascii_table())
|
|
1066
|
+
+ a b c d e
|
|
1067
|
+
+----------
|
|
1068
|
+
a| a b c d e
|
|
1069
|
+
b| b c d e a
|
|
1070
|
+
c| c d e a b
|
|
1071
|
+
d| d e a b c
|
|
1072
|
+
e| e a b c d
|
|
1073
|
+
|
|
1074
|
+
The table should adjust its column width to accommodate the width of the
|
|
1075
|
+
strings used to represent elements. ::
|
|
1076
|
+
|
|
1077
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
1078
|
+
sage: R = Integers(10)
|
|
1079
|
+
sage: T = OperationTable(R, operator.mul, names='digits')
|
|
1080
|
+
sage: print(T._ascii_table())
|
|
1081
|
+
* 0 1 2 3 4 5 6 7 8 9
|
|
1082
|
+
+--------------------
|
|
1083
|
+
0| 0 0 0 0 0 0 0 0 0 0
|
|
1084
|
+
1| 0 1 2 3 4 5 6 7 8 9
|
|
1085
|
+
2| 0 2 4 6 8 0 2 4 6 8
|
|
1086
|
+
3| 0 3 6 9 2 5 8 1 4 7
|
|
1087
|
+
4| 0 4 8 2 6 0 4 8 2 6
|
|
1088
|
+
5| 0 5 0 5 0 5 0 5 0 5
|
|
1089
|
+
6| 0 6 2 8 4 0 6 2 8 4
|
|
1090
|
+
7| 0 7 4 1 8 5 2 9 6 3
|
|
1091
|
+
8| 0 8 6 4 2 0 8 6 4 2
|
|
1092
|
+
9| 0 9 8 7 6 5 4 3 2 1
|
|
1093
|
+
|
|
1094
|
+
::
|
|
1095
|
+
|
|
1096
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
1097
|
+
sage: R = Integers(11)
|
|
1098
|
+
sage: T = OperationTable(R, operator.mul, names='digits')
|
|
1099
|
+
sage: print(T._ascii_table())
|
|
1100
|
+
* 00 01 02 03 04 05 06 07 08 09 10
|
|
1101
|
+
+---------------------------------
|
|
1102
|
+
00| 00 00 00 00 00 00 00 00 00 00 00
|
|
1103
|
+
01| 00 01 02 03 04 05 06 07 08 09 10
|
|
1104
|
+
02| 00 02 04 06 08 10 01 03 05 07 09
|
|
1105
|
+
03| 00 03 06 09 01 04 07 10 02 05 08
|
|
1106
|
+
04| 00 04 08 01 05 09 02 06 10 03 07
|
|
1107
|
+
05| 00 05 10 04 09 03 08 02 07 01 06
|
|
1108
|
+
06| 00 06 01 07 02 08 03 09 04 10 05
|
|
1109
|
+
07| 00 07 03 10 06 02 09 05 01 08 04
|
|
1110
|
+
08| 00 08 05 02 10 07 04 01 09 06 03
|
|
1111
|
+
09| 00 09 07 05 03 01 10 08 06 04 02
|
|
1112
|
+
10| 00 10 09 08 07 06 05 04 03 02 01
|
|
1113
|
+
|
|
1114
|
+
::
|
|
1115
|
+
|
|
1116
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
1117
|
+
sage: R = Integers(4)
|
|
1118
|
+
sage: T = OperationTable(R, operator.mul, names=['x','y','wwww', 'z'])
|
|
1119
|
+
sage: print(T._ascii_table())
|
|
1120
|
+
* x y wwww z
|
|
1121
|
+
+--------------------
|
|
1122
|
+
x| x x x x
|
|
1123
|
+
y| x y wwww z
|
|
1124
|
+
wwww| x wwww x wwww
|
|
1125
|
+
z| x z wwww y
|
|
1126
|
+
"""
|
|
1127
|
+
n = self._n
|
|
1128
|
+
width = self._width
|
|
1129
|
+
|
|
1130
|
+
widenames = []
|
|
1131
|
+
for name in self._names:
|
|
1132
|
+
widenames.append('{0: >{1}s}'.format(name, width))
|
|
1133
|
+
|
|
1134
|
+
# Headers
|
|
1135
|
+
table = ['{0: >{1}s} '.format(self._ascii_symbol, width)]
|
|
1136
|
+
table += [' '+widenames[i] for i in range(n)]+['\n']
|
|
1137
|
+
table += [' ']*width + ['+'] + ['-']*(n*(width+1))+['\n']
|
|
1138
|
+
|
|
1139
|
+
# Row labels, body of table
|
|
1140
|
+
for g in range(n):
|
|
1141
|
+
table.append(widenames[g]+'|')
|
|
1142
|
+
for h in range(n):
|
|
1143
|
+
table.append(' '+widenames[self._table[g][h]])
|
|
1144
|
+
table.append('\n')
|
|
1145
|
+
return ''.join(table)
|
|
1146
|
+
|
|
1147
|
+
def _latex_(self):
|
|
1148
|
+
r"""
|
|
1149
|
+
Return a `LaTeX` version of the operation table as a string,
|
|
1150
|
+
using a `LaTeX` ``array`` environment.
|
|
1151
|
+
|
|
1152
|
+
EXAMPLES::
|
|
1153
|
+
|
|
1154
|
+
sage: from sage.matrix.operation_table import OperationTable
|
|
1155
|
+
sage: R = Integers(2)
|
|
1156
|
+
sage: T = OperationTable(R, operation=operator.mul)
|
|
1157
|
+
sage: T._latex_()
|
|
1158
|
+
'{\\setlength{\\arraycolsep}{2ex}\n\\begin{array}{r|*{2}{r}}\n\\multicolumn{1}{c|}{\\ast}&a&b\\\\\\hline\n{}a&a&a\\\\\n{}b&a&b\\\\\n\\end{array}}'
|
|
1159
|
+
"""
|
|
1160
|
+
n = self._n
|
|
1161
|
+
names = self._names
|
|
1162
|
+
|
|
1163
|
+
# Headers
|
|
1164
|
+
table = ['{\\setlength{\\arraycolsep}{2ex}\n']
|
|
1165
|
+
table.append('\\begin{array}{r|*{'+str(n)+'}{r}}\n')
|
|
1166
|
+
table.append('\\multicolumn{1}{c|}{'+self._latex_symbol+'}')
|
|
1167
|
+
table += ['&'+names[i] for i in range(n)]
|
|
1168
|
+
table.append('\\\\\\hline\n')
|
|
1169
|
+
|
|
1170
|
+
# Row label and body of table
|
|
1171
|
+
for g in range(n):
|
|
1172
|
+
# Interrupts newline and [], so not line spacing
|
|
1173
|
+
table.append('{}')
|
|
1174
|
+
table.append(names[g])
|
|
1175
|
+
for h in range(n):
|
|
1176
|
+
table.append('&'+names[self._table[g][h]])
|
|
1177
|
+
table.append('\\\\\n')
|
|
1178
|
+
|
|
1179
|
+
# Finish
|
|
1180
|
+
table.append('\\end{array}')
|
|
1181
|
+
table.append('}')
|
|
1182
|
+
return ''.join(table)
|