passagemath-modules 10.5.32__cp310-cp310-macosx_14_0_arm64.whl → 10.6.20__cp310-cp310-macosx_14_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-modules might be problematic. Click here for more details.
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/METADATA +51 -46
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/RECORD +333 -323
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/WHEEL +1 -1
- passagemath_modules.dylibs/libgcc_s.1.1.dylib +0 -0
- passagemath_modules.dylibs/libgfortran.5.dylib +0 -0
- passagemath_modules.dylibs/libgsl.28.dylib +0 -0
- passagemath_modules.dylibs/libmpc.3.dylib +0 -0
- passagemath_modules.dylibs/libopenblasp-r0.3.29.dylib +0 -0
- passagemath_modules.dylibs/libquadmath.0.dylib +0 -0
- sage/algebras/clifford_algebra.py +2 -2
- sage/algebras/clifford_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/clifford_algebra_element.pyx +4 -2
- sage/algebras/exterior_algebra_groebner.cpython-310-darwin.so +0 -0
- sage/algebras/exterior_algebra_groebner.pyx +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra.py +83 -5
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +2 -0
- sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pyx +28 -3
- sage/algebras/finite_gca.py +1 -1
- sage/algebras/lie_algebras/bgg_dual_module.py +18 -11
- sage/algebras/lie_algebras/classical_lie_algebra.py +3 -3
- sage/algebras/lie_algebras/examples.py +2 -2
- sage/algebras/lie_algebras/free_lie_algebra.py +1 -1
- sage/algebras/lie_algebras/heisenberg.py +4 -4
- sage/algebras/lie_algebras/lie_algebra.py +1 -1
- sage/algebras/lie_algebras/lie_algebra_element.cpython-310-darwin.so +0 -0
- sage/algebras/lie_algebras/lie_algebra_element.pyx +65 -28
- sage/algebras/lie_algebras/quotient.py +40 -29
- sage/algebras/lie_algebras/subalgebra.py +76 -53
- sage/algebras/lie_algebras/verma_module.py +1 -3
- sage/algebras/octonion_algebra.cpython-310-darwin.so +0 -0
- sage/algebras/octonion_algebra.pyx +1 -1
- sage/algebras/orlik_solomon.py +4 -4
- sage/algebras/orlik_terao.py +4 -4
- sage/algebras/steenrod/steenrod_algebra.py +37 -30
- sage/algebras/steenrod/steenrod_algebra_bases.py +2 -2
- sage/algebras/steenrod/steenrod_algebra_misc.py +4 -4
- sage/algebras/steenrod/steenrod_algebra_mult.py +2 -2
- sage/all__sagemath_modules.py +1 -0
- sage/calculus/integration.cpython-310-darwin.so +0 -0
- sage/calculus/integration.pyx +6 -5
- sage/calculus/interpolation.cpython-310-darwin.so +0 -0
- sage/calculus/interpolators.cpython-310-darwin.so +0 -0
- sage/calculus/ode.cpython-310-darwin.so +0 -0
- sage/calculus/ode.pxd +2 -2
- sage/calculus/ode.pyx +6 -4
- sage/calculus/riemann.cpython-310-darwin.so +0 -0
- sage/calculus/riemann.pyx +68 -48
- sage/calculus/transforms/dwt.cpython-310-darwin.so +0 -0
- sage/calculus/transforms/fft.cpython-310-darwin.so +0 -0
- sage/coding/ag_code_decoders.cpython-310-darwin.so +0 -0
- sage/coding/ag_code_decoders.pyx +31 -31
- sage/coding/binary_code.cpython-310-darwin.so +0 -0
- sage/coding/binary_code.pxd +6 -6
- sage/coding/binary_code.pyx +212 -173
- sage/coding/guruswami_sudan/utils.py +3 -5
- sage/coding/kasami_codes.cpython-310-darwin.so +0 -0
- sage/coding/kasami_codes.pyx +20 -24
- sage/coding/linear_code.py +2 -2
- sage/coding/linear_code_no_metric.py +5 -5
- sage/coding/linear_rank_metric.py +81 -19
- sage/combinat/cartesian_product.py +1 -1
- sage/combinat/free_module.py +22 -2
- sage/combinat/root_system/all.py +1 -1
- sage/combinat/root_system/ambient_space.py +1 -1
- sage/combinat/root_system/associahedron.py +4 -4
- sage/combinat/root_system/braid_move_calculator.py +2 -2
- sage/combinat/root_system/braid_orbit.cpython-310-darwin.so +0 -0
- sage/combinat/root_system/braid_orbit.pyx +1 -1
- sage/combinat/root_system/branching_rules.py +3 -3
- sage/combinat/root_system/cartan_type.py +14 -14
- sage/combinat/root_system/coxeter_group.py +3 -3
- sage/combinat/root_system/coxeter_matrix.py +1 -1
- sage/combinat/root_system/coxeter_type.py +12 -1
- sage/combinat/root_system/extended_affine_weyl_group.py +9 -9
- sage/combinat/root_system/fundamental_group.py +3 -5
- sage/combinat/root_system/hecke_algebra_representation.py +1 -1
- sage/combinat/root_system/integrable_representations.py +1 -1
- sage/combinat/root_system/pieri_factors.py +3 -3
- sage/combinat/root_system/root_lattice_realization_algebras.py +1 -1
- sage/combinat/root_system/root_lattice_realizations.py +1 -1
- sage/combinat/root_system/type_folded.py +3 -3
- sage/combinat/root_system/type_reducible.py +8 -7
- sage/combinat/root_system/type_super_A.py +2 -2
- sage/combinat/root_system/weight_lattice_realizations.py +9 -8
- sage/combinat/root_system/weyl_characters.py +2 -2
- sage/crypto/__init__.py +1 -0
- sage/crypto/block_cipher/des.py +1 -1
- sage/crypto/block_cipher/miniaes.py +3 -3
- sage/crypto/block_cipher/present.py +3 -3
- sage/crypto/block_cipher/sdes.py +3 -3
- sage/crypto/boolean_function.cpython-310-darwin.so +0 -0
- sage/crypto/boolean_function.pyx +22 -23
- sage/crypto/key_exchange/diffie_hellman.py +4 -9
- sage/crypto/mq/sr.py +1 -1
- sage/crypto/public_key/blum_goldwasser.py +3 -3
- sage/crypto/sbox.cpython-310-darwin.so +0 -0
- sage/crypto/sbox.pyx +1 -1
- sage/crypto/sboxes.py +22 -0
- sage/crypto/util.py +4 -6
- sage/ext/interpreters/__init__.py +1 -1
- sage/ext/interpreters/all__sagemath_modules.py +1 -1
- sage/ext/interpreters/wrapper_cc.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_cc.pxd +5 -5
- sage/ext/interpreters/wrapper_cc.pyx +1 -1
- sage/ext/interpreters/wrapper_cdf.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_cdf.pxd +5 -7
- sage/ext/interpreters/wrapper_cdf.pyx +4 -10
- sage/ext/interpreters/wrapper_rdf.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_rdf.pxd +1 -1
- sage/ext/interpreters/wrapper_rdf.pyx +1 -1
- sage/ext/interpreters/wrapper_rr.cpython-310-darwin.so +0 -0
- sage/ext/interpreters/wrapper_rr.pxd +5 -5
- sage/ext/interpreters/wrapper_rr.pyx +1 -2
- sage/geometry/toric_lattice.py +3 -3
- sage/geometry/toric_lattice_element.cpython-310-darwin.so +0 -0
- sage/groups/additive_abelian/additive_abelian_group.py +1 -1
- sage/groups/additive_abelian/qmodnz.py +4 -4
- sage/groups/matrix_gps/coxeter_group.py +17 -4
- sage/groups/matrix_gps/group_element.cpython-310-darwin.so +0 -0
- sage/groups/misc_gps/argument_groups.py +2 -2
- sage/groups/misc_gps/imaginary_groups.py +4 -4
- sage/groups/perm_gps/partn_ref/refinement_binary.cpython-310-darwin.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_matrices.cpython-310-darwin.so +0 -0
- sage/homology/chain_complex.py +0 -2
- sage/homology/hochschild_complex.py +3 -3
- sage/homology/homology_morphism.py +6 -6
- sage/homology/homology_vector_space_with_basis.py +1 -1
- sage/libs/gsl/array.cpython-310-darwin.so +0 -0
- sage/libs/mpmath/utils.cpython-310-darwin.so +0 -0
- sage/matrix/action.cpython-310-darwin.so +0 -0
- sage/matrix/args.cpython-310-darwin.so +0 -0
- sage/matrix/args.pyx +25 -10
- sage/matrix/benchmark.py +8 -4
- sage/matrix/compute_J_ideal.py +2 -2
- sage/matrix/constructor.cpython-310-darwin.so +0 -0
- sage/matrix/echelon_matrix.cpython-310-darwin.so +0 -0
- sage/matrix/echelon_matrix.pyx +1 -1
- sage/matrix/matrix0.cpython-310-darwin.so +0 -0
- sage/matrix/matrix0.pxd +3 -3
- sage/matrix/matrix0.pyx +7 -5
- sage/matrix/matrix1.cpython-310-darwin.so +0 -0
- sage/matrix/matrix1.pyx +87 -48
- sage/matrix/matrix2.cpython-310-darwin.so +0 -0
- sage/matrix/matrix2.pxd +3 -3
- sage/matrix/matrix2.pyx +1261 -63
- sage/matrix/matrix_cdv.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_complex_double_dense.pyx +1 -1
- sage/matrix/matrix_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_dense.pyx +2 -3
- sage/matrix/matrix_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_double_dense.pyx +11 -5
- sage/matrix/matrix_double_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_generic_sparse.pyx +1 -1
- sage/matrix/matrix_laurent_mpolynomial_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_numpy_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_numpy_integer_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_polynomial_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_polynomial_dense.pyx +952 -261
- sage/matrix/matrix_real_double_dense.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_sparse.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_sparse.pyx +6 -7
- sage/matrix/matrix_window.cpython-310-darwin.so +0 -0
- sage/matrix/matrix_window.pyx +2 -2
- sage/matrix/misc_mpfr.cpython-310-darwin.so +0 -0
- sage/matrix/operation_table.py +0 -2
- sage/matrix/special.py +5 -1
- sage/matrix/strassen.cpython-310-darwin.so +0 -0
- sage/matrix/strassen.pyx +1 -1
- sage/matroids/basis_exchange_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/basis_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/chow_ring.py +68 -65
- sage/matroids/chow_ring_ideal.py +41 -38
- sage/matroids/circuit_closures_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/circuits_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/database_matroids.py +16 -5
- sage/matroids/dual_matroid.py +2 -2
- sage/matroids/extension.cpython-310-darwin.so +0 -0
- sage/matroids/flats_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/gammoid.py +1 -1
- sage/matroids/graphic_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/graphic_matroid.pyx +3 -3
- sage/matroids/lean_matrix.cpython-310-darwin.so +0 -0
- sage/matroids/lean_matrix.pyx +22 -22
- sage/matroids/linear_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/linear_matroid.pyx +13 -13
- sage/matroids/matroid.cpython-310-darwin.so +0 -0
- sage/matroids/matroid.pyx +15 -15
- sage/matroids/matroids_plot_helpers.py +48 -46
- sage/matroids/minor_matroid.py +2 -2
- sage/matroids/set_system.cpython-310-darwin.so +0 -0
- sage/matroids/transversal_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/transversal_matroid.pyx +3 -3
- sage/matroids/union_matroid.cpython-310-darwin.so +0 -0
- sage/matroids/union_matroid.pyx +3 -0
- sage/matroids/unpickling.cpython-310-darwin.so +0 -0
- sage/matroids/utilities.py +2 -2
- sage/misc/c3.cpython-310-darwin.so +0 -0
- sage/misc/compat.py +1 -2
- sage/misc/pickle_old.cpython-310-darwin.so +0 -0
- sage/modules/diamond_cutting.py +117 -30
- sage/modules/fg_pid/fgp_module.py +3 -3
- sage/modules/filtered_vector_space.py +4 -4
- sage/modules/finite_submodule_iter.cpython-310-darwin.so +0 -0
- sage/modules/fp_graded/free_module.py +2 -2
- sage/modules/fp_graded/module.py +2 -2
- sage/modules/fp_graded/morphism.py +4 -4
- sage/modules/fp_graded/steenrod/morphism.py +1 -1
- sage/modules/free_module.py +162 -26
- sage/modules/free_module_element.cpython-310-darwin.so +0 -0
- sage/modules/free_module_element.pyx +4 -4
- sage/modules/free_module_integer.py +2 -2
- sage/modules/free_module_morphism.py +3 -3
- sage/modules/free_module_pseudohomspace.py +352 -0
- sage/modules/free_module_pseudomorphism.py +578 -0
- sage/modules/free_quadratic_module_integer_symmetric.py +24 -13
- sage/modules/matrix_morphism.py +9 -9
- sage/modules/multi_filtered_vector_space.py +4 -4
- sage/modules/ore_module.py +2208 -0
- sage/modules/ore_module_element.py +178 -0
- sage/modules/ore_module_homspace.py +147 -0
- sage/modules/ore_module_morphism.py +968 -0
- sage/modules/quotient_module.py +11 -1
- sage/modules/submodule.py +1 -1
- sage/modules/torsion_quadratic_module.py +1 -1
- sage/modules/vector_complex_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_integer_sparse.pyx +4 -4
- sage/modules/vector_modn_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_modn_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_numpy_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_numpy_integer_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_dense.pyx +1 -1
- sage/modules/vector_rational_sparse.cpython-310-darwin.so +0 -0
- sage/modules/vector_rational_sparse.pyx +5 -5
- sage/modules/vector_real_double_dense.cpython-310-darwin.so +0 -0
- sage/modules/vector_space_morphism.py +2 -2
- sage/modules/with_basis/cell_module.py +17 -0
- sage/modules/with_basis/indexed_element.cpython-310-darwin.so +0 -0
- sage/modules/with_basis/indexed_element.pyx +1 -1
- sage/modules/with_basis/invariant.py +1 -1
- sage/modules/with_basis/representation.py +0 -1
- sage/modules/with_basis/subquotient.py +2 -2
- sage/numerical/gauss_legendre.cpython-310-darwin.so +0 -0
- sage/probability/probability_distribution.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/binary_qf.py +11 -11
- sage/quadratic_forms/bqf_class_group.py +26 -92
- sage/quadratic_forms/count_local_2.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/extras.py +1 -1
- sage/quadratic_forms/quadratic_form.py +5 -4
- sage/quadratic_forms/quadratic_form__equivalence_testing.py +7 -4
- sage/quadratic_forms/quadratic_form__evaluate.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/quadratic_form__local_field_invariants.py +10 -10
- sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +2 -2
- sage/quadratic_forms/ternary.cpython-310-darwin.so +0 -0
- sage/quadratic_forms/ternary_qf.py +50 -83
- sage/rings/cfinite_sequence.py +16 -17
- sage/rings/complex_conversion.cpython-310-darwin.so +0 -0
- sage/rings/complex_double.cpython-310-darwin.so +0 -0
- sage/rings/complex_double.pxd +1 -0
- sage/rings/complex_double.pyx +37 -32
- sage/rings/complex_mpc.cpython-310-darwin.so +0 -0
- sage/rings/complex_mpc.pyx +27 -23
- sage/rings/complex_mpfr.cpython-310-darwin.so +0 -0
- sage/rings/complex_mpfr.pyx +11 -11
- sage/rings/function_field/drinfeld_modules/charzero_drinfeld_module.py +277 -21
- sage/rings/function_field/drinfeld_modules/drinfeld_module.py +10 -1
- sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +1 -1
- sage/rings/function_field/drinfeld_modules/homset.py +1 -2
- sage/rings/function_field/drinfeld_modules/morphism.py +2 -2
- sage/rings/function_field/hermite_form_polynomial.cpython-310-darwin.so +0 -0
- sage/rings/function_field/khuri_makdisi.cpython-310-darwin.so +0 -0
- sage/rings/function_field/khuri_makdisi.pyx +27 -25
- sage/rings/invariants/invariant_theory.py +61 -60
- sage/rings/invariants/reconstruction.py +8 -8
- sage/rings/polynomial/laurent_polynomial_mpair.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/ore_function_element.py +1 -1
- sage/rings/polynomial/ore_polynomial_element.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/ore_polynomial_element.pyx +8 -8
- sage/rings/polynomial/ore_polynomial_ring.py +134 -17
- sage/rings/polynomial/polynomial_real_mpfr_dense.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_element.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_field.pyx +3 -4
- sage/rings/polynomial/skew_polynomial_finite_order.cpython-310-darwin.so +0 -0
- sage/rings/polynomial/skew_polynomial_finite_order.pyx +2 -5
- sage/rings/real_double_element_gsl.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfr.cpython-310-darwin.so +0 -0
- sage/rings/real_mpfr.pyx +25 -7
- sage/rings/ring_extension.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension.pyx +4 -2
- sage/rings/ring_extension_conversion.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension_element.cpython-310-darwin.so +0 -0
- sage/rings/ring_extension_element.pyx +42 -0
- sage/rings/ring_extension_morphism.cpython-310-darwin.so +0 -0
- sage/schemes/all__sagemath_modules.py +1 -0
- sage/schemes/projective/all__sagemath_modules.py +1 -0
- sage/schemes/projective/coherent_sheaf.py +300 -0
- sage/schemes/projective/cohomology.py +510 -0
- sage/stats/basic_stats.py +17 -15
- sage/stats/distributions/dgs_misc.h +11 -4
- sage/stats/distributions/discrete_gaussian_integer.cpython-310-darwin.so +0 -0
- sage/stats/distributions/discrete_gaussian_integer.pyx +9 -7
- sage/stats/hmm/chmm.cpython-310-darwin.so +0 -0
- sage/stats/hmm/chmm.pyx +13 -13
- sage/stats/hmm/distributions.cpython-310-darwin.so +0 -0
- sage/stats/hmm/distributions.pxd +3 -3
- sage/stats/hmm/distributions.pyx +3 -3
- sage/stats/hmm/hmm.cpython-310-darwin.so +0 -0
- sage/stats/hmm/hmm.pxd +3 -3
- sage/stats/hmm/hmm.pyx +6 -6
- sage/stats/hmm/util.cpython-310-darwin.so +0 -0
- sage/stats/hmm/util.pyx +6 -6
- sage/stats/intlist.cpython-310-darwin.so +0 -0
- sage/stats/intlist.pxd +3 -3
- sage/stats/time_series.cpython-310-darwin.so +0 -0
- sage/tensor/modules/alternating_contr_tensor.py +3 -3
- sage/tensor/modules/comp.py +3 -3
- sage/tensor/modules/ext_pow_free_module.py +3 -3
- sage/tensor/modules/format_utilities.py +3 -3
- sage/tensor/modules/free_module_linear_group.py +3 -3
- sage/tensor/modules/free_module_morphism.py +0 -1
- sage/tensor/modules/tensor_free_module.py +3 -3
- sage/tensor/modules/tensor_free_submodule.py +1 -1
- sage/tensor/modules/tensor_free_submodule_basis.py +1 -1
- sage/tensor/modules/tensor_with_indices.py +5 -5
- passagemath_modules.dylibs/libopenblas_armv8p-r0.3.28.dylib +0 -0
- {passagemath_modules-10.5.32.dist-info → passagemath_modules-10.6.20.dist-info}/top_level.txt +0 -0
|
@@ -46,6 +46,7 @@ AUTHOR:
|
|
|
46
46
|
# https://www.gnu.org/licenses/
|
|
47
47
|
# ***************************************************************************
|
|
48
48
|
|
|
49
|
+
import operator
|
|
49
50
|
from sage.categories.algebras import Algebras
|
|
50
51
|
from sage.categories.commutative_rings import CommutativeRings
|
|
51
52
|
from sage.categories.morphism import Morphism
|
|
@@ -338,15 +339,17 @@ class OrePolynomialRing(UniqueRepresentation, Parent):
|
|
|
338
339
|
Univariate Polynomial Ring in x over Finite Field in a of size 5^2
|
|
339
340
|
sage: S.<x> = OrePolynomialRing(k, Frob, polcast=False)
|
|
340
341
|
sage: S
|
|
341
|
-
Ore Polynomial Ring in x over Finite Field in a of size 5^2
|
|
342
|
+
Ore Polynomial Ring in x over Finite Field in a of size 5^2 untwisted
|
|
342
343
|
"""
|
|
343
344
|
if base_ring not in CommutativeRings():
|
|
344
345
|
raise TypeError('base_ring must be a commutative ring')
|
|
345
|
-
if
|
|
346
|
+
if twist is None:
|
|
347
|
+
morphism = derivation = None
|
|
348
|
+
elif isinstance(twist, Morphism):
|
|
346
349
|
if (twist.domain() is not base_ring
|
|
347
350
|
or twist.codomain() is not base_ring):
|
|
348
351
|
raise TypeError("the twisting morphism must be an endomorphism of base_ring (=%s)" % base_ring)
|
|
349
|
-
if twist.is_identity()
|
|
352
|
+
if twist.is_identity():
|
|
350
353
|
morphism = None
|
|
351
354
|
else:
|
|
352
355
|
morphism = twist
|
|
@@ -360,6 +363,8 @@ class OrePolynomialRing(UniqueRepresentation, Parent):
|
|
|
360
363
|
derivation = twist
|
|
361
364
|
else:
|
|
362
365
|
derivation = None
|
|
366
|
+
elif twist is None:
|
|
367
|
+
morphism = derivation = None
|
|
363
368
|
else:
|
|
364
369
|
raise TypeError("the twisting map must be a ring morphism or a derivation")
|
|
365
370
|
if names is None:
|
|
@@ -621,6 +626,65 @@ class OrePolynomialRing(UniqueRepresentation, Parent):
|
|
|
621
626
|
if P.variable_name() == self.variable_name():
|
|
622
627
|
return base_ring.has_coerce_map_from(P.base_ring())
|
|
623
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
|
+
|
|
624
688
|
def _repr_(self) -> str:
|
|
625
689
|
r"""
|
|
626
690
|
Return a string representation of ``self``.
|
|
@@ -638,13 +702,7 @@ class OrePolynomialRing(UniqueRepresentation, Parent):
|
|
|
638
702
|
sage: T
|
|
639
703
|
Ore Polynomial Ring in d over Univariate Polynomial Ring in t over Rational Field twisted by d/dt
|
|
640
704
|
"""
|
|
641
|
-
s = "Ore Polynomial Ring in %s over %s
|
|
642
|
-
if self._derivation is None:
|
|
643
|
-
s += self._morphism._repr_short()
|
|
644
|
-
else:
|
|
645
|
-
if self._morphism is not None:
|
|
646
|
-
s += "%s and " % self._morphism._repr_short()
|
|
647
|
-
s += self._derivation._repr_()
|
|
705
|
+
s = "Ore Polynomial Ring in %s over %s %s" % (self.variable_name(), self.base_ring(), self._repr_twist())
|
|
648
706
|
if self.is_sparse():
|
|
649
707
|
s = "Sparse " + s
|
|
650
708
|
return s
|
|
@@ -670,12 +728,9 @@ class OrePolynomialRing(UniqueRepresentation, Parent):
|
|
|
670
728
|
"""
|
|
671
729
|
from sage.misc.latex import latex
|
|
672
730
|
s = "%s\\left[%s" % (latex(self.base_ring()), self.latex_variable_names()[0])
|
|
673
|
-
|
|
674
|
-
if
|
|
675
|
-
s +=
|
|
676
|
-
sep = ","
|
|
677
|
-
if self._derivation is not None:
|
|
678
|
-
s += sep + latex(self._derivation)
|
|
731
|
+
twist = self._latex_twist()
|
|
732
|
+
if twist != "":
|
|
733
|
+
s += ";" + twist
|
|
679
734
|
return s + "\\right]"
|
|
680
735
|
|
|
681
736
|
def change_var(self, var):
|
|
@@ -704,7 +759,7 @@ class OrePolynomialRing(UniqueRepresentation, Parent):
|
|
|
704
759
|
else:
|
|
705
760
|
twist = self._derivation
|
|
706
761
|
return OrePolynomialRing(self.base_ring(), twist, names=var,
|
|
707
|
-
sparse=self.__is_sparse)
|
|
762
|
+
sparse=self.__is_sparse, polcast=False)
|
|
708
763
|
|
|
709
764
|
def characteristic(self):
|
|
710
765
|
r"""
|
|
@@ -1196,6 +1251,68 @@ class OrePolynomialRing(UniqueRepresentation, Parent):
|
|
|
1196
1251
|
self._fraction_field.register_coercion(self)
|
|
1197
1252
|
return self._fraction_field
|
|
1198
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
|
+
|
|
1199
1316
|
def _pushout_(self, other):
|
|
1200
1317
|
r"""
|
|
1201
1318
|
Return the pushout of this Ore polynomial ring and ``other``.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -238,7 +238,7 @@ cdef class SkewPolynomial_finite_field_dense(SkewPolynomial_finite_order_dense):
|
|
|
238
238
|
cdef Py_ssize_t i, j, t, r = skew_ring._order
|
|
239
239
|
cdef Polynomial dd, xx, yy, zz
|
|
240
240
|
cdef Integer exp
|
|
241
|
-
cdef list lM
|
|
241
|
+
cdef list lM
|
|
242
242
|
cdef bint char2
|
|
243
243
|
|
|
244
244
|
center = parent(N)
|
|
@@ -755,13 +755,12 @@ cdef class SkewPolynomial_finite_field_dense(SkewPolynomial_finite_order_dense):
|
|
|
755
755
|
del a[0]
|
|
756
756
|
val += 1
|
|
757
757
|
|
|
758
|
-
cdef Py_ssize_t
|
|
758
|
+
cdef Py_ssize_t degrandom, m, mP, i
|
|
759
759
|
cdef N
|
|
760
760
|
cdef list factors = [ (skew_ring.gen(), val) ]
|
|
761
761
|
cdef SkewPolynomial_finite_field_dense P, Q, P1, NS, g, right, Pn
|
|
762
762
|
cdef unit = self.leading_coefficient()
|
|
763
763
|
cdef Polynomial gencenter = skew_ring._working_center.gen()
|
|
764
|
-
cdef Py_ssize_t p = skew_ring.characteristic()
|
|
765
764
|
cdef F = self._reduced_norm_factored()
|
|
766
765
|
|
|
767
766
|
for N, m in F:
|
|
@@ -947,7 +946,7 @@ cdef class SkewPolynomial_finite_field_dense(SkewPolynomial_finite_order_dense):
|
|
|
947
946
|
(x + t^2 + 4) * (x + t + 3) * (x + t)
|
|
948
947
|
|
|
949
948
|
However, the algorithm is probabilistic. Hence if we first
|
|
950
|
-
|
|
949
|
+
reinitialize `a`, we may get a different answer::
|
|
951
950
|
|
|
952
951
|
sage: a = x^3 + (t^2 + 4*t + 2)*x^2 + (3*t + 3)*x + t^2 + 1
|
|
953
952
|
sage: F = a.factor(); F # random
|
|
Binary file
|
|
@@ -132,7 +132,6 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
|
|
|
132
132
|
cdef Py_ssize_t i, j, deb, k, r = self.parent()._order
|
|
133
133
|
cdef Py_ssize_t d = self.degree ()
|
|
134
134
|
cdef Parent base_ring = <Parent?>self.parent().base_ring()
|
|
135
|
-
cdef RingElement minusone = <RingElement?>base_ring(-1)
|
|
136
135
|
cdef RingElement zero = <RingElement?>base_ring(0)
|
|
137
136
|
cdef Polk = PolynomialRing (base_ring, 'xr')
|
|
138
137
|
cdef list M = []
|
|
@@ -385,7 +384,7 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
|
|
|
385
384
|
for more details about this).
|
|
386
385
|
The user can speciify different names if desired::
|
|
387
386
|
|
|
388
|
-
sage: a.reduced_charpoly(var='T') # variable name for the
|
|
387
|
+
sage: a.reduced_charpoly(var='T') # variable name for the characteristic polynomial
|
|
389
388
|
T^3 + (2*z + 1)*T^2 + (3*z^2 + 4*z)*T + 4*z^3 + z^2 + 1
|
|
390
389
|
|
|
391
390
|
sage: a.reduced_charpoly(var=('T', 'c'))
|
|
@@ -396,8 +395,6 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
|
|
|
396
395
|
:meth:`reduced_trace`, :meth:`reduced_norm`
|
|
397
396
|
"""
|
|
398
397
|
if self._charpoly is None:
|
|
399
|
-
parent = self._parent
|
|
400
|
-
section = parent._embed_constants.section()
|
|
401
398
|
M = self._matmul_c()
|
|
402
399
|
chi = M.charpoly()
|
|
403
400
|
self._charpoly = [tuple(c.list()) for c in chi.list()]
|
|
@@ -407,7 +404,7 @@ cdef class SkewPolynomial_finite_order_dense(SkewPolynomial_generic_dense):
|
|
|
407
404
|
if var is None:
|
|
408
405
|
varcharpoly = 'x'
|
|
409
406
|
elif isinstance(var, (tuple, list)) and len(var) == 2:
|
|
410
|
-
|
|
407
|
+
varcharpoly, varcenter = var
|
|
411
408
|
else:
|
|
412
409
|
varcharpoly = var
|
|
413
410
|
center = self.parent().center(name=varcenter)
|
|
Binary file
|
|
Binary file
|
sage/rings/real_mpfr.pyx
CHANGED
|
@@ -906,16 +906,16 @@ cdef class RealField_class(sage.rings.abc.RealField):
|
|
|
906
906
|
"""
|
|
907
907
|
return 1
|
|
908
908
|
|
|
909
|
-
def gens(self):
|
|
909
|
+
def gens(self) -> tuple:
|
|
910
910
|
"""
|
|
911
|
-
Return a
|
|
911
|
+
Return a tuple of generators.
|
|
912
912
|
|
|
913
913
|
EXAMPLES::
|
|
914
914
|
|
|
915
915
|
sage: RR.gens()
|
|
916
|
-
|
|
916
|
+
(1.00000000000000,)
|
|
917
917
|
"""
|
|
918
|
-
return
|
|
918
|
+
return (self.gen(),)
|
|
919
919
|
|
|
920
920
|
def _is_valid_homomorphism_(self, codomain, im_gens, base_map=None):
|
|
921
921
|
"""
|
|
@@ -2656,7 +2656,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
|
|
2656
2656
|
return x
|
|
2657
2657
|
|
|
2658
2658
|
# Bit shifting
|
|
2659
|
-
def _lshift_(RealNumber self, n):
|
|
2659
|
+
def _lshift_(RealNumber self, Integer n):
|
|
2660
2660
|
"""
|
|
2661
2661
|
Return ``self * (2^n)`` for an integer ``n``.
|
|
2662
2662
|
|
|
@@ -2667,6 +2667,8 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
|
|
2667
2667
|
sage: RR(1.5)._lshift_(2)
|
|
2668
2668
|
6.00000000000000
|
|
2669
2669
|
"""
|
|
2670
|
+
if n < 0:
|
|
2671
|
+
return self._rshift_(-n)
|
|
2670
2672
|
cdef RealNumber x
|
|
2671
2673
|
if n > sys.maxsize:
|
|
2672
2674
|
raise OverflowError("n (=%s) must be <= %s" % (n, sys.maxsize))
|
|
@@ -2686,6 +2688,15 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
|
|
2686
2688
|
Traceback (most recent call last):
|
|
2687
2689
|
...
|
|
2688
2690
|
TypeError: unsupported operands for <<
|
|
2691
|
+
|
|
2692
|
+
TESTS::
|
|
2693
|
+
|
|
2694
|
+
sage: 32r << 2.5
|
|
2695
|
+
Traceback (most recent call last):
|
|
2696
|
+
...
|
|
2697
|
+
TypeError: unsupported operands for <<
|
|
2698
|
+
sage: 1.5 << -2
|
|
2699
|
+
0.375000000000000
|
|
2689
2700
|
"""
|
|
2690
2701
|
if not isinstance(x, RealNumber):
|
|
2691
2702
|
raise TypeError("unsupported operands for <<")
|
|
@@ -2694,7 +2705,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
|
|
2694
2705
|
except TypeError:
|
|
2695
2706
|
raise TypeError("unsupported operands for <<")
|
|
2696
2707
|
|
|
2697
|
-
def _rshift_(RealNumber self, n):
|
|
2708
|
+
def _rshift_(RealNumber self, Integer n):
|
|
2698
2709
|
"""
|
|
2699
2710
|
Return ``self / (2^n)`` for an integer ``n``.
|
|
2700
2711
|
|
|
@@ -2705,6 +2716,8 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
|
|
2705
2716
|
sage: RR(1.5)._rshift_(2)
|
|
2706
2717
|
0.375000000000000
|
|
2707
2718
|
"""
|
|
2719
|
+
if n < 0:
|
|
2720
|
+
return self._lshift_(-n)
|
|
2708
2721
|
if n > sys.maxsize:
|
|
2709
2722
|
raise OverflowError("n (=%s) must be <= %s" % (n, sys.maxsize))
|
|
2710
2723
|
cdef RealNumber x = self._new()
|
|
@@ -2723,6 +2736,11 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
|
|
2723
2736
|
Traceback (most recent call last):
|
|
2724
2737
|
...
|
|
2725
2738
|
TypeError: unsupported operands for >>
|
|
2739
|
+
|
|
2740
|
+
TESTS::
|
|
2741
|
+
|
|
2742
|
+
sage: 1.5 >> -2
|
|
2743
|
+
6.00000000000000
|
|
2726
2744
|
"""
|
|
2727
2745
|
if not isinstance(x, RealNumber):
|
|
2728
2746
|
raise TypeError("unsupported operands for >>")
|
|
@@ -5399,7 +5417,7 @@ cdef class RealNumber(sage.structure.element.RingElement):
|
|
|
5399
5417
|
sage: r.algebraic_dependency(5) # needs fpylll
|
|
5400
5418
|
x^2 - 2
|
|
5401
5419
|
"""
|
|
5402
|
-
return sage.arith.misc.
|
|
5420
|
+
return sage.arith.misc.algebraic_dependency(self, n)
|
|
5403
5421
|
|
|
5404
5422
|
algdep = algebraic_dependency
|
|
5405
5423
|
|
|
Binary file
|
sage/rings/ring_extension.pyx
CHANGED
|
@@ -111,6 +111,7 @@ AUTHOR:
|
|
|
111
111
|
# ***************************************************************************
|
|
112
112
|
|
|
113
113
|
|
|
114
|
+
cimport cython
|
|
114
115
|
from sage.misc.fast_methods cimport hash_by_id
|
|
115
116
|
from sage.misc.cachefunc import cached_method
|
|
116
117
|
from sage.cpython.getattr cimport AttributeErrorMessage
|
|
@@ -613,6 +614,7 @@ cdef class RingExtension_generic(Parent):
|
|
|
613
614
|
self.register_coercion(RingExtensionBackendIsomorphism(ring.Hom(self)))
|
|
614
615
|
ring.register_conversion(RingExtensionBackendReverseIsomorphism(self.Hom(ring)))
|
|
615
616
|
|
|
617
|
+
@cython.binding(True)
|
|
616
618
|
def __getattr__(self, name):
|
|
617
619
|
"""
|
|
618
620
|
If this extension was created with ``import_methods = True``,
|
|
@@ -1315,7 +1317,7 @@ cdef class RingExtension_generic(Parent):
|
|
|
1315
1317
|
elt = self._backend.an_element()
|
|
1316
1318
|
return self.element_class(self, elt)
|
|
1317
1319
|
|
|
1318
|
-
def gens(self, base=None):
|
|
1320
|
+
def gens(self, base=None) -> tuple:
|
|
1319
1321
|
r"""
|
|
1320
1322
|
Return the generators of this extension over ``base``.
|
|
1321
1323
|
|
|
@@ -2662,7 +2664,7 @@ cdef class RingExtensionWithGen(RingExtensionWithBasis):
|
|
|
2662
2664
|
S = PolynomialRing(self._base, name=var)
|
|
2663
2665
|
return S(coeffs)
|
|
2664
2666
|
|
|
2665
|
-
def gens(self, base=None):
|
|
2667
|
+
def gens(self, base=None) -> tuple:
|
|
2666
2668
|
r"""
|
|
2667
2669
|
Return the generators of this extension over ``base``.
|
|
2668
2670
|
|
|
Binary file
|
|
Binary file
|
|
@@ -18,6 +18,7 @@ AUTHOR:
|
|
|
18
18
|
# ***************************************************************************
|
|
19
19
|
|
|
20
20
|
|
|
21
|
+
cimport cython
|
|
21
22
|
from sage.ext.stdsage cimport PY_NEW
|
|
22
23
|
from sage.cpython.getattr cimport AttributeErrorMessage
|
|
23
24
|
from sage.cpython.getattr import dir_with_other_class
|
|
@@ -97,6 +98,7 @@ cdef class RingExtensionElement(CommutativeAlgebraElement):
|
|
|
97
98
|
"""
|
|
98
99
|
return self._parent, (self._backend,)
|
|
99
100
|
|
|
101
|
+
@cython.binding(True)
|
|
100
102
|
def __getattr__(self, name):
|
|
101
103
|
"""
|
|
102
104
|
If the parent of this element was created with ``import_methods = True``,
|
|
@@ -130,6 +132,46 @@ cdef class RingExtensionElement(CommutativeAlgebraElement):
|
|
|
130
132
|
wrapper.__doc__ = method.__doc__
|
|
131
133
|
return wrapper
|
|
132
134
|
|
|
135
|
+
def __getitem__(self, i):
|
|
136
|
+
r"""
|
|
137
|
+
Return the `i`-th item of this element.
|
|
138
|
+
|
|
139
|
+
This methods calls the appropriate method of the backend if
|
|
140
|
+
``import_methods`` is set to ``True``
|
|
141
|
+
|
|
142
|
+
EXAMPLES::
|
|
143
|
+
|
|
144
|
+
sage: R.<x> = QQ[]
|
|
145
|
+
sage: E = R.over()
|
|
146
|
+
sage: P = E(x^2 + 2*x + 3)
|
|
147
|
+
sage: P[0]
|
|
148
|
+
3
|
|
149
|
+
"""
|
|
150
|
+
if (<RingExtension_generic>self._parent)._import_methods:
|
|
151
|
+
output = self._backend[to_backend(i)]
|
|
152
|
+
return from_backend(output, self._parent)
|
|
153
|
+
return TypeError("this element is not subscriptable")
|
|
154
|
+
|
|
155
|
+
def __call__(self, *args, **kwargs):
|
|
156
|
+
r"""
|
|
157
|
+
Call this element.
|
|
158
|
+
|
|
159
|
+
This methods calls the appropriate method of the backend if
|
|
160
|
+
``import_methods`` is set to ``True``
|
|
161
|
+
|
|
162
|
+
EXAMPLES::
|
|
163
|
+
|
|
164
|
+
sage: R.<x> = QQ[]
|
|
165
|
+
sage: E = R.over()
|
|
166
|
+
sage: P = E(x^2 + 2*x + 3)
|
|
167
|
+
sage: P(1)
|
|
168
|
+
6
|
|
169
|
+
"""
|
|
170
|
+
if (<RingExtension_generic>self._parent)._import_methods:
|
|
171
|
+
output = self._backend(*to_backend(args), **to_backend(kwargs))
|
|
172
|
+
return from_backend(output, self._parent)
|
|
173
|
+
return TypeError("this element is not callable")
|
|
174
|
+
|
|
133
175
|
def __dir__(self):
|
|
134
176
|
"""
|
|
135
177
|
Return the list of all the attributes of this element;
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-modules
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-modules
|