passagemath-singular 10.6.31rc3__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-singular might be problematic. Click here for more details.
- PySingular.cpython-314-x86_64-linux-musl.so +0 -0
- passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
- passagemath_singular-10.6.31rc3.dist-info/RECORD +493 -0
- passagemath_singular-10.6.31rc3.dist-info/WHEEL +5 -0
- passagemath_singular-10.6.31rc3.dist-info/top_level.txt +3 -0
- passagemath_singular.libs/libSingular-4-67059f19.4.1.so +0 -0
- passagemath_singular.libs/libcddgmp-30166d29.so.0.1.3 +0 -0
- passagemath_singular.libs/libfactory-4-9d37bcf4.4.1.so +0 -0
- passagemath_singular.libs/libflint-fd6f12fc.so.21.0.0 +0 -0
- passagemath_singular.libs/libgcc_s-0cd532bd.so.1 +0 -0
- passagemath_singular.libs/libgf2x-9e30c3e3.so.3.0.0 +0 -0
- passagemath_singular.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
- passagemath_singular.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
- passagemath_singular.libs/libgsl-42cda06f.so.28.0.0 +0 -0
- passagemath_singular.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
- passagemath_singular.libs/libncursesw-9c9e32c3.so.6.5 +0 -0
- passagemath_singular.libs/libntl-26885ca2.so.44.0.1 +0 -0
- passagemath_singular.libs/libomalloc-0-e9ff96db.9.6.so +0 -0
- passagemath_singular.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
- passagemath_singular.libs/libpolys-4-8bcf8e7d.4.1.so +0 -0
- passagemath_singular.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
- passagemath_singular.libs/libreadline-06542304.so.8.2 +0 -0
- passagemath_singular.libs/libsingular_resources-4-73bf7623.4.1.so +0 -0
- passagemath_singular.libs/libstdc++-5d72f927.so.6.0.33 +0 -0
- sage/algebras/all__sagemath_singular.py +3 -0
- sage/algebras/fusion_rings/all.py +19 -0
- sage/algebras/fusion_rings/f_matrix.py +2448 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +5 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +538 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +3 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +331 -0
- sage/algebras/fusion_rings/fusion_double.py +899 -0
- sage/algebras/fusion_rings/fusion_ring.py +1580 -0
- sage/algebras/fusion_rings/poly_tup_engine.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/poly_tup_engine.pxd +24 -0
- sage/algebras/fusion_rings/poly_tup_engine.pyx +579 -0
- sage/algebras/fusion_rings/shm_managers.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/shm_managers.pxd +24 -0
- sage/algebras/fusion_rings/shm_managers.pyx +780 -0
- sage/algebras/letterplace/all.py +1 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.pxd +18 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.pyx +755 -0
- sage/algebras/letterplace/free_algebra_letterplace.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/letterplace/free_algebra_letterplace.pxd +35 -0
- sage/algebras/letterplace/free_algebra_letterplace.pyx +914 -0
- sage/algebras/letterplace/letterplace_ideal.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/letterplace/letterplace_ideal.pyx +408 -0
- sage/algebras/quatalg/all.py +2 -0
- sage/algebras/quatalg/quaternion_algebra.py +4778 -0
- sage/algebras/quatalg/quaternion_algebra_cython.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
- sage/algebras/quatalg/quaternion_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_element.pxd +29 -0
- sage/algebras/quatalg/quaternion_algebra_element.pyx +2176 -0
- sage/all__sagemath_singular.py +11 -0
- sage/ext_data/all__sagemath_singular.py +1 -0
- sage/ext_data/singular/function_field/core.lib +98 -0
- sage/interfaces/all__sagemath_singular.py +1 -0
- sage/interfaces/singular.py +2835 -0
- sage/libs/all__sagemath_singular.py +1 -0
- sage/libs/singular/__init__.py +1 -0
- sage/libs/singular/decl.pxd +1168 -0
- sage/libs/singular/function.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/function.pxd +87 -0
- sage/libs/singular/function.pyx +1901 -0
- sage/libs/singular/function_factory.py +61 -0
- sage/libs/singular/groebner_strategy.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/groebner_strategy.pxd +22 -0
- sage/libs/singular/groebner_strategy.pyx +582 -0
- sage/libs/singular/option.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/option.pyx +671 -0
- sage/libs/singular/polynomial.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/polynomial.pxd +39 -0
- sage/libs/singular/polynomial.pyx +661 -0
- sage/libs/singular/ring.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/ring.pxd +58 -0
- sage/libs/singular/ring.pyx +893 -0
- sage/libs/singular/singular.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/singular.pxd +72 -0
- sage/libs/singular/singular.pyx +1944 -0
- sage/libs/singular/standard_options.py +145 -0
- sage/matrix/all__sagemath_singular.py +1 -0
- sage/matrix/matrix_mpolynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_mpolynomial_dense.pxd +7 -0
- sage/matrix/matrix_mpolynomial_dense.pyx +615 -0
- sage/rings/all__sagemath_singular.py +1 -0
- sage/rings/function_field/all__sagemath_singular.py +1 -0
- sage/rings/function_field/derivations_polymod.py +911 -0
- sage/rings/function_field/element_polymod.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/function_field/element_polymod.pyx +406 -0
- sage/rings/function_field/function_field_polymod.py +2611 -0
- sage/rings/function_field/ideal_polymod.py +1775 -0
- sage/rings/function_field/order_polymod.py +1475 -0
- sage/rings/function_field/place_polymod.py +681 -0
- sage/rings/polynomial/all__sagemath_singular.py +1 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +5 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +339 -0
- sage/rings/polynomial/multi_polynomial_libsingular.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial_libsingular.pxd +30 -0
- sage/rings/polynomial/multi_polynomial_libsingular.pyx +6277 -0
- sage/rings/polynomial/plural.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/plural.pxd +48 -0
- sage/rings/polynomial/plural.pyx +3171 -0
- sage/symbolic/all__sagemath_singular.py +1 -0
- sage/symbolic/comparison_impl.pxi +428 -0
- sage/symbolic/constants_c_impl.pxi +178 -0
- sage/symbolic/expression.cpython-314-x86_64-linux-musl.so +0 -0
- sage/symbolic/expression.pxd +7 -0
- sage/symbolic/expression.pyx +14200 -0
- sage/symbolic/getitem_impl.pxi +202 -0
- sage/symbolic/pynac.pxi +572 -0
- sage/symbolic/pynac_constant_impl.pxi +133 -0
- sage/symbolic/pynac_function_impl.pxi +206 -0
- sage/symbolic/pynac_impl.pxi +2576 -0
- sage/symbolic/pynac_wrap.h +124 -0
- sage/symbolic/series_impl.pxi +272 -0
- sage/symbolic/substitution_map_impl.pxi +94 -0
- sage_wheels/bin/ESingular +0 -0
- sage_wheels/bin/Singular +0 -0
- sage_wheels/bin/TSingular +0 -0
- sage_wheels/lib/singular/MOD/cohomo.la +41 -0
- sage_wheels/lib/singular/MOD/cohomo.so +0 -0
- sage_wheels/lib/singular/MOD/customstd.la +41 -0
- sage_wheels/lib/singular/MOD/customstd.so +0 -0
- sage_wheels/lib/singular/MOD/freealgebra.la +41 -0
- sage_wheels/lib/singular/MOD/freealgebra.so +0 -0
- sage_wheels/lib/singular/MOD/gfanlib.la +41 -0
- sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
- sage_wheels/lib/singular/MOD/gitfan.la +41 -0
- sage_wheels/lib/singular/MOD/gitfan.so +0 -0
- sage_wheels/lib/singular/MOD/interval.la +41 -0
- sage_wheels/lib/singular/MOD/interval.so +0 -0
- sage_wheels/lib/singular/MOD/loctriv.la +41 -0
- sage_wheels/lib/singular/MOD/loctriv.so +0 -0
- sage_wheels/lib/singular/MOD/machinelearning.la +41 -0
- sage_wheels/lib/singular/MOD/machinelearning.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldQ.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldQ.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldZp.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldZp.so +0 -0
- sage_wheels/lib/singular/MOD/partialgb.la +41 -0
- sage_wheels/lib/singular/MOD/partialgb.so +0 -0
- sage_wheels/lib/singular/MOD/pyobject.la +41 -0
- sage_wheels/lib/singular/MOD/pyobject.so +0 -0
- sage_wheels/lib/singular/MOD/singmathic.la +41 -0
- sage_wheels/lib/singular/MOD/singmathic.so +0 -0
- sage_wheels/lib/singular/MOD/sispasm.la +41 -0
- sage_wheels/lib/singular/MOD/sispasm.so +0 -0
- sage_wheels/lib/singular/MOD/subsets.la +41 -0
- sage_wheels/lib/singular/MOD/subsets.so +0 -0
- sage_wheels/lib/singular/MOD/systhreads.la +41 -0
- sage_wheels/lib/singular/MOD/systhreads.so +0 -0
- sage_wheels/lib/singular/MOD/syzextra.la +41 -0
- sage_wheels/lib/singular/MOD/syzextra.so +0 -0
- sage_wheels/libexec/singular/MOD/change_cost +0 -0
- sage_wheels/libexec/singular/MOD/singularsurf +11 -0
- sage_wheels/libexec/singular/MOD/singularsurf_jupyter +9 -0
- sage_wheels/libexec/singular/MOD/singularsurf_win +10 -0
- sage_wheels/libexec/singular/MOD/solve_IP +0 -0
- sage_wheels/libexec/singular/MOD/surfex +16 -0
- sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
- sage_wheels/share/factory/gftables/10201 +342 -0
- sage_wheels/share/factory/gftables/1024 +37 -0
- sage_wheels/share/factory/gftables/10609 +356 -0
- sage_wheels/share/factory/gftables/11449 +384 -0
- sage_wheels/share/factory/gftables/11881 +398 -0
- sage_wheels/share/factory/gftables/121 +6 -0
- sage_wheels/share/factory/gftables/12167 +408 -0
- sage_wheels/share/factory/gftables/125 +7 -0
- sage_wheels/share/factory/gftables/12769 +428 -0
- sage_wheels/share/factory/gftables/128 +7 -0
- sage_wheels/share/factory/gftables/1331 +47 -0
- sage_wheels/share/factory/gftables/1369 +48 -0
- sage_wheels/share/factory/gftables/14641 +490 -0
- sage_wheels/share/factory/gftables/15625 +523 -0
- sage_wheels/share/factory/gftables/16 +3 -0
- sage_wheels/share/factory/gftables/16129 +540 -0
- sage_wheels/share/factory/gftables/16384 +549 -0
- sage_wheels/share/factory/gftables/16807 +563 -0
- sage_wheels/share/factory/gftables/1681 +58 -0
- sage_wheels/share/factory/gftables/169 +8 -0
- sage_wheels/share/factory/gftables/17161 +574 -0
- sage_wheels/share/factory/gftables/1849 +64 -0
- sage_wheels/share/factory/gftables/18769 +628 -0
- sage_wheels/share/factory/gftables/19321 +646 -0
- sage_wheels/share/factory/gftables/19683 +659 -0
- sage_wheels/share/factory/gftables/2048 +71 -0
- sage_wheels/share/factory/gftables/2187 +75 -0
- sage_wheels/share/factory/gftables/2197 +76 -0
- sage_wheels/share/factory/gftables/2209 +76 -0
- sage_wheels/share/factory/gftables/22201 +742 -0
- sage_wheels/share/factory/gftables/22801 +762 -0
- sage_wheels/share/factory/gftables/2401 +82 -0
- sage_wheels/share/factory/gftables/243 +11 -0
- sage_wheels/share/factory/gftables/24389 +815 -0
- sage_wheels/share/factory/gftables/24649 +824 -0
- sage_wheels/share/factory/gftables/25 +3 -0
- sage_wheels/share/factory/gftables/256 +11 -0
- sage_wheels/share/factory/gftables/26569 +888 -0
- sage_wheels/share/factory/gftables/27 +3 -0
- sage_wheels/share/factory/gftables/27889 +932 -0
- sage_wheels/share/factory/gftables/2809 +96 -0
- sage_wheels/share/factory/gftables/28561 +954 -0
- sage_wheels/share/factory/gftables/289 +12 -0
- sage_wheels/share/factory/gftables/29791 +995 -0
- sage_wheels/share/factory/gftables/29929 +1000 -0
- sage_wheels/share/factory/gftables/3125 +107 -0
- sage_wheels/share/factory/gftables/32 +4 -0
- sage_wheels/share/factory/gftables/32041 +1070 -0
- sage_wheels/share/factory/gftables/32761 +1094 -0
- sage_wheels/share/factory/gftables/32768 +1095 -0
- sage_wheels/share/factory/gftables/343 +14 -0
- sage_wheels/share/factory/gftables/3481 +118 -0
- sage_wheels/share/factory/gftables/361 +14 -0
- sage_wheels/share/factory/gftables/36481 +1218 -0
- sage_wheels/share/factory/gftables/3721 +126 -0
- sage_wheels/share/factory/gftables/37249 +1244 -0
- sage_wheels/share/factory/gftables/38809 +1296 -0
- sage_wheels/share/factory/gftables/39601 +1322 -0
- sage_wheels/share/factory/gftables/4 +3 -0
- sage_wheels/share/factory/gftables/4096 +139 -0
- sage_wheels/share/factory/gftables/44521 +1486 -0
- sage_wheels/share/factory/gftables/4489 +152 -0
- sage_wheels/share/factory/gftables/49 +4 -0
- sage_wheels/share/factory/gftables/4913 +166 -0
- sage_wheels/share/factory/gftables/49729 +1660 -0
- sage_wheels/share/factory/gftables/5041 +170 -0
- sage_wheels/share/factory/gftables/50653 +1691 -0
- sage_wheels/share/factory/gftables/512 +20 -0
- sage_wheels/share/factory/gftables/51529 +1720 -0
- sage_wheels/share/factory/gftables/52441 +1750 -0
- sage_wheels/share/factory/gftables/529 +20 -0
- sage_wheels/share/factory/gftables/5329 +180 -0
- sage_wheels/share/factory/gftables/54289 +1812 -0
- sage_wheels/share/factory/gftables/57121 +1906 -0
- sage_wheels/share/factory/gftables/58081 +1938 -0
- sage_wheels/share/factory/gftables/59049 +1971 -0
- sage_wheels/share/factory/gftables/6241 +210 -0
- sage_wheels/share/factory/gftables/625 +23 -0
- sage_wheels/share/factory/gftables/63001 +2102 -0
- sage_wheels/share/factory/gftables/64 +5 -0
- sage_wheels/share/factory/gftables/6561 +221 -0
- sage_wheels/share/factory/gftables/6859 +231 -0
- sage_wheels/share/factory/gftables/6889 +232 -0
- sage_wheels/share/factory/gftables/729 +27 -0
- sage_wheels/share/factory/gftables/7921 +266 -0
- sage_wheels/share/factory/gftables/8 +3 -0
- sage_wheels/share/factory/gftables/81 +5 -0
- sage_wheels/share/factory/gftables/8192 +276 -0
- sage_wheels/share/factory/gftables/841 +30 -0
- sage_wheels/share/factory/gftables/9 +3 -0
- sage_wheels/share/factory/gftables/9409 +316 -0
- sage_wheels/share/factory/gftables/961 +34 -0
- sage_wheels/share/info/singular.info +191898 -0
- sage_wheels/share/singular/LIB/GND.lib +1359 -0
- sage_wheels/share/singular/LIB/JMBTest.lib +976 -0
- sage_wheels/share/singular/LIB/JMSConst.lib +1363 -0
- sage_wheels/share/singular/LIB/KVequiv.lib +699 -0
- sage_wheels/share/singular/LIB/SingularityDBM.lib +491 -0
- sage_wheels/share/singular/LIB/VecField.lib +1542 -0
- sage_wheels/share/singular/LIB/absfact.lib +959 -0
- sage_wheels/share/singular/LIB/ainvar.lib +730 -0
- sage_wheels/share/singular/LIB/aksaka.lib +419 -0
- sage_wheels/share/singular/LIB/alexpoly.lib +2542 -0
- sage_wheels/share/singular/LIB/algebra.lib +1193 -0
- sage_wheels/share/singular/LIB/all.lib +136 -0
- sage_wheels/share/singular/LIB/arcpoint.lib +514 -0
- sage_wheels/share/singular/LIB/arnold.lib +4553 -0
- sage_wheels/share/singular/LIB/arnoldclassify.lib +2058 -0
- sage_wheels/share/singular/LIB/arr.lib +3486 -0
- sage_wheels/share/singular/LIB/assprimeszerodim.lib +755 -0
- sage_wheels/share/singular/LIB/autgradalg.lib +3361 -0
- sage_wheels/share/singular/LIB/bfun.lib +1964 -0
- sage_wheels/share/singular/LIB/bimodules.lib +774 -0
- sage_wheels/share/singular/LIB/brillnoether.lib +226 -0
- sage_wheels/share/singular/LIB/brnoeth.lib +5017 -0
- sage_wheels/share/singular/LIB/central.lib +2169 -0
- sage_wheels/share/singular/LIB/chern.lib +4162 -0
- sage_wheels/share/singular/LIB/cimonom.lib +571 -0
- sage_wheels/share/singular/LIB/cisimplicial.lib +1835 -0
- sage_wheels/share/singular/LIB/classify.lib +3239 -0
- sage_wheels/share/singular/LIB/classify2.lib +1462 -0
- sage_wheels/share/singular/LIB/classifyMapGerms.lib +1515 -0
- sage_wheels/share/singular/LIB/classify_aeq.lib +3253 -0
- sage_wheels/share/singular/LIB/classifyceq.lib +2092 -0
- sage_wheels/share/singular/LIB/classifyci.lib +1133 -0
- sage_wheels/share/singular/LIB/combinat.lib +91 -0
- sage_wheels/share/singular/LIB/compregb.lib +276 -0
- sage_wheels/share/singular/LIB/control.lib +1636 -0
- sage_wheels/share/singular/LIB/crypto.lib +3795 -0
- sage_wheels/share/singular/LIB/curveInv.lib +667 -0
- sage_wheels/share/singular/LIB/curvepar.lib +1817 -0
- sage_wheels/share/singular/LIB/customstd.lib +100 -0
- sage_wheels/share/singular/LIB/deRham.lib +5979 -0
- sage_wheels/share/singular/LIB/decodegb.lib +2134 -0
- sage_wheels/share/singular/LIB/decomp.lib +1655 -0
- sage_wheels/share/singular/LIB/deflation.lib +872 -0
- sage_wheels/share/singular/LIB/deform.lib +925 -0
- sage_wheels/share/singular/LIB/difform.lib +3055 -0
- sage_wheels/share/singular/LIB/divisors.lib +750 -0
- sage_wheels/share/singular/LIB/dmod.lib +5817 -0
- sage_wheels/share/singular/LIB/dmodapp.lib +3269 -0
- sage_wheels/share/singular/LIB/dmodideal.lib +1211 -0
- sage_wheels/share/singular/LIB/dmodloc.lib +2645 -0
- sage_wheels/share/singular/LIB/dmodvar.lib +818 -0
- sage_wheels/share/singular/LIB/dummy.lib +17 -0
- sage_wheels/share/singular/LIB/elim.lib +1009 -0
- sage_wheels/share/singular/LIB/ellipticcovers.lib +548 -0
- sage_wheels/share/singular/LIB/enumpoints.lib +146 -0
- sage_wheels/share/singular/LIB/equising.lib +2127 -0
- sage_wheels/share/singular/LIB/ffmodstd.lib +2384 -0
- sage_wheels/share/singular/LIB/ffsolve.lib +1289 -0
- sage_wheels/share/singular/LIB/findifs.lib +778 -0
- sage_wheels/share/singular/LIB/finitediff.lib +1768 -0
- sage_wheels/share/singular/LIB/finvar.lib +7989 -0
- sage_wheels/share/singular/LIB/fpadim.lib +2429 -0
- sage_wheels/share/singular/LIB/fpalgebras.lib +1666 -0
- sage_wheels/share/singular/LIB/fpaprops.lib +1462 -0
- sage_wheels/share/singular/LIB/freegb.lib +3853 -0
- sage_wheels/share/singular/LIB/general.lib +1350 -0
- sage_wheels/share/singular/LIB/gfan.lib +1768 -0
- sage_wheels/share/singular/LIB/gitfan.lib +3130 -0
- sage_wheels/share/singular/LIB/gkdim.lib +99 -0
- sage_wheels/share/singular/LIB/gmspoly.lib +589 -0
- sage_wheels/share/singular/LIB/gmssing.lib +1739 -0
- sage_wheels/share/singular/LIB/goettsche.lib +909 -0
- sage_wheels/share/singular/LIB/graal.lib +1366 -0
- sage_wheels/share/singular/LIB/gradedModules.lib +2541 -0
- sage_wheels/share/singular/LIB/graphics.lib +360 -0
- sage_wheels/share/singular/LIB/grobcov.lib +7706 -0
- sage_wheels/share/singular/LIB/groups.lib +1123 -0
- sage_wheels/share/singular/LIB/grwalk.lib +507 -0
- sage_wheels/share/singular/LIB/hdepth.lib +194 -0
- sage_wheels/share/singular/LIB/help.cnf +57 -0
- sage_wheels/share/singular/LIB/hess.lib +1946 -0
- sage_wheels/share/singular/LIB/hnoether.lib +4292 -0
- sage_wheels/share/singular/LIB/hodge.lib +400 -0
- sage_wheels/share/singular/LIB/homolog.lib +1965 -0
- sage_wheels/share/singular/LIB/hyperel.lib +975 -0
- sage_wheels/share/singular/LIB/inout.lib +679 -0
- sage_wheels/share/singular/LIB/integralbasis.lib +6224 -0
- sage_wheels/share/singular/LIB/interval.lib +1418 -0
- sage_wheels/share/singular/LIB/intprog.lib +778 -0
- sage_wheels/share/singular/LIB/invar.lib +443 -0
- sage_wheels/share/singular/LIB/involut.lib +980 -0
- sage_wheels/share/singular/LIB/jacobson.lib +1215 -0
- sage_wheels/share/singular/LIB/kskernel.lib +534 -0
- sage_wheels/share/singular/LIB/latex.lib +3146 -0
- sage_wheels/share/singular/LIB/lejeune.lib +651 -0
- sage_wheels/share/singular/LIB/linalg.lib +2040 -0
- sage_wheels/share/singular/LIB/locnormal.lib +212 -0
- sage_wheels/share/singular/LIB/lrcalc.lib +526 -0
- sage_wheels/share/singular/LIB/makedbm.lib +294 -0
- sage_wheels/share/singular/LIB/mathml.lib +813 -0
- sage_wheels/share/singular/LIB/matrix.lib +1372 -0
- sage_wheels/share/singular/LIB/maxlike.lib +1132 -0
- sage_wheels/share/singular/LIB/methods.lib +212 -0
- sage_wheels/share/singular/LIB/moddiq.lib +322 -0
- sage_wheels/share/singular/LIB/modfinduni.lib +181 -0
- sage_wheels/share/singular/LIB/modnormal.lib +218 -0
- sage_wheels/share/singular/LIB/modprimdec.lib +1278 -0
- sage_wheels/share/singular/LIB/modquotient.lib +269 -0
- sage_wheels/share/singular/LIB/modstd.lib +1024 -0
- sage_wheels/share/singular/LIB/modular.lib +545 -0
- sage_wheels/share/singular/LIB/modules.lib +2561 -0
- sage_wheels/share/singular/LIB/modwalk.lib +609 -0
- sage_wheels/share/singular/LIB/mondromy.lib +1016 -0
- sage_wheels/share/singular/LIB/monomialideal.lib +3851 -0
- sage_wheels/share/singular/LIB/mprimdec.lib +2353 -0
- sage_wheels/share/singular/LIB/mregular.lib +1863 -0
- sage_wheels/share/singular/LIB/multigrading.lib +5629 -0
- sage_wheels/share/singular/LIB/ncHilb.lib +777 -0
- sage_wheels/share/singular/LIB/ncModslimgb.lib +791 -0
- sage_wheels/share/singular/LIB/ncalg.lib +16311 -0
- sage_wheels/share/singular/LIB/ncall.lib +31 -0
- sage_wheels/share/singular/LIB/ncdecomp.lib +468 -0
- sage_wheels/share/singular/LIB/ncfactor.lib +13371 -0
- sage_wheels/share/singular/LIB/ncfrac.lib +1023 -0
- sage_wheels/share/singular/LIB/nchilbert.lib +448 -0
- sage_wheels/share/singular/LIB/nchomolog.lib +759 -0
- sage_wheels/share/singular/LIB/ncloc.lib +361 -0
- sage_wheels/share/singular/LIB/ncpreim.lib +795 -0
- sage_wheels/share/singular/LIB/ncrat.lib +2849 -0
- sage_wheels/share/singular/LIB/nctools.lib +1887 -0
- sage_wheels/share/singular/LIB/nets.lib +1456 -0
- sage_wheels/share/singular/LIB/nfmodstd.lib +1000 -0
- sage_wheels/share/singular/LIB/nfmodsyz.lib +732 -0
- sage_wheels/share/singular/LIB/noether.lib +1106 -0
- sage_wheels/share/singular/LIB/normal.lib +8700 -0
- sage_wheels/share/singular/LIB/normaliz.lib +2226 -0
- sage_wheels/share/singular/LIB/ntsolve.lib +362 -0
- sage_wheels/share/singular/LIB/numerAlg.lib +560 -0
- sage_wheels/share/singular/LIB/numerDecom.lib +2261 -0
- sage_wheels/share/singular/LIB/olga.lib +1933 -0
- sage_wheels/share/singular/LIB/orbitparam.lib +351 -0
- sage_wheels/share/singular/LIB/parallel.lib +319 -0
- sage_wheels/share/singular/LIB/paraplanecurves.lib +3110 -0
- sage_wheels/share/singular/LIB/perron.lib +202 -0
- sage_wheels/share/singular/LIB/pfd.lib +2223 -0
- sage_wheels/share/singular/LIB/phindex.lib +642 -0
- sage_wheels/share/singular/LIB/pointid.lib +673 -0
- sage_wheels/share/singular/LIB/polybori.lib +1430 -0
- sage_wheels/share/singular/LIB/polyclass.lib +525 -0
- sage_wheels/share/singular/LIB/polylib.lib +1174 -0
- sage_wheels/share/singular/LIB/polymake.lib +1902 -0
- sage_wheels/share/singular/LIB/presolve.lib +1533 -0
- sage_wheels/share/singular/LIB/primdec.lib +9576 -0
- sage_wheels/share/singular/LIB/primdecint.lib +1782 -0
- sage_wheels/share/singular/LIB/primitiv.lib +401 -0
- sage_wheels/share/singular/LIB/puiseuxexpansions.lib +1631 -0
- sage_wheels/share/singular/LIB/purityfiltration.lib +960 -0
- sage_wheels/share/singular/LIB/qhmoduli.lib +1561 -0
- sage_wheels/share/singular/LIB/qmatrix.lib +293 -0
- sage_wheels/share/singular/LIB/random.lib +455 -0
- sage_wheels/share/singular/LIB/ratgb.lib +489 -0
- sage_wheels/share/singular/LIB/realclassify.lib +5759 -0
- sage_wheels/share/singular/LIB/realizationMatroids.lib +772 -0
- sage_wheels/share/singular/LIB/realrad.lib +1197 -0
- sage_wheels/share/singular/LIB/recover.lib +2628 -0
- sage_wheels/share/singular/LIB/redcgs.lib +3984 -0
- sage_wheels/share/singular/LIB/reesclos.lib +465 -0
- sage_wheels/share/singular/LIB/resbinomial.lib +2802 -0
- sage_wheels/share/singular/LIB/resgraph.lib +789 -0
- sage_wheels/share/singular/LIB/resjung.lib +820 -0
- sage_wheels/share/singular/LIB/resolve.lib +5110 -0
- sage_wheels/share/singular/LIB/resources.lib +170 -0
- sage_wheels/share/singular/LIB/reszeta.lib +5473 -0
- sage_wheels/share/singular/LIB/ring.lib +1328 -0
- sage_wheels/share/singular/LIB/ringgb.lib +343 -0
- sage_wheels/share/singular/LIB/rinvar.lib +1153 -0
- sage_wheels/share/singular/LIB/rootisolation.lib +1481 -0
- sage_wheels/share/singular/LIB/rootsmr.lib +709 -0
- sage_wheels/share/singular/LIB/rootsur.lib +886 -0
- sage_wheels/share/singular/LIB/rstandard.lib +607 -0
- sage_wheels/share/singular/LIB/rwalk.lib +336 -0
- sage_wheels/share/singular/LIB/sagbi.lib +1353 -0
- sage_wheels/share/singular/LIB/sagbiNormaliz.lib +1622 -0
- sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
- sage_wheels/share/singular/LIB/sagbigrob.lib +449 -0
- sage_wheels/share/singular/LIB/schreyer.lib +321 -0
- sage_wheels/share/singular/LIB/schubert.lib +2551 -0
- sage_wheels/share/singular/LIB/sets.lib +524 -0
- sage_wheels/share/singular/LIB/sheafcoh.lib +1663 -0
- sage_wheels/share/singular/LIB/signcond.lib +437 -0
- sage_wheels/share/singular/LIB/sing.lib +1094 -0
- sage_wheels/share/singular/LIB/sing4ti2.lib +419 -0
- sage_wheels/share/singular/LIB/solve.lib +2243 -0
- sage_wheels/share/singular/LIB/spcurve.lib +1077 -0
- sage_wheels/share/singular/LIB/spectrum.lib +62 -0
- sage_wheels/share/singular/LIB/sresext.lib +757 -0
- sage_wheels/share/singular/LIB/ssi.lib +143 -0
- sage_wheels/share/singular/LIB/standard.lib +2769 -0
- sage_wheels/share/singular/LIB/stanleyreisner.lib +473 -0
- sage_wheels/share/singular/LIB/stdmodule.lib +547 -0
- sage_wheels/share/singular/LIB/stratify.lib +1070 -0
- sage_wheels/share/singular/LIB/surf.lib +506 -0
- sage_wheels/share/singular/LIB/surf_jupyter.lib +223 -0
- sage_wheels/share/singular/LIB/surfacesignature.lib +522 -0
- sage_wheels/share/singular/LIB/surfex.lib +1462 -0
- sage_wheels/share/singular/LIB/swalk.lib +877 -0
- sage_wheels/share/singular/LIB/symodstd.lib +1570 -0
- sage_wheels/share/singular/LIB/systhreads.lib +74 -0
- sage_wheels/share/singular/LIB/tasks.lib +1324 -0
- sage_wheels/share/singular/LIB/tateProdCplxNegGrad.lib +2412 -0
- sage_wheels/share/singular/LIB/teachstd.lib +858 -0
- sage_wheels/share/singular/LIB/template.lib +116 -0
- sage_wheels/share/singular/LIB/toric.lib +1119 -0
- sage_wheels/share/singular/LIB/transformation.lib +116 -0
- sage_wheels/share/singular/LIB/triang.lib +1197 -0
- sage_wheels/share/singular/LIB/tropical.lib +8741 -0
- sage_wheels/share/singular/LIB/tropicalEllipticCovers.lib +2922 -0
- sage_wheels/share/singular/LIB/tropicalNewton.lib +1128 -0
- sage_wheels/share/singular/LIB/tst.lib +1108 -0
- sage_wheels/share/singular/LIB/weierstr.lib +241 -0
- sage_wheels/share/singular/LIB/zeroset.lib +1478 -0
- sage_wheels/share/singular/emacs/.emacs-general +184 -0
- sage_wheels/share/singular/emacs/.emacs-singular +234 -0
- sage_wheels/share/singular/emacs/COPYING +44 -0
- sage_wheels/share/singular/emacs/cmd-cmpl.el +241 -0
- sage_wheels/share/singular/emacs/ex-cmpl.el +1681 -0
- sage_wheels/share/singular/emacs/hlp-cmpl.el +4318 -0
- sage_wheels/share/singular/emacs/lib-cmpl.el +179 -0
- sage_wheels/share/singular/emacs/singular.el +4273 -0
- sage_wheels/share/singular/emacs/singular.xpm +39 -0
- sage_wheels/share/singular/singular.idx +5002 -0
|
@@ -0,0 +1,1775 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-singular
|
|
2
|
+
# sage.doctest: needs sage.rings.function_field
|
|
3
|
+
r"""
|
|
4
|
+
Ideals of function fields: extension
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
# ****************************************************************************
|
|
8
|
+
# Copyright (C) 2010 William Stein <wstein@gmail.com>
|
|
9
|
+
# 2011 Maarten Derickx <m.derickx.student@gmail.com>
|
|
10
|
+
# 2017-2021 Kwankyu Lee
|
|
11
|
+
# 2018 Frédéric Chapoton
|
|
12
|
+
# 2019 Brent Baccala
|
|
13
|
+
# 2021 Jonathan Kliem
|
|
14
|
+
#
|
|
15
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
16
|
+
# as published by the Free Software Foundation; either version 2 of
|
|
17
|
+
# the License, or (at your option) any later version.
|
|
18
|
+
# http://www.gnu.org/licenses/
|
|
19
|
+
# ****************************************************************************
|
|
20
|
+
|
|
21
|
+
import itertools
|
|
22
|
+
from sage.rings.infinity import infinity
|
|
23
|
+
from sage.arith.power import generic_power
|
|
24
|
+
from sage.misc.cachefunc import cached_method
|
|
25
|
+
from sage.misc.lazy_attribute import lazy_attribute
|
|
26
|
+
from sage.structure.richcmp import richcmp
|
|
27
|
+
from sage.matrix.constructor import matrix
|
|
28
|
+
|
|
29
|
+
from .ideal import FunctionFieldIdeal, FunctionFieldIdealInfinite
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class FunctionFieldIdeal_polymod(FunctionFieldIdeal):
|
|
33
|
+
"""
|
|
34
|
+
Fractional ideals of algebraic function fields.
|
|
35
|
+
|
|
36
|
+
INPUT:
|
|
37
|
+
|
|
38
|
+
- ``ring`` -- order in a function field
|
|
39
|
+
|
|
40
|
+
- ``hnf`` -- matrix in hermite normal form
|
|
41
|
+
|
|
42
|
+
- ``denominator`` -- denominator
|
|
43
|
+
|
|
44
|
+
The rows of ``hnf`` is a basis of the ideal, which itself is
|
|
45
|
+
``denominator`` times the fractional ideal.
|
|
46
|
+
|
|
47
|
+
EXAMPLES::
|
|
48
|
+
|
|
49
|
+
sage: # needs sage.rings.finite_rings
|
|
50
|
+
sage: K.<x> = FunctionField(GF(2)); R.<y> = K[]
|
|
51
|
+
sage: L.<y> = K.extension(y^2 - x^3*y - x)
|
|
52
|
+
sage: O = L.maximal_order()
|
|
53
|
+
sage: O.ideal(y)
|
|
54
|
+
Ideal (y) of Maximal order of Function field in y defined by y^2 + x^3*y + x
|
|
55
|
+
"""
|
|
56
|
+
def __init__(self, ring, hnf, denominator=1):
|
|
57
|
+
"""
|
|
58
|
+
Initialize.
|
|
59
|
+
|
|
60
|
+
TESTS::
|
|
61
|
+
|
|
62
|
+
sage: # needs sage.rings.finite_rings
|
|
63
|
+
sage: K.<x> = FunctionField(GF(2)); R.<y> = K[]
|
|
64
|
+
sage: L.<y> = K.extension(y^2 - x^3*y - x)
|
|
65
|
+
sage: O = L.maximal_order()
|
|
66
|
+
sage: I = O.ideal(y)
|
|
67
|
+
sage: TestSuite(I).run()
|
|
68
|
+
"""
|
|
69
|
+
FunctionFieldIdeal.__init__(self, ring)
|
|
70
|
+
|
|
71
|
+
# the denominator and the entries of the hnf are
|
|
72
|
+
# univariate polynomials.
|
|
73
|
+
self._hnf = hnf
|
|
74
|
+
self._denominator = denominator
|
|
75
|
+
|
|
76
|
+
# for prime ideals
|
|
77
|
+
self._relative_degree = None
|
|
78
|
+
self._ramification_index = None
|
|
79
|
+
self._prime_below = None
|
|
80
|
+
self._beta = None
|
|
81
|
+
|
|
82
|
+
# beta in matrix form for fast multiplication
|
|
83
|
+
self._beta_matrix = None
|
|
84
|
+
|
|
85
|
+
# (p, q) with irreducible polynomial p and q an element of O in vector
|
|
86
|
+
# form, together generating the prime ideal. This data is obtained by
|
|
87
|
+
# Kummer's theorem when this prime ideal is constructed. This is used
|
|
88
|
+
# for fast multiplication with other ideal.
|
|
89
|
+
self._kummer_form = None
|
|
90
|
+
|
|
91
|
+
# tuple of at most two gens:
|
|
92
|
+
# the first gen is an element of the base ring of the maximal order
|
|
93
|
+
# the second gen is the vector form of an element of the maximal order
|
|
94
|
+
# if the second gen is zero, the tuple has only the first gen.
|
|
95
|
+
self._gens_two_vecs = None
|
|
96
|
+
|
|
97
|
+
def __bool__(self):
|
|
98
|
+
"""
|
|
99
|
+
Test if this ideal is zero.
|
|
100
|
+
|
|
101
|
+
EXAMPLES::
|
|
102
|
+
|
|
103
|
+
sage: # needs sage.rings.finite_rings
|
|
104
|
+
sage: K.<x> = FunctionField(GF(2)); R.<y> = K[]
|
|
105
|
+
sage: L.<y> = K.extension(y^2 - x^3*y - x)
|
|
106
|
+
sage: O = L.maximal_order()
|
|
107
|
+
sage: I = O.ideal(y); I
|
|
108
|
+
Ideal (y) of Maximal order of Function field in y defined by y^2 + x^3*y + x
|
|
109
|
+
sage: I.is_zero()
|
|
110
|
+
False
|
|
111
|
+
sage: J = 0*I; J
|
|
112
|
+
Zero ideal of Maximal order of Function field in y defined by y^2 + x^3*y + x
|
|
113
|
+
sage: J.is_zero()
|
|
114
|
+
True
|
|
115
|
+
|
|
116
|
+
sage: # needs sage.rings.finite_rings
|
|
117
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y>=K[]
|
|
118
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
119
|
+
sage: O = L.maximal_order()
|
|
120
|
+
sage: I = O.ideal(y); I
|
|
121
|
+
Ideal (y) of Maximal order of Function field in y
|
|
122
|
+
defined by y^2 + y + (x^2 + 1)/x
|
|
123
|
+
sage: I.is_zero()
|
|
124
|
+
False
|
|
125
|
+
sage: J = 0*I; J
|
|
126
|
+
Zero ideal of Maximal order of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
127
|
+
sage: J.is_zero()
|
|
128
|
+
True
|
|
129
|
+
"""
|
|
130
|
+
return self._hnf.nrows() != 0
|
|
131
|
+
|
|
132
|
+
def __hash__(self):
|
|
133
|
+
"""
|
|
134
|
+
Return the hash of this ideal.
|
|
135
|
+
|
|
136
|
+
EXAMPLES::
|
|
137
|
+
|
|
138
|
+
sage: # needs sage.rings.finite_rings
|
|
139
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
140
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
141
|
+
sage: O = L.maximal_order()
|
|
142
|
+
sage: I = O.ideal(1/y)
|
|
143
|
+
sage: { I: 2 }[I] == 2
|
|
144
|
+
True
|
|
145
|
+
|
|
146
|
+
sage: # needs sage.rings.finite_rings
|
|
147
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
148
|
+
sage: O = L.maximal_order()
|
|
149
|
+
sage: I = O.ideal(1/y)
|
|
150
|
+
sage: { I: 2 }[I] == 2
|
|
151
|
+
True
|
|
152
|
+
"""
|
|
153
|
+
return hash((self._ring, self._hnf, self._denominator))
|
|
154
|
+
|
|
155
|
+
def __contains__(self, x):
|
|
156
|
+
"""
|
|
157
|
+
Return ``True`` if ``x`` is in this ideal.
|
|
158
|
+
|
|
159
|
+
EXAMPLES::
|
|
160
|
+
|
|
161
|
+
sage: # needs sage.rings.finite_rings
|
|
162
|
+
sage: K.<x> = FunctionField(GF(7)); _.<Y> = K[]
|
|
163
|
+
sage: L.<y> = K.extension(Y^2 - x^3 - 1)
|
|
164
|
+
sage: O = L.maximal_order()
|
|
165
|
+
sage: I = O.ideal([y]); I
|
|
166
|
+
Ideal (y) of Maximal order of Function field in y
|
|
167
|
+
defined by y^2 + 6*x^3 + 6
|
|
168
|
+
sage: x * y in I
|
|
169
|
+
True
|
|
170
|
+
sage: y / x in I
|
|
171
|
+
False
|
|
172
|
+
sage: y^2 - 2 in I
|
|
173
|
+
False
|
|
174
|
+
|
|
175
|
+
sage: # needs sage.rings.finite_rings
|
|
176
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
177
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
178
|
+
sage: O = L.maximal_order()
|
|
179
|
+
sage: I = O.ideal([y]); I
|
|
180
|
+
Ideal (y) of Maximal order of Function field in y
|
|
181
|
+
defined by y^2 + y + (x^2 + 1)/x
|
|
182
|
+
sage: x * y in I
|
|
183
|
+
True
|
|
184
|
+
sage: y / x in I
|
|
185
|
+
False
|
|
186
|
+
sage: y^2 - 2 in I
|
|
187
|
+
False
|
|
188
|
+
|
|
189
|
+
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
|
|
190
|
+
sage: L.<y> = K.extension(Y^2 - x^3 - 1)
|
|
191
|
+
sage: O = L.maximal_order()
|
|
192
|
+
sage: I = O.ideal([y]); I
|
|
193
|
+
Ideal (y) of Maximal order of Function field in y
|
|
194
|
+
defined by y^2 - x^3 - 1
|
|
195
|
+
sage: x * y in I
|
|
196
|
+
True
|
|
197
|
+
sage: y / x in I
|
|
198
|
+
False
|
|
199
|
+
sage: y^2 - 2 in I
|
|
200
|
+
False
|
|
201
|
+
|
|
202
|
+
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
|
|
203
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
204
|
+
sage: O = L.maximal_order()
|
|
205
|
+
sage: I = O.ideal([y]); I
|
|
206
|
+
Ideal (y) of Maximal order of Function field in y
|
|
207
|
+
defined by y^2 + y + (x^2 + 1)/x
|
|
208
|
+
sage: x * y in I
|
|
209
|
+
True
|
|
210
|
+
sage: y / x in I
|
|
211
|
+
False
|
|
212
|
+
sage: y^2 - 2 in I
|
|
213
|
+
False
|
|
214
|
+
"""
|
|
215
|
+
from sage.modules.free_module_element import vector
|
|
216
|
+
|
|
217
|
+
vec = self.ring().coordinate_vector(self._denominator * x)
|
|
218
|
+
v = []
|
|
219
|
+
for e in vec:
|
|
220
|
+
if e.denominator() != 1:
|
|
221
|
+
return False
|
|
222
|
+
v.append(e.numerator())
|
|
223
|
+
vec = vector(v)
|
|
224
|
+
return vec in self._hnf.image()
|
|
225
|
+
|
|
226
|
+
def __invert__(self):
|
|
227
|
+
"""
|
|
228
|
+
Return the inverse fractional ideal of this ideal.
|
|
229
|
+
|
|
230
|
+
EXAMPLES::
|
|
231
|
+
|
|
232
|
+
sage: # needs sage.rings.finite_rings
|
|
233
|
+
sage: K.<x> = FunctionField(GF(7)); _.<Y> = K[]
|
|
234
|
+
sage: L.<y> = K.extension(Y^2 - x^3 - 1)
|
|
235
|
+
sage: O = L.maximal_order()
|
|
236
|
+
sage: I = O.ideal(y)
|
|
237
|
+
sage: ~I
|
|
238
|
+
Ideal ((1/(x^3 + 1))*y) of Maximal order of Function field in y defined by y^2 + 6*x^3 + 6
|
|
239
|
+
sage: I^(-1)
|
|
240
|
+
Ideal ((1/(x^3 + 1))*y) of Maximal order of Function field in y defined by y^2 + 6*x^3 + 6
|
|
241
|
+
sage: ~I * I
|
|
242
|
+
Ideal (1) of Maximal order of Function field in y defined by y^2 + 6*x^3 + 6
|
|
243
|
+
|
|
244
|
+
::
|
|
245
|
+
|
|
246
|
+
sage: # needs sage.rings.finite_rings
|
|
247
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
248
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
249
|
+
sage: O = L.maximal_order()
|
|
250
|
+
sage: I = O.ideal(y)
|
|
251
|
+
sage: ~I
|
|
252
|
+
Ideal ((x/(x^2 + 1))*y + x/(x^2 + 1)) of Maximal order
|
|
253
|
+
of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
254
|
+
sage: I^(-1)
|
|
255
|
+
Ideal ((x/(x^2 + 1))*y + x/(x^2 + 1)) of Maximal order
|
|
256
|
+
of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
257
|
+
sage: ~I * I
|
|
258
|
+
Ideal (1) of Maximal order of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
259
|
+
|
|
260
|
+
::
|
|
261
|
+
|
|
262
|
+
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
|
|
263
|
+
sage: L.<y> = K.extension(Y^2 - x^3 - 1)
|
|
264
|
+
sage: O = L.maximal_order()
|
|
265
|
+
sage: I = O.ideal(y)
|
|
266
|
+
sage: ~I
|
|
267
|
+
Ideal ((1/(x^3 + 1))*y) of Maximal order of Function field in y defined by y^2 - x^3 - 1
|
|
268
|
+
sage: I^(-1)
|
|
269
|
+
Ideal ((1/(x^3 + 1))*y) of Maximal order of Function field in y defined by y^2 - x^3 - 1
|
|
270
|
+
sage: ~I * I
|
|
271
|
+
Ideal (1) of Maximal order of Function field in y defined by y^2 - x^3 - 1
|
|
272
|
+
|
|
273
|
+
::
|
|
274
|
+
|
|
275
|
+
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
|
|
276
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
277
|
+
sage: O = L.maximal_order()
|
|
278
|
+
sage: I = O.ideal(y)
|
|
279
|
+
sage: ~I
|
|
280
|
+
Ideal ((x/(x^2 + 1))*y + x/(x^2 + 1)) of Maximal order
|
|
281
|
+
of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
282
|
+
sage: I^(-1)
|
|
283
|
+
Ideal ((x/(x^2 + 1))*y + x/(x^2 + 1)) of Maximal order
|
|
284
|
+
of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
285
|
+
sage: ~I * I
|
|
286
|
+
Ideal (1) of Maximal order of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
287
|
+
"""
|
|
288
|
+
R = self.ring()
|
|
289
|
+
T = R._codifferent_matrix()
|
|
290
|
+
I = self * R.codifferent()
|
|
291
|
+
J = I._denominator * (I._hnf * T).inverse()
|
|
292
|
+
return R._ideal_from_vectors(J.columns())
|
|
293
|
+
|
|
294
|
+
def _richcmp_(self, other, op):
|
|
295
|
+
"""
|
|
296
|
+
Compare this ideal with the other ideal with respect to ``op``.
|
|
297
|
+
|
|
298
|
+
INPUT:
|
|
299
|
+
|
|
300
|
+
- ``other`` -- ideal
|
|
301
|
+
|
|
302
|
+
- ``op`` -- comparison operator
|
|
303
|
+
|
|
304
|
+
EXAMPLES::
|
|
305
|
+
|
|
306
|
+
sage: # needs sage.rings.finite_rings
|
|
307
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
308
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
309
|
+
sage: O = L.maximal_order()
|
|
310
|
+
sage: I = O.ideal(1/y)
|
|
311
|
+
sage: I == I + I
|
|
312
|
+
True
|
|
313
|
+
sage: I == I * I
|
|
314
|
+
False
|
|
315
|
+
|
|
316
|
+
::
|
|
317
|
+
|
|
318
|
+
sage: # needs sage.rings.finite_rings
|
|
319
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
320
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
321
|
+
sage: O = L.maximal_order()
|
|
322
|
+
sage: I = O.ideal(1/y)
|
|
323
|
+
sage: I == I + I
|
|
324
|
+
True
|
|
325
|
+
sage: I == I * I
|
|
326
|
+
False
|
|
327
|
+
sage: I < I * I
|
|
328
|
+
True
|
|
329
|
+
sage: I > I * I
|
|
330
|
+
False
|
|
331
|
+
"""
|
|
332
|
+
return richcmp((self._denominator, self._hnf), (other._denominator, other._hnf), op)
|
|
333
|
+
|
|
334
|
+
def _add_(self, other):
|
|
335
|
+
"""
|
|
336
|
+
Add with other ideal.
|
|
337
|
+
|
|
338
|
+
EXAMPLES::
|
|
339
|
+
|
|
340
|
+
sage: # needs sage.rings.finite_rings
|
|
341
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
342
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
343
|
+
sage: O = L.maximal_order()
|
|
344
|
+
sage: I = O.ideal(y)
|
|
345
|
+
sage: J = O.ideal(x + y)
|
|
346
|
+
sage: I + J
|
|
347
|
+
Ideal (y) of Maximal order of Function field in y defined by y^2 + x^3*y + x
|
|
348
|
+
|
|
349
|
+
sage: # needs sage.rings.finite_rings
|
|
350
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
351
|
+
sage: O = L.maximal_order()
|
|
352
|
+
sage: I = O.ideal(y)
|
|
353
|
+
sage: J = O.ideal(x + y)
|
|
354
|
+
sage: I + J
|
|
355
|
+
Ideal (1, y) of Maximal order of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
356
|
+
"""
|
|
357
|
+
ds = self._denominator
|
|
358
|
+
do = other._denominator
|
|
359
|
+
vecs1 = [do * r for r in self._hnf]
|
|
360
|
+
vecs2 = [ds * r for r in other._hnf]
|
|
361
|
+
return self._ring._ideal_from_vectors_and_denominator(vecs1 + vecs2, ds * do)
|
|
362
|
+
|
|
363
|
+
def _mul_(self, other):
|
|
364
|
+
"""
|
|
365
|
+
Multiply with other ideal.
|
|
366
|
+
|
|
367
|
+
EXAMPLES::
|
|
368
|
+
|
|
369
|
+
sage: # needs sage.rings.finite_rings
|
|
370
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
371
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
372
|
+
sage: O = L.maximal_order()
|
|
373
|
+
sage: I = O.ideal(y)
|
|
374
|
+
sage: J = O.ideal(x + y)
|
|
375
|
+
sage: I * J
|
|
376
|
+
Ideal (x^4 + x^2 + x, x*y + x^2) of Maximal order
|
|
377
|
+
of Function field in y defined by y^2 + x^3*y + x
|
|
378
|
+
|
|
379
|
+
sage: # needs sage.rings.finite_rings
|
|
380
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
381
|
+
sage: O = L.maximal_order()
|
|
382
|
+
sage: I = O.ideal(y)
|
|
383
|
+
sage: J = O.ideal(x + y)
|
|
384
|
+
sage: I * J
|
|
385
|
+
Ideal ((x + 1)*y + (x^2 + 1)/x) of Maximal order
|
|
386
|
+
of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
387
|
+
"""
|
|
388
|
+
O = self._ring
|
|
389
|
+
mul = O._mul_vecs
|
|
390
|
+
|
|
391
|
+
if self._kummer_form is not None:
|
|
392
|
+
p, q = self._kummer_form
|
|
393
|
+
vecs = list(p * other._hnf) + [mul(q, v) for v in other._hnf]
|
|
394
|
+
elif other._kummer_form is not None:
|
|
395
|
+
p, q = other._kummer_form
|
|
396
|
+
vecs = list(p * self._hnf) + [mul(q, v) for v in self._hnf]
|
|
397
|
+
elif self._gens_two_vecs is not None:
|
|
398
|
+
if len(self._gens_two_vecs) == 1:
|
|
399
|
+
g1, = self._gens_two_vecs
|
|
400
|
+
vecs = list(g1 * other._hnf)
|
|
401
|
+
else:
|
|
402
|
+
g1, g2 = self._gens_two_vecs
|
|
403
|
+
vecs = list(g1 * other._hnf) + [mul(g2, v) for v in other._hnf]
|
|
404
|
+
elif other._gens_two_vecs is not None:
|
|
405
|
+
if len(other._gens_two_vecs) == 1:
|
|
406
|
+
g1, = other._gens_two_vecs
|
|
407
|
+
vecs = list(g1 * self._hnf)
|
|
408
|
+
else:
|
|
409
|
+
g1, g2 = other._gens_two_vecs
|
|
410
|
+
vecs = list(g1 * self._hnf) + [mul(g2, v) for v in self._hnf]
|
|
411
|
+
else:
|
|
412
|
+
vecs = [mul(r1, r2) for r1 in self._hnf for r2 in other._hnf]
|
|
413
|
+
|
|
414
|
+
return O._ideal_from_vectors_and_denominator(vecs, self._denominator * other._denominator)
|
|
415
|
+
|
|
416
|
+
def _acted_upon_(self, other, on_left):
|
|
417
|
+
"""
|
|
418
|
+
Multiply ``other`` and this ideal on the right.
|
|
419
|
+
|
|
420
|
+
EXAMPLES::
|
|
421
|
+
|
|
422
|
+
sage: # needs sage.rings.finite_rings
|
|
423
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
424
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
425
|
+
sage: O = L.maximal_order()
|
|
426
|
+
sage: I = O.ideal(x + y)
|
|
427
|
+
sage: J = O.ideal(x)
|
|
428
|
+
sage: x * I == I * J
|
|
429
|
+
True
|
|
430
|
+
|
|
431
|
+
sage: # needs sage.rings.finite_rings
|
|
432
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
433
|
+
sage: O = L.maximal_order()
|
|
434
|
+
sage: I = O.ideal(x + y)
|
|
435
|
+
sage: J = O.ideal(x)
|
|
436
|
+
sage: x * I == I * J
|
|
437
|
+
True
|
|
438
|
+
"""
|
|
439
|
+
from sage.modules.free_module_element import vector
|
|
440
|
+
|
|
441
|
+
O = self._ring
|
|
442
|
+
mul = O._mul_vecs
|
|
443
|
+
|
|
444
|
+
# compute the vector form of other element
|
|
445
|
+
v = O.coordinate_vector(other)
|
|
446
|
+
d = v.denominator()
|
|
447
|
+
vec = vector([(d * c).numerator() for c in v])
|
|
448
|
+
|
|
449
|
+
# multiply with the ideal
|
|
450
|
+
vecs = [mul(vec, r) for r in self._hnf]
|
|
451
|
+
|
|
452
|
+
return O._ideal_from_vectors_and_denominator(vecs, d * self._denominator)
|
|
453
|
+
|
|
454
|
+
def intersect(self, other):
|
|
455
|
+
"""
|
|
456
|
+
Intersect this ideal with the other ideal as fractional ideals.
|
|
457
|
+
|
|
458
|
+
INPUT:
|
|
459
|
+
|
|
460
|
+
- ``other`` -- ideal
|
|
461
|
+
|
|
462
|
+
EXAMPLES::
|
|
463
|
+
|
|
464
|
+
sage: # needs sage.rings.finite_rings
|
|
465
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
466
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
467
|
+
sage: O = L.maximal_order()
|
|
468
|
+
sage: I = O.ideal(x + y)
|
|
469
|
+
sage: J = O.ideal(x)
|
|
470
|
+
sage: I.intersect(J) == I * J * (I + J)^-1
|
|
471
|
+
True
|
|
472
|
+
"""
|
|
473
|
+
from sage.matrix.special import block_matrix
|
|
474
|
+
from .hermite_form_polynomial import reversed_hermite_form
|
|
475
|
+
|
|
476
|
+
A = self._hnf
|
|
477
|
+
B = other._hnf
|
|
478
|
+
|
|
479
|
+
ds = self.denominator()
|
|
480
|
+
do = other.denominator()
|
|
481
|
+
d = ds.lcm(do)
|
|
482
|
+
if not d.is_one():
|
|
483
|
+
A = (d // ds) * A
|
|
484
|
+
B = (d // do) * B
|
|
485
|
+
|
|
486
|
+
MS = A.matrix_space()
|
|
487
|
+
I = MS.identity_matrix()
|
|
488
|
+
O = MS.zero()
|
|
489
|
+
n = A.ncols()
|
|
490
|
+
|
|
491
|
+
# intersect the row spaces of A and B
|
|
492
|
+
M = block_matrix([[I, I], [A, O], [O, B]])
|
|
493
|
+
|
|
494
|
+
# reversed Hermite form
|
|
495
|
+
U = reversed_hermite_form(M, transformation=True)
|
|
496
|
+
|
|
497
|
+
vecs = [U[i][:n] for i in range(n)]
|
|
498
|
+
|
|
499
|
+
return self._ring._ideal_from_vectors_and_denominator(vecs, d)
|
|
500
|
+
|
|
501
|
+
def hnf(self):
|
|
502
|
+
"""
|
|
503
|
+
Return the matrix in hermite normal form representing this ideal.
|
|
504
|
+
|
|
505
|
+
See also :meth:`denominator`
|
|
506
|
+
|
|
507
|
+
EXAMPLES::
|
|
508
|
+
|
|
509
|
+
sage: # needs sage.rings.finite_rings
|
|
510
|
+
sage: K.<x> = FunctionField(GF(7)); R.<y> = K[]
|
|
511
|
+
sage: L.<y> = K.extension(y^2 - x^3 - 1)
|
|
512
|
+
sage: O = L.maximal_order()
|
|
513
|
+
sage: I = O.ideal(y*(y+1)); I.hnf()
|
|
514
|
+
[x^6 + x^3 0]
|
|
515
|
+
[ x^3 + 1 1]
|
|
516
|
+
|
|
517
|
+
::
|
|
518
|
+
|
|
519
|
+
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
|
|
520
|
+
sage: L.<y> = K.extension(y^2 - x^3 - 1)
|
|
521
|
+
sage: O = L.maximal_order()
|
|
522
|
+
sage: I = O.ideal(y*(y+1)); I.hnf()
|
|
523
|
+
[x^6 + x^3 0]
|
|
524
|
+
[ x^3 + 1 1]
|
|
525
|
+
"""
|
|
526
|
+
return self._hnf
|
|
527
|
+
|
|
528
|
+
def denominator(self):
|
|
529
|
+
"""
|
|
530
|
+
Return the denominator of this fractional ideal.
|
|
531
|
+
|
|
532
|
+
EXAMPLES::
|
|
533
|
+
|
|
534
|
+
sage: # needs sage.rings.finite_rings
|
|
535
|
+
sage: K.<x> = FunctionField(GF(7)); R.<y> = K[]
|
|
536
|
+
sage: L.<y> = K.extension(y^2 - x^3 - 1)
|
|
537
|
+
sage: O = L.maximal_order()
|
|
538
|
+
sage: I = O.ideal(y/(y+1))
|
|
539
|
+
sage: d = I.denominator(); d
|
|
540
|
+
x^3
|
|
541
|
+
sage: d in O
|
|
542
|
+
True
|
|
543
|
+
|
|
544
|
+
::
|
|
545
|
+
|
|
546
|
+
sage: K.<x> = FunctionField(QQ); R.<y> = K[]
|
|
547
|
+
sage: L.<y> = K.extension(y^2 - x^3 - 1)
|
|
548
|
+
sage: O = L.maximal_order()
|
|
549
|
+
sage: I = O.ideal(y/(y+1))
|
|
550
|
+
sage: d = I.denominator(); d
|
|
551
|
+
x^3
|
|
552
|
+
sage: d in O
|
|
553
|
+
True
|
|
554
|
+
"""
|
|
555
|
+
return self._denominator
|
|
556
|
+
|
|
557
|
+
@cached_method
|
|
558
|
+
def module(self):
|
|
559
|
+
"""
|
|
560
|
+
Return the module, that is the ideal viewed as a module
|
|
561
|
+
over the base maximal order.
|
|
562
|
+
|
|
563
|
+
EXAMPLES::
|
|
564
|
+
|
|
565
|
+
sage: # needs sage.rings.finite_rings
|
|
566
|
+
sage: K.<x> = FunctionField(GF(7)); R.<y> = K[]
|
|
567
|
+
sage: F.<y> = K.extension(y^2 - x^3 - 1)
|
|
568
|
+
sage: O = F.maximal_order()
|
|
569
|
+
sage: I = O.ideal(x, 1/y)
|
|
570
|
+
sage: I.module()
|
|
571
|
+
Free module of degree 2 and rank 2 over Maximal order
|
|
572
|
+
of Rational function field in x over Finite Field of size 7
|
|
573
|
+
Echelon basis matrix:
|
|
574
|
+
[ 1 0]
|
|
575
|
+
[ 0 1/(x^3 + 1)]
|
|
576
|
+
"""
|
|
577
|
+
F = self.ring().fraction_field()
|
|
578
|
+
V, fr, to = F.vector_space()
|
|
579
|
+
O = F.base_field().maximal_order()
|
|
580
|
+
return V.span([to(g) for g in self.gens_over_base()], base_ring=O)
|
|
581
|
+
|
|
582
|
+
@cached_method
|
|
583
|
+
def gens_over_base(self) -> tuple:
|
|
584
|
+
"""
|
|
585
|
+
Return the generators of this ideal as a module over the maximal order
|
|
586
|
+
of the base rational function field.
|
|
587
|
+
|
|
588
|
+
EXAMPLES::
|
|
589
|
+
|
|
590
|
+
sage: # needs sage.rings.finite_rings
|
|
591
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
592
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
593
|
+
sage: O = L.maximal_order()
|
|
594
|
+
sage: I = O.ideal(x + y)
|
|
595
|
+
sage: I.gens_over_base()
|
|
596
|
+
(x^4 + x^2 + x, y + x)
|
|
597
|
+
|
|
598
|
+
sage: # needs sage.rings.finite_rings
|
|
599
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
600
|
+
sage: O = L.maximal_order()
|
|
601
|
+
sage: I = O.ideal(x + y)
|
|
602
|
+
sage: I.gens_over_base()
|
|
603
|
+
(x^3 + 1, y + x)
|
|
604
|
+
"""
|
|
605
|
+
gens, d = self._gens_over_base
|
|
606
|
+
return tuple([~d * b for b in gens])
|
|
607
|
+
|
|
608
|
+
@lazy_attribute
|
|
609
|
+
def _gens_over_base(self):
|
|
610
|
+
"""
|
|
611
|
+
Return the generators of the integral ideal, which is the denominator
|
|
612
|
+
times the fractional ideal, together with the denominator.
|
|
613
|
+
|
|
614
|
+
EXAMPLES::
|
|
615
|
+
|
|
616
|
+
sage: # needs sage.rings.finite_rings
|
|
617
|
+
sage: K.<x> = FunctionField(GF(2)); R.<y> = K[]
|
|
618
|
+
sage: L.<y> = K.extension(y^2 - x^3*y - x)
|
|
619
|
+
sage: O = L.maximal_order()
|
|
620
|
+
sage: I = O.ideal(1/y)
|
|
621
|
+
sage: I._gens_over_base
|
|
622
|
+
([x, y], x)
|
|
623
|
+
"""
|
|
624
|
+
gens = [sum([c1 * c2 for c1, c2 in zip(row, self._ring.basis())])
|
|
625
|
+
for row in self._hnf]
|
|
626
|
+
return gens, self._denominator
|
|
627
|
+
|
|
628
|
+
def gens(self) -> tuple:
|
|
629
|
+
"""
|
|
630
|
+
Return a set of generators of this ideal.
|
|
631
|
+
|
|
632
|
+
This provides whatever set of generators as quickly
|
|
633
|
+
as possible.
|
|
634
|
+
|
|
635
|
+
EXAMPLES::
|
|
636
|
+
|
|
637
|
+
sage: # needs sage.rings.finite_rings
|
|
638
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
639
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
640
|
+
sage: O = L.maximal_order()
|
|
641
|
+
sage: I = O.ideal(x + y)
|
|
642
|
+
sage: I.gens()
|
|
643
|
+
(x^4 + x^2 + x, y + x)
|
|
644
|
+
|
|
645
|
+
sage: # needs sage.rings.finite_rings
|
|
646
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
647
|
+
sage: O = L.maximal_order()
|
|
648
|
+
sage: I = O.ideal(x + y)
|
|
649
|
+
sage: I.gens()
|
|
650
|
+
(x^3 + 1, y + x)
|
|
651
|
+
"""
|
|
652
|
+
return self.gens_over_base()
|
|
653
|
+
|
|
654
|
+
@cached_method
|
|
655
|
+
def basis_matrix(self):
|
|
656
|
+
"""
|
|
657
|
+
Return the matrix of basis vectors of this ideal as a module.
|
|
658
|
+
|
|
659
|
+
The basis matrix is by definition the hermite norm form of the ideal
|
|
660
|
+
divided by the denominator.
|
|
661
|
+
|
|
662
|
+
EXAMPLES::
|
|
663
|
+
|
|
664
|
+
sage: # needs sage.rings.finite_rings
|
|
665
|
+
sage: K.<x> = FunctionField(GF(2)); R.<t> = PolynomialRing(K)
|
|
666
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
667
|
+
sage: O = F.maximal_order()
|
|
668
|
+
sage: I = O.ideal(x, 1/y)
|
|
669
|
+
sage: I.denominator() * I.basis_matrix() == I.hnf()
|
|
670
|
+
True
|
|
671
|
+
"""
|
|
672
|
+
d = self.denominator()
|
|
673
|
+
m = (d * self).hnf()
|
|
674
|
+
if d != 1:
|
|
675
|
+
m = ~d * m
|
|
676
|
+
m.set_immutable()
|
|
677
|
+
return m
|
|
678
|
+
|
|
679
|
+
def is_integral(self):
|
|
680
|
+
"""
|
|
681
|
+
Return ``True`` if this is an integral ideal.
|
|
682
|
+
|
|
683
|
+
EXAMPLES::
|
|
684
|
+
|
|
685
|
+
sage: # needs sage.rings.finite_rings
|
|
686
|
+
sage: K.<x> = FunctionField(GF(2)); _.<t> = PolynomialRing(K)
|
|
687
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
688
|
+
sage: O = F.maximal_order()
|
|
689
|
+
sage: I = O.ideal(x, 1/y)
|
|
690
|
+
sage: I.is_integral()
|
|
691
|
+
False
|
|
692
|
+
sage: J = I.denominator() * I
|
|
693
|
+
sage: J.is_integral()
|
|
694
|
+
True
|
|
695
|
+
|
|
696
|
+
sage: # needs sage.rings.finite_rings
|
|
697
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
698
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
699
|
+
sage: O = L.maximal_order()
|
|
700
|
+
sage: I = O.ideal(x, 1/y)
|
|
701
|
+
sage: I.is_integral()
|
|
702
|
+
False
|
|
703
|
+
sage: J = I.denominator() * I
|
|
704
|
+
sage: J.is_integral()
|
|
705
|
+
True
|
|
706
|
+
|
|
707
|
+
sage: K.<x> = FunctionField(QQ); _.<t> = PolynomialRing(K)
|
|
708
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
709
|
+
sage: O = F.maximal_order()
|
|
710
|
+
sage: I = O.ideal(x, 1/y)
|
|
711
|
+
sage: I.is_integral()
|
|
712
|
+
False
|
|
713
|
+
sage: J = I.denominator() * I
|
|
714
|
+
sage: J.is_integral()
|
|
715
|
+
True
|
|
716
|
+
"""
|
|
717
|
+
return self.denominator() == 1
|
|
718
|
+
|
|
719
|
+
def ideal_below(self):
|
|
720
|
+
"""
|
|
721
|
+
Return the ideal below this ideal.
|
|
722
|
+
|
|
723
|
+
This is defined only for integral ideals.
|
|
724
|
+
|
|
725
|
+
EXAMPLES::
|
|
726
|
+
|
|
727
|
+
sage: # needs sage.rings.finite_rings
|
|
728
|
+
sage: K.<x> = FunctionField(GF(2)); _.<t> = K[]
|
|
729
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
730
|
+
sage: O = F.maximal_order()
|
|
731
|
+
sage: I = O.ideal(x, 1/y)
|
|
732
|
+
sage: I.ideal_below()
|
|
733
|
+
Traceback (most recent call last):
|
|
734
|
+
...
|
|
735
|
+
TypeError: not an integral ideal
|
|
736
|
+
sage: J = I.denominator() * I
|
|
737
|
+
sage: J.ideal_below()
|
|
738
|
+
Ideal (x^3 + x^2 + x) of Maximal order of Rational function field
|
|
739
|
+
in x over Finite Field of size 2
|
|
740
|
+
|
|
741
|
+
sage: # needs sage.rings.finite_rings
|
|
742
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
743
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
744
|
+
sage: O = L.maximal_order()
|
|
745
|
+
sage: I = O.ideal(x, 1/y)
|
|
746
|
+
sage: I.ideal_below()
|
|
747
|
+
Traceback (most recent call last):
|
|
748
|
+
...
|
|
749
|
+
TypeError: not an integral ideal
|
|
750
|
+
sage: J = I.denominator() * I
|
|
751
|
+
sage: J.ideal_below()
|
|
752
|
+
Ideal (x^3 + x) of Maximal order of Rational function field
|
|
753
|
+
in x over Finite Field of size 2
|
|
754
|
+
|
|
755
|
+
sage: K.<x> = FunctionField(QQ); _.<t> = K[]
|
|
756
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
757
|
+
sage: O = F.maximal_order()
|
|
758
|
+
sage: I = O.ideal(x, 1/y)
|
|
759
|
+
sage: I.ideal_below()
|
|
760
|
+
Traceback (most recent call last):
|
|
761
|
+
...
|
|
762
|
+
TypeError: not an integral ideal
|
|
763
|
+
sage: J = I.denominator() * I
|
|
764
|
+
sage: J.ideal_below()
|
|
765
|
+
Ideal (x^3 + x^2 + x) of Maximal order of Rational function field
|
|
766
|
+
in x over Rational Field
|
|
767
|
+
"""
|
|
768
|
+
if not self.is_integral():
|
|
769
|
+
raise TypeError("not an integral ideal")
|
|
770
|
+
|
|
771
|
+
K = self.ring().fraction_field().base_field().maximal_order()
|
|
772
|
+
|
|
773
|
+
# self._hnf is in reversed hermite normal form, that is, lower
|
|
774
|
+
# triangular form. Thus the generator of the ideal below is
|
|
775
|
+
# just the (0,0) entry of the normal form. When self._hnf was in
|
|
776
|
+
# hermite normal form, that is, upper triangular form, then the
|
|
777
|
+
# generator can be computed in the following way:
|
|
778
|
+
#
|
|
779
|
+
# m = matrix([hnf[0].parent().gen(0)] + list(hnf))
|
|
780
|
+
# _,T = m.hermite_form(transformation=True)
|
|
781
|
+
# return T[-1][0]
|
|
782
|
+
#
|
|
783
|
+
# This is certainly less efficient! This is an argument for using
|
|
784
|
+
# reversed hermite normal form for ideal representation.
|
|
785
|
+
l = self._hnf[0][0]
|
|
786
|
+
|
|
787
|
+
return K.ideal(l)
|
|
788
|
+
|
|
789
|
+
def norm(self):
|
|
790
|
+
"""
|
|
791
|
+
Return the norm of this fractional ideal.
|
|
792
|
+
|
|
793
|
+
EXAMPLES::
|
|
794
|
+
|
|
795
|
+
sage: # needs sage.rings.finite_rings
|
|
796
|
+
sage: K.<x> = FunctionField(GF(2)); _.<t> = PolynomialRing(K)
|
|
797
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
798
|
+
sage: O = F.maximal_order()
|
|
799
|
+
sage: i1 = O.ideal(x)
|
|
800
|
+
sage: i2 = O.ideal(y)
|
|
801
|
+
sage: i3 = i1 * i2
|
|
802
|
+
sage: i3.norm() == i1.norm() * i2.norm()
|
|
803
|
+
True
|
|
804
|
+
sage: i1.norm()
|
|
805
|
+
x^3
|
|
806
|
+
sage: i1.norm() == x ** F.degree()
|
|
807
|
+
True
|
|
808
|
+
sage: i2.norm()
|
|
809
|
+
x^6 + x^4 + x^2
|
|
810
|
+
sage: i2.norm() == y.norm()
|
|
811
|
+
True
|
|
812
|
+
|
|
813
|
+
sage: # needs sage.rings.finite_rings
|
|
814
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
815
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
816
|
+
sage: O = L.maximal_order()
|
|
817
|
+
sage: i1 = O.ideal(x)
|
|
818
|
+
sage: i2 = O.ideal(y)
|
|
819
|
+
sage: i3 = i1 * i2
|
|
820
|
+
sage: i3.norm() == i1.norm() * i2.norm()
|
|
821
|
+
True
|
|
822
|
+
sage: i1.norm()
|
|
823
|
+
x^2
|
|
824
|
+
sage: i1.norm() == x ** L.degree()
|
|
825
|
+
True
|
|
826
|
+
sage: i2.norm()
|
|
827
|
+
(x^2 + 1)/x
|
|
828
|
+
sage: i2.norm() == y.norm()
|
|
829
|
+
True
|
|
830
|
+
"""
|
|
831
|
+
n = 1
|
|
832
|
+
for e in self.basis_matrix().diagonal():
|
|
833
|
+
n *= e
|
|
834
|
+
return n
|
|
835
|
+
|
|
836
|
+
@cached_method
|
|
837
|
+
def is_prime(self):
|
|
838
|
+
"""
|
|
839
|
+
Return ``True`` if this ideal is a prime ideal.
|
|
840
|
+
|
|
841
|
+
EXAMPLES::
|
|
842
|
+
|
|
843
|
+
sage: # needs sage.rings.finite_rings
|
|
844
|
+
sage: K.<x> = FunctionField(GF(2)); _.<t> = PolynomialRing(K)
|
|
845
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
846
|
+
sage: O = F.maximal_order()
|
|
847
|
+
sage: I = O.ideal(y)
|
|
848
|
+
sage: [f.is_prime() for f,_ in I.factor()]
|
|
849
|
+
[True, True]
|
|
850
|
+
|
|
851
|
+
sage: # needs sage.rings.finite_rings
|
|
852
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
853
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
854
|
+
sage: O = L.maximal_order()
|
|
855
|
+
sage: I = O.ideal(y)
|
|
856
|
+
sage: [f.is_prime() for f,_ in I.factor()]
|
|
857
|
+
[True, True]
|
|
858
|
+
|
|
859
|
+
sage: K.<x> = FunctionField(QQ); _.<t> = PolynomialRing(K)
|
|
860
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
861
|
+
sage: O = F.maximal_order()
|
|
862
|
+
sage: I = O.ideal(y)
|
|
863
|
+
sage: [f.is_prime() for f,_ in I.factor()]
|
|
864
|
+
[True, True]
|
|
865
|
+
"""
|
|
866
|
+
factors = self.factor()
|
|
867
|
+
if len(factors) == 1 and factors[0][1] == 1: # prime!
|
|
868
|
+
prime = factors[0][0]
|
|
869
|
+
assert self == prime
|
|
870
|
+
self._relative_degree = prime._relative_degree
|
|
871
|
+
self._ramification_index = prime._ramification_index
|
|
872
|
+
self._prime_below = prime._prime_below
|
|
873
|
+
self._beta = prime._beta
|
|
874
|
+
self._beta_matrix = prime._beta_matrix
|
|
875
|
+
return True
|
|
876
|
+
else:
|
|
877
|
+
return False
|
|
878
|
+
|
|
879
|
+
###################################################
|
|
880
|
+
# The following methods are only for prime ideals #
|
|
881
|
+
###################################################
|
|
882
|
+
|
|
883
|
+
def valuation(self, ideal):
|
|
884
|
+
"""
|
|
885
|
+
Return the valuation of ``ideal`` at this prime ideal.
|
|
886
|
+
|
|
887
|
+
INPUT:
|
|
888
|
+
|
|
889
|
+
- ``ideal`` -- fractional ideal
|
|
890
|
+
|
|
891
|
+
EXAMPLES::
|
|
892
|
+
|
|
893
|
+
sage: # needs sage.rings.finite_rings
|
|
894
|
+
sage: K.<x> = FunctionField(GF(2)); _.<t> = K[]
|
|
895
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2 + x + 1)^2)
|
|
896
|
+
sage: O = F.maximal_order()
|
|
897
|
+
sage: I = O.ideal(x, (1/(x^3 + x^2 + x))*y^2)
|
|
898
|
+
sage: I.is_prime()
|
|
899
|
+
True
|
|
900
|
+
sage: J = O.ideal(y)
|
|
901
|
+
sage: I.valuation(J)
|
|
902
|
+
2
|
|
903
|
+
|
|
904
|
+
sage: # needs sage.rings.finite_rings
|
|
905
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
906
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
907
|
+
sage: O = L.maximal_order()
|
|
908
|
+
sage: I = O.ideal(y)
|
|
909
|
+
sage: [f.valuation(I) for f,_ in I.factor()]
|
|
910
|
+
[-1, 2]
|
|
911
|
+
|
|
912
|
+
The method closely follows Algorithm 4.8.17 of [Coh1993]_.
|
|
913
|
+
"""
|
|
914
|
+
from sage.matrix.constructor import matrix
|
|
915
|
+
|
|
916
|
+
if ideal.is_zero():
|
|
917
|
+
return infinity
|
|
918
|
+
|
|
919
|
+
O = self.ring()
|
|
920
|
+
F = O.fraction_field()
|
|
921
|
+
n = F.degree()
|
|
922
|
+
|
|
923
|
+
# beta_matrix is for fast multiplication with beta. For performance,
|
|
924
|
+
# this is computed here rather than when the prime is constructed.
|
|
925
|
+
if self._beta_matrix is None:
|
|
926
|
+
beta = self._beta
|
|
927
|
+
m = []
|
|
928
|
+
for i in range(n):
|
|
929
|
+
mtable_row = O._mtable[i]
|
|
930
|
+
c = sum(beta[j] * mtable_row[j] for j in range(n))
|
|
931
|
+
m.append(c)
|
|
932
|
+
self._beta_matrix = matrix(m)
|
|
933
|
+
|
|
934
|
+
B = self._beta_matrix
|
|
935
|
+
|
|
936
|
+
# Step 1: compute the valuation of the denominator times the ideal
|
|
937
|
+
#
|
|
938
|
+
# This part is highly optimized as it is critical for
|
|
939
|
+
# overall performance of the function field machinery.
|
|
940
|
+
p = self.prime_below().gen().numerator()
|
|
941
|
+
h = ideal._hnf.list()
|
|
942
|
+
val = min([c.valuation(p) for c in h])
|
|
943
|
+
i = self._ramification_index * val
|
|
944
|
+
while True:
|
|
945
|
+
ppow = p ** val
|
|
946
|
+
h = (matrix(n, [c // ppow for c in h]) * B).list()
|
|
947
|
+
val = min([c.valuation(p) for c in h])
|
|
948
|
+
if val.is_zero():
|
|
949
|
+
break
|
|
950
|
+
i += self._ramification_index * (val - 1) + 1
|
|
951
|
+
|
|
952
|
+
# Step 2: compute the valuation of the denominator
|
|
953
|
+
j = self._ramification_index * ideal.denominator().valuation(p)
|
|
954
|
+
|
|
955
|
+
# Step 3: return the valuation
|
|
956
|
+
return i - j
|
|
957
|
+
|
|
958
|
+
def prime_below(self):
|
|
959
|
+
"""
|
|
960
|
+
Return the prime lying below this prime ideal.
|
|
961
|
+
|
|
962
|
+
EXAMPLES::
|
|
963
|
+
|
|
964
|
+
sage: # needs sage.rings.finite_rings
|
|
965
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
966
|
+
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
|
|
967
|
+
sage: O = F.maximal_order()
|
|
968
|
+
sage: I = O.ideal(y)
|
|
969
|
+
sage: [f.prime_below() for f,_ in I.factor()]
|
|
970
|
+
[Ideal (x) of Maximal order of Rational function field in x
|
|
971
|
+
over Finite Field of size 2, Ideal (x^2 + x + 1) of Maximal order
|
|
972
|
+
of Rational function field in x over Finite Field of size 2]
|
|
973
|
+
|
|
974
|
+
sage: # needs sage.rings.finite_rings
|
|
975
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
976
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
977
|
+
sage: O = L.maximal_order()
|
|
978
|
+
sage: I = O.ideal(y)
|
|
979
|
+
sage: [f.prime_below() for f,_ in I.factor()]
|
|
980
|
+
[Ideal (x) of Maximal order of Rational function field in x over Finite Field of size 2,
|
|
981
|
+
Ideal (x + 1) of Maximal order of Rational function field in x over Finite Field of size 2]
|
|
982
|
+
|
|
983
|
+
sage: K.<x> = FunctionField(QQ); _.<Y> = K[]
|
|
984
|
+
sage: F.<y> = K.extension(Y^3 - x^2*(x^2 + x + 1)^2)
|
|
985
|
+
sage: O = F.maximal_order()
|
|
986
|
+
sage: I = O.ideal(y)
|
|
987
|
+
sage: [f.prime_below() for f,_ in I.factor()]
|
|
988
|
+
[Ideal (x) of Maximal order of Rational function field in x over Rational Field,
|
|
989
|
+
Ideal (x^2 + x + 1) of Maximal order of Rational function field in x over Rational Field]
|
|
990
|
+
"""
|
|
991
|
+
return self._prime_below
|
|
992
|
+
|
|
993
|
+
def _factor(self):
|
|
994
|
+
"""
|
|
995
|
+
Return the factorization of this ideal.
|
|
996
|
+
|
|
997
|
+
EXAMPLES::
|
|
998
|
+
|
|
999
|
+
sage: # needs sage.rings.finite_rings
|
|
1000
|
+
sage: K.<x> = FunctionField(GF(2)); _.<t> = K[]
|
|
1001
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
1002
|
+
sage: O = F.maximal_order()
|
|
1003
|
+
sage: I = O.ideal(y)
|
|
1004
|
+
sage: I == I.factor().prod() # indirect doctest
|
|
1005
|
+
True
|
|
1006
|
+
"""
|
|
1007
|
+
O = self.ring()
|
|
1008
|
+
F = O.fraction_field()
|
|
1009
|
+
o = F.base_field().maximal_order()
|
|
1010
|
+
|
|
1011
|
+
# First we collect primes below self
|
|
1012
|
+
d = self._denominator
|
|
1013
|
+
i = d * self
|
|
1014
|
+
|
|
1015
|
+
factors = []
|
|
1016
|
+
primes = set([o.ideal(p) for p, _ in d.factor()] + [p for p, _ in i.ideal_below().factor()])
|
|
1017
|
+
for prime in primes:
|
|
1018
|
+
qs = [q[0] for q in O.decomposition(prime)]
|
|
1019
|
+
for q in qs:
|
|
1020
|
+
exp = q.valuation(self)
|
|
1021
|
+
if exp != 0:
|
|
1022
|
+
factors.append((q, exp))
|
|
1023
|
+
return factors
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
class FunctionFieldIdeal_global(FunctionFieldIdeal_polymod):
|
|
1027
|
+
"""
|
|
1028
|
+
Fractional ideals of canonical function fields.
|
|
1029
|
+
|
|
1030
|
+
INPUT:
|
|
1031
|
+
|
|
1032
|
+
- ``ring`` -- order in a function field
|
|
1033
|
+
|
|
1034
|
+
- ``hnf`` -- matrix in hermite normal form
|
|
1035
|
+
|
|
1036
|
+
- ``denominator`` -- denominator
|
|
1037
|
+
|
|
1038
|
+
The rows of ``hnf`` is a basis of the ideal, which itself is
|
|
1039
|
+
``denominator`` times the fractional ideal.
|
|
1040
|
+
|
|
1041
|
+
EXAMPLES::
|
|
1042
|
+
|
|
1043
|
+
sage: # needs sage.rings.finite_rings
|
|
1044
|
+
sage: K.<x> = FunctionField(GF(2)); R.<y> = K[]
|
|
1045
|
+
sage: L.<y> = K.extension(y^2 - x^3*y - x)
|
|
1046
|
+
sage: O = L.maximal_order()
|
|
1047
|
+
sage: O.ideal(y)
|
|
1048
|
+
Ideal (y) of Maximal order of Function field in y defined by y^2 + x^3*y + x
|
|
1049
|
+
"""
|
|
1050
|
+
def __init__(self, ring, hnf, denominator=1):
|
|
1051
|
+
"""
|
|
1052
|
+
Initialize.
|
|
1053
|
+
|
|
1054
|
+
TESTS::
|
|
1055
|
+
|
|
1056
|
+
sage: # needs sage.rings.finite_rings
|
|
1057
|
+
sage: K.<x> = FunctionField(GF(5)); R.<y> = K[]
|
|
1058
|
+
sage: L.<y> = K.extension(y^2 - x^3*y - x)
|
|
1059
|
+
sage: O = L.maximal_order()
|
|
1060
|
+
sage: I = O.ideal(y)
|
|
1061
|
+
sage: TestSuite(I).run()
|
|
1062
|
+
"""
|
|
1063
|
+
FunctionFieldIdeal_polymod.__init__(self, ring, hnf, denominator)
|
|
1064
|
+
|
|
1065
|
+
def __pow__(self, mod):
|
|
1066
|
+
"""
|
|
1067
|
+
Return ``self`` to the power of ``mod``.
|
|
1068
|
+
|
|
1069
|
+
If a two-generators representation of ``self`` is known, it is used
|
|
1070
|
+
to speed up powering.
|
|
1071
|
+
|
|
1072
|
+
EXAMPLES::
|
|
1073
|
+
|
|
1074
|
+
sage: # needs sage.rings.finite_rings
|
|
1075
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1076
|
+
sage: L.<y> = K.extension(Y^7 - x^3*Y - x)
|
|
1077
|
+
sage: O = L.maximal_order()
|
|
1078
|
+
sage: I = O.ideal(y)
|
|
1079
|
+
sage: J = O.ideal(x + y)
|
|
1080
|
+
sage: S = I / J
|
|
1081
|
+
sage: a = S^100
|
|
1082
|
+
sage: _ = S.gens_two()
|
|
1083
|
+
sage: b = S^100 # faster
|
|
1084
|
+
sage: b == I^100 / J^100
|
|
1085
|
+
True
|
|
1086
|
+
sage: b == a
|
|
1087
|
+
True
|
|
1088
|
+
"""
|
|
1089
|
+
if mod > 2 and self._gens_two_vecs is not None:
|
|
1090
|
+
O = self._ring
|
|
1091
|
+
mul = O._mul_vecs
|
|
1092
|
+
R = self._hnf.base_ring()
|
|
1093
|
+
n = self._hnf.ncols()
|
|
1094
|
+
|
|
1095
|
+
I = matrix.identity(R, n)
|
|
1096
|
+
|
|
1097
|
+
if len(self._gens_two_vecs) == 1:
|
|
1098
|
+
p, = self._gens_two_vecs
|
|
1099
|
+
ppow = p**mod
|
|
1100
|
+
J = [ppow * v for v in I]
|
|
1101
|
+
else:
|
|
1102
|
+
p, q = self._gens_two_vecs
|
|
1103
|
+
q = sum(e1 * e2 for e1, e2 in zip(O.basis(), q))
|
|
1104
|
+
ppow = p**mod
|
|
1105
|
+
qpow = O._coordinate_vector(q**mod)
|
|
1106
|
+
J = [ppow * v for v in I] + [mul(qpow, v) for v in I]
|
|
1107
|
+
|
|
1108
|
+
return O._ideal_from_vectors_and_denominator(J, self._denominator**mod)
|
|
1109
|
+
|
|
1110
|
+
return generic_power(self, mod)
|
|
1111
|
+
|
|
1112
|
+
def gens(self) -> tuple:
|
|
1113
|
+
"""
|
|
1114
|
+
Return a set of generators of this ideal.
|
|
1115
|
+
|
|
1116
|
+
This provides whatever set of generators as quickly
|
|
1117
|
+
as possible.
|
|
1118
|
+
|
|
1119
|
+
EXAMPLES::
|
|
1120
|
+
|
|
1121
|
+
sage: # needs sage.rings.finite_rings
|
|
1122
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1123
|
+
sage: L.<y> = K.extension(Y^2 - x^3*Y - x)
|
|
1124
|
+
sage: O = L.maximal_order()
|
|
1125
|
+
sage: I = O.ideal(x + y)
|
|
1126
|
+
sage: I.gens()
|
|
1127
|
+
(x^4 + x^2 + x, y + x)
|
|
1128
|
+
|
|
1129
|
+
sage: # needs sage.rings.finite_rings
|
|
1130
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1131
|
+
sage: O = L.maximal_order()
|
|
1132
|
+
sage: I = O.ideal(x + y)
|
|
1133
|
+
sage: I.gens()
|
|
1134
|
+
(x^3 + 1, y + x)
|
|
1135
|
+
"""
|
|
1136
|
+
if self._gens_two.is_in_cache():
|
|
1137
|
+
return self._gens_two.cache
|
|
1138
|
+
return self.gens_over_base()
|
|
1139
|
+
|
|
1140
|
+
def gens_two(self) -> tuple:
|
|
1141
|
+
r"""
|
|
1142
|
+
Return two generators of this fractional ideal.
|
|
1143
|
+
|
|
1144
|
+
If the ideal is principal, one generator *may* be returned.
|
|
1145
|
+
|
|
1146
|
+
EXAMPLES::
|
|
1147
|
+
|
|
1148
|
+
sage: # needs sage.rings.finite_rings
|
|
1149
|
+
sage: K.<x> = FunctionField(GF(2)); _.<t> = K[]
|
|
1150
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2 + x + 1)^2)
|
|
1151
|
+
sage: O = F.maximal_order()
|
|
1152
|
+
sage: I = O.ideal(y)
|
|
1153
|
+
sage: I # indirect doctest
|
|
1154
|
+
Ideal (y) of Maximal order of Function field
|
|
1155
|
+
in y defined by y^3 + x^6 + x^4 + x^2
|
|
1156
|
+
sage: ~I # indirect doctest
|
|
1157
|
+
Ideal ((1/(x^6 + x^4 + x^2))*y^2) of Maximal order of Function field
|
|
1158
|
+
in y defined by y^3 + x^6 + x^4 + x^2
|
|
1159
|
+
|
|
1160
|
+
sage: # needs sage.rings.finite_rings
|
|
1161
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1162
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1163
|
+
sage: O = L.maximal_order()
|
|
1164
|
+
sage: I = O.ideal(y)
|
|
1165
|
+
sage: I # indirect doctest
|
|
1166
|
+
Ideal (y) of Maximal order of Function field in y
|
|
1167
|
+
defined by y^2 + y + (x^2 + 1)/x
|
|
1168
|
+
sage: ~I # indirect doctest
|
|
1169
|
+
Ideal ((x/(x^2 + 1))*y + x/(x^2 + 1)) of Maximal order
|
|
1170
|
+
of Function field in y defined by y^2 + y + (x^2 + 1)/x
|
|
1171
|
+
"""
|
|
1172
|
+
d = self.denominator()
|
|
1173
|
+
return tuple(e / d for e in self._gens_two())
|
|
1174
|
+
|
|
1175
|
+
@cached_method
|
|
1176
|
+
def _gens_two(self) -> tuple:
|
|
1177
|
+
r"""
|
|
1178
|
+
Return a set of two generators of the integral ideal, that is
|
|
1179
|
+
the denominator times this fractional ideal.
|
|
1180
|
+
|
|
1181
|
+
ALGORITHM:
|
|
1182
|
+
|
|
1183
|
+
At most two generators are required to generate ideals in
|
|
1184
|
+
Dedekind domains.
|
|
1185
|
+
|
|
1186
|
+
Lemma 4.7.9, algorithm 4.7.10, and exercise 4.29 of [Coh1993]_
|
|
1187
|
+
tell us that for an integral ideal `I` in a number field, if
|
|
1188
|
+
we pick `a` such that `\gcd(N(I), N(a)/N(I)) = 1`, then `a`
|
|
1189
|
+
and `N(I)` generate the ideal. `N()` is the norm, and this
|
|
1190
|
+
result (presumably) generalizes to function fields.
|
|
1191
|
+
|
|
1192
|
+
After computing `N(I)`, we search exhaustively to find `a`.
|
|
1193
|
+
|
|
1194
|
+
.. TODO::
|
|
1195
|
+
|
|
1196
|
+
Always return a single generator for a principal ideal.
|
|
1197
|
+
|
|
1198
|
+
Testing for principality is not trivial. Algorithm 6.5.10
|
|
1199
|
+
of [Coh1993]_ could probably be adapted for function fields.
|
|
1200
|
+
|
|
1201
|
+
EXAMPLES::
|
|
1202
|
+
|
|
1203
|
+
sage: # needs sage.rings.finite_rings
|
|
1204
|
+
sage: K.<x> = FunctionField(GF(4)); _.<Y> = K[]
|
|
1205
|
+
sage: F.<y> = K.extension(Y^3 + x^3*Y + x)
|
|
1206
|
+
sage: O = F.maximal_order()
|
|
1207
|
+
sage: I = O.ideal(x^2, x*y, x + y)
|
|
1208
|
+
sage: I._gens_two()
|
|
1209
|
+
(x, y)
|
|
1210
|
+
|
|
1211
|
+
sage: # needs sage.rings.finite_rings
|
|
1212
|
+
sage: K.<x> = FunctionField(GF(3))
|
|
1213
|
+
sage: _.<Y> = K[]
|
|
1214
|
+
sage: L.<y> = K.extension(Y - x)
|
|
1215
|
+
sage: y.zeros()[0].prime_ideal()._gens_two()
|
|
1216
|
+
(x,)
|
|
1217
|
+
"""
|
|
1218
|
+
O = self.ring()
|
|
1219
|
+
F = O.fraction_field()
|
|
1220
|
+
|
|
1221
|
+
if self._kummer_form is not None: # prime ideal
|
|
1222
|
+
_g1, _g2 = self._kummer_form
|
|
1223
|
+
g1 = F(_g1)
|
|
1224
|
+
g2 = sum([c1 * c2 for c1, c2 in zip(_g2, O.basis())])
|
|
1225
|
+
if g2:
|
|
1226
|
+
self._gens_two_vecs = (_g1, _g2)
|
|
1227
|
+
return (g1, g2)
|
|
1228
|
+
else:
|
|
1229
|
+
self._gens_two_vecs = (_g1,)
|
|
1230
|
+
return (g1,)
|
|
1231
|
+
|
|
1232
|
+
# ---- start to search for two generators
|
|
1233
|
+
|
|
1234
|
+
hnf = self._hnf
|
|
1235
|
+
|
|
1236
|
+
norm = 1
|
|
1237
|
+
for e in hnf.diagonal():
|
|
1238
|
+
norm *= e
|
|
1239
|
+
|
|
1240
|
+
if norm.is_constant(): # unit ideal
|
|
1241
|
+
self._gens_two_vecs = (1,)
|
|
1242
|
+
return (F(1),)
|
|
1243
|
+
|
|
1244
|
+
# one generator; see .ideal_below()
|
|
1245
|
+
_l = hnf[0][0]
|
|
1246
|
+
p = _l.degree()
|
|
1247
|
+
l = F(_l)
|
|
1248
|
+
|
|
1249
|
+
if self._hnf == O.ideal(l)._hnf: # principal ideal
|
|
1250
|
+
self._gens_two_vecs = (_l,)
|
|
1251
|
+
return (l,)
|
|
1252
|
+
|
|
1253
|
+
R = hnf.base_ring()
|
|
1254
|
+
|
|
1255
|
+
basis = []
|
|
1256
|
+
for row in hnf:
|
|
1257
|
+
basis.append(sum([c1 * c2 for c1, c2 in zip(row, O.basis())]))
|
|
1258
|
+
|
|
1259
|
+
n = len(basis)
|
|
1260
|
+
alpha = None
|
|
1261
|
+
|
|
1262
|
+
def check(alpha):
|
|
1263
|
+
alpha_norm = alpha.norm().numerator() # denominator is 1
|
|
1264
|
+
return norm.gcd(alpha_norm // norm) == 1
|
|
1265
|
+
|
|
1266
|
+
# Trial 1: search for alpha among generators
|
|
1267
|
+
for alpha in basis:
|
|
1268
|
+
if check(alpha):
|
|
1269
|
+
self._gens_two_vecs = (_l, O._coordinate_vector(alpha))
|
|
1270
|
+
return (l, alpha)
|
|
1271
|
+
|
|
1272
|
+
# Trial 2: exhaustive search for alpha using only polynomials
|
|
1273
|
+
# with coefficients 0 or 1
|
|
1274
|
+
for d in range(p):
|
|
1275
|
+
G = itertools.product(itertools.product([0, 1], repeat=d + 1), repeat=n)
|
|
1276
|
+
for g in G:
|
|
1277
|
+
alpha = sum([R(c1) * c2 for c1, c2 in zip(g, basis)])
|
|
1278
|
+
if check(alpha):
|
|
1279
|
+
self._gens_two_vecs = (_l, O._coordinate_vector(alpha))
|
|
1280
|
+
return (l, alpha)
|
|
1281
|
+
|
|
1282
|
+
# Trial 3: exhaustive search for alpha using all polynomials
|
|
1283
|
+
for d in range(p):
|
|
1284
|
+
G = itertools.product(R.polynomials(max_degree=d), repeat=n)
|
|
1285
|
+
for g in G:
|
|
1286
|
+
# discard duplicate cases
|
|
1287
|
+
if max(c.degree() for c in g) != d:
|
|
1288
|
+
continue
|
|
1289
|
+
for j in range(n):
|
|
1290
|
+
if g[j] != 0:
|
|
1291
|
+
break
|
|
1292
|
+
if g[j].leading_coefficient() != 1:
|
|
1293
|
+
continue
|
|
1294
|
+
|
|
1295
|
+
alpha = sum([c1 * c2 for c1, c2 in zip(g, basis)])
|
|
1296
|
+
if check(alpha):
|
|
1297
|
+
self._gens_two_vecs = (_l, O._coordinate_vector(alpha))
|
|
1298
|
+
return (l, alpha)
|
|
1299
|
+
|
|
1300
|
+
# should not reach here
|
|
1301
|
+
raise ValueError("no two generators found")
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
class FunctionFieldIdealInfinite_polymod(FunctionFieldIdealInfinite):
|
|
1305
|
+
"""
|
|
1306
|
+
Ideals of the infinite maximal order of an algebraic function field.
|
|
1307
|
+
|
|
1308
|
+
INPUT:
|
|
1309
|
+
|
|
1310
|
+
- ``ring`` -- infinite maximal order of the function field
|
|
1311
|
+
|
|
1312
|
+
- ``ideal`` -- ideal in the inverted function field
|
|
1313
|
+
|
|
1314
|
+
EXAMPLES::
|
|
1315
|
+
|
|
1316
|
+
sage: # needs sage.rings.finite_rings
|
|
1317
|
+
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = PolynomialRing(K)
|
|
1318
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1319
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1320
|
+
sage: Oinf.ideal(1/y)
|
|
1321
|
+
Ideal (1/x^4*y^2) of Maximal infinite order of Function field
|
|
1322
|
+
in y defined by y^3 + y^2 + 2*x^4
|
|
1323
|
+
"""
|
|
1324
|
+
def __init__(self, ring, ideal):
|
|
1325
|
+
"""
|
|
1326
|
+
Initialize this ideal.
|
|
1327
|
+
|
|
1328
|
+
TESTS::
|
|
1329
|
+
|
|
1330
|
+
sage: # needs sage.rings.finite_rings
|
|
1331
|
+
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = PolynomialRing(K)
|
|
1332
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1333
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1334
|
+
sage: I = Oinf.ideal(1/y)
|
|
1335
|
+
sage: TestSuite(I).run()
|
|
1336
|
+
"""
|
|
1337
|
+
FunctionFieldIdealInfinite.__init__(self, ring)
|
|
1338
|
+
self._ideal = ideal
|
|
1339
|
+
|
|
1340
|
+
def __hash__(self):
|
|
1341
|
+
"""
|
|
1342
|
+
Return the hash of this ideal.
|
|
1343
|
+
|
|
1344
|
+
EXAMPLES::
|
|
1345
|
+
|
|
1346
|
+
sage: # needs sage.rings.finite_rings
|
|
1347
|
+
sage: K.<x> = FunctionField(GF(3^2)); _.<t> = PolynomialRing(K)
|
|
1348
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1349
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1350
|
+
sage: I = Oinf.ideal(1/y)
|
|
1351
|
+
sage: d = { I: 1 }
|
|
1352
|
+
|
|
1353
|
+
sage: # needs sage.rings.finite_rings
|
|
1354
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1355
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1356
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1357
|
+
sage: I = Oinf.ideal(1/y)
|
|
1358
|
+
sage: d = { I: 1 }
|
|
1359
|
+
"""
|
|
1360
|
+
return hash((self.ring(), self._ideal))
|
|
1361
|
+
|
|
1362
|
+
def __contains__(self, x):
|
|
1363
|
+
"""
|
|
1364
|
+
Return ``True`` if ``x`` is in this ideal.
|
|
1365
|
+
|
|
1366
|
+
INPUT:
|
|
1367
|
+
|
|
1368
|
+
- ``x`` -- element of the function field
|
|
1369
|
+
|
|
1370
|
+
EXAMPLES::
|
|
1371
|
+
|
|
1372
|
+
sage: # needs sage.rings.finite_rings
|
|
1373
|
+
sage: K.<x> = FunctionField(GF(3^2)); _.<t> = PolynomialRing(K)
|
|
1374
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1375
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1376
|
+
sage: I = Oinf.ideal(1/y)
|
|
1377
|
+
sage: 1/y in I
|
|
1378
|
+
True
|
|
1379
|
+
sage: 1/x in I
|
|
1380
|
+
False
|
|
1381
|
+
sage: 1/x^2 in I
|
|
1382
|
+
True
|
|
1383
|
+
"""
|
|
1384
|
+
F = self.ring().fraction_field()
|
|
1385
|
+
iF, from_iF, to_iF = F._inversion_isomorphism()
|
|
1386
|
+
return to_iF(x) in self._ideal
|
|
1387
|
+
|
|
1388
|
+
def _add_(self, other):
|
|
1389
|
+
"""
|
|
1390
|
+
Add this ideal with the ``other`` ideal.
|
|
1391
|
+
|
|
1392
|
+
INPUT:
|
|
1393
|
+
|
|
1394
|
+
- ``ideal`` -- ideal
|
|
1395
|
+
|
|
1396
|
+
EXAMPLES::
|
|
1397
|
+
|
|
1398
|
+
sage: # needs sage.rings.finite_rings
|
|
1399
|
+
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = PolynomialRing(K)
|
|
1400
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1401
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1402
|
+
sage: I = Oinf.ideal(1/x^2*1/y)
|
|
1403
|
+
sage: J = Oinf.ideal(1/x)
|
|
1404
|
+
sage: I + J
|
|
1405
|
+
Ideal (1/x) of Maximal infinite order of Function field in y
|
|
1406
|
+
defined by y^3 + y^2 + 2*x^4
|
|
1407
|
+
|
|
1408
|
+
sage: # needs sage.rings.finite_rings
|
|
1409
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1410
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1411
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1412
|
+
sage: I = Oinf.ideal(1/x^2*1/y)
|
|
1413
|
+
sage: J = Oinf.ideal(1/x)
|
|
1414
|
+
sage: I + J
|
|
1415
|
+
Ideal (1/x) of Maximal infinite order of Function field in y
|
|
1416
|
+
defined by y^2 + y + (x^2 + 1)/x
|
|
1417
|
+
"""
|
|
1418
|
+
return FunctionFieldIdealInfinite_polymod(self._ring, self._ideal + other._ideal)
|
|
1419
|
+
|
|
1420
|
+
def _mul_(self, other):
|
|
1421
|
+
"""
|
|
1422
|
+
Multiply this ideal with the ``other`` ideal.
|
|
1423
|
+
|
|
1424
|
+
INPUT:
|
|
1425
|
+
|
|
1426
|
+
- ``other`` -- ideal
|
|
1427
|
+
|
|
1428
|
+
EXAMPLES::
|
|
1429
|
+
|
|
1430
|
+
sage: # needs sage.rings.finite_rings
|
|
1431
|
+
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = PolynomialRing(K)
|
|
1432
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1433
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1434
|
+
sage: I = Oinf.ideal(1/x^2*1/y)
|
|
1435
|
+
sage: J = Oinf.ideal(1/x)
|
|
1436
|
+
sage: I * J
|
|
1437
|
+
Ideal (1/x^7*y^2) of Maximal infinite order of Function field
|
|
1438
|
+
in y defined by y^3 + y^2 + 2*x^4
|
|
1439
|
+
|
|
1440
|
+
sage: # needs sage.rings.finite_rings
|
|
1441
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1442
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1443
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1444
|
+
sage: I = Oinf.ideal(1/x^2*1/y)
|
|
1445
|
+
sage: J = Oinf.ideal(1/x)
|
|
1446
|
+
sage: I * J
|
|
1447
|
+
Ideal (1/x^4*y) of Maximal infinite order of Function field in y
|
|
1448
|
+
defined by y^2 + y + (x^2 + 1)/x
|
|
1449
|
+
"""
|
|
1450
|
+
return FunctionFieldIdealInfinite_polymod(self._ring, self._ideal * other._ideal)
|
|
1451
|
+
|
|
1452
|
+
def __pow__(self, n):
|
|
1453
|
+
"""
|
|
1454
|
+
Raise this ideal to ``n``-th power.
|
|
1455
|
+
|
|
1456
|
+
EXAMPLES::
|
|
1457
|
+
|
|
1458
|
+
sage: # needs sage.rings.finite_rings
|
|
1459
|
+
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = PolynomialRing(K)
|
|
1460
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1461
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1462
|
+
sage: J = Oinf.ideal(1/x)
|
|
1463
|
+
sage: J^3
|
|
1464
|
+
Ideal (1/x^3) of Maximal infinite order of Function field
|
|
1465
|
+
in y defined by y^3 + y^2 + 2*x^4
|
|
1466
|
+
"""
|
|
1467
|
+
return FunctionFieldIdealInfinite_polymod(self._ring, self._ideal ** n)
|
|
1468
|
+
|
|
1469
|
+
def __invert__(self):
|
|
1470
|
+
"""
|
|
1471
|
+
Return the inverted ideal of this ideal.
|
|
1472
|
+
|
|
1473
|
+
EXAMPLES::
|
|
1474
|
+
|
|
1475
|
+
sage: # needs sage.rings.finite_rings
|
|
1476
|
+
sage: K.<x> = FunctionField(GF(3^2)); _.<t> = PolynomialRing(K)
|
|
1477
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1478
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1479
|
+
sage: J = Oinf.ideal(y)
|
|
1480
|
+
sage: ~J
|
|
1481
|
+
Ideal (1/x^4*y^2) of Maximal infinite order
|
|
1482
|
+
of Function field in y defined by y^3 + y^2 + 2*x^4
|
|
1483
|
+
sage: J * ~J
|
|
1484
|
+
Ideal (1) of Maximal infinite order of Function field
|
|
1485
|
+
in y defined by y^3 + y^2 + 2*x^4
|
|
1486
|
+
|
|
1487
|
+
sage: # needs sage.rings.finite_rings
|
|
1488
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1489
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1490
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1491
|
+
sage: J = Oinf.ideal(y)
|
|
1492
|
+
sage: ~J
|
|
1493
|
+
Ideal (1/x*y) of Maximal infinite order of Function field in y
|
|
1494
|
+
defined by y^2 + y + (x^2 + 1)/x
|
|
1495
|
+
sage: J * ~J
|
|
1496
|
+
Ideal (1) of Maximal infinite order of Function field in y
|
|
1497
|
+
defined by y^2 + y + (x^2 + 1)/x
|
|
1498
|
+
"""
|
|
1499
|
+
return FunctionFieldIdealInfinite_polymod(self._ring, ~ self._ideal)
|
|
1500
|
+
|
|
1501
|
+
def _richcmp_(self, other, op):
|
|
1502
|
+
"""
|
|
1503
|
+
Compare this ideal with the ``other`` ideal with respect to ``op``.
|
|
1504
|
+
|
|
1505
|
+
EXAMPLES::
|
|
1506
|
+
|
|
1507
|
+
sage: # needs sage.rings.finite_rings
|
|
1508
|
+
sage: K.<x> = FunctionField(GF(3^2)); _.<t> = PolynomialRing(K)
|
|
1509
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1510
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1511
|
+
sage: I = Oinf.ideal(1/x^2*1/y)
|
|
1512
|
+
sage: J = Oinf.ideal(1/x)
|
|
1513
|
+
sage: I * J == J * I
|
|
1514
|
+
True
|
|
1515
|
+
sage: I + J == J
|
|
1516
|
+
True
|
|
1517
|
+
sage: I + J == I
|
|
1518
|
+
False
|
|
1519
|
+
sage: (I < J) == (not J < I)
|
|
1520
|
+
True
|
|
1521
|
+
|
|
1522
|
+
sage: # needs sage.rings.finite_rings
|
|
1523
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1524
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1525
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1526
|
+
sage: I = Oinf.ideal(1/x^2*1/y)
|
|
1527
|
+
sage: J = Oinf.ideal(1/x)
|
|
1528
|
+
sage: I * J == J * I
|
|
1529
|
+
True
|
|
1530
|
+
sage: I + J == J
|
|
1531
|
+
True
|
|
1532
|
+
sage: I + J == I
|
|
1533
|
+
False
|
|
1534
|
+
sage: (I < J) == (not J < I)
|
|
1535
|
+
True
|
|
1536
|
+
"""
|
|
1537
|
+
return richcmp(self._ideal, other._ideal, op)
|
|
1538
|
+
|
|
1539
|
+
@property
|
|
1540
|
+
def _relative_degree(self):
|
|
1541
|
+
"""
|
|
1542
|
+
Return the relative degree of this ideal.
|
|
1543
|
+
|
|
1544
|
+
EXAMPLES::
|
|
1545
|
+
|
|
1546
|
+
sage: # needs sage.rings.finite_rings
|
|
1547
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1548
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1549
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1550
|
+
sage: I = Oinf.ideal(1/x)
|
|
1551
|
+
sage: [J._relative_degree for J,_ in I.factor()]
|
|
1552
|
+
[1]
|
|
1553
|
+
"""
|
|
1554
|
+
if not self.is_prime():
|
|
1555
|
+
raise TypeError("not a prime ideal")
|
|
1556
|
+
|
|
1557
|
+
return self._ideal._relative_degree
|
|
1558
|
+
|
|
1559
|
+
def gens(self) -> tuple:
|
|
1560
|
+
"""
|
|
1561
|
+
Return a set of generators of this ideal.
|
|
1562
|
+
|
|
1563
|
+
EXAMPLES::
|
|
1564
|
+
|
|
1565
|
+
sage: # needs sage.rings.finite_rings
|
|
1566
|
+
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = PolynomialRing(K)
|
|
1567
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1568
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1569
|
+
sage: I = Oinf.ideal(x + y)
|
|
1570
|
+
sage: I.gens()
|
|
1571
|
+
(x, y, 1/x^2*y^2)
|
|
1572
|
+
|
|
1573
|
+
sage: # needs sage.rings.finite_rings
|
|
1574
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1575
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1576
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1577
|
+
sage: I = Oinf.ideal(x + y)
|
|
1578
|
+
sage: I.gens()
|
|
1579
|
+
(x, y)
|
|
1580
|
+
"""
|
|
1581
|
+
F = self.ring().fraction_field()
|
|
1582
|
+
iF, from_iF, to_iF = F._inversion_isomorphism()
|
|
1583
|
+
return tuple(from_iF(b) for b in self._ideal.gens())
|
|
1584
|
+
|
|
1585
|
+
def gens_two(self) -> tuple:
|
|
1586
|
+
"""
|
|
1587
|
+
Return a set of at most two generators of this ideal.
|
|
1588
|
+
|
|
1589
|
+
EXAMPLES::
|
|
1590
|
+
|
|
1591
|
+
sage: # needs sage.rings.finite_rings
|
|
1592
|
+
sage: K.<x> = FunctionField(GF(3^2)); R.<t> = PolynomialRing(K)
|
|
1593
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1594
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1595
|
+
sage: I = Oinf.ideal(x + y)
|
|
1596
|
+
sage: I.gens_two()
|
|
1597
|
+
(x, y)
|
|
1598
|
+
|
|
1599
|
+
sage: # needs sage.rings.finite_rings
|
|
1600
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1601
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1602
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1603
|
+
sage: I = Oinf.ideal(x + y)
|
|
1604
|
+
sage: I.gens_two()
|
|
1605
|
+
(x,)
|
|
1606
|
+
"""
|
|
1607
|
+
F = self.ring().fraction_field()
|
|
1608
|
+
iF, from_iF, to_iF = F._inversion_isomorphism()
|
|
1609
|
+
return tuple(from_iF(b) for b in self._ideal.gens_two())
|
|
1610
|
+
|
|
1611
|
+
def gens_over_base(self) -> tuple:
|
|
1612
|
+
"""
|
|
1613
|
+
Return a set of generators of this ideal.
|
|
1614
|
+
|
|
1615
|
+
EXAMPLES::
|
|
1616
|
+
|
|
1617
|
+
sage: # needs sage.rings.finite_rings
|
|
1618
|
+
sage: K.<x> = FunctionField(GF(3^2)); _.<t> = K[]
|
|
1619
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1620
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1621
|
+
sage: I = Oinf.ideal(x + y)
|
|
1622
|
+
sage: I.gens_over_base()
|
|
1623
|
+
(x, y, 1/x^2*y^2)
|
|
1624
|
+
"""
|
|
1625
|
+
F = self.ring().fraction_field()
|
|
1626
|
+
iF, from_iF, to_iF = F._inversion_isomorphism()
|
|
1627
|
+
return tuple(from_iF(g) for g in self._ideal.gens_over_base())
|
|
1628
|
+
|
|
1629
|
+
def ideal_below(self):
|
|
1630
|
+
"""
|
|
1631
|
+
Return a set of generators of this ideal.
|
|
1632
|
+
|
|
1633
|
+
EXAMPLES::
|
|
1634
|
+
|
|
1635
|
+
sage: # needs sage.rings.finite_rings
|
|
1636
|
+
sage: K.<x> = FunctionField(GF(3^2)); _.<t> = K[]
|
|
1637
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1638
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1639
|
+
sage: I = Oinf.ideal(1/y^2)
|
|
1640
|
+
sage: I.ideal_below()
|
|
1641
|
+
Ideal (x^3) of Maximal order of Rational function field
|
|
1642
|
+
in x over Finite Field in z2 of size 3^2
|
|
1643
|
+
"""
|
|
1644
|
+
return self._ideal.ideal_below()
|
|
1645
|
+
|
|
1646
|
+
def is_prime(self):
|
|
1647
|
+
"""
|
|
1648
|
+
Return ``True`` if this ideal is a prime ideal.
|
|
1649
|
+
|
|
1650
|
+
EXAMPLES::
|
|
1651
|
+
|
|
1652
|
+
sage: # needs sage.rings.finite_rings
|
|
1653
|
+
sage: K.<x> = FunctionField(GF(3^2)); _.<t> = PolynomialRing(K)
|
|
1654
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1655
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1656
|
+
sage: I = Oinf.ideal(1/x)
|
|
1657
|
+
sage: I.factor()
|
|
1658
|
+
(Ideal (1/x^3*y^2) of Maximal infinite order of Function field
|
|
1659
|
+
in y defined by y^3 + y^2 + 2*x^4)^3
|
|
1660
|
+
sage: I.is_prime()
|
|
1661
|
+
False
|
|
1662
|
+
sage: J = I.factor()[0][0]
|
|
1663
|
+
sage: J.is_prime()
|
|
1664
|
+
True
|
|
1665
|
+
|
|
1666
|
+
sage: # needs sage.rings.finite_rings
|
|
1667
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1668
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1669
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1670
|
+
sage: I = Oinf.ideal(1/x)
|
|
1671
|
+
sage: I.factor()
|
|
1672
|
+
(Ideal (1/x*y) of Maximal infinite order of Function field in y
|
|
1673
|
+
defined by y^2 + y + (x^2 + 1)/x)^2
|
|
1674
|
+
sage: I.is_prime()
|
|
1675
|
+
False
|
|
1676
|
+
sage: J = I.factor()[0][0]
|
|
1677
|
+
sage: J.is_prime()
|
|
1678
|
+
True
|
|
1679
|
+
"""
|
|
1680
|
+
return self._ideal.is_prime()
|
|
1681
|
+
|
|
1682
|
+
@cached_method
|
|
1683
|
+
def prime_below(self):
|
|
1684
|
+
"""
|
|
1685
|
+
Return the prime of the base order that underlies this prime ideal.
|
|
1686
|
+
|
|
1687
|
+
EXAMPLES::
|
|
1688
|
+
|
|
1689
|
+
sage: # needs sage.rings.finite_rings
|
|
1690
|
+
sage: K.<x> = FunctionField(GF(3^2)); _.<t> = PolynomialRing(K)
|
|
1691
|
+
sage: F.<y> = K.extension(t^3 + t^2 - x^4)
|
|
1692
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1693
|
+
sage: I = Oinf.ideal(1/x)
|
|
1694
|
+
sage: I.factor()
|
|
1695
|
+
(Ideal (1/x^3*y^2) of Maximal infinite order of Function field
|
|
1696
|
+
in y defined by y^3 + y^2 + 2*x^4)^3
|
|
1697
|
+
sage: J = I.factor()[0][0]
|
|
1698
|
+
sage: J.is_prime()
|
|
1699
|
+
True
|
|
1700
|
+
sage: J.prime_below()
|
|
1701
|
+
Ideal (1/x) of Maximal infinite order of Rational function field
|
|
1702
|
+
in x over Finite Field in z2 of size 3^2
|
|
1703
|
+
|
|
1704
|
+
sage: # needs sage.rings.finite_rings
|
|
1705
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1706
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1707
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1708
|
+
sage: I = Oinf.ideal(1/x)
|
|
1709
|
+
sage: I.factor()
|
|
1710
|
+
(Ideal (1/x*y) of Maximal infinite order of Function field in y
|
|
1711
|
+
defined by y^2 + y + (x^2 + 1)/x)^2
|
|
1712
|
+
sage: J = I.factor()[0][0]
|
|
1713
|
+
sage: J.is_prime()
|
|
1714
|
+
True
|
|
1715
|
+
sage: J.prime_below()
|
|
1716
|
+
Ideal (1/x) of Maximal infinite order of Rational function field in x
|
|
1717
|
+
over Finite Field of size 2
|
|
1718
|
+
"""
|
|
1719
|
+
if not self.is_prime():
|
|
1720
|
+
raise TypeError("not a prime ideal")
|
|
1721
|
+
|
|
1722
|
+
F = self.ring().fraction_field()
|
|
1723
|
+
K = F.base_field()
|
|
1724
|
+
return K.maximal_order_infinite().prime_ideal()
|
|
1725
|
+
|
|
1726
|
+
def valuation(self, ideal):
|
|
1727
|
+
"""
|
|
1728
|
+
Return the valuation of ``ideal`` with respect to this prime ideal.
|
|
1729
|
+
|
|
1730
|
+
INPUT:
|
|
1731
|
+
|
|
1732
|
+
- ``ideal`` -- fractional ideal
|
|
1733
|
+
|
|
1734
|
+
EXAMPLES::
|
|
1735
|
+
|
|
1736
|
+
sage: # needs sage.rings.finite_rings
|
|
1737
|
+
sage: K.<x> = FunctionField(GF(2)); _.<Y> = K[]
|
|
1738
|
+
sage: L.<y> = K.extension(Y^2 + Y + x + 1/x)
|
|
1739
|
+
sage: Oinf = L.maximal_order_infinite()
|
|
1740
|
+
sage: I = Oinf.ideal(y)
|
|
1741
|
+
sage: [f.valuation(I) for f,_ in I.factor()]
|
|
1742
|
+
[-1]
|
|
1743
|
+
"""
|
|
1744
|
+
if not self.is_prime():
|
|
1745
|
+
raise TypeError("not a prime ideal")
|
|
1746
|
+
|
|
1747
|
+
return self._ideal.valuation(self.ring()._to_iF(ideal))
|
|
1748
|
+
|
|
1749
|
+
def _factor(self):
|
|
1750
|
+
"""
|
|
1751
|
+
Return factorization of the ideal.
|
|
1752
|
+
|
|
1753
|
+
EXAMPLES::
|
|
1754
|
+
|
|
1755
|
+
sage: # needs sage.rings.finite_rings
|
|
1756
|
+
sage: K.<x> = FunctionField(GF(2)); R.<t> = PolynomialRing(K)
|
|
1757
|
+
sage: F.<y> = K.extension(t^3 - x^2*(x^2+x+1)^2)
|
|
1758
|
+
sage: Oinf = F.maximal_order_infinite()
|
|
1759
|
+
sage: f = 1/x
|
|
1760
|
+
sage: I = Oinf.ideal(f)
|
|
1761
|
+
sage: I._factor()
|
|
1762
|
+
[(Ideal ((1/(x^4 + x^3 + x^2))*y^2 + 1/x^2*y + 1) of Maximal infinite order of Function field in y defined by y^3 + x^6 + x^4 + x^2,
|
|
1763
|
+
1),
|
|
1764
|
+
(Ideal ((1/(x^4 + x^3 + x^2))*y^2 + 1) of Maximal infinite order of Function field in y defined by y^3 + x^6 + x^4 + x^2,
|
|
1765
|
+
1)]
|
|
1766
|
+
"""
|
|
1767
|
+
if self._ideal.is_prime.is_in_cache() and self._ideal.is_prime():
|
|
1768
|
+
return [(self, 1)]
|
|
1769
|
+
|
|
1770
|
+
O = self.ring()
|
|
1771
|
+
factors = []
|
|
1772
|
+
for iprime, exp in O._to_iF(self).factor():
|
|
1773
|
+
prime = FunctionFieldIdealInfinite_polymod(O, iprime)
|
|
1774
|
+
factors.append((prime, exp))
|
|
1775
|
+
return factors
|