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,172 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
# sage.doctest: needs sage.libs.flint
|
|
3
|
+
|
|
4
|
+
include "sage/libs/linkages/padics/fmpz_poly_unram.pxi"
|
|
5
|
+
include "sage/libs/linkages/padics/unram_shared.pxi"
|
|
6
|
+
include "CR_template.pxi"
|
|
7
|
+
|
|
8
|
+
cdef class PowComputer_(PowComputer_flint_unram):
|
|
9
|
+
"""
|
|
10
|
+
A PowComputer for a capped-relative unramified ring or field.
|
|
11
|
+
"""
|
|
12
|
+
def __init__(self, Integer prime, long cache_limit, long prec_cap, long ram_prec_cap, bint in_field, poly=None):
|
|
13
|
+
"""
|
|
14
|
+
Initialization.
|
|
15
|
+
|
|
16
|
+
EXAMPLES::
|
|
17
|
+
|
|
18
|
+
sage: R.<a> = ZqCR(125)
|
|
19
|
+
sage: type(R.prime_pow)
|
|
20
|
+
<class 'sage.rings.padics.qadic_flint_CR.PowComputer_'>
|
|
21
|
+
sage: R.prime_pow._prec_type
|
|
22
|
+
'capped-rel'
|
|
23
|
+
"""
|
|
24
|
+
self._prec_type = 'capped-rel'
|
|
25
|
+
PowComputer_flint_unram.__init__(self, prime, cache_limit, prec_cap, ram_prec_cap, in_field, poly)
|
|
26
|
+
|
|
27
|
+
cdef class qAdicCappedRelativeElement(CRElement):
|
|
28
|
+
frobenius = frobenius_unram
|
|
29
|
+
trace = trace_unram
|
|
30
|
+
norm = norm_unram
|
|
31
|
+
|
|
32
|
+
def matrix_mod_pn(self):
|
|
33
|
+
r"""
|
|
34
|
+
Return the matrix of right multiplication by the element on
|
|
35
|
+
the power basis `1, x, x^2, \ldots, x^{d-1}` for this
|
|
36
|
+
extension field. Thus the *rows* of this matrix give the
|
|
37
|
+
images of each of the `x^i`. The entries of the matrices are
|
|
38
|
+
IntegerMod elements, defined modulo ``p^(self.absprec() / e)``.
|
|
39
|
+
|
|
40
|
+
Raises an error if ``self`` has negative valuation.
|
|
41
|
+
|
|
42
|
+
EXAMPLES::
|
|
43
|
+
|
|
44
|
+
sage: R.<a> = QqCR(5^5,5)
|
|
45
|
+
sage: b = (5 + 15*a)^3
|
|
46
|
+
sage: b.matrix_mod_pn()
|
|
47
|
+
[ 125 1125 3375 3375 0]
|
|
48
|
+
[ 0 125 1125 3375 3375]
|
|
49
|
+
[380500 377125 125 1125 3375]
|
|
50
|
+
[380500 367000 377125 125 1125]
|
|
51
|
+
[387250 376000 367000 377125 125]
|
|
52
|
+
|
|
53
|
+
sage: M = R(0,3).matrix_mod_pn(); M == 0
|
|
54
|
+
True
|
|
55
|
+
sage: M.base_ring()
|
|
56
|
+
Ring of integers modulo 125
|
|
57
|
+
|
|
58
|
+
Check that :issue:`13617` has been fixed::
|
|
59
|
+
|
|
60
|
+
sage: R(0).matrix_mod_pn()
|
|
61
|
+
[0 0 0 0 0]
|
|
62
|
+
[0 0 0 0 0]
|
|
63
|
+
[0 0 0 0 0]
|
|
64
|
+
[0 0 0 0 0]
|
|
65
|
+
[0 0 0 0 0]
|
|
66
|
+
"""
|
|
67
|
+
if self.ordp < 0:
|
|
68
|
+
raise ValueError("self must be integral")
|
|
69
|
+
if exactzero(self.ordp):
|
|
70
|
+
from sage.matrix.constructor import matrix
|
|
71
|
+
return matrix(ZZ, self.prime_pow.deg, self.prime_pow.deg)
|
|
72
|
+
else:
|
|
73
|
+
return cmatrix_mod_pn(self.unit, self.ordp + self.relprec, self.ordp, self.prime_pow)
|
|
74
|
+
|
|
75
|
+
def _flint_rep(self, var='x'):
|
|
76
|
+
"""
|
|
77
|
+
Replacement for _ntl_rep for use in printing and debugging.
|
|
78
|
+
|
|
79
|
+
EXAMPLES::
|
|
80
|
+
|
|
81
|
+
sage: R.<a> = Qq(27, 4)
|
|
82
|
+
sage: (~(1+a))._flint_rep()
|
|
83
|
+
41*x^2 + 40*x + 42
|
|
84
|
+
sage: (1+a)*(41*a^2+40*a+42)
|
|
85
|
+
1 + O(3^4)
|
|
86
|
+
"""
|
|
87
|
+
if exactzero(self.ordp):
|
|
88
|
+
raise ValueError("zero does not have a flint rep")
|
|
89
|
+
return self.prime_pow._new_fmpz_poly(self.unit, var)
|
|
90
|
+
|
|
91
|
+
def _flint_rep_abs(self, var='x'):
|
|
92
|
+
"""
|
|
93
|
+
Replacement for _ntl_rep_abs for use in printing and debugging.
|
|
94
|
+
|
|
95
|
+
EXAMPLES::
|
|
96
|
+
|
|
97
|
+
sage: R.<a> = Qq(27, 4)
|
|
98
|
+
sage: (~(3+3*a))._flint_rep_abs()
|
|
99
|
+
(41*x^2 + 40*x + 42, -1)
|
|
100
|
+
sage: (3+3*a)*(41*a^2+40*a+42)
|
|
101
|
+
3 + O(3^5)
|
|
102
|
+
sage: (3+3*a)._flint_rep_abs()
|
|
103
|
+
(3*x + 3, 0)
|
|
104
|
+
|
|
105
|
+
TESTS::
|
|
106
|
+
|
|
107
|
+
sage: R(0)._flint_rep_abs()
|
|
108
|
+
Traceback (most recent call last):
|
|
109
|
+
...
|
|
110
|
+
ValueError: zero does not have a flint rep
|
|
111
|
+
"""
|
|
112
|
+
if self.ordp < 0:
|
|
113
|
+
return self._flint_rep(var), Integer(self.ordp)
|
|
114
|
+
elif exactzero(self.ordp):
|
|
115
|
+
raise ValueError("zero does not have a flint rep")
|
|
116
|
+
cshift_notrunc(self.prime_pow.poly_flint_rep, self.unit, self.ordp, self.ordp + self.relprec, self.prime_pow, False)
|
|
117
|
+
return self.prime_pow._new_fmpz_poly(self.prime_pow.poly_flint_rep, var), Integer(0)
|
|
118
|
+
|
|
119
|
+
def _modp_rep(self, use_smallest_mode=False, return_list=True):
|
|
120
|
+
r"""
|
|
121
|
+
Return the element with the same reduction mod p that can be expressed
|
|
122
|
+
with coefficients between 0 and p-1. The absolute precision will be maximal.
|
|
123
|
+
|
|
124
|
+
This method is used in printing and computing `p`-adic expansions.
|
|
125
|
+
|
|
126
|
+
INPUT:
|
|
127
|
+
|
|
128
|
+
- ``use_smallest_mode`` -- if ``True``, use reps between -p/2 and p/2 instead
|
|
129
|
+
- ``return_list`` -- if ``True``, return a list of coefficients (as integers);
|
|
130
|
+
for use in printing
|
|
131
|
+
|
|
132
|
+
EXAMPLES::
|
|
133
|
+
|
|
134
|
+
sage: R.<a> = Qq(27,4)
|
|
135
|
+
sage: b = a^2 + 5*a - 3
|
|
136
|
+
sage: b._modp_rep()
|
|
137
|
+
((a^2 + 2*a) + O(3^4), [0, 2, 1])
|
|
138
|
+
sage: b._modp_rep(use_smallest_mode=True)[1]
|
|
139
|
+
[0, -1, 1]
|
|
140
|
+
"""
|
|
141
|
+
if self.ordp < 0:
|
|
142
|
+
raise ValueError("No mod p reduction in negative valuation")
|
|
143
|
+
cdef CRElement rep = self._new_c()
|
|
144
|
+
if self.ordp > 0:
|
|
145
|
+
rep._set_exact_zero()
|
|
146
|
+
L = []
|
|
147
|
+
else:
|
|
148
|
+
rep.ordp = 0
|
|
149
|
+
rep.relprec = self.prime_pow.prec_cap
|
|
150
|
+
L = cmodp_rep(rep.unit, self.unit, smallest_mode if use_smallest_mode else simple_mode, return_list, self.prime_pow)
|
|
151
|
+
if return_list:
|
|
152
|
+
return rep, L
|
|
153
|
+
else:
|
|
154
|
+
return rep
|
|
155
|
+
|
|
156
|
+
def __hash__(self):
|
|
157
|
+
r"""
|
|
158
|
+
Raise a :exc:`TypeError` since this element is not hashable
|
|
159
|
+
(:issue:`11895`).
|
|
160
|
+
|
|
161
|
+
TESTS::
|
|
162
|
+
|
|
163
|
+
sage: K.<a> = Qq(9)
|
|
164
|
+
sage: hash(a)
|
|
165
|
+
Traceback (most recent call last):
|
|
166
|
+
...
|
|
167
|
+
TypeError: ...unhashable type: 'sage.rings.padics.qadic_flint_CR.qAdicCappedRelativeElement'...
|
|
168
|
+
"""
|
|
169
|
+
# Eventually, hashing will be disabled for all (non-fixed-mod) p-adic
|
|
170
|
+
# elements (#11895), until then, we only to this for types which did
|
|
171
|
+
# not support hashing before we switched some elements to FLINT
|
|
172
|
+
raise TypeError("unhashable type: 'sage.rings.padics.qadic_flint_CR.qAdicCappedRelativeElement'")
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
|
|
3
|
+
from sage.libs.flint.types cimport fmpz_poly_t
|
|
4
|
+
from sage.rings.padics.qadic_flint_FP cimport FPElement
|
|
5
|
+
from sage.rings.padics.pow_computer_flint cimport PowComputer_flint_unram
|
|
6
|
+
|
|
7
|
+
cdef class PowComputer_(PowComputer_flint_unram):
|
|
8
|
+
pass
|
|
9
|
+
ctypedef fmpz_poly_t celement
|
|
10
|
+
|
|
11
|
+
include "FM_template_header.pxi"
|
|
12
|
+
|
|
13
|
+
cdef class qAdicFixedModElement(FMElement):
|
|
14
|
+
pass
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
# sage.doctest: needs sage.libs.flint
|
|
3
|
+
|
|
4
|
+
include "sage/libs/linkages/padics/fmpz_poly_unram.pxi"
|
|
5
|
+
include "sage/libs/linkages/padics/unram_shared.pxi"
|
|
6
|
+
include "FM_template.pxi"
|
|
7
|
+
|
|
8
|
+
cdef class PowComputer_(PowComputer_flint_unram):
|
|
9
|
+
"""
|
|
10
|
+
A PowComputer for a fixed-modulus unramified ring.
|
|
11
|
+
"""
|
|
12
|
+
def __init__(self, Integer prime, long cache_limit, long prec_cap, long ram_prec_cap, bint in_field, poly=None):
|
|
13
|
+
"""
|
|
14
|
+
Initialization.
|
|
15
|
+
|
|
16
|
+
EXAMPLES::
|
|
17
|
+
|
|
18
|
+
sage: R.<a> = ZqFM(125)
|
|
19
|
+
sage: type(R.prime_pow)
|
|
20
|
+
<class 'sage.rings.padics.qadic_flint_FM.PowComputer_'>
|
|
21
|
+
sage: R.prime_pow._prec_type
|
|
22
|
+
'fixed-mod'
|
|
23
|
+
"""
|
|
24
|
+
self._prec_type = 'fixed-mod'
|
|
25
|
+
PowComputer_flint_unram.__init__(self, prime, cache_limit, prec_cap, ram_prec_cap, in_field, poly)
|
|
26
|
+
|
|
27
|
+
cdef class qAdicFixedModElement(FMElement):
|
|
28
|
+
frobenius = frobenius_unram
|
|
29
|
+
trace = trace_unram
|
|
30
|
+
norm = norm_unram
|
|
31
|
+
|
|
32
|
+
def matrix_mod_pn(self):
|
|
33
|
+
r"""
|
|
34
|
+
Return the matrix of right multiplication by the element on
|
|
35
|
+
the power basis `1, x, x^2, \ldots, x^{d-1}` for this
|
|
36
|
+
extension field. Thus the *rows* of this matrix give the
|
|
37
|
+
images of each of the `x^i`. The entries of the matrices are
|
|
38
|
+
IntegerMod elements, defined modulo ``p^(self.absprec() / e)``.
|
|
39
|
+
|
|
40
|
+
EXAMPLES::
|
|
41
|
+
|
|
42
|
+
sage: R.<a> = ZqFM(5^5,5)
|
|
43
|
+
sage: b = (5 + 15*a)^3
|
|
44
|
+
sage: b.matrix_mod_pn()
|
|
45
|
+
[ 125 1125 250 250 0]
|
|
46
|
+
[ 0 125 1125 250 250]
|
|
47
|
+
[2375 2125 125 1125 250]
|
|
48
|
+
[2375 1375 2125 125 1125]
|
|
49
|
+
[2875 1000 1375 2125 125]
|
|
50
|
+
|
|
51
|
+
sage: M = R(0,3).matrix_mod_pn(); M == 0
|
|
52
|
+
True
|
|
53
|
+
sage: M.base_ring()
|
|
54
|
+
Ring of integers modulo 3125
|
|
55
|
+
"""
|
|
56
|
+
return cmatrix_mod_pn(self.value, self.prime_pow.prec_cap, 0, self.prime_pow)
|
|
57
|
+
|
|
58
|
+
def _flint_rep(self, var='x'):
|
|
59
|
+
"""
|
|
60
|
+
Replacement for _ntl_rep for use in printing and debugging.
|
|
61
|
+
|
|
62
|
+
EXAMPLES::
|
|
63
|
+
|
|
64
|
+
sage: R.<a> = ZqFM(27, 4)
|
|
65
|
+
sage: (1+a).inverse_of_unit()._flint_rep()
|
|
66
|
+
41*x^2 + 40*x + 42
|
|
67
|
+
sage: (1+a)*(41*a^2+40*a+42)
|
|
68
|
+
1
|
|
69
|
+
"""
|
|
70
|
+
return self.prime_pow._new_fmpz_poly(self.value, var)
|
|
71
|
+
|
|
72
|
+
def _flint_rep_abs(self, var='x'):
|
|
73
|
+
"""
|
|
74
|
+
Replacement for _ntl_rep_abs for use in printing and debugging.
|
|
75
|
+
|
|
76
|
+
EXAMPLES::
|
|
77
|
+
|
|
78
|
+
sage: R.<a> = ZqFM(27, 4)
|
|
79
|
+
sage: (3+3*a)._flint_rep_abs()
|
|
80
|
+
(3*x + 3, 0)
|
|
81
|
+
"""
|
|
82
|
+
return self._flint_rep(var), Integer(0)
|
|
83
|
+
|
|
84
|
+
def _modp_rep(self, use_smallest_mode=False, return_list=True):
|
|
85
|
+
r"""
|
|
86
|
+
Return the element with the same reduction mod p that can be expressed
|
|
87
|
+
with coefficients between 0 and p-1. The absolute precision will be maximal.
|
|
88
|
+
|
|
89
|
+
This method is used in printing and computing `p`-adic expansions.
|
|
90
|
+
|
|
91
|
+
INPUT:
|
|
92
|
+
|
|
93
|
+
- ``use_smallest_mode`` -- if ``True``, use reps between -p/2 and p/2 instead
|
|
94
|
+
- ``return_list`` -- if ``True``, return a list of coefficients (as integers);
|
|
95
|
+
for use in printing
|
|
96
|
+
|
|
97
|
+
EXAMPLES::
|
|
98
|
+
|
|
99
|
+
sage: R.<a> = ZqFM(27,4)
|
|
100
|
+
sage: b = a^2 + 5*a - 3
|
|
101
|
+
sage: b._modp_rep()
|
|
102
|
+
((a^2 + 2*a), [0, 2, 1])
|
|
103
|
+
sage: b._modp_rep(use_smallest_mode=True)[1]
|
|
104
|
+
[0, -1, 1]
|
|
105
|
+
"""
|
|
106
|
+
cdef FMElement rep = self._new_c()
|
|
107
|
+
L = cmodp_rep(rep.value, self.value, smallest_mode if use_smallest_mode else simple_mode, return_list, self.prime_pow)
|
|
108
|
+
if return_list:
|
|
109
|
+
return rep, L
|
|
110
|
+
else:
|
|
111
|
+
return rep
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
|
|
3
|
+
from sage.libs.flint.fmpz_poly cimport fmpz_poly_t
|
|
4
|
+
from sage.rings.padics.pow_computer_flint cimport PowComputer_flint_unram
|
|
5
|
+
cdef class PowComputer_(PowComputer_flint_unram):
|
|
6
|
+
pass
|
|
7
|
+
ctypedef fmpz_poly_t celement
|
|
8
|
+
|
|
9
|
+
include "FP_template_header.pxi"
|
|
10
|
+
|
|
11
|
+
cdef class qAdicFloatingPointElement(FPElement):
|
|
12
|
+
pass
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-pari
|
|
2
|
+
# distutils: libraries = flint
|
|
3
|
+
# sage.doctest: needs sage.libs.flint
|
|
4
|
+
|
|
5
|
+
include "sage/libs/linkages/padics/fmpz_poly_unram.pxi"
|
|
6
|
+
include "sage/libs/linkages/padics/unram_shared.pxi"
|
|
7
|
+
include "FP_template.pxi"
|
|
8
|
+
|
|
9
|
+
cdef class PowComputer_(PowComputer_flint_unram):
|
|
10
|
+
"""
|
|
11
|
+
A PowComputer for a floating-point unramified ring or field.
|
|
12
|
+
"""
|
|
13
|
+
def __init__(self, Integer prime, long cache_limit, long prec_cap, long ram_prec_cap, bint in_field, poly=None):
|
|
14
|
+
"""
|
|
15
|
+
Initialization.
|
|
16
|
+
|
|
17
|
+
EXAMPLES::
|
|
18
|
+
|
|
19
|
+
sage: R.<a> = ZqFP(125)
|
|
20
|
+
sage: type(R.prime_pow)
|
|
21
|
+
<class 'sage.rings.padics.qadic_flint_FP.PowComputer_'>
|
|
22
|
+
sage: R.prime_pow._prec_type
|
|
23
|
+
'floating-point'
|
|
24
|
+
"""
|
|
25
|
+
self._prec_type = 'floating-point'
|
|
26
|
+
PowComputer_flint_unram.__init__(self, prime, cache_limit, prec_cap, ram_prec_cap, in_field, poly)
|
|
27
|
+
|
|
28
|
+
cdef class qAdicFloatingPointElement(FPElement):
|
|
29
|
+
frobenius = frobenius_unram
|
|
30
|
+
trace = trace_unram
|
|
31
|
+
norm = norm_unram
|
|
32
|
+
|
|
33
|
+
def matrix_mod_pn(self):
|
|
34
|
+
r"""
|
|
35
|
+
Return the matrix of right multiplication by the element on
|
|
36
|
+
the power basis `1, x, x^2, \ldots, x^{d-1}` for this
|
|
37
|
+
extension field. Thus the *rows* of this matrix give the
|
|
38
|
+
images of each of the `x^i`. The entries of the matrices are
|
|
39
|
+
IntegerMod elements, defined modulo ``p^(self.absprec() / e)``.
|
|
40
|
+
|
|
41
|
+
Raises an error if ``self`` has negative valuation.
|
|
42
|
+
|
|
43
|
+
EXAMPLES::
|
|
44
|
+
|
|
45
|
+
sage: R.<a> = QqFP(5^5,5)
|
|
46
|
+
sage: b = (5 + 15*a)^3
|
|
47
|
+
sage: b.matrix_mod_pn()
|
|
48
|
+
[ 125 1125 3375 3375 0]
|
|
49
|
+
[ 0 125 1125 3375 3375]
|
|
50
|
+
[380500 377125 125 1125 3375]
|
|
51
|
+
[380500 367000 377125 125 1125]
|
|
52
|
+
[387250 376000 367000 377125 125]
|
|
53
|
+
|
|
54
|
+
sage: M = R(0,3).matrix_mod_pn(); M == 0
|
|
55
|
+
True
|
|
56
|
+
sage: M.base_ring()
|
|
57
|
+
Integer Ring
|
|
58
|
+
|
|
59
|
+
Check that :issue:`13617` has been fixed::
|
|
60
|
+
|
|
61
|
+
sage: R(0).matrix_mod_pn()
|
|
62
|
+
[0 0 0 0 0]
|
|
63
|
+
[0 0 0 0 0]
|
|
64
|
+
[0 0 0 0 0]
|
|
65
|
+
[0 0 0 0 0]
|
|
66
|
+
[0 0 0 0 0]
|
|
67
|
+
"""
|
|
68
|
+
if self.ordp < 0:
|
|
69
|
+
raise ValueError("self must be integral")
|
|
70
|
+
if very_pos_val(self.ordp):
|
|
71
|
+
from sage.matrix.constructor import matrix
|
|
72
|
+
return matrix(ZZ, self.prime_pow.deg, self.prime_pow.deg)
|
|
73
|
+
else:
|
|
74
|
+
return cmatrix_mod_pn(self.unit, self.ordp + self.prime_pow.prec_cap, self.ordp, self.prime_pow)
|
|
75
|
+
|
|
76
|
+
def _flint_rep(self, var='x'):
|
|
77
|
+
"""
|
|
78
|
+
Replacement for _ntl_rep for use in printing and debugging.
|
|
79
|
+
|
|
80
|
+
EXAMPLES::
|
|
81
|
+
|
|
82
|
+
sage: R.<a> = QqFP(27, 4)
|
|
83
|
+
sage: (~(1+a))._flint_rep()
|
|
84
|
+
41*x^2 + 40*x + 42
|
|
85
|
+
sage: (1+a)*(41*a^2+40*a+42)
|
|
86
|
+
1
|
|
87
|
+
"""
|
|
88
|
+
if self._is_exact_zero():
|
|
89
|
+
raise ValueError("zero does not have a flint rep")
|
|
90
|
+
return self.prime_pow._new_fmpz_poly(self.unit, var)
|
|
91
|
+
|
|
92
|
+
def _flint_rep_abs(self, var='x'):
|
|
93
|
+
"""
|
|
94
|
+
Replacement for _ntl_rep_abs for use in printing and debugging.
|
|
95
|
+
|
|
96
|
+
EXAMPLES::
|
|
97
|
+
|
|
98
|
+
sage: R.<a> = QqFP(27, 4)
|
|
99
|
+
sage: (~(3+3*a))._flint_rep_abs()
|
|
100
|
+
(41*x^2 + 40*x + 42, -1)
|
|
101
|
+
sage: (3+3*a)*(41*a^2+40*a+42)
|
|
102
|
+
3
|
|
103
|
+
sage: (3+3*a)._flint_rep_abs()
|
|
104
|
+
(3*x + 3, 0)
|
|
105
|
+
"""
|
|
106
|
+
if self.ordp < 0:
|
|
107
|
+
return self._flint_rep(var), Integer(self.ordp)
|
|
108
|
+
if self._is_exact_zero():
|
|
109
|
+
raise ValueError("zero does not have a flint rep")
|
|
110
|
+
cshift_notrunc(self.prime_pow.poly_flint_rep, self.unit, self.ordp, self.ordp + self.prime_pow.prec_cap, self.prime_pow, False)
|
|
111
|
+
return self.prime_pow._new_fmpz_poly(self.prime_pow.poly_flint_rep, var), Integer(0)
|
|
112
|
+
|
|
113
|
+
def _modp_rep(self, use_smallest_mode=False, return_list=True):
|
|
114
|
+
r"""
|
|
115
|
+
Return the element with the same reduction mod p that can be expressed
|
|
116
|
+
with coefficients between 0 and p-1. The absolute precision will be maximal.
|
|
117
|
+
|
|
118
|
+
This method is used in printing and computing `p`-adic expansions.
|
|
119
|
+
|
|
120
|
+
INPUT:
|
|
121
|
+
|
|
122
|
+
- ``use_smallest_mode`` -- if ``True``, use reps between -p/2 and p/2 instead
|
|
123
|
+
- ``return_list`` -- if ``True``, return a list of coefficients (as integers);
|
|
124
|
+
for use in printing
|
|
125
|
+
|
|
126
|
+
EXAMPLES::
|
|
127
|
+
|
|
128
|
+
sage: R.<a> = Qq(27,4)
|
|
129
|
+
sage: b = a^2 + 5*a - 3
|
|
130
|
+
sage: b._modp_rep()
|
|
131
|
+
((a^2 + 2*a) + O(3^4), [0, 2, 1])
|
|
132
|
+
sage: b._modp_rep(use_smallest_mode=True)[1]
|
|
133
|
+
[0, -1, 1]
|
|
134
|
+
"""
|
|
135
|
+
if self.ordp < 0:
|
|
136
|
+
raise ValueError("No mod p reduction in negative valuation")
|
|
137
|
+
cdef FPElement rep = self._new_c()
|
|
138
|
+
if self.ordp > 0:
|
|
139
|
+
rep._set_exact_zero()
|
|
140
|
+
L = []
|
|
141
|
+
else:
|
|
142
|
+
rep.ordp = 0
|
|
143
|
+
L = cmodp_rep(rep.unit, self.unit, smallest_mode if use_smallest_mode else simple_mode, return_list, self.prime_pow)
|
|
144
|
+
if return_list:
|
|
145
|
+
return rep, L
|
|
146
|
+
else:
|
|
147
|
+
return rep
|
|
148
|
+
|
|
149
|
+
def __hash__(self):
|
|
150
|
+
r"""
|
|
151
|
+
Raise a :exc:`TypeError` since this element is not hashable
|
|
152
|
+
(:issue:`11895`).
|
|
153
|
+
|
|
154
|
+
TESTS::
|
|
155
|
+
|
|
156
|
+
sage: K.<a> = QqFP(9)
|
|
157
|
+
sage: hash(a)
|
|
158
|
+
Traceback (most recent call last):
|
|
159
|
+
...
|
|
160
|
+
TypeError: ...unhashable type: 'sage.rings.padics.qadic_flint_FP.qAdicFloatingPointElement'...
|
|
161
|
+
"""
|
|
162
|
+
# Eventually, hashing will be disabled for all (non-fixed-mod) p-adic
|
|
163
|
+
# elements (#11895), until then, we only to this for types which did
|
|
164
|
+
# not support hashing before we switched some elements to FLINT
|
|
165
|
+
raise TypeError("unhashable type: 'sage.rings.padics.qadic_flint_FP.qAdicFloatingPointElement'")
|