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,1863 @@
|
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version mregular.lib 4.1.2.0 Feb_2019 "; // $Id: b9468dd561641fa270d5bc90ad8ab8b6f690101b $
|
|
3
|
+
category="Commutative Algebra";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: mregular.lib Castelnuovo-Mumford regularity of homogeneous ideals
|
|
6
|
+
AUTHORS: I.Bermejo, ibermejo@ull.es
|
|
7
|
+
@* Ph.Gimenez, pgimenez@agt.uva.es
|
|
8
|
+
@* G.-M.Greuel, greuel@mathematik.uni-kl.de
|
|
9
|
+
|
|
10
|
+
OVERVIEW:
|
|
11
|
+
A library for computing the Castelnuovo-Mumford regularity of a homogeneous
|
|
12
|
+
ideal that DOES NOT require the computation of a minimal graded free
|
|
13
|
+
resolution of the ideal.
|
|
14
|
+
It also determines depth(basering/ideal) and satiety(ideal).
|
|
15
|
+
The procedures are based on 3 papers by Isabel Bermejo and Philippe Gimenez:
|
|
16
|
+
'On Castelnuovo-Mumford regularity of projective curves' Proc.Amer.Math.Soc.
|
|
17
|
+
128(5) (2000), 'Computing the Castelnuovo-Mumford regularity of some
|
|
18
|
+
subschemes of Pn using quotients of monomial ideals', Proceedings of
|
|
19
|
+
MEGA-2000, J. Pure Appl. Algebra 164 (2001), and 'Saturation and
|
|
20
|
+
Castelnuovo-Mumford regularity', Preprint (2004).
|
|
21
|
+
|
|
22
|
+
PROCEDURES:
|
|
23
|
+
regIdeal(id,[,e]); regularity of homogeneous ideal id
|
|
24
|
+
depthIdeal(id,[,e]); depth of S/id with S=basering, id homogeneous ideal
|
|
25
|
+
satiety(id,[,e]); saturation index of homogeneous ideal id
|
|
26
|
+
regMonCurve(li); regularity of projective monomial curve defined by li
|
|
27
|
+
NoetherPosition(id); Noether normalization of ideal id
|
|
28
|
+
is_NP(id); checks whether variables are in Noether position
|
|
29
|
+
is_nested(id); checks whether monomial ideal id is of nested type
|
|
30
|
+
";
|
|
31
|
+
|
|
32
|
+
LIB "general.lib";
|
|
33
|
+
LIB "algebra.lib";
|
|
34
|
+
LIB "sing.lib";
|
|
35
|
+
LIB "polylib.lib";
|
|
36
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
37
|
+
//
|
|
38
|
+
proc regIdeal (ideal i, list #)
|
|
39
|
+
"
|
|
40
|
+
USAGE: regIdeal (i[,e]); i ideal, e integer
|
|
41
|
+
RETURN: an integer, the Castelnuovo-Mumford regularity of i.
|
|
42
|
+
(returns -1 if i is not homogeneous)
|
|
43
|
+
ASSUME: i is a homogeneous ideal of the basering S=K[x(0)..x(n)].
|
|
44
|
+
e=0: (default)
|
|
45
|
+
If K is an infinite field, makes random changes of coordinates.
|
|
46
|
+
If K is a finite field, works over a transcendental extension.
|
|
47
|
+
e=1: Makes random changes of coordinates even when K is finite.
|
|
48
|
+
It works if it terminates, but may result in an infinite
|
|
49
|
+
loop. After 30 loops, a warning message is displayed and
|
|
50
|
+
-1 is returned.
|
|
51
|
+
NOTE: If printlevel > 0 (default = 0), additional info is displayed:
|
|
52
|
+
dim(S/i), depth(S/i) and end(H^(depth(S/i))(S/i)) are computed,
|
|
53
|
+
and an upper bound for the a-invariant of S/i is given.
|
|
54
|
+
The algorithm also determines whether the regularity is attained
|
|
55
|
+
or not at the last step of a minimal graded free resolution of i,
|
|
56
|
+
and if the answer is positive, the regularity of the Hilbert
|
|
57
|
+
function of S/i is given.
|
|
58
|
+
EXAMPLE: example regIdeal; shows some examples
|
|
59
|
+
"
|
|
60
|
+
{
|
|
61
|
+
//--------------------------- initialisation ---------------------------------
|
|
62
|
+
int e,ii,jj,H,h,d,time,lastv,sat,firstind,zz;
|
|
63
|
+
int lastind,ch,nesttest,NPtest,nl,N,acc;
|
|
64
|
+
intmat ran;
|
|
65
|
+
string s;
|
|
66
|
+
def r0 = basering;
|
|
67
|
+
int n = nvars(r0)-1;
|
|
68
|
+
if ( size(#) > 0 )
|
|
69
|
+
{
|
|
70
|
+
e = #[1];
|
|
71
|
+
}
|
|
72
|
+
list l1;
|
|
73
|
+
for (zz = 0; zz<= n; zz++)
|
|
74
|
+
{
|
|
75
|
+
l1[zz+1] = "x("+string(zz)+")";
|
|
76
|
+
}
|
|
77
|
+
ring r1 = create_ring(ring_list(r0)[1], l1, "dp", "no_minpoly");
|
|
78
|
+
ideal i,sbi,I,J,K,chcoord,m;
|
|
79
|
+
poly P;
|
|
80
|
+
map phi;
|
|
81
|
+
i = fetch(r0,i);
|
|
82
|
+
time=rtimer;
|
|
83
|
+
sbi=std(i);
|
|
84
|
+
ch=char(r1);
|
|
85
|
+
//----- Check ideal homogeneous
|
|
86
|
+
if ( homog(sbi) == 0 )
|
|
87
|
+
{
|
|
88
|
+
"// WARNING from proc regIdeal from lib mregular.lib:
|
|
89
|
+
// The ideal is not homogeneous!";
|
|
90
|
+
return (-1);
|
|
91
|
+
}
|
|
92
|
+
I=simplify(lead(sbi),1);
|
|
93
|
+
attrib(I,"isSB",1);
|
|
94
|
+
d=dim(I);
|
|
95
|
+
//----- If the ideal i is not proper:
|
|
96
|
+
if ( d == -1 )
|
|
97
|
+
{
|
|
98
|
+
dbprint(printlevel-voice+2,
|
|
99
|
+
"// The ideal i is (1)!
|
|
100
|
+
// Its Castelnuovo-Mumford regularity is:");
|
|
101
|
+
return (0);
|
|
102
|
+
}
|
|
103
|
+
//----- If the ideal i is 0:
|
|
104
|
+
if ( size(I) == 0 )
|
|
105
|
+
{
|
|
106
|
+
dbprint(printlevel-voice+2,
|
|
107
|
+
"// The ideal i is (0)!
|
|
108
|
+
// Its Castelnuovo-Mumford regularity is:");
|
|
109
|
+
return (0);
|
|
110
|
+
}
|
|
111
|
+
//----- When the ideal i is 0-dimensional:
|
|
112
|
+
if ( d == 0 )
|
|
113
|
+
{
|
|
114
|
+
H=maxdeg1(minbase(quotient(I,maxideal(1))))+1;
|
|
115
|
+
time=rtimer-time;
|
|
116
|
+
// Additional information:
|
|
117
|
+
dbprint(printlevel-voice+2,
|
|
118
|
+
"// Dimension of S/i : 0");
|
|
119
|
+
dbprint(printlevel-voice+2,
|
|
120
|
+
"// Time for computing regularity: " + string(time) + " sec.");
|
|
121
|
+
dbprint(printlevel-voice+2,
|
|
122
|
+
"// The Castelnuovo-Mumford regularity of i coincides with its satiety, and
|
|
123
|
+
// with the regularity of the Hilbert function of S/i. Its value is:");
|
|
124
|
+
return (H);
|
|
125
|
+
}
|
|
126
|
+
//----- Determine the situation: NT, or NP, or nothing.
|
|
127
|
+
//----- Choose the method depending on the situation, on the
|
|
128
|
+
//----- characteristic of the ground field, and on the option argument
|
|
129
|
+
//----- in order to get the mon. ideal of nested type associated to i
|
|
130
|
+
if ( e == 1 )
|
|
131
|
+
{ ch=0; }
|
|
132
|
+
NPtest=is_NP(I);
|
|
133
|
+
if ( NPtest == 1 )
|
|
134
|
+
{
|
|
135
|
+
nesttest=is_nested(I);
|
|
136
|
+
}
|
|
137
|
+
if ( ch != 0 )
|
|
138
|
+
{
|
|
139
|
+
if ( NPtest == 0 )
|
|
140
|
+
{
|
|
141
|
+
N=d*n-d*(d-1)/2;
|
|
142
|
+
string l2 = "("+string(ch)+"";
|
|
143
|
+
for (zz = 1; zz <= N; zz++)
|
|
144
|
+
{
|
|
145
|
+
l2 = l2+",t("+string(zz)+")";
|
|
146
|
+
}
|
|
147
|
+
l2 = l2+")";
|
|
148
|
+
list l3;
|
|
149
|
+
for (zz = 0; zz<= n; zz++)
|
|
150
|
+
{
|
|
151
|
+
l3[zz+1] = "x("+string(zz)+")";
|
|
152
|
+
}
|
|
153
|
+
ring rtr = create_ring(l2, l3, "dp");
|
|
154
|
+
ideal chcoord,m,i,I;
|
|
155
|
+
poly P;
|
|
156
|
+
map phi;
|
|
157
|
+
i=imap(r1,i);
|
|
158
|
+
chcoord=select1(maxideal(1),1..(n-d+1));
|
|
159
|
+
acc=0;
|
|
160
|
+
for ( ii = 1; ii<=d; ii++ )
|
|
161
|
+
{
|
|
162
|
+
matrix trex[1][n-d+ii+1]=t((1+acc)..(n-d+ii+acc)),1;
|
|
163
|
+
m=select1(maxideal(1),1..(n-d+1+ii));
|
|
164
|
+
for ( jj = 1; jj<=n-d+ii+1; jj++ )
|
|
165
|
+
{
|
|
166
|
+
P=P+trex[1,jj]*m[jj];
|
|
167
|
+
}
|
|
168
|
+
chcoord[n-d+1+ii]=P;
|
|
169
|
+
P=0;
|
|
170
|
+
acc=acc+n-d+ii;
|
|
171
|
+
kill trex;
|
|
172
|
+
}
|
|
173
|
+
phi=rtr,chcoord;
|
|
174
|
+
I=simplify(lead(std(phi(i))),1);
|
|
175
|
+
setring r1;
|
|
176
|
+
I=imap(rtr,I);
|
|
177
|
+
attrib(I,"isSB",1);
|
|
178
|
+
}
|
|
179
|
+
else
|
|
180
|
+
{
|
|
181
|
+
if ( nesttest == 0 )
|
|
182
|
+
{
|
|
183
|
+
N=d*(d-1)/2;
|
|
184
|
+
string l4 = "("+string(ch)+"";
|
|
185
|
+
for (zz = 1; zz <= N; zz++)
|
|
186
|
+
{
|
|
187
|
+
l4 = l4+",t("+string(zz)+")";
|
|
188
|
+
}
|
|
189
|
+
l4 = l4+")";
|
|
190
|
+
list l5;
|
|
191
|
+
for (int zz = 0; zz<= n; zz++)
|
|
192
|
+
{
|
|
193
|
+
l5[zz+1] = "x("+string(zz)+")";
|
|
194
|
+
}
|
|
195
|
+
ring rtr = create_ring(l4, l5, "dp");
|
|
196
|
+
ideal chcoord,m,i,I;
|
|
197
|
+
poly P;
|
|
198
|
+
map phi;
|
|
199
|
+
i=imap(r1,i);
|
|
200
|
+
chcoord=select1(maxideal(1),1..(n-d+2));
|
|
201
|
+
acc=0;
|
|
202
|
+
for ( ii = 1; ii<=d-1; ii++ )
|
|
203
|
+
{
|
|
204
|
+
matrix trex[1][ii+1]=t((1+acc)..(ii+acc)),1;
|
|
205
|
+
m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
|
|
206
|
+
for ( jj = 1; jj<=ii+1; jj++ )
|
|
207
|
+
{
|
|
208
|
+
P=P+trex[1,jj]*m[jj];
|
|
209
|
+
}
|
|
210
|
+
chcoord[n-d+2+ii]=P;
|
|
211
|
+
P=0;
|
|
212
|
+
acc=acc+ii;
|
|
213
|
+
kill trex;
|
|
214
|
+
}
|
|
215
|
+
phi=rtr,chcoord;
|
|
216
|
+
I=simplify(lead(std(phi(i))),1);
|
|
217
|
+
setring r1;
|
|
218
|
+
I=imap(rtr,I);
|
|
219
|
+
attrib(I,"isSB",1);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
else
|
|
224
|
+
{
|
|
225
|
+
if ( NPtest == 0 )
|
|
226
|
+
{
|
|
227
|
+
while ( nl < 30 )
|
|
228
|
+
{
|
|
229
|
+
chcoord=select1(maxideal(1),1..(n-d+1));
|
|
230
|
+
nl=nl+1;
|
|
231
|
+
for ( ii = 1; ii<=d; ii++ )
|
|
232
|
+
{
|
|
233
|
+
ran=random(100,1,n-d+ii);
|
|
234
|
+
ran=intmat(ran,1,n-d+ii+1);
|
|
235
|
+
ran[1,n-d+ii+1]=1;
|
|
236
|
+
m=select1(maxideal(1),1..(n-d+1+ii));
|
|
237
|
+
for ( jj = 1; jj<=n-d+ii+1; jj++ )
|
|
238
|
+
{
|
|
239
|
+
P=P+ran[1,jj]*m[jj];
|
|
240
|
+
}
|
|
241
|
+
chcoord[n-d+1+ii]=P;
|
|
242
|
+
P=0;
|
|
243
|
+
}
|
|
244
|
+
phi=r1,chcoord;
|
|
245
|
+
dbprint(printlevel-voice+2,"// (1 random change of coord.)");
|
|
246
|
+
I=simplify(lead(std(phi(i))),1);
|
|
247
|
+
attrib(I,"isSB",1);
|
|
248
|
+
NPtest=is_NP(I);
|
|
249
|
+
if ( NPtest == 1 )
|
|
250
|
+
{
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
if ( NPtest == 0 )
|
|
255
|
+
{
|
|
256
|
+
"// WARNING from proc regIdeal from lib mregular.lib:
|
|
257
|
+
// The procedure has entered in 30 loops and could not put the variables
|
|
258
|
+
// in Noether position: in your example the method using random changes
|
|
259
|
+
// of coordinates may enter an infinite loop when the field is finite.
|
|
260
|
+
// Try removing this optional argument.";
|
|
261
|
+
return (-1);
|
|
262
|
+
}
|
|
263
|
+
i=phi(i);
|
|
264
|
+
nesttest=is_nested(I);
|
|
265
|
+
}
|
|
266
|
+
if ( nesttest == 0 )
|
|
267
|
+
{
|
|
268
|
+
while ( nl < 30 )
|
|
269
|
+
{
|
|
270
|
+
chcoord=select1(maxideal(1),1..(n-d+2));
|
|
271
|
+
nl=nl+1;
|
|
272
|
+
for ( ii = 1; ii<=d-1; ii++ )
|
|
273
|
+
{
|
|
274
|
+
ran=random(100,1,ii);
|
|
275
|
+
ran=intmat(ran,1,ii+1);
|
|
276
|
+
ran[1,ii+1]=1;
|
|
277
|
+
m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
|
|
278
|
+
for ( jj = 1; jj<=ii+1; jj++ )
|
|
279
|
+
{
|
|
280
|
+
P=P+ran[1,jj]*m[jj];
|
|
281
|
+
}
|
|
282
|
+
chcoord[n-d+2+ii]=P;
|
|
283
|
+
P=0;
|
|
284
|
+
}
|
|
285
|
+
phi=r1,chcoord;
|
|
286
|
+
dbprint(printlevel-voice+2,"// (1 random change of coord.)");
|
|
287
|
+
I=simplify(lead(std(phi(i))),1);
|
|
288
|
+
attrib(I,"isSB",1);
|
|
289
|
+
nesttest=is_nested(I);
|
|
290
|
+
if ( nesttest == 1 )
|
|
291
|
+
{
|
|
292
|
+
break;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
if ( nesttest == 0 )
|
|
296
|
+
{
|
|
297
|
+
"// WARNING from proc regIdeal from lib mregular.lib:
|
|
298
|
+
// The procedure has entered in 30 loops and could not find a monomial
|
|
299
|
+
// ideal of nested type with the same regularity as your ideal: in your
|
|
300
|
+
// example the method using random changes of coordinates may enter an
|
|
301
|
+
// infinite loop when the field is finite.
|
|
302
|
+
// Try removing this optional argument.";
|
|
303
|
+
return (-1);
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
//
|
|
308
|
+
// At this stage, we have obtained a monomial ideal I of nested type
|
|
309
|
+
// such that reg(i)=reg(I). We now compute reg(I).
|
|
310
|
+
//
|
|
311
|
+
//----- When S/i is Cohen-Macaulay:
|
|
312
|
+
for ( ii = n-d+2; ii <= n+1; ii++ )
|
|
313
|
+
{
|
|
314
|
+
K=K+select(I,ii);
|
|
315
|
+
}
|
|
316
|
+
if ( size(K) == 0 )
|
|
317
|
+
{
|
|
318
|
+
list l6;
|
|
319
|
+
for (zz = 0; zz<= n-d; zz++)
|
|
320
|
+
{
|
|
321
|
+
l6[zz+1] = "x("+string(zz)+")";
|
|
322
|
+
}
|
|
323
|
+
ring nr = create_ring(ring_list(r0)[1], l6, "dp", "no_minpoly");
|
|
324
|
+
ideal I;
|
|
325
|
+
I = imap(r1,I);
|
|
326
|
+
H=maxdeg1(minbase(quotient(I,maxideal(1))))+1;
|
|
327
|
+
time=rtimer-time;
|
|
328
|
+
// Additional information:
|
|
329
|
+
dbprint(printlevel-voice+2,
|
|
330
|
+
"// S/i is Cohen-Macaulay");
|
|
331
|
+
dbprint(printlevel-voice+2,
|
|
332
|
+
"// Dimension of S/i ( = depth(S/i) ): "+string(d));
|
|
333
|
+
dbprint(printlevel-voice+2,
|
|
334
|
+
"// Regularity attained at the last step of m.g.f.r. of i: YES");
|
|
335
|
+
dbprint(printlevel-voice+2,
|
|
336
|
+
"// Regularity of the Hilbert function of S/i: " + string(H-d));
|
|
337
|
+
dbprint(printlevel-voice+2,
|
|
338
|
+
"// Time for computing regularity: " + string(time) + " sec.");
|
|
339
|
+
dbprint(printlevel-voice+2,
|
|
340
|
+
"// The Castelnuovo-Mumford regularity of i is:");
|
|
341
|
+
return(H);
|
|
342
|
+
}
|
|
343
|
+
//----- When d=1:
|
|
344
|
+
if ( d == 1 )
|
|
345
|
+
{
|
|
346
|
+
H=maxdeg1(simplify(reduce(quotient(I,maxideal(1)),I),2))+1;
|
|
347
|
+
sat=H;
|
|
348
|
+
J=subst(I,x(n),1);
|
|
349
|
+
list l7;
|
|
350
|
+
for (zz = 0; zz<= n-1; zz++)
|
|
351
|
+
{
|
|
352
|
+
l7[zz+1] = "x("+string(zz)+")";
|
|
353
|
+
}
|
|
354
|
+
ring nr = create_ring(ring_list(r0)[1], l7, "dp", "no_minpoly");
|
|
355
|
+
ideal J=imap(r1,J);
|
|
356
|
+
attrib(J,"isSB",1);
|
|
357
|
+
h=maxdeg1(minbase(quotient(J,maxideal(1))))+1;
|
|
358
|
+
time=rtimer-time;
|
|
359
|
+
if ( h > H )
|
|
360
|
+
{
|
|
361
|
+
H=h;
|
|
362
|
+
}
|
|
363
|
+
// Additional information:
|
|
364
|
+
dbprint(printlevel-voice+2,
|
|
365
|
+
"// Dimension of S/i: 1");
|
|
366
|
+
dbprint(printlevel-voice+2,
|
|
367
|
+
"// Depth of S/i: 0");
|
|
368
|
+
dbprint(printlevel-voice+2,
|
|
369
|
+
"// Satiety of i: "+string(sat));
|
|
370
|
+
dbprint(printlevel-voice+2,
|
|
371
|
+
"// Upper bound for the a-invariant of S/i: end(H^1(S/i)) <= "+
|
|
372
|
+
string(h-2));
|
|
373
|
+
if ( H == sat )
|
|
374
|
+
{
|
|
375
|
+
dbprint(printlevel-voice+2,
|
|
376
|
+
"// Regularity attained at the last step of m.g.f.r. of i: YES");
|
|
377
|
+
dbprint(printlevel-voice+2,
|
|
378
|
+
"// Regularity of the Hilbert function of S/i: "+string(H));
|
|
379
|
+
}
|
|
380
|
+
else
|
|
381
|
+
{
|
|
382
|
+
dbprint(printlevel-voice+2,
|
|
383
|
+
"// Regularity attained at the last step of m.g.f.r. of i: NO");
|
|
384
|
+
}
|
|
385
|
+
dbprint(printlevel-voice+2,
|
|
386
|
+
"// Time for computing regularity: "+ string(time) + " sec.");
|
|
387
|
+
dbprint(printlevel-voice+2,
|
|
388
|
+
"// The Castelnuovo-Mumford regularity of i is:");
|
|
389
|
+
return(H);
|
|
390
|
+
}
|
|
391
|
+
//----- Now d>1 and S/i is not Cohen-Macaulay:
|
|
392
|
+
//
|
|
393
|
+
//----- First, determine the last variable really occurring
|
|
394
|
+
lastv=n-d;
|
|
395
|
+
h=n;
|
|
396
|
+
while ( lastv == n-d and h > n-d )
|
|
397
|
+
{
|
|
398
|
+
K=select(I,h+1);
|
|
399
|
+
if ( size(K) == 0 )
|
|
400
|
+
{
|
|
401
|
+
h=h-1;
|
|
402
|
+
}
|
|
403
|
+
else
|
|
404
|
+
{
|
|
405
|
+
lastv=h;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
//----- and compute Castelnuovo-Mumford regularity:
|
|
409
|
+
list l8;
|
|
410
|
+
for (zz = 0; zz<= lastv; zz++)
|
|
411
|
+
{
|
|
412
|
+
l8[zz+1] = "x("+string(zz)+")";
|
|
413
|
+
}
|
|
414
|
+
ring nr = create_ring(ring_list(r0)[1], l8, "dp", "no_minpoly");
|
|
415
|
+
ideal I,K,KK,LL;
|
|
416
|
+
I=imap(r1,I);
|
|
417
|
+
attrib(I,"isSB",1);
|
|
418
|
+
K=simplify(reduce(quotient(I,maxideal(1)),I),2);
|
|
419
|
+
H=maxdeg1(K)+1;
|
|
420
|
+
firstind=H;
|
|
421
|
+
KK=minbase(subst(I,x(lastv),1));
|
|
422
|
+
list l9;
|
|
423
|
+
for ( ii = n-lastv; ii<=d-2; ii++ )
|
|
424
|
+
{
|
|
425
|
+
LL=minbase(subst(I,x(n-ii-1),1));
|
|
426
|
+
attrib(LL,"isSB",1);
|
|
427
|
+
for (zz = 0; zz<= n-ii-1; zz++)
|
|
428
|
+
{
|
|
429
|
+
l9[zz+1] = "x("+string(zz)+")";
|
|
430
|
+
}
|
|
431
|
+
ring mr = create_ring(ring_list(r0)[1], l9, "dp", "no_minpoly");
|
|
432
|
+
ideal K,KK;
|
|
433
|
+
KK=imap(nr,KK);
|
|
434
|
+
attrib(KK,"isSB",1);
|
|
435
|
+
K=simplify(reduce(quotient(KK,maxideal(1)),KK),2);
|
|
436
|
+
h=maxdeg1(K)+1;
|
|
437
|
+
if ( h > H )
|
|
438
|
+
{
|
|
439
|
+
H=h;
|
|
440
|
+
}
|
|
441
|
+
setring nr;
|
|
442
|
+
kill mr;
|
|
443
|
+
KK=LL;
|
|
444
|
+
}
|
|
445
|
+
// We must determine one more sat. index:
|
|
446
|
+
list l10;
|
|
447
|
+
for (zz = 0; zz<= n-d; zz++)
|
|
448
|
+
{
|
|
449
|
+
l10[zz+1] = "x("+string(zz)+")";
|
|
450
|
+
}
|
|
451
|
+
ring mr = create_ring(ring_list(r0)[1], l10, "dp", "no_minpoly");
|
|
452
|
+
ideal KK,K;
|
|
453
|
+
KK=imap(nr,KK);
|
|
454
|
+
attrib(KK,"isSB",1);
|
|
455
|
+
K=simplify(reduce(quotient(KK,maxideal(1)),KK),2);
|
|
456
|
+
h=maxdeg1(K)+1;
|
|
457
|
+
lastind=h;
|
|
458
|
+
if ( h > H )
|
|
459
|
+
{
|
|
460
|
+
H=h;
|
|
461
|
+
}
|
|
462
|
+
setring nr;
|
|
463
|
+
kill mr;
|
|
464
|
+
time=rtimer-time;
|
|
465
|
+
// Additional information:
|
|
466
|
+
dbprint(printlevel-voice+2,
|
|
467
|
+
"// Dimension of S/i: "+string(d));
|
|
468
|
+
dbprint(printlevel-voice+2,
|
|
469
|
+
"// Depth of S/i: "+string(n-lastv));
|
|
470
|
+
dbprint(printlevel-voice+2,
|
|
471
|
+
"// end(H^"+string(n-lastv)+"(S/i)) = "
|
|
472
|
+
+string(firstind-n+lastv-1));
|
|
473
|
+
dbprint(printlevel-voice+2,
|
|
474
|
+
"// Upper bound for the a-invariant of S/i: end(H^"
|
|
475
|
+
+string(d)+"(S/i)) <= "+string(lastind-d-1));
|
|
476
|
+
if ( H == firstind )
|
|
477
|
+
{
|
|
478
|
+
dbprint(printlevel-voice+2,
|
|
479
|
+
"// Regularity attained at the last step of m.g.f.r. of i: YES");
|
|
480
|
+
dbprint(printlevel-voice+2,
|
|
481
|
+
"// Regularity of the Hilbert function of S/i: "
|
|
482
|
+
+string(H-n+lastv));
|
|
483
|
+
}
|
|
484
|
+
else
|
|
485
|
+
{
|
|
486
|
+
dbprint(printlevel-voice+2,
|
|
487
|
+
"// Regularity attained at the last step of m.g.f.r. of i: NO");
|
|
488
|
+
}
|
|
489
|
+
dbprint(printlevel-voice+2,
|
|
490
|
+
"// Time for computing regularity: "+ string(time) + " sec.");
|
|
491
|
+
dbprint(printlevel-voice+2,
|
|
492
|
+
"// The Castelnuovo-Mumford regularity of i is:");
|
|
493
|
+
return(H);
|
|
494
|
+
}
|
|
495
|
+
example
|
|
496
|
+
{ "EXAMPLE:"; echo = 2;
|
|
497
|
+
ring r=0,(x,y,z,t,w),dp;
|
|
498
|
+
ideal i=y2t,x2y-x2z+yt2,x2y2,xyztw,x3z2,y5+xz3w-x2zw2,x7-yt2w4;
|
|
499
|
+
regIdeal(i);
|
|
500
|
+
regIdeal(lead(std(i)));
|
|
501
|
+
// Additional information is displayed if you change printlevel (=1);
|
|
502
|
+
}
|
|
503
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
504
|
+
/*
|
|
505
|
+
Out-commented examples:
|
|
506
|
+
//
|
|
507
|
+
ring s=0,x(0..5),dp;
|
|
508
|
+
ideal i=x(2)^2-x(4)*x(5),x(1)*x(2)-x(0)*x(5),x(0)*x(2)-x(1)*x(4),
|
|
509
|
+
x(1)^2-x(3)*x(5),x(0)*x(1)-x(2)*x(3),x(0)^2-x(3)*x(4);
|
|
510
|
+
regIdeal(i);
|
|
511
|
+
// Our procedure works when a min. graded free resol. can
|
|
512
|
+
// not be computed. In this easy example, regularity can also
|
|
513
|
+
// be obtained using a m.g.f.r.:
|
|
514
|
+
nrows(betti(mres(i,0)));
|
|
515
|
+
ring r1=0,(x,y,z,t),dp;
|
|
516
|
+
// Ex.2.5 in [Bermejo-Gimenez], Proc.Amer.Math.Soc. 128(5):
|
|
517
|
+
ideal i = x17y14-y31, x20y13, x60-y36z24-x20z20t20;
|
|
518
|
+
regIdeal(i);
|
|
519
|
+
// Ex.2.9 in [Bermejo-Gimenez], Proc.Amer.Math.Soc. 128(5):
|
|
520
|
+
int k=43;
|
|
521
|
+
ideal j=x17y14-y31,x20y13,x60-y36z24-x20z20t20,y41*z^k-y40*z^(k+1);
|
|
522
|
+
regIdeal(j);
|
|
523
|
+
k=14;
|
|
524
|
+
j=x17y14-y31,x20y13,x60-y36z24-x20z20t20,y41*z^k-y40*z^(k+1);
|
|
525
|
+
regIdeal(j);
|
|
526
|
+
k=22;
|
|
527
|
+
j=x17y14-y31,x20y13,x60-y36z24-x20z20t20,y41*z^k-y40*z^(k+1);
|
|
528
|
+
regIdeal(j);
|
|
529
|
+
k=315;
|
|
530
|
+
j=x17y14-y31,x20y13,x60-y36z24-x20z20t20,y41*z^k-y40*z^(k+1);
|
|
531
|
+
regIdeal(j);
|
|
532
|
+
// Example in Rk.2.10 in [Bermejo-Gimenez], ProcAMS 128(5):
|
|
533
|
+
ideal h=x2-3xy+5xt,xy-3y2+5yt,xz-3yz,2xt-yt,y2-yz-2yt;
|
|
534
|
+
regIdeal(h);
|
|
535
|
+
// The initial ideal is not saturated
|
|
536
|
+
regIdeal(lead(std(h)));
|
|
537
|
+
// More examples:
|
|
538
|
+
i=y4-t3z, x3t-y2z2, x3y2-t2z3, x6-tz5;
|
|
539
|
+
regIdeal(i);
|
|
540
|
+
//
|
|
541
|
+
regIdeal(maxideal(4));
|
|
542
|
+
//
|
|
543
|
+
ring r2=0,(x,y,z,t,w),dp;
|
|
544
|
+
ideal i = xy-zw,x3-yw2,x2z-y2w,y3-xz2,-y2z3+xw4+tw4+w5,-yz4+x2w3+xtw3+xw4,
|
|
545
|
+
-z5+x2tw2+x2w3+yw4;
|
|
546
|
+
regIdeal(i);
|
|
547
|
+
//
|
|
548
|
+
ring r3=0,(x,y,z,t,w,u),dp;
|
|
549
|
+
ideal i=imap(r2,i);
|
|
550
|
+
regIdeal(i);
|
|
551
|
+
// Next example is the defining ideal of the 2nd. Veronesean of P3, a variety
|
|
552
|
+
// in P8 which is arithmetically Cohen-Macaulay:
|
|
553
|
+
ring r4=0,(a,b,c,d,x(0..9)),dp;
|
|
554
|
+
ideal i= x(0)-ab,x(1)-ac,x(2)-ad,x(3)-bc,x(4)-bd,x(5)-cd,
|
|
555
|
+
x(6)-a2,x(7)-b2,x(8)-c2,x(9)-d2;
|
|
556
|
+
ideal ei=eliminate(i,abcd);
|
|
557
|
+
ring r5=0,x(0..9),dp;
|
|
558
|
+
ideal i=imap(r4,ei);
|
|
559
|
+
regIdeal(i);
|
|
560
|
+
// Here is an example where the computation of a m.g.f.r. of I costs:
|
|
561
|
+
ring r8=0,(x,y,z,t,u,a,b),dp;
|
|
562
|
+
ideal i=u-b40,t-a40,x-a23b17,y-a22b18+ab39,z-a25b15;
|
|
563
|
+
ideal ei=eliminate(i,ab); // It takes a few seconds to compute the ideal
|
|
564
|
+
ring r9=0,(x,y,z,t,u),dp;
|
|
565
|
+
ideal i=imap(r8,ei);
|
|
566
|
+
regIdeal(i); // This is very fast.
|
|
567
|
+
// Now you can use mres(i,0) to compute a m.g.f.r. of the ideal!
|
|
568
|
+
//
|
|
569
|
+
// The computation of the m.g.f.r. of the following example did not succeed
|
|
570
|
+
// using the command mres:
|
|
571
|
+
ring r10=0,(x(0..8),s,t),dp;
|
|
572
|
+
ideal i=x(0)-st24,x(1)-s2t23,x(2)-s3t22,x(3)-s9t16,x(4)-s11t14,x(5)-s18t7,
|
|
573
|
+
x(6)-s24t,x(7)-t25,x(8)-s25;
|
|
574
|
+
ideal ei=eliminate(i,st);
|
|
575
|
+
ring r11=0,x(0..8),dp;
|
|
576
|
+
ideal i=imap(r10,ei);
|
|
577
|
+
regIdeal(i);
|
|
578
|
+
// More examples where not even sres works:
|
|
579
|
+
// Be careful: elimination takes some time here, but it succeeds!
|
|
580
|
+
ring r12=0,(s,t,u,x(0..14)),dp;
|
|
581
|
+
ideal i=x(0)-st6u8,x(1)-s5t3u7,x(2)-t11u4,x(3)-s9t4u2,x(4)-s2t7u6,x(5)-s7t7u,
|
|
582
|
+
x(6)-s10t5,x(7)-s4t6u5,x(8)-s13tu,x(9)-s14u,x(10)-st2u12,x(11)-s3t9u3,
|
|
583
|
+
x(12)-s15,x(13)-t15,x(14)-u15;
|
|
584
|
+
ideal ei=eliminate(i,stu);
|
|
585
|
+
size(ei);
|
|
586
|
+
ring r13=0,x(0..14),dp;
|
|
587
|
+
ideal i=imap(r12,ei);
|
|
588
|
+
size(i);
|
|
589
|
+
regIdeal(i);
|
|
590
|
+
*/
|
|
591
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
592
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
593
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
594
|
+
|
|
595
|
+
proc depthIdeal (ideal i, list #)
|
|
596
|
+
"
|
|
597
|
+
USAGE: depthIdeal (i[,e]); i ideal, e integer
|
|
598
|
+
RETURN: an integer, the depth of S/i where S=K[x(0)..x(n)] is the basering.
|
|
599
|
+
(returns -1 if i is not homogeneous or if i=(1))
|
|
600
|
+
ASSUME: i is a proper homogeneous ideal.
|
|
601
|
+
e=0: (default)
|
|
602
|
+
If K is an infinite field, makes random changes of coordinates.
|
|
603
|
+
If K is a finite field, works over a transcendental extension.
|
|
604
|
+
e=1: Makes random changes of coordinates even when K is finite.
|
|
605
|
+
It works if it terminates, but may result in an infinite
|
|
606
|
+
loop. After 30 loops, a warning message is displayed and
|
|
607
|
+
-1 is returned.
|
|
608
|
+
NOTE: If printlevel > 0 (default = 0), dim(S/i) is also displayed.
|
|
609
|
+
EXAMPLE: example depthIdeal; shows some examples
|
|
610
|
+
"
|
|
611
|
+
{
|
|
612
|
+
//--------------------------- initialisation ---------------------------------
|
|
613
|
+
int e,ii,jj,h,d,time,lastv,ch,nesttest,NPtest,nl,N,acc,zz;
|
|
614
|
+
intmat ran;
|
|
615
|
+
def r0 = basering;
|
|
616
|
+
int n = nvars(r0)-1;
|
|
617
|
+
if ( size(#) > 0 )
|
|
618
|
+
{
|
|
619
|
+
e = #[1];
|
|
620
|
+
}
|
|
621
|
+
list l11;
|
|
622
|
+
for (zz = 0; zz<= n; zz++)
|
|
623
|
+
{
|
|
624
|
+
l11[zz+1] = "x("+string(zz)+")";
|
|
625
|
+
}
|
|
626
|
+
ring r1 = create_ring(ring_list(r0)[1], l11, "dp", "no_minpoly");
|
|
627
|
+
ideal i,sbi,I,J,K,chcoord,m;
|
|
628
|
+
poly P;
|
|
629
|
+
map phi;
|
|
630
|
+
i = fetch(r0,i);
|
|
631
|
+
time=rtimer;
|
|
632
|
+
sbi=std(i);
|
|
633
|
+
ch=char(r1);
|
|
634
|
+
//----- Check ideal homogeneous
|
|
635
|
+
if ( homog(sbi) == 0 )
|
|
636
|
+
{
|
|
637
|
+
"// WARNING from proc depthIdeal from lib mregular.lib:
|
|
638
|
+
// The ideal is not homogeneous!";
|
|
639
|
+
return (-1);
|
|
640
|
+
}
|
|
641
|
+
I=simplify(lead(sbi),1);
|
|
642
|
+
attrib(I,"isSB",1);
|
|
643
|
+
d=dim(I);
|
|
644
|
+
//----- If the ideal i is not proper:
|
|
645
|
+
if ( d == -1 )
|
|
646
|
+
{
|
|
647
|
+
"// WARNING from proc depthIdeal from lib mregular.lib:
|
|
648
|
+
// The ideal i is (1)!";
|
|
649
|
+
return (-1);
|
|
650
|
+
}
|
|
651
|
+
//----- If the ideal i is 0:
|
|
652
|
+
if ( size(I) == 0 )
|
|
653
|
+
{
|
|
654
|
+
dbprint(printlevel-voice+2,
|
|
655
|
+
"// The ideal i is (0)!
|
|
656
|
+
// The depth of S/i is:");
|
|
657
|
+
return (d);
|
|
658
|
+
}
|
|
659
|
+
//----- When the ideal i is 0-dimensional:
|
|
660
|
+
if ( d == 0 )
|
|
661
|
+
{
|
|
662
|
+
time=rtimer-time;
|
|
663
|
+
// Additional information:
|
|
664
|
+
dbprint(printlevel-voice+2,
|
|
665
|
+
"// Dimension of S/i : 0 (S/i is Cohen-Macaulay)");
|
|
666
|
+
dbprint(printlevel-voice+2,
|
|
667
|
+
"// Time for computing the depth: " + string(time) + " sec.");
|
|
668
|
+
dbprint(printlevel-voice+2,
|
|
669
|
+
"// The depth of S/i is:");
|
|
670
|
+
return (0);
|
|
671
|
+
}
|
|
672
|
+
//----- Determine the situation: NT, or NP, or nothing.
|
|
673
|
+
//----- Choose the method depending on the situation, on the
|
|
674
|
+
//----- characteristic of the ground field, and on the option argument
|
|
675
|
+
//----- in order to get the mon. ideal of nested type associated to i
|
|
676
|
+
if ( e == 1 )
|
|
677
|
+
{
|
|
678
|
+
ch=0;
|
|
679
|
+
}
|
|
680
|
+
NPtest=is_NP(I);
|
|
681
|
+
if ( NPtest == 1 )
|
|
682
|
+
{
|
|
683
|
+
nesttest=is_nested(I);
|
|
684
|
+
}
|
|
685
|
+
if ( ch != 0 )
|
|
686
|
+
{
|
|
687
|
+
if ( NPtest == 0 )
|
|
688
|
+
{
|
|
689
|
+
N=d*n-d*(d-1)/2;
|
|
690
|
+
string l12 = "("+string(ch)+"";
|
|
691
|
+
for (zz = 1; zz <= N; zz++)
|
|
692
|
+
{
|
|
693
|
+
l12 = l12+",t("+string(zz)+")";
|
|
694
|
+
}
|
|
695
|
+
l12 = l12+")";
|
|
696
|
+
list l13;
|
|
697
|
+
for (int zz = 0; zz<= n; zz++)
|
|
698
|
+
{
|
|
699
|
+
l13[zz+1] = "x("+string(zz)+")";
|
|
700
|
+
}
|
|
701
|
+
ring rtr = create_ring(l12, l13, "dp");
|
|
702
|
+
ideal chcoord,m,i,I;
|
|
703
|
+
poly P;
|
|
704
|
+
map phi;
|
|
705
|
+
i=imap(r1,i);
|
|
706
|
+
chcoord=select1(maxideal(1),1..(n-d+1));
|
|
707
|
+
acc=0;
|
|
708
|
+
for ( ii = 1; ii<=d; ii++ )
|
|
709
|
+
{
|
|
710
|
+
matrix trex[1][n-d+ii+1]=t((1+acc)..(n-d+ii+acc)),1;
|
|
711
|
+
m=select1(maxideal(1),1..(n-d+1+ii));
|
|
712
|
+
for ( jj = 1; jj<=n-d+ii+1; jj++ )
|
|
713
|
+
{
|
|
714
|
+
P=P+trex[1,jj]*m[jj];
|
|
715
|
+
}
|
|
716
|
+
chcoord[n-d+1+ii]=P;
|
|
717
|
+
P=0;
|
|
718
|
+
acc=acc+n-d+ii;
|
|
719
|
+
kill trex;
|
|
720
|
+
}
|
|
721
|
+
phi=rtr,chcoord;
|
|
722
|
+
I=simplify(lead(std(phi(i))),1);
|
|
723
|
+
setring r1;
|
|
724
|
+
I=imap(rtr,I);
|
|
725
|
+
attrib(I,"isSB",1);
|
|
726
|
+
}
|
|
727
|
+
else
|
|
728
|
+
{
|
|
729
|
+
if ( nesttest == 0 )
|
|
730
|
+
{
|
|
731
|
+
N=d*(d-1)/2;
|
|
732
|
+
string l14 = "("+string(ch)+"";
|
|
733
|
+
for (zz = 1; zz <= N; zz++)
|
|
734
|
+
{
|
|
735
|
+
l14 = l14+",t("+string(zz)+")";
|
|
736
|
+
}
|
|
737
|
+
l14 = l14+")";
|
|
738
|
+
list l15;
|
|
739
|
+
for (int zz = 0; zz<= n; zz++)
|
|
740
|
+
{
|
|
741
|
+
l15[zz+1] = "x("+string(zz)+")";
|
|
742
|
+
}
|
|
743
|
+
ring rtr = create_ring(l14, l15, "dp");
|
|
744
|
+
ideal chcoord,m,i,I;
|
|
745
|
+
poly P;
|
|
746
|
+
map phi;
|
|
747
|
+
i=imap(r1,i);
|
|
748
|
+
chcoord=select1(maxideal(1),1..(n-d+2));
|
|
749
|
+
acc=0;
|
|
750
|
+
for ( ii = 1; ii<=d-1; ii++ )
|
|
751
|
+
{
|
|
752
|
+
matrix trex[1][ii+1]=t((1+acc)..(ii+acc)),1;
|
|
753
|
+
m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
|
|
754
|
+
for ( jj = 1; jj<=ii+1; jj++ )
|
|
755
|
+
{
|
|
756
|
+
P=P+trex[1,jj]*m[jj];
|
|
757
|
+
}
|
|
758
|
+
chcoord[n-d+2+ii]=P;
|
|
759
|
+
P=0;
|
|
760
|
+
acc=acc+ii;
|
|
761
|
+
kill trex;
|
|
762
|
+
}
|
|
763
|
+
phi=rtr,chcoord;
|
|
764
|
+
I=simplify(lead(std(phi(i))),1);
|
|
765
|
+
setring r1;
|
|
766
|
+
I=imap(rtr,I);
|
|
767
|
+
attrib(I,"isSB",1);
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
else
|
|
772
|
+
{
|
|
773
|
+
if ( NPtest == 0 )
|
|
774
|
+
{
|
|
775
|
+
while ( nl < 30 )
|
|
776
|
+
{
|
|
777
|
+
chcoord=select1(maxideal(1),1..(n-d+1));
|
|
778
|
+
nl=nl+1;
|
|
779
|
+
for ( ii = 1; ii<=d; ii++ )
|
|
780
|
+
{
|
|
781
|
+
ran=random(100,1,n-d+ii);
|
|
782
|
+
ran=intmat(ran,1,n-d+ii+1);
|
|
783
|
+
ran[1,n-d+ii+1]=1;
|
|
784
|
+
m=select1(maxideal(1),1..(n-d+1+ii));
|
|
785
|
+
for ( jj = 1; jj<=n-d+ii+1; jj++ )
|
|
786
|
+
{
|
|
787
|
+
P=P+ran[1,jj]*m[jj];
|
|
788
|
+
}
|
|
789
|
+
chcoord[n-d+1+ii]=P;
|
|
790
|
+
P=0;
|
|
791
|
+
}
|
|
792
|
+
phi=r1,chcoord;
|
|
793
|
+
dbprint(printlevel-voice+2,"// (1 random change of coord.)");
|
|
794
|
+
I=simplify(lead(std(phi(i))),1);
|
|
795
|
+
attrib(I,"isSB",1);
|
|
796
|
+
NPtest=is_NP(I);
|
|
797
|
+
if ( NPtest == 1 )
|
|
798
|
+
{
|
|
799
|
+
break;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
if ( NPtest == 0 )
|
|
803
|
+
{
|
|
804
|
+
"// WARNING from proc depthIdeal from lib mregular.lib:
|
|
805
|
+
// The procedure has entered in 30 loops and could not put the variables
|
|
806
|
+
// in Noether position: in your example the method using random changes
|
|
807
|
+
// of coordinates may enter an infinite loop when the field is finite.
|
|
808
|
+
// Try removing this optional argument.";
|
|
809
|
+
return (-1);
|
|
810
|
+
}
|
|
811
|
+
i=phi(i);
|
|
812
|
+
nesttest=is_nested(I);
|
|
813
|
+
}
|
|
814
|
+
if ( nesttest == 0 )
|
|
815
|
+
{
|
|
816
|
+
while ( nl < 30 )
|
|
817
|
+
{
|
|
818
|
+
chcoord=select1(maxideal(1),1..(n-d+2));
|
|
819
|
+
nl=nl+1;
|
|
820
|
+
for ( ii = 1; ii<=d-1; ii++ )
|
|
821
|
+
{
|
|
822
|
+
ran=random(100,1,ii);
|
|
823
|
+
ran=intmat(ran,1,ii+1);
|
|
824
|
+
ran[1,ii+1]=1;
|
|
825
|
+
m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
|
|
826
|
+
for ( jj = 1; jj<=ii+1; jj++ )
|
|
827
|
+
{
|
|
828
|
+
P=P+ran[1,jj]*m[jj];
|
|
829
|
+
}
|
|
830
|
+
chcoord[n-d+2+ii]=P;
|
|
831
|
+
P=0;
|
|
832
|
+
}
|
|
833
|
+
phi=r1,chcoord;
|
|
834
|
+
dbprint(printlevel-voice+2,"// (1 random change of coord.)");
|
|
835
|
+
I=simplify(lead(std(phi(i))),1);
|
|
836
|
+
attrib(I,"isSB",1);
|
|
837
|
+
nesttest=is_nested(I);
|
|
838
|
+
if ( nesttest == 1 )
|
|
839
|
+
{
|
|
840
|
+
break;
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
if ( nesttest == 0 )
|
|
844
|
+
{
|
|
845
|
+
"// WARNING from proc depthIdeal from lib mregular.lib:
|
|
846
|
+
// The procedure has entered in 30 loops and could not find a monomial
|
|
847
|
+
// ideal of nested type with the same depth as your ideal: in your
|
|
848
|
+
// example the method using random changes of coordinates may enter an
|
|
849
|
+
// infinite loop when the field is finite.
|
|
850
|
+
// Try removing this optional argument.";
|
|
851
|
+
return (-1);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
//
|
|
856
|
+
// At this stage, we have obtained a monomial ideal I of nested type
|
|
857
|
+
// such that depth(S/i)=depth(S/I). We now compute depth(I).
|
|
858
|
+
//
|
|
859
|
+
//----- When S/i is Cohen-Macaulay:
|
|
860
|
+
for ( ii = n-d+2; ii <= n+1; ii++ )
|
|
861
|
+
{
|
|
862
|
+
K=K+select(I,ii);
|
|
863
|
+
}
|
|
864
|
+
if ( size(K) == 0 )
|
|
865
|
+
{
|
|
866
|
+
time=rtimer-time;
|
|
867
|
+
// Additional information:
|
|
868
|
+
dbprint(printlevel-voice+2,
|
|
869
|
+
"// Dimension of S/i: "+string(d)+" (S/i is Cohen-Macaulay)");
|
|
870
|
+
dbprint(printlevel-voice+2,
|
|
871
|
+
"// Time for computing depth: " + string(time) + " sec.");
|
|
872
|
+
dbprint(printlevel-voice+2,
|
|
873
|
+
"// The depth of S/i is:");
|
|
874
|
+
return(d);
|
|
875
|
+
}
|
|
876
|
+
//----- When d=1 (and S/i is not Cohen-Macaulay) ==> depth =0:
|
|
877
|
+
if ( d == 1 )
|
|
878
|
+
{
|
|
879
|
+
time=rtimer-time;
|
|
880
|
+
// Additional information:
|
|
881
|
+
dbprint(printlevel-voice+2,
|
|
882
|
+
"// Dimension of S/i: 1");
|
|
883
|
+
dbprint(printlevel-voice+2,
|
|
884
|
+
"// Time for computing depth: "+ string(time) + " sec.");
|
|
885
|
+
dbprint(printlevel-voice+2,
|
|
886
|
+
"// The depth of S/i is:");
|
|
887
|
+
return(0);
|
|
888
|
+
|
|
889
|
+
}
|
|
890
|
+
//----- Now d>1 and S/i is not Cohen-Macaulay:
|
|
891
|
+
//
|
|
892
|
+
//----- First, determine the last variable really occurring
|
|
893
|
+
lastv=n-d;
|
|
894
|
+
h=n;
|
|
895
|
+
while ( lastv == n-d and h > n-d )
|
|
896
|
+
{
|
|
897
|
+
K=select(I,h+1);
|
|
898
|
+
if ( size(K) == 0 )
|
|
899
|
+
{
|
|
900
|
+
h=h-1;
|
|
901
|
+
}
|
|
902
|
+
else
|
|
903
|
+
{
|
|
904
|
+
lastv=h;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
//----- and compute the depth:
|
|
908
|
+
time=rtimer-time;
|
|
909
|
+
// Additional information:
|
|
910
|
+
dbprint(printlevel-voice+2,
|
|
911
|
+
"// Dimension of S/i: "+string(d));
|
|
912
|
+
dbprint(printlevel-voice+2,
|
|
913
|
+
"// Time for computing depth: "+ string(time) + " sec.");
|
|
914
|
+
dbprint(printlevel-voice+2,
|
|
915
|
+
"// The depth of S/i is:");
|
|
916
|
+
return(n-lastv);
|
|
917
|
+
}
|
|
918
|
+
example
|
|
919
|
+
{ "EXAMPLE:"; echo = 2;
|
|
920
|
+
ring r=0,(x,y,z,t,w),dp;
|
|
921
|
+
ideal i=y2t,x2y-x2z+yt2,x2y2,xyztw,x3z2,y5+xz3w-x2zw2,x7-yt2w4;
|
|
922
|
+
depthIdeal(i);
|
|
923
|
+
depthIdeal(lead(std(i)));
|
|
924
|
+
// Additional information is displayed if you change printlevel (=1);
|
|
925
|
+
}
|
|
926
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
927
|
+
/*
|
|
928
|
+
Out-commented examples:
|
|
929
|
+
ring s=0,x(0..5),dp;
|
|
930
|
+
ideal i=x(2)^2-x(4)*x(5),x(1)*x(2)-x(0)*x(5),x(0)*x(2)-x(1)*x(4),
|
|
931
|
+
x(1)^2-x(3)*x(5),x(0)*x(1)-x(2)*x(3),x(0)^2-x(3)*x(4);
|
|
932
|
+
depthIdeal(i);
|
|
933
|
+
// Our procedure works when a min. graded free resol. can
|
|
934
|
+
// not be computed. In this easy example, depth can also
|
|
935
|
+
// be obtained using a m.g.f.r. (Auslander-Buchsbaum formula):
|
|
936
|
+
nvars(s)-ncols(betti(mres(i,0)))+1;
|
|
937
|
+
ring r1=0,(x,y,z,t),dp;
|
|
938
|
+
// Ex.2.5 in [Bermejo-Gimenez], Proc.Amer.Math.Soc. 128(5):
|
|
939
|
+
ideal i = x17y14-y31, x20y13, x60-y36z24-x20z20t20;
|
|
940
|
+
depthIdeal(i);
|
|
941
|
+
// Ex.2.9 in [Bermejo-Gimenez], Proc.Amer.Math.Soc. 128(5):
|
|
942
|
+
int k=43;
|
|
943
|
+
ideal j=x17y14-y31,x20y13,x60-y36z24-x20z20t20,y41*z^k-y40*z^(k+1);
|
|
944
|
+
depthIdeal(j);
|
|
945
|
+
// Example in Rk.2.10 in [Bermejo-Gimenez], ProcAMS 128(5):
|
|
946
|
+
ideal h=x2-3xy+5xt,xy-3y2+5yt,xz-3yz,2xt-yt,y2-yz-2yt;
|
|
947
|
+
depthIdeal(h);
|
|
948
|
+
// The initial ideal is not saturated
|
|
949
|
+
depthIdeal(lead(std(h)));
|
|
950
|
+
// More examples:
|
|
951
|
+
i=y4-t3z, x3t-y2z2, x3y2-t2z3, x6-tz5;
|
|
952
|
+
depthIdeal(i);
|
|
953
|
+
//
|
|
954
|
+
depthIdeal(maxideal(4));
|
|
955
|
+
//
|
|
956
|
+
ring r2=0,(x,y,z,t,w),dp;
|
|
957
|
+
ideal i = xy-zw,x3-yw2,x2z-y2w,y3-xz2,-y2z3+xw4+tw4+w5,-yz4+x2w3+xtw3+xw4,
|
|
958
|
+
-z5+x2tw2+x2w3+yw4;
|
|
959
|
+
depthIdeal(i);
|
|
960
|
+
//
|
|
961
|
+
ring r3=0,(x,y,z,t,w,u),dp;
|
|
962
|
+
ideal i=imap(r2,i);
|
|
963
|
+
depthIdeal(i);
|
|
964
|
+
// Next example is the defining ideal of the 2nd. Veronesean of P3, a variety
|
|
965
|
+
// in P8 which is arithmetically Cohen-Macaulay:
|
|
966
|
+
ring r4=0,(a,b,c,d,x(0..9)),dp;
|
|
967
|
+
ideal i= x(0)-ab,x(1)-ac,x(2)-ad,x(3)-bc,x(4)-bd,x(5)-cd,
|
|
968
|
+
x(6)-a2,x(7)-b2,x(8)-c2,x(9)-d2;
|
|
969
|
+
ideal ei=eliminate(i,abcd);
|
|
970
|
+
ring r5=0,x(0..9),dp;
|
|
971
|
+
ideal i=imap(r4,ei);
|
|
972
|
+
depthIdeal(i);
|
|
973
|
+
// Here is an example where the computation of a m.g.f.r. of I costs:
|
|
974
|
+
ring r8=0,(x,y,z,t,u,a,b),dp;
|
|
975
|
+
ideal i=u-b40,t-a40,x-a23b17,y-a22b18+ab39,z-a25b15;
|
|
976
|
+
ideal ei=eliminate(i,ab); // It takes a few seconds to compute the ideal
|
|
977
|
+
ring r9=0,(x,y,z,t,u),dp;
|
|
978
|
+
ideal i=imap(r8,ei);
|
|
979
|
+
depthIdeal(i); // This is very fast.
|
|
980
|
+
// Now you can use mres(i,0) to compute a m.g.f.r. of the ideal!
|
|
981
|
+
//
|
|
982
|
+
// Another one:
|
|
983
|
+
ring r10=0,(x(0..8),s,t),dp;
|
|
984
|
+
ideal i=x(0)-st24,x(1)-s2t23,x(2)-s3t22,x(3)-s9t16,x(4)-s11t14,x(5)-s18t7,
|
|
985
|
+
x(6)-s24t,x(7)-t25,x(8)-s25;
|
|
986
|
+
ideal ei=eliminate(i,st);
|
|
987
|
+
ring r11=0,x(0..8),dp;
|
|
988
|
+
ideal i=imap(r10,ei);
|
|
989
|
+
depthIdeal(i);
|
|
990
|
+
// More examples where not even sres works:
|
|
991
|
+
// Be careful: elimination takes some time here, but it succeeds!
|
|
992
|
+
ring r12=0,(s,t,u,x(0..14)),dp;
|
|
993
|
+
ideal i=x(0)-st6u8,x(1)-s5t3u7,x(2)-t11u4,x(3)-s9t4u2,x(4)-s2t7u6,x(5)-s7t7u,
|
|
994
|
+
x(6)-s10t5,x(7)-s4t6u5,x(8)-s13tu,x(9)-s14u,x(10)-st2u12,x(11)-s3t9u3,
|
|
995
|
+
x(12)-s15,x(13)-t15,x(14)-u15;
|
|
996
|
+
ideal ei=eliminate(i,stu);
|
|
997
|
+
size(ei);
|
|
998
|
+
ring r13=0,x(0..14),dp;
|
|
999
|
+
ideal i=imap(r12,ei);
|
|
1000
|
+
size(i);
|
|
1001
|
+
depthIdeal(i);
|
|
1002
|
+
//
|
|
1003
|
+
*/
|
|
1004
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1005
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1006
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1007
|
+
|
|
1008
|
+
proc satiety (ideal i, list #)
|
|
1009
|
+
"
|
|
1010
|
+
USAGE: satiety (i[,e]); i ideal, e integer
|
|
1011
|
+
RETURN: an integer, the satiety of i.
|
|
1012
|
+
(returns -1 if i is not homogeneous)
|
|
1013
|
+
ASSUME: i is a homogeneous ideal of the basering S=K[x(0)..x(n)].
|
|
1014
|
+
e=0: (default)
|
|
1015
|
+
The satiety is computed determining the fresh elements in the
|
|
1016
|
+
socle of i. It works over arbitrary fields.
|
|
1017
|
+
e=1: Makes random changes of coordinates to find a monomial ideal
|
|
1018
|
+
with same satiety. It works over infinite fields only. If K
|
|
1019
|
+
is finite, it works if it terminates, but may result in an
|
|
1020
|
+
infinite loop. After 30 loops, a warning message is displayed
|
|
1021
|
+
and -1 is returned.
|
|
1022
|
+
THEORY: The satiety, or saturation index, of a homogeneous ideal i is the
|
|
1023
|
+
least integer s such that, for all d>=s, the degree d part of the
|
|
1024
|
+
ideals i and isat=sat(i,maxideal(1)) coincide.
|
|
1025
|
+
NOTE: If printlevel > 0 (default = 0), dim(S/i) is also displayed.
|
|
1026
|
+
EXAMPLE: example satiety; shows some examples
|
|
1027
|
+
"
|
|
1028
|
+
{
|
|
1029
|
+
//--------------------------- initialisation ---------------------------------
|
|
1030
|
+
int e,ii,jj,h,d,time,lastv,nesttest,NPtest,nl,sat,zz;
|
|
1031
|
+
intmat ran;
|
|
1032
|
+
def r0 = basering;
|
|
1033
|
+
int n = nvars(r0)-1;
|
|
1034
|
+
if ( size(#) > 0 )
|
|
1035
|
+
{
|
|
1036
|
+
e = #[1];
|
|
1037
|
+
}
|
|
1038
|
+
list l16;
|
|
1039
|
+
for (zz = 0; zz<= n; zz++)
|
|
1040
|
+
{
|
|
1041
|
+
l16[zz+1] = "x("+string(zz)+")";
|
|
1042
|
+
}
|
|
1043
|
+
ring r1 = create_ring(ring_list(r0)[1], l16, "dp", "no_minpoly");
|
|
1044
|
+
ideal i,sbi,I,K,chcoord,m,KK;
|
|
1045
|
+
poly P;
|
|
1046
|
+
map phi;
|
|
1047
|
+
i = fetch(r0,i);
|
|
1048
|
+
time=rtimer;
|
|
1049
|
+
sbi=std(i);
|
|
1050
|
+
//----- Check ideal homogeneous
|
|
1051
|
+
if ( homog(sbi) == 0 )
|
|
1052
|
+
{
|
|
1053
|
+
"// WARNING from proc satiety from lib mregular.lib:
|
|
1054
|
+
// The ideal is not homogeneous!";
|
|
1055
|
+
return (-1);
|
|
1056
|
+
}
|
|
1057
|
+
I=simplify(lead(sbi),1);
|
|
1058
|
+
attrib(I,"isSB",1);
|
|
1059
|
+
d=dim(I);
|
|
1060
|
+
//----- If the ideal i is not proper:
|
|
1061
|
+
if ( d == -1 )
|
|
1062
|
+
{
|
|
1063
|
+
dbprint(printlevel-voice+2,
|
|
1064
|
+
"// The ideal i is (1)!
|
|
1065
|
+
// Its satiety is:");
|
|
1066
|
+
return (0);
|
|
1067
|
+
}
|
|
1068
|
+
//----- If the ideal i is 0:
|
|
1069
|
+
if ( size(I) == 0 )
|
|
1070
|
+
{
|
|
1071
|
+
dbprint(printlevel-voice+2,
|
|
1072
|
+
"// The ideal i is (0)!
|
|
1073
|
+
// Its satiety is:");
|
|
1074
|
+
return (0);
|
|
1075
|
+
}
|
|
1076
|
+
//----- When the ideal i is 0-dimensional:
|
|
1077
|
+
if ( d == 0 )
|
|
1078
|
+
{
|
|
1079
|
+
sat=maxdeg1(minbase(quotient(I,maxideal(1))))+1;
|
|
1080
|
+
time=rtimer-time;
|
|
1081
|
+
// Additional information:
|
|
1082
|
+
dbprint(printlevel-voice+2,
|
|
1083
|
+
"// Dimension of S/i: 0");
|
|
1084
|
+
dbprint(printlevel-voice+2,
|
|
1085
|
+
"// Time for computing the satiety: " + string(time) + " sec.");
|
|
1086
|
+
dbprint(printlevel-voice+2,
|
|
1087
|
+
"// The satiety of i is:");
|
|
1088
|
+
return (sat);
|
|
1089
|
+
}
|
|
1090
|
+
//----- When one has option e=1:
|
|
1091
|
+
//
|
|
1092
|
+
//----- Determine the situation: NT, or NP, or nothing.
|
|
1093
|
+
//----- Choose the method depending on the situation in order to
|
|
1094
|
+
//----- get the mon. ideal of nested type associated to i
|
|
1095
|
+
if ( e == 1 )
|
|
1096
|
+
{
|
|
1097
|
+
NPtest=is_NP(I);
|
|
1098
|
+
if ( NPtest == 0 )
|
|
1099
|
+
{
|
|
1100
|
+
while ( nl < 30 )
|
|
1101
|
+
{
|
|
1102
|
+
chcoord=select1(maxideal(1),1..(n-d+1));
|
|
1103
|
+
nl=nl+1;
|
|
1104
|
+
for ( ii = 1; ii<=d; ii++ )
|
|
1105
|
+
{
|
|
1106
|
+
ran=random(100,1,n-d+ii);
|
|
1107
|
+
ran=intmat(ran,1,n-d+ii+1);
|
|
1108
|
+
ran[1,n-d+ii+1]=1;
|
|
1109
|
+
m=select1(maxideal(1),1..(n-d+1+ii));
|
|
1110
|
+
for ( jj = 1; jj<=n-d+ii+1; jj++ )
|
|
1111
|
+
{
|
|
1112
|
+
P=P+ran[1,jj]*m[jj];
|
|
1113
|
+
}
|
|
1114
|
+
chcoord[n-d+1+ii]=P;
|
|
1115
|
+
P=0;
|
|
1116
|
+
}
|
|
1117
|
+
phi=r1,chcoord;
|
|
1118
|
+
dbprint(printlevel-voice+2,"// (1 random change of coord.)");
|
|
1119
|
+
I=simplify(lead(std(phi(i))),1);
|
|
1120
|
+
attrib(I,"isSB",1);
|
|
1121
|
+
NPtest=is_NP(I);
|
|
1122
|
+
if ( NPtest == 1 )
|
|
1123
|
+
{
|
|
1124
|
+
break;
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
if ( NPtest == 0 )
|
|
1128
|
+
{
|
|
1129
|
+
"// WARNING from proc satiety from lib mregular.lib:
|
|
1130
|
+
// The procedure has entered in 30 loops and could not put the variables
|
|
1131
|
+
// in Noether position: in your example the method using random changes
|
|
1132
|
+
// of coordinates may enter an infinite loop when the field is finite.
|
|
1133
|
+
// Try removing the optional argument.";
|
|
1134
|
+
return (-1);
|
|
1135
|
+
}
|
|
1136
|
+
i=phi(i);
|
|
1137
|
+
}
|
|
1138
|
+
nesttest=is_nested(I);
|
|
1139
|
+
if ( nesttest == 0 )
|
|
1140
|
+
{
|
|
1141
|
+
while ( nl < 30 )
|
|
1142
|
+
{
|
|
1143
|
+
chcoord=select1(maxideal(1),1..(n-d+2));
|
|
1144
|
+
nl=nl+1;
|
|
1145
|
+
for ( ii = 1; ii<=d-1; ii++ )
|
|
1146
|
+
{
|
|
1147
|
+
ran=random(100,1,ii);
|
|
1148
|
+
ran=intmat(ran,1,ii+1);
|
|
1149
|
+
ran[1,ii+1]=1;
|
|
1150
|
+
m=select1(maxideal(1),(n-d+2)..(n-d+2+ii));
|
|
1151
|
+
for ( jj = 1; jj<=ii+1; jj++ )
|
|
1152
|
+
{
|
|
1153
|
+
P=P+ran[1,jj]*m[jj];
|
|
1154
|
+
}
|
|
1155
|
+
chcoord[n-d+2+ii]=P;
|
|
1156
|
+
P=0;
|
|
1157
|
+
}
|
|
1158
|
+
phi=r1,chcoord;
|
|
1159
|
+
dbprint(printlevel-voice+2,"// (1 random change of coord.)");
|
|
1160
|
+
I=simplify(lead(std(phi(i))),1);
|
|
1161
|
+
attrib(I,"isSB",1);
|
|
1162
|
+
nesttest=is_nested(I);
|
|
1163
|
+
if ( nesttest == 1 )
|
|
1164
|
+
{
|
|
1165
|
+
break;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
if ( nesttest == 0 )
|
|
1169
|
+
{
|
|
1170
|
+
"// WARNING from proc satiety from lib mregular.lib:
|
|
1171
|
+
// The procedure has entered in 30 loops and could not find a monomial
|
|
1172
|
+
// ideal of nested type with the same satiety as your ideal: in your
|
|
1173
|
+
// example the method using random changes of coordinates may enter an
|
|
1174
|
+
// infinite loop when the field is finite.
|
|
1175
|
+
// Try removing the optional argument.";
|
|
1176
|
+
return (-1);
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
//
|
|
1180
|
+
// At this stage, we have obtained a monomial ideal I of nested type
|
|
1181
|
+
// such that depth(S/i)=depth(S/I). We now compute depth(I).
|
|
1182
|
+
//
|
|
1183
|
+
//----- When S/i is Cohen-Macaulay:
|
|
1184
|
+
//
|
|
1185
|
+
for ( ii = n-d+2; ii <= n+1; ii++ )
|
|
1186
|
+
{
|
|
1187
|
+
K=K+select(I,ii);
|
|
1188
|
+
}
|
|
1189
|
+
if ( size(K) == 0 )
|
|
1190
|
+
{
|
|
1191
|
+
time=rtimer-time;
|
|
1192
|
+
// Additional information:
|
|
1193
|
+
dbprint(printlevel-voice+2,
|
|
1194
|
+
"// Dimension of S/i: "+string(d));
|
|
1195
|
+
dbprint(printlevel-voice+2,
|
|
1196
|
+
"// Time for computing satiety: " + string(time) + " sec.");
|
|
1197
|
+
dbprint(printlevel-voice+2,
|
|
1198
|
+
"// The satiety of i is:");
|
|
1199
|
+
return(0);
|
|
1200
|
+
}
|
|
1201
|
+
//----- When d=1 (and S/i is not Cohen-Macaulay) ==> depth =0:
|
|
1202
|
+
if ( d == 1 )
|
|
1203
|
+
{
|
|
1204
|
+
KK=simplify(reduce(quotient(I,maxideal(1)),I),2);
|
|
1205
|
+
sat=maxdeg1(KK)+1;
|
|
1206
|
+
time=rtimer-time;
|
|
1207
|
+
// Additional information:
|
|
1208
|
+
dbprint(printlevel-voice+2,
|
|
1209
|
+
"// Dimension of S/i: 1");
|
|
1210
|
+
dbprint(printlevel-voice+2,
|
|
1211
|
+
"// Time for computing satiety: "+ string(time) + " sec.");
|
|
1212
|
+
dbprint(printlevel-voice+2,
|
|
1213
|
+
"// The satiety of i is:");
|
|
1214
|
+
return(sat);
|
|
1215
|
+
}
|
|
1216
|
+
//----- Now d>1 and S/i is not Cohen-Macaulay:
|
|
1217
|
+
//
|
|
1218
|
+
//----- First, determine the last variable really occurring
|
|
1219
|
+
lastv=n-d;
|
|
1220
|
+
h=n;
|
|
1221
|
+
while ( lastv == n-d and h > n-d )
|
|
1222
|
+
{
|
|
1223
|
+
K=select(I,h+1);
|
|
1224
|
+
if ( size(K) == 0 )
|
|
1225
|
+
{
|
|
1226
|
+
h=h-1;
|
|
1227
|
+
}
|
|
1228
|
+
else
|
|
1229
|
+
{
|
|
1230
|
+
lastv=h;
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
//----- and compute the satiety:
|
|
1234
|
+
sat=0;
|
|
1235
|
+
if ( lastv == n )
|
|
1236
|
+
{
|
|
1237
|
+
KK=simplify(reduce(quotient(I,maxideal(1)),I),2);
|
|
1238
|
+
sat=maxdeg1(KK)+1;
|
|
1239
|
+
}
|
|
1240
|
+
time=rtimer-time;
|
|
1241
|
+
// Additional information:
|
|
1242
|
+
dbprint(printlevel-voice+2,
|
|
1243
|
+
"// Dimension of S/i: "+string(d));
|
|
1244
|
+
dbprint(printlevel-voice+2,
|
|
1245
|
+
"// Time for computing satiety: "+ string(time) + " sec.");
|
|
1246
|
+
dbprint(printlevel-voice+2,
|
|
1247
|
+
"// The satiety of i is:");
|
|
1248
|
+
return(sat);
|
|
1249
|
+
}
|
|
1250
|
+
//---- If no option: direct computation
|
|
1251
|
+
sat=maxdeg1(reduce(quotient(i,maxideal(1)),sbi))+1;
|
|
1252
|
+
time=rtimer-time;
|
|
1253
|
+
// Additional information:
|
|
1254
|
+
dbprint(printlevel-voice+2,
|
|
1255
|
+
"// Dimension of S/i: "+string(d)+";");
|
|
1256
|
+
dbprint(printlevel-voice+2,
|
|
1257
|
+
"// Time for computing satiety: "+ string(time) + " sec.");
|
|
1258
|
+
dbprint(printlevel-voice+2,
|
|
1259
|
+
"// The satiety of i is:");
|
|
1260
|
+
return(sat);
|
|
1261
|
+
}
|
|
1262
|
+
example
|
|
1263
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1264
|
+
ring r=0,(x,y,z,t,w),dp;
|
|
1265
|
+
ideal i=y2t,x2y-x2z+yt2,x2y2,xyztw,x3z2,y5+xz3w-x2zw2,x7-yt2w4;
|
|
1266
|
+
satiety(i);
|
|
1267
|
+
ideal I=lead(std(i));
|
|
1268
|
+
satiety(I); // First method: direct computation
|
|
1269
|
+
satiety(I,1); // Second method: doing changes of coordinates
|
|
1270
|
+
// Additional information is displayed if you change printlevel (=1);
|
|
1271
|
+
}
|
|
1272
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1273
|
+
/*
|
|
1274
|
+
Out-commented examples:
|
|
1275
|
+
ring s1=0,(x,y,z,t),dp;
|
|
1276
|
+
ideal I=zt3,z2t2,yz2t,xz2t,xy2t,x3y;
|
|
1277
|
+
satiety(I);
|
|
1278
|
+
satiety(I,1);
|
|
1279
|
+
// Another example:
|
|
1280
|
+
ring s2=0,(z,y,x),dp;
|
|
1281
|
+
ideal I=z38,z26y2,z14y4,z12x,z10x5,z8x9,z6x16,z4x23,z2y6,y32;
|
|
1282
|
+
satiety(I);
|
|
1283
|
+
satiety(I,1);
|
|
1284
|
+
// One more:
|
|
1285
|
+
ring s3=0,(s,t,u,x(0..8)),dp;
|
|
1286
|
+
ideal i=x(0)-st6u8,x(1)-s5t3u7,x(2)-t11u4,x(3)-s9t4u2,
|
|
1287
|
+
x(4)-s2t7u6,x(5)-s7t7u,x(6)-s15,x(7)-t15,x(8)-u15;
|
|
1288
|
+
ideal ei=eliminate(i,stu);
|
|
1289
|
+
size(ei);
|
|
1290
|
+
ring s4=0,x(0..8),dp;
|
|
1291
|
+
ideal i=imap(s3,ei);
|
|
1292
|
+
ideal m=maxideal(1);
|
|
1293
|
+
m[8]=m[8]+m[7];
|
|
1294
|
+
map phi=m;
|
|
1295
|
+
ideal phii=phi(i);
|
|
1296
|
+
ideal nI=lead(std(phii));
|
|
1297
|
+
ring s5=0,x(0..7),dp;
|
|
1298
|
+
ideal nI=imap(s4,nI);
|
|
1299
|
+
satiety(nI);
|
|
1300
|
+
satiety(nI,1);
|
|
1301
|
+
ideal I1=subst(nI,x(7),1);
|
|
1302
|
+
ring s6=0,x(0..6),dp;
|
|
1303
|
+
ideal I1=imap(s5,I1);
|
|
1304
|
+
satiety(I1);
|
|
1305
|
+
satiety(I1,1);
|
|
1306
|
+
ideal I2=subst(I1,x(6),1);
|
|
1307
|
+
ring s7=0,x(0..5),dp;
|
|
1308
|
+
ideal I2=imap(s6,I2);
|
|
1309
|
+
satiety(I2);
|
|
1310
|
+
satiety(I2,1);
|
|
1311
|
+
//
|
|
1312
|
+
*/
|
|
1313
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1314
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1315
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1316
|
+
|
|
1317
|
+
proc regMonCurve (list #)
|
|
1318
|
+
"
|
|
1319
|
+
USAGE: regMonCurve (a0,...,an) ; ai integers with a0=0 < a1 < ... < an=:d
|
|
1320
|
+
RETURN: an integer, the Castelnuovo-Mumford regularity of the projective
|
|
1321
|
+
monomial curve C in Pn(K) parametrically defined by
|
|
1322
|
+
x(0) = t^d , x(1) = s^(a1)t^(d-a1) , ..... , x(n) = s^d
|
|
1323
|
+
where K is the field of complex numbers.
|
|
1324
|
+
(returns -1 if a0=0 < a1 < ... < an is not satisfied)
|
|
1325
|
+
ASSUME: a0=0 < a1 < ... < an are integers.
|
|
1326
|
+
NOTES: 1. The defining ideal of the curve C, I in S=K[x(0),...,x(n)], is
|
|
1327
|
+
determined by elimination.
|
|
1328
|
+
2. The procedure regIdeal has been improved in this case since one
|
|
1329
|
+
knows beforehand that the monomial ideal J=lead(std(I)) is of
|
|
1330
|
+
nested type if the monomial ordering is dp, and that
|
|
1331
|
+
reg(C)=reg(J) (see preprint 'Saturation and Castelnuovo-Mumford
|
|
1332
|
+
regularity' by Bermejo-Gimenez, 2004).
|
|
1333
|
+
3. If printlevel > 0 (default = 0) additional info is displayed:
|
|
1334
|
+
- It says whether C is arithmetically Cohen-Macaulay or not.
|
|
1335
|
+
- If C is not arith. Cohen-Macaulay, end(H^1(S/I)) is computed
|
|
1336
|
+
and an upper bound for the a-invariant of S/I is given.
|
|
1337
|
+
- It also determines one step of the minimal graded free
|
|
1338
|
+
resolution (m.g.f.r.) of I where the regularity is attained
|
|
1339
|
+
and gives the value of the regularity of the Hilbert function
|
|
1340
|
+
of S/I when reg(I) is attained at the last step of a m.g.f.r.
|
|
1341
|
+
EXAMPLE: example regMonCurve; shows some examples
|
|
1342
|
+
"
|
|
1343
|
+
{
|
|
1344
|
+
//--------------------------- initialisation ---------------------------------
|
|
1345
|
+
int ii,H,h,hh,time,ttime,firstind,lastind;
|
|
1346
|
+
int n = size(#)-1;
|
|
1347
|
+
//------------------ Check assumptions on integers -------------------------
|
|
1348
|
+
if ( #[1] != 0 )
|
|
1349
|
+
{"// WARNING from proc regMonCurve from lib mregular.lib:
|
|
1350
|
+
// USAGE: your input must be a list of integers a0,a1,...,an such that
|
|
1351
|
+
// a0=0 < a1 < a2 < ... < an";
|
|
1352
|
+
return(-1);
|
|
1353
|
+
}
|
|
1354
|
+
for ( ii=1; ii<= n; ii++ )
|
|
1355
|
+
{
|
|
1356
|
+
if ( #[ii] >= #[ii+1] )
|
|
1357
|
+
{
|
|
1358
|
+
"// WARNING from proc regMonCurve from lib mregular.lib:
|
|
1359
|
+
// USAGE: your input must be a list of integers a0,a1,...,an such that
|
|
1360
|
+
// a0=0 < a1 < a2 < ... < an";
|
|
1361
|
+
return(-1);
|
|
1362
|
+
}
|
|
1363
|
+
}
|
|
1364
|
+
ring R=0,(x(0..n),s,t),dp;
|
|
1365
|
+
ideal param,m,i;
|
|
1366
|
+
poly f(0..n);
|
|
1367
|
+
for (ii=0;ii<=n;ii++)
|
|
1368
|
+
{
|
|
1369
|
+
f(ii)=s^(#[n+1]-#[ii+1])*t^(#[ii+1]);
|
|
1370
|
+
param=param+f(ii);
|
|
1371
|
+
}
|
|
1372
|
+
m=subst(maxideal(1),s,0);
|
|
1373
|
+
m=simplify(subst(m,t,0),2);
|
|
1374
|
+
i=matrix(m)-matrix(param);
|
|
1375
|
+
ttime=rtimer;
|
|
1376
|
+
i=eliminate(i,st);
|
|
1377
|
+
ring r=0,(x(1..n),x(0)),dp;
|
|
1378
|
+
ideal i,I;
|
|
1379
|
+
i=imap(R,i);
|
|
1380
|
+
I=minbase(lead(std(i)));
|
|
1381
|
+
attrib(I,"isSB",1);
|
|
1382
|
+
ttime=rtimer-ttime;
|
|
1383
|
+
time=rtimer;
|
|
1384
|
+
ring nr=0,x(1..n),dp;
|
|
1385
|
+
ideal I,K,KK,J;
|
|
1386
|
+
I=imap(r,I);
|
|
1387
|
+
attrib(I,"isSB",1);
|
|
1388
|
+
K=select(I,n);
|
|
1389
|
+
//------------------ Cohen-Macaulay case ------------
|
|
1390
|
+
if ( size(K) == 0 )
|
|
1391
|
+
{
|
|
1392
|
+
ring mr=0,x(1..n-1),dp;
|
|
1393
|
+
ideal I=imap(nr,I);
|
|
1394
|
+
H=maxdeg1(minbase(quotient(I,maxideal(1))))+1;
|
|
1395
|
+
time=rtimer-time;
|
|
1396
|
+
// Additional information:
|
|
1397
|
+
dbprint(printlevel-voice+2,
|
|
1398
|
+
"// The sequence of integers defines a monomial curve C in P"
|
|
1399
|
+
+ string(n));
|
|
1400
|
+
dbprint(printlevel-voice+2,
|
|
1401
|
+
"// C is arithmetically Cohen-Macaulay");
|
|
1402
|
+
dbprint(printlevel-voice+2,
|
|
1403
|
+
"// Regularity attained at the last step of a m.g.f.r. of I(C)");
|
|
1404
|
+
dbprint(printlevel-voice+2,
|
|
1405
|
+
"// Regularity of the Hilbert function of S/I(C): "
|
|
1406
|
+
+ string(H-2));
|
|
1407
|
+
dbprint(printlevel-voice+2,
|
|
1408
|
+
"// Time for computing ideal I(C) (by elimination): "
|
|
1409
|
+
+ string(ttime) + " sec.");
|
|
1410
|
+
dbprint(printlevel-voice+2,
|
|
1411
|
+
"// Time for computing reg(C) once I(C) has been determined: "
|
|
1412
|
+
+ string(time) + " sec.");
|
|
1413
|
+
dbprint(printlevel-voice+2,
|
|
1414
|
+
"// The Castelnuovo-Mumford regularity of C is:");
|
|
1415
|
+
return(H);
|
|
1416
|
+
}
|
|
1417
|
+
else
|
|
1418
|
+
{
|
|
1419
|
+
KK=simplify(reduce(quotient(I,maxideal(1)),I),2);
|
|
1420
|
+
firstind=maxdeg1(KK)+1;
|
|
1421
|
+
J=subst(I,x(n),1);
|
|
1422
|
+
ring mr=0,x(1..n-1),dp;
|
|
1423
|
+
ideal J=imap(nr,J);
|
|
1424
|
+
lastind=maxdeg1(minbase(quotient(J,maxideal(1))))+1;
|
|
1425
|
+
H=firstind;
|
|
1426
|
+
if ( lastind > H )
|
|
1427
|
+
{
|
|
1428
|
+
H=lastind;
|
|
1429
|
+
}
|
|
1430
|
+
time=rtimer-time;
|
|
1431
|
+
// Additional information:
|
|
1432
|
+
dbprint(printlevel-voice+2,
|
|
1433
|
+
"// The sequence of integers defines a monomial curve C in P"
|
|
1434
|
+
+ string(n));
|
|
1435
|
+
dbprint(printlevel-voice+2,
|
|
1436
|
+
"// C is not arithmetically Cohen-Macaulay");
|
|
1437
|
+
dbprint(printlevel-voice+2,
|
|
1438
|
+
"// end(H^1(S/I(C))) = "
|
|
1439
|
+
+string(firstind-2));
|
|
1440
|
+
dbprint(printlevel-voice+2,
|
|
1441
|
+
"// Upper bound for the a-invariant of S/I(C): end(H^2(S/I(C))) <= "
|
|
1442
|
+
+string(lastind-3));
|
|
1443
|
+
if ( H == firstind )
|
|
1444
|
+
{
|
|
1445
|
+
dbprint(printlevel-voice+2,
|
|
1446
|
+
"// Regularity attained at the last step of a m.g.f.r. of I(C)");
|
|
1447
|
+
dbprint(printlevel-voice+2,
|
|
1448
|
+
"// Regularity of the Hilbert function of S/I(C): "
|
|
1449
|
+
+ string(H-1));
|
|
1450
|
+
}
|
|
1451
|
+
else
|
|
1452
|
+
{
|
|
1453
|
+
dbprint(printlevel-voice+2,
|
|
1454
|
+
"// Regularity attained at the second last step of a m.g.f.r. of I(C)");
|
|
1455
|
+
dbprint(printlevel-voice+2,
|
|
1456
|
+
"// (and not attained at the last step)");
|
|
1457
|
+
}
|
|
1458
|
+
dbprint(printlevel-voice+2,
|
|
1459
|
+
"// Time for computing ideal I(C) (by elimination): "
|
|
1460
|
+
+ string(ttime) + " sec.");
|
|
1461
|
+
dbprint(printlevel-voice+2,
|
|
1462
|
+
"// Time for computing reg(C) once I(C) has been determined: "
|
|
1463
|
+
+ string(time) + " sec.");
|
|
1464
|
+
dbprint(printlevel-voice+2,
|
|
1465
|
+
"// The Castelnuovo-Mumford regularity of C is:");
|
|
1466
|
+
return(H);
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
example
|
|
1470
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1471
|
+
// The 1st example is the twisted cubic:
|
|
1472
|
+
regMonCurve(0,1,2,3);
|
|
1473
|
+
// The 2nd. example is the non arithm. Cohen-Macaulay monomial curve in P4
|
|
1474
|
+
// parametrized by: x(0)-s6,x(1)-s5t,x(2)-s3t3,x(3)-st5,x(4)-t6:
|
|
1475
|
+
regMonCurve(0,1,3,5,6);
|
|
1476
|
+
// Additional information is displayed if you change printlevel (=1);
|
|
1477
|
+
}
|
|
1478
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1479
|
+
/*
|
|
1480
|
+
Out-commented examples:
|
|
1481
|
+
//
|
|
1482
|
+
// The sequence of integers must be strictly increasing
|
|
1483
|
+
regMonCurve(1,4,6,9);
|
|
1484
|
+
regMonCurve(0,3,8,5,23);
|
|
1485
|
+
regMonCurve(0,4,7,7,9);
|
|
1486
|
+
//
|
|
1487
|
+
// A curve in P3 s.t. the regularity is attained at the last step:
|
|
1488
|
+
regMonCurve(0,2,12,15);
|
|
1489
|
+
//
|
|
1490
|
+
// A curve in P4 s.t. the regularity attained at the last but one
|
|
1491
|
+
// but NOT at the last step (Ex. 3.3 Preprint 2004):
|
|
1492
|
+
regMonCurve(0,5,9,11,20);
|
|
1493
|
+
//
|
|
1494
|
+
// A curve in P8 s.t. the m.g.f.r. of the defining ideal is not easily
|
|
1495
|
+
// obtained through m.g.f.r.:
|
|
1496
|
+
regMonCurve(0,1,2,3,9,11,18,24,25);
|
|
1497
|
+
//
|
|
1498
|
+
// A curve in P11 of degree 37:
|
|
1499
|
+
regMonCurve(0,1,2,7,16,17,25,27,28,30,36,37);
|
|
1500
|
+
// It takes some time to compute the eliminated ideal; the computation of
|
|
1501
|
+
// the regularity is then rather fast as one can check using proc regIdeal:
|
|
1502
|
+
ring q=0,(s,t,x(0..11)),dp;
|
|
1503
|
+
ideal i=x(0)-st36,x(1)-s2t35,x(2)-s7t30,x(3)-s16t21,x(4)-s17t20,x(5)-s25t12,
|
|
1504
|
+
x(6)-s27t10,x(7)-s28t9,x(8)-s30t7,x(9)-s36t,x(10)-s37,x(11)-t37;
|
|
1505
|
+
ideal ei=eliminate(i,st);
|
|
1506
|
+
ring qq=0,x(0..11),dp;
|
|
1507
|
+
ideal i=imap(q,ei);
|
|
1508
|
+
regIdeal(i);
|
|
1509
|
+
//
|
|
1510
|
+
// A curve in P14 of degree 55:
|
|
1511
|
+
regMonCurve(0,1,2,7,16,17,25,27,28,30,36,37,40,53,55);
|
|
1512
|
+
//
|
|
1513
|
+
*/
|
|
1514
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1515
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1516
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1517
|
+
|
|
1518
|
+
proc NoetherPosition (ideal i)
|
|
1519
|
+
"
|
|
1520
|
+
USAGE: NoetherPosition (i); i ideal
|
|
1521
|
+
RETURN: ideal such that, for the homogeneous linear transformation
|
|
1522
|
+
map phi=S,NoetherPosition(i);
|
|
1523
|
+
one has that K[x(n-d+1),...,x(n)] is a Noether normalization of
|
|
1524
|
+
S/phi(i) where S=K[x(0),...x(n)] is the basering and d=dim(S/i).
|
|
1525
|
+
(returns -1 if i = (0) or (1)).
|
|
1526
|
+
ASSUME: The field K is infinite and i is a nonzero proper ideal.
|
|
1527
|
+
NOTE: 1. It works also if K is a finite field if it terminates, but
|
|
1528
|
+
may result in an infinite loop. If the procedure enters more
|
|
1529
|
+
than 30 loops, -1 is returned and a warning message is displayed.@*
|
|
1530
|
+
2. If printlevel > 0 (default = 0), additional info is displayed:
|
|
1531
|
+
dim(S/i) and K[x(n-d+1),...,x(n)] are given.
|
|
1532
|
+
EXAMPLE: example NoetherPosition; shows some examples
|
|
1533
|
+
"
|
|
1534
|
+
{
|
|
1535
|
+
//--------------------------- initialisation ---------------------------------
|
|
1536
|
+
int ii,jj,d,time,nl,NPtest,zz;
|
|
1537
|
+
intmat ran;
|
|
1538
|
+
def r0 = basering;
|
|
1539
|
+
ideal K,chcoord;
|
|
1540
|
+
int n = nvars(r0)-1;
|
|
1541
|
+
list l17;
|
|
1542
|
+
for (zz = 0; zz<= n; zz++)
|
|
1543
|
+
{
|
|
1544
|
+
l17[zz+1] = "x("+string(zz)+")";
|
|
1545
|
+
}
|
|
1546
|
+
ring r1 = create_ring(ring_list(r0)[1], l17, "dp", "no_minpoly");
|
|
1547
|
+
ideal i,sbi,I,K,chcoord,m;
|
|
1548
|
+
poly P;
|
|
1549
|
+
map phi;
|
|
1550
|
+
i = fetch(r0,i);
|
|
1551
|
+
time=rtimer;
|
|
1552
|
+
sbi=std(i);
|
|
1553
|
+
I=simplify(lead(sbi),1);
|
|
1554
|
+
attrib(I,"isSB",1);
|
|
1555
|
+
d=dim(I);
|
|
1556
|
+
//----- If the ideal i is not proper:
|
|
1557
|
+
if ( d == -1 )
|
|
1558
|
+
{
|
|
1559
|
+
"// WARNING from proc NoetherPosition from lib mregular.lib:
|
|
1560
|
+
// The ideal i is (1)!";
|
|
1561
|
+
return (-1);
|
|
1562
|
+
}
|
|
1563
|
+
//----- If the ideal i is 0:
|
|
1564
|
+
if ( size(I) == 0 )
|
|
1565
|
+
{
|
|
1566
|
+
"// WARNING from proc NoetherPosition from lib mregular.lib:
|
|
1567
|
+
// The ideal i is (0)!";
|
|
1568
|
+
return (-1);
|
|
1569
|
+
}
|
|
1570
|
+
//----- When the ideal i is 0-dimensional:
|
|
1571
|
+
if ( d == 0 )
|
|
1572
|
+
{
|
|
1573
|
+
time=rtimer-time;
|
|
1574
|
+
// Additional information:
|
|
1575
|
+
dbprint(printlevel-voice+2,
|
|
1576
|
+
"// Dimension of S/i: 0");
|
|
1577
|
+
dbprint(printlevel-voice+2,
|
|
1578
|
+
"// Time for computing a Noether normalization: "
|
|
1579
|
+
+ string(time) + " sec.");
|
|
1580
|
+
dbprint(printlevel-voice+2,
|
|
1581
|
+
"// K is a Noether normalization of S/phi(i)");
|
|
1582
|
+
dbprint(printlevel-voice+2,
|
|
1583
|
+
"// where the map phi: S --> S is:");
|
|
1584
|
+
setring r0;
|
|
1585
|
+
return (maxideal(1));
|
|
1586
|
+
}
|
|
1587
|
+
NPtest=is_NP(I);
|
|
1588
|
+
if ( NPtest == 1 )
|
|
1589
|
+
{
|
|
1590
|
+
K=x(n-d+1..n);
|
|
1591
|
+
setring r0;
|
|
1592
|
+
K=fetch(r1,K);
|
|
1593
|
+
time=rtimer-time;
|
|
1594
|
+
// Additional information:
|
|
1595
|
+
dbprint(printlevel-voice+2,
|
|
1596
|
+
"// Dimension of S/i: " + string(d) );
|
|
1597
|
+
dbprint(printlevel-voice+2,
|
|
1598
|
+
"// Time for computing a Noether normalization: " +
|
|
1599
|
+
string(time) + " sec.");
|
|
1600
|
+
dbprint(printlevel-voice+2,
|
|
1601
|
+
"// K[" + string(K) +
|
|
1602
|
+
"] is a Noether normalization of S/phi(i)");
|
|
1603
|
+
dbprint(printlevel-voice+2,
|
|
1604
|
+
"// where the map phi: S --> S is:");
|
|
1605
|
+
return (maxideal(1));
|
|
1606
|
+
}
|
|
1607
|
+
//---- Otherwise, random change of coordinates and
|
|
1608
|
+
//---- test for Noether normalization.
|
|
1609
|
+
//---- If we were unlucky, another change of coord. will be done:
|
|
1610
|
+
while ( nl < 30 )
|
|
1611
|
+
{
|
|
1612
|
+
chcoord=select1(maxideal(1),1..(n-d+1));
|
|
1613
|
+
nl=nl+1;
|
|
1614
|
+
for ( ii = 1; ii<=d; ii++ )
|
|
1615
|
+
{
|
|
1616
|
+
ran=random(100,1,n-d+ii);
|
|
1617
|
+
ran=intmat(ran,1,n-d+ii+1);
|
|
1618
|
+
ran[1,n-d+ii+1]=1;
|
|
1619
|
+
m=select1(maxideal(1),1..(n-d+1+ii));
|
|
1620
|
+
for ( jj = 1; jj<=n-d+ii+1; jj++ )
|
|
1621
|
+
{
|
|
1622
|
+
P=P+ran[1,jj]*m[jj];
|
|
1623
|
+
}
|
|
1624
|
+
chcoord[n-d+1+ii]=P;
|
|
1625
|
+
P=0;
|
|
1626
|
+
}
|
|
1627
|
+
phi=r1,chcoord;
|
|
1628
|
+
dbprint(printlevel-voice+2,"// (1 random change of coord.)");
|
|
1629
|
+
I=simplify(lead(std(phi(i))),1);
|
|
1630
|
+
attrib(I,"isSB",1);
|
|
1631
|
+
NPtest=is_NP(I);
|
|
1632
|
+
if ( NPtest == 1 )
|
|
1633
|
+
{
|
|
1634
|
+
K=x(n-d+1..n);
|
|
1635
|
+
setring r0;
|
|
1636
|
+
K=fetch(r1,K);
|
|
1637
|
+
chcoord=fetch(r1,chcoord);
|
|
1638
|
+
time=rtimer-time;
|
|
1639
|
+
// Additional information:
|
|
1640
|
+
dbprint(printlevel-voice+2,
|
|
1641
|
+
"// Dimension of S/i: " + string(d) );
|
|
1642
|
+
dbprint(printlevel-voice+2,
|
|
1643
|
+
"// Time for computing a Noether normalization: " +
|
|
1644
|
+
string(time) + " sec.");
|
|
1645
|
+
dbprint(printlevel-voice+2,
|
|
1646
|
+
"// K[" + string(K) +
|
|
1647
|
+
"] is a Noether normalization of S/phi(i)");
|
|
1648
|
+
dbprint(printlevel-voice+2,
|
|
1649
|
+
"// where the map phi: S --> S is:");
|
|
1650
|
+
return (chcoord);
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
"// WARNING from proc NoetherPosition from lib mregular.lib:
|
|
1654
|
+
// The procedure has entered in more than 30 loops: in your example
|
|
1655
|
+
// the method may enter an infinite loop over a finite field!";
|
|
1656
|
+
return (-1);
|
|
1657
|
+
}
|
|
1658
|
+
example
|
|
1659
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1660
|
+
ring r=0,(x,y,z,t,u),dp;
|
|
1661
|
+
ideal i1=y,z,t,u; ideal i2=x,z,t,u; ideal i3=x,y,t,u; ideal i4=x,y,z,u;
|
|
1662
|
+
ideal i5=x,y,z,t; ideal i=intersect(i1,i2,i3,i4,i5);
|
|
1663
|
+
map phi=r,NoetherPosition(i);
|
|
1664
|
+
phi;
|
|
1665
|
+
ring r5=5,(x,y,z,t,u),dp;
|
|
1666
|
+
ideal i=imap(r,i);
|
|
1667
|
+
map phi=r5,NoetherPosition(i);
|
|
1668
|
+
phi;
|
|
1669
|
+
// Additional information is displayed if you change printlevel (=1);
|
|
1670
|
+
}
|
|
1671
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1672
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1673
|
+
|
|
1674
|
+
proc is_NP (ideal i)
|
|
1675
|
+
"
|
|
1676
|
+
USAGE: is_NP (i); i ideal
|
|
1677
|
+
RETURN: 1 if K[x(n-d+1),...,x(n)] is a Noether normalization of
|
|
1678
|
+
S/i where S=K[x(0),...x(n)] is the basering, and d=dim(S/i),
|
|
1679
|
+
0 otherwise.
|
|
1680
|
+
(returns -1 if i=(0) or i=(1)).
|
|
1681
|
+
ASSUME: i is a nonzero proper homogeneous ideal.
|
|
1682
|
+
NOTE: 1. If i is not homogeneous and is_NP(i)=1 then K[x(n-d+1),...,x(n)]
|
|
1683
|
+
is a Noether normalization of S/i. The converse may be wrong if
|
|
1684
|
+
the ideal is not homogeneous.
|
|
1685
|
+
2. is_NP is used in the procedures regIdeal, depthIdeal, satiety,
|
|
1686
|
+
and NoetherPosition.
|
|
1687
|
+
EXAMPLE: example is_NP; shows some examples
|
|
1688
|
+
"
|
|
1689
|
+
{
|
|
1690
|
+
//--------------------------- initialisation ---------------------------------
|
|
1691
|
+
int ii,d,dz,zz;
|
|
1692
|
+
def r0 = basering;
|
|
1693
|
+
int n = nvars(r0)-1;
|
|
1694
|
+
list l18;
|
|
1695
|
+
for (zz = 0; zz<= n; zz++)
|
|
1696
|
+
{
|
|
1697
|
+
l18[zz+1] = "x("+string(zz)+")";
|
|
1698
|
+
}
|
|
1699
|
+
ring r1 = create_ring(ring_list(r0)[1], l18, "dp", "no_minpoly");
|
|
1700
|
+
ideal i,sbi,I,J;
|
|
1701
|
+
i = fetch(r0,i);
|
|
1702
|
+
sbi=std(i);
|
|
1703
|
+
I=simplify(lead(sbi),1);
|
|
1704
|
+
attrib(I,"isSB",1);
|
|
1705
|
+
d=dim(I);
|
|
1706
|
+
//----- If the ideal i is not proper:
|
|
1707
|
+
if ( d == -1 )
|
|
1708
|
+
{
|
|
1709
|
+
"// WARNING from proc is_NP from lib mregular.lib:
|
|
1710
|
+
// The ideal i is (1)!";
|
|
1711
|
+
return (-1);
|
|
1712
|
+
}
|
|
1713
|
+
//----- If the ideal i is 0:
|
|
1714
|
+
if ( size(I) == 0 )
|
|
1715
|
+
{
|
|
1716
|
+
"// WARNING from proc is_NP from lib mregular.lib:
|
|
1717
|
+
// The ideal i is (0)!";
|
|
1718
|
+
return (-1);
|
|
1719
|
+
}
|
|
1720
|
+
//----- When the ideal i is 0-dimensional:
|
|
1721
|
+
if ( d == 0 )
|
|
1722
|
+
{
|
|
1723
|
+
return (1);
|
|
1724
|
+
}
|
|
1725
|
+
//----- Check Noether position
|
|
1726
|
+
J=I;
|
|
1727
|
+
for ( ii = n-d+1; ii <= n; ii++ )
|
|
1728
|
+
{
|
|
1729
|
+
J=subst(J,x(ii),0);
|
|
1730
|
+
}
|
|
1731
|
+
attrib(J,"isSB",1);
|
|
1732
|
+
dz=dim(J);
|
|
1733
|
+
if ( dz == d )
|
|
1734
|
+
{
|
|
1735
|
+
return (1);
|
|
1736
|
+
}
|
|
1737
|
+
else
|
|
1738
|
+
{
|
|
1739
|
+
return(0);
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
example
|
|
1743
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1744
|
+
ring r=0,(x,y,z,t,u),dp;
|
|
1745
|
+
ideal i1=y,z,t,u; ideal i2=x,z,t,u; ideal i3=x,y,t,u; ideal i4=x,y,z,u;
|
|
1746
|
+
ideal i5=x,y,z,t; ideal i=intersect(i1,i2,i3,i4,i5);
|
|
1747
|
+
is_NP(i);
|
|
1748
|
+
ideal ch=x,y,z,t,x+y+z+t+u;
|
|
1749
|
+
map phi=ch;
|
|
1750
|
+
is_NP(phi(i));
|
|
1751
|
+
}
|
|
1752
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1753
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1754
|
+
|
|
1755
|
+
proc is_nested (ideal i)
|
|
1756
|
+
"
|
|
1757
|
+
USAGE: is_nested (i); i monomial ideal
|
|
1758
|
+
RETURN: 1 if i is of nested type, 0 otherwise.
|
|
1759
|
+
(returns -1 if i=(0) or i=(1)).
|
|
1760
|
+
ASSUME: i is a nonzero proper monomial ideal.
|
|
1761
|
+
NOTES: 1. The ideal must be monomial, otherwise the result has no meaning
|
|
1762
|
+
(so check this before using this procedure).@*
|
|
1763
|
+
2. is_nested is used in procedures depthIdeal, regIdeal and satiety.@*
|
|
1764
|
+
3. When i is a monomial ideal of nested type of S=K[x(0)..x(n)],
|
|
1765
|
+
the a-invariant of S/i coincides with the upper bound obtained
|
|
1766
|
+
using the procedure regIdeal with printlevel > 0.
|
|
1767
|
+
THEORY: A monomial ideal is of nested type if its associated primes are all
|
|
1768
|
+
of the form (x(0),...,x(i)) for some i<=n.
|
|
1769
|
+
(see definition and effective criterion to check this property in
|
|
1770
|
+
the preprint 'Saturation and Castelnuovo-Mumford regularity' by
|
|
1771
|
+
Bermejo-Gimenez, 2004).
|
|
1772
|
+
EXAMPLE: example is_nested; shows some examples
|
|
1773
|
+
"
|
|
1774
|
+
{
|
|
1775
|
+
//--------------------------- initialisation ---------------------------------
|
|
1776
|
+
int ii,d,tev,lastv,h,NPtest,zz;
|
|
1777
|
+
def r0 = basering;
|
|
1778
|
+
int n = nvars(r0)-1;
|
|
1779
|
+
list l19;
|
|
1780
|
+
for (zz = 0; zz<= n; zz++)
|
|
1781
|
+
{
|
|
1782
|
+
l19[zz+1] = "x("+string(zz)+")";
|
|
1783
|
+
}
|
|
1784
|
+
ring r1 = create_ring(ring_list(r0)[1], l19, "dp", "no_minpoly");
|
|
1785
|
+
ideal I,K,KK,LL;
|
|
1786
|
+
I = fetch(r0,i);
|
|
1787
|
+
I=minbase(I);
|
|
1788
|
+
attrib(I,"isSB",1);
|
|
1789
|
+
d=dim(I);
|
|
1790
|
+
//----- If the ideal i is not proper:
|
|
1791
|
+
if ( d == -1 )
|
|
1792
|
+
{
|
|
1793
|
+
"// WARNING from proc is_nested from lib mregular.lib:
|
|
1794
|
+
// The ideal i is (1)!";
|
|
1795
|
+
return (-1);
|
|
1796
|
+
}
|
|
1797
|
+
//----- If the ideal i is 0:
|
|
1798
|
+
if ( size(I) == 0 )
|
|
1799
|
+
{
|
|
1800
|
+
"// WARNING from proc is_nested from lib mregular.lib:
|
|
1801
|
+
// The ideal i is (0)!";
|
|
1802
|
+
return (-1);
|
|
1803
|
+
}
|
|
1804
|
+
//----- When the ideal i is 0-dimensional:
|
|
1805
|
+
if ( d == 0 )
|
|
1806
|
+
{
|
|
1807
|
+
return (1);
|
|
1808
|
+
}
|
|
1809
|
+
//----- Check Noether position
|
|
1810
|
+
NPtest=is_NP(I);
|
|
1811
|
+
if ( NPtest != 1 )
|
|
1812
|
+
{
|
|
1813
|
+
return (0);
|
|
1814
|
+
}
|
|
1815
|
+
//----- When ideal is 1-dim. + var. in Noether position -> Nested Type
|
|
1816
|
+
if ( d == 1 )
|
|
1817
|
+
{
|
|
1818
|
+
return (1);
|
|
1819
|
+
}
|
|
1820
|
+
//----- Determ. of the last variable really occurring
|
|
1821
|
+
lastv=n-d;
|
|
1822
|
+
h=n;
|
|
1823
|
+
while ( lastv == n-d and h > n-d )
|
|
1824
|
+
{
|
|
1825
|
+
K=select(I,h+1);
|
|
1826
|
+
if ( size(K) == 0 )
|
|
1827
|
+
{
|
|
1828
|
+
h=h-1;
|
|
1829
|
+
}
|
|
1830
|
+
else
|
|
1831
|
+
{
|
|
1832
|
+
lastv=h;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
//----- Check the second property by evaluation when NP + d>1
|
|
1836
|
+
KK=subst(I,x(lastv),1);
|
|
1837
|
+
for ( ii = n-lastv; ii<=d-2; ii++ )
|
|
1838
|
+
{
|
|
1839
|
+
LL=minbase(subst(I,x(n-ii-1),1));
|
|
1840
|
+
attrib(LL,"isSB",1);
|
|
1841
|
+
tev=size(reduce(KK,LL,5));
|
|
1842
|
+
if ( tev > 0 )
|
|
1843
|
+
{
|
|
1844
|
+
return(0);
|
|
1845
|
+
}
|
|
1846
|
+
KK=LL;
|
|
1847
|
+
}
|
|
1848
|
+
return(1);
|
|
1849
|
+
}
|
|
1850
|
+
example
|
|
1851
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1852
|
+
ring s=0,(x,y,z,t),dp;
|
|
1853
|
+
ideal i1=x2,y3; ideal i2=x3,y2,z2; ideal i3=x3,y2,t2;
|
|
1854
|
+
ideal i=intersect(i1,i2,i3);
|
|
1855
|
+
is_nested(i);
|
|
1856
|
+
ideal ch=x,y,z,z+t;
|
|
1857
|
+
map phi=ch;
|
|
1858
|
+
ideal I=lead(std(phi(i)));
|
|
1859
|
+
is_nested(I);
|
|
1860
|
+
}
|
|
1861
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1862
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1863
|
+
|