passagemath-categories 10.6.32__cp314-cp314t-musllinux_1_2_aarch64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- passagemath_categories-10.6.32.dist-info/METADATA +156 -0
- passagemath_categories-10.6.32.dist-info/RECORD +719 -0
- passagemath_categories-10.6.32.dist-info/WHEEL +5 -0
- passagemath_categories-10.6.32.dist-info/top_level.txt +2 -0
- passagemath_categories.libs/libgcc_s-2d945d6c.so.1 +0 -0
- passagemath_categories.libs/libgmp-28992bcb.so.10.5.0 +0 -0
- passagemath_categories.libs/libstdc++-85f2cd6d.so.6.0.33 +0 -0
- sage/all__sagemath_categories.py +28 -0
- sage/arith/all.py +38 -0
- sage/arith/constants.pxd +27 -0
- sage/arith/functions.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/arith/functions.pxd +4 -0
- sage/arith/functions.pyx +221 -0
- sage/arith/misc.py +6552 -0
- sage/arith/multi_modular.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/arith/multi_modular.pxd +39 -0
- sage/arith/multi_modular.pyx +994 -0
- sage/arith/rational_reconstruction.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/arith/rational_reconstruction.pxd +4 -0
- sage/arith/rational_reconstruction.pyx +115 -0
- sage/arith/srange.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/arith/srange.pyx +571 -0
- sage/calculus/all__sagemath_categories.py +2 -0
- sage/calculus/functional.py +481 -0
- sage/calculus/functions.py +151 -0
- sage/categories/additive_groups.py +73 -0
- sage/categories/additive_magmas.py +1044 -0
- sage/categories/additive_monoids.py +114 -0
- sage/categories/additive_semigroups.py +184 -0
- sage/categories/affine_weyl_groups.py +238 -0
- sage/categories/algebra_ideals.py +95 -0
- sage/categories/algebra_modules.py +96 -0
- sage/categories/algebras.py +349 -0
- sage/categories/algebras_with_basis.py +377 -0
- sage/categories/all.py +160 -0
- sage/categories/aperiodic_semigroups.py +29 -0
- sage/categories/associative_algebras.py +47 -0
- sage/categories/bialgebras.py +101 -0
- sage/categories/bialgebras_with_basis.py +414 -0
- sage/categories/bimodules.py +206 -0
- sage/categories/chain_complexes.py +268 -0
- sage/categories/classical_crystals.py +480 -0
- sage/categories/coalgebras.py +405 -0
- sage/categories/coalgebras_with_basis.py +232 -0
- sage/categories/coercion_methods.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/categories/coercion_methods.pyx +52 -0
- sage/categories/commutative_additive_groups.py +104 -0
- sage/categories/commutative_additive_monoids.py +45 -0
- sage/categories/commutative_additive_semigroups.py +48 -0
- sage/categories/commutative_algebra_ideals.py +87 -0
- sage/categories/commutative_algebras.py +94 -0
- sage/categories/commutative_ring_ideals.py +58 -0
- sage/categories/commutative_rings.py +736 -0
- sage/categories/complete_discrete_valuation.py +293 -0
- sage/categories/complex_reflection_groups.py +145 -0
- sage/categories/complex_reflection_or_generalized_coxeter_groups.py +1249 -0
- sage/categories/coxeter_group_algebras.py +186 -0
- sage/categories/coxeter_groups.py +3402 -0
- sage/categories/crystals.py +2628 -0
- sage/categories/cw_complexes.py +216 -0
- sage/categories/dedekind_domains.py +137 -0
- sage/categories/discrete_valuation.py +325 -0
- sage/categories/distributive_magmas_and_additive_magmas.py +100 -0
- sage/categories/division_rings.py +114 -0
- sage/categories/domains.py +95 -0
- sage/categories/drinfeld_modules.py +789 -0
- sage/categories/dual.py +42 -0
- sage/categories/enumerated_sets.py +1146 -0
- sage/categories/euclidean_domains.py +271 -0
- sage/categories/examples/algebras_with_basis.py +102 -0
- sage/categories/examples/all.py +1 -0
- sage/categories/examples/commutative_additive_monoids.py +130 -0
- sage/categories/examples/commutative_additive_semigroups.py +199 -0
- sage/categories/examples/coxeter_groups.py +8 -0
- sage/categories/examples/crystals.py +236 -0
- sage/categories/examples/cw_complexes.py +163 -0
- sage/categories/examples/facade_sets.py +187 -0
- sage/categories/examples/filtered_algebras_with_basis.py +204 -0
- sage/categories/examples/filtered_modules_with_basis.py +154 -0
- sage/categories/examples/finite_coxeter_groups.py +252 -0
- sage/categories/examples/finite_dimensional_algebras_with_basis.py +148 -0
- sage/categories/examples/finite_dimensional_lie_algebras_with_basis.py +495 -0
- sage/categories/examples/finite_enumerated_sets.py +208 -0
- sage/categories/examples/finite_monoids.py +150 -0
- sage/categories/examples/finite_semigroups.py +190 -0
- sage/categories/examples/finite_weyl_groups.py +191 -0
- sage/categories/examples/graded_connected_hopf_algebras_with_basis.py +152 -0
- sage/categories/examples/graded_modules_with_basis.py +168 -0
- sage/categories/examples/graphs.py +122 -0
- sage/categories/examples/hopf_algebras_with_basis.py +145 -0
- sage/categories/examples/infinite_enumerated_sets.py +190 -0
- sage/categories/examples/lie_algebras.py +352 -0
- sage/categories/examples/lie_algebras_with_basis.py +196 -0
- sage/categories/examples/magmas.py +162 -0
- sage/categories/examples/manifolds.py +94 -0
- sage/categories/examples/monoids.py +144 -0
- sage/categories/examples/posets.py +178 -0
- sage/categories/examples/semigroups.py +580 -0
- sage/categories/examples/semigroups_cython.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/categories/examples/semigroups_cython.pyx +221 -0
- sage/categories/examples/semirings.py +249 -0
- sage/categories/examples/sets_cat.py +706 -0
- sage/categories/examples/sets_with_grading.py +101 -0
- sage/categories/examples/with_realizations.py +542 -0
- sage/categories/fields.py +991 -0
- sage/categories/filtered_algebras.py +63 -0
- sage/categories/filtered_algebras_with_basis.py +548 -0
- sage/categories/filtered_hopf_algebras_with_basis.py +138 -0
- sage/categories/filtered_modules.py +210 -0
- sage/categories/filtered_modules_with_basis.py +1209 -0
- sage/categories/finite_complex_reflection_groups.py +1506 -0
- sage/categories/finite_coxeter_groups.py +1138 -0
- sage/categories/finite_crystals.py +103 -0
- sage/categories/finite_dimensional_algebras_with_basis.py +1860 -0
- sage/categories/finite_dimensional_bialgebras_with_basis.py +33 -0
- sage/categories/finite_dimensional_coalgebras_with_basis.py +33 -0
- sage/categories/finite_dimensional_graded_lie_algebras_with_basis.py +231 -0
- sage/categories/finite_dimensional_hopf_algebras_with_basis.py +38 -0
- sage/categories/finite_dimensional_lie_algebras_with_basis.py +2774 -0
- sage/categories/finite_dimensional_modules_with_basis.py +1407 -0
- sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py +167 -0
- sage/categories/finite_dimensional_semisimple_algebras_with_basis.py +270 -0
- sage/categories/finite_enumerated_sets.py +769 -0
- sage/categories/finite_fields.py +252 -0
- sage/categories/finite_groups.py +256 -0
- sage/categories/finite_lattice_posets.py +242 -0
- sage/categories/finite_monoids.py +316 -0
- sage/categories/finite_permutation_groups.py +339 -0
- sage/categories/finite_posets.py +1994 -0
- sage/categories/finite_semigroups.py +136 -0
- sage/categories/finite_sets.py +93 -0
- sage/categories/finite_weyl_groups.py +39 -0
- sage/categories/finitely_generated_lambda_bracket_algebras.py +112 -0
- sage/categories/finitely_generated_lie_conformal_algebras.py +114 -0
- sage/categories/finitely_generated_magmas.py +57 -0
- sage/categories/finitely_generated_semigroups.py +214 -0
- sage/categories/function_fields.py +76 -0
- sage/categories/g_sets.py +77 -0
- sage/categories/gcd_domains.py +65 -0
- sage/categories/generalized_coxeter_groups.py +94 -0
- sage/categories/graded_algebras.py +85 -0
- sage/categories/graded_algebras_with_basis.py +258 -0
- sage/categories/graded_bialgebras.py +32 -0
- sage/categories/graded_bialgebras_with_basis.py +32 -0
- sage/categories/graded_coalgebras.py +65 -0
- sage/categories/graded_coalgebras_with_basis.py +51 -0
- sage/categories/graded_hopf_algebras.py +41 -0
- sage/categories/graded_hopf_algebras_with_basis.py +169 -0
- sage/categories/graded_lie_algebras.py +91 -0
- sage/categories/graded_lie_algebras_with_basis.py +44 -0
- sage/categories/graded_lie_conformal_algebras.py +74 -0
- sage/categories/graded_modules.py +133 -0
- sage/categories/graded_modules_with_basis.py +329 -0
- sage/categories/graphs.py +138 -0
- sage/categories/group_algebras.py +430 -0
- sage/categories/groupoid.py +94 -0
- sage/categories/groups.py +667 -0
- sage/categories/h_trivial_semigroups.py +64 -0
- sage/categories/hecke_modules.py +185 -0
- sage/categories/highest_weight_crystals.py +980 -0
- sage/categories/hopf_algebras.py +219 -0
- sage/categories/hopf_algebras_with_basis.py +309 -0
- sage/categories/infinite_enumerated_sets.py +115 -0
- sage/categories/integral_domains.py +203 -0
- sage/categories/j_trivial_semigroups.py +29 -0
- sage/categories/kac_moody_algebras.py +82 -0
- sage/categories/kahler_algebras.py +203 -0
- sage/categories/l_trivial_semigroups.py +63 -0
- sage/categories/lambda_bracket_algebras.py +280 -0
- sage/categories/lambda_bracket_algebras_with_basis.py +107 -0
- sage/categories/lattice_posets.py +89 -0
- sage/categories/left_modules.py +49 -0
- sage/categories/lie_algebras.py +1070 -0
- sage/categories/lie_algebras_with_basis.py +261 -0
- sage/categories/lie_conformal_algebras.py +350 -0
- sage/categories/lie_conformal_algebras_with_basis.py +147 -0
- sage/categories/lie_groups.py +73 -0
- sage/categories/loop_crystals.py +1290 -0
- sage/categories/magmas.py +1189 -0
- sage/categories/magmas_and_additive_magmas.py +149 -0
- sage/categories/magmatic_algebras.py +365 -0
- sage/categories/manifolds.py +352 -0
- sage/categories/matrix_algebras.py +40 -0
- sage/categories/metric_spaces.py +387 -0
- sage/categories/modular_abelian_varieties.py +78 -0
- sage/categories/modules.py +989 -0
- sage/categories/modules_with_basis.py +2794 -0
- sage/categories/monoid_algebras.py +38 -0
- sage/categories/monoids.py +739 -0
- sage/categories/noetherian_rings.py +87 -0
- sage/categories/number_fields.py +242 -0
- sage/categories/ore_modules.py +189 -0
- sage/categories/partially_ordered_monoids.py +49 -0
- sage/categories/permutation_groups.py +63 -0
- sage/categories/pointed_sets.py +42 -0
- sage/categories/polyhedra.py +74 -0
- sage/categories/poor_man_map.py +270 -0
- sage/categories/posets.py +722 -0
- sage/categories/principal_ideal_domains.py +270 -0
- sage/categories/quantum_group_representations.py +543 -0
- sage/categories/quotient_fields.py +728 -0
- sage/categories/r_trivial_semigroups.py +45 -0
- sage/categories/regular_crystals.py +898 -0
- sage/categories/regular_supercrystals.py +170 -0
- sage/categories/right_modules.py +49 -0
- sage/categories/ring_ideals.py +74 -0
- sage/categories/rings.py +1904 -0
- sage/categories/rngs.py +175 -0
- sage/categories/schemes.py +393 -0
- sage/categories/semigroups.py +1060 -0
- sage/categories/semirings.py +71 -0
- sage/categories/semisimple_algebras.py +114 -0
- sage/categories/sets_with_grading.py +235 -0
- sage/categories/shephard_groups.py +43 -0
- sage/categories/signed_tensor.py +120 -0
- sage/categories/simplicial_complexes.py +134 -0
- sage/categories/simplicial_sets.py +1206 -0
- sage/categories/super_algebras.py +149 -0
- sage/categories/super_algebras_with_basis.py +144 -0
- sage/categories/super_hopf_algebras_with_basis.py +126 -0
- sage/categories/super_lie_conformal_algebras.py +193 -0
- sage/categories/super_modules.py +229 -0
- sage/categories/super_modules_with_basis.py +193 -0
- sage/categories/supercommutative_algebras.py +99 -0
- sage/categories/supercrystals.py +406 -0
- sage/categories/tensor.py +110 -0
- sage/categories/topological_spaces.py +170 -0
- sage/categories/triangular_kac_moody_algebras.py +439 -0
- sage/categories/tutorial.py +58 -0
- sage/categories/unique_factorization_domains.py +318 -0
- sage/categories/unital_algebras.py +426 -0
- sage/categories/vector_bundles.py +159 -0
- sage/categories/vector_spaces.py +357 -0
- sage/categories/weyl_groups.py +853 -0
- sage/combinat/all__sagemath_categories.py +34 -0
- sage/combinat/backtrack.py +180 -0
- sage/combinat/combinat.py +2269 -0
- sage/combinat/combinat_cython.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/combinat_cython.pxd +6 -0
- sage/combinat/combinat_cython.pyx +390 -0
- sage/combinat/combination.py +796 -0
- sage/combinat/combinatorial_map.py +416 -0
- sage/combinat/composition.py +2192 -0
- sage/combinat/dlx.py +510 -0
- sage/combinat/integer_lists/__init__.py +7 -0
- sage/combinat/integer_lists/base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/integer_lists/base.pxd +16 -0
- sage/combinat/integer_lists/base.pyx +713 -0
- sage/combinat/integer_lists/invlex.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/integer_lists/invlex.pxd +4 -0
- sage/combinat/integer_lists/invlex.pyx +1650 -0
- sage/combinat/integer_lists/lists.py +328 -0
- sage/combinat/integer_lists/nn.py +48 -0
- sage/combinat/integer_vector.py +1818 -0
- sage/combinat/integer_vector_weighted.py +413 -0
- sage/combinat/matrices/all__sagemath_categories.py +5 -0
- sage/combinat/matrices/dancing_links.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/matrices/dancing_links.pyx +1159 -0
- sage/combinat/matrices/dancing_links_c.h +380 -0
- sage/combinat/matrices/dlxcpp.py +136 -0
- sage/combinat/partition.py +10070 -0
- sage/combinat/partitions.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/partitions.pyx +743 -0
- sage/combinat/permutation.py +10168 -0
- sage/combinat/permutation_cython.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/combinat/permutation_cython.pxd +11 -0
- sage/combinat/permutation_cython.pyx +407 -0
- sage/combinat/q_analogues.py +1090 -0
- sage/combinat/ranker.py +268 -0
- sage/combinat/subset.py +1561 -0
- sage/combinat/subsets_hereditary.py +202 -0
- sage/combinat/subsets_pairwise.py +184 -0
- sage/combinat/tools.py +63 -0
- sage/combinat/tuple.py +348 -0
- sage/data_structures/all.py +2 -0
- sage/data_structures/all__sagemath_categories.py +2 -0
- sage/data_structures/binary_matrix.pxd +138 -0
- sage/data_structures/binary_search.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/binary_search.pxd +3 -0
- sage/data_structures/binary_search.pyx +66 -0
- sage/data_structures/bitset.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/bitset.pxd +40 -0
- sage/data_structures/bitset.pyx +2385 -0
- sage/data_structures/bitset_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/bitset_base.pxd +926 -0
- sage/data_structures/bitset_base.pyx +117 -0
- sage/data_structures/bitset_intrinsics.h +487 -0
- sage/data_structures/blas_dict.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/blas_dict.pxd +12 -0
- sage/data_structures/blas_dict.pyx +469 -0
- sage/data_structures/list_of_pairs.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/list_of_pairs.pxd +16 -0
- sage/data_structures/list_of_pairs.pyx +122 -0
- sage/data_structures/mutable_poset.py +3312 -0
- sage/data_structures/pairing_heap.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/data_structures/pairing_heap.h +346 -0
- sage/data_structures/pairing_heap.pxd +88 -0
- sage/data_structures/pairing_heap.pyx +1464 -0
- sage/data_structures/sparse_bitset.pxd +62 -0
- sage/data_structures/stream.py +5070 -0
- sage/databases/all__sagemath_categories.py +7 -0
- sage/databases/sql_db.py +2236 -0
- sage/ext/all__sagemath_categories.py +3 -0
- sage/ext/fast_callable.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/ext/fast_callable.pxd +4 -0
- sage/ext/fast_callable.pyx +2746 -0
- sage/ext/fast_eval.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/ext/fast_eval.pxd +1 -0
- sage/ext/fast_eval.pyx +102 -0
- sage/ext/interpreters/__init__.py +1 -0
- sage/ext/interpreters/all__sagemath_categories.py +2 -0
- sage/ext/interpreters/wrapper_el.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/ext/interpreters/wrapper_el.pxd +18 -0
- sage/ext/interpreters/wrapper_el.pyx +148 -0
- sage/ext/interpreters/wrapper_py.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/ext/interpreters/wrapper_py.pxd +17 -0
- sage/ext/interpreters/wrapper_py.pyx +133 -0
- sage/functions/airy.py +937 -0
- sage/functions/all.py +97 -0
- sage/functions/bessel.py +2102 -0
- sage/functions/error.py +784 -0
- sage/functions/exp_integral.py +1529 -0
- sage/functions/gamma.py +1087 -0
- sage/functions/generalized.py +672 -0
- sage/functions/hyperbolic.py +747 -0
- sage/functions/hypergeometric.py +1156 -0
- sage/functions/jacobi.py +1705 -0
- sage/functions/log.py +1402 -0
- sage/functions/min_max.py +338 -0
- sage/functions/orthogonal_polys.py +3106 -0
- sage/functions/other.py +2303 -0
- sage/functions/piecewise.py +1505 -0
- sage/functions/prime_pi.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/functions/prime_pi.pyx +262 -0
- sage/functions/special.py +1212 -0
- sage/functions/spike_function.py +278 -0
- sage/functions/transcendental.py +690 -0
- sage/functions/trig.py +1062 -0
- sage/functions/wigner.py +726 -0
- sage/geometry/abc.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/geometry/abc.pyx +82 -0
- sage/geometry/all__sagemath_categories.py +1 -0
- sage/groups/all__sagemath_categories.py +11 -0
- sage/groups/generic.py +1733 -0
- sage/groups/groups_catalog.py +113 -0
- sage/groups/perm_gps/all__sagemath_categories.py +1 -0
- sage/groups/perm_gps/partn_ref/all.py +1 -0
- sage/groups/perm_gps/partn_ref/all__sagemath_categories.py +1 -0
- sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pxd +52 -0
- sage/groups/perm_gps/partn_ref/automorphism_group_canonical_label.pyx +906 -0
- sage/groups/perm_gps/partn_ref/canonical_augmentation.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/canonical_augmentation.pxd +85 -0
- sage/groups/perm_gps/partn_ref/canonical_augmentation.pyx +534 -0
- sage/groups/perm_gps/partn_ref/data_structures.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/data_structures.pxd +576 -0
- sage/groups/perm_gps/partn_ref/data_structures.pyx +1792 -0
- sage/groups/perm_gps/partn_ref/double_coset.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/double_coset.pxd +45 -0
- sage/groups/perm_gps/partn_ref/double_coset.pyx +739 -0
- sage/groups/perm_gps/partn_ref/refinement_lists.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_lists.pxd +18 -0
- sage/groups/perm_gps/partn_ref/refinement_lists.pyx +82 -0
- sage/groups/perm_gps/partn_ref/refinement_python.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_python.pxd +16 -0
- sage/groups/perm_gps/partn_ref/refinement_python.pyx +564 -0
- sage/groups/perm_gps/partn_ref/refinement_sets.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/groups/perm_gps/partn_ref/refinement_sets.pxd +60 -0
- sage/groups/perm_gps/partn_ref/refinement_sets.pyx +858 -0
- sage/interfaces/abc.py +140 -0
- sage/interfaces/all.py +58 -0
- sage/interfaces/all__sagemath_categories.py +1 -0
- sage/interfaces/expect.py +1643 -0
- sage/interfaces/interface.py +1682 -0
- sage/interfaces/process.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/interfaces/process.pxd +5 -0
- sage/interfaces/process.pyx +288 -0
- sage/interfaces/quit.py +167 -0
- sage/interfaces/sage0.py +604 -0
- sage/interfaces/sagespawn.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/interfaces/sagespawn.pyx +308 -0
- sage/interfaces/tab_completion.py +101 -0
- sage/misc/all__sagemath_categories.py +78 -0
- sage/misc/allocator.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/allocator.pxd +6 -0
- sage/misc/allocator.pyx +47 -0
- sage/misc/binary_tree.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/binary_tree.pxd +29 -0
- sage/misc/binary_tree.pyx +537 -0
- sage/misc/callable_dict.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/callable_dict.pyx +89 -0
- sage/misc/citation.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/citation.pyx +159 -0
- sage/misc/converting_dict.py +293 -0
- sage/misc/defaults.py +129 -0
- sage/misc/derivative.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/derivative.pyx +223 -0
- sage/misc/functional.py +2005 -0
- sage/misc/html.py +589 -0
- sage/misc/latex.py +2673 -0
- sage/misc/latex_macros.py +236 -0
- sage/misc/latex_standalone.py +1833 -0
- sage/misc/map_threaded.py +38 -0
- sage/misc/mathml.py +76 -0
- sage/misc/method_decorator.py +88 -0
- sage/misc/mrange.py +755 -0
- sage/misc/multireplace.py +41 -0
- sage/misc/object_multiplexer.py +92 -0
- sage/misc/parser.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/parser.pyx +1107 -0
- sage/misc/random_testing.py +264 -0
- sage/misc/rest_index_of_methods.py +377 -0
- sage/misc/search.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/search.pxd +2 -0
- sage/misc/search.pyx +68 -0
- sage/misc/stopgap.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/misc/stopgap.pyx +95 -0
- sage/misc/table.py +853 -0
- sage/monoids/all__sagemath_categories.py +1 -0
- sage/monoids/indexed_free_monoid.py +1071 -0
- sage/monoids/monoid.py +82 -0
- sage/numerical/all__sagemath_categories.py +1 -0
- sage/numerical/backends/all__sagemath_categories.py +1 -0
- sage/numerical/backends/generic_backend.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/numerical/backends/generic_backend.pxd +61 -0
- sage/numerical/backends/generic_backend.pyx +1893 -0
- sage/numerical/backends/generic_sdp_backend.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/numerical/backends/generic_sdp_backend.pxd +38 -0
- sage/numerical/backends/generic_sdp_backend.pyx +755 -0
- sage/parallel/all.py +6 -0
- sage/parallel/decorate.py +575 -0
- sage/parallel/map_reduce.py +1997 -0
- sage/parallel/multiprocessing_sage.py +76 -0
- sage/parallel/ncpus.py +35 -0
- sage/parallel/parallelism.py +364 -0
- sage/parallel/reference.py +47 -0
- sage/parallel/use_fork.py +333 -0
- sage/rings/abc.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/abc.pxd +31 -0
- sage/rings/abc.pyx +526 -0
- sage/rings/algebraic_closure_finite_field.py +1154 -0
- sage/rings/all__sagemath_categories.py +91 -0
- sage/rings/big_oh.py +227 -0
- sage/rings/continued_fraction.py +2754 -0
- sage/rings/continued_fraction_gosper.py +220 -0
- sage/rings/factorint.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/factorint.pyx +295 -0
- sage/rings/fast_arith.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/fast_arith.pxd +21 -0
- sage/rings/fast_arith.pyx +535 -0
- sage/rings/finite_rings/all__sagemath_categories.py +9 -0
- sage/rings/finite_rings/conway_polynomials.py +542 -0
- sage/rings/finite_rings/element_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/element_base.pxd +12 -0
- sage/rings/finite_rings/element_base.pyx +1176 -0
- sage/rings/finite_rings/finite_field_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/finite_field_base.pxd +7 -0
- sage/rings/finite_rings/finite_field_base.pyx +2171 -0
- sage/rings/finite_rings/finite_field_constructor.py +827 -0
- sage/rings/finite_rings/finite_field_prime_modn.py +372 -0
- sage/rings/finite_rings/galois_group.py +154 -0
- sage/rings/finite_rings/hom_finite_field.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/hom_finite_field.pxd +23 -0
- sage/rings/finite_rings/hom_finite_field.pyx +856 -0
- sage/rings/finite_rings/hom_prime_finite_field.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/hom_prime_finite_field.pxd +15 -0
- sage/rings/finite_rings/hom_prime_finite_field.pyx +164 -0
- sage/rings/finite_rings/homset.py +357 -0
- sage/rings/finite_rings/integer_mod.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/integer_mod.pxd +56 -0
- sage/rings/finite_rings/integer_mod.pyx +4586 -0
- sage/rings/finite_rings/integer_mod_limits.h +11 -0
- sage/rings/finite_rings/integer_mod_ring.py +2044 -0
- sage/rings/finite_rings/residue_field.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/finite_rings/residue_field.pxd +30 -0
- sage/rings/finite_rings/residue_field.pyx +1811 -0
- sage/rings/finite_rings/stdint.pxd +19 -0
- sage/rings/fraction_field.py +1452 -0
- sage/rings/fraction_field_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/fraction_field_element.pyx +1357 -0
- sage/rings/function_field/all.py +7 -0
- sage/rings/function_field/all__sagemath_categories.py +2 -0
- sage/rings/function_field/constructor.py +218 -0
- sage/rings/function_field/element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/function_field/element.pxd +11 -0
- sage/rings/function_field/element.pyx +1008 -0
- sage/rings/function_field/element_rational.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/function_field/element_rational.pyx +513 -0
- sage/rings/function_field/extensions.py +230 -0
- sage/rings/function_field/function_field.py +1468 -0
- sage/rings/function_field/function_field_rational.py +1005 -0
- sage/rings/function_field/ideal.py +1155 -0
- sage/rings/function_field/ideal_rational.py +629 -0
- sage/rings/function_field/jacobian_base.py +826 -0
- sage/rings/function_field/jacobian_hess.py +1053 -0
- sage/rings/function_field/jacobian_khuri_makdisi.py +1027 -0
- sage/rings/function_field/maps.py +1039 -0
- sage/rings/function_field/order.py +281 -0
- sage/rings/function_field/order_basis.py +586 -0
- sage/rings/function_field/order_rational.py +576 -0
- sage/rings/function_field/place.py +426 -0
- sage/rings/function_field/place_rational.py +181 -0
- sage/rings/generic.py +320 -0
- sage/rings/homset.py +332 -0
- sage/rings/ideal.py +1885 -0
- sage/rings/ideal_monoid.py +215 -0
- sage/rings/infinity.py +1890 -0
- sage/rings/integer.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/integer.pxd +45 -0
- sage/rings/integer.pyx +7874 -0
- sage/rings/integer_ring.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/integer_ring.pxd +8 -0
- sage/rings/integer_ring.pyx +1693 -0
- sage/rings/laurent_series_ring.py +931 -0
- sage/rings/laurent_series_ring_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/laurent_series_ring_element.pxd +11 -0
- sage/rings/laurent_series_ring_element.pyx +1927 -0
- sage/rings/lazy_series.py +7815 -0
- sage/rings/lazy_series_ring.py +4356 -0
- sage/rings/localization.py +1043 -0
- sage/rings/morphism.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/morphism.pxd +39 -0
- sage/rings/morphism.pyx +3299 -0
- sage/rings/multi_power_series_ring.py +1145 -0
- sage/rings/multi_power_series_ring_element.py +2184 -0
- sage/rings/noncommutative_ideals.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/noncommutative_ideals.pyx +423 -0
- sage/rings/number_field/all__sagemath_categories.py +1 -0
- sage/rings/number_field/number_field_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/number_field/number_field_base.pxd +8 -0
- sage/rings/number_field/number_field_base.pyx +507 -0
- sage/rings/number_field/number_field_element_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/number_field/number_field_element_base.pxd +6 -0
- sage/rings/number_field/number_field_element_base.pyx +36 -0
- sage/rings/number_field/number_field_ideal.py +3550 -0
- sage/rings/padics/all__sagemath_categories.py +4 -0
- sage/rings/padics/local_generic.py +1670 -0
- sage/rings/padics/local_generic_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/padics/local_generic_element.pxd +5 -0
- sage/rings/padics/local_generic_element.pyx +1017 -0
- sage/rings/padics/misc.py +256 -0
- sage/rings/padics/padic_generic.py +1911 -0
- sage/rings/padics/pow_computer.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/padics/pow_computer.pxd +38 -0
- sage/rings/padics/pow_computer.pyx +671 -0
- sage/rings/padics/precision_error.py +24 -0
- sage/rings/polynomial/all__sagemath_categories.py +25 -0
- sage/rings/polynomial/commutative_polynomial.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/commutative_polynomial.pxd +6 -0
- sage/rings/polynomial/commutative_polynomial.pyx +24 -0
- sage/rings/polynomial/cyclotomic.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/cyclotomic.pyx +404 -0
- sage/rings/polynomial/flatten.py +711 -0
- sage/rings/polynomial/ideal.py +102 -0
- sage/rings/polynomial/infinite_polynomial_element.py +1768 -0
- sage/rings/polynomial/infinite_polynomial_ring.py +1653 -0
- sage/rings/polynomial/laurent_polynomial.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/laurent_polynomial.pxd +18 -0
- sage/rings/polynomial/laurent_polynomial.pyx +2190 -0
- sage/rings/polynomial/laurent_polynomial_ideal.py +590 -0
- sage/rings/polynomial/laurent_polynomial_ring.py +832 -0
- sage/rings/polynomial/laurent_polynomial_ring_base.py +708 -0
- sage/rings/polynomial/multi_polynomial.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial.pxd +12 -0
- sage/rings/polynomial/multi_polynomial.pyx +3082 -0
- sage/rings/polynomial/multi_polynomial_element.py +2570 -0
- sage/rings/polynomial/multi_polynomial_ideal.py +5771 -0
- sage/rings/polynomial/multi_polynomial_ring.py +947 -0
- sage/rings/polynomial/multi_polynomial_ring_base.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial_ring_base.pxd +15 -0
- sage/rings/polynomial/multi_polynomial_ring_base.pyx +1855 -0
- sage/rings/polynomial/multi_polynomial_sequence.py +2204 -0
- sage/rings/polynomial/polydict.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/polydict.pxd +45 -0
- sage/rings/polynomial/polydict.pyx +2701 -0
- sage/rings/polynomial/polynomial_compiled.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/polynomial_compiled.pxd +59 -0
- sage/rings/polynomial/polynomial_compiled.pyx +509 -0
- sage/rings/polynomial/polynomial_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/polynomial_element.pxd +64 -0
- sage/rings/polynomial/polynomial_element.pyx +13255 -0
- sage/rings/polynomial/polynomial_element_generic.py +1637 -0
- sage/rings/polynomial/polynomial_fateman.py +97 -0
- sage/rings/polynomial/polynomial_quotient_ring.py +2465 -0
- sage/rings/polynomial/polynomial_quotient_ring_element.py +779 -0
- sage/rings/polynomial/polynomial_ring.py +3784 -0
- sage/rings/polynomial/polynomial_ring_constructor.py +1051 -0
- sage/rings/polynomial/polynomial_ring_homomorphism.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/polynomial_ring_homomorphism.pxd +5 -0
- sage/rings/polynomial/polynomial_ring_homomorphism.pyx +121 -0
- sage/rings/polynomial/polynomial_singular_interface.py +549 -0
- sage/rings/polynomial/symmetric_ideal.py +989 -0
- sage/rings/polynomial/symmetric_reduction.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/polynomial/symmetric_reduction.pxd +8 -0
- sage/rings/polynomial/symmetric_reduction.pyx +669 -0
- sage/rings/polynomial/term_order.py +2279 -0
- sage/rings/polynomial/toy_buchberger.py +449 -0
- sage/rings/polynomial/toy_d_basis.py +387 -0
- sage/rings/polynomial/toy_variety.py +362 -0
- sage/rings/power_series_mpoly.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/power_series_mpoly.pxd +9 -0
- sage/rings/power_series_mpoly.pyx +161 -0
- sage/rings/power_series_poly.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/power_series_poly.pxd +10 -0
- sage/rings/power_series_poly.pyx +1317 -0
- sage/rings/power_series_ring.py +1441 -0
- sage/rings/power_series_ring_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/power_series_ring_element.pxd +12 -0
- sage/rings/power_series_ring_element.pyx +3028 -0
- sage/rings/puiseux_series_ring.py +487 -0
- sage/rings/puiseux_series_ring_element.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/puiseux_series_ring_element.pxd +7 -0
- sage/rings/puiseux_series_ring_element.pyx +1055 -0
- sage/rings/qqbar_decorators.py +167 -0
- sage/rings/quotient_ring.py +1598 -0
- sage/rings/quotient_ring_element.py +979 -0
- sage/rings/rational.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/rational.pxd +20 -0
- sage/rings/rational.pyx +4284 -0
- sage/rings/rational_field.py +1730 -0
- sage/rings/real_double.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/real_double.pxd +16 -0
- sage/rings/real_double.pyx +2218 -0
- sage/rings/real_lazy.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/real_lazy.pxd +30 -0
- sage/rings/real_lazy.pyx +1773 -0
- sage/rings/ring.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/ring.pxd +30 -0
- sage/rings/ring.pyx +850 -0
- sage/rings/semirings/all.py +3 -0
- sage/rings/semirings/non_negative_integer_semiring.py +107 -0
- sage/rings/semirings/tropical_mpolynomial.py +972 -0
- sage/rings/semirings/tropical_polynomial.py +997 -0
- sage/rings/semirings/tropical_semiring.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/semirings/tropical_semiring.pyx +676 -0
- sage/rings/semirings/tropical_variety.py +1701 -0
- sage/rings/sum_of_squares.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/rings/sum_of_squares.pxd +3 -0
- sage/rings/sum_of_squares.pyx +336 -0
- sage/rings/tests.py +504 -0
- sage/schemes/affine/affine_homset.py +508 -0
- sage/schemes/affine/affine_morphism.py +1574 -0
- sage/schemes/affine/affine_point.py +460 -0
- sage/schemes/affine/affine_rational_point.py +308 -0
- sage/schemes/affine/affine_space.py +1264 -0
- sage/schemes/affine/affine_subscheme.py +592 -0
- sage/schemes/affine/all.py +25 -0
- sage/schemes/all__sagemath_categories.py +5 -0
- sage/schemes/generic/algebraic_scheme.py +2092 -0
- sage/schemes/generic/all.py +5 -0
- sage/schemes/generic/ambient_space.py +400 -0
- sage/schemes/generic/divisor.py +465 -0
- sage/schemes/generic/divisor_group.py +313 -0
- sage/schemes/generic/glue.py +84 -0
- sage/schemes/generic/homset.py +820 -0
- sage/schemes/generic/hypersurface.py +234 -0
- sage/schemes/generic/morphism.py +2107 -0
- sage/schemes/generic/point.py +237 -0
- sage/schemes/generic/scheme.py +1190 -0
- sage/schemes/generic/spec.py +199 -0
- sage/schemes/product_projective/all.py +6 -0
- sage/schemes/product_projective/homset.py +236 -0
- sage/schemes/product_projective/morphism.py +517 -0
- sage/schemes/product_projective/point.py +568 -0
- sage/schemes/product_projective/rational_point.py +550 -0
- sage/schemes/product_projective/space.py +1301 -0
- sage/schemes/product_projective/subscheme.py +466 -0
- sage/schemes/projective/all.py +24 -0
- sage/schemes/projective/proj_bdd_height.py +453 -0
- sage/schemes/projective/projective_homset.py +718 -0
- sage/schemes/projective/projective_morphism.py +2792 -0
- sage/schemes/projective/projective_point.py +1484 -0
- sage/schemes/projective/projective_rational_point.py +569 -0
- sage/schemes/projective/projective_space.py +2571 -0
- sage/schemes/projective/projective_subscheme.py +1574 -0
- sage/sets/all.py +17 -0
- sage/sets/cartesian_product.py +376 -0
- sage/sets/condition_set.py +525 -0
- sage/sets/disjoint_set.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/sets/disjoint_set.pxd +36 -0
- sage/sets/disjoint_set.pyx +998 -0
- sage/sets/disjoint_union_enumerated_sets.py +625 -0
- sage/sets/family.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/sets/family.pxd +12 -0
- sage/sets/family.pyx +1556 -0
- sage/sets/finite_enumerated_set.py +406 -0
- sage/sets/finite_set_map_cy.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/sets/finite_set_map_cy.pxd +34 -0
- sage/sets/finite_set_map_cy.pyx +708 -0
- sage/sets/finite_set_maps.py +591 -0
- sage/sets/image_set.py +448 -0
- sage/sets/integer_range.py +829 -0
- sage/sets/non_negative_integers.py +241 -0
- sage/sets/positive_integers.py +93 -0
- sage/sets/primes.py +188 -0
- sage/sets/real_set.py +2760 -0
- sage/sets/recursively_enumerated_set.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/sets/recursively_enumerated_set.pxd +31 -0
- sage/sets/recursively_enumerated_set.pyx +2082 -0
- sage/sets/set.py +2083 -0
- sage/sets/set_from_iterator.py +1021 -0
- sage/sets/totally_ordered_finite_set.py +329 -0
- sage/symbolic/all__sagemath_categories.py +1 -0
- sage/symbolic/function.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/symbolic/function.pxd +29 -0
- sage/symbolic/function.pyx +1488 -0
- sage/symbolic/symbols.py +56 -0
- sage/tests/all__sagemath_categories.py +1 -0
- sage/tests/cython.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/tests/cython.pyx +37 -0
- sage/tests/stl_vector.cpython-314t-aarch64-linux-musl.so +0 -0
- sage/tests/stl_vector.pyx +171 -0
- sage/typeset/all.py +6 -0
- sage/typeset/ascii_art.py +295 -0
- sage/typeset/character_art.py +789 -0
- sage/typeset/character_art_factory.py +572 -0
- sage/typeset/symbols.py +334 -0
- sage/typeset/unicode_art.py +183 -0
- sage/typeset/unicode_characters.py +101 -0
|
@@ -0,0 +1,1145 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-categories
|
|
2
|
+
r"""
|
|
3
|
+
Multivariate Power Series Rings
|
|
4
|
+
|
|
5
|
+
Construct a multivariate power series ring (in finitely many variables)
|
|
6
|
+
over a given (commutative) base ring.
|
|
7
|
+
|
|
8
|
+
EXAMPLES:
|
|
9
|
+
|
|
10
|
+
Construct rings and elements::
|
|
11
|
+
|
|
12
|
+
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
|
|
13
|
+
Multivariate Power Series Ring in t, u, v over Rational Field
|
|
14
|
+
sage: TestSuite(R).run()
|
|
15
|
+
sage: p = -t + 1/2*t^3*u - 1/4*t^4*u + 2/3*v^5 + R.O(6); p
|
|
16
|
+
-t + 1/2*t^3*u - 1/4*t^4*u + 2/3*v^5 + O(t, u, v)^6
|
|
17
|
+
sage: p in R
|
|
18
|
+
True
|
|
19
|
+
|
|
20
|
+
sage: g = 1 + v + 3*u*t^2 - 2*v^2*t^2; g
|
|
21
|
+
1 + v + 3*t^2*u - 2*t^2*v^2
|
|
22
|
+
sage: g in R
|
|
23
|
+
True
|
|
24
|
+
|
|
25
|
+
Add big O as with single variable power series::
|
|
26
|
+
|
|
27
|
+
sage: g.add_bigoh(3)
|
|
28
|
+
1 + v + O(t, u, v)^3
|
|
29
|
+
sage: g = g.O(5); g
|
|
30
|
+
1 + v + 3*t^2*u - 2*t^2*v^2 + O(t, u, v)^5
|
|
31
|
+
|
|
32
|
+
Sage keeps track of total-degree precision::
|
|
33
|
+
|
|
34
|
+
sage: f = (g-1)^2 - g + 1; f
|
|
35
|
+
-v + v^2 - 3*t^2*u + 6*t^2*u*v + 2*t^2*v^2 + O(t, u, v)^5
|
|
36
|
+
sage: f in R
|
|
37
|
+
True
|
|
38
|
+
sage: f.prec()
|
|
39
|
+
5
|
|
40
|
+
sage: ((g-1-v)^2).prec()
|
|
41
|
+
8
|
|
42
|
+
|
|
43
|
+
Construct multivariate power series rings over various base rings.
|
|
44
|
+
|
|
45
|
+
::
|
|
46
|
+
|
|
47
|
+
sage: M = PowerSeriesRing(QQ, 4, 'k'); M
|
|
48
|
+
Multivariate Power Series Ring in k0, k1, k2, k3 over Rational Field
|
|
49
|
+
sage: loads(dumps(M)) is M
|
|
50
|
+
True
|
|
51
|
+
sage: TestSuite(M).run()
|
|
52
|
+
|
|
53
|
+
sage: H = PowerSeriesRing(PolynomialRing(ZZ, 3, 'z'), 4, 'f'); H
|
|
54
|
+
Multivariate Power Series Ring in f0, f1, f2, f3
|
|
55
|
+
over Multivariate Polynomial Ring in z0, z1, z2 over Integer Ring
|
|
56
|
+
sage: TestSuite(H).run()
|
|
57
|
+
sage: loads(dumps(H)) is H
|
|
58
|
+
True
|
|
59
|
+
|
|
60
|
+
sage: z = H.base_ring().gens()
|
|
61
|
+
sage: f = H.gens()
|
|
62
|
+
sage: h = 4*z[1]^2 + 2*z[0]*z[2] + z[1]*z[2] + z[2]^2 \
|
|
63
|
+
....: + (-z[2]^2 - 2*z[0] + z[2])*f[0]*f[2] \
|
|
64
|
+
....: + (-22*z[0]^2 + 2*z[1]^2 - z[0]*z[2] + z[2]^2 - 1955*z[2])*f[1]*f[2] \
|
|
65
|
+
....: + (-z[0]*z[1] - 2*z[1]^2)*f[2]*f[3] \
|
|
66
|
+
....: + (2*z[0]*z[1] + z[1]*z[2] - z[2]^2 - z[1] + 3*z[2])*f[3]^2 \
|
|
67
|
+
....: + H.O(3)
|
|
68
|
+
sage: h in H
|
|
69
|
+
True
|
|
70
|
+
sage: h
|
|
71
|
+
4*z1^2 + 2*z0*z2 + z1*z2 + z2^2 + (-z2^2 - 2*z0 + z2)*f0*f2
|
|
72
|
+
+ (-22*z0^2 + 2*z1^2 - z0*z2 + z2^2 - 1955*z2)*f1*f2
|
|
73
|
+
+ (-z0*z1 - 2*z1^2)*f2*f3 + (2*z0*z1 + z1*z2 - z2^2 - z1 + 3*z2)*f3^2
|
|
74
|
+
+ O(f0, f1, f2, f3)^3
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
- Use angle-bracket notation::
|
|
78
|
+
|
|
79
|
+
sage: # needs sage.rings.finite_rings
|
|
80
|
+
sage: S.<x,y> = PowerSeriesRing(GF(65537)); S
|
|
81
|
+
Multivariate Power Series Ring in x, y over Finite Field of size 65537
|
|
82
|
+
sage: s = -30077*x + 9485*x*y - 6260*y^3 + 12870*x^2*y^2 - 20289*y^4 + S.O(5); s
|
|
83
|
+
-30077*x + 9485*x*y - 6260*y^3 + 12870*x^2*y^2 - 20289*y^4 + O(x, y)^5
|
|
84
|
+
sage: s in S
|
|
85
|
+
True
|
|
86
|
+
sage: TestSuite(S).run()
|
|
87
|
+
sage: loads(dumps(S)) is S
|
|
88
|
+
True
|
|
89
|
+
|
|
90
|
+
- Use double square bracket notation::
|
|
91
|
+
|
|
92
|
+
sage: ZZ[['s,t,u']]
|
|
93
|
+
Multivariate Power Series Ring in s, t, u over Integer Ring
|
|
94
|
+
sage: GF(127931)[['x,y']] # needs sage.rings.finite_rings
|
|
95
|
+
Multivariate Power Series Ring in x, y over Finite Field of size 127931
|
|
96
|
+
|
|
97
|
+
Variable ordering determines how series are displayed.
|
|
98
|
+
|
|
99
|
+
::
|
|
100
|
+
|
|
101
|
+
sage: T.<a,b> = PowerSeriesRing(ZZ,order='deglex'); T
|
|
102
|
+
Multivariate Power Series Ring in a, b over Integer Ring
|
|
103
|
+
sage: TestSuite(T).run()
|
|
104
|
+
sage: loads(dumps(T)) is T
|
|
105
|
+
True
|
|
106
|
+
sage: T.term_order()
|
|
107
|
+
Degree lexicographic term order
|
|
108
|
+
sage: p = - 2*b^6 + a^5*b^2 + a^7 - b^2 - a*b^3 + T.O(9); p
|
|
109
|
+
a^7 + a^5*b^2 - 2*b^6 - a*b^3 - b^2 + O(a, b)^9
|
|
110
|
+
|
|
111
|
+
sage: U = PowerSeriesRing(ZZ,'a,b',order='negdeglex'); U
|
|
112
|
+
Multivariate Power Series Ring in a, b over Integer Ring
|
|
113
|
+
sage: U.term_order()
|
|
114
|
+
Negative degree lexicographic term order
|
|
115
|
+
sage: U(p)
|
|
116
|
+
-b^2 - a*b^3 - 2*b^6 + a^7 + a^5*b^2 + O(a, b)^9
|
|
117
|
+
|
|
118
|
+
Change from one base ring to another::
|
|
119
|
+
|
|
120
|
+
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
|
|
121
|
+
Multivariate Power Series Ring in t, u, v over Rational Field
|
|
122
|
+
sage: R.base_extend(RR) # needs sage.rings.real_mpfr
|
|
123
|
+
Multivariate Power Series Ring in t, u, v
|
|
124
|
+
over Real Field with 53 bits of precision
|
|
125
|
+
sage: R.change_ring(IntegerModRing(10))
|
|
126
|
+
Multivariate Power Series Ring in t, u, v
|
|
127
|
+
over Ring of integers modulo 10
|
|
128
|
+
|
|
129
|
+
sage: S = PowerSeriesRing(GF(65537),2,'x,y'); S # needs sage.rings.finite_rings
|
|
130
|
+
Multivariate Power Series Ring in x, y over Finite Field of size 65537
|
|
131
|
+
sage: S.change_ring(GF(5)) # needs sage.rings.finite_rings
|
|
132
|
+
Multivariate Power Series Ring in x, y over Finite Field of size 5
|
|
133
|
+
|
|
134
|
+
Coercion from polynomial ring::
|
|
135
|
+
|
|
136
|
+
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
|
|
137
|
+
Multivariate Power Series Ring in t, u, v over Rational Field
|
|
138
|
+
sage: A = PolynomialRing(ZZ,3,'t,u,v')
|
|
139
|
+
sage: g = A.gens()
|
|
140
|
+
sage: a = 2*g[0]*g[2] - 2*g[0] - 2; a
|
|
141
|
+
2*t*v - 2*t - 2
|
|
142
|
+
sage: R(a)
|
|
143
|
+
-2 - 2*t + 2*t*v
|
|
144
|
+
sage: R(a).O(4)
|
|
145
|
+
-2 - 2*t + 2*t*v + O(t, u, v)^4
|
|
146
|
+
sage: a.parent()
|
|
147
|
+
Multivariate Polynomial Ring in t, u, v over Integer Ring
|
|
148
|
+
sage: a in R
|
|
149
|
+
True
|
|
150
|
+
|
|
151
|
+
Coercion from polynomial ring in subset of variables::
|
|
152
|
+
|
|
153
|
+
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
|
|
154
|
+
Multivariate Power Series Ring in t, u, v over Rational Field
|
|
155
|
+
sage: A = PolynomialRing(QQ,2,'t,v')
|
|
156
|
+
sage: g = A.gens()
|
|
157
|
+
sage: a = -2*g[0]*g[1] - 1/27*g[1]^2 + g[0] - 1/2*g[1]; a
|
|
158
|
+
-2*t*v - 1/27*v^2 + t - 1/2*v
|
|
159
|
+
sage: a in R
|
|
160
|
+
True
|
|
161
|
+
|
|
162
|
+
Coercion from symbolic ring::
|
|
163
|
+
|
|
164
|
+
sage: # needs sage.symbolic
|
|
165
|
+
sage: x,y = var('x,y')
|
|
166
|
+
sage: S = PowerSeriesRing(GF(11),2,'x,y'); S
|
|
167
|
+
Multivariate Power Series Ring in x, y over Finite Field of size 11
|
|
168
|
+
sage: type(x)
|
|
169
|
+
<class 'sage.symbolic.expression.Expression'>
|
|
170
|
+
sage: type(S(x))
|
|
171
|
+
<class 'sage.rings.multi_power_series_ring.MPowerSeriesRing_generic_with_category.element_class'>
|
|
172
|
+
sage: f = S(2/7 -100*x^2 + 1/3*x*y + y^2).O(3); f
|
|
173
|
+
5 - x^2 + 4*x*y + y^2 + O(x, y)^3
|
|
174
|
+
sage: f.parent()
|
|
175
|
+
Multivariate Power Series Ring in x, y over Finite Field of size 11
|
|
176
|
+
sage: f.parent() == S
|
|
177
|
+
True
|
|
178
|
+
|
|
179
|
+
The implementation of the multivariate power series ring uses a combination
|
|
180
|
+
of multivariate polynomials and univariate power series. Namely, in order
|
|
181
|
+
to construct the multivariate power series ring `R[[x_1, x_2, \cdots, x_n]]`,
|
|
182
|
+
we consider the univariate power series ring `S[[T]]` over the multivariate
|
|
183
|
+
polynomial ring `S := R[x_1, x_2, \cdots, x_n]`, and in it we take the
|
|
184
|
+
subring formed by all power series whose `i`-th coefficient has degree `i`
|
|
185
|
+
for all `i \geq 0`. This subring is isomorphic to
|
|
186
|
+
`R[[x_1, x_2, \cdots, x_n]]`. This is how `R[[x_1, x_2, \cdots, x_n]]` is
|
|
187
|
+
implemented in this class. The ring `S` is called the foreground polynomial
|
|
188
|
+
ring, and the ring `S[[T]]` is called the background univariate power
|
|
189
|
+
series ring.
|
|
190
|
+
|
|
191
|
+
AUTHORS:
|
|
192
|
+
|
|
193
|
+
- Niles Johnson (2010-07): initial code
|
|
194
|
+
- Simon King (2012-08, 2013-02): Use category and coercion framework, :issue:`13412` and :issue:`14084`
|
|
195
|
+
"""
|
|
196
|
+
|
|
197
|
+
#*****************************************************************************
|
|
198
|
+
# Copyright (C) 2010 Niles Johnson <nilesj@gmail.com>
|
|
199
|
+
#
|
|
200
|
+
# This program is free software: you can redistribute it and/or modify
|
|
201
|
+
# it under the terms of the GNU General Public License as published by
|
|
202
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
203
|
+
# (at your option) any later version.
|
|
204
|
+
# http://www.gnu.org/licenses/
|
|
205
|
+
#*****************************************************************************
|
|
206
|
+
|
|
207
|
+
import sage.misc.latex as latex
|
|
208
|
+
|
|
209
|
+
from sage.misc.lazy_import import lazy_import
|
|
210
|
+
from sage.rings.infinity import infinity
|
|
211
|
+
from sage.rings.multi_power_series_ring_element import MPowerSeries
|
|
212
|
+
from sage.rings.polynomial.polynomial_ring import PolynomialRing_generic
|
|
213
|
+
from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing
|
|
214
|
+
from sage.rings.polynomial.multi_polynomial_ring import MPolynomialRing_base
|
|
215
|
+
from sage.rings.polynomial.term_order import TermOrder
|
|
216
|
+
from sage.rings.power_series_ring import PowerSeriesRing, PowerSeriesRing_generic
|
|
217
|
+
from sage.structure.nonexact import Nonexact
|
|
218
|
+
from sage.structure.parent import Parent
|
|
219
|
+
|
|
220
|
+
from sage.categories.commutative_rings import CommutativeRings
|
|
221
|
+
_CommutativeRings = CommutativeRings()
|
|
222
|
+
|
|
223
|
+
from sage.categories.integral_domains import IntegralDomains
|
|
224
|
+
_IntegralDomains = IntegralDomains()
|
|
225
|
+
|
|
226
|
+
try:
|
|
227
|
+
from sage.rings.laurent_series_ring import LaurentSeriesRing
|
|
228
|
+
except ImportError:
|
|
229
|
+
LaurentSeriesRing = ()
|
|
230
|
+
|
|
231
|
+
lazy_import('sage.rings.lazy_series', 'LazyPowerSeries')
|
|
232
|
+
lazy_import('sage.rings.lazy_series_ring', ('LazyPowerSeriesRing', 'LazyLaurentSeriesRing'))
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
def is_MPowerSeriesRing(x):
|
|
236
|
+
"""
|
|
237
|
+
Return ``True`` if input is a multivariate power series ring.
|
|
238
|
+
|
|
239
|
+
TESTS::
|
|
240
|
+
|
|
241
|
+
sage: from sage.rings.power_series_ring import is_PowerSeriesRing
|
|
242
|
+
sage: from sage.rings.multi_power_series_ring import is_MPowerSeriesRing
|
|
243
|
+
sage: M = PowerSeriesRing(ZZ, 4, 'v')
|
|
244
|
+
sage: is_PowerSeriesRing(M)
|
|
245
|
+
doctest:warning...
|
|
246
|
+
DeprecationWarning: The function is_PowerSeriesRing is deprecated;
|
|
247
|
+
use 'isinstance(..., (PowerSeriesRing_generic, LazyPowerSeriesRing) and ....ngens() == 1)' instead.
|
|
248
|
+
See https://github.com/sagemath/sage/issues/38290 for details.
|
|
249
|
+
False
|
|
250
|
+
sage: is_MPowerSeriesRing(M)
|
|
251
|
+
doctest:warning...
|
|
252
|
+
DeprecationWarning: The function is_MPowerSeriesRing is deprecated;
|
|
253
|
+
use 'isinstance(..., (MPowerSeriesRing_generic, LazyPowerSeriesRing))' instead.
|
|
254
|
+
See https://github.com/sagemath/sage/issues/38290 for details.
|
|
255
|
+
True
|
|
256
|
+
sage: T = PowerSeriesRing(RR, 'v')
|
|
257
|
+
sage: is_PowerSeriesRing(T)
|
|
258
|
+
True
|
|
259
|
+
sage: is_MPowerSeriesRing(T)
|
|
260
|
+
False
|
|
261
|
+
|
|
262
|
+
sage: # needs sage.combinat
|
|
263
|
+
sage: L = LazyPowerSeriesRing(QQ, 'x')
|
|
264
|
+
sage: is_MPowerSeriesRing(L)
|
|
265
|
+
True
|
|
266
|
+
sage: L = LazyPowerSeriesRing(QQ, 'x, y')
|
|
267
|
+
sage: is_MPowerSeriesRing(L)
|
|
268
|
+
True
|
|
269
|
+
"""
|
|
270
|
+
from sage.misc.superseded import deprecation
|
|
271
|
+
deprecation(38290,
|
|
272
|
+
"The function is_MPowerSeriesRing is deprecated; "
|
|
273
|
+
"use 'isinstance(..., (MPowerSeriesRing_generic, LazyPowerSeriesRing))' instead.")
|
|
274
|
+
return isinstance(x, (MPowerSeriesRing_generic, LazyPowerSeriesRing))
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
class MPowerSeriesRing_generic(PowerSeriesRing_generic, Nonexact):
|
|
278
|
+
r"""
|
|
279
|
+
A multivariate power series ring. This class is implemented as a
|
|
280
|
+
single variable power series ring in the variable ``T`` over a
|
|
281
|
+
multivariable polynomial ring in the specified generators. Each
|
|
282
|
+
generator ``g`` of the multivariable polynomial ring (called the
|
|
283
|
+
"foreground ring") is mapped to ``g*T`` in the single variable power series
|
|
284
|
+
ring (called the "background ring"). The background power series ring
|
|
285
|
+
is used to do arithmetic and track total-degree precision. The
|
|
286
|
+
foreground polynomial ring is used to display elements.
|
|
287
|
+
|
|
288
|
+
For usage and examples, see above, and :meth:`PowerSeriesRing`.
|
|
289
|
+
"""
|
|
290
|
+
### methods from PowerSeriesRing_generic that we *don't* override:
|
|
291
|
+
#
|
|
292
|
+
# variable_names_recursive : works just fine
|
|
293
|
+
#
|
|
294
|
+
# __contains__ : works just fine
|
|
295
|
+
#
|
|
296
|
+
# base_extend : works just fine
|
|
297
|
+
#
|
|
298
|
+
# is_exact : works just fine
|
|
299
|
+
#
|
|
300
|
+
# random_element : works just fine
|
|
301
|
+
#
|
|
302
|
+
# is_field : works just fine
|
|
303
|
+
#
|
|
304
|
+
# is_finite : works just fine
|
|
305
|
+
#
|
|
306
|
+
# __setitem__ : works just fine
|
|
307
|
+
#
|
|
308
|
+
#
|
|
309
|
+
#### notes
|
|
310
|
+
#
|
|
311
|
+
# sparse setting may not be implemented completely
|
|
312
|
+
Element = MPowerSeries
|
|
313
|
+
|
|
314
|
+
@staticmethod
|
|
315
|
+
def __classcall__(cls, base_ring, num_gens, name_list,
|
|
316
|
+
order='negdeglex', default_prec=10, sparse=False):
|
|
317
|
+
"""
|
|
318
|
+
Preprocessing of arguments: The term order can be given as string
|
|
319
|
+
or as a :class:`~sage.rings.polynomial.term_order.TermOrder` instance.
|
|
320
|
+
|
|
321
|
+
TESTS::
|
|
322
|
+
|
|
323
|
+
sage: P1 = PowerSeriesRing(QQ, ['f0','f1','f2','f3'], order=TermOrder('degrevlex'))
|
|
324
|
+
sage: P2 = PowerSeriesRing(QQ,4,'f', order='degrevlex')
|
|
325
|
+
sage: P1 is P2 # indirect doctest
|
|
326
|
+
True
|
|
327
|
+
"""
|
|
328
|
+
order = TermOrder(order, num_gens)
|
|
329
|
+
return super().__classcall__(cls, base_ring, num_gens, name_list,
|
|
330
|
+
order, default_prec, sparse)
|
|
331
|
+
|
|
332
|
+
def __init__(self, base_ring, num_gens, name_list,
|
|
333
|
+
order='negdeglex', default_prec=10, sparse=False):
|
|
334
|
+
"""
|
|
335
|
+
Initialize a multivariate power series ring. See PowerSeriesRing
|
|
336
|
+
for complete documentation.
|
|
337
|
+
|
|
338
|
+
INPUT:
|
|
339
|
+
|
|
340
|
+
- ``base_ring`` -- a commutative ring
|
|
341
|
+
|
|
342
|
+
- ``num_gens`` -- number of generators
|
|
343
|
+
|
|
344
|
+
- ``name_list`` -- list of indeterminate names or a single name
|
|
345
|
+
If a single name is given, indeterminates will be this name
|
|
346
|
+
followed by a number from 0 to num_gens - 1. If a list is
|
|
347
|
+
given, these will be the indeterminate names and the length
|
|
348
|
+
of the list must be equal to num_gens.
|
|
349
|
+
|
|
350
|
+
- ``order`` -- ordering of variables; default is
|
|
351
|
+
negative degree lexicographic
|
|
352
|
+
|
|
353
|
+
- ``default_prec`` -- (default: 10) the default total-degree precision
|
|
354
|
+
for elements
|
|
355
|
+
|
|
356
|
+
- ``sparse`` -- whether or not the power series are sparse; the
|
|
357
|
+
underlying polynomial ring is always sparse
|
|
358
|
+
|
|
359
|
+
EXAMPLES::
|
|
360
|
+
|
|
361
|
+
sage: R.<t,u,v> = PowerSeriesRing(QQ)
|
|
362
|
+
sage: g = 1 + v + 3*u*t^2 - 2*v^2*t^2
|
|
363
|
+
sage: g = g.add_bigoh(5); g
|
|
364
|
+
1 + v + 3*t^2*u - 2*t^2*v^2 + O(t, u, v)^5
|
|
365
|
+
sage: g in R
|
|
366
|
+
True
|
|
367
|
+
|
|
368
|
+
TESTS:
|
|
369
|
+
|
|
370
|
+
By :issue:`14084`, the multi-variate power series ring belongs to the
|
|
371
|
+
category of integral domains, if the base ring does::
|
|
372
|
+
|
|
373
|
+
sage: P = ZZ[['x','y']]
|
|
374
|
+
sage: P.category()
|
|
375
|
+
Category of integral domains
|
|
376
|
+
sage: TestSuite(P).run()
|
|
377
|
+
|
|
378
|
+
Otherwise, it belongs to the category of commutative rings::
|
|
379
|
+
|
|
380
|
+
sage: P = Integers(15)[['x','y']]
|
|
381
|
+
sage: P.category()
|
|
382
|
+
Category of commutative rings
|
|
383
|
+
sage: TestSuite(P).run()
|
|
384
|
+
"""
|
|
385
|
+
self._term_order = order
|
|
386
|
+
if not base_ring.is_commutative():
|
|
387
|
+
raise TypeError("Base ring must be a commutative ring.")
|
|
388
|
+
n = int(num_gens)
|
|
389
|
+
if n < 0:
|
|
390
|
+
raise ValueError("Multivariate Polynomial Rings must have more than 0 variables.")
|
|
391
|
+
self._ngens = n
|
|
392
|
+
self._has_singular = False #cannot convert to Singular by default
|
|
393
|
+
# Multivariate power series rings inherit from power series rings. But
|
|
394
|
+
# apparently we can not call their initialisation. Instead, initialise
|
|
395
|
+
# CommutativeRing and Nonexact:
|
|
396
|
+
Parent.__init__(self, base=base_ring, names=name_list,
|
|
397
|
+
category=_IntegralDomains if base_ring in
|
|
398
|
+
_IntegralDomains else _CommutativeRings)
|
|
399
|
+
Nonexact.__init__(self, default_prec)
|
|
400
|
+
|
|
401
|
+
# underlying polynomial ring in which to represent elements
|
|
402
|
+
self._poly_ring_ = PolynomialRing(base_ring, self.variable_names(), order=order)
|
|
403
|
+
# because sometimes PowerSeriesRing_generic calls self.__poly_ring
|
|
404
|
+
self._PowerSeriesRing_generic__poly_ring = self._poly_ring()
|
|
405
|
+
|
|
406
|
+
# background univariate power series ring
|
|
407
|
+
self._bg_power_series_ring = PowerSeriesRing(self._poly_ring_, 'Tbg', sparse=sparse, default_prec=default_prec)
|
|
408
|
+
self._bg_indeterminate = self._bg_power_series_ring.gen()
|
|
409
|
+
|
|
410
|
+
self._is_sparse = sparse
|
|
411
|
+
self._params = (base_ring, num_gens, name_list,
|
|
412
|
+
order, default_prec, sparse)
|
|
413
|
+
self._populate_coercion_lists_()
|
|
414
|
+
|
|
415
|
+
def _repr_(self):
|
|
416
|
+
"""
|
|
417
|
+
Print out a multivariate power series ring.
|
|
418
|
+
|
|
419
|
+
EXAMPLES::
|
|
420
|
+
|
|
421
|
+
sage: R.<x,y> = PowerSeriesRing(GF(17))
|
|
422
|
+
sage: R #indirect doctest
|
|
423
|
+
Multivariate Power Series Ring in x, y over Finite Field of size 17
|
|
424
|
+
sage: R.rename('my multivariate power series ring')
|
|
425
|
+
sage: R
|
|
426
|
+
my multivariate power series ring
|
|
427
|
+
"""
|
|
428
|
+
if self.ngens() == 0:
|
|
429
|
+
generators_rep = "no variables"
|
|
430
|
+
else:
|
|
431
|
+
generators_rep = ", ".join(self.variable_names())
|
|
432
|
+
|
|
433
|
+
s = "Multivariate Power Series Ring in %s over %s" % (generators_rep, self.base_ring())
|
|
434
|
+
if self.is_sparse():
|
|
435
|
+
s = 'Sparse ' + s
|
|
436
|
+
return s
|
|
437
|
+
|
|
438
|
+
def _latex_(self):
|
|
439
|
+
"""
|
|
440
|
+
Return latex representation of power series ring.
|
|
441
|
+
|
|
442
|
+
EXAMPLES::
|
|
443
|
+
|
|
444
|
+
sage: M = PowerSeriesRing(QQ,4,'v'); M
|
|
445
|
+
Multivariate Power Series Ring in v0, v1, v2, v3 over Rational Field
|
|
446
|
+
sage: M._latex_()
|
|
447
|
+
'\\Bold{Q}[[v_{0}, v_{1}, v_{2}, v_{3}]]'
|
|
448
|
+
"""
|
|
449
|
+
generators_latex = ", ".join(self.latex_variable_names())
|
|
450
|
+
return "%s[[%s]]" % (latex.latex(self.base_ring()), generators_latex)
|
|
451
|
+
|
|
452
|
+
def is_integral_domain(self, proof=False):
|
|
453
|
+
"""
|
|
454
|
+
Return ``True`` if the base ring is an integral domain; otherwise
|
|
455
|
+
return False.
|
|
456
|
+
|
|
457
|
+
EXAMPLES::
|
|
458
|
+
|
|
459
|
+
sage: M = PowerSeriesRing(QQ,4,'v'); M
|
|
460
|
+
Multivariate Power Series Ring in v0, v1, v2, v3 over Rational Field
|
|
461
|
+
sage: M.is_integral_domain()
|
|
462
|
+
True
|
|
463
|
+
"""
|
|
464
|
+
return self.base_ring().is_integral_domain()
|
|
465
|
+
|
|
466
|
+
def is_noetherian(self, proof=False):
|
|
467
|
+
"""
|
|
468
|
+
Power series over a Noetherian ring are Noetherian.
|
|
469
|
+
|
|
470
|
+
EXAMPLES::
|
|
471
|
+
|
|
472
|
+
sage: M = PowerSeriesRing(QQ,4,'v'); M
|
|
473
|
+
Multivariate Power Series Ring in v0, v1, v2, v3 over Rational Field
|
|
474
|
+
sage: M.is_noetherian()
|
|
475
|
+
True
|
|
476
|
+
|
|
477
|
+
sage: W = PowerSeriesRing(InfinitePolynomialRing(ZZ,'a'),2,'x,y')
|
|
478
|
+
sage: W.is_noetherian()
|
|
479
|
+
False
|
|
480
|
+
"""
|
|
481
|
+
return self.base_ring().is_noetherian()
|
|
482
|
+
|
|
483
|
+
def term_order(self):
|
|
484
|
+
"""
|
|
485
|
+
Print term ordering of ``self``. Term orderings are implemented by the
|
|
486
|
+
TermOrder class.
|
|
487
|
+
|
|
488
|
+
EXAMPLES::
|
|
489
|
+
|
|
490
|
+
sage: M.<x,y,z> = PowerSeriesRing(ZZ,3)
|
|
491
|
+
sage: M.term_order()
|
|
492
|
+
Negative degree lexicographic term order
|
|
493
|
+
sage: m = y*z^12 - y^6*z^8 - x^7*y^5*z^2 + x*y^2*z + M.O(15); m
|
|
494
|
+
x*y^2*z + y*z^12 - x^7*y^5*z^2 - y^6*z^8 + O(x, y, z)^15
|
|
495
|
+
|
|
496
|
+
sage: N = PowerSeriesRing(ZZ,3,'x,y,z', order='deglex')
|
|
497
|
+
sage: N.term_order()
|
|
498
|
+
Degree lexicographic term order
|
|
499
|
+
sage: N(m)
|
|
500
|
+
-x^7*y^5*z^2 - y^6*z^8 + y*z^12 + x*y^2*z + O(x, y, z)^15
|
|
501
|
+
"""
|
|
502
|
+
return self._term_order
|
|
503
|
+
|
|
504
|
+
def characteristic(self):
|
|
505
|
+
"""
|
|
506
|
+
Return characteristic of base ring, which is characteristic of ``self``.
|
|
507
|
+
|
|
508
|
+
EXAMPLES::
|
|
509
|
+
|
|
510
|
+
sage: H = PowerSeriesRing(GF(65537),4,'f'); H # needs sage.rings.finite_rings
|
|
511
|
+
Multivariate Power Series Ring in f0, f1, f2, f3 over
|
|
512
|
+
Finite Field of size 65537
|
|
513
|
+
sage: H.characteristic() # needs sage.rings.finite_rings
|
|
514
|
+
65537
|
|
515
|
+
"""
|
|
516
|
+
return self.base_ring().characteristic()
|
|
517
|
+
|
|
518
|
+
def construction(self):
|
|
519
|
+
r"""
|
|
520
|
+
Return a functor `F` and base ring `R` such that ``F(R) == self``.
|
|
521
|
+
|
|
522
|
+
EXAMPLES::
|
|
523
|
+
|
|
524
|
+
sage: M = PowerSeriesRing(QQ, 4, 'f'); M
|
|
525
|
+
Multivariate Power Series Ring in f0, f1, f2, f3 over Rational Field
|
|
526
|
+
|
|
527
|
+
sage: (c,R) = M.construction(); (c,R)
|
|
528
|
+
(Completion[('f0', 'f1', 'f2', 'f3'), prec=12],
|
|
529
|
+
Multivariate Polynomial Ring in f0, f1, f2, f3 over Rational Field)
|
|
530
|
+
sage: c
|
|
531
|
+
Completion[('f0', 'f1', 'f2', 'f3'), prec=12]
|
|
532
|
+
sage: c(R)
|
|
533
|
+
Multivariate Power Series Ring in f0, f1, f2, f3 over Rational Field
|
|
534
|
+
sage: c(R) == M
|
|
535
|
+
True
|
|
536
|
+
|
|
537
|
+
TESTS::
|
|
538
|
+
|
|
539
|
+
sage: M2 = PowerSeriesRing(QQ,4,'f', sparse=True)
|
|
540
|
+
sage: M == M2
|
|
541
|
+
False
|
|
542
|
+
sage: c,R = M2.construction()
|
|
543
|
+
sage: c(R)==M2
|
|
544
|
+
True
|
|
545
|
+
sage: M3 = PowerSeriesRing(QQ,4,'f', order='degrevlex')
|
|
546
|
+
sage: M3 == M
|
|
547
|
+
False
|
|
548
|
+
sage: M3 == M2
|
|
549
|
+
False
|
|
550
|
+
sage: c,R = M3.construction()
|
|
551
|
+
sage: c(R)==M3
|
|
552
|
+
True
|
|
553
|
+
"""
|
|
554
|
+
from sage.categories.pushout import CompletionFunctor
|
|
555
|
+
extras = {'order':self.term_order(), 'num_gens':self.ngens()}
|
|
556
|
+
if self.is_sparse():
|
|
557
|
+
extras['sparse'] = True
|
|
558
|
+
return (CompletionFunctor(self._names, self.default_prec(),
|
|
559
|
+
extras=extras),
|
|
560
|
+
self._poly_ring())
|
|
561
|
+
|
|
562
|
+
def change_ring(self, R):
|
|
563
|
+
"""
|
|
564
|
+
Return the power series ring over `R` in the same variable as ``self``.
|
|
565
|
+
This function ignores the question of whether the base ring of self
|
|
566
|
+
is or can extend to the base ring of `R`; for the latter, use
|
|
567
|
+
``base_extend``.
|
|
568
|
+
|
|
569
|
+
EXAMPLES::
|
|
570
|
+
|
|
571
|
+
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
|
|
572
|
+
Multivariate Power Series Ring in t, u, v over Rational Field
|
|
573
|
+
sage: R.base_extend(RR) # needs sage.rings.real_mpfr
|
|
574
|
+
Multivariate Power Series Ring in t, u, v over Real Field with
|
|
575
|
+
53 bits of precision
|
|
576
|
+
sage: R.change_ring(IntegerModRing(10))
|
|
577
|
+
Multivariate Power Series Ring in t, u, v over Ring of integers
|
|
578
|
+
modulo 10
|
|
579
|
+
sage: R.base_extend(IntegerModRing(10))
|
|
580
|
+
Traceback (most recent call last):
|
|
581
|
+
...
|
|
582
|
+
TypeError: no base extension defined
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
sage: S = PowerSeriesRing(GF(65537),2,'x,y'); S # needs sage.rings.finite_rings
|
|
586
|
+
Multivariate Power Series Ring in x, y over Finite Field of size
|
|
587
|
+
65537
|
|
588
|
+
sage: S.change_ring(GF(5)) # needs sage.rings.finite_rings
|
|
589
|
+
Multivariate Power Series Ring in x, y over Finite Field of size 5
|
|
590
|
+
"""
|
|
591
|
+
return PowerSeriesRing(R, names=self.variable_names(), default_prec=self.default_prec())
|
|
592
|
+
|
|
593
|
+
def remove_var(self, *var):
|
|
594
|
+
"""
|
|
595
|
+
Remove given variable or sequence of variables from ``self``.
|
|
596
|
+
|
|
597
|
+
EXAMPLES::
|
|
598
|
+
|
|
599
|
+
sage: A.<s,t,u> = PowerSeriesRing(ZZ)
|
|
600
|
+
sage: A.remove_var(t)
|
|
601
|
+
Multivariate Power Series Ring in s, u over Integer Ring
|
|
602
|
+
sage: A.remove_var(s,t)
|
|
603
|
+
Power Series Ring in u over Integer Ring
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
sage: M = PowerSeriesRing(GF(5),5,'t'); M
|
|
607
|
+
Multivariate Power Series Ring in t0, t1, t2, t3, t4
|
|
608
|
+
over Finite Field of size 5
|
|
609
|
+
sage: M.remove_var(M.gens()[3])
|
|
610
|
+
Multivariate Power Series Ring in t0, t1, t2, t4
|
|
611
|
+
over Finite Field of size 5
|
|
612
|
+
|
|
613
|
+
Removing all variables results in the base ring::
|
|
614
|
+
|
|
615
|
+
sage: M.remove_var(*M.gens())
|
|
616
|
+
Finite Field of size 5
|
|
617
|
+
"""
|
|
618
|
+
vars = list(self.variable_names())
|
|
619
|
+
for v in var:
|
|
620
|
+
vars.remove(str(v))
|
|
621
|
+
if len(vars) == 0:
|
|
622
|
+
return self.base_ring()
|
|
623
|
+
return PowerSeriesRing(self.base_ring(), names=vars)
|
|
624
|
+
|
|
625
|
+
## this is defined in PowerSeriesRing_generic
|
|
626
|
+
# def __call__(self, f, prec=infinity):
|
|
627
|
+
# """
|
|
628
|
+
# Coerce object to this multivariate power series ring.
|
|
629
|
+
# """
|
|
630
|
+
# return
|
|
631
|
+
|
|
632
|
+
def _coerce_impl(self, f):
|
|
633
|
+
"""
|
|
634
|
+
Return the canonical coercion of ``f`` into this multivariate power
|
|
635
|
+
series ring, if one is defined, or raise a :exc:`TypeError`.
|
|
636
|
+
|
|
637
|
+
The rings that canonically coerce to this multivariate power series
|
|
638
|
+
ring are:
|
|
639
|
+
|
|
640
|
+
- this ring itself
|
|
641
|
+
|
|
642
|
+
- a polynomial or power series ring in the same variables or a
|
|
643
|
+
subset of these variables (possibly empty), over any base
|
|
644
|
+
ring that canonically coerces into the base ring of this ring
|
|
645
|
+
|
|
646
|
+
EXAMPLES::
|
|
647
|
+
|
|
648
|
+
sage: R.<t,u,v> = PowerSeriesRing(QQ); R
|
|
649
|
+
Multivariate Power Series Ring in t, u, v over Rational Field
|
|
650
|
+
sage: S1.<t,v> = PolynomialRing(ZZ); S1
|
|
651
|
+
Multivariate Polynomial Ring in t, v over Integer Ring
|
|
652
|
+
sage: f1 = -t*v + 2*v^2 + v; f1
|
|
653
|
+
-t*v + 2*v^2 + v
|
|
654
|
+
sage: R(f1)
|
|
655
|
+
v - t*v + 2*v^2
|
|
656
|
+
sage: S2.<u,v> = PowerSeriesRing(ZZ); S2
|
|
657
|
+
Multivariate Power Series Ring in u, v over Integer Ring
|
|
658
|
+
sage: f2 = -2*v^2 + 5*u*v^2 + S2.O(6); f2
|
|
659
|
+
-2*v^2 + 5*u*v^2 + O(u, v)^6
|
|
660
|
+
sage: R(f2)
|
|
661
|
+
-2*v^2 + 5*u*v^2 + O(t, u, v)^6
|
|
662
|
+
|
|
663
|
+
sage: R2 = R.change_ring(GF(2))
|
|
664
|
+
sage: R2(f1)
|
|
665
|
+
v + t*v
|
|
666
|
+
sage: R2(f2)
|
|
667
|
+
u*v^2 + O(t, u, v)^6
|
|
668
|
+
|
|
669
|
+
TESTS::
|
|
670
|
+
|
|
671
|
+
sage: R.<t,u,v> = PowerSeriesRing(QQ)
|
|
672
|
+
sage: S1.<t,v> = PolynomialRing(ZZ)
|
|
673
|
+
sage: f1 = S1.random_element()
|
|
674
|
+
sage: g1 = R._coerce_impl(f1)
|
|
675
|
+
sage: f1.parent() == R
|
|
676
|
+
False
|
|
677
|
+
sage: g1.parent() == R
|
|
678
|
+
True
|
|
679
|
+
"""
|
|
680
|
+
P = f.parent()
|
|
681
|
+
if isinstance(P, (PolynomialRing_generic, MPolynomialRing_base,
|
|
682
|
+
PowerSeriesRing_generic, MPowerSeriesRing_generic,
|
|
683
|
+
LazyPowerSeriesRing)):
|
|
684
|
+
if set(P.variable_names()).issubset(set(self.variable_names())):
|
|
685
|
+
if self.has_coerce_map_from(P.base_ring()):
|
|
686
|
+
return self(f)
|
|
687
|
+
else:
|
|
688
|
+
return self(self.base_ring().coerce(f))
|
|
689
|
+
|
|
690
|
+
def _is_valid_homomorphism_(self, codomain, im_gens, base_map=None):
|
|
691
|
+
"""
|
|
692
|
+
Replacement for method of PowerSeriesRing_generic.
|
|
693
|
+
|
|
694
|
+
To be valid, a homomorphism must send generators to elements of
|
|
695
|
+
positive valuation or to nilpotent elements.
|
|
696
|
+
|
|
697
|
+
Note that the method is_nilpotent doesn't (as of sage 4.4) seem to
|
|
698
|
+
be defined for obvious examples (matrices, quotients of polynomial
|
|
699
|
+
rings).
|
|
700
|
+
|
|
701
|
+
EXAMPLES::
|
|
702
|
+
|
|
703
|
+
sage: R.<a,b,c> = PowerSeriesRing(Zmod(8)); R
|
|
704
|
+
Multivariate Power Series Ring in a, b, c
|
|
705
|
+
over Ring of integers modulo 8
|
|
706
|
+
sage: M = PowerSeriesRing(ZZ,3,'x,y,z')
|
|
707
|
+
sage: M._is_valid_homomorphism_(R,[a,c,b])
|
|
708
|
+
True
|
|
709
|
+
|
|
710
|
+
sage: M._is_valid_homomorphism_(R,[0,c,b])
|
|
711
|
+
True
|
|
712
|
+
|
|
713
|
+
2 is nilpotent in `ZZ/8`, but 3 is not::
|
|
714
|
+
|
|
715
|
+
sage: M._is_valid_homomorphism_(R,[2,c,b])
|
|
716
|
+
True
|
|
717
|
+
sage: M._is_valid_homomorphism_(R,[3,c,b])
|
|
718
|
+
False
|
|
719
|
+
|
|
720
|
+
Over `ZZ`, 2 is not nilpotent::
|
|
721
|
+
|
|
722
|
+
sage: S = R.change_ring(ZZ); S
|
|
723
|
+
Multivariate Power Series Ring in a, b, c over Integer Ring
|
|
724
|
+
sage: M._is_valid_homomorphism_(S,[a,c,b])
|
|
725
|
+
True
|
|
726
|
+
sage: M._is_valid_homomorphism_(S,[0,c,b])
|
|
727
|
+
True
|
|
728
|
+
sage: M._is_valid_homomorphism_(S,[2,c,b])
|
|
729
|
+
False
|
|
730
|
+
|
|
731
|
+
sage: g = [S.random_element(10)*v for v in S.gens()]
|
|
732
|
+
sage: M._is_valid_homomorphism_(S,g)
|
|
733
|
+
True
|
|
734
|
+
|
|
735
|
+
You must either give a base map or there must be a coercion
|
|
736
|
+
from the base ring to the codomain::
|
|
737
|
+
|
|
738
|
+
sage: # needs sage.rings.number_field
|
|
739
|
+
sage: T.<t> = ZZ[]
|
|
740
|
+
sage: K.<i> = NumberField(t^2 + 1)
|
|
741
|
+
sage: Q8.<z> = CyclotomicField(8)
|
|
742
|
+
sage: X.<x> = PowerSeriesRing(Q8)
|
|
743
|
+
sage: M.<a,b,c> = PowerSeriesRing(K)
|
|
744
|
+
sage: M._is_valid_homomorphism_(X, [x,x,x+x^2]) # no coercion
|
|
745
|
+
False
|
|
746
|
+
sage: M._is_valid_homomorphism_(X, [x,x,x+x^2], base_map=K.hom([z^2]))
|
|
747
|
+
True
|
|
748
|
+
"""
|
|
749
|
+
try:
|
|
750
|
+
im_gens = [codomain(v) for v in im_gens]
|
|
751
|
+
except TypeError:
|
|
752
|
+
raise TypeError("The given generator images do not coerce to codomain.")
|
|
753
|
+
|
|
754
|
+
if len(im_gens) is not self.ngens():
|
|
755
|
+
raise ValueError("You must specify the image of each generator.")
|
|
756
|
+
if base_map is None and not codomain.has_coerce_map_from(self.base_ring()):
|
|
757
|
+
return False
|
|
758
|
+
if all(v == 0 for v in im_gens):
|
|
759
|
+
return True
|
|
760
|
+
|
|
761
|
+
if isinstance(codomain, (PowerSeriesRing_generic, MPowerSeriesRing_generic, LazyPowerSeriesRing,
|
|
762
|
+
LaurentSeriesRing, LazyLaurentSeriesRing)):
|
|
763
|
+
try:
|
|
764
|
+
B = all(v.valuation() > 0 or v.is_nilpotent() for v in im_gens)
|
|
765
|
+
except NotImplementedError:
|
|
766
|
+
B = all(v.valuation() > 0 for v in im_gens)
|
|
767
|
+
return B
|
|
768
|
+
try:
|
|
769
|
+
return all(v.is_nilpotent() for v in im_gens)
|
|
770
|
+
except NotImplementedError:
|
|
771
|
+
pass
|
|
772
|
+
return False
|
|
773
|
+
|
|
774
|
+
def _coerce_map_from_(self, P):
|
|
775
|
+
"""
|
|
776
|
+
The rings that canonically coerce to this multivariate power series
|
|
777
|
+
ring are:
|
|
778
|
+
|
|
779
|
+
- this ring itself
|
|
780
|
+
|
|
781
|
+
- a polynomial or power series ring in the same variables or a
|
|
782
|
+
subset of these variables (possibly empty), over any base
|
|
783
|
+
ring that canonically coerces into this ring
|
|
784
|
+
|
|
785
|
+
- any ring that coerces into the foreground polynomial ring of this ring
|
|
786
|
+
|
|
787
|
+
EXAMPLES::
|
|
788
|
+
|
|
789
|
+
sage: # needs sage.rings.finite_rings
|
|
790
|
+
sage: A = GF(17)[['x','y']]
|
|
791
|
+
sage: A.has_coerce_map_from(ZZ)
|
|
792
|
+
True
|
|
793
|
+
sage: A.has_coerce_map_from(ZZ['x'])
|
|
794
|
+
True
|
|
795
|
+
sage: A.has_coerce_map_from(ZZ['y','x'])
|
|
796
|
+
True
|
|
797
|
+
sage: A.has_coerce_map_from(ZZ[['x']])
|
|
798
|
+
True
|
|
799
|
+
sage: A.has_coerce_map_from(ZZ[['y','x']])
|
|
800
|
+
True
|
|
801
|
+
sage: A.has_coerce_map_from(ZZ['x','z'])
|
|
802
|
+
False
|
|
803
|
+
sage: A.has_coerce_map_from(GF(3)['x','y'])
|
|
804
|
+
False
|
|
805
|
+
sage: A.has_coerce_map_from(Frac(ZZ['y','x']))
|
|
806
|
+
False
|
|
807
|
+
|
|
808
|
+
TESTS::
|
|
809
|
+
|
|
810
|
+
sage: M = PowerSeriesRing(ZZ, 3, 'x,y,z')
|
|
811
|
+
sage: M._coerce_map_from_(M)
|
|
812
|
+
True
|
|
813
|
+
sage: M._coerce_map_from_(M.remove_var(x)) # needs sage.symbolic
|
|
814
|
+
True
|
|
815
|
+
sage: M._coerce_map_from_(PowerSeriesRing(ZZ,x)) # needs sage.symbolic
|
|
816
|
+
True
|
|
817
|
+
sage: M._coerce_map_from_(PolynomialRing(ZZ,'x,z'))
|
|
818
|
+
True
|
|
819
|
+
sage: M._coerce_map_from_(PolynomialRing(ZZ,0,''))
|
|
820
|
+
True
|
|
821
|
+
sage: M._coerce_map_from_(ZZ)
|
|
822
|
+
True
|
|
823
|
+
|
|
824
|
+
sage: M._coerce_map_from_(Zmod(13))
|
|
825
|
+
False
|
|
826
|
+
sage: M._coerce_map_from_(PolynomialRing(ZZ,2,'x,t'))
|
|
827
|
+
False
|
|
828
|
+
sage: M._coerce_map_from_(PolynomialRing(Zmod(11),2,'x,y'))
|
|
829
|
+
False
|
|
830
|
+
|
|
831
|
+
sage: P = PolynomialRing(ZZ,3,'z')
|
|
832
|
+
sage: H = PowerSeriesRing(P,4,'f'); H
|
|
833
|
+
Multivariate Power Series Ring in f0, f1, f2, f3 over
|
|
834
|
+
Multivariate Polynomial Ring in z0, z1, z2 over Integer Ring
|
|
835
|
+
sage: H._coerce_map_from_(P)
|
|
836
|
+
True
|
|
837
|
+
sage: H._coerce_map_from_(P.remove_var(P.gen(1)))
|
|
838
|
+
True
|
|
839
|
+
sage: H._coerce_map_from_(PolynomialRing(ZZ,'z2,f0'))
|
|
840
|
+
True
|
|
841
|
+
|
|
842
|
+
sage: # needs sage.combinat
|
|
843
|
+
sage: L.<x,y> = LazyPowerSeriesRing(QQ)
|
|
844
|
+
sage: R = PowerSeriesRing(QQ, names=('x','y','z'))
|
|
845
|
+
sage: R.has_coerce_map_from(L)
|
|
846
|
+
True
|
|
847
|
+
"""
|
|
848
|
+
if isinstance(P, (MPolynomialRing_base, MPowerSeriesRing_generic, LazyPowerSeriesRing,
|
|
849
|
+
PolynomialRing_generic, PowerSeriesRing_generic)):
|
|
850
|
+
if set(P.variable_names()).issubset(set(self.variable_names())):
|
|
851
|
+
if self.has_coerce_map_from(P.base_ring()):
|
|
852
|
+
return True
|
|
853
|
+
|
|
854
|
+
return self._poly_ring().has_coerce_map_from(P)
|
|
855
|
+
|
|
856
|
+
def _element_constructor_(self, f, prec=None):
|
|
857
|
+
"""
|
|
858
|
+
TESTS::
|
|
859
|
+
|
|
860
|
+
sage: M = PowerSeriesRing(ZZ,5,'t')
|
|
861
|
+
sage: t = M.gens()
|
|
862
|
+
sage: m = -2*t[0]*t[3]^6*t[4] - 12*t[0]^2*t[3]*t[4]^6 + t[1]*t[2]*t[3]^4*t[4]^3 + M.O(10)
|
|
863
|
+
sage: M._element_constructor_(m)
|
|
864
|
+
-2*t0*t3^6*t4 - 12*t0^2*t3*t4^6 + t1*t2*t3^4*t4^3 +
|
|
865
|
+
O(t0, t1, t2, t3, t4)^10
|
|
866
|
+
sage: R = PolynomialRing(ZZ,5,'t')
|
|
867
|
+
sage: t = R.gens()
|
|
868
|
+
sage: p = -4*t[0]*t[4] + t[1]^2 + t[1]*t[2] - 6*t[2]*t[4] - t[3]*t[4]
|
|
869
|
+
sage: M._element_constructor_(p)
|
|
870
|
+
-4*t0*t4 + t1^2 + t1*t2 - 6*t2*t4 - t3*t4
|
|
871
|
+
sage: p.parent()
|
|
872
|
+
Multivariate Polynomial Ring in t0, t1, t2, t3, t4 over Integer Ring
|
|
873
|
+
sage: M._element_constructor_(p).parent()
|
|
874
|
+
Multivariate Power Series Ring in t0, t1, t2, t3, t4 over
|
|
875
|
+
Integer Ring
|
|
876
|
+
|
|
877
|
+
sage: # needs sage.combinat
|
|
878
|
+
sage: L.<x,y> = LazyPowerSeriesRing(QQ)
|
|
879
|
+
sage: R = PowerSeriesRing(QQ, names=('x','y','z'))
|
|
880
|
+
sage: R(1/(1-x-y), prec=3)
|
|
881
|
+
1 + x + y + x^2 + 2*x*y + y^2 + O(x, y, z)^3
|
|
882
|
+
sage: R(x + y^2)
|
|
883
|
+
x + y^2
|
|
884
|
+
"""
|
|
885
|
+
if prec is None:
|
|
886
|
+
try:
|
|
887
|
+
prec = f.prec()
|
|
888
|
+
except AttributeError:
|
|
889
|
+
prec = infinity
|
|
890
|
+
if isinstance(f, LazyPowerSeries):
|
|
891
|
+
if prec is infinity:
|
|
892
|
+
try:
|
|
893
|
+
f = f.polynomial()
|
|
894
|
+
except ValueError:
|
|
895
|
+
f = f.add_bigoh(self.default_prec())
|
|
896
|
+
else:
|
|
897
|
+
f = f.add_bigoh(prec)
|
|
898
|
+
return self.element_class(parent=self, x=f, prec=prec)
|
|
899
|
+
|
|
900
|
+
def laurent_series_ring(self):
|
|
901
|
+
"""
|
|
902
|
+
Laurent series not yet implemented for multivariate power series rings.
|
|
903
|
+
|
|
904
|
+
TESTS::
|
|
905
|
+
|
|
906
|
+
sage: M = PowerSeriesRing(ZZ,3,'x,y,z')
|
|
907
|
+
sage: M.laurent_series_ring()
|
|
908
|
+
Traceback (most recent call last):
|
|
909
|
+
...
|
|
910
|
+
NotImplementedError: Laurent series not implemented for
|
|
911
|
+
multivariate power series.
|
|
912
|
+
"""
|
|
913
|
+
raise NotImplementedError("Laurent series not implemented for multivariate power series.")
|
|
914
|
+
|
|
915
|
+
def _poly_ring(self, x=None):
|
|
916
|
+
"""
|
|
917
|
+
Return the underlying polynomial ring used to represent elements of
|
|
918
|
+
this power series ring. If given an input x, returns x coerced
|
|
919
|
+
into this polynomial ring.
|
|
920
|
+
|
|
921
|
+
EXAMPLES::
|
|
922
|
+
|
|
923
|
+
sage: R.<t,u> = PowerSeriesRing(QQ)
|
|
924
|
+
sage: R._poly_ring()
|
|
925
|
+
Multivariate Polynomial Ring in t, u over Rational Field
|
|
926
|
+
sage: R._poly_ring(2).parent()
|
|
927
|
+
Multivariate Polynomial Ring in t, u over Rational Field
|
|
928
|
+
"""
|
|
929
|
+
if x is None:
|
|
930
|
+
return self._poly_ring_
|
|
931
|
+
else:
|
|
932
|
+
return self._poly_ring_(x)
|
|
933
|
+
|
|
934
|
+
def _mpoly_ring(self, x=None):
|
|
935
|
+
"""
|
|
936
|
+
Same as ``_poly_ring``.
|
|
937
|
+
|
|
938
|
+
TESTS::
|
|
939
|
+
|
|
940
|
+
sage: R.<t,u> = PowerSeriesRing(QQ)
|
|
941
|
+
sage: R._mpoly_ring()
|
|
942
|
+
Multivariate Polynomial Ring in t, u over Rational Field
|
|
943
|
+
sage: R._mpoly_ring(2).parent()
|
|
944
|
+
Multivariate Polynomial Ring in t, u over Rational Field
|
|
945
|
+
"""
|
|
946
|
+
return self._poly_ring(x)
|
|
947
|
+
|
|
948
|
+
def _bg_ps_ring(self, x=None):
|
|
949
|
+
"""
|
|
950
|
+
Return the background univariate power series ring. If given an
|
|
951
|
+
input x, returns x coerced into this power series ring.
|
|
952
|
+
|
|
953
|
+
EXAMPLES::
|
|
954
|
+
|
|
955
|
+
sage: R.<t,u> = PowerSeriesRing(QQ)
|
|
956
|
+
sage: R._bg_ps_ring()
|
|
957
|
+
Power Series Ring in Tbg over Multivariate Polynomial Ring in
|
|
958
|
+
t, u over Rational Field
|
|
959
|
+
sage: R._bg_ps_ring(4).parent() == R
|
|
960
|
+
False
|
|
961
|
+
"""
|
|
962
|
+
if x is None:
|
|
963
|
+
return self._bg_power_series_ring
|
|
964
|
+
else:
|
|
965
|
+
return self._bg_power_series_ring(x)
|
|
966
|
+
|
|
967
|
+
def is_sparse(self):
|
|
968
|
+
"""
|
|
969
|
+
Check whether ``self`` is sparse.
|
|
970
|
+
|
|
971
|
+
EXAMPLES::
|
|
972
|
+
|
|
973
|
+
sage: M = PowerSeriesRing(ZZ, 3, 's,t,u'); M
|
|
974
|
+
Multivariate Power Series Ring in s, t, u over Integer Ring
|
|
975
|
+
sage: M.is_sparse()
|
|
976
|
+
False
|
|
977
|
+
sage: N = PowerSeriesRing(ZZ, 3, 's,t,u', sparse=True); N
|
|
978
|
+
Sparse Multivariate Power Series Ring in s, t, u over Integer Ring
|
|
979
|
+
sage: N.is_sparse()
|
|
980
|
+
True
|
|
981
|
+
"""
|
|
982
|
+
return self._is_sparse
|
|
983
|
+
|
|
984
|
+
def is_dense(self):
|
|
985
|
+
"""
|
|
986
|
+
Is ``self`` dense? (opposite of sparse)
|
|
987
|
+
|
|
988
|
+
EXAMPLES::
|
|
989
|
+
|
|
990
|
+
sage: M = PowerSeriesRing(ZZ, 3, 's,t,u'); M
|
|
991
|
+
Multivariate Power Series Ring in s, t, u over Integer Ring
|
|
992
|
+
sage: M.is_dense()
|
|
993
|
+
True
|
|
994
|
+
sage: N = PowerSeriesRing(ZZ, 3, 's,t,u', sparse=True); N
|
|
995
|
+
Sparse Multivariate Power Series Ring in s, t, u over Integer Ring
|
|
996
|
+
sage: N.is_dense()
|
|
997
|
+
False
|
|
998
|
+
"""
|
|
999
|
+
return not self.is_sparse()
|
|
1000
|
+
|
|
1001
|
+
def gen(self, n=0):
|
|
1002
|
+
"""
|
|
1003
|
+
Return the `n`-th generator of ``self``.
|
|
1004
|
+
|
|
1005
|
+
EXAMPLES::
|
|
1006
|
+
|
|
1007
|
+
sage: M = PowerSeriesRing(ZZ, 10, 'v')
|
|
1008
|
+
sage: M.gen(6)
|
|
1009
|
+
v6
|
|
1010
|
+
"""
|
|
1011
|
+
if n < 0 or n >= self._ngens:
|
|
1012
|
+
raise ValueError("Generator not defined.")
|
|
1013
|
+
#return self(self._poly_ring().gens()[int(n)])
|
|
1014
|
+
return self.element_class(parent=self, x=self._poly_ring().gens()[int(n)], is_gen=True)
|
|
1015
|
+
|
|
1016
|
+
def ngens(self):
|
|
1017
|
+
"""
|
|
1018
|
+
Return number of generators of ``self``.
|
|
1019
|
+
|
|
1020
|
+
EXAMPLES::
|
|
1021
|
+
|
|
1022
|
+
sage: M = PowerSeriesRing(ZZ, 10, 'v')
|
|
1023
|
+
sage: M.ngens()
|
|
1024
|
+
10
|
|
1025
|
+
"""
|
|
1026
|
+
return self._ngens
|
|
1027
|
+
|
|
1028
|
+
def gens(self) -> tuple:
|
|
1029
|
+
"""
|
|
1030
|
+
Return the generators of this ring.
|
|
1031
|
+
|
|
1032
|
+
EXAMPLES::
|
|
1033
|
+
|
|
1034
|
+
sage: M = PowerSeriesRing(ZZ, 3, 'v')
|
|
1035
|
+
sage: M.gens()
|
|
1036
|
+
(v0, v1, v2)
|
|
1037
|
+
"""
|
|
1038
|
+
return tuple(self.gen(i) for i in range(self._ngens))
|
|
1039
|
+
|
|
1040
|
+
def prec_ideal(self):
|
|
1041
|
+
"""
|
|
1042
|
+
Return the ideal which determines precision; this is the ideal
|
|
1043
|
+
generated by all of the generators of our background polynomial
|
|
1044
|
+
ring.
|
|
1045
|
+
|
|
1046
|
+
EXAMPLES::
|
|
1047
|
+
|
|
1048
|
+
sage: A.<s,t,u> = PowerSeriesRing(ZZ)
|
|
1049
|
+
sage: A.prec_ideal()
|
|
1050
|
+
Ideal (s, t, u) of
|
|
1051
|
+
Multivariate Polynomial Ring in s, t, u over Integer Ring
|
|
1052
|
+
"""
|
|
1053
|
+
return self._poly_ring().ideal(self._poly_ring().gens())
|
|
1054
|
+
|
|
1055
|
+
def bigoh(self, prec):
|
|
1056
|
+
"""
|
|
1057
|
+
Return big oh with precision ``prec``. The function ``O`` does the same thing.
|
|
1058
|
+
|
|
1059
|
+
EXAMPLES::
|
|
1060
|
+
|
|
1061
|
+
sage: T.<a,b> = PowerSeriesRing(ZZ,2); T
|
|
1062
|
+
Multivariate Power Series Ring in a, b over Integer Ring
|
|
1063
|
+
sage: T.bigoh(10)
|
|
1064
|
+
0 + O(a, b)^10
|
|
1065
|
+
sage: T.O(10)
|
|
1066
|
+
0 + O(a, b)^10
|
|
1067
|
+
"""
|
|
1068
|
+
return self.zero().O(prec)
|
|
1069
|
+
|
|
1070
|
+
def O(self, prec):
|
|
1071
|
+
"""
|
|
1072
|
+
Return big oh with precision ``prec``. This function is an alias for ``bigoh``.
|
|
1073
|
+
|
|
1074
|
+
EXAMPLES::
|
|
1075
|
+
|
|
1076
|
+
sage: T.<a,b> = PowerSeriesRing(ZZ,2); T
|
|
1077
|
+
Multivariate Power Series Ring in a, b over Integer Ring
|
|
1078
|
+
sage: T.O(10)
|
|
1079
|
+
0 + O(a, b)^10
|
|
1080
|
+
sage: T.bigoh(10)
|
|
1081
|
+
0 + O(a, b)^10
|
|
1082
|
+
"""
|
|
1083
|
+
return self.bigoh(prec)
|
|
1084
|
+
|
|
1085
|
+
def _send_to_bg(self, f):
|
|
1086
|
+
"""
|
|
1087
|
+
Send an element of the foreground polynomial ring to the background
|
|
1088
|
+
power series ring.
|
|
1089
|
+
|
|
1090
|
+
EXAMPLES::
|
|
1091
|
+
|
|
1092
|
+
sage: M = PowerSeriesRing(QQ,4,'f')
|
|
1093
|
+
sage: f = M._poly_ring().gens()
|
|
1094
|
+
sage: bg = M._send_to_bg((f[0] + f[2] + 2)**2); bg
|
|
1095
|
+
4 + (4*f0 + 4*f2)*Tbg + (f0^2 + 2*f0*f2 + f2^2)*Tbg^2
|
|
1096
|
+
|
|
1097
|
+
sage: M._send_to_bg(bg)
|
|
1098
|
+
Traceback (most recent call last):
|
|
1099
|
+
...
|
|
1100
|
+
TypeError: Cannot coerce input to polynomial ring.
|
|
1101
|
+
"""
|
|
1102
|
+
try:
|
|
1103
|
+
f = self._poly_ring(f)
|
|
1104
|
+
except TypeError:
|
|
1105
|
+
raise TypeError("Cannot coerce input to polynomial ring.")
|
|
1106
|
+
return self._bg_ps_ring(f.homogeneous_components())
|
|
1107
|
+
|
|
1108
|
+
def _send_to_fg(self, f):
|
|
1109
|
+
"""
|
|
1110
|
+
Send an element of the background univariate power series ring to
|
|
1111
|
+
the foreground multivariate polynomial ring.
|
|
1112
|
+
|
|
1113
|
+
EXAMPLES::
|
|
1114
|
+
|
|
1115
|
+
sage: M = PowerSeriesRing(QQ,4,'f')
|
|
1116
|
+
sage: f = M._poly_ring().gens()
|
|
1117
|
+
sage: bg = M._send_to_bg((f[0] + f[2] + 2)**2); bg
|
|
1118
|
+
4 + (4*f0 + 4*f2)*Tbg + (f0^2 + 2*f0*f2 + f2^2)*Tbg^2
|
|
1119
|
+
sage: bg.parent()
|
|
1120
|
+
Power Series Ring in Tbg over Multivariate Polynomial Ring in f0, f1,
|
|
1121
|
+
f2, f3 over Rational Field
|
|
1122
|
+
sage: fg = M._send_to_fg(bg); fg
|
|
1123
|
+
4 + 4*f0 + 4*f2 + f0^2 + 2*f0*f2 + f2^2
|
|
1124
|
+
sage: fg.parent()
|
|
1125
|
+
Multivariate Polynomial Ring in f0, f1, f2, f3 over Rational Field
|
|
1126
|
+
sage: fg = M._send_to_fg(bg.add_bigoh(3)); fg
|
|
1127
|
+
4 + 4*f0 + 4*f2 + f0^2 + 2*f0*f2 + f2^2
|
|
1128
|
+
sage: fg = M._send_to_fg(bg.add_bigoh(2)); fg
|
|
1129
|
+
4 + 4*f0 + 4*f2
|
|
1130
|
+
"""
|
|
1131
|
+
return self._poly_ring_.sum(f.polynomial().coefficients())
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
def unpickle_multi_power_series_ring_v0(base_ring, num_gens, names, order, default_prec, sparse):
|
|
1135
|
+
"""
|
|
1136
|
+
Unpickle (deserialize) a multivariate power series ring according
|
|
1137
|
+
to the given inputs.
|
|
1138
|
+
|
|
1139
|
+
EXAMPLES::
|
|
1140
|
+
|
|
1141
|
+
sage: P.<x,y> = PowerSeriesRing(QQ)
|
|
1142
|
+
sage: loads(dumps(P)) == P # indirect doctest
|
|
1143
|
+
True
|
|
1144
|
+
"""
|
|
1145
|
+
return PowerSeriesRing(base_ring, num_gens=num_gens, names=names, order=order, default_prec=default_prec, sparse=sparse)
|