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,656 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
# sage.doctest: needs sage.geometry.polyhedron sage.rings.function_field
|
|
3
|
+
r"""
|
|
4
|
+
Valuations which are implemented through a map to another valuation
|
|
5
|
+
|
|
6
|
+
EXAMPLES:
|
|
7
|
+
|
|
8
|
+
Extensions of valuations over finite field extensions `L=K[x]/(G)` are realized
|
|
9
|
+
through an infinite valuation on `K[x]` which maps `G` to infinity::
|
|
10
|
+
|
|
11
|
+
sage: # needs sage.rings.function_field
|
|
12
|
+
sage: K.<x> = FunctionField(QQ)
|
|
13
|
+
sage: R.<y> = K[]
|
|
14
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
15
|
+
sage: v = K.valuation(0)
|
|
16
|
+
sage: w = v.extension(L); w
|
|
17
|
+
(x)-adic valuation
|
|
18
|
+
sage: w._base_valuation
|
|
19
|
+
[ Gauss valuation induced by (x)-adic valuation, v(y) = 1/2 , … ]
|
|
20
|
+
|
|
21
|
+
AUTHORS:
|
|
22
|
+
|
|
23
|
+
- Julian Rüth (2016-11-10): initial version
|
|
24
|
+
"""
|
|
25
|
+
# ****************************************************************************
|
|
26
|
+
# Copyright (C) 2016-2017 Julian Rüth <julian.rueth@fsfe.org>
|
|
27
|
+
#
|
|
28
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
29
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
30
|
+
# the License, or (at your option) any later version.
|
|
31
|
+
# https://www.gnu.org/licenses/
|
|
32
|
+
# ****************************************************************************
|
|
33
|
+
|
|
34
|
+
from .valuation import DiscreteValuation, DiscretePseudoValuation
|
|
35
|
+
from sage.misc.abstract_method import abstract_method
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class MappedValuation_base(DiscretePseudoValuation):
|
|
39
|
+
r"""
|
|
40
|
+
A valuation which is implemented through another proxy "base" valuation.
|
|
41
|
+
|
|
42
|
+
EXAMPLES::
|
|
43
|
+
|
|
44
|
+
sage: # needs sage.rings.function_field
|
|
45
|
+
sage: K.<x> = FunctionField(QQ)
|
|
46
|
+
sage: R.<y> = K[]
|
|
47
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
48
|
+
sage: v = K.valuation(0)
|
|
49
|
+
sage: w = v.extension(L); w
|
|
50
|
+
(x)-adic valuation
|
|
51
|
+
|
|
52
|
+
TESTS::
|
|
53
|
+
|
|
54
|
+
sage: TestSuite(w).run() # long time # needs sage.rings.function_field
|
|
55
|
+
"""
|
|
56
|
+
def __init__(self, parent, base_valuation):
|
|
57
|
+
r"""
|
|
58
|
+
.. TODO::
|
|
59
|
+
|
|
60
|
+
It is annoying that we have to wrap any possible method on
|
|
61
|
+
``base_valuation`` in this class. It would be nice if this would
|
|
62
|
+
somehow be done automagically, e.g., by adding annotations to the
|
|
63
|
+
methods in ``base_valuation`` that explain which parameters and
|
|
64
|
+
return values need to be mapped and how.
|
|
65
|
+
|
|
66
|
+
TESTS::
|
|
67
|
+
|
|
68
|
+
sage: # needs sage.rings.function_field
|
|
69
|
+
sage: K.<x> = FunctionField(QQ)
|
|
70
|
+
sage: R.<y> = K[]
|
|
71
|
+
sage: L.<y> = K.extension(y^2 - x^2 + 1)
|
|
72
|
+
sage: v = K.valuation(0)
|
|
73
|
+
sage: w = v.extension(L); w
|
|
74
|
+
(x)-adic valuation
|
|
75
|
+
sage: from sage.rings.valuation.mapped_valuation import MappedValuation_base
|
|
76
|
+
sage: isinstance(w, MappedValuation_base)
|
|
77
|
+
True
|
|
78
|
+
"""
|
|
79
|
+
DiscretePseudoValuation.__init__(self, parent)
|
|
80
|
+
|
|
81
|
+
self._base_valuation = base_valuation
|
|
82
|
+
|
|
83
|
+
@abstract_method
|
|
84
|
+
def _repr_(self):
|
|
85
|
+
r"""
|
|
86
|
+
Return a printable representation of this valuation.
|
|
87
|
+
|
|
88
|
+
Subclasses must override this method.
|
|
89
|
+
|
|
90
|
+
EXAMPLES::
|
|
91
|
+
|
|
92
|
+
sage: K = QQ
|
|
93
|
+
sage: R.<t> = K[]
|
|
94
|
+
sage: L.<t> = K.extension(t^2 + 1) # needs sage.rings.number_field
|
|
95
|
+
sage: v = valuations.pAdicValuation(QQ, 2)
|
|
96
|
+
sage: v.extension(L) # indirect doctest # needs sage.rings.number_field
|
|
97
|
+
2-adic valuation
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
def residue_ring(self):
|
|
101
|
+
r"""
|
|
102
|
+
Return the residue ring of this valuation.
|
|
103
|
+
|
|
104
|
+
EXAMPLES::
|
|
105
|
+
|
|
106
|
+
sage: K = QQ
|
|
107
|
+
sage: R.<t> = K[]
|
|
108
|
+
sage: L.<t> = K.extension(t^2 + 1) # needs sage.rings.number_field
|
|
109
|
+
sage: v = valuations.pAdicValuation(QQ, 2)
|
|
110
|
+
sage: v.extension(L).residue_ring() # needs sage.rings.number_field
|
|
111
|
+
Finite Field of size 2
|
|
112
|
+
"""
|
|
113
|
+
return self._base_valuation.residue_ring()
|
|
114
|
+
|
|
115
|
+
def uniformizer(self):
|
|
116
|
+
r"""
|
|
117
|
+
Return a uniformizing element of this valuation.
|
|
118
|
+
|
|
119
|
+
EXAMPLES::
|
|
120
|
+
|
|
121
|
+
sage: K = QQ
|
|
122
|
+
sage: R.<t> = K[]
|
|
123
|
+
sage: L.<t> = K.extension(t^2 + 1) # needs sage.rings.number_field
|
|
124
|
+
sage: v = valuations.pAdicValuation(QQ, 2)
|
|
125
|
+
sage: v.extension(L).uniformizer() # needs sage.rings.number_field
|
|
126
|
+
t + 1
|
|
127
|
+
"""
|
|
128
|
+
return self._from_base_domain(self._base_valuation.uniformizer())
|
|
129
|
+
|
|
130
|
+
def _to_base_domain(self, f):
|
|
131
|
+
r"""
|
|
132
|
+
Return ``f`` as an element in the domain of ``_base_valuation``.
|
|
133
|
+
|
|
134
|
+
EXAMPLES::
|
|
135
|
+
|
|
136
|
+
sage: # needs sage.rings.function_field
|
|
137
|
+
sage: K.<x> = FunctionField(QQ)
|
|
138
|
+
sage: R.<y> = K[]
|
|
139
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
140
|
+
sage: v = K.valuation(0)
|
|
141
|
+
sage: w = v.extensions(L)[0]
|
|
142
|
+
sage: w._to_base_domain(y).parent()
|
|
143
|
+
Univariate Polynomial Ring in y over Rational function field in x over Rational Field
|
|
144
|
+
"""
|
|
145
|
+
return self._base_valuation.domain().coerce(f)
|
|
146
|
+
|
|
147
|
+
def _from_base_domain(self, f):
|
|
148
|
+
r"""
|
|
149
|
+
Return ``f`` as an element in the domain of this valuation.
|
|
150
|
+
|
|
151
|
+
EXAMPLES::
|
|
152
|
+
|
|
153
|
+
sage: # needs sage.rings.function_field
|
|
154
|
+
sage: K.<x> = FunctionField(QQ)
|
|
155
|
+
sage: R.<y> = K[]
|
|
156
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
157
|
+
sage: v = K.valuation(0)
|
|
158
|
+
sage: w = v.extension(L)
|
|
159
|
+
sage: w._from_base_domain(w._base_valuation.domain().gen()).parent()
|
|
160
|
+
Function field in y defined by y^2 - x
|
|
161
|
+
"""
|
|
162
|
+
return self.domain().coerce(f)
|
|
163
|
+
|
|
164
|
+
def _call_(self, f):
|
|
165
|
+
r"""
|
|
166
|
+
Evaluate this valuation at ``f``.
|
|
167
|
+
|
|
168
|
+
EXAMPLES::
|
|
169
|
+
|
|
170
|
+
sage: # needs sage.rings.function_field
|
|
171
|
+
sage: K.<x> = FunctionField(QQ)
|
|
172
|
+
sage: R.<y> = K[]
|
|
173
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
174
|
+
sage: v = K.valuation(0)
|
|
175
|
+
sage: w = v.extension(L)
|
|
176
|
+
sage: w(y) # indirect doctest
|
|
177
|
+
1/2
|
|
178
|
+
"""
|
|
179
|
+
return self._base_valuation(self._to_base_domain(f))
|
|
180
|
+
|
|
181
|
+
def reduce(self, f):
|
|
182
|
+
r"""
|
|
183
|
+
Return the reduction of ``f`` in the :meth:`~sage.rings.valuation.valuation_space.DiscretePseudoValuationSpace.ElementMethods.residue_field` of this valuation.
|
|
184
|
+
|
|
185
|
+
EXAMPLES::
|
|
186
|
+
|
|
187
|
+
sage: # needs sage.rings.function_field
|
|
188
|
+
sage: K.<x> = FunctionField(QQ)
|
|
189
|
+
sage: R.<y> = K[]
|
|
190
|
+
sage: L.<y> = K.extension(y^2 - (x - 2))
|
|
191
|
+
sage: v = K.valuation(0)
|
|
192
|
+
sage: w = v.extension(L)
|
|
193
|
+
sage: w.reduce(y)
|
|
194
|
+
u1
|
|
195
|
+
"""
|
|
196
|
+
return self._from_base_residue_ring(self._base_valuation.reduce(self._to_base_domain(f)))
|
|
197
|
+
|
|
198
|
+
def lift(self, F):
|
|
199
|
+
r"""
|
|
200
|
+
Lift ``F`` from the :meth:`~sage.rings.valuation.valuation_space.DiscretePseudoValuationSpace.ElementMethods.residue_field`
|
|
201
|
+
of this valuation into its domain.
|
|
202
|
+
|
|
203
|
+
EXAMPLES::
|
|
204
|
+
|
|
205
|
+
sage: # needs sage.rings.function_field
|
|
206
|
+
sage: K.<x> = FunctionField(QQ)
|
|
207
|
+
sage: R.<y> = K[]
|
|
208
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
209
|
+
sage: v = K.valuation(2)
|
|
210
|
+
sage: w = v.extension(L)
|
|
211
|
+
sage: w.lift(w.residue_field().gen())
|
|
212
|
+
y
|
|
213
|
+
"""
|
|
214
|
+
F = self.residue_ring().coerce(F)
|
|
215
|
+
F = self._to_base_residue_ring(F)
|
|
216
|
+
f = self._base_valuation.lift(F)
|
|
217
|
+
return self._from_base_domain(f)
|
|
218
|
+
|
|
219
|
+
def simplify(self, x, error=None, force=False):
|
|
220
|
+
r"""
|
|
221
|
+
Return a simplified version of ``x``.
|
|
222
|
+
|
|
223
|
+
Produce an element which differs from ``x`` by an element of
|
|
224
|
+
valuation strictly greater than the valuation of ``x`` (or strictly
|
|
225
|
+
greater than ``error`` if set.)
|
|
226
|
+
|
|
227
|
+
If ``force`` is not set, then expensive simplifications may be avoided.
|
|
228
|
+
|
|
229
|
+
EXAMPLES::
|
|
230
|
+
|
|
231
|
+
sage: # needs sage.rings.function_field
|
|
232
|
+
sage: K.<x> = FunctionField(QQ)
|
|
233
|
+
sage: R.<y> = K[]
|
|
234
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
235
|
+
sage: v = K.valuation(0)
|
|
236
|
+
sage: w = v.extensions(L)[0]
|
|
237
|
+
|
|
238
|
+
As :meth:`_relative_size` misses the bloated term ``x^32``, the
|
|
239
|
+
following term does not get simplified::
|
|
240
|
+
|
|
241
|
+
sage: w.simplify(y + x^32) # needs sage.rings.function_field
|
|
242
|
+
y + x^32
|
|
243
|
+
|
|
244
|
+
In this case the simplification can be forced but this should not
|
|
245
|
+
happen as a default as the recursive simplification can be quite
|
|
246
|
+
costly::
|
|
247
|
+
|
|
248
|
+
sage: w.simplify(y + x^32, force=True) # needs sage.rings.function_field
|
|
249
|
+
y
|
|
250
|
+
"""
|
|
251
|
+
return self._from_base_domain(self._base_valuation.simplify(self._to_base_domain(x), error=error, force=force))
|
|
252
|
+
|
|
253
|
+
def _relative_size(self, x):
|
|
254
|
+
r"""
|
|
255
|
+
Return an estimate on the coefficient size of ``x``.
|
|
256
|
+
|
|
257
|
+
The number returned is an estimate on the factor between the number of
|
|
258
|
+
bits used by ``x`` and the minimal number of bits used by an element
|
|
259
|
+
congruent to ``x``.
|
|
260
|
+
|
|
261
|
+
This can be used by :meth:`simplify` to decide whether simplification
|
|
262
|
+
of coefficients is going to lead to a significant shrinking of the
|
|
263
|
+
coefficients of ``x``.
|
|
264
|
+
|
|
265
|
+
EXAMPLES::
|
|
266
|
+
|
|
267
|
+
sage: # needs sage.rings.function_field
|
|
268
|
+
sage: K.<x> = FunctionField(QQ)
|
|
269
|
+
sage: R.<y> = K[]
|
|
270
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
271
|
+
sage: v = K.valuation(0)
|
|
272
|
+
sage: w = v.extensions(L)[0]
|
|
273
|
+
|
|
274
|
+
In this example, the method misses the size of the bloated term
|
|
275
|
+
``x^32``::
|
|
276
|
+
|
|
277
|
+
sage: w._relative_size(y + x^32) # needs sage.rings.function_field
|
|
278
|
+
1
|
|
279
|
+
"""
|
|
280
|
+
return self._base_valuation._relative_size(self._to_base_domain(x))
|
|
281
|
+
|
|
282
|
+
def _to_base_residue_ring(self, F):
|
|
283
|
+
r"""
|
|
284
|
+
Return ``F``, an element of :meth:`~sage.rings.valuation.valuation_space.DiscretePseudoValuationSpace.ElementMethods.residue_ring`,
|
|
285
|
+
as an element of the residue ring of the ``_base_valuation``.
|
|
286
|
+
|
|
287
|
+
EXAMPLES::
|
|
288
|
+
|
|
289
|
+
sage: # needs sage.rings.function_field
|
|
290
|
+
sage: K.<x> = FunctionField(QQ)
|
|
291
|
+
sage: R.<y> = K[]
|
|
292
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
293
|
+
sage: v = K.valuation(0)
|
|
294
|
+
sage: w = v.extensions(L)[0]
|
|
295
|
+
sage: w._to_base_residue_ring(1)
|
|
296
|
+
1
|
|
297
|
+
"""
|
|
298
|
+
return self._base_valuation.residue_ring().coerce(F)
|
|
299
|
+
|
|
300
|
+
def _from_base_residue_ring(self, F):
|
|
301
|
+
r"""
|
|
302
|
+
Return ``F``, an element of the residue ring of ``_base_valuation``, as
|
|
303
|
+
an element of this valuation's :meth:`~sage.rings.valuation.valuation_space.DiscretePseudoValuationSpace.ElementMethods.residue_ring`.
|
|
304
|
+
|
|
305
|
+
EXAMPLES::
|
|
306
|
+
|
|
307
|
+
sage: # needs sage.rings.function_field
|
|
308
|
+
sage: K.<x> = FunctionField(QQ)
|
|
309
|
+
sage: R.<y> = K[]
|
|
310
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
311
|
+
sage: v = K.valuation(0)
|
|
312
|
+
sage: w = v.extensions(L)[0]
|
|
313
|
+
sage: w._from_base_residue_ring(1)
|
|
314
|
+
1
|
|
315
|
+
"""
|
|
316
|
+
return self.residue_ring().coerce(F)
|
|
317
|
+
|
|
318
|
+
def element_with_valuation(self, s):
|
|
319
|
+
r"""
|
|
320
|
+
Return an element with valuation ``s``.
|
|
321
|
+
|
|
322
|
+
EXAMPLES::
|
|
323
|
+
|
|
324
|
+
sage: # needs sage.rings.number_field
|
|
325
|
+
sage: K = QQ
|
|
326
|
+
sage: R.<t> = K[]
|
|
327
|
+
sage: L.<t> = K.extension(t^2 + 1)
|
|
328
|
+
sage: v = valuations.pAdicValuation(QQ, 5)
|
|
329
|
+
sage: u,uu = v.extensions(L)
|
|
330
|
+
sage: u.element_with_valuation(1)
|
|
331
|
+
5
|
|
332
|
+
"""
|
|
333
|
+
return self._from_base_domain(self._base_valuation.element_with_valuation(s))
|
|
334
|
+
|
|
335
|
+
def _test_to_from_base_domain(self, **options):
|
|
336
|
+
r"""
|
|
337
|
+
Check the correctness of :meth:`to_base_domain` and
|
|
338
|
+
:meth:`from_base_domain`.
|
|
339
|
+
|
|
340
|
+
EXAMPLES::
|
|
341
|
+
|
|
342
|
+
sage: # needs sage.rings.function_field
|
|
343
|
+
sage: K.<x> = FunctionField(QQ)
|
|
344
|
+
sage: R.<y> = K[]
|
|
345
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
346
|
+
sage: v = K.valuation(0)
|
|
347
|
+
sage: w = v.extensions(L)[0]
|
|
348
|
+
sage: w._test_to_from_base_domain()
|
|
349
|
+
"""
|
|
350
|
+
tester = self._tester(**options)
|
|
351
|
+
|
|
352
|
+
for x in tester.some_elements(self.domain().some_elements()):
|
|
353
|
+
tester.assertEqual(x, self._from_base_domain(self._to_base_domain(x)))
|
|
354
|
+
# note that the converse might not be true
|
|
355
|
+
|
|
356
|
+
def _test_to_from_base_residue_ring(self, **options):
|
|
357
|
+
r"""
|
|
358
|
+
Check the correctness of :meth:`to_base_residue_ring` and
|
|
359
|
+
:meth:`from_base_residue_ring`.
|
|
360
|
+
|
|
361
|
+
EXAMPLES::
|
|
362
|
+
|
|
363
|
+
sage: # needs sage.rings.function_field
|
|
364
|
+
sage: K.<x> = FunctionField(QQ)
|
|
365
|
+
sage: R.<y> = K[]
|
|
366
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
367
|
+
sage: v = K.valuation(0)
|
|
368
|
+
sage: w = v.extensions(L)[0]
|
|
369
|
+
sage: w._test_to_from_base_residue_ring()
|
|
370
|
+
"""
|
|
371
|
+
tester = self._tester(**options)
|
|
372
|
+
|
|
373
|
+
for x in tester.some_elements(self.residue_ring().some_elements()):
|
|
374
|
+
tester.assertEqual(x, self._from_base_residue_ring(self._to_base_residue_ring(x)))
|
|
375
|
+
for x in tester.some_elements(self._base_valuation.residue_ring().some_elements()):
|
|
376
|
+
tester.assertEqual(x, self._to_base_residue_ring(self._from_base_residue_ring(x)))
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
class FiniteExtensionFromInfiniteValuation(MappedValuation_base, DiscreteValuation):
|
|
380
|
+
r"""
|
|
381
|
+
A valuation on a quotient of the form `L=K[x]/(G)` with an irreducible `G`
|
|
382
|
+
which is internally backed by a pseudo-valuations on `K[x]` which sends `G`
|
|
383
|
+
to infinity.
|
|
384
|
+
|
|
385
|
+
INPUT:
|
|
386
|
+
|
|
387
|
+
- ``parent`` -- the containing valuation space (usually the space of
|
|
388
|
+
discrete valuations on `L`)
|
|
389
|
+
|
|
390
|
+
- ``base_valuation`` -- an infinite valuation on `K[x]` which takes `G` to
|
|
391
|
+
infinity
|
|
392
|
+
|
|
393
|
+
EXAMPLES::
|
|
394
|
+
|
|
395
|
+
sage: # needs sage.rings.function_field
|
|
396
|
+
sage: K.<x> = FunctionField(QQ)
|
|
397
|
+
sage: R.<y> = K[]
|
|
398
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
399
|
+
sage: v = K.valuation(0)
|
|
400
|
+
sage: w = v.extension(L); w
|
|
401
|
+
(x)-adic valuation
|
|
402
|
+
"""
|
|
403
|
+
def __init__(self, parent, base_valuation):
|
|
404
|
+
r"""
|
|
405
|
+
TESTS::
|
|
406
|
+
|
|
407
|
+
sage: # needs sage.rings.function_field
|
|
408
|
+
sage: K.<x> = FunctionField(QQ)
|
|
409
|
+
sage: R.<y> = K[]
|
|
410
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
411
|
+
sage: v = K.valuation(0)
|
|
412
|
+
sage: w = v.extension(L)
|
|
413
|
+
sage: from sage.rings.valuation.mapped_valuation import FiniteExtensionFromInfiniteValuation
|
|
414
|
+
sage: isinstance(w, FiniteExtensionFromInfiniteValuation)
|
|
415
|
+
True
|
|
416
|
+
sage: TestSuite(w).run() # long time
|
|
417
|
+
"""
|
|
418
|
+
MappedValuation_base.__init__(self, parent, base_valuation)
|
|
419
|
+
DiscreteValuation.__init__(self, parent)
|
|
420
|
+
|
|
421
|
+
def _eq_(self, other):
|
|
422
|
+
r"""
|
|
423
|
+
Return whether this valuation is indistinguishable from ``other``.
|
|
424
|
+
|
|
425
|
+
EXAMPLES::
|
|
426
|
+
|
|
427
|
+
sage: # needs sage.rings.number_field
|
|
428
|
+
sage: K = QQ
|
|
429
|
+
sage: R.<t> = K[]
|
|
430
|
+
sage: L.<t> = K.extension(t^2 + 1)
|
|
431
|
+
sage: v = valuations.pAdicValuation(QQ, 2)
|
|
432
|
+
sage: w = v.extension(L)
|
|
433
|
+
sage: ww = v.extension(L)
|
|
434
|
+
sage: w == ww # indirect doctest
|
|
435
|
+
True
|
|
436
|
+
"""
|
|
437
|
+
return (isinstance(other, FiniteExtensionFromInfiniteValuation)
|
|
438
|
+
and self._base_valuation == other._base_valuation)
|
|
439
|
+
|
|
440
|
+
def restriction(self, ring):
|
|
441
|
+
r"""
|
|
442
|
+
Return the restriction of this valuation to ``ring``.
|
|
443
|
+
|
|
444
|
+
EXAMPLES::
|
|
445
|
+
|
|
446
|
+
sage: # needs sage.rings.number_field
|
|
447
|
+
sage: K = QQ
|
|
448
|
+
sage: R.<t> = K[]
|
|
449
|
+
sage: L.<t> = K.extension(t^2 + 1)
|
|
450
|
+
sage: v = valuations.pAdicValuation(QQ, 2)
|
|
451
|
+
sage: w = v.extension(L)
|
|
452
|
+
sage: w.restriction(K) is v
|
|
453
|
+
True
|
|
454
|
+
"""
|
|
455
|
+
if ring.is_subring(self._base_valuation.domain().base()):
|
|
456
|
+
return self._base_valuation.restriction(ring)
|
|
457
|
+
return super().restriction(ring)
|
|
458
|
+
|
|
459
|
+
def _weakly_separating_element(self, other):
|
|
460
|
+
r"""
|
|
461
|
+
Return an element in the domain of this valuation which has
|
|
462
|
+
positive valuation with respect to this valuation and higher
|
|
463
|
+
valuation with respect to this valuation than with respect to
|
|
464
|
+
``other``.
|
|
465
|
+
|
|
466
|
+
EXAMPLES::
|
|
467
|
+
|
|
468
|
+
sage: # needs sage.rings.number_field
|
|
469
|
+
sage: K = QQ
|
|
470
|
+
sage: R.<t> = K[]
|
|
471
|
+
sage: L.<t> = K.extension(t^2 + 1)
|
|
472
|
+
sage: v = valuations.pAdicValuation(QQ, 2)
|
|
473
|
+
sage: w = v.extension(L)
|
|
474
|
+
sage: v = valuations.pAdicValuation(QQ, 5)
|
|
475
|
+
sage: u,uu = v.extensions(L)
|
|
476
|
+
sage: u.separating_element([w,uu]) # indirect doctest
|
|
477
|
+
1/20*t + 7/20
|
|
478
|
+
"""
|
|
479
|
+
if isinstance(other, FiniteExtensionFromInfiniteValuation):
|
|
480
|
+
return self.domain()(self._base_valuation._weakly_separating_element(other._base_valuation))
|
|
481
|
+
super()._weakly_separating_element(other)
|
|
482
|
+
|
|
483
|
+
def _relative_size(self, x):
|
|
484
|
+
r"""
|
|
485
|
+
Return an estimate on the coefficient size of ``x``.
|
|
486
|
+
|
|
487
|
+
The number returned is an estimate on the factor between the number of
|
|
488
|
+
bits used by ``x`` and the minimal number of bits used by an element
|
|
489
|
+
congruent to ``x``.
|
|
490
|
+
|
|
491
|
+
This is used by :meth:`simplify` to decide whether simplification of
|
|
492
|
+
coefficients is going to lead to a significant shrinking of the
|
|
493
|
+
coefficients of ``x``.
|
|
494
|
+
|
|
495
|
+
EXAMPLES::
|
|
496
|
+
|
|
497
|
+
sage: # needs sage.rings.number_field
|
|
498
|
+
sage: K = QQ
|
|
499
|
+
sage: R.<t> = K[]
|
|
500
|
+
sage: L.<t> = K.extension(t^2 + 1)
|
|
501
|
+
sage: v = valuations.pAdicValuation(QQ, 2)
|
|
502
|
+
sage: w = v.extension(L)
|
|
503
|
+
sage: w._relative_size(1024*t + 1024)
|
|
504
|
+
6
|
|
505
|
+
"""
|
|
506
|
+
return self._base_valuation._relative_size(self._to_base_domain(x))
|
|
507
|
+
|
|
508
|
+
def simplify(self, x, error=None, force=False):
|
|
509
|
+
r"""
|
|
510
|
+
Return a simplified version of ``x``.
|
|
511
|
+
|
|
512
|
+
Produce an element which differs from ``x`` by an element of
|
|
513
|
+
valuation strictly greater than the valuation of ``x`` (or strictly
|
|
514
|
+
greater than ``error`` if set.)
|
|
515
|
+
|
|
516
|
+
EXAMPLES::
|
|
517
|
+
|
|
518
|
+
sage: # needs sage.rings.number_field
|
|
519
|
+
sage: K = QQ
|
|
520
|
+
sage: R.<t> = K[]
|
|
521
|
+
sage: L.<t> = K.extension(t^2 + 1)
|
|
522
|
+
sage: v = valuations.pAdicValuation(QQ, 5)
|
|
523
|
+
sage: u,uu = v.extensions(L)
|
|
524
|
+
sage: f = 125*t + 1
|
|
525
|
+
sage: u.simplify(f, error=u(f), force=True)
|
|
526
|
+
1
|
|
527
|
+
"""
|
|
528
|
+
x = self.domain().coerce(x)
|
|
529
|
+
|
|
530
|
+
if error is None:
|
|
531
|
+
error = self.upper_bound(x)
|
|
532
|
+
|
|
533
|
+
return self._from_base_domain(self._base_valuation.simplify(self._to_base_domain(x), error, force=force))
|
|
534
|
+
|
|
535
|
+
def lower_bound(self, x):
|
|
536
|
+
r"""
|
|
537
|
+
Return a lower bound of this valuation at ``x``.
|
|
538
|
+
|
|
539
|
+
Use this method to get an approximation of the valuation of ``x``
|
|
540
|
+
when speed is more important than accuracy.
|
|
541
|
+
|
|
542
|
+
EXAMPLES::
|
|
543
|
+
|
|
544
|
+
sage: # needs sage.rings.number_field
|
|
545
|
+
sage: K = QQ
|
|
546
|
+
sage: R.<t> = K[]
|
|
547
|
+
sage: L.<t> = K.extension(t^2 + 1)
|
|
548
|
+
sage: v = valuations.pAdicValuation(QQ, 5)
|
|
549
|
+
sage: u,uu = v.extensions(L)
|
|
550
|
+
sage: u.lower_bound(t + 2)
|
|
551
|
+
0
|
|
552
|
+
sage: u(t + 2)
|
|
553
|
+
1
|
|
554
|
+
"""
|
|
555
|
+
x = self.domain().coerce(x)
|
|
556
|
+
return self._base_valuation.lower_bound(self._to_base_domain(x))
|
|
557
|
+
|
|
558
|
+
def upper_bound(self, x):
|
|
559
|
+
r"""
|
|
560
|
+
Return an upper bound of this valuation at ``x``.
|
|
561
|
+
|
|
562
|
+
Use this method to get an approximation of the valuation of ``x``
|
|
563
|
+
when speed is more important than accuracy.
|
|
564
|
+
|
|
565
|
+
EXAMPLES::
|
|
566
|
+
|
|
567
|
+
sage: # needs sage.rings.number_field
|
|
568
|
+
sage: K = QQ
|
|
569
|
+
sage: R.<t> = K[]
|
|
570
|
+
sage: L.<t> = K.extension(t^2 + 1)
|
|
571
|
+
sage: v = valuations.pAdicValuation(QQ, 5)
|
|
572
|
+
sage: u,uu = v.extensions(L)
|
|
573
|
+
sage: u.upper_bound(t + 2) >= 1
|
|
574
|
+
True
|
|
575
|
+
sage: u(t + 2)
|
|
576
|
+
1
|
|
577
|
+
"""
|
|
578
|
+
x = self.domain().coerce(x)
|
|
579
|
+
return self._base_valuation.upper_bound(self._to_base_domain(x))
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
class FiniteExtensionFromLimitValuation(FiniteExtensionFromInfiniteValuation):
|
|
583
|
+
r"""
|
|
584
|
+
An extension of a valuation on a finite field extensions `L=K[x]/(G)` which
|
|
585
|
+
is induced by an infinite limit valuation on `K[x]`.
|
|
586
|
+
|
|
587
|
+
EXAMPLES::
|
|
588
|
+
|
|
589
|
+
sage: # needs sage.rings.function_field
|
|
590
|
+
sage: K.<x> = FunctionField(QQ)
|
|
591
|
+
sage: R.<y> = K[]
|
|
592
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
593
|
+
sage: v = K.valuation(1)
|
|
594
|
+
sage: w = v.extensions(L); w
|
|
595
|
+
[[ (x - 1)-adic valuation, v(y + 1) = 1 ]-adic valuation,
|
|
596
|
+
[ (x - 1)-adic valuation, v(y - 1) = 1 ]-adic valuation]
|
|
597
|
+
|
|
598
|
+
TESTS::
|
|
599
|
+
|
|
600
|
+
sage: TestSuite(w[0]).run() # long time # needs sage.rings.function_field
|
|
601
|
+
sage: TestSuite(w[1]).run() # long time # needs sage.rings.function_field
|
|
602
|
+
"""
|
|
603
|
+
def __init__(self, parent, approximant, G, approximants):
|
|
604
|
+
r"""
|
|
605
|
+
EXAMPLES:
|
|
606
|
+
|
|
607
|
+
Note that this implementation is also used when the underlying limit is
|
|
608
|
+
only taken over a finite sequence of valuations::
|
|
609
|
+
|
|
610
|
+
sage: # needs sage.rings.function_field
|
|
611
|
+
sage: K.<x> = FunctionField(QQ)
|
|
612
|
+
sage: R.<y> = K[]
|
|
613
|
+
sage: L.<y> = K.extension(y^2 - x)
|
|
614
|
+
sage: v = K.valuation(2)
|
|
615
|
+
sage: w = v.extension(L); w
|
|
616
|
+
(x - 2)-adic valuation
|
|
617
|
+
sage: from sage.rings.valuation.mapped_valuation import FiniteExtensionFromLimitValuation
|
|
618
|
+
sage: isinstance(w, FiniteExtensionFromLimitValuation)
|
|
619
|
+
True
|
|
620
|
+
"""
|
|
621
|
+
# keep track of all extensions to this field extension so we can print
|
|
622
|
+
# this valuation nicely, dropping any unnecessary information
|
|
623
|
+
self._approximants = approximants
|
|
624
|
+
|
|
625
|
+
from .limit_valuation import LimitValuation
|
|
626
|
+
limit = LimitValuation(approximant, G)
|
|
627
|
+
FiniteExtensionFromInfiniteValuation.__init__(self, parent, limit)
|
|
628
|
+
|
|
629
|
+
def _repr_(self):
|
|
630
|
+
"""
|
|
631
|
+
Return a printable representation of this valuation.
|
|
632
|
+
|
|
633
|
+
EXAMPLES::
|
|
634
|
+
|
|
635
|
+
sage: valuations.pAdicValuation(GaussianIntegers().fraction_field(), 2) # indirect doctest # needs sage.rings.number_field
|
|
636
|
+
2-adic valuation
|
|
637
|
+
"""
|
|
638
|
+
from .limit_valuation import MacLaneLimitValuation
|
|
639
|
+
if isinstance(self._base_valuation, MacLaneLimitValuation):
|
|
640
|
+
# print the minimal information that singles out this valuation from all approximants
|
|
641
|
+
assert (self._base_valuation._initial_approximation in self._approximants)
|
|
642
|
+
approximants = [v.augmentation_chain()[::-1] for v in self._approximants]
|
|
643
|
+
augmentations = self._base_valuation._initial_approximation.augmentation_chain()[::-1]
|
|
644
|
+
unique_approximant = None
|
|
645
|
+
for l in range(len(augmentations)):
|
|
646
|
+
if len([a for a in approximants if a[:l + 1] == augmentations[:l + 1]]) == 1:
|
|
647
|
+
unique_approximant = augmentations[:l + 1]
|
|
648
|
+
break
|
|
649
|
+
assert (unique_approximant is not None)
|
|
650
|
+
if unique_approximant[0].is_gauss_valuation():
|
|
651
|
+
unique_approximant[0] = unique_approximant[0].restriction(unique_approximant[0].domain().base_ring())
|
|
652
|
+
if len(unique_approximant) == 1:
|
|
653
|
+
return repr(unique_approximant[0])
|
|
654
|
+
from .augmented_valuation import AugmentedValuation_base
|
|
655
|
+
return "[ %s ]-adic valuation" % (", ".join("v(%r) = %r" % (v._phi, v._mu) if (isinstance(v, AugmentedValuation_base) and v.domain() == self._base_valuation.domain()) else repr(v) for v in unique_approximant))
|
|
656
|
+
return "%s-adic valuation" % (self._base_valuation)
|