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,1282 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
r"""
|
|
3
|
+
Tate algebras
|
|
4
|
+
|
|
5
|
+
Let `K` be a finite extension of `\Bold{Q}_p` for some prime number `p`
|
|
6
|
+
and let `(v_1, \dots, v_n)` be a tuple of real numbers.
|
|
7
|
+
|
|
8
|
+
The associated Tate algebra consists of series of the form
|
|
9
|
+
|
|
10
|
+
.. MATH::
|
|
11
|
+
|
|
12
|
+
\sum_{i_1,\dots,i_n \in \NN} a_{i_1,\dots,i_n} x_1^{i_1} \cdots x_n^{i_n}
|
|
13
|
+
|
|
14
|
+
for which the quantity
|
|
15
|
+
|
|
16
|
+
.. MATH::
|
|
17
|
+
|
|
18
|
+
\operatorname{val}(a_{i_1,\dots,i_n}) - (v_1 i_1 + \cdots + v_n i_n)
|
|
19
|
+
|
|
20
|
+
goes to infinity when the multi-index `(i_1,\dots,i_n)` goes to infinity.
|
|
21
|
+
|
|
22
|
+
These series converge on the closed disc defined by the inequalities
|
|
23
|
+
`\operatorname{val}(x_i) \geq -v_i` for all `i \in \{1,\dots,n\}`. The `v_i`'s are
|
|
24
|
+
then the logarithms of the radii of convergence of the series in the
|
|
25
|
+
above Tate algebra; the will be called the log radii of convergence.
|
|
26
|
+
|
|
27
|
+
We can create Tate algebras using the constructor
|
|
28
|
+
:func:`sage.rings.tate_algebra.TateAlgebra`::
|
|
29
|
+
|
|
30
|
+
sage: K = Qp(2, 5, print_mode='digits')
|
|
31
|
+
sage: A.<x,y> = TateAlgebra(K); A
|
|
32
|
+
Tate Algebra in x (val >= 0), y (val >= 0)
|
|
33
|
+
over 2-adic Field with capped relative precision 5
|
|
34
|
+
|
|
35
|
+
As we observe, the default value for the log radii of convergence
|
|
36
|
+
is `0` (the series then converge on the closed unit disc).
|
|
37
|
+
|
|
38
|
+
We can specify different log radii using the following syntax::
|
|
39
|
+
|
|
40
|
+
sage: B.<u,v> = TateAlgebra(K, log_radii=[1,2]); B
|
|
41
|
+
Tate Algebra in u (val >= -1), v (val >= -2)
|
|
42
|
+
over 2-adic Field with capped relative precision 5
|
|
43
|
+
|
|
44
|
+
Note that if we pass in the ring of integers of `p`-adic field,
|
|
45
|
+
the same Tate algebra is returned::
|
|
46
|
+
|
|
47
|
+
sage: A1.<x,y> = TateAlgebra(K.integer_ring()); A1
|
|
48
|
+
Tate Algebra in x (val >= 0), y (val >= 0)
|
|
49
|
+
over 2-adic Field with capped relative precision 5
|
|
50
|
+
sage: A is A1
|
|
51
|
+
True
|
|
52
|
+
|
|
53
|
+
However the method :meth:`integer_ring` constructs the integer ring
|
|
54
|
+
of a Tate algebra, that is the subring consisting of series bounded
|
|
55
|
+
by `1` on the domain of convergence::
|
|
56
|
+
|
|
57
|
+
sage: Ao = A.integer_ring(); Ao
|
|
58
|
+
Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0)
|
|
59
|
+
over 2-adic Field with capped relative precision 5
|
|
60
|
+
|
|
61
|
+
Now we can build elements::
|
|
62
|
+
|
|
63
|
+
sage: f = 5 + 2*x*y^3 + 4*x^2*y^2; f
|
|
64
|
+
...00101 + ...000010*x*y^3 + ...0000100*x^2*y^2
|
|
65
|
+
sage: g = x^3*y + 2*x*y; g
|
|
66
|
+
...00001*x^3*y + ...000010*x*y
|
|
67
|
+
|
|
68
|
+
and perform all usual arithmetic operations on them::
|
|
69
|
+
|
|
70
|
+
sage: f + g
|
|
71
|
+
...00001*x^3*y + ...00101 + ...000010*x*y^3 + ...000010*x*y + ...0000100*x^2*y^2
|
|
72
|
+
sage: f * g
|
|
73
|
+
...00101*x^3*y + ...000010*x^4*y^4 + ...001010*x*y
|
|
74
|
+
+ ...0000100*x^5*y^3 + ...0000100*x^2*y^4 + ...00001000*x^3*y^3
|
|
75
|
+
|
|
76
|
+
An element in the integer ring is invertible if and only if its
|
|
77
|
+
reduction modulo `p` is a nonzero constant. In our example,
|
|
78
|
+
`f` is invertible (its reduction modulo `2` is `1`) but `g` is not::
|
|
79
|
+
|
|
80
|
+
sage: f.inverse_of_unit()
|
|
81
|
+
...01101 + ...01110*x*y^3 + ...10100*x^2*y^6 + ... + O(2^5 * <x, y>)
|
|
82
|
+
sage: g.inverse_of_unit()
|
|
83
|
+
Traceback (most recent call last):
|
|
84
|
+
...
|
|
85
|
+
ValueError: this series in not invertible
|
|
86
|
+
|
|
87
|
+
The notation `O(2^5)` in the result above hides a series which lies
|
|
88
|
+
in `2^5` times the integer ring of `A`, that is a series which is
|
|
89
|
+
bounded by `|2^5|` (`2`-adic norm) on the domain of convergence.
|
|
90
|
+
|
|
91
|
+
We can also evaluate series in a point of the domain of convergence
|
|
92
|
+
(in the base field or in an extension)::
|
|
93
|
+
|
|
94
|
+
sage: L.<a> = Qq(2^3, 5) # needs sage.libs.ntl
|
|
95
|
+
sage: f(a^2, 2*a) # needs sage.libs.ntl
|
|
96
|
+
1 + 2^2 + a*2^4 + O(2^5)
|
|
97
|
+
|
|
98
|
+
sage: u = polygen(ZZ, 'u')
|
|
99
|
+
sage: L.<pi> = K.change(print_mode='series').extension(u^3 - 2) # needs sage.libs.ntl
|
|
100
|
+
sage: g(pi, 2*pi) # needs sage.libs.ntl
|
|
101
|
+
pi^7 + pi^8 + pi^19 + pi^20 + O(pi^21)
|
|
102
|
+
|
|
103
|
+
Computations with ideals in Tate algebras are also supported::
|
|
104
|
+
|
|
105
|
+
sage: f = 7*x^3*y + 2*x*y - x*y^2 - 6*y^5
|
|
106
|
+
sage: g = x*y^4 + 8*x^3 - 3*y^3 + 1
|
|
107
|
+
sage: I = A.ideal([f, g])
|
|
108
|
+
sage: I.groebner_basis()
|
|
109
|
+
[...00001*x^2*y^3 + ...00001*y^4 + ...10001*x^2 + ... + O(2^5 * <x, y>),
|
|
110
|
+
...00001*x*y^4 + ...11101*y^3 + ...00001 + ... + O(2^5 * <x, y>),
|
|
111
|
+
...00001*y^5 + ...11111*x*y^3 + ...01001*x^2*y + ... + O(2^5 * <x, y>),
|
|
112
|
+
...00001*x^3 + ...01001*x*y + ...10110*y^4 + ...01110*x + O(2^5 * <x, y>)]
|
|
113
|
+
|
|
114
|
+
sage: (x^2 + 3*y)*f + 1/2*(x^3*y + x*y)*g in I
|
|
115
|
+
True
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
AUTHORS:
|
|
119
|
+
|
|
120
|
+
- Xavier Caruso, Thibaut Verron (2018-09)
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
# ***************************************************************************
|
|
125
|
+
# Copyright (C) 2018 Xavier Caruso <xavier.caruso@normalesup.org>
|
|
126
|
+
# Thibaut Verron <thibaut.verron@gmail.com>
|
|
127
|
+
#
|
|
128
|
+
# This program is free software: you can redistribute it and/or modify
|
|
129
|
+
# it under the terms of the GNU General Public License as published by
|
|
130
|
+
# the Free Software Foundation, either version 2 of the License, or
|
|
131
|
+
# (at your option) any later version.
|
|
132
|
+
# https://www.gnu.org/licenses/
|
|
133
|
+
# ***************************************************************************
|
|
134
|
+
|
|
135
|
+
from sage.structure.factory import UniqueFactory
|
|
136
|
+
from sage.structure.unique_representation import UniqueRepresentation
|
|
137
|
+
from sage.monoids.monoid import Monoid_class
|
|
138
|
+
from sage.categories.algebras import Algebras
|
|
139
|
+
from sage.structure.parent import Parent
|
|
140
|
+
from sage.rings.integer_ring import ZZ
|
|
141
|
+
from sage.rings.padics.padic_generic import pAdicGeneric
|
|
142
|
+
from sage.misc.misc_c import prod
|
|
143
|
+
|
|
144
|
+
from sage.categories.pushout import pushout
|
|
145
|
+
|
|
146
|
+
from sage.structure.category_object import normalize_names
|
|
147
|
+
from sage.rings.polynomial.term_order import TermOrder
|
|
148
|
+
from sage.rings.tate_algebra_element import TateAlgebraTerm
|
|
149
|
+
from sage.rings.tate_algebra_element import TateAlgebraElement
|
|
150
|
+
|
|
151
|
+
from sage.rings.polynomial.polydict import ETuple
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
# Factory
|
|
155
|
+
#########
|
|
156
|
+
|
|
157
|
+
class TateAlgebraFactory(UniqueFactory):
|
|
158
|
+
r"""
|
|
159
|
+
Construct a Tate algebra over a `p`-adic field.
|
|
160
|
+
|
|
161
|
+
Given a `p`-adic field `K`, variables `X_1,\dots,X_k`
|
|
162
|
+
and convergence log radii `v_1, \dots, v_n` in `\RR`, the corresponding
|
|
163
|
+
Tate algebra `K{X_1,\dots,X_k}` consists of power series with
|
|
164
|
+
coefficients `a_{i_1,\dots,i_n}` in `K` such that
|
|
165
|
+
|
|
166
|
+
.. MATH::
|
|
167
|
+
|
|
168
|
+
\operatorname{val}(a_{i_1,\dots,i_n}) - (i_1 v_1 + \cdots + i_n v_n)
|
|
169
|
+
|
|
170
|
+
tends to infinity as `i_1,\dots,i_n` go towards infinity.
|
|
171
|
+
|
|
172
|
+
INPUT:
|
|
173
|
+
|
|
174
|
+
- ``base`` -- a `p`-adic ring or field; if a ring is given, the
|
|
175
|
+
Tate algebra over its fraction field will be constructed
|
|
176
|
+
|
|
177
|
+
- ``prec`` -- integer or ``None`` (default: ``None``); the
|
|
178
|
+
precision cap. It is used if an exact object must be truncated
|
|
179
|
+
in order to do an arithmetic operation.
|
|
180
|
+
If left as ``None``, it will be set to the precision cap of
|
|
181
|
+
the base field.
|
|
182
|
+
|
|
183
|
+
- ``log_radii`` -- integer or a list or a tuple of integers
|
|
184
|
+
(default: ``0``); the value(s) `v_i`.
|
|
185
|
+
If an integer is given, this will be the common value for all
|
|
186
|
+
`v_i`.
|
|
187
|
+
|
|
188
|
+
- ``names`` -- names of the indeterminates
|
|
189
|
+
|
|
190
|
+
- ``order`` -- the monomial ordering (default: ``degrevlex``)
|
|
191
|
+
used to break ties when comparing terms with the same
|
|
192
|
+
coefficient valuation
|
|
193
|
+
|
|
194
|
+
EXAMPLES::
|
|
195
|
+
|
|
196
|
+
sage: R = Zp(2, 10, print_mode='digits'); R
|
|
197
|
+
2-adic Ring with capped relative precision 10
|
|
198
|
+
sage: A.<x,y> = TateAlgebra(R, order='lex'); A
|
|
199
|
+
Tate Algebra in x (val >= 0), y (val >= 0)
|
|
200
|
+
over 2-adic Field with capped relative precision 10
|
|
201
|
+
|
|
202
|
+
We observe that the result is the Tate algebra over the fraction
|
|
203
|
+
field of `R` and not `R` itself::
|
|
204
|
+
|
|
205
|
+
sage: A.base_ring()
|
|
206
|
+
2-adic Field with capped relative precision 10
|
|
207
|
+
sage: A.base_ring() is R.fraction_field()
|
|
208
|
+
True
|
|
209
|
+
|
|
210
|
+
If we want to construct the ring of integers of the Tate algebra,
|
|
211
|
+
we must use the method :meth:`integer_ring`::
|
|
212
|
+
|
|
213
|
+
sage: Ao = A.integer_ring(); Ao
|
|
214
|
+
Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0)
|
|
215
|
+
over 2-adic Field with capped relative precision 10
|
|
216
|
+
sage: Ao.base_ring()
|
|
217
|
+
2-adic Ring with capped relative precision 10
|
|
218
|
+
sage: Ao.base_ring() is R
|
|
219
|
+
True
|
|
220
|
+
|
|
221
|
+
The term ordering is used (in particular) to determine how series are
|
|
222
|
+
displayed. Terms are compared first according to the valuation of their
|
|
223
|
+
coefficient, and ties are broken using the monomial ordering::
|
|
224
|
+
|
|
225
|
+
sage: A.term_order()
|
|
226
|
+
Lexicographic term order
|
|
227
|
+
sage: f = 2 + y^5 + x^2; f
|
|
228
|
+
...0000000001*x^2 + ...0000000001*y^5 + ...00000000010
|
|
229
|
+
sage: B.<x,y> = TateAlgebra(R); B
|
|
230
|
+
Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
|
|
231
|
+
sage: B.term_order()
|
|
232
|
+
Degree reverse lexicographic term order
|
|
233
|
+
sage: B(f)
|
|
234
|
+
...0000000001*y^5 + ...0000000001*x^2 + ...00000000010
|
|
235
|
+
|
|
236
|
+
Here are examples of Tate algebra with smaller radii of convergence::
|
|
237
|
+
|
|
238
|
+
sage: B.<x,y> = TateAlgebra(R, log_radii=-1); B
|
|
239
|
+
Tate Algebra in x (val >= 1), y (val >= 1) over 2-adic Field with capped relative precision 10
|
|
240
|
+
sage: C.<x,y> = TateAlgebra(R, log_radii=[-1,-2]); C
|
|
241
|
+
Tate Algebra in x (val >= 1), y (val >= 2) over 2-adic Field with capped relative precision 10
|
|
242
|
+
|
|
243
|
+
AUTHORS:
|
|
244
|
+
|
|
245
|
+
- Xavier Caruso, Thibaut Verron (2018-09)
|
|
246
|
+
"""
|
|
247
|
+
def create_key(self, base, prec=None, log_radii=ZZ(0), names=None, order='degrevlex'):
|
|
248
|
+
"""
|
|
249
|
+
Create a key from the input parameters.
|
|
250
|
+
|
|
251
|
+
INPUT:
|
|
252
|
+
|
|
253
|
+
- ``base`` -- a `p`-adic ring or field
|
|
254
|
+
|
|
255
|
+
- ``prec`` -- integer or ``None`` (default: ``None``)
|
|
256
|
+
|
|
257
|
+
- ``log_radii`` -- integer or a list or a tuple of integers
|
|
258
|
+
(default: ``0``)
|
|
259
|
+
|
|
260
|
+
- ``names`` -- names of the indeterminates
|
|
261
|
+
|
|
262
|
+
- ``order`` -- a monomial ordering (default: ``degrevlex``)
|
|
263
|
+
|
|
264
|
+
EXAMPLES::
|
|
265
|
+
|
|
266
|
+
sage: TateAlgebra.create_key(Zp(2), names=['x','y'])
|
|
267
|
+
(2-adic Field with capped relative precision 20,
|
|
268
|
+
20,
|
|
269
|
+
(0, 0),
|
|
270
|
+
('x', 'y'),
|
|
271
|
+
Degree reverse lexicographic term order)
|
|
272
|
+
|
|
273
|
+
TESTS::
|
|
274
|
+
|
|
275
|
+
sage: TateAlgebra.create_key(Zp(2))
|
|
276
|
+
Traceback (most recent call last):
|
|
277
|
+
...
|
|
278
|
+
ValueError: you must specify the names of the variables
|
|
279
|
+
sage: TateAlgebra.create_key(ZZ)
|
|
280
|
+
Traceback (most recent call last):
|
|
281
|
+
...
|
|
282
|
+
TypeError: the base ring must be a p-adic ring or a p-adic field
|
|
283
|
+
sage: TateAlgebra.create_key(Zp(2), names=['x','y'], log_radii=[1])
|
|
284
|
+
Traceback (most recent call last):
|
|
285
|
+
...
|
|
286
|
+
ValueError: the number of radii does not match the number of variables
|
|
287
|
+
sage: TateAlgebra.create_key(Zp(2), names=['x','y'], log_radii=[0, 1/2])
|
|
288
|
+
Traceback (most recent call last):
|
|
289
|
+
...
|
|
290
|
+
NotImplementedError: only integral log_radii are implemented
|
|
291
|
+
sage: TateAlgebra.create_key(Zp(2), names=['x','y'], order='myorder')
|
|
292
|
+
Traceback (most recent call last):
|
|
293
|
+
...
|
|
294
|
+
ValueError: unknown term order 'myorder'
|
|
295
|
+
"""
|
|
296
|
+
if not isinstance(base, pAdicGeneric):
|
|
297
|
+
raise TypeError("the base ring must be a p-adic ring or a p-adic field")
|
|
298
|
+
# TODO: allow for arbitrary CDVF
|
|
299
|
+
base = base.fraction_field()
|
|
300
|
+
if names is None:
|
|
301
|
+
raise ValueError("you must specify the names of the variables")
|
|
302
|
+
names = normalize_names(-1, names)
|
|
303
|
+
ngens = len(names)
|
|
304
|
+
if not isinstance(log_radii, (list, tuple)):
|
|
305
|
+
try:
|
|
306
|
+
log_radii = [ZZ(log_radii)] * ngens
|
|
307
|
+
except TypeError:
|
|
308
|
+
raise NotImplementedError("only integral log_radii are implemented")
|
|
309
|
+
elif len(log_radii) != ngens:
|
|
310
|
+
raise ValueError("the number of radii does not match the number of variables")
|
|
311
|
+
else:
|
|
312
|
+
try:
|
|
313
|
+
log_radii = [ ZZ(r) for r in log_radii ]
|
|
314
|
+
except TypeError:
|
|
315
|
+
raise NotImplementedError("only integral log_radii are implemented")
|
|
316
|
+
order = TermOrder(order, ngens)
|
|
317
|
+
if prec is None:
|
|
318
|
+
prec = base.precision_cap()
|
|
319
|
+
key = (base, prec, tuple(log_radii), names, order)
|
|
320
|
+
return key
|
|
321
|
+
|
|
322
|
+
def create_object(self, version, key):
|
|
323
|
+
"""
|
|
324
|
+
Create an object using the given key.
|
|
325
|
+
|
|
326
|
+
TESTS::
|
|
327
|
+
|
|
328
|
+
sage: key = TateAlgebra.create_key(Zp(2), names=('x','y'))
|
|
329
|
+
sage: TateAlgebra.create_object((8,4,6), key)
|
|
330
|
+
Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 20
|
|
331
|
+
"""
|
|
332
|
+
(base, prec, log_radii, names, order) = key
|
|
333
|
+
return TateAlgebra_generic(base, prec, log_radii, names, order)
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
TateAlgebra = TateAlgebraFactory("TateAlgebra")
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
# Parent for terms
|
|
340
|
+
##################
|
|
341
|
+
|
|
342
|
+
class TateTermMonoid(Monoid_class, UniqueRepresentation):
|
|
343
|
+
r"""
|
|
344
|
+
A base class for Tate algebra terms.
|
|
345
|
+
|
|
346
|
+
A term in a Tate algebra `K\{X_1,\dots,X_n\}` (resp. in its ring of
|
|
347
|
+
integers) is a monomial in this ring.
|
|
348
|
+
|
|
349
|
+
Those terms form a pre-ordered monoid, with term multiplication and the
|
|
350
|
+
term order of the parent Tate algebra.
|
|
351
|
+
"""
|
|
352
|
+
Element = TateAlgebraTerm
|
|
353
|
+
|
|
354
|
+
def __init__(self, A):
|
|
355
|
+
r"""
|
|
356
|
+
Initialize the Tate term monoid.
|
|
357
|
+
|
|
358
|
+
INPUT:
|
|
359
|
+
|
|
360
|
+
- ``A`` -- a Tate algebra
|
|
361
|
+
|
|
362
|
+
EXAMPLES::
|
|
363
|
+
|
|
364
|
+
sage: R = pAdicRing(2, 10)
|
|
365
|
+
sage: A.<x,y> = TateAlgebra(R, log_radii=1)
|
|
366
|
+
sage: T = A.monoid_of_terms(); T
|
|
367
|
+
Monoid of terms in x (val >= -1), y (val >= -1) over 2-adic Field with capped relative precision 10
|
|
368
|
+
|
|
369
|
+
TESTS::
|
|
370
|
+
|
|
371
|
+
sage: A.<x,y> = TateAlgebra(Zp(2), log_radii=1)
|
|
372
|
+
sage: T = A.monoid_of_terms()
|
|
373
|
+
sage: TestSuite(T).run()
|
|
374
|
+
"""
|
|
375
|
+
# This function is not exposed to the user
|
|
376
|
+
# so we do not check the inputs
|
|
377
|
+
names = A.variable_names()
|
|
378
|
+
Monoid_class.__init__(self, names)
|
|
379
|
+
self._base = A.base_ring()
|
|
380
|
+
self._field = A._field
|
|
381
|
+
self._names = names
|
|
382
|
+
self._latex_names = A._latex_names
|
|
383
|
+
self._ngens = len(names)
|
|
384
|
+
self._log_radii = ETuple(A.log_radii())
|
|
385
|
+
self._order = A.term_order()
|
|
386
|
+
self._sortkey = self._order.sortkey
|
|
387
|
+
self._integral = A._integral
|
|
388
|
+
self._parent_algebra = A
|
|
389
|
+
|
|
390
|
+
def _repr_(self):
|
|
391
|
+
r"""
|
|
392
|
+
Return a string representation of this Tate term monoid.
|
|
393
|
+
|
|
394
|
+
EXAMPLES::
|
|
395
|
+
|
|
396
|
+
sage: R = pAdicRing(2, 10)
|
|
397
|
+
sage: A.<x,y> = TateAlgebra(R, log_radii=[1,1], order='lex')
|
|
398
|
+
sage: A.monoid_of_terms() # indirect doctest
|
|
399
|
+
Monoid of terms in x (val >= -1), y (val >= -1) over 2-adic Field with capped relative precision 10
|
|
400
|
+
"""
|
|
401
|
+
if self._ngens == 0:
|
|
402
|
+
return "Monoid of terms over %s" % self._base
|
|
403
|
+
vars = ", ".join("%s (val >= %s)" % (var, -r)
|
|
404
|
+
for var, r in zip(self._names, self._log_radii))
|
|
405
|
+
return "Monoid of terms in %s over %s" % (vars, self._base)
|
|
406
|
+
|
|
407
|
+
def _latex_(self):
|
|
408
|
+
r"""
|
|
409
|
+
Return a LaTeX representation of this Tate term monoid.
|
|
410
|
+
|
|
411
|
+
EXAMPLES::
|
|
412
|
+
|
|
413
|
+
sage: R = pAdicRing(2, 10)
|
|
414
|
+
sage: A.<x,y> = TateAlgebra(R, log_radii=[1,1], order='lex')
|
|
415
|
+
sage: M = A.monoid_of_terms()
|
|
416
|
+
sage: M._latex_()
|
|
417
|
+
'\\verb"Terms"(\\Bold{Q}_{2}\\{x,y\\}_{(1,1)})'
|
|
418
|
+
"""
|
|
419
|
+
return '\\verb"Terms"(%s)' % self._parent_algebra._latex_()
|
|
420
|
+
|
|
421
|
+
def _coerce_map_from_(self, R):
|
|
422
|
+
r"""
|
|
423
|
+
Return ``True`` if ``R`` coerces to this monoid.
|
|
424
|
+
|
|
425
|
+
EXAMPLES::
|
|
426
|
+
|
|
427
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
428
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
429
|
+
sage: T = A.monoid_of_terms()
|
|
430
|
+
|
|
431
|
+
A ring coerces into a monoid of terms if and only if
|
|
432
|
+
it coerces into its base ring::
|
|
433
|
+
|
|
434
|
+
sage: T.has_coerce_map_from(ZZ) # indirect doctest
|
|
435
|
+
True
|
|
436
|
+
sage: T.has_coerce_map_from(GF(2)) # indirect doctest
|
|
437
|
+
False
|
|
438
|
+
|
|
439
|
+
::
|
|
440
|
+
|
|
441
|
+
sage: # needs sage.rings.padics
|
|
442
|
+
sage: S.<a> = Zq(4)
|
|
443
|
+
sage: B.<x,y> = TateAlgebra(S)
|
|
444
|
+
sage: U = B.monoid_of_terms()
|
|
445
|
+
sage: U.has_coerce_map_from(T) # indirect doctest
|
|
446
|
+
True
|
|
447
|
+
sage: T.has_coerce_map_from(U) # indirect doctest
|
|
448
|
+
False
|
|
449
|
+
|
|
450
|
+
Note that a Tate algebra does not coerce into a monoid of terms::
|
|
451
|
+
|
|
452
|
+
sage: # needs sage.rings.padics
|
|
453
|
+
sage: U.has_coerce_map_from(A) # indirect doctest
|
|
454
|
+
False
|
|
455
|
+
sage: T.has_coerce_map_from(B) # indirect doctest
|
|
456
|
+
False
|
|
457
|
+
|
|
458
|
+
Variable names must match exactly::
|
|
459
|
+
|
|
460
|
+
sage: B.<x,z> = TateAlgebra(R)
|
|
461
|
+
sage: U = B.monoid_of_terms()
|
|
462
|
+
sage: T.has_coerce_map_from(U) # indirect doctest
|
|
463
|
+
False
|
|
464
|
+
sage: U.has_coerce_map_from(T) # indirect doctest
|
|
465
|
+
False
|
|
466
|
+
|
|
467
|
+
and appear in the same order::
|
|
468
|
+
|
|
469
|
+
sage: B.<y,x> = TateAlgebra(R); B
|
|
470
|
+
Tate Algebra in y (val >= 0), x (val >= 0) over 2-adic Field with capped relative precision 10
|
|
471
|
+
sage: U = B.monoid_of_terms()
|
|
472
|
+
sage: T.has_coerce_map_from(U) # indirect doctest
|
|
473
|
+
False
|
|
474
|
+
sage: U.has_coerce_map_from(T) # indirect doctest
|
|
475
|
+
False
|
|
476
|
+
|
|
477
|
+
Term orders must also match::
|
|
478
|
+
|
|
479
|
+
sage: B.<x,y> = TateAlgebra(R, order='lex')
|
|
480
|
+
sage: U = B.monoid_of_terms()
|
|
481
|
+
sage: T.has_coerce_map_from(U) # indirect doctest
|
|
482
|
+
False
|
|
483
|
+
sage: U.has_coerce_map_from(T) # indirect doctest
|
|
484
|
+
False
|
|
485
|
+
"""
|
|
486
|
+
base = self._base
|
|
487
|
+
if base.has_coerce_map_from(R):
|
|
488
|
+
return True
|
|
489
|
+
if isinstance(R, TateTermMonoid):
|
|
490
|
+
return self._parent_algebra.has_coerce_map_from(R.algebra_of_series())
|
|
491
|
+
|
|
492
|
+
def prime(self):
|
|
493
|
+
"""
|
|
494
|
+
Return the prime, that is the characteristic of the residue field.
|
|
495
|
+
|
|
496
|
+
EXAMPLES::
|
|
497
|
+
|
|
498
|
+
sage: R = Zp(3)
|
|
499
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
500
|
+
sage: T = A.monoid_of_terms()
|
|
501
|
+
sage: T.prime()
|
|
502
|
+
3
|
|
503
|
+
"""
|
|
504
|
+
return self._base.prime()
|
|
505
|
+
|
|
506
|
+
def algebra_of_series(self):
|
|
507
|
+
r"""
|
|
508
|
+
Return the Tate algebra corresponding to this Tate term monoid.
|
|
509
|
+
|
|
510
|
+
EXAMPLES::
|
|
511
|
+
|
|
512
|
+
sage: R = Zp(2, 10)
|
|
513
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
514
|
+
sage: T = A.monoid_of_terms()
|
|
515
|
+
sage: T.algebra_of_series()
|
|
516
|
+
Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
|
|
517
|
+
sage: T.algebra_of_series() is A
|
|
518
|
+
True
|
|
519
|
+
"""
|
|
520
|
+
return self._parent_algebra
|
|
521
|
+
|
|
522
|
+
def base_ring(self):
|
|
523
|
+
r"""
|
|
524
|
+
Return the base ring of this Tate term monoid.
|
|
525
|
+
|
|
526
|
+
EXAMPLES::
|
|
527
|
+
|
|
528
|
+
sage: R = Zp(2, 10)
|
|
529
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
530
|
+
sage: T = A.monoid_of_terms()
|
|
531
|
+
sage: T.base_ring()
|
|
532
|
+
2-adic Field with capped relative precision 10
|
|
533
|
+
|
|
534
|
+
We observe that the base field is not ``R`` but its
|
|
535
|
+
fraction field::
|
|
536
|
+
|
|
537
|
+
sage: T.base_ring() is R
|
|
538
|
+
False
|
|
539
|
+
sage: T.base_ring() is R.fraction_field()
|
|
540
|
+
True
|
|
541
|
+
|
|
542
|
+
If we really want to create an integral Tate algebra,
|
|
543
|
+
we have to invoke the method :meth:`integer_ring`::
|
|
544
|
+
|
|
545
|
+
sage: Ao = A.integer_ring(); Ao
|
|
546
|
+
Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
|
|
547
|
+
sage: Ao.base_ring()
|
|
548
|
+
2-adic Ring with capped relative precision 10
|
|
549
|
+
sage: Ao.base_ring() is R
|
|
550
|
+
True
|
|
551
|
+
"""
|
|
552
|
+
return self._base
|
|
553
|
+
|
|
554
|
+
def variable_names(self):
|
|
555
|
+
r"""
|
|
556
|
+
Return the names of the variables of this Tate term monoid.
|
|
557
|
+
|
|
558
|
+
EXAMPLES::
|
|
559
|
+
|
|
560
|
+
sage: R = Zp(2, 10)
|
|
561
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
562
|
+
sage: T = A.monoid_of_terms()
|
|
563
|
+
sage: T.variable_names()
|
|
564
|
+
('x', 'y')
|
|
565
|
+
"""
|
|
566
|
+
return self._names
|
|
567
|
+
|
|
568
|
+
def log_radii(self):
|
|
569
|
+
r"""
|
|
570
|
+
Return the log radii of convergence of this Tate term monoid.
|
|
571
|
+
|
|
572
|
+
EXAMPLES::
|
|
573
|
+
|
|
574
|
+
sage: R = Zp(2, 10)
|
|
575
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
576
|
+
sage: T = A.monoid_of_terms()
|
|
577
|
+
sage: T.log_radii()
|
|
578
|
+
(0, 0)
|
|
579
|
+
|
|
580
|
+
sage: B.<x,y> = TateAlgebra(R, log_radii=[1,2])
|
|
581
|
+
sage: B.monoid_of_terms().log_radii()
|
|
582
|
+
(1, 2)
|
|
583
|
+
"""
|
|
584
|
+
return tuple(self._log_radii)
|
|
585
|
+
|
|
586
|
+
def term_order(self):
|
|
587
|
+
r"""
|
|
588
|
+
Return the term order on this Tate term monoid.
|
|
589
|
+
|
|
590
|
+
EXAMPLES::
|
|
591
|
+
|
|
592
|
+
sage: R = Zp(2, 10)
|
|
593
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
594
|
+
sage: T = A.monoid_of_terms()
|
|
595
|
+
sage: T.term_order() # default term order is grevlex
|
|
596
|
+
Degree reverse lexicographic term order
|
|
597
|
+
|
|
598
|
+
sage: A.<x,y> = TateAlgebra(R, order='lex')
|
|
599
|
+
sage: T = A.monoid_of_terms()
|
|
600
|
+
sage: T.term_order()
|
|
601
|
+
Lexicographic term order
|
|
602
|
+
"""
|
|
603
|
+
return self._order
|
|
604
|
+
|
|
605
|
+
def ngens(self):
|
|
606
|
+
r"""
|
|
607
|
+
Return the number of variables in the Tate term monoid.
|
|
608
|
+
|
|
609
|
+
EXAMPLES::
|
|
610
|
+
|
|
611
|
+
sage: R = Zp(2, 10)
|
|
612
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
613
|
+
sage: T = A.monoid_of_terms()
|
|
614
|
+
sage: T.ngens()
|
|
615
|
+
2
|
|
616
|
+
"""
|
|
617
|
+
return self._ngens
|
|
618
|
+
|
|
619
|
+
def gens(self) -> tuple:
|
|
620
|
+
r"""
|
|
621
|
+
Return the generators of this monoid of terms.
|
|
622
|
+
|
|
623
|
+
EXAMPLES::
|
|
624
|
+
|
|
625
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
626
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
627
|
+
sage: T = A.monoid_of_terms()
|
|
628
|
+
sage: T.gens()
|
|
629
|
+
(...0000000001*x, ...0000000001*y)
|
|
630
|
+
"""
|
|
631
|
+
return tuple([self(g) for g in self._parent_algebra.gens()])
|
|
632
|
+
|
|
633
|
+
def gen(self, n=0):
|
|
634
|
+
r"""
|
|
635
|
+
Return the `n`-th generator of this monoid of terms.
|
|
636
|
+
|
|
637
|
+
INPUT:
|
|
638
|
+
|
|
639
|
+
- ``n`` -- integer (default: `0`); the index of
|
|
640
|
+
the requested generator
|
|
641
|
+
|
|
642
|
+
EXAMPLES::
|
|
643
|
+
|
|
644
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
645
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
646
|
+
sage: T = A.monoid_of_terms()
|
|
647
|
+
sage: T.gen()
|
|
648
|
+
...0000000001*x
|
|
649
|
+
sage: T.gen(0)
|
|
650
|
+
...0000000001*x
|
|
651
|
+
sage: T.gen(1)
|
|
652
|
+
...0000000001*y
|
|
653
|
+
sage: T.gen(2)
|
|
654
|
+
Traceback (most recent call last):
|
|
655
|
+
...
|
|
656
|
+
ValueError: generator not defined
|
|
657
|
+
"""
|
|
658
|
+
return self(self._parent_algebra.gen(n))
|
|
659
|
+
|
|
660
|
+
def some_elements(self):
|
|
661
|
+
"""
|
|
662
|
+
Return a list of elements in this monoid of terms.
|
|
663
|
+
|
|
664
|
+
EXAMPLES::
|
|
665
|
+
|
|
666
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
667
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
668
|
+
sage: T = A.monoid_of_terms()
|
|
669
|
+
sage: T.some_elements()
|
|
670
|
+
[...00000000010, ...0000000001*x, ...0000000001*y, ...00000000010*x*y]
|
|
671
|
+
"""
|
|
672
|
+
elts = [ self(self._field.uniformizer()) ] + list(self.gens())
|
|
673
|
+
elts.append(prod(elts))
|
|
674
|
+
return elts
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
# Tate algebras
|
|
678
|
+
###############
|
|
679
|
+
|
|
680
|
+
class TateAlgebra_generic(Parent):
|
|
681
|
+
def __init__(self, field, prec, log_radii, names, order, integral=False):
|
|
682
|
+
"""
|
|
683
|
+
Initialize the Tate algebra.
|
|
684
|
+
|
|
685
|
+
TESTS::
|
|
686
|
+
|
|
687
|
+
sage: A.<x,y> = TateAlgebra(Zp(2), log_radii=1)
|
|
688
|
+
sage: TestSuite(A).run()
|
|
689
|
+
|
|
690
|
+
We check that univariate Tate algebras work correctly::
|
|
691
|
+
|
|
692
|
+
sage: B.<t> = TateAlgebra(Zp(3))
|
|
693
|
+
"""
|
|
694
|
+
from sage.misc.latex import latex_variable_name
|
|
695
|
+
from sage.rings.polynomial.polynomial_ring_constructor import _multi_variate
|
|
696
|
+
self.element_class = TateAlgebraElement
|
|
697
|
+
self._field = field
|
|
698
|
+
self._cap = prec
|
|
699
|
+
self._log_radii = ETuple(log_radii) # TODO: allow log_radii in QQ
|
|
700
|
+
self._names = names
|
|
701
|
+
self._latex_names = [latex_variable_name(var) for var in names]
|
|
702
|
+
uniformizer = field.change(print_mode='terse', show_prec=False).uniformizer()
|
|
703
|
+
self._uniformizer_repr = uniformizer._repr_()
|
|
704
|
+
self._uniformizer_latex = uniformizer._latex_()
|
|
705
|
+
self._ngens = len(names)
|
|
706
|
+
self._order = order
|
|
707
|
+
self._integral = integral
|
|
708
|
+
if integral:
|
|
709
|
+
base = field.integer_ring()
|
|
710
|
+
else:
|
|
711
|
+
base = field
|
|
712
|
+
Parent.__init__(self, base=base, names=names,
|
|
713
|
+
category=Algebras(base).Commutative())
|
|
714
|
+
self._polynomial_ring = _multi_variate(field, names, order=order)
|
|
715
|
+
one = field.one()
|
|
716
|
+
self._parent_terms = TateTermMonoid(self)
|
|
717
|
+
self._oneterm = self._parent_terms(one, ETuple([0]*self._ngens))
|
|
718
|
+
if integral:
|
|
719
|
+
# This needs to be update if log_radii are allowed to be non-integral
|
|
720
|
+
self._gens = [self.element_class(self, (one << log_radii[i]) * self._polynomial_ring.gen(i)) for i in range(self._ngens)]
|
|
721
|
+
self._integer_ring = self
|
|
722
|
+
else:
|
|
723
|
+
self._gens = [self.element_class(self, g)
|
|
724
|
+
for g in self._polynomial_ring.gens()]
|
|
725
|
+
self._integer_ring = TateAlgebra_generic(field, prec, log_radii, names, order, integral=True)
|
|
726
|
+
self._integer_ring._rational_ring = self._rational_ring = self
|
|
727
|
+
|
|
728
|
+
def _an_element_(self):
|
|
729
|
+
r"""
|
|
730
|
+
Return an element of this Tate algebra.
|
|
731
|
+
|
|
732
|
+
EXAMPLES::
|
|
733
|
+
|
|
734
|
+
sage: A.<x,y> = TateAlgebra(Zp(2), log_radii=1)
|
|
735
|
+
sage: A.an_element() # indirect doctest
|
|
736
|
+
(1 + O(2^20))*x
|
|
737
|
+
"""
|
|
738
|
+
return self.gen()
|
|
739
|
+
|
|
740
|
+
def _coerce_map_from_(self, R):
|
|
741
|
+
r"""
|
|
742
|
+
Return ``True`` if ``R`` coerces to this Tate algebra.
|
|
743
|
+
|
|
744
|
+
INPUT:
|
|
745
|
+
|
|
746
|
+
- ``R`` -- a ring
|
|
747
|
+
|
|
748
|
+
EXAMPLES::
|
|
749
|
+
|
|
750
|
+
sage: R = Zp(2, 10, print_mode='digits'); R
|
|
751
|
+
2-adic Ring with capped relative precision 10
|
|
752
|
+
sage: A.<x,y> = TateAlgebra(R); A
|
|
753
|
+
Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
|
|
754
|
+
|
|
755
|
+
Any ring that coerces to the base ring also coerces to the Tate
|
|
756
|
+
algebra::
|
|
757
|
+
|
|
758
|
+
sage: A.has_coerce_map_from(ZZ) # indirect doctest
|
|
759
|
+
True
|
|
760
|
+
sage: A.has_coerce_map_from(GF(2)) # indirect doctest
|
|
761
|
+
False
|
|
762
|
+
|
|
763
|
+
If ``R`` is also a Tate algebra, it coerces to this Tate algebra if
|
|
764
|
+
the only if the base rings coerce, the variable names, the term order
|
|
765
|
+
and the domain of convergence match::
|
|
766
|
+
|
|
767
|
+
sage: # needs sage.libs.ntl
|
|
768
|
+
sage: S.<a> = Zq(4)
|
|
769
|
+
sage: B.<x,y> = TateAlgebra(S)
|
|
770
|
+
sage: B.has_coerce_map_from(A) # indirect doctest
|
|
771
|
+
True
|
|
772
|
+
sage: A.has_coerce_map_from(B) # indirect doctest
|
|
773
|
+
False
|
|
774
|
+
|
|
775
|
+
We check that coercion is not set when the variable names change::
|
|
776
|
+
|
|
777
|
+
sage: B.<x,z> = TateAlgebra(R)
|
|
778
|
+
sage: A.has_coerce_map_from(B) # indirect doctest
|
|
779
|
+
False
|
|
780
|
+
|
|
781
|
+
sage: B.<y,x> = TateAlgebra(R)
|
|
782
|
+
sage: B.has_coerce_map_from(A) # indirect doctest
|
|
783
|
+
False
|
|
784
|
+
|
|
785
|
+
If the tame order changes, there is no coercion either::
|
|
786
|
+
|
|
787
|
+
sage: B.<x,y> = TateAlgebra(R, order='lex')
|
|
788
|
+
sage: B.has_coerce_map_from(A) # indirect doctest
|
|
789
|
+
False
|
|
790
|
+
|
|
791
|
+
We finally check the condition on the domain of convergence::
|
|
792
|
+
|
|
793
|
+
sage: B.<x,y> = TateAlgebra(R, log_radii=[1,-1])
|
|
794
|
+
sage: B.has_coerce_map_from(A) # indirect doctest
|
|
795
|
+
False
|
|
796
|
+
|
|
797
|
+
sage: # needs sage.libs.ntl
|
|
798
|
+
sage: PP.<u> = R[]
|
|
799
|
+
sage: S.<pi> = R.extension(u^2 - 2)
|
|
800
|
+
sage: C.<x,y> = TateAlgebra(S, log_radii=[1,-1])
|
|
801
|
+
sage: C.has_coerce_map_from(B) # indirect doctest
|
|
802
|
+
False
|
|
803
|
+
sage: C.<x,y> = TateAlgebra(S, log_radii=[2,-2])
|
|
804
|
+
sage: C.has_coerce_map_from(B) # indirect doctest
|
|
805
|
+
True
|
|
806
|
+
"""
|
|
807
|
+
base = self._base
|
|
808
|
+
if base.has_coerce_map_from(R):
|
|
809
|
+
return True
|
|
810
|
+
if isinstance(R, (TateTermMonoid, TateAlgebra_generic)):
|
|
811
|
+
Rbase = R.base_ring()
|
|
812
|
+
logs = self._log_radii
|
|
813
|
+
Rlogs = R.log_radii()
|
|
814
|
+
if (base.has_coerce_map_from(Rbase)
|
|
815
|
+
and self._names == R.variable_names()
|
|
816
|
+
and self._order == R.term_order()):
|
|
817
|
+
ratio = base.absolute_e() // Rbase.absolute_e()
|
|
818
|
+
for i in range(self._ngens) :
|
|
819
|
+
if logs[i] != ratio * Rlogs[i]:
|
|
820
|
+
return False
|
|
821
|
+
return True
|
|
822
|
+
return False
|
|
823
|
+
|
|
824
|
+
def _pushout_(self, R):
|
|
825
|
+
"""
|
|
826
|
+
Return the pushout of this Tate algebra with ``R``.
|
|
827
|
+
|
|
828
|
+
This is only implemented when ``R`` is a `p`-adic ring or
|
|
829
|
+
a `p`-adic field.
|
|
830
|
+
|
|
831
|
+
EXAMPLES::
|
|
832
|
+
|
|
833
|
+
sage: # needs sage.libs.ntl
|
|
834
|
+
sage: from sage.categories.pushout import pushout
|
|
835
|
+
sage: R = Zp(2)
|
|
836
|
+
sage: R1.<a> = Zq(4)
|
|
837
|
+
sage: x = polygen(ZZ, 'x')
|
|
838
|
+
sage: R2.<pi> = R.extension(x^2 - 2)
|
|
839
|
+
sage: A.<u,v> = TateAlgebra(R, log_radii=[1,2])
|
|
840
|
+
sage: A1 = pushout(A, R1); A1
|
|
841
|
+
Tate Algebra in u (val >= -1), v (val >= -2)
|
|
842
|
+
over 2-adic Unramified Extension Field in a defined by x^2 + x + 1
|
|
843
|
+
sage: A2 = pushout(A, R2); A2
|
|
844
|
+
Tate Algebra in u (val >= -2), v (val >= -4)
|
|
845
|
+
over 2-adic Eisenstein Extension Field in pi defined by x^2 - 2
|
|
846
|
+
sage: Ao = A.integer_ring()
|
|
847
|
+
sage: pushout(Ao, R1)
|
|
848
|
+
Integer ring of the Tate Algebra in u (val >= -1), v (val >= -2)
|
|
849
|
+
over 2-adic Unramified Extension Field in a defined by x^2 + x + 1
|
|
850
|
+
sage: pushout(Ao, R2.fraction_field())
|
|
851
|
+
Tate Algebra in u (val >= -2), v (val >= -4)
|
|
852
|
+
over 2-adic Eisenstein Extension Field in pi defined by x^2 - 2
|
|
853
|
+
|
|
854
|
+
TESTS::
|
|
855
|
+
|
|
856
|
+
sage: # needs sage.libs.ntl
|
|
857
|
+
sage: a*u
|
|
858
|
+
(a + O(2^20))*u
|
|
859
|
+
sage: (a*u).parent() is A1
|
|
860
|
+
True
|
|
861
|
+
sage: pi*v
|
|
862
|
+
(pi + O(pi^41))*v
|
|
863
|
+
sage: (pi*v).parent() is A2
|
|
864
|
+
True
|
|
865
|
+
"""
|
|
866
|
+
if isinstance(R, pAdicGeneric):
|
|
867
|
+
base = pushout(self._base, R)
|
|
868
|
+
ratio = base.absolute_e() // self._base.absolute_e()
|
|
869
|
+
cap = ratio * self._cap
|
|
870
|
+
log_radii = [ ratio * r for r in self._log_radii ]
|
|
871
|
+
A = TateAlgebra(base, cap, log_radii, self._names, self._order)
|
|
872
|
+
if base.is_field():
|
|
873
|
+
return A
|
|
874
|
+
else:
|
|
875
|
+
return A.integer_ring()
|
|
876
|
+
|
|
877
|
+
def _ideal_class_(self, n=0):
|
|
878
|
+
r"""
|
|
879
|
+
Return the class that handles ideals in this Tate algebra.
|
|
880
|
+
|
|
881
|
+
INPUT:
|
|
882
|
+
|
|
883
|
+
- ``n`` -- integer (default: ``0``); the number of generators
|
|
884
|
+
|
|
885
|
+
EXAMPLES::
|
|
886
|
+
|
|
887
|
+
sage: R = Zp(2, 10)
|
|
888
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
889
|
+
sage: A._ideal_class_(3)
|
|
890
|
+
<class 'sage.rings.tate_algebra_ideal.TateAlgebraIdeal'>
|
|
891
|
+
|
|
892
|
+
.. NOTE::
|
|
893
|
+
|
|
894
|
+
The argument ``n`` is disregarded in the current implementation.
|
|
895
|
+
"""
|
|
896
|
+
from sage.rings.tate_algebra_ideal import TateAlgebraIdeal
|
|
897
|
+
return TateAlgebraIdeal
|
|
898
|
+
|
|
899
|
+
def prime(self):
|
|
900
|
+
"""
|
|
901
|
+
Return the prime, that is the characteristic of the residue field.
|
|
902
|
+
|
|
903
|
+
EXAMPLES::
|
|
904
|
+
|
|
905
|
+
sage: R = Zp(3)
|
|
906
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
907
|
+
sage: A.prime()
|
|
908
|
+
3
|
|
909
|
+
"""
|
|
910
|
+
return self._base.prime()
|
|
911
|
+
|
|
912
|
+
def gen(self, n=0):
|
|
913
|
+
r"""
|
|
914
|
+
Return the `n`-th generator of this Tate algebra.
|
|
915
|
+
|
|
916
|
+
INPUT:
|
|
917
|
+
|
|
918
|
+
- ``n`` -- integer (default: `0`); the index of
|
|
919
|
+
the requested generator
|
|
920
|
+
|
|
921
|
+
EXAMPLES::
|
|
922
|
+
|
|
923
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
924
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
925
|
+
sage: A.gen()
|
|
926
|
+
...0000000001*x
|
|
927
|
+
sage: A.gen(0)
|
|
928
|
+
...0000000001*x
|
|
929
|
+
sage: A.gen(1)
|
|
930
|
+
...0000000001*y
|
|
931
|
+
sage: A.gen(2)
|
|
932
|
+
Traceback (most recent call last):
|
|
933
|
+
...
|
|
934
|
+
ValueError: generator not defined
|
|
935
|
+
"""
|
|
936
|
+
try:
|
|
937
|
+
return self._gens[n]
|
|
938
|
+
except IndexError:
|
|
939
|
+
raise ValueError("generator not defined")
|
|
940
|
+
|
|
941
|
+
def gens(self) -> tuple:
|
|
942
|
+
r"""
|
|
943
|
+
Return the generators of this Tate algebra.
|
|
944
|
+
|
|
945
|
+
EXAMPLES::
|
|
946
|
+
|
|
947
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
948
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
949
|
+
sage: A.gens()
|
|
950
|
+
(...0000000001*x, ...0000000001*y)
|
|
951
|
+
"""
|
|
952
|
+
return tuple(self._gens)
|
|
953
|
+
|
|
954
|
+
def ngens(self):
|
|
955
|
+
"""
|
|
956
|
+
Return the number of generators of this algebra.
|
|
957
|
+
|
|
958
|
+
EXAMPLES::
|
|
959
|
+
|
|
960
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
961
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
962
|
+
sage: A.ngens()
|
|
963
|
+
2
|
|
964
|
+
"""
|
|
965
|
+
return self._ngens
|
|
966
|
+
|
|
967
|
+
def some_elements(self):
|
|
968
|
+
"""
|
|
969
|
+
Return a list of elements in this Tate algebra.
|
|
970
|
+
|
|
971
|
+
EXAMPLES::
|
|
972
|
+
|
|
973
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
974
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
975
|
+
sage: A.some_elements()
|
|
976
|
+
[0,
|
|
977
|
+
...00000000010,
|
|
978
|
+
...0000000001*x,
|
|
979
|
+
...0000000001*y,
|
|
980
|
+
...00000000010*x*y,
|
|
981
|
+
...00000000100,
|
|
982
|
+
...0000000001*x + ...00000000010,
|
|
983
|
+
...0000000001*y + ...00000000010,
|
|
984
|
+
...00000000010*x*y + ...00000000010,
|
|
985
|
+
...0000000010*x,
|
|
986
|
+
...0000000001*x + ...0000000001*y,
|
|
987
|
+
...0000000001*x + ...00000000010*x*y,
|
|
988
|
+
...0000000010*y,
|
|
989
|
+
...0000000001*y + ...00000000010*x*y,
|
|
990
|
+
...00000000100*x*y]
|
|
991
|
+
"""
|
|
992
|
+
terms = [ self.zero() ] + [ self(t) for t in self.monoid_of_terms().some_elements() ]
|
|
993
|
+
return [ terms[i] + terms[j] for i in range(len(terms)) for j in range(i, len(terms)) ]
|
|
994
|
+
|
|
995
|
+
def _repr_(self):
|
|
996
|
+
"""
|
|
997
|
+
Return a printable representation of this algebra.
|
|
998
|
+
|
|
999
|
+
EXAMPLES::
|
|
1000
|
+
|
|
1001
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
1002
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1003
|
+
sage: A
|
|
1004
|
+
Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
|
|
1005
|
+
|
|
1006
|
+
sage: A.integer_ring()
|
|
1007
|
+
Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
|
|
1008
|
+
"""
|
|
1009
|
+
vars = ", ".join("%s (val >= %s)" % (var, -r)
|
|
1010
|
+
for var, r in zip(self._names, self._log_radii))
|
|
1011
|
+
if self._integral:
|
|
1012
|
+
return "Integer ring of the Tate Algebra in %s over %s" % (vars, self._field)
|
|
1013
|
+
else:
|
|
1014
|
+
return "Tate Algebra in %s over %s" % (vars, self._field)
|
|
1015
|
+
|
|
1016
|
+
def _latex_(self):
|
|
1017
|
+
"""
|
|
1018
|
+
Return a LaTeX representation of this algebra.
|
|
1019
|
+
|
|
1020
|
+
EXAMPLES::
|
|
1021
|
+
|
|
1022
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
1023
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1024
|
+
sage: A._latex_()
|
|
1025
|
+
'\\Bold{Q}_{2}\\{x,y\\}'
|
|
1026
|
+
sage: A.integer_ring()._latex_()
|
|
1027
|
+
'\\Bold{Q}_{2}\\{x,y\\}^{\\circ}'
|
|
1028
|
+
|
|
1029
|
+
sage: B.<u1,u2> = TateAlgebra(R, log_radii=[1,2])
|
|
1030
|
+
sage: B._latex_()
|
|
1031
|
+
'\\Bold{Q}_{2}\\{u_{1},u_{2}\\}_{(1,2)}'
|
|
1032
|
+
"""
|
|
1033
|
+
from sage.misc.latex import latex
|
|
1034
|
+
s = r"%s\{%s\}" % (latex(self._field), ",".join(self._latex_names))
|
|
1035
|
+
if self._integral:
|
|
1036
|
+
s += r"^{\circ}"
|
|
1037
|
+
if any(radius != 0 for radius in self._log_radii):
|
|
1038
|
+
radii = ",".join(str(radius) for radius in self._log_radii)
|
|
1039
|
+
if len(self._log_radii) > 1:
|
|
1040
|
+
radii = "(%s)" % radii
|
|
1041
|
+
s += "_{%s}" % radii
|
|
1042
|
+
return s
|
|
1043
|
+
|
|
1044
|
+
def variable_names(self):
|
|
1045
|
+
"""
|
|
1046
|
+
Return the names of the variables of this algebra.
|
|
1047
|
+
|
|
1048
|
+
EXAMPLES::
|
|
1049
|
+
|
|
1050
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
1051
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1052
|
+
sage: A.variable_names()
|
|
1053
|
+
('x', 'y')
|
|
1054
|
+
"""
|
|
1055
|
+
return self._names
|
|
1056
|
+
|
|
1057
|
+
def log_radii(self):
|
|
1058
|
+
"""
|
|
1059
|
+
Return the list of the log-radii of convergence radii defining
|
|
1060
|
+
this Tate algebra.
|
|
1061
|
+
|
|
1062
|
+
EXAMPLES::
|
|
1063
|
+
|
|
1064
|
+
sage: R = Zp(2, 10)
|
|
1065
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1066
|
+
sage: A.log_radii()
|
|
1067
|
+
(0, 0)
|
|
1068
|
+
|
|
1069
|
+
sage: B.<x,y> = TateAlgebra(R, log_radii=1)
|
|
1070
|
+
sage: B.log_radii()
|
|
1071
|
+
(1, 1)
|
|
1072
|
+
|
|
1073
|
+
sage: C.<x,y> = TateAlgebra(R, log_radii=(1,-1))
|
|
1074
|
+
sage: C.log_radii()
|
|
1075
|
+
(1, -1)
|
|
1076
|
+
"""
|
|
1077
|
+
return self._log_radii
|
|
1078
|
+
|
|
1079
|
+
def integer_ring(self):
|
|
1080
|
+
"""
|
|
1081
|
+
Return the ring of integers (consisting of series bounded by
|
|
1082
|
+
1 in the domain of convergence) of this Tate algebra.
|
|
1083
|
+
|
|
1084
|
+
EXAMPLES::
|
|
1085
|
+
|
|
1086
|
+
sage: R = Zp(2, 10)
|
|
1087
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1088
|
+
sage: Ao = A.integer_ring()
|
|
1089
|
+
sage: Ao
|
|
1090
|
+
Integer ring of the Tate Algebra in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
|
|
1091
|
+
|
|
1092
|
+
sage: x in Ao
|
|
1093
|
+
True
|
|
1094
|
+
sage: x/2 in Ao
|
|
1095
|
+
False
|
|
1096
|
+
"""
|
|
1097
|
+
return self._integer_ring
|
|
1098
|
+
|
|
1099
|
+
def monoid_of_terms(self):
|
|
1100
|
+
"""
|
|
1101
|
+
Return the monoid of terms of this Tate algebra.
|
|
1102
|
+
|
|
1103
|
+
EXAMPLES::
|
|
1104
|
+
|
|
1105
|
+
sage: R = Zp(2, 10)
|
|
1106
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1107
|
+
sage: A.monoid_of_terms()
|
|
1108
|
+
Monoid of terms in x (val >= 0), y (val >= 0) over 2-adic Field with capped relative precision 10
|
|
1109
|
+
"""
|
|
1110
|
+
return self._parent_terms
|
|
1111
|
+
|
|
1112
|
+
def term_order(self):
|
|
1113
|
+
"""
|
|
1114
|
+
Return the monomial order used in this algebra.
|
|
1115
|
+
|
|
1116
|
+
EXAMPLES::
|
|
1117
|
+
|
|
1118
|
+
sage: R = Zp(2, 10)
|
|
1119
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1120
|
+
sage: A.term_order()
|
|
1121
|
+
Degree reverse lexicographic term order
|
|
1122
|
+
|
|
1123
|
+
sage: A.<x,y> = TateAlgebra(R, order='lex')
|
|
1124
|
+
sage: A.term_order()
|
|
1125
|
+
Lexicographic term order
|
|
1126
|
+
"""
|
|
1127
|
+
return self._order
|
|
1128
|
+
|
|
1129
|
+
def precision_cap(self):
|
|
1130
|
+
"""
|
|
1131
|
+
Return the precision cap of this Tate algebra.
|
|
1132
|
+
|
|
1133
|
+
.. NOTE::
|
|
1134
|
+
|
|
1135
|
+
The precision cap is the truncation precision
|
|
1136
|
+
used for arithmetic operations computed by
|
|
1137
|
+
successive approximations (as inversion).
|
|
1138
|
+
|
|
1139
|
+
EXAMPLES:
|
|
1140
|
+
|
|
1141
|
+
By default the precision cap is the precision cap of the
|
|
1142
|
+
field of coefficients::
|
|
1143
|
+
|
|
1144
|
+
sage: R = Zp(2, 10)
|
|
1145
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1146
|
+
sage: A.precision_cap()
|
|
1147
|
+
10
|
|
1148
|
+
|
|
1149
|
+
But it could be different (either smaller or larger) if we
|
|
1150
|
+
ask to::
|
|
1151
|
+
|
|
1152
|
+
sage: A.<x,y> = TateAlgebra(R, prec=5)
|
|
1153
|
+
sage: A.precision_cap()
|
|
1154
|
+
5
|
|
1155
|
+
|
|
1156
|
+
sage: A.<x,y> = TateAlgebra(R, prec=20)
|
|
1157
|
+
sage: A.precision_cap()
|
|
1158
|
+
20
|
|
1159
|
+
"""
|
|
1160
|
+
return self._cap
|
|
1161
|
+
|
|
1162
|
+
def absolute_e(self):
|
|
1163
|
+
"""
|
|
1164
|
+
Return the absolute index of ramification of this
|
|
1165
|
+
Tate algebra.
|
|
1166
|
+
|
|
1167
|
+
It is equal to the absolute index of ramification
|
|
1168
|
+
of the field of coefficients.
|
|
1169
|
+
|
|
1170
|
+
EXAMPLES::
|
|
1171
|
+
|
|
1172
|
+
sage: R = Zp(2)
|
|
1173
|
+
sage: A.<u,v> = TateAlgebra(R)
|
|
1174
|
+
sage: A.absolute_e()
|
|
1175
|
+
1
|
|
1176
|
+
|
|
1177
|
+
sage: # needs sage.libs.ntl
|
|
1178
|
+
sage: R.<a> = Zq(2^3)
|
|
1179
|
+
sage: A.<u,v> = TateAlgebra(R)
|
|
1180
|
+
sage: A.absolute_e()
|
|
1181
|
+
1
|
|
1182
|
+
|
|
1183
|
+
sage: # needs sage.libs.ntl
|
|
1184
|
+
sage: x = polygen(ZZ, 'x')
|
|
1185
|
+
sage: S.<a> = R.extension(x^2 - 2)
|
|
1186
|
+
sage: A.<u,v> = TateAlgebra(S)
|
|
1187
|
+
sage: A.absolute_e()
|
|
1188
|
+
2
|
|
1189
|
+
"""
|
|
1190
|
+
return self._base.absolute_e()
|
|
1191
|
+
|
|
1192
|
+
def characteristic(self):
|
|
1193
|
+
"""
|
|
1194
|
+
Return the characteristic of this algebra.
|
|
1195
|
+
|
|
1196
|
+
EXAMPLES::
|
|
1197
|
+
|
|
1198
|
+
sage: R = Zp(2, 10, print_mode='digits')
|
|
1199
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1200
|
+
sage: A.characteristic()
|
|
1201
|
+
0
|
|
1202
|
+
"""
|
|
1203
|
+
return self.base_ring().characteristic()
|
|
1204
|
+
|
|
1205
|
+
def random_element(self, degree=2, terms=5, integral=False, prec=None):
|
|
1206
|
+
"""
|
|
1207
|
+
Return a random element of this Tate algebra.
|
|
1208
|
+
|
|
1209
|
+
INPUT:
|
|
1210
|
+
|
|
1211
|
+
- ``degree`` -- integer (default: 2); an upper bound on
|
|
1212
|
+
the total degree of the result
|
|
1213
|
+
|
|
1214
|
+
- ``terms`` -- integer (default: 5); the maximal number
|
|
1215
|
+
of terms of the result
|
|
1216
|
+
|
|
1217
|
+
- ``integral`` -- boolean (default: ``False``); if ``True``
|
|
1218
|
+
the result will be in the ring of integers
|
|
1219
|
+
|
|
1220
|
+
- ``prec`` -- (optional) an integer, the precision of the result
|
|
1221
|
+
|
|
1222
|
+
EXAMPLES::
|
|
1223
|
+
|
|
1224
|
+
sage: R = Zp(2, prec=10, print_mode='digits')
|
|
1225
|
+
sage: A.<x,y> = TateAlgebra(R)
|
|
1226
|
+
sage: A.random_element() # random
|
|
1227
|
+
(...00101000.01)*y + ...1111011111*x^2 + ...0010010001*x*y
|
|
1228
|
+
+ ...110000011 + ...010100100*y^2
|
|
1229
|
+
|
|
1230
|
+
sage: A.random_element(degree=5, terms=3) # random
|
|
1231
|
+
(...0101100.01)*x^2*y + (...01000011.11)*y^2 + ...00111011*x*y
|
|
1232
|
+
|
|
1233
|
+
sage: A.random_element(integral=True) # random
|
|
1234
|
+
...0001111101*x + ...1101110101 + ...00010010110*y
|
|
1235
|
+
+ ...101110001100*x*y + ...000001100100*y^2
|
|
1236
|
+
|
|
1237
|
+
Note that if we are already working on the ring of integers,
|
|
1238
|
+
specifying ``integral=False`` has no effect::
|
|
1239
|
+
|
|
1240
|
+
sage: Ao = A.integer_ring()
|
|
1241
|
+
sage: f = Ao.random_element(integral=False); f # random
|
|
1242
|
+
...1100111011*x^2 + ...1110100101*x + ...1100001101*y
|
|
1243
|
+
+ ...1110110001 + ...01011010110*y^2
|
|
1244
|
+
sage: f in Ao
|
|
1245
|
+
True
|
|
1246
|
+
|
|
1247
|
+
When the log radii are negative, integral series may have non
|
|
1248
|
+
integral coefficients::
|
|
1249
|
+
|
|
1250
|
+
sage: B.<x,y> = TateAlgebra(R, log_radii=[-1,-2])
|
|
1251
|
+
sage: B.random_element(integral=True) # random
|
|
1252
|
+
(...1111111.001)*x*y + (...111000101.1)*x + (...11010111.01)*y^2
|
|
1253
|
+
+ ...0010011011*y + ...0010100011000
|
|
1254
|
+
"""
|
|
1255
|
+
if integral or self._integral:
|
|
1256
|
+
polring = self._polynomial_ring.change_ring(self._field.integer_ring())
|
|
1257
|
+
gens = self._integer_ring._gens
|
|
1258
|
+
else:
|
|
1259
|
+
polring = self._polynomial_ring
|
|
1260
|
+
gens = [self.element_class(self, g) for g in self._integer_ring._gens]
|
|
1261
|
+
return self.element_class(self, polring.random_element(degree, terms)(*gens), prec)
|
|
1262
|
+
|
|
1263
|
+
def is_integral_domain(self, proof=True):
|
|
1264
|
+
r"""
|
|
1265
|
+
Return ``True`` since any Tate algebra is an integral domain.
|
|
1266
|
+
|
|
1267
|
+
EXAMPLES::
|
|
1268
|
+
|
|
1269
|
+
sage: A.<x,y> = TateAlgebra(Zp(3))
|
|
1270
|
+
sage: A.is_integral_domain()
|
|
1271
|
+
True
|
|
1272
|
+
|
|
1273
|
+
TESTS:
|
|
1274
|
+
|
|
1275
|
+
Check that :issue:`34372` is fixed::
|
|
1276
|
+
|
|
1277
|
+
sage: A.<x,y> = TateAlgebra(Zp(3))
|
|
1278
|
+
sage: R.<a,b> = PolynomialRing(A)
|
|
1279
|
+
sage: R.is_integral_domain(proof=True)
|
|
1280
|
+
True
|
|
1281
|
+
"""
|
|
1282
|
+
return True
|