passagemath-pari 10.6.32__cp314-cp314-musllinux_1_2_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-pari might be problematic. Click here for more details.
- PARIKernel/__init__.py +2 -0
- PARIKernel/__main__.py +5 -0
- PARIKernel/io.cpython-314-x86_64-linux-musl.so +0 -0
- PARIKernel/io.pxd +7 -0
- PARIKernel/io.pyx +84 -0
- PARIKernel/kernel.cpython-314-x86_64-linux-musl.so +0 -0
- PARIKernel/kernel.pyx +260 -0
- PARIKernel/paridecl.pxd +95 -0
- PARIKernel/svg.cpython-314-x86_64-linux-musl.so +0 -0
- PARIKernel/svg.pyx +52 -0
- cypari2/__init__.py +8 -0
- cypari2/auto_paridecl.pxd +1070 -0
- cypari2/closure.cpython-314-x86_64-linux-musl.so +0 -0
- cypari2/closure.pxd +5 -0
- cypari2/closure.pyx +246 -0
- cypari2/convert.cpython-314-x86_64-linux-musl.so +0 -0
- cypari2/convert.pxd +80 -0
- cypari2/convert.pyx +613 -0
- cypari2/custom_block.cpython-314-x86_64-linux-musl.so +0 -0
- cypari2/custom_block.pyx +30 -0
- cypari2/cypari.h +13 -0
- cypari2/gen.cpython-314-x86_64-linux-musl.so +0 -0
- cypari2/gen.pxd +69 -0
- cypari2/gen.pyx +4819 -0
- cypari2/handle_error.cpython-314-x86_64-linux-musl.so +0 -0
- cypari2/handle_error.pxd +7 -0
- cypari2/handle_error.pyx +232 -0
- cypari2/pari_instance.cpython-314-x86_64-linux-musl.so +0 -0
- cypari2/pari_instance.pxd +27 -0
- cypari2/pari_instance.pyx +1438 -0
- cypari2/paridecl.pxd +5353 -0
- cypari2/paripriv.pxd +34 -0
- cypari2/pycore_long.h +98 -0
- cypari2/pycore_long.pxd +9 -0
- cypari2/stack.cpython-314-x86_64-linux-musl.so +0 -0
- cypari2/stack.pxd +27 -0
- cypari2/stack.pyx +278 -0
- cypari2/string_utils.cpython-314-x86_64-linux-musl.so +0 -0
- cypari2/string_utils.pxd +29 -0
- cypari2/string_utils.pyx +65 -0
- cypari2/types.pxd +147 -0
- passagemath_pari-10.6.32.data/data/etc/jupyter/nbconfig/notebook.d/gp-mode.json +5 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/kernels/pari_jupyter/kernel.js +28 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/kernels/pari_jupyter/kernel.json +6 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/kernels/pari_jupyter/logo-64x64.png +0 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/kernels/xeus-gp/kernel.json +13 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/kernels/xeus-gp/logo-32x32.png +0 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/kernels/xeus-gp/logo-64x64.png +0 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/kernels/xeus-gp/logo-svg.svg +75 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/nbextensions/gp-mode/gp.js +284 -0
- passagemath_pari-10.6.32.data/data/share/jupyter/nbextensions/gp-mode/main.js +15 -0
- passagemath_pari-10.6.32.dist-info/METADATA +209 -0
- passagemath_pari-10.6.32.dist-info/RECORD +331 -0
- passagemath_pari-10.6.32.dist-info/WHEEL +5 -0
- passagemath_pari-10.6.32.dist-info/top_level.txt +4 -0
- passagemath_pari.libs/libcrypto-f04afe95.so.3 +0 -0
- passagemath_pari.libs/libflint-fd6f12fc.so.21.0.0 +0 -0
- passagemath_pari.libs/libgcc_s-0cd532bd.so.1 +0 -0
- passagemath_pari.libs/libgf2x-9e30c3e3.so.3.0.0 +0 -0
- passagemath_pari.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
- passagemath_pari.libs/libgivaro-9a94c711.so.9.2.1 +0 -0
- passagemath_pari.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
- passagemath_pari.libs/libgmpxx-9e08595c.so.4.7.0 +0 -0
- passagemath_pari.libs/libgsl-42cda06f.so.28.0.0 +0 -0
- passagemath_pari.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
- passagemath_pari.libs/libncursesw-9c9e32c3.so.6.5 +0 -0
- passagemath_pari.libs/libntl-26885ca2.so.44.0.1 +0 -0
- passagemath_pari.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
- passagemath_pari.libs/libpari-gmp-tls-f31f908f.so.2.17.2 +0 -0
- passagemath_pari.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
- passagemath_pari.libs/libreadline-06542304.so.8.2 +0 -0
- passagemath_pari.libs/libstdc++-5d72f927.so.6.0.33 +0 -0
- passagemath_pari.libs/libuuid-f3770415.so.1.3.0 +0 -0
- passagemath_pari.libs/libxeus-735780ff.so.13.1.0 +0 -0
- passagemath_pari.libs/libxeus-zmq-c68577b4.so.6.0.1 +0 -0
- passagemath_pari.libs/libzmq-1ba9a3da.so.5.2.5 +0 -0
- sage/all__sagemath_pari.py +26 -0
- sage/databases/all__sagemath_pari.py +7 -0
- sage/databases/conway.py +274 -0
- sage/ext/all__sagemath_pari.py +1 -0
- sage/ext/memory.cpython-314-x86_64-linux-musl.so +0 -0
- sage/ext/memory.pyx +98 -0
- sage/ext_data/pari/buzzard/DimensionSk.g +286 -0
- sage/ext_data/pari/buzzard/Tpprog.g +179 -0
- sage/ext_data/pari/buzzard/genusn.g +129 -0
- sage/ext_data/pari/dokchitser/computel.gp +740 -0
- sage/ext_data/pari/dokchitser/computel.gp.template +740 -0
- sage/ext_data/pari/dokchitser/ex-bsw +43 -0
- sage/ext_data/pari/dokchitser/ex-chgen +48 -0
- sage/ext_data/pari/dokchitser/ex-chqua +37 -0
- sage/ext_data/pari/dokchitser/ex-delta +35 -0
- sage/ext_data/pari/dokchitser/ex-eisen +30 -0
- sage/ext_data/pari/dokchitser/ex-gen2 +38 -0
- sage/ext_data/pari/dokchitser/ex-gen3 +49 -0
- sage/ext_data/pari/dokchitser/ex-gen4 +54 -0
- sage/ext_data/pari/dokchitser/ex-nf +48 -0
- sage/ext_data/pari/dokchitser/ex-shin +50 -0
- sage/ext_data/pari/dokchitser/ex-tau2 +30 -0
- sage/ext_data/pari/dokchitser/ex-zeta +27 -0
- sage/ext_data/pari/dokchitser/ex-zeta2 +47 -0
- sage/ext_data/pari/dokchitser/testall +13 -0
- sage/ext_data/pari/simon/ell.gp +2129 -0
- sage/ext_data/pari/simon/ellQ.gp +2151 -0
- sage/ext_data/pari/simon/ellcommon.gp +126 -0
- sage/ext_data/pari/simon/qfsolve.gp +722 -0
- sage/ext_data/pari/simon/resultant3.gp +306 -0
- sage/groups/all__sagemath_pari.py +3 -0
- sage/groups/pari_group.py +175 -0
- sage/interfaces/all__sagemath_pari.py +1 -0
- sage/interfaces/genus2reduction.py +464 -0
- sage/interfaces/gp.py +1114 -0
- sage/libs/all__sagemath_pari.py +2 -0
- sage/libs/linkages/__init__.py +1 -0
- sage/libs/linkages/padics/API.pxi +617 -0
- sage/libs/linkages/padics/Polynomial_ram.pxi +388 -0
- sage/libs/linkages/padics/Polynomial_shared.pxi +554 -0
- sage/libs/linkages/padics/__init__.py +1 -0
- sage/libs/linkages/padics/fmpz_poly_unram.pxi +869 -0
- sage/libs/linkages/padics/mpz.pxi +691 -0
- sage/libs/linkages/padics/relaxed/API.pxi +518 -0
- sage/libs/linkages/padics/relaxed/__init__.py +1 -0
- sage/libs/linkages/padics/relaxed/flint.pxi +543 -0
- sage/libs/linkages/padics/unram_shared.pxi +247 -0
- sage/libs/pari/__init__.py +210 -0
- sage/libs/pari/all.py +5 -0
- sage/libs/pari/convert_flint.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/pari/convert_flint.pxd +14 -0
- sage/libs/pari/convert_flint.pyx +159 -0
- sage/libs/pari/convert_gmp.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/pari/convert_gmp.pxd +14 -0
- sage/libs/pari/convert_gmp.pyx +210 -0
- sage/libs/pari/convert_sage.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/pari/convert_sage.pxd +16 -0
- sage/libs/pari/convert_sage.pyx +588 -0
- sage/libs/pari/convert_sage_complex_double.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/pari/convert_sage_complex_double.pxd +14 -0
- sage/libs/pari/convert_sage_complex_double.pyx +132 -0
- sage/libs/pari/convert_sage_matrix.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/pari/convert_sage_matrix.pyx +106 -0
- sage/libs/pari/convert_sage_real_double.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/pari/convert_sage_real_double.pxd +5 -0
- sage/libs/pari/convert_sage_real_double.pyx +14 -0
- sage/libs/pari/convert_sage_real_mpfr.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/pari/convert_sage_real_mpfr.pxd +7 -0
- sage/libs/pari/convert_sage_real_mpfr.pyx +108 -0
- sage/libs/pari/misc.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/pari/misc.pxd +4 -0
- sage/libs/pari/misc.pyx +26 -0
- sage/libs/pari/tests.py +1848 -0
- sage/matrix/all__sagemath_pari.py +1 -0
- sage/matrix/matrix_integer_pari.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_integer_pari.pyx +187 -0
- sage/matrix/matrix_rational_pari.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_rational_pari.pyx +160 -0
- sage/quadratic_forms/all__sagemath_pari.py +10 -0
- sage/quadratic_forms/genera/all.py +9 -0
- sage/quadratic_forms/genera/genus.py +3506 -0
- sage/quadratic_forms/genera/normal_form.py +1519 -0
- sage/quadratic_forms/genera/spinor_genus.py +243 -0
- sage/quadratic_forms/qfsolve.py +255 -0
- sage/quadratic_forms/quadratic_form__automorphisms.py +427 -0
- sage/quadratic_forms/quadratic_form__genus.py +141 -0
- sage/quadratic_forms/quadratic_form__local_density_interfaces.py +140 -0
- sage/quadratic_forms/quadratic_form__local_normal_form.py +421 -0
- sage/quadratic_forms/quadratic_form__local_representation_conditions.py +889 -0
- sage/quadratic_forms/quadratic_form__mass.py +69 -0
- sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py +663 -0
- sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py +373 -0
- sage/quadratic_forms/quadratic_form__siegel_product.py +198 -0
- sage/quadratic_forms/special_values.py +323 -0
- sage/rings/all__sagemath_pari.py +15 -0
- sage/rings/factorint_pari.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/factorint_pari.pyx +80 -0
- sage/rings/finite_rings/all__sagemath_pari.py +1 -0
- sage/rings/finite_rings/element_givaro.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/finite_rings/element_givaro.pxd +91 -0
- sage/rings/finite_rings/element_givaro.pyx +1769 -0
- sage/rings/finite_rings/element_ntl_gf2e.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/finite_rings/element_ntl_gf2e.pxd +22 -0
- sage/rings/finite_rings/element_ntl_gf2e.pyx +1333 -0
- sage/rings/finite_rings/element_pari_ffelt.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/finite_rings/element_pari_ffelt.pxd +13 -0
- sage/rings/finite_rings/element_pari_ffelt.pyx +1441 -0
- sage/rings/finite_rings/finite_field_givaro.py +612 -0
- sage/rings/finite_rings/finite_field_pari_ffelt.py +238 -0
- sage/rings/finite_rings/hom_finite_field_givaro.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/finite_rings/hom_finite_field_givaro.pxd +28 -0
- sage/rings/finite_rings/hom_finite_field_givaro.pyx +280 -0
- sage/rings/finite_rings/residue_field_givaro.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/finite_rings/residue_field_givaro.pyx +133 -0
- sage/rings/finite_rings/residue_field_pari_ffelt.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/finite_rings/residue_field_pari_ffelt.pyx +128 -0
- sage/rings/function_field/all__sagemath_pari.py +1 -0
- sage/rings/function_field/valuation.py +1450 -0
- sage/rings/function_field/valuation_ring.py +212 -0
- sage/rings/number_field/all__sagemath_pari.py +14 -0
- sage/rings/number_field/totallyreal.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/number_field/totallyreal.pyx +509 -0
- sage/rings/number_field/totallyreal_data.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/number_field/totallyreal_data.pxd +26 -0
- sage/rings/number_field/totallyreal_data.pyx +928 -0
- sage/rings/number_field/totallyreal_phc.py +144 -0
- sage/rings/number_field/totallyreal_rel.py +1018 -0
- sage/rings/padics/CA_template.pxi +1847 -0
- sage/rings/padics/CA_template_header.pxi +50 -0
- sage/rings/padics/CR_template.pxi +2563 -0
- sage/rings/padics/CR_template_header.pxi +57 -0
- sage/rings/padics/FM_template.pxi +1575 -0
- sage/rings/padics/FM_template_header.pxi +50 -0
- sage/rings/padics/FP_template.pxi +2176 -0
- sage/rings/padics/FP_template_header.pxi +57 -0
- sage/rings/padics/all.py +3 -0
- sage/rings/padics/all__sagemath_pari.py +11 -0
- sage/rings/padics/common_conversion.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/common_conversion.pxd +15 -0
- sage/rings/padics/common_conversion.pyx +508 -0
- sage/rings/padics/eisenstein_extension_generic.py +232 -0
- sage/rings/padics/factory.py +3623 -0
- sage/rings/padics/generic_nodes.py +1615 -0
- sage/rings/padics/lattice_precision.py +2889 -0
- sage/rings/padics/morphism.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/morphism.pxd +11 -0
- sage/rings/padics/morphism.pyx +366 -0
- sage/rings/padics/padic_base_generic.py +467 -0
- sage/rings/padics/padic_base_leaves.py +1235 -0
- sage/rings/padics/padic_capped_absolute_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/padic_capped_absolute_element.pxd +15 -0
- sage/rings/padics/padic_capped_absolute_element.pyx +520 -0
- sage/rings/padics/padic_capped_relative_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/padic_capped_relative_element.pxd +14 -0
- sage/rings/padics/padic_capped_relative_element.pyx +614 -0
- sage/rings/padics/padic_extension_generic.py +990 -0
- sage/rings/padics/padic_extension_leaves.py +738 -0
- sage/rings/padics/padic_fixed_mod_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/padic_fixed_mod_element.pxd +15 -0
- sage/rings/padics/padic_fixed_mod_element.pyx +584 -0
- sage/rings/padics/padic_floating_point_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/padic_floating_point_element.pxd +14 -0
- sage/rings/padics/padic_floating_point_element.pyx +447 -0
- sage/rings/padics/padic_generic_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/padic_generic_element.pxd +48 -0
- sage/rings/padics/padic_generic_element.pyx +4642 -0
- sage/rings/padics/padic_lattice_element.py +1342 -0
- sage/rings/padics/padic_printing.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/padic_printing.pxd +38 -0
- sage/rings/padics/padic_printing.pyx +1505 -0
- sage/rings/padics/padic_relaxed_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/padic_relaxed_element.pxd +56 -0
- sage/rings/padics/padic_relaxed_element.pyx +18 -0
- sage/rings/padics/padic_relaxed_errors.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/padic_relaxed_errors.pxd +11 -0
- sage/rings/padics/padic_relaxed_errors.pyx +71 -0
- sage/rings/padics/padic_template_element.pxi +1212 -0
- sage/rings/padics/padic_template_element_header.pxi +50 -0
- sage/rings/padics/padic_valuation.py +1423 -0
- sage/rings/padics/pow_computer_flint.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/pow_computer_flint.pxd +38 -0
- sage/rings/padics/pow_computer_flint.pyx +641 -0
- sage/rings/padics/pow_computer_relative.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/pow_computer_relative.pxd +29 -0
- sage/rings/padics/pow_computer_relative.pyx +415 -0
- sage/rings/padics/qadic_flint_CA.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/qadic_flint_CA.pxd +21 -0
- sage/rings/padics/qadic_flint_CA.pyx +130 -0
- sage/rings/padics/qadic_flint_CR.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/qadic_flint_CR.pxd +13 -0
- sage/rings/padics/qadic_flint_CR.pyx +172 -0
- sage/rings/padics/qadic_flint_FM.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/qadic_flint_FM.pxd +14 -0
- sage/rings/padics/qadic_flint_FM.pyx +111 -0
- sage/rings/padics/qadic_flint_FP.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/qadic_flint_FP.pxd +12 -0
- sage/rings/padics/qadic_flint_FP.pyx +165 -0
- sage/rings/padics/relative_extension_leaves.py +429 -0
- sage/rings/padics/relative_ramified_CA.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/relative_ramified_CA.pxd +9 -0
- sage/rings/padics/relative_ramified_CA.pyx +33 -0
- sage/rings/padics/relative_ramified_CR.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/relative_ramified_CR.pxd +8 -0
- sage/rings/padics/relative_ramified_CR.pyx +33 -0
- sage/rings/padics/relative_ramified_FM.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/relative_ramified_FM.pxd +9 -0
- sage/rings/padics/relative_ramified_FM.pyx +33 -0
- sage/rings/padics/relative_ramified_FP.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/padics/relative_ramified_FP.pxd +8 -0
- sage/rings/padics/relative_ramified_FP.pyx +33 -0
- sage/rings/padics/relaxed_template.pxi +4229 -0
- sage/rings/padics/relaxed_template_header.pxi +160 -0
- sage/rings/padics/tests.py +35 -0
- sage/rings/padics/tutorial.py +341 -0
- sage/rings/padics/unramified_extension_generic.py +335 -0
- sage/rings/padics/witt_vector.py +917 -0
- sage/rings/padics/witt_vector_ring.py +934 -0
- sage/rings/pari_ring.py +235 -0
- sage/rings/polynomial/all__sagemath_pari.py +1 -0
- sage/rings/polynomial/padics/all.py +1 -0
- sage/rings/polynomial/padics/polynomial_padic.py +360 -0
- sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py +1324 -0
- sage/rings/polynomial/padics/polynomial_padic_flat.py +72 -0
- sage/rings/power_series_pari.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/power_series_pari.pxd +6 -0
- sage/rings/power_series_pari.pyx +934 -0
- sage/rings/tate_algebra.py +1282 -0
- sage/rings/tate_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/tate_algebra_element.pxd +49 -0
- sage/rings/tate_algebra_element.pyx +3464 -0
- sage/rings/tate_algebra_ideal.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/tate_algebra_ideal.pxd +7 -0
- sage/rings/tate_algebra_ideal.pyx +1307 -0
- sage/rings/valuation/all.py +7 -0
- sage/rings/valuation/augmented_valuation.py +2118 -0
- sage/rings/valuation/developing_valuation.py +362 -0
- sage/rings/valuation/gauss_valuation.py +812 -0
- sage/rings/valuation/inductive_valuation.py +1686 -0
- sage/rings/valuation/limit_valuation.py +946 -0
- sage/rings/valuation/mapped_valuation.py +656 -0
- sage/rings/valuation/scaled_valuation.py +322 -0
- sage/rings/valuation/trivial_valuation.py +382 -0
- sage/rings/valuation/valuation.py +1119 -0
- sage/rings/valuation/valuation_space.py +1615 -0
- sage/rings/valuation/valuations_catalog.py +10 -0
- sage/rings/valuation/value_group.py +697 -0
- sage/schemes/all__sagemath_pari.py +1 -0
- sage/schemes/elliptic_curves/all__sagemath_pari.py +1 -0
- sage/schemes/elliptic_curves/descent_two_isogeny_pari.cpython-314-x86_64-linux-musl.so +0 -0
- sage/schemes/elliptic_curves/descent_two_isogeny_pari.pyx +46 -0
- sage_wheels/bin/gp +0 -0
- sage_wheels/bin/gp2c +0 -0
- sage_wheels/bin/gp2c-run +57 -0
- sage_wheels/bin/xeus-gp +0 -0
- sage_wheels/share/gp2c/func.dsc +18414 -0
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
r"""
|
|
3
|
+
Valuations which are scaled versions of another valuation
|
|
4
|
+
|
|
5
|
+
EXAMPLES::
|
|
6
|
+
|
|
7
|
+
sage: 3*ZZ.valuation(3)
|
|
8
|
+
3 * 3-adic valuation
|
|
9
|
+
|
|
10
|
+
AUTHORS:
|
|
11
|
+
|
|
12
|
+
- Julian Rüth (2016-11-10): initial version
|
|
13
|
+
"""
|
|
14
|
+
# ****************************************************************************
|
|
15
|
+
# Copyright (C) 2016-2017 Julian Rüth <julian.rueth@fsfe.org>
|
|
16
|
+
#
|
|
17
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
18
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
19
|
+
# the License, or (at your option) any later version.
|
|
20
|
+
# https://www.gnu.org/licenses/
|
|
21
|
+
# ****************************************************************************
|
|
22
|
+
|
|
23
|
+
from sage.structure.factory import UniqueFactory
|
|
24
|
+
|
|
25
|
+
from .valuation import DiscreteValuation
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class ScaledValuationFactory(UniqueFactory):
|
|
29
|
+
r"""
|
|
30
|
+
Return a valuation which scales the valuation ``base`` by the factor ``s``.
|
|
31
|
+
|
|
32
|
+
EXAMPLES::
|
|
33
|
+
|
|
34
|
+
sage: 3*ZZ.valuation(2) # indirect doctest
|
|
35
|
+
3 * 2-adic valuation
|
|
36
|
+
"""
|
|
37
|
+
def create_key(self, base, s):
|
|
38
|
+
r"""
|
|
39
|
+
Create a key which uniquely identifies a valuation.
|
|
40
|
+
|
|
41
|
+
TESTS::
|
|
42
|
+
|
|
43
|
+
sage: 3*ZZ.valuation(2) is 2*(3/2*ZZ.valuation(2)) # indirect doctest
|
|
44
|
+
True
|
|
45
|
+
"""
|
|
46
|
+
from sage.rings.infinity import infinity
|
|
47
|
+
from sage.rings.rational_field import QQ
|
|
48
|
+
if s is infinity or s not in QQ or s <= 0:
|
|
49
|
+
# for these values we can not return a TrivialValuation() in
|
|
50
|
+
# create_object() because that would override that instance's
|
|
51
|
+
# _factory_data and lead to pickling errors
|
|
52
|
+
raise ValueError("s must be a positive rational")
|
|
53
|
+
if base.is_trivial():
|
|
54
|
+
# for the same reason we can not accept trivial valuations here
|
|
55
|
+
raise ValueError("base must not be trivial")
|
|
56
|
+
s = QQ.coerce(s)
|
|
57
|
+
if s == 1:
|
|
58
|
+
# we would override the _factory_data of base if we just returned
|
|
59
|
+
# it in create_object() so we just refuse to do so
|
|
60
|
+
raise ValueError("s must not be 1")
|
|
61
|
+
|
|
62
|
+
if isinstance(base, ScaledValuation_generic):
|
|
63
|
+
return self.create_key(base._base_valuation, s * base._scale)
|
|
64
|
+
|
|
65
|
+
return base, s
|
|
66
|
+
|
|
67
|
+
def create_object(self, version, key):
|
|
68
|
+
r"""
|
|
69
|
+
Create a valuation from ``key``.
|
|
70
|
+
|
|
71
|
+
TESTS::
|
|
72
|
+
|
|
73
|
+
sage: 3*ZZ.valuation(2) # indirect doctest
|
|
74
|
+
3 * 2-adic valuation
|
|
75
|
+
"""
|
|
76
|
+
base, s = key
|
|
77
|
+
|
|
78
|
+
assert not isinstance(base, ScaledValuation_generic)
|
|
79
|
+
|
|
80
|
+
from .valuation_space import DiscretePseudoValuationSpace
|
|
81
|
+
parent = DiscretePseudoValuationSpace(base.domain())
|
|
82
|
+
return parent.__make_element_class__(ScaledValuation_generic)(parent, base, s)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
ScaledValuation = ScaledValuationFactory("sage.rings.valuation.scaled_valuation.ScaledValuation")
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class ScaledValuation_generic(DiscreteValuation):
|
|
89
|
+
r"""
|
|
90
|
+
A valuation which scales another ``base_valuation`` by a finite positive factor ``s``.
|
|
91
|
+
|
|
92
|
+
EXAMPLES::
|
|
93
|
+
|
|
94
|
+
sage: v = 3*ZZ.valuation(3); v
|
|
95
|
+
3 * 3-adic valuation
|
|
96
|
+
|
|
97
|
+
TESTS::
|
|
98
|
+
|
|
99
|
+
sage: TestSuite(v).run() # long time # needs sage.geometry.polyhedron
|
|
100
|
+
"""
|
|
101
|
+
def __init__(self, parent, base_valuation, s):
|
|
102
|
+
r"""
|
|
103
|
+
.. TODO::
|
|
104
|
+
|
|
105
|
+
It is annoying that we have to wrap any possible method on
|
|
106
|
+
``base_valuation`` in this class. It would be nice if this would
|
|
107
|
+
somehow be done automagically, e.g., by adding annotations to the
|
|
108
|
+
methods in ``base_valuation`` that explain which parameters and
|
|
109
|
+
return values need to be scaled.
|
|
110
|
+
|
|
111
|
+
TESTS::
|
|
112
|
+
|
|
113
|
+
sage: v = 3*ZZ.valuation(2)
|
|
114
|
+
sage: from sage.rings.valuation.scaled_valuation import ScaledValuation_generic
|
|
115
|
+
sage: isinstance(v, ScaledValuation_generic)
|
|
116
|
+
True
|
|
117
|
+
"""
|
|
118
|
+
DiscreteValuation.__init__(self, parent)
|
|
119
|
+
self._base_valuation = base_valuation
|
|
120
|
+
self._scale = s
|
|
121
|
+
|
|
122
|
+
def _repr_(self):
|
|
123
|
+
r"""
|
|
124
|
+
Return a printable representation of this valuation.
|
|
125
|
+
|
|
126
|
+
EXAMPLES::
|
|
127
|
+
|
|
128
|
+
sage: 3*ZZ.valuation(2) # indirect doctest
|
|
129
|
+
3 * 2-adic valuation
|
|
130
|
+
"""
|
|
131
|
+
return "%r * %r" % (self._scale, self._base_valuation)
|
|
132
|
+
|
|
133
|
+
def residue_ring(self):
|
|
134
|
+
r"""
|
|
135
|
+
Return the residue field of this valuation.
|
|
136
|
+
|
|
137
|
+
EXAMPLES::
|
|
138
|
+
|
|
139
|
+
sage: v = 3*ZZ.valuation(2)
|
|
140
|
+
sage: v.residue_ring()
|
|
141
|
+
Finite Field of size 2
|
|
142
|
+
"""
|
|
143
|
+
return self._base_valuation.residue_ring()
|
|
144
|
+
|
|
145
|
+
def uniformizer(self):
|
|
146
|
+
r"""
|
|
147
|
+
Return a uniformizing element of this valuation.
|
|
148
|
+
|
|
149
|
+
EXAMPLES::
|
|
150
|
+
|
|
151
|
+
sage: v = 3*ZZ.valuation(2)
|
|
152
|
+
sage: v.uniformizer()
|
|
153
|
+
2
|
|
154
|
+
"""
|
|
155
|
+
return self._base_valuation.uniformizer()
|
|
156
|
+
|
|
157
|
+
def _call_(self, f):
|
|
158
|
+
r"""
|
|
159
|
+
Evaluate this valuation at ``f``.
|
|
160
|
+
|
|
161
|
+
EXAMPLES::
|
|
162
|
+
|
|
163
|
+
sage: v = 3*ZZ.valuation(2)
|
|
164
|
+
sage: v(2)
|
|
165
|
+
3
|
|
166
|
+
"""
|
|
167
|
+
return self._scale * self._base_valuation(f)
|
|
168
|
+
|
|
169
|
+
def reduce(self, f):
|
|
170
|
+
r"""
|
|
171
|
+
Return the reduction of ``f`` in the :meth:`~sage.rings.valuation.valuation_space.DiscretePseudoValuationSpace.ElementMethods.residue_field` of this valuation.
|
|
172
|
+
|
|
173
|
+
EXAMPLES::
|
|
174
|
+
|
|
175
|
+
sage: v = 3*ZZ.valuation(2)
|
|
176
|
+
sage: v.reduce(1)
|
|
177
|
+
1
|
|
178
|
+
"""
|
|
179
|
+
return self._base_valuation.reduce(f)
|
|
180
|
+
|
|
181
|
+
def lift(self, F):
|
|
182
|
+
r"""
|
|
183
|
+
Lift ``F`` from the :meth:`~sage.rings.valuation.valuation_space.DiscretePseudoValuationSpace.ElementMethods.residue_field`
|
|
184
|
+
of this valuation into its
|
|
185
|
+
domain.
|
|
186
|
+
|
|
187
|
+
EXAMPLES::
|
|
188
|
+
|
|
189
|
+
sage: v = 3*ZZ.valuation(2)
|
|
190
|
+
sage: v.lift(1)
|
|
191
|
+
1
|
|
192
|
+
"""
|
|
193
|
+
return self._base_valuation.lift(F)
|
|
194
|
+
|
|
195
|
+
def extensions(self, ring):
|
|
196
|
+
r"""
|
|
197
|
+
Return the extensions of this valuation to ``ring``.
|
|
198
|
+
|
|
199
|
+
EXAMPLES::
|
|
200
|
+
|
|
201
|
+
sage: v = 3*ZZ.valuation(5)
|
|
202
|
+
sage: v.extensions(GaussianIntegers().fraction_field()) # needs sage.geometry.polyhedron sage.rings.number_field
|
|
203
|
+
[3 * [ 5-adic valuation, v(x + 2) = 1 ]-adic valuation,
|
|
204
|
+
3 * [ 5-adic valuation, v(x + 3) = 1 ]-adic valuation]
|
|
205
|
+
"""
|
|
206
|
+
return [ScaledValuation(w, self._scale) for w in self._base_valuation.extensions(ring)]
|
|
207
|
+
|
|
208
|
+
def restriction(self, ring):
|
|
209
|
+
r"""
|
|
210
|
+
Return the restriction of this valuation to ``ring``.
|
|
211
|
+
|
|
212
|
+
EXAMPLES::
|
|
213
|
+
|
|
214
|
+
sage: v = 3*QQ.valuation(5)
|
|
215
|
+
sage: v.restriction(ZZ)
|
|
216
|
+
3 * 5-adic valuation
|
|
217
|
+
"""
|
|
218
|
+
restricted = self._base_valuation.restriction(ring)
|
|
219
|
+
if restricted.is_trivial():
|
|
220
|
+
# trivial valuations can not be scaled explicitly for caching reasons
|
|
221
|
+
return restricted
|
|
222
|
+
return ScaledValuation(restricted, self._scale)
|
|
223
|
+
|
|
224
|
+
def _strictly_separating_element(self, other):
|
|
225
|
+
r"""
|
|
226
|
+
Return an element in the domain of this valuation which has positive
|
|
227
|
+
valuation with respect to this valuation but negative valuation with
|
|
228
|
+
respect to ``other``.
|
|
229
|
+
|
|
230
|
+
EXAMPLES::
|
|
231
|
+
|
|
232
|
+
sage: v2 = QQ.valuation(2)
|
|
233
|
+
sage: v3 = 12 * QQ.valuation(3)
|
|
234
|
+
sage: v2._strictly_separating_element(v3)
|
|
235
|
+
2/3
|
|
236
|
+
"""
|
|
237
|
+
return self._base_valuation._strictly_separating_element(other)
|
|
238
|
+
|
|
239
|
+
def _weakly_separating_element(self, other):
|
|
240
|
+
r"""
|
|
241
|
+
Return an element in the domain of this valuation which has
|
|
242
|
+
positive valuation with respect to this valuation and higher
|
|
243
|
+
valuation with respect to this valuation than with respect to
|
|
244
|
+
``other``.
|
|
245
|
+
|
|
246
|
+
EXAMPLES::
|
|
247
|
+
|
|
248
|
+
sage: v2 = QQ.valuation(2)
|
|
249
|
+
sage: v3 = 12 * QQ.valuation(3)
|
|
250
|
+
sage: v2._weakly_separating_element(v3)
|
|
251
|
+
2
|
|
252
|
+
"""
|
|
253
|
+
return self._base_valuation._weakly_separating_element(other)
|
|
254
|
+
|
|
255
|
+
def _ge_(self, other):
|
|
256
|
+
r"""
|
|
257
|
+
Return whether this valuation is greater or equal to ``other``, a
|
|
258
|
+
valuation on the same domain.
|
|
259
|
+
|
|
260
|
+
EXAMPLES::
|
|
261
|
+
|
|
262
|
+
sage: v2 = QQ.valuation(2)
|
|
263
|
+
sage: 2*v2 >= v2
|
|
264
|
+
True
|
|
265
|
+
sage: v2/2 >= 2*v2
|
|
266
|
+
False
|
|
267
|
+
sage: 3*v2 > 2*v2
|
|
268
|
+
True
|
|
269
|
+
|
|
270
|
+
Test that non-scaled valuations call through to this method to resolve
|
|
271
|
+
the scaling::
|
|
272
|
+
|
|
273
|
+
sage: v2 > v2/2
|
|
274
|
+
True
|
|
275
|
+
"""
|
|
276
|
+
if self == other:
|
|
277
|
+
return True
|
|
278
|
+
if isinstance(other, ScaledValuation_generic):
|
|
279
|
+
return (self._scale / other._scale) * self._base_valuation >= other._base_valuation
|
|
280
|
+
if self._scale >= 1:
|
|
281
|
+
if self._base_valuation >= other:
|
|
282
|
+
return True
|
|
283
|
+
else:
|
|
284
|
+
assert not self.is_trivial()
|
|
285
|
+
if self._base_valuation <= other:
|
|
286
|
+
return False
|
|
287
|
+
return super()._ge_(other)
|
|
288
|
+
|
|
289
|
+
def _le_(self, other):
|
|
290
|
+
r"""
|
|
291
|
+
Return whether this valuation is smaller or equal to ``other``, a
|
|
292
|
+
valuation on the same domain.
|
|
293
|
+
|
|
294
|
+
EXAMPLES::
|
|
295
|
+
|
|
296
|
+
sage: v2 = QQ.valuation(2)
|
|
297
|
+
sage: 2*v2 <= v2
|
|
298
|
+
False
|
|
299
|
+
sage: v2/2 <= 2*v2
|
|
300
|
+
True
|
|
301
|
+
sage: 3*v2 < 2*v2
|
|
302
|
+
False
|
|
303
|
+
|
|
304
|
+
Test that non-scaled valuations call through to this method to resolve
|
|
305
|
+
the scaling::
|
|
306
|
+
|
|
307
|
+
sage: v2 < v2/2
|
|
308
|
+
False
|
|
309
|
+
"""
|
|
310
|
+
return other / self._scale >= self._base_valuation
|
|
311
|
+
|
|
312
|
+
def value_semigroup(self):
|
|
313
|
+
r"""
|
|
314
|
+
Return the value semigroup of this valuation.
|
|
315
|
+
|
|
316
|
+
EXAMPLES::
|
|
317
|
+
|
|
318
|
+
sage: v2 = QQ.valuation(2)
|
|
319
|
+
sage: (2*v2).value_semigroup()
|
|
320
|
+
Additive Abelian Semigroup generated by -2, 2
|
|
321
|
+
"""
|
|
322
|
+
return self._scale * self._base_valuation.value_semigroup()
|
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
r"""
|
|
3
|
+
Trivial valuations
|
|
4
|
+
|
|
5
|
+
AUTHORS:
|
|
6
|
+
|
|
7
|
+
- Julian Rüth (2016-10-14): initial version
|
|
8
|
+
|
|
9
|
+
EXAMPLES::
|
|
10
|
+
|
|
11
|
+
sage: v = valuations.TrivialValuation(QQ); v
|
|
12
|
+
Trivial valuation on Rational Field
|
|
13
|
+
sage: v(1)
|
|
14
|
+
0
|
|
15
|
+
"""
|
|
16
|
+
# ****************************************************************************
|
|
17
|
+
# Copyright (C) 2016-2017 Julian Rüth <julian.rueth@fsfe.org>
|
|
18
|
+
#
|
|
19
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
20
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
21
|
+
# the License, or (at your option) any later version.
|
|
22
|
+
# https://www.gnu.org/licenses/
|
|
23
|
+
# ****************************************************************************
|
|
24
|
+
|
|
25
|
+
from .valuation import DiscretePseudoValuation, DiscreteValuation, InfiniteDiscretePseudoValuation
|
|
26
|
+
from .valuation_space import DiscretePseudoValuationSpace
|
|
27
|
+
from sage.structure.factory import UniqueFactory
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class TrivialValuationFactory(UniqueFactory):
|
|
31
|
+
r"""
|
|
32
|
+
Create a trivial valuation on ``domain``.
|
|
33
|
+
|
|
34
|
+
EXAMPLES::
|
|
35
|
+
|
|
36
|
+
sage: v = valuations.TrivialValuation(QQ); v
|
|
37
|
+
Trivial valuation on Rational Field
|
|
38
|
+
sage: v(1)
|
|
39
|
+
0
|
|
40
|
+
"""
|
|
41
|
+
def __init__(self, clazz, parent, *args, **kwargs):
|
|
42
|
+
r"""
|
|
43
|
+
TESTS::
|
|
44
|
+
|
|
45
|
+
sage: from sage.rings.valuation.trivial_valuation import TrivialValuationFactory
|
|
46
|
+
sage: isinstance(valuations.TrivialValuation, TrivialValuationFactory)
|
|
47
|
+
True
|
|
48
|
+
"""
|
|
49
|
+
UniqueFactory.__init__(self, *args, **kwargs)
|
|
50
|
+
self._class = clazz
|
|
51
|
+
self._parent = parent
|
|
52
|
+
|
|
53
|
+
def create_key(self, domain):
|
|
54
|
+
r"""
|
|
55
|
+
Create a key that identifies this valuation.
|
|
56
|
+
|
|
57
|
+
EXAMPLES::
|
|
58
|
+
|
|
59
|
+
sage: valuations.TrivialValuation(QQ) is valuations.TrivialValuation(QQ) # indirect doctest
|
|
60
|
+
True
|
|
61
|
+
"""
|
|
62
|
+
return domain,
|
|
63
|
+
|
|
64
|
+
def create_object(self, version, key, **extra_args):
|
|
65
|
+
r"""
|
|
66
|
+
Create a trivial valuation from ``key``.
|
|
67
|
+
|
|
68
|
+
EXAMPLES::
|
|
69
|
+
|
|
70
|
+
sage: valuations.TrivialValuation(QQ) # indirect doctest
|
|
71
|
+
Trivial valuation on Rational Field
|
|
72
|
+
"""
|
|
73
|
+
domain, = key
|
|
74
|
+
parent = self._parent(domain)
|
|
75
|
+
return parent.__make_element_class__(self._class)(parent)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class TrivialDiscretePseudoValuation_base(DiscretePseudoValuation):
|
|
79
|
+
r"""
|
|
80
|
+
Base class for code shared by trivial valuations.
|
|
81
|
+
|
|
82
|
+
EXAMPLES::
|
|
83
|
+
|
|
84
|
+
sage: v = valuations.TrivialPseudoValuation(ZZ); v
|
|
85
|
+
Trivial pseudo-valuation on Integer Ring
|
|
86
|
+
|
|
87
|
+
TESTS::
|
|
88
|
+
|
|
89
|
+
sage: TestSuite(v).run() # long time
|
|
90
|
+
"""
|
|
91
|
+
def uniformizer(self):
|
|
92
|
+
r"""
|
|
93
|
+
Return a uniformizing element for this valuation.
|
|
94
|
+
|
|
95
|
+
EXAMPLES::
|
|
96
|
+
|
|
97
|
+
sage: v = valuations.TrivialPseudoValuation(ZZ)
|
|
98
|
+
sage: v.uniformizer()
|
|
99
|
+
Traceback (most recent call last):
|
|
100
|
+
...
|
|
101
|
+
ValueError: Trivial valuations do not define a uniformizing element
|
|
102
|
+
"""
|
|
103
|
+
raise ValueError("Trivial valuations do not define a uniformizing element")
|
|
104
|
+
|
|
105
|
+
def is_trivial(self):
|
|
106
|
+
r"""
|
|
107
|
+
Return whether this valuation is trivial.
|
|
108
|
+
|
|
109
|
+
EXAMPLES::
|
|
110
|
+
|
|
111
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
112
|
+
sage: v.is_trivial()
|
|
113
|
+
True
|
|
114
|
+
"""
|
|
115
|
+
return True
|
|
116
|
+
|
|
117
|
+
def is_negative_pseudo_valuation(self):
|
|
118
|
+
r"""
|
|
119
|
+
Return whether this valuation attains the value `-\infty`.
|
|
120
|
+
|
|
121
|
+
EXAMPLES::
|
|
122
|
+
|
|
123
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
124
|
+
sage: v.is_negative_pseudo_valuation()
|
|
125
|
+
False
|
|
126
|
+
"""
|
|
127
|
+
return False
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class TrivialDiscretePseudoValuation(TrivialDiscretePseudoValuation_base, InfiniteDiscretePseudoValuation):
|
|
131
|
+
r"""
|
|
132
|
+
The trivial pseudo-valuation that is `\infty` everywhere.
|
|
133
|
+
|
|
134
|
+
EXAMPLES::
|
|
135
|
+
|
|
136
|
+
sage: v = valuations.TrivialPseudoValuation(QQ); v
|
|
137
|
+
Trivial pseudo-valuation on Rational Field
|
|
138
|
+
|
|
139
|
+
TESTS::
|
|
140
|
+
|
|
141
|
+
sage: TestSuite(v).run() # long time
|
|
142
|
+
"""
|
|
143
|
+
def __init__(self, parent):
|
|
144
|
+
r"""
|
|
145
|
+
TESTS::
|
|
146
|
+
|
|
147
|
+
sage: from sage.rings.valuation.trivial_valuation import TrivialDiscretePseudoValuation
|
|
148
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
149
|
+
sage: isinstance(v, TrivialDiscretePseudoValuation)
|
|
150
|
+
True
|
|
151
|
+
"""
|
|
152
|
+
TrivialDiscretePseudoValuation_base.__init__(self, parent)
|
|
153
|
+
InfiniteDiscretePseudoValuation.__init__(self, parent)
|
|
154
|
+
|
|
155
|
+
def _call_(self, x):
|
|
156
|
+
r"""
|
|
157
|
+
Evaluate this valuation at ``x``.
|
|
158
|
+
|
|
159
|
+
EXAMPLES::
|
|
160
|
+
|
|
161
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
162
|
+
sage: v(0)
|
|
163
|
+
+Infinity
|
|
164
|
+
sage: v(1)
|
|
165
|
+
+Infinity
|
|
166
|
+
"""
|
|
167
|
+
from sage.rings.infinity import infinity
|
|
168
|
+
return infinity
|
|
169
|
+
|
|
170
|
+
def _repr_(self):
|
|
171
|
+
r"""
|
|
172
|
+
Return a printable representation of this valuation.
|
|
173
|
+
|
|
174
|
+
EXAMPLES::
|
|
175
|
+
|
|
176
|
+
sage: valuations.TrivialPseudoValuation(QQ) # indirect doctest
|
|
177
|
+
Trivial pseudo-valuation on Rational Field
|
|
178
|
+
"""
|
|
179
|
+
return "Trivial pseudo-valuation on %r" % (self.domain(),)
|
|
180
|
+
|
|
181
|
+
def value_group(self):
|
|
182
|
+
r"""
|
|
183
|
+
Return the value group of this valuation.
|
|
184
|
+
|
|
185
|
+
EXAMPLES:
|
|
186
|
+
|
|
187
|
+
A trivial discrete pseudo-valuation has no value group::
|
|
188
|
+
|
|
189
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
190
|
+
sage: v.value_group()
|
|
191
|
+
Traceback (most recent call last):
|
|
192
|
+
...
|
|
193
|
+
ValueError: The trivial pseudo-valuation that is infinity everywhere does not have a value group.
|
|
194
|
+
"""
|
|
195
|
+
raise ValueError("The trivial pseudo-valuation that is infinity everywhere does not have a value group.")
|
|
196
|
+
|
|
197
|
+
def residue_ring(self):
|
|
198
|
+
r"""
|
|
199
|
+
Return the residue ring of this valuation.
|
|
200
|
+
|
|
201
|
+
EXAMPLES::
|
|
202
|
+
|
|
203
|
+
sage: valuations.TrivialPseudoValuation(QQ).residue_ring()
|
|
204
|
+
Quotient of Rational Field by the ideal (1)
|
|
205
|
+
"""
|
|
206
|
+
return self.domain().quo(self.domain().one())
|
|
207
|
+
|
|
208
|
+
def reduce(self, x):
|
|
209
|
+
r"""
|
|
210
|
+
Reduce ``x`` modulo the positive elements of this valuation.
|
|
211
|
+
|
|
212
|
+
EXAMPLES::
|
|
213
|
+
|
|
214
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
215
|
+
sage: v.reduce(1)
|
|
216
|
+
0
|
|
217
|
+
"""
|
|
218
|
+
self.domain().coerce(x)
|
|
219
|
+
return self.residue_ring().zero()
|
|
220
|
+
|
|
221
|
+
def lift(self, X):
|
|
222
|
+
r"""
|
|
223
|
+
Return a lift of ``X`` to the domain of this valuation.
|
|
224
|
+
|
|
225
|
+
EXAMPLES::
|
|
226
|
+
|
|
227
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
228
|
+
sage: v.lift(v.residue_ring().zero())
|
|
229
|
+
0
|
|
230
|
+
"""
|
|
231
|
+
self.residue_ring().coerce(X) # ignore the output
|
|
232
|
+
return self.domain().zero()
|
|
233
|
+
|
|
234
|
+
def _ge_(self, other):
|
|
235
|
+
r"""
|
|
236
|
+
Return whether this valuation is bigger or equal than ``other``
|
|
237
|
+
everywhere.
|
|
238
|
+
|
|
239
|
+
EXAMPLES::
|
|
240
|
+
|
|
241
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
242
|
+
sage: w = valuations.TrivialValuation(QQ)
|
|
243
|
+
sage: v >= w
|
|
244
|
+
True
|
|
245
|
+
"""
|
|
246
|
+
# the trivial discrete valuation is the biggest valuation
|
|
247
|
+
return True
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
class TrivialDiscreteValuation(TrivialDiscretePseudoValuation_base, DiscreteValuation):
|
|
251
|
+
r"""
|
|
252
|
+
The trivial valuation that is zero on nonzero elements.
|
|
253
|
+
|
|
254
|
+
EXAMPLES::
|
|
255
|
+
|
|
256
|
+
sage: v = valuations.TrivialValuation(QQ); v
|
|
257
|
+
Trivial valuation on Rational Field
|
|
258
|
+
|
|
259
|
+
TESTS::
|
|
260
|
+
|
|
261
|
+
sage: TestSuite(v).run() # long time
|
|
262
|
+
"""
|
|
263
|
+
def __init__(self, parent):
|
|
264
|
+
r"""
|
|
265
|
+
TESTS::
|
|
266
|
+
|
|
267
|
+
sage: from sage.rings.valuation.trivial_valuation import TrivialDiscreteValuation
|
|
268
|
+
sage: v = valuations.TrivialValuation(QQ)
|
|
269
|
+
sage: isinstance(v, TrivialDiscreteValuation)
|
|
270
|
+
True
|
|
271
|
+
"""
|
|
272
|
+
TrivialDiscretePseudoValuation_base.__init__(self, parent)
|
|
273
|
+
DiscreteValuation.__init__(self, parent)
|
|
274
|
+
|
|
275
|
+
def _call_(self, x):
|
|
276
|
+
r"""
|
|
277
|
+
Evaluate this valuation at ``x``.
|
|
278
|
+
|
|
279
|
+
EXAMPLES::
|
|
280
|
+
|
|
281
|
+
sage: v = valuations.TrivialValuation(QQ)
|
|
282
|
+
sage: v(0)
|
|
283
|
+
+Infinity
|
|
284
|
+
sage: v(1)
|
|
285
|
+
0
|
|
286
|
+
"""
|
|
287
|
+
from sage.rings.infinity import infinity
|
|
288
|
+
return infinity if x == 0 else self.codomain().zero()
|
|
289
|
+
|
|
290
|
+
def _repr_(self):
|
|
291
|
+
r"""
|
|
292
|
+
Return a printable representation of this valuation.
|
|
293
|
+
|
|
294
|
+
EXAMPLES::
|
|
295
|
+
|
|
296
|
+
sage: valuations.TrivialValuation(QQ) # indirect doctest
|
|
297
|
+
Trivial valuation on Rational Field
|
|
298
|
+
"""
|
|
299
|
+
return "Trivial valuation on %r" % (self.domain(),)
|
|
300
|
+
|
|
301
|
+
def value_group(self):
|
|
302
|
+
r"""
|
|
303
|
+
Return the value group of this valuation.
|
|
304
|
+
|
|
305
|
+
EXAMPLES:
|
|
306
|
+
|
|
307
|
+
A trivial discrete valuation has a trivial value group::
|
|
308
|
+
|
|
309
|
+
sage: v = valuations.TrivialValuation(QQ)
|
|
310
|
+
sage: v.value_group()
|
|
311
|
+
Trivial Additive Abelian Group
|
|
312
|
+
"""
|
|
313
|
+
from .value_group import DiscreteValueGroup
|
|
314
|
+
return DiscreteValueGroup(0)
|
|
315
|
+
|
|
316
|
+
def residue_ring(self):
|
|
317
|
+
r"""
|
|
318
|
+
Return the residue ring of this valuation.
|
|
319
|
+
|
|
320
|
+
EXAMPLES::
|
|
321
|
+
|
|
322
|
+
sage: valuations.TrivialValuation(QQ).residue_ring()
|
|
323
|
+
Rational Field
|
|
324
|
+
"""
|
|
325
|
+
return self.domain()
|
|
326
|
+
|
|
327
|
+
def reduce(self, x):
|
|
328
|
+
r"""
|
|
329
|
+
Reduce ``x`` modulo the positive elements of this valuation.
|
|
330
|
+
|
|
331
|
+
EXAMPLES::
|
|
332
|
+
|
|
333
|
+
sage: v = valuations.TrivialValuation(QQ)
|
|
334
|
+
sage: v.reduce(1)
|
|
335
|
+
1
|
|
336
|
+
"""
|
|
337
|
+
return self.domain().coerce(x)
|
|
338
|
+
|
|
339
|
+
def lift(self, X):
|
|
340
|
+
r"""
|
|
341
|
+
Return a lift of ``X`` to the domain of this valuation.
|
|
342
|
+
|
|
343
|
+
EXAMPLES::
|
|
344
|
+
|
|
345
|
+
sage: v = valuations.TrivialValuation(QQ)
|
|
346
|
+
sage: v.lift(v.residue_ring().zero())
|
|
347
|
+
0
|
|
348
|
+
"""
|
|
349
|
+
return self.residue_ring().coerce(X)
|
|
350
|
+
|
|
351
|
+
def extensions(self, ring):
|
|
352
|
+
r"""
|
|
353
|
+
Return the unique extension of this valuation to ``ring``.
|
|
354
|
+
|
|
355
|
+
EXAMPLES::
|
|
356
|
+
|
|
357
|
+
sage: v = valuations.TrivialValuation(ZZ)
|
|
358
|
+
sage: v.extensions(QQ)
|
|
359
|
+
[Trivial valuation on Rational Field]
|
|
360
|
+
"""
|
|
361
|
+
if self.domain().is_subring(ring):
|
|
362
|
+
return [TrivialValuation(ring)]
|
|
363
|
+
return super(DiscretePseudoValuation, self).extensions(ring)
|
|
364
|
+
|
|
365
|
+
def _ge_(self, other):
|
|
366
|
+
r"""
|
|
367
|
+
Return whether this valuation is bigger or equal than ``other``
|
|
368
|
+
everywhere.
|
|
369
|
+
|
|
370
|
+
EXAMPLES::
|
|
371
|
+
|
|
372
|
+
sage: v = valuations.TrivialPseudoValuation(QQ)
|
|
373
|
+
sage: w = valuations.TrivialValuation(QQ)
|
|
374
|
+
sage: w >= v
|
|
375
|
+
False
|
|
376
|
+
"""
|
|
377
|
+
# the trivial discrete valuation is the smallest valuation
|
|
378
|
+
return self is other
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
TrivialValuation = TrivialValuationFactory(TrivialDiscreteValuation, DiscretePseudoValuationSpace, "sage.rings.valuation.trivial_valuation.TrivialValuation")
|
|
382
|
+
TrivialPseudoValuation = TrivialValuationFactory(TrivialDiscretePseudoValuation, DiscretePseudoValuationSpace, "sage.rings.valuation.trivial_valuation.TrivialPseudoValuation")
|