passagemath-modules 10.6.31rc3__cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-modules might be problematic. Click here for more details.
- passagemath_modules-10.6.31rc3.dist-info/METADATA +281 -0
- passagemath_modules-10.6.31rc3.dist-info/RECORD +807 -0
- passagemath_modules-10.6.31rc3.dist-info/WHEEL +6 -0
- passagemath_modules-10.6.31rc3.dist-info/top_level.txt +2 -0
- passagemath_modules.libs/libgfortran-83c28eba.so.5.0.0 +0 -0
- passagemath_modules.libs/libgmp-6e109695.so.10.5.0 +0 -0
- passagemath_modules.libs/libgsl-cda90e79.so.28.0.0 +0 -0
- passagemath_modules.libs/libmpc-7f678fcf.so.3.3.1 +0 -0
- passagemath_modules.libs/libmpfr-82690d50.so.6.2.1 +0 -0
- passagemath_modules.libs/libopenblasp-r0-6dcb67f9.3.29.so +0 -0
- passagemath_modules.libs/libquadmath-2284e583.so.0.0.0 +0 -0
- sage/algebras/all__sagemath_modules.py +20 -0
- sage/algebras/catalog.py +148 -0
- sage/algebras/clifford_algebra.py +3107 -0
- sage/algebras/clifford_algebra_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/clifford_algebra_element.pxd +16 -0
- sage/algebras/clifford_algebra_element.pyx +997 -0
- sage/algebras/commutative_dga.py +4252 -0
- sage/algebras/exterior_algebra_groebner.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/exterior_algebra_groebner.pxd +55 -0
- sage/algebras/exterior_algebra_groebner.pyx +727 -0
- sage/algebras/finite_dimensional_algebras/all.py +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +1029 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +12 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +706 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_ideal.py +196 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_morphism.py +255 -0
- sage/algebras/finite_gca.py +528 -0
- sage/algebras/group_algebra.py +232 -0
- sage/algebras/lie_algebras/abelian.py +197 -0
- sage/algebras/lie_algebras/affine_lie_algebra.py +1213 -0
- sage/algebras/lie_algebras/all.py +25 -0
- sage/algebras/lie_algebras/all__sagemath_modules.py +1 -0
- sage/algebras/lie_algebras/bch.py +177 -0
- sage/algebras/lie_algebras/bgg_dual_module.py +1184 -0
- sage/algebras/lie_algebras/bgg_resolution.py +232 -0
- sage/algebras/lie_algebras/center_uea.py +767 -0
- sage/algebras/lie_algebras/classical_lie_algebra.py +2516 -0
- sage/algebras/lie_algebras/examples.py +683 -0
- sage/algebras/lie_algebras/free_lie_algebra.py +973 -0
- sage/algebras/lie_algebras/heisenberg.py +820 -0
- sage/algebras/lie_algebras/lie_algebra.py +1562 -0
- sage/algebras/lie_algebras/lie_algebra_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/lie_algebras/lie_algebra_element.pxd +68 -0
- sage/algebras/lie_algebras/lie_algebra_element.pyx +2122 -0
- sage/algebras/lie_algebras/morphism.py +661 -0
- sage/algebras/lie_algebras/nilpotent_lie_algebra.py +457 -0
- sage/algebras/lie_algebras/onsager.py +1324 -0
- sage/algebras/lie_algebras/poincare_birkhoff_witt.py +816 -0
- sage/algebras/lie_algebras/quotient.py +462 -0
- sage/algebras/lie_algebras/rank_two_heisenberg_virasoro.py +355 -0
- sage/algebras/lie_algebras/representation.py +1040 -0
- sage/algebras/lie_algebras/structure_coefficients.py +459 -0
- sage/algebras/lie_algebras/subalgebra.py +967 -0
- sage/algebras/lie_algebras/symplectic_derivation.py +289 -0
- sage/algebras/lie_algebras/verma_module.py +1630 -0
- sage/algebras/lie_algebras/virasoro.py +1186 -0
- sage/algebras/octonion_algebra.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/octonion_algebra.pxd +20 -0
- sage/algebras/octonion_algebra.pyx +987 -0
- sage/algebras/orlik_solomon.py +907 -0
- sage/algebras/orlik_terao.py +779 -0
- sage/algebras/steenrod/all.py +7 -0
- sage/algebras/steenrod/steenrod_algebra.py +4258 -0
- sage/algebras/steenrod/steenrod_algebra_bases.py +1179 -0
- sage/algebras/steenrod/steenrod_algebra_misc.py +1167 -0
- sage/algebras/steenrod/steenrod_algebra_mult.py +954 -0
- sage/algebras/weyl_algebra.py +1126 -0
- sage/all__sagemath_modules.py +62 -0
- sage/calculus/all__sagemath_modules.py +19 -0
- sage/calculus/expr.py +205 -0
- sage/calculus/integration.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/calculus/integration.pyx +698 -0
- sage/calculus/interpolation.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/calculus/interpolation.pxd +13 -0
- sage/calculus/interpolation.pyx +387 -0
- sage/calculus/interpolators.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/calculus/interpolators.pyx +326 -0
- sage/calculus/ode.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/calculus/ode.pxd +5 -0
- sage/calculus/ode.pyx +610 -0
- sage/calculus/riemann.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/calculus/riemann.pyx +1521 -0
- sage/calculus/test_sympy.py +201 -0
- sage/calculus/transforms/all.py +7 -0
- sage/calculus/transforms/dft.py +844 -0
- sage/calculus/transforms/dwt.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/calculus/transforms/dwt.pxd +7 -0
- sage/calculus/transforms/dwt.pyx +160 -0
- sage/calculus/transforms/fft.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/calculus/transforms/fft.pxd +12 -0
- sage/calculus/transforms/fft.pyx +487 -0
- sage/calculus/wester.py +662 -0
- sage/coding/abstract_code.py +1108 -0
- sage/coding/ag_code.py +868 -0
- sage/coding/ag_code_decoders.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/coding/ag_code_decoders.pyx +2639 -0
- sage/coding/all.py +15 -0
- sage/coding/bch_code.py +494 -0
- sage/coding/binary_code.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/coding/binary_code.pxd +124 -0
- sage/coding/binary_code.pyx +4139 -0
- sage/coding/bounds_catalog.py +43 -0
- sage/coding/channel.py +819 -0
- sage/coding/channels_catalog.py +29 -0
- sage/coding/code_bounds.py +755 -0
- sage/coding/code_constructions.py +804 -0
- sage/coding/codes_catalog.py +111 -0
- sage/coding/cyclic_code.py +1329 -0
- sage/coding/databases.py +316 -0
- sage/coding/decoder.py +373 -0
- sage/coding/decoders_catalog.py +88 -0
- sage/coding/delsarte_bounds.py +709 -0
- sage/coding/encoder.py +390 -0
- sage/coding/encoders_catalog.py +64 -0
- sage/coding/extended_code.py +468 -0
- sage/coding/gabidulin_code.py +1058 -0
- sage/coding/golay_code.py +404 -0
- sage/coding/goppa_code.py +441 -0
- sage/coding/grs_code.py +2371 -0
- sage/coding/guava.py +107 -0
- sage/coding/guruswami_sudan/all.py +1 -0
- sage/coding/guruswami_sudan/gs_decoder.py +897 -0
- sage/coding/guruswami_sudan/interpolation.py +409 -0
- sage/coding/guruswami_sudan/utils.py +176 -0
- sage/coding/hamming_code.py +176 -0
- sage/coding/information_set_decoder.py +1032 -0
- sage/coding/kasami_codes.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/coding/kasami_codes.pyx +351 -0
- sage/coding/linear_code.py +3067 -0
- sage/coding/linear_code_no_metric.py +1354 -0
- sage/coding/linear_rank_metric.py +961 -0
- sage/coding/parity_check_code.py +353 -0
- sage/coding/punctured_code.py +719 -0
- sage/coding/reed_muller_code.py +999 -0
- sage/coding/self_dual_codes.py +942 -0
- sage/coding/source_coding/all.py +2 -0
- sage/coding/source_coding/huffman.py +553 -0
- sage/coding/subfield_subcode.py +423 -0
- sage/coding/two_weight_db.py +399 -0
- sage/combinat/all__sagemath_modules.py +7 -0
- sage/combinat/cartesian_product.py +347 -0
- sage/combinat/family.py +11 -0
- sage/combinat/free_module.py +1977 -0
- sage/combinat/root_system/all.py +147 -0
- sage/combinat/root_system/ambient_space.py +527 -0
- sage/combinat/root_system/associahedron.py +471 -0
- sage/combinat/root_system/braid_move_calculator.py +143 -0
- sage/combinat/root_system/braid_orbit.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/combinat/root_system/braid_orbit.pyx +144 -0
- sage/combinat/root_system/branching_rules.py +2301 -0
- sage/combinat/root_system/cartan_matrix.py +1245 -0
- sage/combinat/root_system/cartan_type.py +3069 -0
- sage/combinat/root_system/coxeter_group.py +162 -0
- sage/combinat/root_system/coxeter_matrix.py +1261 -0
- sage/combinat/root_system/coxeter_type.py +681 -0
- sage/combinat/root_system/dynkin_diagram.py +900 -0
- sage/combinat/root_system/extended_affine_weyl_group.py +2993 -0
- sage/combinat/root_system/fundamental_group.py +795 -0
- sage/combinat/root_system/hecke_algebra_representation.py +1203 -0
- sage/combinat/root_system/integrable_representations.py +1227 -0
- sage/combinat/root_system/non_symmetric_macdonald_polynomials.py +1965 -0
- sage/combinat/root_system/pieri_factors.py +1147 -0
- sage/combinat/root_system/plot.py +1615 -0
- sage/combinat/root_system/root_lattice_realization_algebras.py +1214 -0
- sage/combinat/root_system/root_lattice_realizations.py +4628 -0
- sage/combinat/root_system/root_space.py +487 -0
- sage/combinat/root_system/root_system.py +882 -0
- sage/combinat/root_system/type_A.py +348 -0
- sage/combinat/root_system/type_A_affine.py +227 -0
- sage/combinat/root_system/type_A_infinity.py +241 -0
- sage/combinat/root_system/type_B.py +347 -0
- sage/combinat/root_system/type_BC_affine.py +287 -0
- sage/combinat/root_system/type_B_affine.py +216 -0
- sage/combinat/root_system/type_C.py +317 -0
- sage/combinat/root_system/type_C_affine.py +188 -0
- sage/combinat/root_system/type_D.py +357 -0
- sage/combinat/root_system/type_D_affine.py +208 -0
- sage/combinat/root_system/type_E.py +641 -0
- sage/combinat/root_system/type_E_affine.py +231 -0
- sage/combinat/root_system/type_F.py +387 -0
- sage/combinat/root_system/type_F_affine.py +137 -0
- sage/combinat/root_system/type_G.py +293 -0
- sage/combinat/root_system/type_G_affine.py +132 -0
- sage/combinat/root_system/type_H.py +105 -0
- sage/combinat/root_system/type_I.py +110 -0
- sage/combinat/root_system/type_Q.py +150 -0
- sage/combinat/root_system/type_affine.py +509 -0
- sage/combinat/root_system/type_dual.py +704 -0
- sage/combinat/root_system/type_folded.py +301 -0
- sage/combinat/root_system/type_marked.py +748 -0
- sage/combinat/root_system/type_reducible.py +601 -0
- sage/combinat/root_system/type_relabel.py +730 -0
- sage/combinat/root_system/type_super_A.py +837 -0
- sage/combinat/root_system/weight_lattice_realizations.py +1188 -0
- sage/combinat/root_system/weight_space.py +639 -0
- sage/combinat/root_system/weyl_characters.py +2238 -0
- sage/crypto/__init__.py +4 -0
- sage/crypto/all.py +28 -0
- sage/crypto/block_cipher/all.py +7 -0
- sage/crypto/block_cipher/des.py +1065 -0
- sage/crypto/block_cipher/miniaes.py +2171 -0
- sage/crypto/block_cipher/present.py +909 -0
- sage/crypto/block_cipher/sdes.py +1527 -0
- sage/crypto/boolean_function.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/crypto/boolean_function.pxd +10 -0
- sage/crypto/boolean_function.pyx +1487 -0
- sage/crypto/cipher.py +78 -0
- sage/crypto/classical.py +3668 -0
- sage/crypto/classical_cipher.py +569 -0
- sage/crypto/cryptosystem.py +387 -0
- sage/crypto/key_exchange/all.py +7 -0
- sage/crypto/key_exchange/catalog.py +24 -0
- sage/crypto/key_exchange/diffie_hellman.py +323 -0
- sage/crypto/key_exchange/key_exchange_scheme.py +107 -0
- sage/crypto/lattice.py +312 -0
- sage/crypto/lfsr.py +295 -0
- sage/crypto/lwe.py +840 -0
- sage/crypto/mq/__init__.py +4 -0
- sage/crypto/mq/mpolynomialsystemgenerator.py +204 -0
- sage/crypto/mq/rijndael_gf.py +2345 -0
- sage/crypto/mq/sbox.py +7 -0
- sage/crypto/mq/sr.py +3344 -0
- sage/crypto/public_key/all.py +5 -0
- sage/crypto/public_key/blum_goldwasser.py +776 -0
- sage/crypto/sbox.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/crypto/sbox.pyx +2090 -0
- sage/crypto/sboxes.py +2090 -0
- sage/crypto/stream.py +390 -0
- sage/crypto/stream_cipher.py +297 -0
- sage/crypto/util.py +519 -0
- sage/ext/all__sagemath_modules.py +1 -0
- sage/ext/interpreters/__init__.py +1 -0
- sage/ext/interpreters/all__sagemath_modules.py +2 -0
- sage/ext/interpreters/wrapper_cc.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/ext/interpreters/wrapper_cc.pxd +30 -0
- sage/ext/interpreters/wrapper_cc.pyx +252 -0
- sage/ext/interpreters/wrapper_cdf.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/ext/interpreters/wrapper_cdf.pxd +26 -0
- sage/ext/interpreters/wrapper_cdf.pyx +245 -0
- sage/ext/interpreters/wrapper_rdf.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/ext/interpreters/wrapper_rdf.pxd +23 -0
- sage/ext/interpreters/wrapper_rdf.pyx +221 -0
- sage/ext/interpreters/wrapper_rr.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/ext/interpreters/wrapper_rr.pxd +28 -0
- sage/ext/interpreters/wrapper_rr.pyx +335 -0
- sage/geometry/all__sagemath_modules.py +5 -0
- sage/geometry/toric_lattice.py +1745 -0
- sage/geometry/toric_lattice_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/geometry/toric_lattice_element.pyx +432 -0
- sage/groups/abelian_gps/abelian_group.py +1925 -0
- sage/groups/abelian_gps/abelian_group_element.py +164 -0
- sage/groups/abelian_gps/all__sagemath_modules.py +5 -0
- sage/groups/abelian_gps/dual_abelian_group.py +421 -0
- sage/groups/abelian_gps/dual_abelian_group_element.py +179 -0
- sage/groups/abelian_gps/element_base.py +341 -0
- sage/groups/abelian_gps/values.py +488 -0
- sage/groups/additive_abelian/additive_abelian_group.py +476 -0
- sage/groups/additive_abelian/additive_abelian_wrapper.py +857 -0
- sage/groups/additive_abelian/all.py +4 -0
- sage/groups/additive_abelian/qmodnz.py +231 -0
- sage/groups/additive_abelian/qmodnz_element.py +349 -0
- sage/groups/affine_gps/affine_group.py +535 -0
- sage/groups/affine_gps/all.py +1 -0
- sage/groups/affine_gps/catalog.py +17 -0
- sage/groups/affine_gps/euclidean_group.py +246 -0
- sage/groups/affine_gps/group_element.py +562 -0
- sage/groups/all__sagemath_modules.py +12 -0
- sage/groups/galois_group.py +479 -0
- sage/groups/matrix_gps/all.py +4 -0
- sage/groups/matrix_gps/all__sagemath_modules.py +13 -0
- sage/groups/matrix_gps/catalog.py +26 -0
- sage/groups/matrix_gps/coxeter_group.py +927 -0
- sage/groups/matrix_gps/finitely_generated.py +487 -0
- sage/groups/matrix_gps/group_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/groups/matrix_gps/group_element.pxd +11 -0
- sage/groups/matrix_gps/group_element.pyx +431 -0
- sage/groups/matrix_gps/linear.py +440 -0
- sage/groups/matrix_gps/matrix_group.py +617 -0
- sage/groups/matrix_gps/named_group.py +296 -0
- sage/groups/matrix_gps/orthogonal.py +544 -0
- sage/groups/matrix_gps/symplectic.py +251 -0
- sage/groups/matrix_gps/unitary.py +436 -0
- sage/groups/misc_gps/all__sagemath_modules.py +1 -0
- sage/groups/misc_gps/argument_groups.py +1905 -0
- sage/groups/misc_gps/imaginary_groups.py +479 -0
- sage/groups/perm_gps/all__sagemath_modules.py +1 -0
- sage/groups/perm_gps/partn_ref/all__sagemath_modules.py +1 -0
- sage/groups/perm_gps/partn_ref/refinement_binary.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_binary.pxd +41 -0
- sage/groups/perm_gps/partn_ref/refinement_binary.pyx +1167 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.pxd +31 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.pyx +385 -0
- sage/homology/algebraic_topological_model.py +595 -0
- sage/homology/all.py +2 -0
- sage/homology/all__sagemath_modules.py +8 -0
- sage/homology/chain_complex.py +2148 -0
- sage/homology/chain_complex_homspace.py +165 -0
- sage/homology/chain_complex_morphism.py +629 -0
- sage/homology/chain_homotopy.py +604 -0
- sage/homology/chains.py +653 -0
- sage/homology/free_resolution.py +923 -0
- sage/homology/graded_resolution.py +567 -0
- sage/homology/hochschild_complex.py +756 -0
- sage/homology/homology_group.py +188 -0
- sage/homology/homology_morphism.py +422 -0
- sage/homology/homology_vector_space_with_basis.py +1454 -0
- sage/homology/koszul_complex.py +169 -0
- sage/homology/matrix_utils.py +205 -0
- sage/libs/all__sagemath_modules.py +1 -0
- sage/libs/gsl/__init__.py +1 -0
- sage/libs/gsl/airy.pxd +56 -0
- sage/libs/gsl/all.pxd +66 -0
- sage/libs/gsl/array.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/libs/gsl/array.pxd +5 -0
- sage/libs/gsl/array.pyx +102 -0
- sage/libs/gsl/bessel.pxd +208 -0
- sage/libs/gsl/blas.pxd +116 -0
- sage/libs/gsl/blas_types.pxd +34 -0
- sage/libs/gsl/block.pxd +52 -0
- sage/libs/gsl/chebyshev.pxd +37 -0
- sage/libs/gsl/clausen.pxd +12 -0
- sage/libs/gsl/combination.pxd +47 -0
- sage/libs/gsl/complex.pxd +151 -0
- sage/libs/gsl/coulomb.pxd +30 -0
- sage/libs/gsl/coupling.pxd +21 -0
- sage/libs/gsl/dawson.pxd +12 -0
- sage/libs/gsl/debye.pxd +24 -0
- sage/libs/gsl/dilog.pxd +14 -0
- sage/libs/gsl/eigen.pxd +46 -0
- sage/libs/gsl/elementary.pxd +12 -0
- sage/libs/gsl/ellint.pxd +48 -0
- sage/libs/gsl/elljac.pxd +8 -0
- sage/libs/gsl/erf.pxd +32 -0
- sage/libs/gsl/errno.pxd +26 -0
- sage/libs/gsl/exp.pxd +44 -0
- sage/libs/gsl/expint.pxd +44 -0
- sage/libs/gsl/fermi_dirac.pxd +44 -0
- sage/libs/gsl/fft.pxd +121 -0
- sage/libs/gsl/fit.pxd +50 -0
- sage/libs/gsl/gamma.pxd +94 -0
- sage/libs/gsl/gegenbauer.pxd +26 -0
- sage/libs/gsl/histogram.pxd +176 -0
- sage/libs/gsl/hyperg.pxd +52 -0
- sage/libs/gsl/integration.pxd +69 -0
- sage/libs/gsl/interp.pxd +109 -0
- sage/libs/gsl/laguerre.pxd +24 -0
- sage/libs/gsl/lambert.pxd +16 -0
- sage/libs/gsl/legendre.pxd +90 -0
- sage/libs/gsl/linalg.pxd +185 -0
- sage/libs/gsl/log.pxd +26 -0
- sage/libs/gsl/math.pxd +43 -0
- sage/libs/gsl/matrix.pxd +143 -0
- sage/libs/gsl/matrix_complex.pxd +130 -0
- sage/libs/gsl/min.pxd +67 -0
- sage/libs/gsl/monte.pxd +56 -0
- sage/libs/gsl/ntuple.pxd +32 -0
- sage/libs/gsl/odeiv.pxd +70 -0
- sage/libs/gsl/permutation.pxd +78 -0
- sage/libs/gsl/poly.pxd +40 -0
- sage/libs/gsl/pow_int.pxd +12 -0
- sage/libs/gsl/psi.pxd +28 -0
- sage/libs/gsl/qrng.pxd +29 -0
- sage/libs/gsl/random.pxd +257 -0
- sage/libs/gsl/rng.pxd +100 -0
- sage/libs/gsl/roots.pxd +72 -0
- sage/libs/gsl/sort.pxd +36 -0
- sage/libs/gsl/statistics.pxd +59 -0
- sage/libs/gsl/sum.pxd +55 -0
- sage/libs/gsl/synchrotron.pxd +16 -0
- sage/libs/gsl/transport.pxd +24 -0
- sage/libs/gsl/trig.pxd +58 -0
- sage/libs/gsl/types.pxd +137 -0
- sage/libs/gsl/vector.pxd +101 -0
- sage/libs/gsl/vector_complex.pxd +83 -0
- sage/libs/gsl/wavelet.pxd +49 -0
- sage/libs/gsl/zeta.pxd +28 -0
- sage/libs/mpc/__init__.pxd +114 -0
- sage/libs/mpc/types.pxd +28 -0
- sage/libs/mpfr/__init__.pxd +299 -0
- sage/libs/mpfr/types.pxd +26 -0
- sage/libs/mpmath/__init__.py +1 -0
- sage/libs/mpmath/all.py +27 -0
- sage/libs/mpmath/all__sagemath_modules.py +1 -0
- sage/libs/mpmath/utils.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/libs/mpmath/utils.pxd +4 -0
- sage/libs/mpmath/utils.pyx +319 -0
- sage/matrix/action.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/action.pxd +26 -0
- sage/matrix/action.pyx +596 -0
- sage/matrix/all.py +9 -0
- sage/matrix/args.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/args.pxd +144 -0
- sage/matrix/args.pyx +1668 -0
- sage/matrix/benchmark.py +1258 -0
- sage/matrix/berlekamp_massey.py +95 -0
- sage/matrix/compute_J_ideal.py +926 -0
- sage/matrix/constructor.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/constructor.pyx +750 -0
- sage/matrix/docs.py +430 -0
- sage/matrix/echelon_matrix.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/echelon_matrix.pyx +155 -0
- sage/matrix/matrix.pxd +2 -0
- sage/matrix/matrix0.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix0.pxd +68 -0
- sage/matrix/matrix0.pyx +6324 -0
- sage/matrix/matrix1.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix1.pxd +8 -0
- sage/matrix/matrix1.pyx +2851 -0
- sage/matrix/matrix2.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix2.pxd +25 -0
- sage/matrix/matrix2.pyx +20181 -0
- sage/matrix/matrix_cdv.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_cdv.pxd +4 -0
- sage/matrix/matrix_cdv.pyx +93 -0
- sage/matrix/matrix_complex_double_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_complex_double_dense.pxd +5 -0
- sage/matrix/matrix_complex_double_dense.pyx +98 -0
- sage/matrix/matrix_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_dense.pxd +5 -0
- sage/matrix/matrix_dense.pyx +343 -0
- sage/matrix/matrix_domain_dense.pxd +5 -0
- sage/matrix/matrix_domain_sparse.pxd +5 -0
- sage/matrix/matrix_double_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_double_dense.pxd +7 -0
- sage/matrix/matrix_double_dense.pyx +3906 -0
- sage/matrix/matrix_double_sparse.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_double_sparse.pxd +6 -0
- sage/matrix/matrix_double_sparse.pyx +248 -0
- sage/matrix/matrix_generic_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_generic_dense.pxd +7 -0
- sage/matrix/matrix_generic_dense.pyx +354 -0
- sage/matrix/matrix_generic_sparse.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_generic_sparse.pxd +7 -0
- sage/matrix/matrix_generic_sparse.pyx +461 -0
- sage/matrix/matrix_laurent_mpolynomial_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_laurent_mpolynomial_dense.pxd +5 -0
- sage/matrix/matrix_laurent_mpolynomial_dense.pyx +115 -0
- sage/matrix/matrix_misc.py +313 -0
- sage/matrix/matrix_numpy_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_numpy_dense.pxd +14 -0
- sage/matrix/matrix_numpy_dense.pyx +450 -0
- sage/matrix/matrix_numpy_integer_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_numpy_integer_dense.pxd +7 -0
- sage/matrix/matrix_numpy_integer_dense.pyx +59 -0
- sage/matrix/matrix_polynomial_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_polynomial_dense.pxd +5 -0
- sage/matrix/matrix_polynomial_dense.pyx +5341 -0
- sage/matrix/matrix_real_double_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_real_double_dense.pxd +7 -0
- sage/matrix/matrix_real_double_dense.pyx +122 -0
- sage/matrix/matrix_space.py +2848 -0
- sage/matrix/matrix_sparse.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_sparse.pxd +5 -0
- sage/matrix/matrix_sparse.pyx +1222 -0
- sage/matrix/matrix_window.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_window.pxd +37 -0
- sage/matrix/matrix_window.pyx +242 -0
- sage/matrix/misc_mpfr.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/misc_mpfr.pyx +80 -0
- sage/matrix/operation_table.py +1182 -0
- sage/matrix/special.py +3666 -0
- sage/matrix/strassen.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/strassen.pyx +851 -0
- sage/matrix/symplectic_basis.py +541 -0
- sage/matrix/template.pxd +6 -0
- sage/matrix/tests.py +71 -0
- sage/matroids/advanced.py +77 -0
- sage/matroids/all.py +13 -0
- sage/matroids/basis_exchange_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/basis_exchange_matroid.pxd +96 -0
- sage/matroids/basis_exchange_matroid.pyx +2344 -0
- sage/matroids/basis_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/basis_matroid.pxd +45 -0
- sage/matroids/basis_matroid.pyx +1217 -0
- sage/matroids/catalog.py +44 -0
- sage/matroids/chow_ring.py +473 -0
- sage/matroids/chow_ring_ideal.py +849 -0
- sage/matroids/circuit_closures_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/circuit_closures_matroid.pxd +16 -0
- sage/matroids/circuit_closures_matroid.pyx +559 -0
- sage/matroids/circuits_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/circuits_matroid.pxd +38 -0
- sage/matroids/circuits_matroid.pyx +947 -0
- sage/matroids/constructor.py +1086 -0
- sage/matroids/database_collections.py +365 -0
- sage/matroids/database_matroids.py +5338 -0
- sage/matroids/dual_matroid.py +583 -0
- sage/matroids/extension.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/extension.pxd +34 -0
- sage/matroids/extension.pyx +519 -0
- sage/matroids/flats_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/flats_matroid.pxd +28 -0
- sage/matroids/flats_matroid.pyx +715 -0
- sage/matroids/gammoid.py +600 -0
- sage/matroids/graphic_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/graphic_matroid.pxd +39 -0
- sage/matroids/graphic_matroid.pyx +2024 -0
- sage/matroids/lean_matrix.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/lean_matrix.pxd +126 -0
- sage/matroids/lean_matrix.pyx +3667 -0
- sage/matroids/linear_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/linear_matroid.pxd +180 -0
- sage/matroids/linear_matroid.pyx +6649 -0
- sage/matroids/matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/matroid.pxd +243 -0
- sage/matroids/matroid.pyx +8759 -0
- sage/matroids/matroids_catalog.py +190 -0
- sage/matroids/matroids_plot_helpers.py +890 -0
- sage/matroids/minor_matroid.py +480 -0
- sage/matroids/minorfix.h +9 -0
- sage/matroids/named_matroids.py +5 -0
- sage/matroids/rank_matroid.py +268 -0
- sage/matroids/set_system.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/set_system.pxd +38 -0
- sage/matroids/set_system.pyx +800 -0
- sage/matroids/transversal_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/transversal_matroid.pxd +14 -0
- sage/matroids/transversal_matroid.pyx +893 -0
- sage/matroids/union_matroid.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/union_matroid.pxd +20 -0
- sage/matroids/union_matroid.pyx +331 -0
- sage/matroids/unpickling.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matroids/unpickling.pyx +843 -0
- sage/matroids/utilities.py +809 -0
- sage/misc/all__sagemath_modules.py +20 -0
- sage/misc/c3.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/misc/c3.pyx +238 -0
- sage/misc/compat.py +87 -0
- sage/misc/element_with_label.py +173 -0
- sage/misc/func_persist.py +79 -0
- sage/misc/pickle_old.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/misc/pickle_old.pyx +19 -0
- sage/misc/proof.py +7 -0
- sage/misc/replace_dot_all.py +472 -0
- sage/misc/sagedoc_conf.py +168 -0
- sage/misc/sphinxify.py +167 -0
- sage/misc/test_class_pickling.py +85 -0
- sage/modules/all.py +42 -0
- sage/modules/complex_double_vector.py +25 -0
- sage/modules/diamond_cutting.py +380 -0
- sage/modules/fg_pid/all.py +1 -0
- sage/modules/fg_pid/fgp_element.py +456 -0
- sage/modules/fg_pid/fgp_module.py +2091 -0
- sage/modules/fg_pid/fgp_morphism.py +550 -0
- sage/modules/filtered_vector_space.py +1271 -0
- sage/modules/finite_submodule_iter.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/finite_submodule_iter.pxd +27 -0
- sage/modules/finite_submodule_iter.pyx +452 -0
- sage/modules/fp_graded/all.py +1 -0
- sage/modules/fp_graded/element.py +346 -0
- sage/modules/fp_graded/free_element.py +298 -0
- sage/modules/fp_graded/free_homspace.py +53 -0
- sage/modules/fp_graded/free_module.py +1060 -0
- sage/modules/fp_graded/free_morphism.py +217 -0
- sage/modules/fp_graded/homspace.py +563 -0
- sage/modules/fp_graded/module.py +1340 -0
- sage/modules/fp_graded/morphism.py +1990 -0
- sage/modules/fp_graded/steenrod/all.py +1 -0
- sage/modules/fp_graded/steenrod/homspace.py +65 -0
- sage/modules/fp_graded/steenrod/module.py +477 -0
- sage/modules/fp_graded/steenrod/morphism.py +404 -0
- sage/modules/fp_graded/steenrod/profile.py +241 -0
- sage/modules/free_module.py +8447 -0
- sage/modules/free_module_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/free_module_element.pxd +22 -0
- sage/modules/free_module_element.pyx +5445 -0
- sage/modules/free_module_homspace.py +369 -0
- sage/modules/free_module_integer.py +896 -0
- sage/modules/free_module_morphism.py +823 -0
- sage/modules/free_module_pseudohomspace.py +352 -0
- sage/modules/free_module_pseudomorphism.py +578 -0
- sage/modules/free_quadratic_module.py +1706 -0
- sage/modules/free_quadratic_module_integer_symmetric.py +1790 -0
- sage/modules/matrix_morphism.py +1745 -0
- sage/modules/misc.py +103 -0
- sage/modules/module_functors.py +192 -0
- sage/modules/multi_filtered_vector_space.py +719 -0
- sage/modules/ore_module.py +2208 -0
- sage/modules/ore_module_element.py +178 -0
- sage/modules/ore_module_homspace.py +147 -0
- sage/modules/ore_module_morphism.py +968 -0
- sage/modules/quotient_module.py +699 -0
- sage/modules/real_double_vector.py +22 -0
- sage/modules/submodule.py +255 -0
- sage/modules/tensor_operations.py +567 -0
- sage/modules/torsion_quadratic_module.py +1352 -0
- sage/modules/tutorial_free_modules.py +248 -0
- sage/modules/vector_complex_double_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_complex_double_dense.pxd +6 -0
- sage/modules/vector_complex_double_dense.pyx +117 -0
- sage/modules/vector_double_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_double_dense.pxd +6 -0
- sage/modules/vector_double_dense.pyx +604 -0
- sage/modules/vector_integer_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_integer_dense.pxd +15 -0
- sage/modules/vector_integer_dense.pyx +361 -0
- sage/modules/vector_integer_sparse.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_integer_sparse.pxd +29 -0
- sage/modules/vector_integer_sparse.pyx +406 -0
- sage/modules/vector_modn_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_modn_dense.pxd +12 -0
- sage/modules/vector_modn_dense.pyx +394 -0
- sage/modules/vector_modn_sparse.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_modn_sparse.pxd +21 -0
- sage/modules/vector_modn_sparse.pyx +298 -0
- sage/modules/vector_numpy_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_numpy_dense.pxd +15 -0
- sage/modules/vector_numpy_dense.pyx +304 -0
- sage/modules/vector_numpy_integer_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_numpy_integer_dense.pxd +7 -0
- sage/modules/vector_numpy_integer_dense.pyx +54 -0
- sage/modules/vector_rational_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_rational_dense.pxd +15 -0
- sage/modules/vector_rational_dense.pyx +387 -0
- sage/modules/vector_rational_sparse.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_rational_sparse.pxd +30 -0
- sage/modules/vector_rational_sparse.pyx +413 -0
- sage/modules/vector_real_double_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/vector_real_double_dense.pxd +6 -0
- sage/modules/vector_real_double_dense.pyx +126 -0
- sage/modules/vector_space_homspace.py +430 -0
- sage/modules/vector_space_morphism.py +989 -0
- sage/modules/with_basis/all.py +15 -0
- sage/modules/with_basis/cell_module.py +494 -0
- sage/modules/with_basis/indexed_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/modules/with_basis/indexed_element.pxd +13 -0
- sage/modules/with_basis/indexed_element.pyx +1058 -0
- sage/modules/with_basis/invariant.py +1075 -0
- sage/modules/with_basis/morphism.py +1636 -0
- sage/modules/with_basis/representation.py +2939 -0
- sage/modules/with_basis/subquotient.py +685 -0
- sage/numerical/all__sagemath_modules.py +6 -0
- sage/numerical/gauss_legendre.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/numerical/gauss_legendre.pyx +381 -0
- sage/numerical/optimize.py +910 -0
- sage/probability/all.py +10 -0
- sage/probability/probability_distribution.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/probability/probability_distribution.pyx +1242 -0
- sage/probability/random_variable.py +411 -0
- sage/quadratic_forms/all.py +4 -0
- sage/quadratic_forms/all__sagemath_modules.py +15 -0
- sage/quadratic_forms/binary_qf.py +2042 -0
- sage/quadratic_forms/bqf_class_group.py +748 -0
- sage/quadratic_forms/constructions.py +93 -0
- sage/quadratic_forms/count_local_2.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/quadratic_forms/count_local_2.pyx +365 -0
- sage/quadratic_forms/extras.py +195 -0
- sage/quadratic_forms/quadratic_form.py +1753 -0
- sage/quadratic_forms/quadratic_form__count_local_2.py +221 -0
- sage/quadratic_forms/quadratic_form__equivalence_testing.py +708 -0
- sage/quadratic_forms/quadratic_form__evaluate.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/quadratic_forms/quadratic_form__evaluate.pyx +139 -0
- sage/quadratic_forms/quadratic_form__local_density_congruence.py +977 -0
- sage/quadratic_forms/quadratic_form__local_field_invariants.py +1072 -0
- sage/quadratic_forms/quadratic_form__neighbors.py +424 -0
- sage/quadratic_forms/quadratic_form__reduction_theory.py +488 -0
- sage/quadratic_forms/quadratic_form__split_local_covering.py +416 -0
- sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +657 -0
- sage/quadratic_forms/quadratic_form__theta.py +352 -0
- sage/quadratic_forms/quadratic_form__variable_substitutions.py +370 -0
- sage/quadratic_forms/random_quadraticform.py +209 -0
- sage/quadratic_forms/ternary.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/quadratic_forms/ternary.pyx +1154 -0
- sage/quadratic_forms/ternary_qf.py +2027 -0
- sage/rings/all__sagemath_modules.py +28 -0
- sage/rings/asymptotic/all__sagemath_modules.py +1 -0
- sage/rings/asymptotic/misc.py +1252 -0
- sage/rings/cc.py +4 -0
- sage/rings/cfinite_sequence.py +1306 -0
- sage/rings/complex_conversion.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/complex_conversion.pxd +8 -0
- sage/rings/complex_conversion.pyx +23 -0
- sage/rings/complex_double.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/complex_double.pxd +21 -0
- sage/rings/complex_double.pyx +2654 -0
- sage/rings/complex_mpc.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/complex_mpc.pxd +21 -0
- sage/rings/complex_mpc.pyx +2576 -0
- sage/rings/complex_mpfr.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/complex_mpfr.pxd +18 -0
- sage/rings/complex_mpfr.pyx +3602 -0
- sage/rings/derivation.py +2334 -0
- sage/rings/finite_rings/all__sagemath_modules.py +1 -0
- sage/rings/finite_rings/maps_finite_field.py +191 -0
- sage/rings/function_field/all__sagemath_modules.py +8 -0
- sage/rings/function_field/derivations.py +102 -0
- sage/rings/function_field/derivations_rational.py +132 -0
- sage/rings/function_field/differential.py +853 -0
- sage/rings/function_field/divisor.py +1107 -0
- sage/rings/function_field/drinfeld_modules/action.py +199 -0
- sage/rings/function_field/drinfeld_modules/all.py +1 -0
- sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +673 -0
- sage/rings/function_field/drinfeld_modules/drinfeld_module.py +2087 -0
- sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1131 -0
- sage/rings/function_field/drinfeld_modules/homset.py +420 -0
- sage/rings/function_field/drinfeld_modules/morphism.py +820 -0
- sage/rings/function_field/hermite_form_polynomial.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/function_field/hermite_form_polynomial.pyx +188 -0
- sage/rings/function_field/khuri_makdisi.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/function_field/khuri_makdisi.pyx +935 -0
- sage/rings/invariants/all.py +4 -0
- sage/rings/invariants/invariant_theory.py +4597 -0
- sage/rings/invariants/reconstruction.py +395 -0
- sage/rings/polynomial/all__sagemath_modules.py +17 -0
- sage/rings/polynomial/integer_valued_polynomials.py +1230 -0
- sage/rings/polynomial/laurent_polynomial_mpair.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/laurent_polynomial_mpair.pxd +15 -0
- sage/rings/polynomial/laurent_polynomial_mpair.pyx +2023 -0
- sage/rings/polynomial/ore_function_element.py +952 -0
- sage/rings/polynomial/ore_function_field.py +1028 -0
- sage/rings/polynomial/ore_polynomial_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/ore_polynomial_element.pxd +48 -0
- sage/rings/polynomial/ore_polynomial_element.pyx +3145 -0
- sage/rings/polynomial/ore_polynomial_ring.py +1334 -0
- sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/polynomial_real_mpfr_dense.pyx +788 -0
- sage/rings/polynomial/q_integer_valued_polynomials.py +1264 -0
- sage/rings/polynomial/skew_polynomial_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/skew_polynomial_element.pxd +9 -0
- sage/rings/polynomial/skew_polynomial_element.pyx +684 -0
- sage/rings/polynomial/skew_polynomial_finite_field.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.pxd +19 -0
- sage/rings/polynomial/skew_polynomial_finite_field.pyx +1093 -0
- sage/rings/polynomial/skew_polynomial_finite_order.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_order.pxd +10 -0
- sage/rings/polynomial/skew_polynomial_finite_order.pyx +567 -0
- sage/rings/polynomial/skew_polynomial_ring.py +908 -0
- sage/rings/real_double_element_gsl.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/real_double_element_gsl.pxd +8 -0
- sage/rings/real_double_element_gsl.pyx +794 -0
- sage/rings/real_field.py +58 -0
- sage/rings/real_mpfr.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/real_mpfr.pxd +29 -0
- sage/rings/real_mpfr.pyx +6122 -0
- sage/rings/ring_extension.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/ring_extension.pxd +42 -0
- sage/rings/ring_extension.pyx +2779 -0
- sage/rings/ring_extension_conversion.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/ring_extension_conversion.pxd +16 -0
- sage/rings/ring_extension_conversion.pyx +462 -0
- sage/rings/ring_extension_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/ring_extension_element.pxd +21 -0
- sage/rings/ring_extension_element.pyx +1635 -0
- sage/rings/ring_extension_homset.py +64 -0
- sage/rings/ring_extension_morphism.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/ring_extension_morphism.pxd +35 -0
- sage/rings/ring_extension_morphism.pyx +920 -0
- sage/schemes/all__sagemath_modules.py +1 -0
- sage/schemes/projective/all__sagemath_modules.py +1 -0
- sage/schemes/projective/coherent_sheaf.py +300 -0
- sage/schemes/projective/cohomology.py +510 -0
- sage/stats/all.py +15 -0
- sage/stats/basic_stats.py +489 -0
- sage/stats/distributions/all.py +7 -0
- sage/stats/distributions/catalog.py +34 -0
- sage/stats/distributions/dgs.h +50 -0
- sage/stats/distributions/dgs.pxd +111 -0
- sage/stats/distributions/dgs_bern.h +400 -0
- sage/stats/distributions/dgs_gauss.h +614 -0
- sage/stats/distributions/dgs_misc.h +104 -0
- sage/stats/distributions/discrete_gaussian_integer.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/stats/distributions/discrete_gaussian_integer.pxd +14 -0
- sage/stats/distributions/discrete_gaussian_integer.pyx +498 -0
- sage/stats/distributions/discrete_gaussian_lattice.py +908 -0
- sage/stats/distributions/discrete_gaussian_polynomial.py +141 -0
- sage/stats/hmm/all.py +15 -0
- sage/stats/hmm/chmm.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/stats/hmm/chmm.pyx +1595 -0
- sage/stats/hmm/distributions.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/stats/hmm/distributions.pxd +29 -0
- sage/stats/hmm/distributions.pyx +531 -0
- sage/stats/hmm/hmm.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/stats/hmm/hmm.pxd +17 -0
- sage/stats/hmm/hmm.pyx +1388 -0
- sage/stats/hmm/util.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/stats/hmm/util.pxd +7 -0
- sage/stats/hmm/util.pyx +165 -0
- sage/stats/intlist.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/stats/intlist.pxd +14 -0
- sage/stats/intlist.pyx +588 -0
- sage/stats/r.py +49 -0
- sage/stats/time_series.cpython-314-x86_64-linux-gnu.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,1334 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-modules
|
|
2
|
+
# sage.doctest: needs sage.combinat
|
|
3
|
+
r"""
|
|
4
|
+
Univariate Ore polynomial rings
|
|
5
|
+
|
|
6
|
+
This module provides the
|
|
7
|
+
:class:`~sage.rings.polynomial.ore_polynomial_ring.OrePolynomialRing`,
|
|
8
|
+
which constructs a general dense univariate Ore polynomial ring over a
|
|
9
|
+
commutative base with equipped with an endomorphism and/or a derivation.
|
|
10
|
+
|
|
11
|
+
TESTS:
|
|
12
|
+
|
|
13
|
+
The Ore polynomial ring is commutative if the twisting morphism is the
|
|
14
|
+
identity and the twisting derivation vanishes. ::
|
|
15
|
+
|
|
16
|
+
sage: # needs sage.rings.finite_rings
|
|
17
|
+
sage: k.<a> = GF(5^3)
|
|
18
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
19
|
+
sage: S.<x> = k['x', Frob]
|
|
20
|
+
sage: S.is_commutative()
|
|
21
|
+
False
|
|
22
|
+
sage: T.<y> = k['y', Frob^3]
|
|
23
|
+
sage: T.is_commutative()
|
|
24
|
+
True
|
|
25
|
+
|
|
26
|
+
sage: R.<t> = GF(5)[]
|
|
27
|
+
sage: der = R.derivation()
|
|
28
|
+
sage: A.<d> = R['d', der]
|
|
29
|
+
sage: A.is_commutative()
|
|
30
|
+
False
|
|
31
|
+
sage: B.<b> = R['b', 5*der]
|
|
32
|
+
sage: B.is_commutative()
|
|
33
|
+
True
|
|
34
|
+
|
|
35
|
+
AUTHOR:
|
|
36
|
+
|
|
37
|
+
- Xavier Caruso (2020-04)
|
|
38
|
+
"""
|
|
39
|
+
# ***************************************************************************
|
|
40
|
+
# Copyright (C) 2020 Xavier Caruso <xavier.caruso@normalesup.org>
|
|
41
|
+
#
|
|
42
|
+
# This program is free software: you can redistribute it and/or modify
|
|
43
|
+
# it under the terms of the GNU General Public License as published by
|
|
44
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
45
|
+
# (at your option) any later version.
|
|
46
|
+
# https://www.gnu.org/licenses/
|
|
47
|
+
# ***************************************************************************
|
|
48
|
+
|
|
49
|
+
import operator
|
|
50
|
+
from sage.categories.algebras import Algebras
|
|
51
|
+
from sage.categories.commutative_rings import CommutativeRings
|
|
52
|
+
from sage.categories.morphism import Morphism
|
|
53
|
+
from sage.misc.cachefunc import cached_method
|
|
54
|
+
from sage.misc.lazy_import import lazy_import
|
|
55
|
+
from sage.misc.prandom import randint
|
|
56
|
+
from sage.rings.infinity import Infinity
|
|
57
|
+
from sage.rings.integer import Integer
|
|
58
|
+
from sage.rings.polynomial.ore_polynomial_element import OrePolynomialBaseringInjection
|
|
59
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
60
|
+
from sage.rings.ring import _Fields
|
|
61
|
+
from sage.structure.category_object import normalize_names
|
|
62
|
+
from sage.structure.element import Element
|
|
63
|
+
from sage.structure.parent import Parent
|
|
64
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
65
|
+
|
|
66
|
+
lazy_import('sage.rings.derivation', 'RingDerivation')
|
|
67
|
+
|
|
68
|
+
WORKING_CENTER_MAX_TRIES = 1000
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Generic implementation of Ore polynomial rings
|
|
72
|
+
#################################################
|
|
73
|
+
|
|
74
|
+
class OrePolynomialRing(UniqueRepresentation, Parent):
|
|
75
|
+
r"""
|
|
76
|
+
Construct and return the globally unique Ore polynomial ring with the
|
|
77
|
+
given properties and variable names.
|
|
78
|
+
|
|
79
|
+
Given a ring `R` and a ring automorphism `\sigma` of `R` and a
|
|
80
|
+
`\sigma`-derivation `\partial`, the ring of Ore polynomials
|
|
81
|
+
`R[X; \sigma, \partial]` is the usual abelian group polynomial
|
|
82
|
+
`R[X]` equipped with the modification multiplication deduced from the
|
|
83
|
+
rule `X a = \sigma(a) X + \partial(a)`.
|
|
84
|
+
We refer to [Ore1933]_ for more material on Ore polynomials.
|
|
85
|
+
|
|
86
|
+
INPUT:
|
|
87
|
+
|
|
88
|
+
- ``base_ring`` -- a commutative ring
|
|
89
|
+
|
|
90
|
+
- ``twisting_map`` -- either an endomorphism of the base ring, or
|
|
91
|
+
a (twisted) derivation of it
|
|
92
|
+
|
|
93
|
+
- ``names`` -- string or list of strings
|
|
94
|
+
|
|
95
|
+
- ``sparse`` -- boolean (default: ``False``); currently not supported
|
|
96
|
+
|
|
97
|
+
EXAMPLES:
|
|
98
|
+
|
|
99
|
+
.. RUBRIC:: The case of a twisting endomorphism
|
|
100
|
+
|
|
101
|
+
We create the Ore ring `\GF{5^3}[x, \text{Frob}]` where Frob is the
|
|
102
|
+
Frobenius endomorphism::
|
|
103
|
+
|
|
104
|
+
sage: # needs sage.rings.finite_rings
|
|
105
|
+
sage: k.<a> = GF(5^3)
|
|
106
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
107
|
+
sage: S = OrePolynomialRing(k, Frob, 'x'); S
|
|
108
|
+
Ore Polynomial Ring in x over Finite Field in a of size 5^3 twisted by a |--> a^5
|
|
109
|
+
|
|
110
|
+
In particular, observe that it is not needed to create and pass in
|
|
111
|
+
the twisting derivation (which is `0` in our example).
|
|
112
|
+
|
|
113
|
+
As a shortcut, we can use the square brackets notation as follow::
|
|
114
|
+
|
|
115
|
+
sage: # needs sage.rings.finite_rings
|
|
116
|
+
sage: T.<x> = k['x', Frob]; T
|
|
117
|
+
Ore Polynomial Ring in x over Finite Field in a of size 5^3 twisted by a |--> a^5
|
|
118
|
+
sage: T is S
|
|
119
|
+
True
|
|
120
|
+
|
|
121
|
+
We emphasize that it is necessary to repeat the name of the variable
|
|
122
|
+
in the right hand side. Indeed, the following fails (it is interpreted
|
|
123
|
+
by Sage as a classical polynomial ring with variable name ``Frob``)::
|
|
124
|
+
|
|
125
|
+
sage: T.<x> = k[Frob] # needs sage.rings.finite_rings
|
|
126
|
+
Traceback (most recent call last):
|
|
127
|
+
...
|
|
128
|
+
ValueError: variable name 'Frobenius endomorphism a |--> a^5 on
|
|
129
|
+
Finite Field in a of size 5^3' is not alphanumeric
|
|
130
|
+
|
|
131
|
+
Note moreover that, similarly to the classical case, using the brackets
|
|
132
|
+
notation also sets the variable::
|
|
133
|
+
|
|
134
|
+
sage: x.parent() is S # needs sage.rings.finite_rings
|
|
135
|
+
True
|
|
136
|
+
|
|
137
|
+
We are now ready to carry on computations in the Ore ring::
|
|
138
|
+
|
|
139
|
+
sage: x*a # needs sage.rings.finite_rings
|
|
140
|
+
(2*a^2 + 4*a + 4)*x
|
|
141
|
+
sage: Frob(a)*x # needs sage.rings.finite_rings
|
|
142
|
+
(2*a^2 + 4*a + 4)*x
|
|
143
|
+
|
|
144
|
+
.. RUBRIC:: The case of a twisting derivation
|
|
145
|
+
|
|
146
|
+
We can similarly create the Ore ring of differential operators over
|
|
147
|
+
`\QQ[t]`, namely `\QQ[t][d, \frac{d}{dt}]`::
|
|
148
|
+
|
|
149
|
+
sage: # needs sage.rings.finite_rings
|
|
150
|
+
sage: R.<t> = QQ[]
|
|
151
|
+
sage: der = R.derivation(); der
|
|
152
|
+
d/dt
|
|
153
|
+
sage: A = OrePolynomialRing(R, der, 'd'); A
|
|
154
|
+
Ore Polynomial Ring in d over Univariate Polynomial Ring in t
|
|
155
|
+
over Rational Field twisted by d/dt
|
|
156
|
+
|
|
157
|
+
Again, the brackets notation is available::
|
|
158
|
+
|
|
159
|
+
sage: B.<d> = R['d', der] # needs sage.rings.finite_rings
|
|
160
|
+
sage: A is B # needs sage.rings.finite_rings
|
|
161
|
+
True
|
|
162
|
+
|
|
163
|
+
and computations can be carried out::
|
|
164
|
+
|
|
165
|
+
sage: d*t # needs sage.rings.finite_rings
|
|
166
|
+
t*d + 1
|
|
167
|
+
|
|
168
|
+
.. RUBRIC:: The combined case
|
|
169
|
+
|
|
170
|
+
Ore polynomial rings involving at the same time a twisting morphism
|
|
171
|
+
`\sigma` and a twisting `\sigma`-derivation can be created as well as
|
|
172
|
+
follows::
|
|
173
|
+
|
|
174
|
+
sage: # needs sage.rings.padics
|
|
175
|
+
sage: F.<u> = Qq(3^2)
|
|
176
|
+
sage: sigma = F.frobenius_endomorphism(); sigma
|
|
177
|
+
Frobenius endomorphism on 3-adic Unramified Extension Field in u
|
|
178
|
+
defined by x^2 + 2*x + 2 lifting u |--> u^3 on the residue field
|
|
179
|
+
sage: der = F.derivation(3, twist=sigma); der
|
|
180
|
+
(3 + O(3^21))*([Frob] - id)
|
|
181
|
+
sage: M.<X> = F['X', der]; M
|
|
182
|
+
Ore Polynomial Ring in X over 3-adic Unramified Extension Field in u
|
|
183
|
+
defined by x^2 + 2*x + 2 twisted by Frob and (3 + O(3^21))*([Frob] - id)
|
|
184
|
+
|
|
185
|
+
We emphasize that we only need to pass in the twisted derivation as
|
|
186
|
+
it already contains in it the datum of the twisting endomorphism.
|
|
187
|
+
Actually, passing in both twisting maps results in an error::
|
|
188
|
+
|
|
189
|
+
sage: F['X', sigma, der] # needs sage.rings.padics
|
|
190
|
+
Traceback (most recent call last):
|
|
191
|
+
...
|
|
192
|
+
ValueError: variable name 'Frobenius endomorphism ...' is not alphanumeric
|
|
193
|
+
|
|
194
|
+
.. RUBRIC:: Examples of variable name context
|
|
195
|
+
|
|
196
|
+
Consider the following::
|
|
197
|
+
|
|
198
|
+
sage: R.<t> = ZZ[]
|
|
199
|
+
sage: sigma = R.hom([t+1])
|
|
200
|
+
sage: S.<x> = SkewPolynomialRing(R, sigma); S
|
|
201
|
+
Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring
|
|
202
|
+
twisted by t |--> t + 1
|
|
203
|
+
|
|
204
|
+
The names of the variables defined above cannot be arbitrarily
|
|
205
|
+
modified because each Ore polynomial ring is unique in Sage and other
|
|
206
|
+
objects in Sage could have pointers to that Ore polynomial ring.
|
|
207
|
+
|
|
208
|
+
However, the variable can be changed within the scope of a ``with``
|
|
209
|
+
block using the localvars context::
|
|
210
|
+
|
|
211
|
+
sage: R.<t> = ZZ[]
|
|
212
|
+
sage: sigma = R.hom([t+1])
|
|
213
|
+
sage: S.<x> = SkewPolynomialRing(R, sigma); S
|
|
214
|
+
Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring
|
|
215
|
+
twisted by t |--> t + 1
|
|
216
|
+
|
|
217
|
+
sage: with localvars(S, ['y']):
|
|
218
|
+
....: print(S)
|
|
219
|
+
Ore Polynomial Ring in y over Univariate Polynomial Ring in t over Integer Ring
|
|
220
|
+
twisted by t |--> t + 1
|
|
221
|
+
|
|
222
|
+
.. RUBRIC:: Uniqueness and immutability
|
|
223
|
+
|
|
224
|
+
In Sage, there is exactly one Ore polynomial ring for each quadruple
|
|
225
|
+
(base ring, twisting morphism, twisting derivation, name of the variable)::
|
|
226
|
+
|
|
227
|
+
sage: # needs sage.rings.finite_rings
|
|
228
|
+
sage: k.<a> = GF(7^3)
|
|
229
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
230
|
+
sage: S = k['x', Frob]
|
|
231
|
+
sage: T = k['x', Frob]
|
|
232
|
+
sage: S is T
|
|
233
|
+
True
|
|
234
|
+
|
|
235
|
+
Rings with different variables names are different::
|
|
236
|
+
|
|
237
|
+
sage: S is k['y', Frob] # needs sage.rings.finite_rings
|
|
238
|
+
False
|
|
239
|
+
|
|
240
|
+
Similarly, varying the twisting morphisms yields to different Ore rings
|
|
241
|
+
(expect when the morphism coincide)::
|
|
242
|
+
|
|
243
|
+
sage: S is k['x', Frob^2] # needs sage.rings.finite_rings
|
|
244
|
+
False
|
|
245
|
+
sage: S is k['x', Frob^3] # needs sage.rings.finite_rings
|
|
246
|
+
False
|
|
247
|
+
sage: S is k['x', Frob^4] # needs sage.rings.finite_rings
|
|
248
|
+
True
|
|
249
|
+
|
|
250
|
+
TESTS:
|
|
251
|
+
|
|
252
|
+
You must specify a variable name::
|
|
253
|
+
|
|
254
|
+
sage: SkewPolynomialRing(k, Frob) # needs sage.rings.finite_rings
|
|
255
|
+
Traceback (most recent call last):
|
|
256
|
+
...
|
|
257
|
+
TypeError: you must specify the name of the variable
|
|
258
|
+
|
|
259
|
+
Multivariate Ore polynomial rings are not supported::
|
|
260
|
+
|
|
261
|
+
sage: S = OrePolynomialRing(k, Frob,names=['x','y']) # needs sage.rings.finite_rings
|
|
262
|
+
Traceback (most recent call last):
|
|
263
|
+
...
|
|
264
|
+
NotImplementedError: multivariate Ore polynomials rings not supported
|
|
265
|
+
|
|
266
|
+
Sparse Ore polynomial rings are not implemented::
|
|
267
|
+
|
|
268
|
+
sage: S = SkewPolynomialRing(k, Frob, names='x', sparse=True) # needs sage.rings.finite_rings
|
|
269
|
+
Traceback (most recent call last):
|
|
270
|
+
...
|
|
271
|
+
NotImplementedError: sparse Ore polynomial rings are not implemented
|
|
272
|
+
|
|
273
|
+
Saving and loading of polynomial rings works::
|
|
274
|
+
|
|
275
|
+
sage: loads(dumps(S)) is S # needs sage.rings.finite_rings
|
|
276
|
+
True
|
|
277
|
+
|
|
278
|
+
.. TODO::
|
|
279
|
+
|
|
280
|
+
- Sparse Ore Polynomial Ring
|
|
281
|
+
- Multivariate Ore Polynomial Ring
|
|
282
|
+
"""
|
|
283
|
+
Element = None
|
|
284
|
+
_fraction_field_class = None
|
|
285
|
+
|
|
286
|
+
@staticmethod
|
|
287
|
+
def __classcall_private__(cls, base_ring, twist=None, names=None, sparse=False, polcast=True):
|
|
288
|
+
r"""
|
|
289
|
+
Construct the Ore polynomial ring associated to the given parameters.
|
|
290
|
+
|
|
291
|
+
TESTS::
|
|
292
|
+
|
|
293
|
+
sage: R.<t> = QQ[]
|
|
294
|
+
sage: der = R.derivation()
|
|
295
|
+
sage: A.<d> = OrePolynomialRing(R, der)
|
|
296
|
+
sage: A
|
|
297
|
+
Ore Polynomial Ring in d over Univariate Polynomial Ring in t over Rational Field twisted by d/dt
|
|
298
|
+
sage: type(A)
|
|
299
|
+
<class 'sage.rings.polynomial.ore_polynomial_ring.OrePolynomialRing_with_category'>
|
|
300
|
+
|
|
301
|
+
We check the uniqueness property of parents::
|
|
302
|
+
|
|
303
|
+
sage: der2 = R.derivation()
|
|
304
|
+
sage: B.<d> = OrePolynomialRing(R, der2)
|
|
305
|
+
sage: A is B
|
|
306
|
+
True
|
|
307
|
+
|
|
308
|
+
When there is no twisting derivation, a special class is used::
|
|
309
|
+
|
|
310
|
+
sage: k.<t> = ZZ[]
|
|
311
|
+
sage: theta = k.hom([t+1])
|
|
312
|
+
sage: S.<x> = OrePolynomialRing(k, theta)
|
|
313
|
+
sage: S
|
|
314
|
+
Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring twisted by t |--> t + 1
|
|
315
|
+
sage: type(S)
|
|
316
|
+
<class 'sage.rings.polynomial.skew_polynomial_ring.SkewPolynomialRing_with_category'>
|
|
317
|
+
|
|
318
|
+
In certain situations (e.g. when the twisting morphism is the Frobenius
|
|
319
|
+
over a finite field), even more specialized classes are used::
|
|
320
|
+
|
|
321
|
+
sage: # needs sage.rings.finite_rings
|
|
322
|
+
sage: k.<a> = GF(7^5)
|
|
323
|
+
sage: Frob = k.frobenius_endomorphism(2)
|
|
324
|
+
sage: S.<x> = SkewPolynomialRing(k, Frob)
|
|
325
|
+
sage: type(S)
|
|
326
|
+
<class 'sage.rings.polynomial.skew_polynomial_ring.SkewPolynomialRing_finite_field_with_category'>
|
|
327
|
+
|
|
328
|
+
If there is no twisting derivation and that the twisting morphism is
|
|
329
|
+
``None`` ot the identity, a regular `PolynomialRing` is created, unless
|
|
330
|
+
specified otherwise::
|
|
331
|
+
|
|
332
|
+
sage: # needs sage.rings.finite_rings
|
|
333
|
+
sage: k.<a> = GF(5^2)
|
|
334
|
+
sage: Frob = k.frobenius_endomorphism(2)
|
|
335
|
+
sage: Frob.is_identity()
|
|
336
|
+
True
|
|
337
|
+
sage: S.<x> = OrePolynomialRing(k, Frob)
|
|
338
|
+
sage: S
|
|
339
|
+
Univariate Polynomial Ring in x over Finite Field in a of size 5^2
|
|
340
|
+
sage: S.<x> = OrePolynomialRing(k, Frob, polcast=False)
|
|
341
|
+
sage: S
|
|
342
|
+
Ore Polynomial Ring in x over Finite Field in a of size 5^2 untwisted
|
|
343
|
+
"""
|
|
344
|
+
if base_ring not in CommutativeRings():
|
|
345
|
+
raise TypeError('base_ring must be a commutative ring')
|
|
346
|
+
if twist is None:
|
|
347
|
+
morphism = derivation = None
|
|
348
|
+
elif isinstance(twist, Morphism):
|
|
349
|
+
if (twist.domain() is not base_ring
|
|
350
|
+
or twist.codomain() is not base_ring):
|
|
351
|
+
raise TypeError("the twisting morphism must be an endomorphism of base_ring (=%s)" % base_ring)
|
|
352
|
+
if twist.is_identity():
|
|
353
|
+
morphism = None
|
|
354
|
+
else:
|
|
355
|
+
morphism = twist
|
|
356
|
+
derivation = None
|
|
357
|
+
elif isinstance(twist, RingDerivation):
|
|
358
|
+
if (twist.domain() is not base_ring
|
|
359
|
+
or twist.codomain() is not base_ring):
|
|
360
|
+
raise TypeError("the twisting derivation must be an endomorphism of base_ring (=%s)" % base_ring)
|
|
361
|
+
morphism = twist.parent().twisting_morphism()
|
|
362
|
+
if twist:
|
|
363
|
+
derivation = twist
|
|
364
|
+
else:
|
|
365
|
+
derivation = None
|
|
366
|
+
elif twist is None:
|
|
367
|
+
morphism = derivation = None
|
|
368
|
+
else:
|
|
369
|
+
raise TypeError("the twisting map must be a ring morphism or a derivation")
|
|
370
|
+
if names is None:
|
|
371
|
+
raise TypeError("you must specify the name of the variable")
|
|
372
|
+
try:
|
|
373
|
+
names = normalize_names(1, names)[0]
|
|
374
|
+
except IndexError:
|
|
375
|
+
raise NotImplementedError("multivariate Ore polynomials rings not supported")
|
|
376
|
+
|
|
377
|
+
# If `polcast` is ``True`` and there is no twisting morphism and no
|
|
378
|
+
# twisting derivation we return a classical polynomial ring
|
|
379
|
+
if polcast and derivation is None and morphism is None:
|
|
380
|
+
return PolynomialRing(base_ring, names, sparse=sparse)
|
|
381
|
+
|
|
382
|
+
# We find the best constructor
|
|
383
|
+
if sparse:
|
|
384
|
+
raise NotImplementedError("sparse Ore polynomial rings are not implemented")
|
|
385
|
+
|
|
386
|
+
from sage.rings.polynomial import skew_polynomial_ring
|
|
387
|
+
constructors = []
|
|
388
|
+
if derivation is None:
|
|
389
|
+
if base_ring in _Fields:
|
|
390
|
+
try:
|
|
391
|
+
order = morphism.order()
|
|
392
|
+
if order is not Infinity:
|
|
393
|
+
if base_ring.is_finite():
|
|
394
|
+
constructors.append(skew_polynomial_ring.SkewPolynomialRing_finite_field)
|
|
395
|
+
else:
|
|
396
|
+
constructors.append(skew_polynomial_ring.SkewPolynomialRing_finite_order)
|
|
397
|
+
except (AttributeError, NotImplementedError):
|
|
398
|
+
pass
|
|
399
|
+
constructors.append(skew_polynomial_ring.SkewPolynomialRing)
|
|
400
|
+
|
|
401
|
+
for constructor in constructors:
|
|
402
|
+
try:
|
|
403
|
+
return constructor(base_ring, morphism, derivation, names, sparse)
|
|
404
|
+
except (AttributeError, NotImplementedError):
|
|
405
|
+
pass
|
|
406
|
+
|
|
407
|
+
# We fallback to generic implementation
|
|
408
|
+
return cls.__classcall__(cls, base_ring, morphism, derivation, names, sparse)
|
|
409
|
+
|
|
410
|
+
def __init__(self, base_ring, morphism, derivation, name, sparse, category=None):
|
|
411
|
+
r"""
|
|
412
|
+
Initialize ``self``.
|
|
413
|
+
|
|
414
|
+
INPUT:
|
|
415
|
+
|
|
416
|
+
- ``base_ring`` -- a commutative ring
|
|
417
|
+
|
|
418
|
+
- ``morphism`` -- an automorphism of the base ring
|
|
419
|
+
|
|
420
|
+
- ``derivation`` -- a derivation or a twisted derivation of the base ring
|
|
421
|
+
|
|
422
|
+
- ``name`` -- string or list of strings representing the name of
|
|
423
|
+
the variables of ring
|
|
424
|
+
|
|
425
|
+
- ``sparse`` -- boolean (default: ``False``)
|
|
426
|
+
|
|
427
|
+
- ``category`` -- a category
|
|
428
|
+
|
|
429
|
+
EXAMPLES::
|
|
430
|
+
|
|
431
|
+
sage: R.<t> = ZZ[]
|
|
432
|
+
sage: sigma = R.hom([t+1])
|
|
433
|
+
sage: S.<x> = SkewPolynomialRing(R, sigma)
|
|
434
|
+
sage: S.category()
|
|
435
|
+
Category of algebras over Univariate Polynomial Ring in t over Integer Ring
|
|
436
|
+
sage: S([1]) + S([-1])
|
|
437
|
+
0
|
|
438
|
+
sage: TestSuite(S).run()
|
|
439
|
+
"""
|
|
440
|
+
if self.Element is None:
|
|
441
|
+
import sage.rings.polynomial.ore_polynomial_element
|
|
442
|
+
self.Element = sage.rings.polynomial.ore_polynomial_element.OrePolynomial_generic_dense
|
|
443
|
+
if self._fraction_field_class is None:
|
|
444
|
+
from sage.rings.polynomial.ore_function_field import OreFunctionField
|
|
445
|
+
self._fraction_field_class = OreFunctionField
|
|
446
|
+
self.__is_sparse = sparse
|
|
447
|
+
self._morphism = morphism
|
|
448
|
+
self._derivation = derivation
|
|
449
|
+
self._fraction_field = None
|
|
450
|
+
if morphism is None and derivation is None:
|
|
451
|
+
cat = Algebras(base_ring).Commutative()
|
|
452
|
+
else:
|
|
453
|
+
cat = Algebras(base_ring)
|
|
454
|
+
category = cat.or_subcategory(category)
|
|
455
|
+
Parent.__init__(self, base_ring, names=name,
|
|
456
|
+
normalize=True, category=category)
|
|
457
|
+
|
|
458
|
+
def __reduce__(self):
|
|
459
|
+
r"""
|
|
460
|
+
TESTS::
|
|
461
|
+
|
|
462
|
+
sage: # needs sage.rings.finite_rings
|
|
463
|
+
sage: k.<a> = GF(11^3)
|
|
464
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
465
|
+
sage: S.<x> = k['x', Frob]
|
|
466
|
+
sage: loads(dumps(S)) is S
|
|
467
|
+
True
|
|
468
|
+
sage: der = k.derivation(a, twist=Frob)
|
|
469
|
+
sage: T.<y> = k['y', der]
|
|
470
|
+
sage: loads(dumps(T)) is T
|
|
471
|
+
True
|
|
472
|
+
"""
|
|
473
|
+
if self._derivation is None:
|
|
474
|
+
twist = self._morphism
|
|
475
|
+
else:
|
|
476
|
+
twist = self._derivation
|
|
477
|
+
return OrePolynomialRing, (self.base_ring(), twist, self.variable_names(), self.__is_sparse)
|
|
478
|
+
|
|
479
|
+
def _element_constructor_(self, a=None, check=True, construct=False, **kwds):
|
|
480
|
+
r"""
|
|
481
|
+
Convert a base ring element ``a`` into a constant of this univariate
|
|
482
|
+
Ore polynomial ring, possibly non-canonically.
|
|
483
|
+
|
|
484
|
+
INPUT:
|
|
485
|
+
|
|
486
|
+
- ``a`` -- (default: ``None``) an element of the base ring
|
|
487
|
+
of ``self`` or a ring that has a coerce map from ``self``
|
|
488
|
+
|
|
489
|
+
- ``check`` -- boolean (default: ``True``)
|
|
490
|
+
|
|
491
|
+
- ``construct`` -- boolean (default: ``False``)
|
|
492
|
+
|
|
493
|
+
OUTPUT:
|
|
494
|
+
|
|
495
|
+
A zero-degree Ore polynomial in ``self``, equal to ``a``.
|
|
496
|
+
|
|
497
|
+
EXAMPLES::
|
|
498
|
+
|
|
499
|
+
sage: R.<t> = ZZ[]
|
|
500
|
+
sage: sigma = R.hom([t+1])
|
|
501
|
+
sage: S.<x> = SkewPolynomialRing(R,sigma)
|
|
502
|
+
sage: S(1 + x + x^2 + x^3)
|
|
503
|
+
x^3 + x^2 + x + 1
|
|
504
|
+
sage: S(1 + t)
|
|
505
|
+
t + 1
|
|
506
|
+
sage: S(1 + t).degree()
|
|
507
|
+
0
|
|
508
|
+
sage: S(0).list()
|
|
509
|
+
[]
|
|
510
|
+
|
|
511
|
+
TESTS::
|
|
512
|
+
|
|
513
|
+
sage: S(x, check=True)
|
|
514
|
+
x
|
|
515
|
+
"""
|
|
516
|
+
C = self.element_class
|
|
517
|
+
if isinstance(a, list):
|
|
518
|
+
return C(self, a, check=check, construct=construct)
|
|
519
|
+
if isinstance(a, Element):
|
|
520
|
+
P = a.parent()
|
|
521
|
+
|
|
522
|
+
def build(check):
|
|
523
|
+
if a.is_zero():
|
|
524
|
+
return P.zero()
|
|
525
|
+
else:
|
|
526
|
+
return C(self, [a], check=check, construct=construct)
|
|
527
|
+
if P is self:
|
|
528
|
+
return a
|
|
529
|
+
elif P is self.base_ring():
|
|
530
|
+
build(False)
|
|
531
|
+
elif P == self.base_ring() or self.base_ring().has_coerce_map_from(P):
|
|
532
|
+
build(True)
|
|
533
|
+
try:
|
|
534
|
+
return a._polynomial_(self)
|
|
535
|
+
except AttributeError:
|
|
536
|
+
pass
|
|
537
|
+
if isinstance(a, str):
|
|
538
|
+
try:
|
|
539
|
+
from sage.misc.parser import LookupNameMaker, Parser
|
|
540
|
+
R = self.base_ring()
|
|
541
|
+
p = Parser(Integer, R, LookupNameMaker({self.variable_name(): self.gen()}, R))
|
|
542
|
+
return self(p.parse(a))
|
|
543
|
+
except NameError:
|
|
544
|
+
raise TypeError("unable to coerce string")
|
|
545
|
+
return C(self, a, check, construct=construct, **kwds)
|
|
546
|
+
|
|
547
|
+
def _coerce_map_from_base_ring(self):
|
|
548
|
+
"""
|
|
549
|
+
Return a coercion map from the base ring of ``self``.
|
|
550
|
+
|
|
551
|
+
EXAMPLES::
|
|
552
|
+
|
|
553
|
+
sage: R.<t> = ZZ[]
|
|
554
|
+
sage: S.<x> = OrePolynomialRing(R, R.hom([t + 1]))
|
|
555
|
+
sage: S.coerce_map_from(R)
|
|
556
|
+
Ore Polynomial base injection morphism:
|
|
557
|
+
From: Univariate Polynomial Ring in t over Integer Ring
|
|
558
|
+
To: Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring twisted by t |--> t + 1
|
|
559
|
+
sage: x.parent()
|
|
560
|
+
Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring twisted by t |--> t + 1
|
|
561
|
+
sage: t.parent()
|
|
562
|
+
Univariate Polynomial Ring in t over Integer Ring
|
|
563
|
+
sage: y = x + t # indirect doctest
|
|
564
|
+
sage: y
|
|
565
|
+
x + t
|
|
566
|
+
sage: y.parent() is S
|
|
567
|
+
True
|
|
568
|
+
"""
|
|
569
|
+
return OrePolynomialBaseringInjection(self.base_ring(), self)
|
|
570
|
+
|
|
571
|
+
def _coerce_map_from_(self, P):
|
|
572
|
+
r"""
|
|
573
|
+
Check whether ``self`` has a coerce map from ``P``.
|
|
574
|
+
|
|
575
|
+
The rings that canonically coerce into this ring are:
|
|
576
|
+
|
|
577
|
+
- this ring itself
|
|
578
|
+
|
|
579
|
+
- any ring that canonically coerces to the base ring of this ring
|
|
580
|
+
|
|
581
|
+
- Ore polynomial rings in the same variable and automorphism over
|
|
582
|
+
any base ring that canonically coerces to the base ring of this ring
|
|
583
|
+
|
|
584
|
+
INPUT:
|
|
585
|
+
|
|
586
|
+
- ``P`` -- a ring
|
|
587
|
+
|
|
588
|
+
EXAMPLES::
|
|
589
|
+
|
|
590
|
+
sage: R.<t> = ZZ[]
|
|
591
|
+
sage: sigma = R.hom([t+1])
|
|
592
|
+
sage: S.<x> = OrePolynomialRing(R,sigma)
|
|
593
|
+
sage: S.has_coerce_map_from(S)
|
|
594
|
+
True
|
|
595
|
+
sage: S.has_coerce_map_from(R)
|
|
596
|
+
True
|
|
597
|
+
sage: S.has_coerce_map_from(ZZ)
|
|
598
|
+
True
|
|
599
|
+
sage: S.has_coerce_map_from(GF(5^3)) # needs sage.rings.finite_rings
|
|
600
|
+
False
|
|
601
|
+
|
|
602
|
+
sage: S.coerce_map_from(ZZ)
|
|
603
|
+
Composite map:
|
|
604
|
+
From: Integer Ring
|
|
605
|
+
To: Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring twisted by t |--> t + 1
|
|
606
|
+
Defn: Polynomial base injection morphism:
|
|
607
|
+
From: Integer Ring
|
|
608
|
+
To: Univariate Polynomial Ring in t over Integer Ring
|
|
609
|
+
then
|
|
610
|
+
Ore Polynomial base injection morphism:
|
|
611
|
+
From: Univariate Polynomial Ring in t over Integer Ring
|
|
612
|
+
To: Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring twisted by t |--> t + 1
|
|
613
|
+
sage: S.coerce_map_from(S)
|
|
614
|
+
Identity endomorphism of Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Integer Ring twisted by t |--> t + 1
|
|
615
|
+
"""
|
|
616
|
+
base_ring = self.base_ring()
|
|
617
|
+
try:
|
|
618
|
+
connecting = base_ring.coerce_map_from(P)
|
|
619
|
+
if connecting is not None:
|
|
620
|
+
return self.coerce_map_from(base_ring) * connecting
|
|
621
|
+
except TypeError:
|
|
622
|
+
pass
|
|
623
|
+
if isinstance(P, OrePolynomialRing):
|
|
624
|
+
if self.__is_sparse and not P.is_sparse():
|
|
625
|
+
return False
|
|
626
|
+
if P.variable_name() == self.variable_name():
|
|
627
|
+
return base_ring.has_coerce_map_from(P.base_ring())
|
|
628
|
+
|
|
629
|
+
def _repr_twist(self):
|
|
630
|
+
r"""
|
|
631
|
+
Return a string representation of the twisting morphisms.
|
|
632
|
+
|
|
633
|
+
This is a helper method.
|
|
634
|
+
|
|
635
|
+
TESTS::
|
|
636
|
+
|
|
637
|
+
sage: # needs sage.rings.finite_rings
|
|
638
|
+
sage: F.<z> = GF(5^3)
|
|
639
|
+
sage: Frob = F.frobenius_endomorphism()
|
|
640
|
+
sage: S.<x> = OrePolynomialRing(F, Frob)
|
|
641
|
+
sage: S._repr_twist()
|
|
642
|
+
'twisted by z |--> z^5'
|
|
643
|
+
sage: T.<y> = OrePolynomialRing(F, Frob^3, polcast=False)
|
|
644
|
+
sage: T._repr_twist()
|
|
645
|
+
'untwisted'
|
|
646
|
+
"""
|
|
647
|
+
s = ""
|
|
648
|
+
if self._morphism is not None:
|
|
649
|
+
s += self._morphism._repr_short()
|
|
650
|
+
if self._derivation is not None:
|
|
651
|
+
if s != "":
|
|
652
|
+
s += " and "
|
|
653
|
+
s += self._derivation._repr_()
|
|
654
|
+
if s == "":
|
|
655
|
+
return "untwisted"
|
|
656
|
+
else:
|
|
657
|
+
return "twisted by " + s
|
|
658
|
+
|
|
659
|
+
def _latex_twist(self):
|
|
660
|
+
r"""
|
|
661
|
+
Return a LaTeX representation of the twisting morphisms.
|
|
662
|
+
|
|
663
|
+
This is a helper method.
|
|
664
|
+
|
|
665
|
+
TESTS::
|
|
666
|
+
|
|
667
|
+
sage: # needs sage.rings.finite_rings
|
|
668
|
+
sage: F.<z> = GF(5^3)
|
|
669
|
+
sage: Frob = F.frobenius_endomorphism()
|
|
670
|
+
sage: S.<x> = OrePolynomialRing(F, Frob)
|
|
671
|
+
sage: S._latex_twist()
|
|
672
|
+
z \mapsto z^{5}
|
|
673
|
+
sage: T.<y> = OrePolynomialRing(F, Frob^3, polcast=False)
|
|
674
|
+
sage: T._latex_twist()
|
|
675
|
+
''
|
|
676
|
+
|
|
677
|
+
"""
|
|
678
|
+
from sage.misc.latex import latex
|
|
679
|
+
s = ""
|
|
680
|
+
if self._morphism is not None:
|
|
681
|
+
s += latex(self._morphism)
|
|
682
|
+
if self._derivation is not None:
|
|
683
|
+
if s != "":
|
|
684
|
+
s += ","
|
|
685
|
+
s += latex(self._derivation)
|
|
686
|
+
return s
|
|
687
|
+
|
|
688
|
+
def _repr_(self) -> str:
|
|
689
|
+
r"""
|
|
690
|
+
Return a string representation of ``self``.
|
|
691
|
+
|
|
692
|
+
EXAMPLES::
|
|
693
|
+
|
|
694
|
+
sage: R.<t> = QQ[]
|
|
695
|
+
sage: sigma = R.hom([t+1])
|
|
696
|
+
sage: S.<x> = OrePolynomialRing(R, sigma)
|
|
697
|
+
sage: S
|
|
698
|
+
Ore Polynomial Ring in x over Univariate Polynomial Ring in t over Rational Field twisted by t |--> t + 1
|
|
699
|
+
|
|
700
|
+
sage: der = R.derivation()
|
|
701
|
+
sage: T.<d> = OrePolynomialRing(R, der)
|
|
702
|
+
sage: T
|
|
703
|
+
Ore Polynomial Ring in d over Univariate Polynomial Ring in t over Rational Field twisted by d/dt
|
|
704
|
+
"""
|
|
705
|
+
s = "Ore Polynomial Ring in %s over %s %s" % (self.variable_name(), self.base_ring(), self._repr_twist())
|
|
706
|
+
if self.is_sparse():
|
|
707
|
+
s = "Sparse " + s
|
|
708
|
+
return s
|
|
709
|
+
|
|
710
|
+
def _latex_(self) -> str:
|
|
711
|
+
r"""
|
|
712
|
+
Return a latex representation of ``self``.
|
|
713
|
+
|
|
714
|
+
EXAMPLES::
|
|
715
|
+
|
|
716
|
+
sage: # needs sage.rings.finite_rings
|
|
717
|
+
sage: k.<a> = GF(5^3)
|
|
718
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
719
|
+
sage: S.<x> = k['x', Frob]
|
|
720
|
+
sage: latex(S) # indirect doctest
|
|
721
|
+
\Bold{F}_{5^{3}}\left[x ; a \mapsto a^{5} \right]
|
|
722
|
+
|
|
723
|
+
sage: R.<t> = QQ[]
|
|
724
|
+
sage: der = R.derivation()
|
|
725
|
+
sage: T.<delta> = R['delta', der]
|
|
726
|
+
sage: latex(T) # indirect doctest
|
|
727
|
+
\Bold{Q}[t]\left[\delta ; \frac{d}{dt} \right]
|
|
728
|
+
"""
|
|
729
|
+
from sage.misc.latex import latex
|
|
730
|
+
s = "%s\\left[%s" % (latex(self.base_ring()), self.latex_variable_names()[0])
|
|
731
|
+
twist = self._latex_twist()
|
|
732
|
+
if twist != "":
|
|
733
|
+
s += ";" + twist
|
|
734
|
+
return s + "\\right]"
|
|
735
|
+
|
|
736
|
+
def change_var(self, var):
|
|
737
|
+
r"""
|
|
738
|
+
Return the Ore polynomial ring in variable ``var`` with the same base
|
|
739
|
+
ring, twisting morphism and twisting derivation as ``self``.
|
|
740
|
+
|
|
741
|
+
INPUT:
|
|
742
|
+
|
|
743
|
+
- ``var`` -- string representing the name of the new variable
|
|
744
|
+
|
|
745
|
+
EXAMPLES::
|
|
746
|
+
|
|
747
|
+
sage: # needs sage.rings.finite_rings
|
|
748
|
+
sage: k.<t> = GF(5^3)
|
|
749
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
750
|
+
sage: R.<x> = OrePolynomialRing(k,Frob); R
|
|
751
|
+
Ore Polynomial Ring in x over Finite Field in t of size 5^3 twisted by t |--> t^5
|
|
752
|
+
sage: Ry = R.change_var('y'); Ry
|
|
753
|
+
Ore Polynomial Ring in y over Finite Field in t of size 5^3 twisted by t |--> t^5
|
|
754
|
+
sage: Ry is R.change_var('y')
|
|
755
|
+
True
|
|
756
|
+
"""
|
|
757
|
+
if self._derivation is None:
|
|
758
|
+
twist = self._morphism
|
|
759
|
+
else:
|
|
760
|
+
twist = self._derivation
|
|
761
|
+
return OrePolynomialRing(self.base_ring(), twist, names=var,
|
|
762
|
+
sparse=self.__is_sparse, polcast=False)
|
|
763
|
+
|
|
764
|
+
def characteristic(self):
|
|
765
|
+
r"""
|
|
766
|
+
Return the characteristic of the base ring of ``self``.
|
|
767
|
+
|
|
768
|
+
EXAMPLES::
|
|
769
|
+
|
|
770
|
+
sage: R.<t> = QQ[]
|
|
771
|
+
sage: sigma = R.hom([t+1])
|
|
772
|
+
sage: R['x',sigma].characteristic()
|
|
773
|
+
0
|
|
774
|
+
|
|
775
|
+
sage: # needs sage.rings.finite_rings
|
|
776
|
+
sage: k.<u> = GF(5^3)
|
|
777
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
778
|
+
sage: k['y',Frob].characteristic()
|
|
779
|
+
5
|
|
780
|
+
"""
|
|
781
|
+
return self.base_ring().characteristic()
|
|
782
|
+
|
|
783
|
+
@cached_method
|
|
784
|
+
def twisting_morphism(self, n=1):
|
|
785
|
+
r"""
|
|
786
|
+
Return the twisting endomorphism defining this Ore polynomial ring
|
|
787
|
+
iterated ``n`` times or ``None`` if this Ore polynomial ring is not
|
|
788
|
+
twisted by an endomorphism.
|
|
789
|
+
|
|
790
|
+
INPUT:
|
|
791
|
+
|
|
792
|
+
- ``n`` -- integer (default: 1)
|
|
793
|
+
|
|
794
|
+
EXAMPLES::
|
|
795
|
+
|
|
796
|
+
sage: R.<t> = QQ[]
|
|
797
|
+
sage: sigma = R.hom([t+1])
|
|
798
|
+
sage: S.<x> = R['x', sigma]
|
|
799
|
+
sage: S.twisting_morphism()
|
|
800
|
+
Ring endomorphism of Univariate Polynomial Ring in t over Rational Field
|
|
801
|
+
Defn: t |--> t + 1
|
|
802
|
+
sage: S.twisting_morphism() == sigma
|
|
803
|
+
True
|
|
804
|
+
sage: S.twisting_morphism(10)
|
|
805
|
+
Ring endomorphism of Univariate Polynomial Ring in t over Rational Field
|
|
806
|
+
Defn: t |--> t + 10
|
|
807
|
+
|
|
808
|
+
If ``n`` in negative, Sage tries to compute the inverse of the
|
|
809
|
+
twisting morphism::
|
|
810
|
+
|
|
811
|
+
sage: # needs sage.rings.finite_rings
|
|
812
|
+
sage: k.<a> = GF(5^3)
|
|
813
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
814
|
+
sage: T.<y> = k['y',Frob]
|
|
815
|
+
sage: T.twisting_morphism(-1)
|
|
816
|
+
Frobenius endomorphism a |--> a^(5^2) on Finite Field in a of size 5^3
|
|
817
|
+
|
|
818
|
+
Sometimes it fails, even if the twisting morphism is
|
|
819
|
+
actually invertible::
|
|
820
|
+
|
|
821
|
+
sage: K = R.fraction_field()
|
|
822
|
+
sage: phi = K.hom([(t+1)/(t-1)])
|
|
823
|
+
sage: T.<y> = K['y', phi]
|
|
824
|
+
sage: T.twisting_morphism(-1)
|
|
825
|
+
Traceback (most recent call last):
|
|
826
|
+
...
|
|
827
|
+
NotImplementedError: inverse not implemented for morphisms of
|
|
828
|
+
Fraction Field of Univariate Polynomial Ring in t over Rational Field
|
|
829
|
+
|
|
830
|
+
When the Ore polynomial ring is only twisted by a derivation, this
|
|
831
|
+
method returns nothing::
|
|
832
|
+
|
|
833
|
+
sage: der = R.derivation()
|
|
834
|
+
sage: A.<d> = R['x', der]
|
|
835
|
+
sage: A
|
|
836
|
+
Ore Polynomial Ring in x over Univariate Polynomial Ring in t
|
|
837
|
+
over Rational Field twisted by d/dt
|
|
838
|
+
sage: A.twisting_morphism()
|
|
839
|
+
|
|
840
|
+
Here is an example where the twisting morphism is automatically
|
|
841
|
+
inferred from the derivation::
|
|
842
|
+
|
|
843
|
+
sage: # needs sage.rings.finite_rings
|
|
844
|
+
sage: k.<a> = GF(5^3)
|
|
845
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
846
|
+
sage: der = k.derivation(1, twist=Frob)
|
|
847
|
+
sage: der
|
|
848
|
+
[a |--> a^5] - id
|
|
849
|
+
sage: S.<x> = k['x', der]
|
|
850
|
+
sage: S.twisting_morphism()
|
|
851
|
+
Frobenius endomorphism a |--> a^5 on Finite Field in a of size 5^3
|
|
852
|
+
|
|
853
|
+
.. SEEALSO::
|
|
854
|
+
|
|
855
|
+
:meth:`twisting_derivation`
|
|
856
|
+
"""
|
|
857
|
+
if self._morphism is not None:
|
|
858
|
+
try:
|
|
859
|
+
return self._morphism ** n
|
|
860
|
+
except TypeError as e:
|
|
861
|
+
if n < 0:
|
|
862
|
+
raise NotImplementedError("inversion of the twisting morphism %s" % self._morphism)
|
|
863
|
+
else:
|
|
864
|
+
raise ValueError("Unexpected error in iterating the twisting morphism: %s", e)
|
|
865
|
+
|
|
866
|
+
def twisting_derivation(self):
|
|
867
|
+
r"""
|
|
868
|
+
Return the twisting derivation defining this Ore polynomial ring
|
|
869
|
+
or ``None`` if this Ore polynomial ring is not twisted by a derivation.
|
|
870
|
+
|
|
871
|
+
EXAMPLES::
|
|
872
|
+
|
|
873
|
+
sage: R.<t> = QQ[]
|
|
874
|
+
sage: der = R.derivation(); der
|
|
875
|
+
d/dt
|
|
876
|
+
sage: A.<d> = R['d', der]
|
|
877
|
+
sage: A.twisting_derivation()
|
|
878
|
+
d/dt
|
|
879
|
+
|
|
880
|
+
sage: # needs sage.rings.finite_rings
|
|
881
|
+
sage: k.<a> = GF(5^3)
|
|
882
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
883
|
+
sage: S.<x> = k['x', Frob]
|
|
884
|
+
sage: S.twisting_derivation()
|
|
885
|
+
|
|
886
|
+
.. SEEALSO::
|
|
887
|
+
|
|
888
|
+
:meth:`twisting_morphism`
|
|
889
|
+
"""
|
|
890
|
+
return self._derivation
|
|
891
|
+
|
|
892
|
+
@cached_method
|
|
893
|
+
def gen(self, n=0):
|
|
894
|
+
r"""
|
|
895
|
+
Return the indeterminate generator of this Ore polynomial ring.
|
|
896
|
+
|
|
897
|
+
INPUT:
|
|
898
|
+
|
|
899
|
+
- ``n`` -- index of generator to return (default: 0); exists for
|
|
900
|
+
compatibility with other polynomial rings
|
|
901
|
+
|
|
902
|
+
EXAMPLES::
|
|
903
|
+
|
|
904
|
+
sage: R.<t> = QQ[]
|
|
905
|
+
sage: sigma = R.hom([t+1])
|
|
906
|
+
sage: S.<x> = R['x',sigma]; S
|
|
907
|
+
Ore Polynomial Ring in x over Univariate Polynomial Ring in t
|
|
908
|
+
over Rational Field twisted by t |--> t + 1
|
|
909
|
+
sage: y = S.gen(); y
|
|
910
|
+
x
|
|
911
|
+
sage: y == x
|
|
912
|
+
True
|
|
913
|
+
sage: S.gen(0)
|
|
914
|
+
x
|
|
915
|
+
|
|
916
|
+
This is also known as the parameter::
|
|
917
|
+
|
|
918
|
+
sage: S.parameter() is S.gen()
|
|
919
|
+
True
|
|
920
|
+
|
|
921
|
+
TESTS::
|
|
922
|
+
|
|
923
|
+
sage: S.gen(1)
|
|
924
|
+
Traceback (most recent call last):
|
|
925
|
+
...
|
|
926
|
+
IndexError: generator 1 not defined
|
|
927
|
+
"""
|
|
928
|
+
if n != 0:
|
|
929
|
+
raise IndexError(f"generator {n} not defined")
|
|
930
|
+
return self.Element(self, [0, 1])
|
|
931
|
+
|
|
932
|
+
parameter = gen
|
|
933
|
+
|
|
934
|
+
def gens(self) -> tuple:
|
|
935
|
+
"""
|
|
936
|
+
Return the tuple of generators of ``self``.
|
|
937
|
+
|
|
938
|
+
EXAMPLES::
|
|
939
|
+
|
|
940
|
+
sage: R.<t> = QQ[]
|
|
941
|
+
sage: sigma = R.hom([t+1])
|
|
942
|
+
sage: S.<x> = R['x',sigma]; S
|
|
943
|
+
Ore Polynomial Ring in x over Univariate Polynomial Ring in t
|
|
944
|
+
over Rational Field twisted by t |--> t + 1
|
|
945
|
+
sage: S.gens()
|
|
946
|
+
(x,)
|
|
947
|
+
"""
|
|
948
|
+
return (self.Element(self, [0, 1]),)
|
|
949
|
+
|
|
950
|
+
def gens_dict(self) -> dict:
|
|
951
|
+
r"""
|
|
952
|
+
Return a {name: variable} dictionary of the generators of
|
|
953
|
+
this Ore polynomial ring.
|
|
954
|
+
|
|
955
|
+
EXAMPLES::
|
|
956
|
+
|
|
957
|
+
sage: R.<t> = ZZ[]
|
|
958
|
+
sage: sigma = R.hom([t+1])
|
|
959
|
+
sage: S.<x> = SkewPolynomialRing(R,sigma)
|
|
960
|
+
sage: S.gens_dict()
|
|
961
|
+
{'x': x}
|
|
962
|
+
"""
|
|
963
|
+
return dict(zip(self.variable_names(), self.gens()))
|
|
964
|
+
|
|
965
|
+
def is_finite(self) -> bool:
|
|
966
|
+
r"""
|
|
967
|
+
Return ``False`` since Ore polynomial rings are not finite
|
|
968
|
+
(unless the base ring is `0`).
|
|
969
|
+
|
|
970
|
+
EXAMPLES::
|
|
971
|
+
|
|
972
|
+
sage: # needs sage.rings.finite_rings
|
|
973
|
+
sage: k.<t> = GF(5^3)
|
|
974
|
+
sage: k.is_finite()
|
|
975
|
+
True
|
|
976
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
977
|
+
sage: S.<x> = k['x',Frob]
|
|
978
|
+
sage: S.is_finite()
|
|
979
|
+
False
|
|
980
|
+
"""
|
|
981
|
+
R = self.base_ring()
|
|
982
|
+
return R.is_finite() and R.order() == 1
|
|
983
|
+
|
|
984
|
+
def is_exact(self) -> bool:
|
|
985
|
+
r"""
|
|
986
|
+
Return ``True`` if elements of this Ore polynomial ring are exact.
|
|
987
|
+
|
|
988
|
+
This happens if and only if elements of the base ring are exact.
|
|
989
|
+
|
|
990
|
+
EXAMPLES::
|
|
991
|
+
|
|
992
|
+
sage: # needs sage.rings.finite_rings
|
|
993
|
+
sage: k.<t> = GF(5^3)
|
|
994
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
995
|
+
sage: S.<x> = k['x', Frob]
|
|
996
|
+
sage: S.is_exact()
|
|
997
|
+
True
|
|
998
|
+
sage: S.base_ring().is_exact()
|
|
999
|
+
True
|
|
1000
|
+
sage: R.<u> = k[[]]
|
|
1001
|
+
sage: sigma = R.hom([u + u^2])
|
|
1002
|
+
sage: T.<y> = R['y', sigma]
|
|
1003
|
+
sage: T.is_exact()
|
|
1004
|
+
False
|
|
1005
|
+
sage: T.base_ring().is_exact()
|
|
1006
|
+
False
|
|
1007
|
+
"""
|
|
1008
|
+
return self.base_ring().is_exact()
|
|
1009
|
+
|
|
1010
|
+
def is_sparse(self) -> bool:
|
|
1011
|
+
r"""
|
|
1012
|
+
Return ``True`` if the elements of this Ore polynomial ring are
|
|
1013
|
+
sparsely represented.
|
|
1014
|
+
|
|
1015
|
+
.. WARNING::
|
|
1016
|
+
|
|
1017
|
+
Since sparse Ore polynomials are not yet implemented, this
|
|
1018
|
+
function always returns ``False``.
|
|
1019
|
+
|
|
1020
|
+
EXAMPLES::
|
|
1021
|
+
|
|
1022
|
+
sage: R.<t> = RR[]
|
|
1023
|
+
sage: sigma = R.hom([t+1])
|
|
1024
|
+
sage: S.<x> = R['x',sigma]
|
|
1025
|
+
sage: S.is_sparse()
|
|
1026
|
+
False
|
|
1027
|
+
"""
|
|
1028
|
+
return self.__is_sparse
|
|
1029
|
+
|
|
1030
|
+
def ngens(self) -> int:
|
|
1031
|
+
r"""
|
|
1032
|
+
Return the number of generators of this Ore polynomial ring.
|
|
1033
|
+
|
|
1034
|
+
This is `1`.
|
|
1035
|
+
|
|
1036
|
+
EXAMPLES::
|
|
1037
|
+
|
|
1038
|
+
sage: R.<t> = RR[]
|
|
1039
|
+
sage: sigma = R.hom([t+1])
|
|
1040
|
+
sage: S.<x> = R['x',sigma]
|
|
1041
|
+
sage: S.ngens()
|
|
1042
|
+
1
|
|
1043
|
+
"""
|
|
1044
|
+
return 1
|
|
1045
|
+
|
|
1046
|
+
def random_element(self, degree=(-1, 2), monic=False, *args, **kwds):
|
|
1047
|
+
r"""
|
|
1048
|
+
Return a random Ore polynomial in this ring.
|
|
1049
|
+
|
|
1050
|
+
INPUT:
|
|
1051
|
+
|
|
1052
|
+
- ``degree`` -- (default: ``(-1,2)``) integer with degree
|
|
1053
|
+
or a tuple of integers with minimum and maximum degrees
|
|
1054
|
+
|
|
1055
|
+
- ``monic`` -- boolean (default: ``False``); if ``True``, return a monic
|
|
1056
|
+
Ore polynomial
|
|
1057
|
+
|
|
1058
|
+
- ``*args``, ``**kwds`` -- passed on to the ``random_element`` method
|
|
1059
|
+
for the base ring
|
|
1060
|
+
|
|
1061
|
+
OUTPUT:
|
|
1062
|
+
|
|
1063
|
+
Ore polynomial such that the coefficients of `x^i`, for `i` up
|
|
1064
|
+
to ``degree``, are random elements from the base ring, randomized
|
|
1065
|
+
subject to the arguments ``*args`` and ``**kwds``.
|
|
1066
|
+
|
|
1067
|
+
EXAMPLES::
|
|
1068
|
+
|
|
1069
|
+
sage: # needs sage.rings.finite_rings
|
|
1070
|
+
sage: k.<t> = GF(5^3)
|
|
1071
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
1072
|
+
sage: S.<x> = k['x', Frob]
|
|
1073
|
+
sage: S.random_element() # random
|
|
1074
|
+
(2*t^2 + 3)*x^2 + (4*t^2 + t + 4)*x + 2*t^2 + 2
|
|
1075
|
+
sage: S.random_element(monic=True) # random
|
|
1076
|
+
x^2 + (2*t^2 + t + 1)*x + 3*t^2 + 3*t + 2
|
|
1077
|
+
|
|
1078
|
+
Use ``degree`` to obtain polynomials of higher degree::
|
|
1079
|
+
|
|
1080
|
+
sage: # needs sage.rings.finite_rings
|
|
1081
|
+
sage: p = S.random_element(degree=5) # random
|
|
1082
|
+
(t^2 + 3*t)*x^5 + (4*t + 4)*x^3 + (4*t^2 + 4*t)*x^2 + (2*t^2 + 1)*x + 3
|
|
1083
|
+
sage: p.degree() == 5
|
|
1084
|
+
True
|
|
1085
|
+
|
|
1086
|
+
If a tuple of two integers is given for the degree argument, a random
|
|
1087
|
+
integer will be chosen between the first and second element of the
|
|
1088
|
+
tuple as the degree, both inclusive::
|
|
1089
|
+
|
|
1090
|
+
sage: S.random_element(degree=(2,7)) # random # needs sage.rings.finite_rings
|
|
1091
|
+
(3*t^2 + 1)*x^4 + (4*t + 2)*x^3 + (4*t + 1)*x^2
|
|
1092
|
+
+ (t^2 + 3*t + 3)*x + 3*t^2 + 2*t + 2
|
|
1093
|
+
|
|
1094
|
+
TESTS:
|
|
1095
|
+
|
|
1096
|
+
If the first tuple element is greater than the second, a
|
|
1097
|
+
:exc:`ValueError` is raised::
|
|
1098
|
+
|
|
1099
|
+
sage: S.random_element(degree=(5,4)) # needs sage.rings.finite_rings
|
|
1100
|
+
Traceback (most recent call last):
|
|
1101
|
+
...
|
|
1102
|
+
ValueError: first degree argument must be less or equal to the second
|
|
1103
|
+
|
|
1104
|
+
There is no monic polynomial of negative degree::
|
|
1105
|
+
|
|
1106
|
+
sage: S.random_element(degree=-1, monic=True) # needs sage.rings.finite_rings
|
|
1107
|
+
Traceback (most recent call last):
|
|
1108
|
+
...
|
|
1109
|
+
ValueError: there is no monic polynomial with negative degree
|
|
1110
|
+
"""
|
|
1111
|
+
R = self.base_ring()
|
|
1112
|
+
if isinstance(degree, (list, tuple)):
|
|
1113
|
+
if len(degree) != 2:
|
|
1114
|
+
raise ValueError("degree argument must be an integer or a tuple of 2 integers (min_degree, max_degree)")
|
|
1115
|
+
if degree[0] > degree[1]:
|
|
1116
|
+
raise ValueError("first degree argument must be less or equal to the second")
|
|
1117
|
+
degree = list(degree)
|
|
1118
|
+
else:
|
|
1119
|
+
degree = [degree, degree]
|
|
1120
|
+
if monic:
|
|
1121
|
+
degree[0] = max(0, degree[0])
|
|
1122
|
+
if degree[1] < 0:
|
|
1123
|
+
raise ValueError("there is no monic polynomial with negative degree")
|
|
1124
|
+
degree = randint(*degree)
|
|
1125
|
+
if degree < 0:
|
|
1126
|
+
return self.zero()
|
|
1127
|
+
coeffs = [R.random_element(*args, **kwds) for _ in range(degree)]
|
|
1128
|
+
if monic:
|
|
1129
|
+
return self(coeffs + [R.one()])
|
|
1130
|
+
else:
|
|
1131
|
+
return self(coeffs + [R._random_nonzero_element()])
|
|
1132
|
+
|
|
1133
|
+
def random_irreducible(self, degree=2, monic=True, *args, **kwds):
|
|
1134
|
+
r"""
|
|
1135
|
+
Return a random irreducible Ore polynomial.
|
|
1136
|
+
|
|
1137
|
+
.. WARNING::
|
|
1138
|
+
|
|
1139
|
+
Elements of this Ore polynomial ring need to have a method
|
|
1140
|
+
is_irreducible(). Currently, this method is implemented only
|
|
1141
|
+
when the base ring is a finite field.
|
|
1142
|
+
|
|
1143
|
+
INPUT:
|
|
1144
|
+
|
|
1145
|
+
- ``degree`` -- integer with degree (default: 2)
|
|
1146
|
+
or a tuple of integers with minimum and maximum degrees
|
|
1147
|
+
|
|
1148
|
+
- ``monic`` -- if ``True``, returns a monic Ore polynomial
|
|
1149
|
+
(default: ``True``)
|
|
1150
|
+
|
|
1151
|
+
- ``*args``, ``**kwds`` -- passed in to the ``random_element`` method for
|
|
1152
|
+
the base ring
|
|
1153
|
+
|
|
1154
|
+
EXAMPLES::
|
|
1155
|
+
|
|
1156
|
+
sage: # needs sage.rings.finite_rings
|
|
1157
|
+
sage: k.<t> = GF(5^3)
|
|
1158
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
1159
|
+
sage: S.<x> = k['x',Frob]
|
|
1160
|
+
sage: A = S.random_irreducible()
|
|
1161
|
+
sage: A.is_irreducible()
|
|
1162
|
+
True
|
|
1163
|
+
sage: B = S.random_irreducible(degree=3, monic=False)
|
|
1164
|
+
sage: B.is_irreducible()
|
|
1165
|
+
True
|
|
1166
|
+
"""
|
|
1167
|
+
if isinstance(degree, (list, tuple)):
|
|
1168
|
+
if len(degree) != 2:
|
|
1169
|
+
raise ValueError("degree argument must be an integer or a tuple of 2 integers (min_degree, max_degree)")
|
|
1170
|
+
if degree[0] > degree[1]:
|
|
1171
|
+
raise ValueError("minimum degree must be less or equal than maximum degree")
|
|
1172
|
+
degree = randint(*degree)
|
|
1173
|
+
while True:
|
|
1174
|
+
irred = self.random_element((degree, degree), monic=monic)
|
|
1175
|
+
if irred.is_irreducible():
|
|
1176
|
+
return irred
|
|
1177
|
+
|
|
1178
|
+
def is_field(self, proof=False) -> bool:
|
|
1179
|
+
r"""
|
|
1180
|
+
Return always ``False`` since Ore polynomial rings are never fields.
|
|
1181
|
+
|
|
1182
|
+
EXAMPLES::
|
|
1183
|
+
|
|
1184
|
+
sage: # needs sage.rings.finite_rings
|
|
1185
|
+
sage: k.<a> = GF(5^3)
|
|
1186
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
1187
|
+
sage: S.<x> = k['x', Frob]
|
|
1188
|
+
sage: S.is_field()
|
|
1189
|
+
False
|
|
1190
|
+
|
|
1191
|
+
TESTS:
|
|
1192
|
+
|
|
1193
|
+
We check that :issue:`31470` is fixed::
|
|
1194
|
+
|
|
1195
|
+
sage: # needs sage.rings.finite_rings
|
|
1196
|
+
sage: k.<a> = GF(5^3)
|
|
1197
|
+
sage: S.<x> = k['x', k.frobenius_endomorphism()]
|
|
1198
|
+
sage: zero_matrix(S, 2).row(0)
|
|
1199
|
+
...
|
|
1200
|
+
(0, 0)
|
|
1201
|
+
"""
|
|
1202
|
+
return False
|
|
1203
|
+
|
|
1204
|
+
def fraction_field(self):
|
|
1205
|
+
r"""
|
|
1206
|
+
Return the fraction field of this skew ring.
|
|
1207
|
+
|
|
1208
|
+
EXAMPLES::
|
|
1209
|
+
|
|
1210
|
+
sage: # needs sage.rings.finite_rings
|
|
1211
|
+
sage: k.<a> = GF(5^3)
|
|
1212
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
1213
|
+
sage: S.<x> = k['x', Frob]
|
|
1214
|
+
sage: K = S.fraction_field(); K
|
|
1215
|
+
Ore Function Field in x over Finite Field in a of size 5^3 twisted by a |--> a^5
|
|
1216
|
+
sage: f = 1/(x + a); f
|
|
1217
|
+
(x + a)^(-1)
|
|
1218
|
+
sage: f.parent() is K
|
|
1219
|
+
True
|
|
1220
|
+
|
|
1221
|
+
Below is another example with differentiel operators::
|
|
1222
|
+
|
|
1223
|
+
sage: R.<t> = QQ[]
|
|
1224
|
+
sage: der = R.derivation()
|
|
1225
|
+
sage: A.<d> = R['d', der]
|
|
1226
|
+
sage: A.fraction_field()
|
|
1227
|
+
Ore Function Field in d over Fraction Field of Univariate Polynomial Ring in t
|
|
1228
|
+
over Rational Field twisted by d/dt
|
|
1229
|
+
sage: f = t/d; f
|
|
1230
|
+
(d - 1/t)^(-1) * t
|
|
1231
|
+
sage: f*d
|
|
1232
|
+
t
|
|
1233
|
+
|
|
1234
|
+
.. SEEALSO::
|
|
1235
|
+
|
|
1236
|
+
:mod:`sage.rings.polynomial.ore_function_field`
|
|
1237
|
+
"""
|
|
1238
|
+
if self._fraction_field is None:
|
|
1239
|
+
if self.base_ring() in _Fields:
|
|
1240
|
+
self._fraction_field = self._fraction_field_class(self)
|
|
1241
|
+
else:
|
|
1242
|
+
base = self.base_ring().fraction_field()
|
|
1243
|
+
if self._derivation is None:
|
|
1244
|
+
twist = self._morphism.extend_to_fraction_field()
|
|
1245
|
+
else:
|
|
1246
|
+
twist = self._derivation.extend_to_fraction_field()
|
|
1247
|
+
name = self.variable_name()
|
|
1248
|
+
sparse = self.is_sparse()
|
|
1249
|
+
ring = OrePolynomialRing(base, twist, name, sparse)
|
|
1250
|
+
self._fraction_field = self._fraction_field_class(ring)
|
|
1251
|
+
self._fraction_field.register_coercion(self)
|
|
1252
|
+
return self._fraction_field
|
|
1253
|
+
|
|
1254
|
+
def quotient_module(self, P, names=None):
|
|
1255
|
+
r"""
|
|
1256
|
+
Return the quotient ring `A/AP` as a module over `A`
|
|
1257
|
+
where `A` is this Ore polynomial ring.
|
|
1258
|
+
|
|
1259
|
+
INPUT:
|
|
1260
|
+
|
|
1261
|
+
- ``names`` (default: ``None``) -- a string or a list
|
|
1262
|
+
of string, the names of the vector of the canonical
|
|
1263
|
+
basis
|
|
1264
|
+
|
|
1265
|
+
EXAMPLES::
|
|
1266
|
+
|
|
1267
|
+
sage: # needs sage.rings.finite_rings
|
|
1268
|
+
sage: k.<a> = GF(5^3)
|
|
1269
|
+
sage: S.<x> = k['a', k.frobenius_endomorphism()]
|
|
1270
|
+
sage: P = x^3 + a*x^2 + a^2 + 1
|
|
1271
|
+
sage: M = S.quotient_module(P)
|
|
1272
|
+
sage: M
|
|
1273
|
+
Ore module of rank 3 over Finite Field in a of size 5^3 twisted by a |--> a^5
|
|
1274
|
+
|
|
1275
|
+
The argument ``names`` can be used to give chosen names
|
|
1276
|
+
to the vectors in the canonical basis::
|
|
1277
|
+
|
|
1278
|
+
sage: M = S.quotient_module(P, names=('u', 'v', 'w')) # needs sage.rings.finite_rings
|
|
1279
|
+
sage: M.basis() # needs sage.rings.finite_rings
|
|
1280
|
+
[u, v, w]
|
|
1281
|
+
|
|
1282
|
+
or even::
|
|
1283
|
+
|
|
1284
|
+
sage: M = S.quotient_module(P, names='e') # needs sage.rings.finite_rings
|
|
1285
|
+
sage: M.basis() # needs sage.rings.finite_rings
|
|
1286
|
+
[e0, e1, e2]
|
|
1287
|
+
|
|
1288
|
+
Note that the bracket construction also works::
|
|
1289
|
+
|
|
1290
|
+
sage: M.<u,v,w> = S.quotient_module(P) # needs sage.rings.finite_rings
|
|
1291
|
+
sage: M.basis() # needs sage.rings.finite_rings
|
|
1292
|
+
[u, v, w]
|
|
1293
|
+
|
|
1294
|
+
With this construction, the vectors `u`, `v` and `w`
|
|
1295
|
+
are directly available in the namespace::
|
|
1296
|
+
|
|
1297
|
+
sage: x*u + v # needs sage.rings.finite_rings
|
|
1298
|
+
2*v
|
|
1299
|
+
|
|
1300
|
+
We refer to :mod:`sage.modules.ore_module` for a
|
|
1301
|
+
tutorial on Ore modules in SageMath.
|
|
1302
|
+
|
|
1303
|
+
.. SEEALSO::
|
|
1304
|
+
|
|
1305
|
+
:mod:`sage.modules.ore_module`
|
|
1306
|
+
"""
|
|
1307
|
+
from sage.matrix.special import companion_matrix
|
|
1308
|
+
from sage.modules.ore_module import OreModule, OreAction
|
|
1309
|
+
coeffs = self(P).right_monic().list()
|
|
1310
|
+
f = companion_matrix(coeffs, format='bottom')
|
|
1311
|
+
M = OreModule(f, self, names=names)
|
|
1312
|
+
M._unset_coercions_used()
|
|
1313
|
+
M.register_action(OreAction(self, M, True, operator.mul))
|
|
1314
|
+
return M
|
|
1315
|
+
|
|
1316
|
+
def _pushout_(self, other):
|
|
1317
|
+
r"""
|
|
1318
|
+
Return the pushout of this Ore polynomial ring and ``other``.
|
|
1319
|
+
|
|
1320
|
+
TESTS::
|
|
1321
|
+
|
|
1322
|
+
sage: # needs sage.rings.finite_rings
|
|
1323
|
+
sage: from sage.categories.pushout import pushout
|
|
1324
|
+
sage: k.<a> = GF(5^3)
|
|
1325
|
+
sage: Frob = k.frobenius_endomorphism()
|
|
1326
|
+
sage: S = k['x', Frob]
|
|
1327
|
+
sage: K = S.fraction_field()
|
|
1328
|
+
sage: Z = K.center()
|
|
1329
|
+
sage: pushout(S,Z) # indirect doctest
|
|
1330
|
+
Ore Function Field in x over Finite Field in a of size 5^3 twisted by a |--> a^5
|
|
1331
|
+
"""
|
|
1332
|
+
frac = self._fraction_field
|
|
1333
|
+
if frac is not None and frac.has_coerce_map_from(other):
|
|
1334
|
+
return frac
|