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,3269 @@
|
|
|
1
|
+
/////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version dmodapp.lib 4.1.3.0 Mar_2020 "; // $Id: 1597bd62eeac518558ac084150f560146476df7a $
|
|
3
|
+
category="Noncommutative";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: dmodapp.lib Applications of algebraic D-modules
|
|
6
|
+
AUTHORS: Viktor Levandovskyy, levandov@math.rwth-aachen.de
|
|
7
|
+
Daniel Andres, daniel.andres@math.rwth-aachen.de
|
|
8
|
+
|
|
9
|
+
Support: DFG Graduiertenkolleg 1632 'Experimentelle und konstruktive Algebra'
|
|
10
|
+
|
|
11
|
+
OVERVIEW:
|
|
12
|
+
Let K be a field of characteristic 0, R = K[x1,...,xN] and
|
|
13
|
+
D be the Weyl algebra in variables x1,...,xN,d1,...,dN.
|
|
14
|
+
In this library there are the following procedures for algebraic D-modules:
|
|
15
|
+
|
|
16
|
+
- given a cyclic representation D/I of a holonomic module and a polynomial
|
|
17
|
+
F in R, it is proved that the localization of D/I with respect to the mult.
|
|
18
|
+
closed set of all powers of F is a holonomic D-module. Thus we aim to compute
|
|
19
|
+
its cyclic representation D/L for an ideal L in D. The procedures for the
|
|
20
|
+
localization are DLoc, SDLoc and DLoc0.
|
|
21
|
+
|
|
22
|
+
- annihilator in D of a given polynomial F from R as well as
|
|
23
|
+
of a given rational function G/F from Quot(R). These can be computed via
|
|
24
|
+
procedures annPoly resp. annRat.
|
|
25
|
+
|
|
26
|
+
- Groebner bases with respect to weights (according to (SST), given an
|
|
27
|
+
arbitrary integer vector containing weights for variables, one computes the
|
|
28
|
+
homogenization of a given ideal relative to this vector, then one computes a
|
|
29
|
+
Groebner basis and returns the dehomogenization of the result), initial
|
|
30
|
+
forms and initial ideals in Weyl algebras with respect to a given weight
|
|
31
|
+
vector can be computed with GBWeight, inForm, initialMalgrange and
|
|
32
|
+
initialIdealW.
|
|
33
|
+
|
|
34
|
+
- restriction and integration of a holonomic module D/I. Suppose I
|
|
35
|
+
annihilates a function F(x1,...,xn). Our aim is to compute an ideal J
|
|
36
|
+
directly from I, which annihilates
|
|
37
|
+
- F(0,...,0,xk,...,xn) in case of restriction or
|
|
38
|
+
- the integral of F with respect to x1,...,xm in case of integration.
|
|
39
|
+
The corresponding procedures are restrictionModule, restrictionIdeal,
|
|
40
|
+
integralModule and integralIdeal.
|
|
41
|
+
|
|
42
|
+
- characteristic varieties defined by ideals in Weyl algebras can be computed
|
|
43
|
+
with charVariety and charInfo.
|
|
44
|
+
|
|
45
|
+
- appelF1, appelF2 and appelF4 return ideals in parametric Weyl algebras,
|
|
46
|
+
which annihilate corresponding Appel hypergeometric functions.
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
REFERENCES:
|
|
50
|
+
(SST) Saito, Sturmfels, Takayama 'Groebner Deformations of Hypergeometric
|
|
51
|
+
Differential Equations', Springer, 2000
|
|
52
|
+
(OTW) Oaku, Takayama, Walther 'A Localization Algorithm for D-modules',
|
|
53
|
+
Journal of Symbolic Computation, 2000
|
|
54
|
+
(OT) Oaku, Takayama 'Algorithms for D-modules',
|
|
55
|
+
Journal of Pure and Applied Algebra, 1998
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
PROCEDURES:
|
|
59
|
+
|
|
60
|
+
annPoly(f); computes annihilator of a polynomial f in the corr. Weyl algebra
|
|
61
|
+
annRat(f,g); computes annihilator of rational function f/g in corr. Weyl algebra
|
|
62
|
+
DLoc(I,f); computes presentation of localization of D/I wrt symbolic power f^s
|
|
63
|
+
SDLoc(I,f); computes generic presentation of the localization of D/I wrt f^s
|
|
64
|
+
DLoc0(I,f); computes presentation of localization of D/I wrt f^s based on SDLoc
|
|
65
|
+
|
|
66
|
+
GBWeight(I,u,v[,a,b]); computes Groebner basis of I wrt a weight vector
|
|
67
|
+
initialMalgrange(f[,s,t,v]); computes Groebner basis of initial Malgrange ideal
|
|
68
|
+
initialIdealW(I,u,v[,s,t]); computes initial ideal of wrt a given weight
|
|
69
|
+
inForm(f,w); computes initial form of poly/ideal wrt a weight
|
|
70
|
+
|
|
71
|
+
restrictionIdeal(I,w[,eng,m,G]); computes restriction ideal of I wrt w
|
|
72
|
+
restrictionModule(I,w[,eng,m,G]); computes restriction module of I wrt w
|
|
73
|
+
integralIdeal(I,w[,eng,m,G]); computes integral ideal of I wrt w
|
|
74
|
+
integralModule(I,w[,eng,m,G]); computes integral module of I wrt w
|
|
75
|
+
deRhamCohom(f[,eng,m]); computes basis of n-th de Rham cohom. group
|
|
76
|
+
deRhamCohomIdeal(I[,w,eng,m,G]); computes basis of n-th de Rham cohom. group
|
|
77
|
+
|
|
78
|
+
charVariety(I); computes characteristic variety of the ideal I
|
|
79
|
+
charInfo(I); computes char. variety, singular locus and primary decomp.
|
|
80
|
+
isFsat(I,F); checks whether the ideal I is F-saturated
|
|
81
|
+
|
|
82
|
+
appelF1(); creates an ideal annihilating Appel F1 function
|
|
83
|
+
appelF2(); creates an ideal annihilating Appel F2 function
|
|
84
|
+
appelF4(); creates an ideal annihilating Appel F4 function
|
|
85
|
+
|
|
86
|
+
fourier(I[,v]); applies Fourier automorphism to ideal
|
|
87
|
+
inverseFourier(I[,v]); applies inverse Fourier automorphism to ideal
|
|
88
|
+
|
|
89
|
+
bFactor(F); computes the roots of irreducible factors of an univariate poly
|
|
90
|
+
intRoots(L); dismisses non-integer roots from list in bFactor format
|
|
91
|
+
poly2list(f); decomposes the polynomial f into a list of terms and exponents
|
|
92
|
+
fl2poly(L,s); reconstructs a monic univariate polynomial from its factorization
|
|
93
|
+
|
|
94
|
+
insertGenerator(id,p[,k]); inserts an element into an ideal/module
|
|
95
|
+
deleteGenerator(id,k); deletes the k-th element from an ideal/module
|
|
96
|
+
|
|
97
|
+
isInt(n); checks whether number n is actually an int
|
|
98
|
+
sortIntvec(v); sorts intvec
|
|
99
|
+
|
|
100
|
+
KEYWORDS: D-module; annihilator of polynomial; annihilator of rational function;
|
|
101
|
+
D-localization; localization of D-module; D-restriction; restriction of
|
|
102
|
+
D-module; D-integration; integration of D-module; characteristic variety;
|
|
103
|
+
Appel function; Appel hypergeometric function
|
|
104
|
+
|
|
105
|
+
SEE ALSO: bfun_lib, dmod_lib, dmodvar_lib, gmssing_lib
|
|
106
|
+
";
|
|
107
|
+
|
|
108
|
+
/*
|
|
109
|
+
Changelog
|
|
110
|
+
21.09.10 by DA:
|
|
111
|
+
- restructured library for better readability
|
|
112
|
+
- new / improved procs:
|
|
113
|
+
- toolbox: isInt, intRoots, sortIntvec
|
|
114
|
+
- GB wrt weights: GBWeight, initialIdealW rewritten using GBWeight
|
|
115
|
+
- restriction/integration: restrictionX, integralX where X in {Module, Ideal},
|
|
116
|
+
fourier, inverseFourier, deRhamCohom, deRhamCohomIdeal
|
|
117
|
+
- characteristic variety: charVariety, charInfo
|
|
118
|
+
- added keywords for features
|
|
119
|
+
- reformated help strings and examples in existing procs
|
|
120
|
+
- added SUPPORT in header
|
|
121
|
+
- added reference (OT)
|
|
122
|
+
|
|
123
|
+
04.10.10 by DA:
|
|
124
|
+
- incorporated suggestions by Oleksandr Motsak, among other:
|
|
125
|
+
- bugfixes for fl2poly, sortIntvec, annPoly, GBWeight
|
|
126
|
+
- enhanced functionality for deleteGenerator, inForm
|
|
127
|
+
|
|
128
|
+
11.10.10 by DA:
|
|
129
|
+
- procedure bFactor now sorts the roots using new static procedure sortNumberIdeal
|
|
130
|
+
|
|
131
|
+
17.03.11 by DA:
|
|
132
|
+
- bugfixes for inForm with polynomial input, typo in restrictionIdealEngine
|
|
133
|
+
|
|
134
|
+
06.06.12 by DA:
|
|
135
|
+
- bugfix and documentation in deRhamCohomIdeal, output and
|
|
136
|
+
documentation in deRhamCohom
|
|
137
|
+
- changed charVariety: no homogenization is needed
|
|
138
|
+
- changed inForm: code is much simpler using jet
|
|
139
|
+
|
|
140
|
+
06.04.20 by VL:
|
|
141
|
+
- engine updated with 2 more modular choices
|
|
142
|
+
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
LIB "bfun.lib"; // for pIntersect etc
|
|
147
|
+
LIB "dmod.lib"; // for SannfsBM etc
|
|
148
|
+
LIB "general.lib"; // for sort
|
|
149
|
+
LIB "gkdim.lib";
|
|
150
|
+
LIB "nctools.lib"; // for isWeyl etc
|
|
151
|
+
LIB "polylib.lib";
|
|
152
|
+
LIB "primdec.lib"; // for primdecGKZ
|
|
153
|
+
LIB "qhmoduli.lib"; // for Max
|
|
154
|
+
LIB "sing.lib"; // for slocus
|
|
155
|
+
LIB "ncModslimgb.lib"; // for modular noncomm GB
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
159
|
+
// testing for consistency of the library:
|
|
160
|
+
proc testdmodapp()
|
|
161
|
+
{
|
|
162
|
+
example annPoly;
|
|
163
|
+
example annRat;
|
|
164
|
+
example DLoc;
|
|
165
|
+
example SDLoc;
|
|
166
|
+
example DLoc0;
|
|
167
|
+
example GBWeight;
|
|
168
|
+
example initialMalgrange;
|
|
169
|
+
example initialIdealW;
|
|
170
|
+
example inForm;
|
|
171
|
+
example restrictionIdeal;
|
|
172
|
+
example restrictionModule;
|
|
173
|
+
example integralIdeal;
|
|
174
|
+
example integralModule;
|
|
175
|
+
example deRhamCohom;
|
|
176
|
+
example deRhamCohomIdeal;
|
|
177
|
+
example charVariety;
|
|
178
|
+
example charInfo;
|
|
179
|
+
example isFsat;
|
|
180
|
+
example appelF1;
|
|
181
|
+
example appelF2;
|
|
182
|
+
example appelF4;
|
|
183
|
+
example fourier;
|
|
184
|
+
example inverseFourier;
|
|
185
|
+
example bFactor;
|
|
186
|
+
example intRoots;
|
|
187
|
+
example poly2list;
|
|
188
|
+
example fl2poly;
|
|
189
|
+
example insertGenerator;
|
|
190
|
+
example deleteGenerator;
|
|
191
|
+
example engine;
|
|
192
|
+
example isInt;
|
|
193
|
+
example sortIntvec;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
// general assumptions ////////////////////////////////////////////////////////
|
|
198
|
+
|
|
199
|
+
static proc dmodappAssumeViolation()
|
|
200
|
+
{
|
|
201
|
+
// char K <> 0 or qring
|
|
202
|
+
if ( (size(ideal(basering)) >0) || (char(basering) >0) )
|
|
203
|
+
{
|
|
204
|
+
ERROR("Basering is inappropriate: characteristic>0 or qring present");
|
|
205
|
+
}
|
|
206
|
+
return();
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
static proc dmodappMoreAssumeViolation()
|
|
210
|
+
{
|
|
211
|
+
// char K <> 0, qring
|
|
212
|
+
dmodappAssumeViolation();
|
|
213
|
+
// no Weyl algebra
|
|
214
|
+
if (isWeyl() == 0)
|
|
215
|
+
{
|
|
216
|
+
ERROR("Basering is not a Weyl algebra");
|
|
217
|
+
}
|
|
218
|
+
// wrong sequence of vars
|
|
219
|
+
int i,n;
|
|
220
|
+
n = nvars(basering) div 2;
|
|
221
|
+
for (i=1; i<=n; i++)
|
|
222
|
+
{
|
|
223
|
+
if (bracket(var(i+n),var(i))<>1)
|
|
224
|
+
{
|
|
225
|
+
ERROR(string(var(i+n))+" is not a differential operator for " +string(var(i)));
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
return();
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
static proc safeVarName (string s, string cv)
|
|
232
|
+
// assumes 's' to be a valid variable name
|
|
233
|
+
// returns valid var name string @@..@s
|
|
234
|
+
{
|
|
235
|
+
string S;
|
|
236
|
+
if (cv == "v") { S = "," + "," + varstr(basering) + ","; }
|
|
237
|
+
if (cv == "c") { S = "," + "," + charstr(basering) + ","; }
|
|
238
|
+
if (cv == "cv") { S = "," + charstr(basering) + "," + varstr(basering) + ","; }
|
|
239
|
+
s = "," + s + ",";
|
|
240
|
+
while (find(S,s) <> 0)
|
|
241
|
+
{
|
|
242
|
+
s[1] = "@";
|
|
243
|
+
s = "," + s;
|
|
244
|
+
}
|
|
245
|
+
s = s[2..size(s)-1];
|
|
246
|
+
return(s)
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
static proc intLike (def i)
|
|
250
|
+
{
|
|
251
|
+
string str = typeof(i);
|
|
252
|
+
if (str == "int" || str == "number" || str == "bigint")
|
|
253
|
+
{
|
|
254
|
+
return(1);
|
|
255
|
+
}
|
|
256
|
+
else
|
|
257
|
+
{
|
|
258
|
+
return(0);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
// toolbox ////////////////////////////////////////////////////////////////////
|
|
264
|
+
|
|
265
|
+
proc engine(def I, int i)
|
|
266
|
+
"USAGE: engine(I,i); I ideal/module/matrix, i an int
|
|
267
|
+
RETURN: the same type as I
|
|
268
|
+
PURPOSE: compute the Groebner basis of I with the algorithm, chosen via i
|
|
269
|
+
NOTE: By default and if i=0, slimgb is used;
|
|
270
|
+
if i=1, std does the job;
|
|
271
|
+
if i=2, modular slimgb is run without final exactness check;
|
|
272
|
+
if i=3, modular slimgb is run with final exactness check.
|
|
273
|
+
EXAMPLE: example engine; shows examples
|
|
274
|
+
"
|
|
275
|
+
{
|
|
276
|
+
/* std - slimgb mix */
|
|
277
|
+
def J;
|
|
278
|
+
// ideal J;
|
|
279
|
+
if ((i<=0) || (i>=4))
|
|
280
|
+
{
|
|
281
|
+
i = 0;
|
|
282
|
+
J = slimgb(I);
|
|
283
|
+
}
|
|
284
|
+
if (i==1)
|
|
285
|
+
{
|
|
286
|
+
// without options -> strange! (ringlist?)
|
|
287
|
+
intvec v = option(get);
|
|
288
|
+
option(redSB);
|
|
289
|
+
option(redTail);
|
|
290
|
+
J = std(I);
|
|
291
|
+
option(set, v);
|
|
292
|
+
}
|
|
293
|
+
if (i==2)
|
|
294
|
+
{
|
|
295
|
+
// modular slimgb without final exactness check
|
|
296
|
+
J = ncmodslimgb(I,0);
|
|
297
|
+
}
|
|
298
|
+
if (i==3)
|
|
299
|
+
{
|
|
300
|
+
// modular slimgb with final exactness check
|
|
301
|
+
J = ncmodslimgb(I,1);
|
|
302
|
+
}
|
|
303
|
+
return(J);
|
|
304
|
+
}
|
|
305
|
+
example
|
|
306
|
+
{
|
|
307
|
+
"EXAMPLE:"; echo = 2;
|
|
308
|
+
ring r = 0,(x,y),Dp;
|
|
309
|
+
ideal I = y*(x3-y2),x*(x3-y2);
|
|
310
|
+
engine(I,0); // uses slimgb
|
|
311
|
+
engine(I,1); // uses std
|
|
312
|
+
engine(I,2); // uses modular slimgb without exactness check
|
|
313
|
+
engine(I,3); // uses modular slimgb with exactness check
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
proc poly2list (poly f)
|
|
317
|
+
"USAGE: poly2list(f); f a poly
|
|
318
|
+
RETURN: list of exponents and corresponding terms of f
|
|
319
|
+
PURPOSE: converts a poly to a list of pairs consisting of intvecs (1st entry)
|
|
320
|
+
@* and polys (2nd entry), where the i-th pair contains the exponent of the
|
|
321
|
+
@* i-th term of f and the i-th term (with coefficient) itself.
|
|
322
|
+
EXAMPLE: example poly2list; shows examples
|
|
323
|
+
"
|
|
324
|
+
{
|
|
325
|
+
list l;
|
|
326
|
+
int i = 1;
|
|
327
|
+
if (f == 0) // just for the zero polynomial
|
|
328
|
+
{
|
|
329
|
+
l[1] = list(leadexp(f), lead(f));
|
|
330
|
+
}
|
|
331
|
+
else
|
|
332
|
+
{
|
|
333
|
+
l[size(f)] = list(); // memory pre-allocation
|
|
334
|
+
while (f != 0)
|
|
335
|
+
{
|
|
336
|
+
l[i] = list(leadexp(f), lead(f));
|
|
337
|
+
f = f - lead(f);
|
|
338
|
+
i++;
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
return(l);
|
|
342
|
+
}
|
|
343
|
+
example
|
|
344
|
+
{
|
|
345
|
+
"EXAMPLE:"; echo = 2;
|
|
346
|
+
ring r = 0,x,dp;
|
|
347
|
+
poly F = x;
|
|
348
|
+
poly2list(F);
|
|
349
|
+
ring r2 = 0,(x,y),dp;
|
|
350
|
+
poly F = x2y+5xy2;
|
|
351
|
+
poly2list(F);
|
|
352
|
+
poly2list(0);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
proc fl2poly(list L, string s)
|
|
356
|
+
"USAGE: fl2poly(L,s); L a list, s a string
|
|
357
|
+
RETURN: poly
|
|
358
|
+
PURPOSE: reconstruct a monic polynomial in one variable from its factorization
|
|
359
|
+
ASSUME: s is a string with the name of some variable and
|
|
360
|
+
@* L is supposed to consist of two entries:
|
|
361
|
+
@* - L[1] of the type ideal with the roots of a polynomial
|
|
362
|
+
@* - L[2] of the type intvec with the multiplicities of corr. roots
|
|
363
|
+
EXAMPLE: example fl2poly; shows examples
|
|
364
|
+
"
|
|
365
|
+
{
|
|
366
|
+
if (rvar(s)==0)
|
|
367
|
+
{
|
|
368
|
+
ERROR(s+ " is no variable in the basering");
|
|
369
|
+
}
|
|
370
|
+
poly x = var(rvar(s));
|
|
371
|
+
poly P = 1;
|
|
372
|
+
ideal RR = L[1];
|
|
373
|
+
int sl = ncols(RR);
|
|
374
|
+
intvec IV = L[2];
|
|
375
|
+
if (sl <> nrows(IV))
|
|
376
|
+
{
|
|
377
|
+
ERROR("number of roots doesn't match number of multiplicities");
|
|
378
|
+
}
|
|
379
|
+
for(int i=1; i<=sl; i++)
|
|
380
|
+
{
|
|
381
|
+
if (IV[i] > 0)
|
|
382
|
+
{
|
|
383
|
+
P = P*((x-RR[i])^IV[i]);
|
|
384
|
+
}
|
|
385
|
+
else
|
|
386
|
+
{
|
|
387
|
+
printf("Ignored the root with incorrect multiplicity %s",string(IV[i]));
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
return(P);
|
|
391
|
+
}
|
|
392
|
+
example
|
|
393
|
+
{
|
|
394
|
+
"EXAMPLE:"; echo = 2;
|
|
395
|
+
ring r = 0,(x,y,z,s),Dp;
|
|
396
|
+
ideal I = -1,-4/3,0,-5/3,-2;
|
|
397
|
+
intvec mI = 2,1,2,1,1;
|
|
398
|
+
list BS = I,mI;
|
|
399
|
+
poly p = fl2poly(BS,"s");
|
|
400
|
+
p;
|
|
401
|
+
factorize(p,2);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
proc insertGenerator (list #)
|
|
405
|
+
"USAGE: insertGenerator(id,p[,k]);
|
|
406
|
+
@* id an ideal/module, p a poly/vector, k an optional int
|
|
407
|
+
RETURN: of the same type as id
|
|
408
|
+
PURPOSE: inserts p into id at k-th position and returns the enlarged object
|
|
409
|
+
NOTE: If k is given, p is inserted at position k, otherwise (and by default),
|
|
410
|
+
@* p is inserted at the beginning (k=1).
|
|
411
|
+
SEE ALSO: deleteGenerator
|
|
412
|
+
EXAMPLE: example insertGenerator; shows examples
|
|
413
|
+
"
|
|
414
|
+
{
|
|
415
|
+
if (size(#) < 2)
|
|
416
|
+
{
|
|
417
|
+
ERROR("insertGenerator has to be called with at least 2 arguments (ideal/module,poly/vector)");
|
|
418
|
+
}
|
|
419
|
+
string inp1 = typeof(#[1]);
|
|
420
|
+
if (inp1 == "ideal" || inp1 == "module")
|
|
421
|
+
{
|
|
422
|
+
def id = #[1];
|
|
423
|
+
}
|
|
424
|
+
else { ERROR("first argument has to be of type ideal or module"); }
|
|
425
|
+
string inp2 = typeof(#[2]);
|
|
426
|
+
if (inp2 == "poly" || inp2 == "vector")
|
|
427
|
+
{
|
|
428
|
+
def f = #[2];
|
|
429
|
+
}
|
|
430
|
+
else { ERROR("second argument has to be of type poly/vector"); }
|
|
431
|
+
if (inp1 == "ideal" && inp2 == "vector")
|
|
432
|
+
{
|
|
433
|
+
ERROR("second argument has to be a polynomial if first argument is an ideal");
|
|
434
|
+
}
|
|
435
|
+
// don't check module/poly combination due to auto-conversion
|
|
436
|
+
// if (inp1 == "module" && inp2 == "poly")
|
|
437
|
+
// {
|
|
438
|
+
// ERROR("second argument has to be a vector if first argument is a module");
|
|
439
|
+
// }
|
|
440
|
+
int n = ncols(id);
|
|
441
|
+
int k = 1; // default
|
|
442
|
+
if (size(#)>=3)
|
|
443
|
+
{
|
|
444
|
+
if (intLike(#[3]))
|
|
445
|
+
{
|
|
446
|
+
k = int(#[3]);
|
|
447
|
+
if (k<=0)
|
|
448
|
+
{
|
|
449
|
+
ERROR("third argument has to be positive");
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
else { ERROR("third argument has to be of type int"); }
|
|
453
|
+
}
|
|
454
|
+
execute(inp1 +" J;");
|
|
455
|
+
if (k == 1) { J = f,id; }
|
|
456
|
+
else
|
|
457
|
+
{
|
|
458
|
+
if (k>n)
|
|
459
|
+
{
|
|
460
|
+
J = id;
|
|
461
|
+
J[k] = f;
|
|
462
|
+
}
|
|
463
|
+
else // 1<k<=n
|
|
464
|
+
{
|
|
465
|
+
J[n+1] = id[n]; // preinit
|
|
466
|
+
J[1..k-1] = id[1..k-1];
|
|
467
|
+
J[k] = f;
|
|
468
|
+
J[k+1..n+1] = id[k..n];
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return(J);
|
|
472
|
+
}
|
|
473
|
+
example
|
|
474
|
+
{
|
|
475
|
+
"EXAMPLE:"; echo = 2;
|
|
476
|
+
ring r = 0,(x,y,z),dp;
|
|
477
|
+
ideal I = x^2,z^4;
|
|
478
|
+
insertGenerator(I,y^3);
|
|
479
|
+
insertGenerator(I,y^3,2);
|
|
480
|
+
module M = I*gen(3);
|
|
481
|
+
insertGenerator(M,[x^3,y^2,z],2);
|
|
482
|
+
insertGenerator(M,x+y+z,4);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
proc deleteGenerator (def id, int k)
|
|
486
|
+
"USAGE: deleteGenerator(id,k); id an ideal/module, k an int
|
|
487
|
+
RETURN: of the same type as id
|
|
488
|
+
PURPOSE: deletes the k-th generator from the first argument and returns
|
|
489
|
+
@* the altered object
|
|
490
|
+
SEE ALSO: insertGenerator
|
|
491
|
+
EXAMPLE: example deleteGenerator; shows examples
|
|
492
|
+
"
|
|
493
|
+
{
|
|
494
|
+
string inp1 = typeof(id);
|
|
495
|
+
if (inp1 <> "ideal" && inp1 <> "module")
|
|
496
|
+
{
|
|
497
|
+
ERROR("first argument has to be of type ideal or module");
|
|
498
|
+
}
|
|
499
|
+
execute(inp1 +" J;");
|
|
500
|
+
int n = ncols(id);
|
|
501
|
+
if (n == 1 && k == 1) { return(J); }
|
|
502
|
+
if (k<=0 || k>n)
|
|
503
|
+
{
|
|
504
|
+
ERROR("second argument has to be in the range 1,...,"+string(n));
|
|
505
|
+
}
|
|
506
|
+
J[n-1] = 0; // preinit
|
|
507
|
+
if (k == 1) { J = id[2..n]; }
|
|
508
|
+
else
|
|
509
|
+
{
|
|
510
|
+
if (k == n) { J = id[1..n-1]; }
|
|
511
|
+
else
|
|
512
|
+
{
|
|
513
|
+
J[1..k-1] = id[1..k-1];
|
|
514
|
+
J[k..n-1] = id[k+1..n];
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
return(J);
|
|
518
|
+
}
|
|
519
|
+
example
|
|
520
|
+
{
|
|
521
|
+
"EXAMPLE:"; echo = 2;
|
|
522
|
+
ring r = 0,(x,y,z),dp;
|
|
523
|
+
ideal I = x^2,y^3,z^4;
|
|
524
|
+
deleteGenerator(I,2);
|
|
525
|
+
module M = [x,y,z],[x2,y2,z2],[x3,y3,z3];
|
|
526
|
+
print(deleteGenerator(M,2));
|
|
527
|
+
M = M[1];
|
|
528
|
+
deleteGenerator(M,1);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
static proc sortNumberIdeal (ideal I)
|
|
532
|
+
// sorts ideal of constant polys (ie numbers), returns according permutation
|
|
533
|
+
{
|
|
534
|
+
int i;
|
|
535
|
+
int nI = ncols(I);
|
|
536
|
+
intvec dI;
|
|
537
|
+
for (i=nI; i>0; i--)
|
|
538
|
+
{
|
|
539
|
+
dI[i] = int(denominator(leadcoef(I[i])));
|
|
540
|
+
}
|
|
541
|
+
int lcmI = lcm(dI);
|
|
542
|
+
for (i=nI; i>0; i--)
|
|
543
|
+
{
|
|
544
|
+
dI[i] = int(lcmI*leadcoef(I[i]));
|
|
545
|
+
}
|
|
546
|
+
intvec perm = sortIntvec(dI)[2];
|
|
547
|
+
return(perm);
|
|
548
|
+
}
|
|
549
|
+
example
|
|
550
|
+
{
|
|
551
|
+
"EXAMPLE:"; echo = 2;
|
|
552
|
+
ring r = 0,s,dp;
|
|
553
|
+
ideal I = -9/20,-11/20,-23/20,-19/20,-1,-13/10,-27/20,-13/20,-21/20,-17/20,
|
|
554
|
+
-11/10,-9/10,-7/10; // roots of BS poly of reiffen(4,5)
|
|
555
|
+
intvec v = sortNumberIdeal(I); v;
|
|
556
|
+
I[v];
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
proc bFactor (poly F)
|
|
560
|
+
"USAGE: bFactor(f); f poly
|
|
561
|
+
RETURN: list of ideal and intvec and possibly a string
|
|
562
|
+
PURPOSE: tries to compute the roots of a univariate poly f
|
|
563
|
+
NOTE: The output list consists of two or three entries:
|
|
564
|
+
@* roots of f as an ideal, their multiplicities as intvec, and,
|
|
565
|
+
@* if present, a third one being the product of all irreducible factors
|
|
566
|
+
@* of degree greater than one, given as string.
|
|
567
|
+
@* If f is the zero polynomial or if f has no roots in the ground field,
|
|
568
|
+
@* this is encoded as root 0 with multiplicity 0.
|
|
569
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
570
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
571
|
+
EXAMPLE: example bFactor; shows examples
|
|
572
|
+
"
|
|
573
|
+
{
|
|
574
|
+
int ppl = printlevel - voice +2;
|
|
575
|
+
def save = basering;
|
|
576
|
+
ideal LI = variables(F);
|
|
577
|
+
list L;
|
|
578
|
+
int i = size(LI);
|
|
579
|
+
if (i>1) { ERROR("poly has to be univariate")}
|
|
580
|
+
if (i == 0)
|
|
581
|
+
{
|
|
582
|
+
dbprint(ppl,"// poly is constant");
|
|
583
|
+
L = list(ideal(0),intvec(0),string(F));
|
|
584
|
+
return(L);
|
|
585
|
+
}
|
|
586
|
+
poly v = LI[1];
|
|
587
|
+
L = ringlist(save); L = L[1..4];
|
|
588
|
+
L[2] = list(string(v));
|
|
589
|
+
L[3] = list(list("dp",intvec(1)),list("C",intvec(0)));
|
|
590
|
+
def @S = ring(L);
|
|
591
|
+
setring @S;
|
|
592
|
+
poly ir = 1; poly F = imap(save,F);
|
|
593
|
+
list L = factorize(F);
|
|
594
|
+
ideal I = L[1];
|
|
595
|
+
intvec m = L[2];
|
|
596
|
+
ideal II; intvec mm;
|
|
597
|
+
for (i=2; i<=ncols(I); i++)
|
|
598
|
+
{
|
|
599
|
+
if (deg(I[i]) > 1)
|
|
600
|
+
{
|
|
601
|
+
ir = ir * I[i]^m[i];
|
|
602
|
+
}
|
|
603
|
+
else
|
|
604
|
+
{
|
|
605
|
+
II[size(II)+1] = I[i];
|
|
606
|
+
mm[size(II)] = m[i];
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
II = normalize(II);
|
|
610
|
+
II = subst(II,var(1),0);
|
|
611
|
+
II = -II;
|
|
612
|
+
intvec perm = sortNumberIdeal(II);
|
|
613
|
+
II = II[perm];
|
|
614
|
+
mm = mm[perm];
|
|
615
|
+
if (size(II)>0)
|
|
616
|
+
{
|
|
617
|
+
dbprint(ppl,"// found roots");
|
|
618
|
+
dbprint(ppl-1,string(II));
|
|
619
|
+
}
|
|
620
|
+
else
|
|
621
|
+
{
|
|
622
|
+
dbprint(ppl,"// found no roots");
|
|
623
|
+
}
|
|
624
|
+
L = list(II,mm);
|
|
625
|
+
if (ir <> 1)
|
|
626
|
+
{
|
|
627
|
+
dbprint(ppl,"// found irreducible factors");
|
|
628
|
+
ir = cleardenom(ir);
|
|
629
|
+
dbprint(ppl-1,string(ir));
|
|
630
|
+
L = L + list(string(ir));
|
|
631
|
+
}
|
|
632
|
+
else
|
|
633
|
+
{
|
|
634
|
+
dbprint(ppl,"// no irreducible factors found");
|
|
635
|
+
}
|
|
636
|
+
setring save;
|
|
637
|
+
L = imap(@S,L);
|
|
638
|
+
return(L);
|
|
639
|
+
}
|
|
640
|
+
example
|
|
641
|
+
{
|
|
642
|
+
"EXAMPLE:"; echo = 2;
|
|
643
|
+
ring r = 0,(x,y),dp;
|
|
644
|
+
bFactor((x^2-1)^2);
|
|
645
|
+
bFactor((x^2+1)^2);
|
|
646
|
+
bFactor((y^2+1/2)*(y+9)*(y-7));
|
|
647
|
+
bFactor(1);
|
|
648
|
+
bFactor(0);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
proc isInt (number n)
|
|
652
|
+
"USAGE: isInt(n); n a number
|
|
653
|
+
RETURN: int, 1 if n is an integer or 0 otherwise
|
|
654
|
+
PURPOSE: check whether given object of type number is actually an int
|
|
655
|
+
NOTE: Parameters are treated as integers.
|
|
656
|
+
EXAMPLE: example isInt; shows an example
|
|
657
|
+
"
|
|
658
|
+
{
|
|
659
|
+
number d = denominator(n);
|
|
660
|
+
if (d<>1)
|
|
661
|
+
{
|
|
662
|
+
return(0);
|
|
663
|
+
}
|
|
664
|
+
else
|
|
665
|
+
{
|
|
666
|
+
return(1);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
example
|
|
670
|
+
{
|
|
671
|
+
"EXAMPLE:"; echo = 2;
|
|
672
|
+
ring r = 0,x,dp;
|
|
673
|
+
number n = 4/3;
|
|
674
|
+
isInt(n);
|
|
675
|
+
n = 11;
|
|
676
|
+
isInt(n);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
proc intRoots (list l)
|
|
680
|
+
"USAGE: isInt(L); L a list
|
|
681
|
+
RETURN: list
|
|
682
|
+
PURPOSE: extracts integer roots from a list given in @code{bFactor} format
|
|
683
|
+
ASSUME: The input list must be given in the format of @code{bFactor}.
|
|
684
|
+
NOTE: Parameters are treated as integers.
|
|
685
|
+
SEE ALSO: bFactor
|
|
686
|
+
EXAMPLE: example intRoots; shows an example
|
|
687
|
+
"
|
|
688
|
+
{
|
|
689
|
+
int wronginput;
|
|
690
|
+
int sl = size(l);
|
|
691
|
+
if (sl>0)
|
|
692
|
+
{
|
|
693
|
+
if (typeof(l[1])<>"ideal"){wronginput = 1;}
|
|
694
|
+
if (sl>1)
|
|
695
|
+
{
|
|
696
|
+
if (typeof(l[2])<>"intvec"){wronginput = 1;}
|
|
697
|
+
if (sl>2)
|
|
698
|
+
{
|
|
699
|
+
if (typeof(l[3])<>"string"){wronginput = 1;}
|
|
700
|
+
if (sl>3){wronginput = 1;}
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
if (sl<2){wronginput = 1;}
|
|
705
|
+
if (wronginput)
|
|
706
|
+
{
|
|
707
|
+
ERROR("Given list has wrong format.");
|
|
708
|
+
}
|
|
709
|
+
int i,j;
|
|
710
|
+
ideal l1 = l[1];
|
|
711
|
+
int n = ncols(l1);
|
|
712
|
+
j = 1;
|
|
713
|
+
ideal I;
|
|
714
|
+
intvec v;
|
|
715
|
+
for (i=1; i<=n; i++)
|
|
716
|
+
{
|
|
717
|
+
if (size(l1[j])>1) // poly not number
|
|
718
|
+
{
|
|
719
|
+
ERROR("Ideal in list has wrong format.");
|
|
720
|
+
}
|
|
721
|
+
if (isInt(leadcoef(l1[i])))
|
|
722
|
+
{
|
|
723
|
+
I[j] = l1[i];
|
|
724
|
+
v[j] = l[2][i];
|
|
725
|
+
j++;
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
return(list(I,v));
|
|
729
|
+
}
|
|
730
|
+
example
|
|
731
|
+
{
|
|
732
|
+
"EXAMPLE:"; echo = 2;
|
|
733
|
+
ring r = 0,x,dp;
|
|
734
|
+
list L = bFactor((x-4/3)*(x+3)^2*(x-5)^4); L;
|
|
735
|
+
intRoots(L);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
proc sortIntvec (intvec v)
|
|
739
|
+
"USAGE: sortIntvec(v); v an intvec
|
|
740
|
+
RETURN: list of two intvecs
|
|
741
|
+
PURPOSE: sorts an intvec
|
|
742
|
+
NOTE: In the output list L, the first entry consists of the entries of v
|
|
743
|
+
@* satisfying L[1][i] >= L[1][i+1]. The second entry is a permutation
|
|
744
|
+
@* such that v[L[2]] = L[1].
|
|
745
|
+
@* Unlike in the procedure @code{sort}, zeros are not dismissed.
|
|
746
|
+
SEE ALSO: sort
|
|
747
|
+
EXAMPLE: example sortIntvec; shows examples
|
|
748
|
+
"
|
|
749
|
+
{
|
|
750
|
+
int i;
|
|
751
|
+
intvec vpos,vzero,vneg,vv,sortv,permv;
|
|
752
|
+
list l;
|
|
753
|
+
for (i=1; i<=nrows(v); i++)
|
|
754
|
+
{
|
|
755
|
+
if (v[i]>0)
|
|
756
|
+
{
|
|
757
|
+
vpos = vpos,i;
|
|
758
|
+
}
|
|
759
|
+
else
|
|
760
|
+
{
|
|
761
|
+
if (v[i]==0)
|
|
762
|
+
{
|
|
763
|
+
vzero = vzero,i;
|
|
764
|
+
}
|
|
765
|
+
else // v[i]<0
|
|
766
|
+
{
|
|
767
|
+
vneg = vneg,i;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
if (size(vpos)>1)
|
|
772
|
+
{
|
|
773
|
+
vpos = vpos[2..size(vpos)];
|
|
774
|
+
vv = v[vpos];
|
|
775
|
+
l = sort(vv);
|
|
776
|
+
vv = l[1];
|
|
777
|
+
vpos = vpos[l[2]];
|
|
778
|
+
sortv = vv[size(vv)..1];
|
|
779
|
+
permv = vpos[size(vv)..1];
|
|
780
|
+
}
|
|
781
|
+
if (size(vzero)>1)
|
|
782
|
+
{
|
|
783
|
+
vzero = vzero[2..size(vzero)];
|
|
784
|
+
permv = permv,vzero;
|
|
785
|
+
sortv = sortv,0:size(vzero);
|
|
786
|
+
}
|
|
787
|
+
if (size(vneg)>1)
|
|
788
|
+
{
|
|
789
|
+
vneg = vneg[2..size(vneg)];
|
|
790
|
+
vv = -v[vneg];
|
|
791
|
+
l = sort(vv);
|
|
792
|
+
vv = -l[1];
|
|
793
|
+
vneg = vneg[l[2]];
|
|
794
|
+
sortv = sortv,vv;
|
|
795
|
+
permv = permv,vneg;
|
|
796
|
+
}
|
|
797
|
+
if (permv[1]==0)
|
|
798
|
+
{
|
|
799
|
+
sortv = sortv[2..size(sortv)];
|
|
800
|
+
permv = permv[2..size(permv)];
|
|
801
|
+
}
|
|
802
|
+
return(list(sortv,permv));
|
|
803
|
+
}
|
|
804
|
+
example
|
|
805
|
+
{
|
|
806
|
+
"EXAMPLE:"; echo = 2;
|
|
807
|
+
ring r = 0,x,dp;
|
|
808
|
+
intvec v = -1,0,1,-2,0,2;
|
|
809
|
+
list L = sortIntvec(v); L;
|
|
810
|
+
v[L[2]];
|
|
811
|
+
v = -3,0;
|
|
812
|
+
sortIntvec(v);
|
|
813
|
+
v = 0,-3;
|
|
814
|
+
sortIntvec(v);
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
|
|
818
|
+
// F-saturation ///////////////////////////////////////////////////////////////
|
|
819
|
+
|
|
820
|
+
proc isFsat(ideal I, poly F)
|
|
821
|
+
"USAGE: isFsat(I, F); I an ideal, F a poly
|
|
822
|
+
RETURN: int, 1 if I is F-saturated and 0 otherwise
|
|
823
|
+
PURPOSE: checks whether the ideal I is F-saturated
|
|
824
|
+
NOTE: We check indeed that Ker(D--> F--> D/I) is 0, where D is the basering.
|
|
825
|
+
EXAMPLE: example isFsat; shows examples
|
|
826
|
+
"
|
|
827
|
+
{
|
|
828
|
+
/* checks whether I is F-saturated, that is Ke (D -F-> D/I) is 0 */
|
|
829
|
+
/* works in any algebra */
|
|
830
|
+
/* for simplicity : later check attrib */
|
|
831
|
+
/* returns 1 if I is F-sat */
|
|
832
|
+
if (attrib(I,"isSB")!=1)
|
|
833
|
+
{
|
|
834
|
+
I = groebner(I);
|
|
835
|
+
}
|
|
836
|
+
matrix @M = matrix(I);
|
|
837
|
+
matrix @F[1][1] = F;
|
|
838
|
+
def S = modulo(module(@F),module(@M));
|
|
839
|
+
S = NF(S,I);
|
|
840
|
+
S = groebner(S);
|
|
841
|
+
return( (gkdim(S) == -1) );
|
|
842
|
+
}
|
|
843
|
+
example
|
|
844
|
+
{
|
|
845
|
+
"EXAMPLE:"; echo = 2;
|
|
846
|
+
ring r = 0,(x,y),dp;
|
|
847
|
+
poly G = x*(x-y)*y;
|
|
848
|
+
def A = annfs(G);
|
|
849
|
+
setring A;
|
|
850
|
+
poly F = x3-y2;
|
|
851
|
+
isFsat(LD,F);
|
|
852
|
+
ideal J = LD*F;
|
|
853
|
+
isFsat(J,F);
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
// annihilators ///////////////////////////////////////////////////////////////
|
|
858
|
+
|
|
859
|
+
proc annRat(poly g, poly f)
|
|
860
|
+
"USAGE: annRat(g,f); f, g polynomials
|
|
861
|
+
RETURN: ring (a Weyl algebra) containing an ideal 'LD'
|
|
862
|
+
PURPOSE: compute the annihilator of the rational function g/f in the
|
|
863
|
+
@* corresponding Weyl algebra
|
|
864
|
+
ASSUME: basering is commutative and over a field of characteristic 0
|
|
865
|
+
NOTE: Activate the output ring with the @code{setring} command.
|
|
866
|
+
@* In the output ring, the ideal 'LD' (in Groebner basis) is the
|
|
867
|
+
@* annihilator of g/f.
|
|
868
|
+
@* The algorithm uses the computation of Ann(f^{-1}) via D-modules,
|
|
869
|
+
@* see (SST).
|
|
870
|
+
DISPLAY: If printlevel =1, progress debug messages will be printed,
|
|
871
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
872
|
+
SEE ALSO: annPoly
|
|
873
|
+
EXAMPLE: example annRat; shows examples
|
|
874
|
+
"
|
|
875
|
+
{
|
|
876
|
+
// assumption check
|
|
877
|
+
dmodappAssumeViolation();
|
|
878
|
+
if (!isCommutative())
|
|
879
|
+
{
|
|
880
|
+
ERROR("Basering must be commutative.");
|
|
881
|
+
}
|
|
882
|
+
// assumptions: f is not a constant
|
|
883
|
+
if (f==0) { ERROR("the denominator f cannot be zero"); }
|
|
884
|
+
if ((leadexp(f) == 0) && (size(f) < 2))
|
|
885
|
+
{
|
|
886
|
+
// f = const, so use annPoly
|
|
887
|
+
g = g/f;
|
|
888
|
+
def @R = annPoly(g);
|
|
889
|
+
return(@R);
|
|
890
|
+
}
|
|
891
|
+
// computes the annihilator of g/f
|
|
892
|
+
def save = basering;
|
|
893
|
+
int ppl = printlevel-voice+2;
|
|
894
|
+
dbprint(ppl,"// -1-[annRat] computing the ann f^s");
|
|
895
|
+
def @R1 = SannfsBM(f);
|
|
896
|
+
setring @R1;
|
|
897
|
+
poly f = imap(save,f);
|
|
898
|
+
int i,mir;
|
|
899
|
+
int isr = 0; // checkRoot1(LD,f,1); // roots are negative, have to enter positive int
|
|
900
|
+
if (!isr)
|
|
901
|
+
{
|
|
902
|
+
// -1 is not the root
|
|
903
|
+
// find the m.i.r iteratively
|
|
904
|
+
mir = 0;
|
|
905
|
+
for(i=nvars(save)+1; i>=1; i--)
|
|
906
|
+
{
|
|
907
|
+
isr = checkRoot1(LD,f,i);
|
|
908
|
+
if (isr) { mir =-i; break; }
|
|
909
|
+
}
|
|
910
|
+
if (mir ==0)
|
|
911
|
+
{
|
|
912
|
+
ERROR("No integer root found! Aborting computations, inform the authors!");
|
|
913
|
+
}
|
|
914
|
+
// now mir == i is m.i.r.
|
|
915
|
+
}
|
|
916
|
+
else
|
|
917
|
+
{
|
|
918
|
+
// -1 is the m.i.r
|
|
919
|
+
mir = -1;
|
|
920
|
+
}
|
|
921
|
+
dbprint(ppl,"// -2-[annRat] the minimal integer root is ");
|
|
922
|
+
dbprint(ppl-1, mir);
|
|
923
|
+
// use annfspecial
|
|
924
|
+
dbprint(ppl,"// -3-[annRat] running annfspecial ");
|
|
925
|
+
ideal AF = annfspecialOld(LD,f,mir,-1); // ann f^{-1}
|
|
926
|
+
// LD = subst(LD,s,j);
|
|
927
|
+
// LD = engine(LD,0);
|
|
928
|
+
// modify the ring: throw s away
|
|
929
|
+
// output ring comes from SannfsBM
|
|
930
|
+
list U = ringlist(@R1);
|
|
931
|
+
list tmp; // variables
|
|
932
|
+
for(i=1; i<=size(U[2])-1; i++)
|
|
933
|
+
{
|
|
934
|
+
tmp[i] = U[2][i];
|
|
935
|
+
}
|
|
936
|
+
U[2] = tmp;
|
|
937
|
+
tmp = 0;
|
|
938
|
+
tmp[1] = U[3][1]; // x,Dx block
|
|
939
|
+
tmp[2] = U[3][3]; // module block
|
|
940
|
+
U[3] = tmp;
|
|
941
|
+
tmp = 0;
|
|
942
|
+
tmp = U[1],U[2],U[3],U[4];
|
|
943
|
+
def @R2 = ring(tmp);
|
|
944
|
+
setring @R2;
|
|
945
|
+
// now supply with Weyl algebra relations
|
|
946
|
+
int N = nvars(@R2) div 2;
|
|
947
|
+
matrix @D[2*N][2*N];
|
|
948
|
+
for(i=1; i<=N; i++)
|
|
949
|
+
{
|
|
950
|
+
@D[i,N+i]=1;
|
|
951
|
+
}
|
|
952
|
+
def @R3 = nc_algebra(1,@D);
|
|
953
|
+
setring @R3;
|
|
954
|
+
dbprint(ppl,"// - -[annRat] ring without s is ready:");
|
|
955
|
+
dbprint(ppl-1,@R3);
|
|
956
|
+
poly g = imap(save,g);
|
|
957
|
+
matrix G[1][1] = g;
|
|
958
|
+
matrix LL = matrix(imap(@R1,AF));
|
|
959
|
+
kill @R1; kill @R2;
|
|
960
|
+
dbprint(ppl,"// -4-[annRat] running modulo");
|
|
961
|
+
ideal LD = modulo(G,LL);
|
|
962
|
+
dbprint(ppl,"// -4-[annRat] running GB on the final result");
|
|
963
|
+
LD = engine(LD,0);
|
|
964
|
+
export LD;
|
|
965
|
+
return(@R3);
|
|
966
|
+
}
|
|
967
|
+
example
|
|
968
|
+
{
|
|
969
|
+
"EXAMPLE:"; echo = 2;
|
|
970
|
+
ring r = 0,(x,y),dp;
|
|
971
|
+
poly g = 2*x*y; poly f = x^2 - y^3;
|
|
972
|
+
def B = annRat(g,f);
|
|
973
|
+
setring B;
|
|
974
|
+
LD;
|
|
975
|
+
// Now, compare with the output of Macaulay2:
|
|
976
|
+
ideal tst = 3*x*Dx + 2*y*Dy + 1, y^3*Dy^2 - x^2*Dy^2 + 6*y^2*Dy + 6*y,
|
|
977
|
+
9*y^2*Dx^2*Dy-4*y*Dy^3+27*y*Dx^2+2*Dy^2, 9*y^3*Dx^2-4*y^2*Dy^2+10*y*Dy -10;
|
|
978
|
+
option(redSB); option(redTail);
|
|
979
|
+
LD = groebner(LD);
|
|
980
|
+
tst = groebner(tst);
|
|
981
|
+
print(matrix(NF(LD,tst))); print(matrix(NF(tst,LD)));
|
|
982
|
+
// So, these two answers are the same
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
proc annPoly(poly f)
|
|
986
|
+
"USAGE: annPoly(f); f a poly
|
|
987
|
+
RETURN: ring (a Weyl algebra) containing an ideal 'LD'
|
|
988
|
+
PURPOSE: compute the complete annihilator ideal of f in the corresponding
|
|
989
|
+
@* Weyl algebra
|
|
990
|
+
ASSUME: basering is commutative and over a field of characteristic 0
|
|
991
|
+
NOTE: Activate the output ring with the @code{setring} command.
|
|
992
|
+
@* In the output ring, the ideal 'LD' (in Groebner basis) is the
|
|
993
|
+
@* annihilator.
|
|
994
|
+
DISPLAY: If printlevel =1, progress debug messages will be printed,
|
|
995
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
996
|
+
SEE ALSO: annRat
|
|
997
|
+
EXAMPLE: example annPoly; shows examples
|
|
998
|
+
"
|
|
999
|
+
{
|
|
1000
|
+
// assumption check
|
|
1001
|
+
dmodappAssumeViolation();
|
|
1002
|
+
if (!isCommutative())
|
|
1003
|
+
{
|
|
1004
|
+
ERROR("Basering must be commutative.");
|
|
1005
|
+
}
|
|
1006
|
+
// computes a system of linear PDEs with polynomial coeffs for f
|
|
1007
|
+
def save = basering;
|
|
1008
|
+
list L = ringlist(save);
|
|
1009
|
+
list Name = L[2];
|
|
1010
|
+
int N = nvars(save);
|
|
1011
|
+
int i;
|
|
1012
|
+
for (i=1; i<=N; i++)
|
|
1013
|
+
{
|
|
1014
|
+
Name[N+i] = safeVarName("D"+Name[i],"cv"); // concat
|
|
1015
|
+
}
|
|
1016
|
+
L[2] = Name;
|
|
1017
|
+
def @R = ring(L);
|
|
1018
|
+
setring @R;
|
|
1019
|
+
def @@R = Weyl();
|
|
1020
|
+
setring @@R;
|
|
1021
|
+
kill @R;
|
|
1022
|
+
matrix M[1][N];
|
|
1023
|
+
for (i=1; i<=N; i++)
|
|
1024
|
+
{
|
|
1025
|
+
M[1,i] = var(N+i);
|
|
1026
|
+
}
|
|
1027
|
+
matrix F[1][1] = imap(save,f);
|
|
1028
|
+
def I = modulo(module(F),module(M));
|
|
1029
|
+
ideal LD = I;
|
|
1030
|
+
LD = groebner(LD);
|
|
1031
|
+
export LD;
|
|
1032
|
+
return(@@R);
|
|
1033
|
+
}
|
|
1034
|
+
example
|
|
1035
|
+
{
|
|
1036
|
+
"EXAMPLE:"; echo = 2;
|
|
1037
|
+
ring r = 0,(x,y,z),dp;
|
|
1038
|
+
poly f = x^2*z - y^3;
|
|
1039
|
+
def A = annPoly(f);
|
|
1040
|
+
setring A; // A is the 3rd Weyl algebra in 6 variables
|
|
1041
|
+
LD; // the Groebner basis of annihilator
|
|
1042
|
+
gkdim(LD); // must be 3 = 6/2, since A/LD is holonomic module
|
|
1043
|
+
NF(Dy^4, LD); // must be 0 since Dy^4 clearly annihilates f
|
|
1044
|
+
poly f = imap(r,f);
|
|
1045
|
+
NF(LD*f,std(ideal(Dx,Dy,Dz))); // must be zero if LD indeed annihilates f
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
// localizations //////////////////////////////////////////////////////////////
|
|
1051
|
+
|
|
1052
|
+
proc DLoc(ideal I, poly F)
|
|
1053
|
+
"USAGE: DLoc(I, f); I an ideal, f a poly
|
|
1054
|
+
RETURN: list of ideal and list
|
|
1055
|
+
ASSUME: the basering is a Weyl algebra
|
|
1056
|
+
PURPOSE: compute the presentation of the localization of D/I w.r.t. f^s
|
|
1057
|
+
NOTE: In the output list L,
|
|
1058
|
+
@* - L[1] is an ideal (given as Groebner basis), the presentation of the
|
|
1059
|
+
@* localization,
|
|
1060
|
+
@* - L[2] is a list containing roots with multiplicities of Bernstein
|
|
1061
|
+
@* polynomial of (D/I)_f.
|
|
1062
|
+
DISPLAY: If printlevel =1, progress debug messages will be printed,
|
|
1063
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
1064
|
+
EXAMPLE: example DLoc; shows examples
|
|
1065
|
+
"
|
|
1066
|
+
{
|
|
1067
|
+
/* runs SDLoc and DLoc0 */
|
|
1068
|
+
/* assume: run from Weyl algebra */
|
|
1069
|
+
dmodappAssumeViolation();
|
|
1070
|
+
if (!isWeyl())
|
|
1071
|
+
{
|
|
1072
|
+
ERROR("Basering is not a Weyl algebra");
|
|
1073
|
+
}
|
|
1074
|
+
int old_printlevel = printlevel;
|
|
1075
|
+
printlevel=printlevel+1;
|
|
1076
|
+
def @R = basering;
|
|
1077
|
+
def @R2 = SDLoc(I,F);
|
|
1078
|
+
setring @R2;
|
|
1079
|
+
poly F = imap(@R,F);
|
|
1080
|
+
def @R3 = DLoc0(LD,F);
|
|
1081
|
+
setring @R3;
|
|
1082
|
+
ideal bs = BS[1];
|
|
1083
|
+
intvec m = BS[2];
|
|
1084
|
+
setring @R;
|
|
1085
|
+
ideal LD0 = imap(@R3,LD0);
|
|
1086
|
+
ideal bs = imap(@R3,bs);
|
|
1087
|
+
list BS; BS[1] = bs; BS[2] = m;
|
|
1088
|
+
kill @R3;
|
|
1089
|
+
printlevel = old_printlevel;
|
|
1090
|
+
return(list(LD0,BS));
|
|
1091
|
+
}
|
|
1092
|
+
example;
|
|
1093
|
+
{
|
|
1094
|
+
"EXAMPLE:"; echo = 2;
|
|
1095
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
1096
|
+
def R = Weyl(); setring R; // Weyl algebra in variables x,y,Dx,Dy
|
|
1097
|
+
poly F = x2-y3;
|
|
1098
|
+
ideal I = (y^3 - x^2)*Dx - 2*x, (y^3 - x^2)*Dy + 3*y^2; // I = Dx*F, Dy*F;
|
|
1099
|
+
// I is not holonomic, since its dimension is not 4/2=2
|
|
1100
|
+
gkdim(I);
|
|
1101
|
+
list L = DLoc(I, x2-y3);
|
|
1102
|
+
L[1]; // localized module (R/I)_f is isomorphic to R/LD0
|
|
1103
|
+
L[2]; // description of b-function for localization
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
proc DLoc0(ideal I, poly F)
|
|
1107
|
+
"USAGE: DLoc0(I, f); I an ideal, f a poly
|
|
1108
|
+
RETURN: ring (a Weyl algebra) containing an ideal 'LD0' and a list 'BS'
|
|
1109
|
+
PURPOSE: compute the presentation of the localization of D/I w.r.t. f^s,
|
|
1110
|
+
@* where D is a Weyl Algebra, based on the output of procedure SDLoc
|
|
1111
|
+
ASSUME: the basering is similar to the output ring of SDLoc procedure
|
|
1112
|
+
NOTE: activate the output ring with the @code{setring} command. In this ring,
|
|
1113
|
+
@* - the ideal LD0 (given as Groebner basis) is the presentation of the
|
|
1114
|
+
@* localization,
|
|
1115
|
+
@* - the list BS contains roots and multiplicities of Bernstein
|
|
1116
|
+
@* polynomial of (D/I)_f.
|
|
1117
|
+
DISPLAY: If printlevel =1, progress debug messages will be printed,
|
|
1118
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
1119
|
+
EXAMPLE: example DLoc0; shows examples
|
|
1120
|
+
"
|
|
1121
|
+
{
|
|
1122
|
+
dmodappAssumeViolation();
|
|
1123
|
+
/* assume: to be run in the output ring of SDLoc */
|
|
1124
|
+
/* doing: add F, eliminate vars*Dvars, factorize BS */
|
|
1125
|
+
/* analogue to annfs0 */
|
|
1126
|
+
def @R2 = basering;
|
|
1127
|
+
// we're in D_n[s], where the elim ord for s is set
|
|
1128
|
+
ideal J = NF(I,std(F));
|
|
1129
|
+
// make leadcoeffs positive
|
|
1130
|
+
int i;
|
|
1131
|
+
for (i=1; i<= ncols(J); i++)
|
|
1132
|
+
{
|
|
1133
|
+
if (leadcoef(J[i]) <0 )
|
|
1134
|
+
{
|
|
1135
|
+
J[i] = -J[i];
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
J = J,F;
|
|
1139
|
+
ideal M = groebner(J);
|
|
1140
|
+
int Nnew = nvars(@R2);
|
|
1141
|
+
ideal K2 = nselect(M,1..Nnew-1);
|
|
1142
|
+
int ppl = printlevel-voice+2;
|
|
1143
|
+
dbprint(ppl,"// -1-1- _x,_Dx are eliminated in basering");
|
|
1144
|
+
dbprint(ppl-1, K2);
|
|
1145
|
+
// the ring @R3 and the search for minimal negative int s
|
|
1146
|
+
ring @R3 = 0,s,dp;
|
|
1147
|
+
dbprint(ppl,"// -2-1- the ring @R3 = K[s] is ready");
|
|
1148
|
+
ideal K3 = imap(@R2,K2);
|
|
1149
|
+
poly p = K3[1];
|
|
1150
|
+
dbprint(ppl,"// -2-2- attempt the factorization");
|
|
1151
|
+
list PP = factorize(p); //with constants and multiplicities
|
|
1152
|
+
ideal bs; intvec m; //the Bernstein polynomial is monic, so
|
|
1153
|
+
// we are not interested in constants
|
|
1154
|
+
for (i=2; i<= size(PP[1]); i++) //we delete P[1][1] and P[2][1]
|
|
1155
|
+
{
|
|
1156
|
+
bs[i-1] = PP[1][i];
|
|
1157
|
+
m[i-1] = PP[2][i];
|
|
1158
|
+
}
|
|
1159
|
+
ideal bbs; int srat=0; int HasRatRoots = 0;
|
|
1160
|
+
int sP;
|
|
1161
|
+
for (i=1; i<= size(bs); i++)
|
|
1162
|
+
{
|
|
1163
|
+
if (deg(bs[i]) == 1)
|
|
1164
|
+
{
|
|
1165
|
+
bbs = bbs,bs[i];
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
if (size(bbs)==0)
|
|
1169
|
+
{
|
|
1170
|
+
dbprint(ppl-1,"// -2-3- factorization: no rational roots");
|
|
1171
|
+
// HasRatRoots = 0;
|
|
1172
|
+
HasRatRoots = 1; // s0 = -1 then
|
|
1173
|
+
sP = -1;
|
|
1174
|
+
// todo: return ideal with no subst and a b-function unfactorized
|
|
1175
|
+
}
|
|
1176
|
+
else
|
|
1177
|
+
{
|
|
1178
|
+
// exist rational roots
|
|
1179
|
+
dbprint(ppl-1,"// -2-3- factorization: rational roots found");
|
|
1180
|
+
HasRatRoots = 1;
|
|
1181
|
+
// dbprint(ppl-1,bbs);
|
|
1182
|
+
bbs = bbs[2..ncols(bbs)];
|
|
1183
|
+
ideal P = bbs;
|
|
1184
|
+
dbprint(ppl-1,P);
|
|
1185
|
+
srat = size(bs) - size(bbs);
|
|
1186
|
+
// define minIntRoot on linear factors or find out that it doesn't exist
|
|
1187
|
+
intvec vP;
|
|
1188
|
+
number nP;
|
|
1189
|
+
P = normalize(P); // now leadcoef = 1
|
|
1190
|
+
P = ideal(matrix(lead(P))-matrix(P));
|
|
1191
|
+
sP = size(P);
|
|
1192
|
+
int cnt = 0;
|
|
1193
|
+
for (i=1; i<=sP; i++)
|
|
1194
|
+
{
|
|
1195
|
+
nP = leadcoef(P[i]);
|
|
1196
|
+
if ( (nP - int(nP)) == 0 )
|
|
1197
|
+
{
|
|
1198
|
+
cnt++;
|
|
1199
|
+
vP[cnt] = int(nP);
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
// if ( size(vP)>=2 )
|
|
1203
|
+
// {
|
|
1204
|
+
// vP = vP[2..size(vP)];
|
|
1205
|
+
// }
|
|
1206
|
+
if ( size(vP)==0 )
|
|
1207
|
+
{
|
|
1208
|
+
// no roots!
|
|
1209
|
+
dbprint(ppl,"// -2-4- no integer root, setting s0 = -1");
|
|
1210
|
+
sP = -1;
|
|
1211
|
+
// HasRatRoots = 0; // older stuff, here we do substitution
|
|
1212
|
+
HasRatRoots = 1;
|
|
1213
|
+
}
|
|
1214
|
+
else
|
|
1215
|
+
{
|
|
1216
|
+
HasRatRoots = 1;
|
|
1217
|
+
sP = -Max(-vP);
|
|
1218
|
+
dbprint(ppl,"// -2-4- minimal integer root found");
|
|
1219
|
+
dbprint(ppl-1, sP);
|
|
1220
|
+
// int sP = minIntRoot(bbs,1);
|
|
1221
|
+
// P = normalize(P);
|
|
1222
|
+
// bs = -subst(bs,s,0);
|
|
1223
|
+
if (sP >=0)
|
|
1224
|
+
{
|
|
1225
|
+
dbprint(ppl,"// -2-5- nonnegative root, setting s0 = -1");
|
|
1226
|
+
sP = -1;
|
|
1227
|
+
}
|
|
1228
|
+
else
|
|
1229
|
+
{
|
|
1230
|
+
dbprint(ppl,"// -2-5- the root is negative");
|
|
1231
|
+
}
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
if (HasRatRoots)
|
|
1236
|
+
{
|
|
1237
|
+
setring @R2;
|
|
1238
|
+
K2 = subst(I,s,sP);
|
|
1239
|
+
// IF min int root exists ->
|
|
1240
|
+
// create the ordinary Weyl algebra and put the result into it,
|
|
1241
|
+
// thus creating the ring @R5
|
|
1242
|
+
// ELSE : return the same ring with new objects
|
|
1243
|
+
// keep: N, i,j,s, tmp, RL
|
|
1244
|
+
Nnew = Nnew - 1; // former 2*N;
|
|
1245
|
+
// list RL = ringlist(save); // is defined earlier
|
|
1246
|
+
// kill Lord, tmp, iv;
|
|
1247
|
+
list L = 0;
|
|
1248
|
+
list Lord, tmp;
|
|
1249
|
+
intvec iv;
|
|
1250
|
+
list RL = ringlist(basering);
|
|
1251
|
+
L[1] = RL[1];
|
|
1252
|
+
L[4] = RL[4]; //char, minpoly
|
|
1253
|
+
// check whether vars have admissible names -> done earlier
|
|
1254
|
+
// list Name = RL[2]M
|
|
1255
|
+
// DName is defined earlier
|
|
1256
|
+
list NName; // = RL[2]; // skip the last var 's'
|
|
1257
|
+
for (i=1; i<=Nnew; i++)
|
|
1258
|
+
{
|
|
1259
|
+
NName[i] = RL[2][i];
|
|
1260
|
+
}
|
|
1261
|
+
L[2] = NName;
|
|
1262
|
+
// dp ordering;
|
|
1263
|
+
string s = "iv=";
|
|
1264
|
+
for (i=1; i<=Nnew; i++)
|
|
1265
|
+
{
|
|
1266
|
+
s = s+"1,";
|
|
1267
|
+
}
|
|
1268
|
+
s[size(s)] = ";";
|
|
1269
|
+
execute(s);
|
|
1270
|
+
tmp = 0;
|
|
1271
|
+
tmp[1] = "dp"; // string
|
|
1272
|
+
tmp[2] = iv; // intvec
|
|
1273
|
+
Lord[1] = tmp;
|
|
1274
|
+
kill s;
|
|
1275
|
+
tmp[1] = "C";
|
|
1276
|
+
iv = 0;
|
|
1277
|
+
tmp[2] = iv;
|
|
1278
|
+
Lord[2] = tmp;
|
|
1279
|
+
tmp = 0;
|
|
1280
|
+
L[3] = Lord;
|
|
1281
|
+
// we are done with the list
|
|
1282
|
+
// Add: Plural part
|
|
1283
|
+
def @R4@ = ring(L);
|
|
1284
|
+
setring @R4@;
|
|
1285
|
+
int N = Nnew div 2;
|
|
1286
|
+
matrix @D[Nnew][Nnew];
|
|
1287
|
+
for (i=1; i<=N; i++)
|
|
1288
|
+
{
|
|
1289
|
+
@D[i,N+i]=1;
|
|
1290
|
+
}
|
|
1291
|
+
def @R4 = nc_algebra(1,@D);
|
|
1292
|
+
setring @R4;
|
|
1293
|
+
kill @R4@;
|
|
1294
|
+
dbprint(ppl,"// -3-1- the ring @R4 is ready");
|
|
1295
|
+
dbprint(ppl-1, @R4);
|
|
1296
|
+
ideal K4 = imap(@R2,K2);
|
|
1297
|
+
intvec vopt = option(get);
|
|
1298
|
+
option(redSB);
|
|
1299
|
+
dbprint(ppl,"// -3-2- the final cosmetic std");
|
|
1300
|
+
K4 = groebner(K4); // std does the job too
|
|
1301
|
+
option(set,vopt);
|
|
1302
|
+
// total cleanup
|
|
1303
|
+
setring @R2;
|
|
1304
|
+
ideal bs = imap(@R3,bs);
|
|
1305
|
+
bs = -normalize(bs); // "-" for getting correct coeffs!
|
|
1306
|
+
bs = subst(bs,s,0);
|
|
1307
|
+
kill @R3;
|
|
1308
|
+
setring @R4;
|
|
1309
|
+
ideal bs = imap(@R2,bs); // only rationals are the entries
|
|
1310
|
+
list BS; BS[1] = bs; BS[2] = m;
|
|
1311
|
+
export BS;
|
|
1312
|
+
// list LBS = imap(@R3,LBS);
|
|
1313
|
+
// list BS; BS[1] = sbs; BS[2] = m;
|
|
1314
|
+
// BS;
|
|
1315
|
+
// export BS;
|
|
1316
|
+
ideal LD0 = K4;
|
|
1317
|
+
export LD0;
|
|
1318
|
+
return(@R4);
|
|
1319
|
+
}
|
|
1320
|
+
else
|
|
1321
|
+
{
|
|
1322
|
+
/* SHOULD NEVER GET THERE */
|
|
1323
|
+
/* no rational/integer roots */
|
|
1324
|
+
/* return objects in the copy of current ring */
|
|
1325
|
+
setring @R2;
|
|
1326
|
+
ideal LD0 = I;
|
|
1327
|
+
poly BS = normalize(K2[1]);
|
|
1328
|
+
export LD0;
|
|
1329
|
+
export BS;
|
|
1330
|
+
return(@R2);
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
example;
|
|
1334
|
+
{
|
|
1335
|
+
"EXAMPLE:"; echo = 2;
|
|
1336
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
1337
|
+
def R = Weyl(); setring R; // Weyl algebra in variables x,y,Dx,Dy
|
|
1338
|
+
poly F = x2-y3;
|
|
1339
|
+
ideal I = (y^3 - x^2)*Dx - 2*x, (y^3 - x^2)*Dy + 3*y^2; // I = Dx*F, Dy*F;
|
|
1340
|
+
// moreover I is not holonomic, since its dimension is not 2 = 4/2
|
|
1341
|
+
gkdim(I); // 3
|
|
1342
|
+
def W = SDLoc(I,F); setring W; // creates ideal LD in W = R[s]
|
|
1343
|
+
def U = DLoc0(LD, x2-y3); setring U; // compute in R
|
|
1344
|
+
LD0; // Groebner basis of the presentation of localization
|
|
1345
|
+
BS; // description of b-function for localization
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
proc SDLoc(ideal I, poly F)
|
|
1349
|
+
"USAGE: SDLoc(I, f); I an ideal, f a poly
|
|
1350
|
+
RETURN: ring (basering extended by a new variable) containing an ideal 'LD'
|
|
1351
|
+
PURPOSE: compute a generic presentation of the localization of D/I w.r.t. f^s
|
|
1352
|
+
ASSUME: the basering D is a Weyl algebra over a field of characteristic 0
|
|
1353
|
+
NOTE: Activate this ring with the @code{setring} command. In this ring,
|
|
1354
|
+
@* the ideal LD (given as Groebner basis) is the presentation of the
|
|
1355
|
+
@* localization.
|
|
1356
|
+
DISPLAY: If printlevel =1, progress debug messages will be printed,
|
|
1357
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
1358
|
+
EXAMPLE: example SDLoc; shows examples
|
|
1359
|
+
"
|
|
1360
|
+
{
|
|
1361
|
+
/* analogue to Sannfs */
|
|
1362
|
+
/* printlevel >=4 gives debug info */
|
|
1363
|
+
/* assume: we're in the Weyl algebra D in x1,x2,...,d1,d2,... */
|
|
1364
|
+
|
|
1365
|
+
dmodappAssumeViolation();
|
|
1366
|
+
if (!isWeyl())
|
|
1367
|
+
{
|
|
1368
|
+
ERROR("Basering is not a Weyl algebra");
|
|
1369
|
+
}
|
|
1370
|
+
def save = basering;
|
|
1371
|
+
/* 1. create D <t, dt, s > as in LOT */
|
|
1372
|
+
/* ordering: eliminate t,dt */
|
|
1373
|
+
int ppl = printlevel-voice+2;
|
|
1374
|
+
int N = nvars(save); N = N div 2;
|
|
1375
|
+
int Nnew = 2*N + 3; // t,Dt,s
|
|
1376
|
+
int i,j;
|
|
1377
|
+
string s;
|
|
1378
|
+
list RL = ringlist(save);
|
|
1379
|
+
list L, Lord;
|
|
1380
|
+
list tmp;
|
|
1381
|
+
intvec iv;
|
|
1382
|
+
L[1] = RL[1]; // char
|
|
1383
|
+
L[4] = RL[4]; // char, minpoly
|
|
1384
|
+
// check whether vars have admissible names
|
|
1385
|
+
list Name = RL[2];
|
|
1386
|
+
list RName;
|
|
1387
|
+
RName[1] = "@t";
|
|
1388
|
+
RName[2] = "@Dt";
|
|
1389
|
+
RName[3] = "@s";
|
|
1390
|
+
for(i=1;i<=N;i++)
|
|
1391
|
+
{
|
|
1392
|
+
for(j=1; j<=size(RName);j++)
|
|
1393
|
+
{
|
|
1394
|
+
if (Name[i] == RName[j])
|
|
1395
|
+
{
|
|
1396
|
+
ERROR("Variable names should not include @t,@Dt,@s");
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
// now, create the names for new vars
|
|
1401
|
+
tmp = 0;
|
|
1402
|
+
tmp[1] = "@t";
|
|
1403
|
+
tmp[2] = "@Dt";
|
|
1404
|
+
list SName ; SName[1] = "@s";
|
|
1405
|
+
list NName = tmp + Name + SName;
|
|
1406
|
+
L[2] = NName;
|
|
1407
|
+
tmp = 0;
|
|
1408
|
+
kill NName;
|
|
1409
|
+
// block ord (a(1,1),dp);
|
|
1410
|
+
tmp[1] = "a"; // string
|
|
1411
|
+
iv = 1,1;
|
|
1412
|
+
tmp[2] = iv; //intvec
|
|
1413
|
+
Lord[1] = tmp;
|
|
1414
|
+
// continue with dp 1,1,1,1...
|
|
1415
|
+
tmp[1] = "dp"; // string
|
|
1416
|
+
s = "iv=";
|
|
1417
|
+
for(i=1;i<=Nnew;i++)
|
|
1418
|
+
{
|
|
1419
|
+
s = s+"1,";
|
|
1420
|
+
}
|
|
1421
|
+
s[size(s)]= ";";
|
|
1422
|
+
execute(s);
|
|
1423
|
+
tmp[2] = iv;
|
|
1424
|
+
Lord[2] = tmp;
|
|
1425
|
+
tmp[1] = "C";
|
|
1426
|
+
iv = 0;
|
|
1427
|
+
tmp[2] = iv;
|
|
1428
|
+
Lord[3] = tmp;
|
|
1429
|
+
tmp = 0;
|
|
1430
|
+
L[3] = Lord;
|
|
1431
|
+
// we are done with the list
|
|
1432
|
+
def @R@ = ring(L);
|
|
1433
|
+
setring @R@;
|
|
1434
|
+
matrix @D[Nnew][Nnew];
|
|
1435
|
+
@D[1,2]=1;
|
|
1436
|
+
for(i=1; i<=N; i++)
|
|
1437
|
+
{
|
|
1438
|
+
@D[2+i,N+2+i]=1;
|
|
1439
|
+
}
|
|
1440
|
+
// ADD [s,t]=-t, [s,Dt]=Dt
|
|
1441
|
+
@D[1,Nnew] = -var(1);
|
|
1442
|
+
@D[2,Nnew] = var(2);
|
|
1443
|
+
def @R = nc_algebra(1,@D);
|
|
1444
|
+
setring @R;
|
|
1445
|
+
kill @R@;
|
|
1446
|
+
dbprint(ppl,"// -1-1- the ring @R(@t,@Dt,_x,_Dx,@s) is ready");
|
|
1447
|
+
dbprint(ppl-1, @R);
|
|
1448
|
+
poly F = imap(save,F);
|
|
1449
|
+
ideal I = imap(save,I);
|
|
1450
|
+
dbprint(ppl-1, "the ideal after map:");
|
|
1451
|
+
dbprint(ppl-1, I);
|
|
1452
|
+
poly p = 0;
|
|
1453
|
+
for(i=1; i<=N; i++)
|
|
1454
|
+
{
|
|
1455
|
+
p = diff(F,var(2+i))*@Dt + var(2+N+i);
|
|
1456
|
+
dbprint(ppl-1, p);
|
|
1457
|
+
I = subst(I,var(2+N+i),p);
|
|
1458
|
+
dbprint(ppl-1, var(2+N+i));
|
|
1459
|
+
p = 0;
|
|
1460
|
+
}
|
|
1461
|
+
I = I, @t - F;
|
|
1462
|
+
// t*Dt + s +1 reduced with t-f gives f*Dt + s
|
|
1463
|
+
I = I, F*var(2) + var(Nnew); // @s
|
|
1464
|
+
// -------- the ideal I is ready ----------
|
|
1465
|
+
dbprint(ppl,"// -1-2- starting the elimination of @t,@Dt in @R");
|
|
1466
|
+
dbprint(ppl-1, I);
|
|
1467
|
+
// ideal J = engine(I,eng);
|
|
1468
|
+
ideal J = groebner(I);
|
|
1469
|
+
dbprint(ppl-1,"// -1-2-1- result of the elimination of @t,@Dt in @R");
|
|
1470
|
+
dbprint(ppl-1, J);;
|
|
1471
|
+
ideal K = nselect(J,1..2);
|
|
1472
|
+
dbprint(ppl,"// -1-3- @t,@Dt are eliminated");
|
|
1473
|
+
dbprint(ppl-1, K); // K is without t, Dt
|
|
1474
|
+
K = groebner(K); // std does the job too
|
|
1475
|
+
// now, we must change the ordering
|
|
1476
|
+
// and create a ring without t, Dt
|
|
1477
|
+
setring save;
|
|
1478
|
+
// ----------- the ring @R3 ------------
|
|
1479
|
+
// _x, _Dx,s; elim.ord for _x,_Dx.
|
|
1480
|
+
// keep: N, i,j,s, tmp, RL
|
|
1481
|
+
Nnew = 2*N+1;
|
|
1482
|
+
kill Lord, tmp, iv, RName;
|
|
1483
|
+
list Lord, tmp;
|
|
1484
|
+
intvec iv;
|
|
1485
|
+
L[1] = RL[1];
|
|
1486
|
+
L[4] = RL[4]; // char, minpoly
|
|
1487
|
+
// check whether vars have admissible names -> done earlier
|
|
1488
|
+
// now, create the names for new var
|
|
1489
|
+
tmp[1] = "s";
|
|
1490
|
+
list NName = Name + tmp;
|
|
1491
|
+
L[2] = NName;
|
|
1492
|
+
tmp = 0;
|
|
1493
|
+
// block ord (dp(N),dp);
|
|
1494
|
+
// string s is already defined
|
|
1495
|
+
s = "iv=";
|
|
1496
|
+
for (i=1; i<=Nnew-1; i++)
|
|
1497
|
+
{
|
|
1498
|
+
s = s+"1,";
|
|
1499
|
+
}
|
|
1500
|
+
s[size(s)]=";";
|
|
1501
|
+
execute(s);
|
|
1502
|
+
tmp[1] = "dp"; // string
|
|
1503
|
+
tmp[2] = iv; // intvec
|
|
1504
|
+
Lord[1] = tmp;
|
|
1505
|
+
// continue with dp 1,1,1,1...
|
|
1506
|
+
tmp[1] = "dp"; // string
|
|
1507
|
+
s[size(s)] = ",";
|
|
1508
|
+
s = s+"1;";
|
|
1509
|
+
execute(s);
|
|
1510
|
+
kill s;
|
|
1511
|
+
kill NName;
|
|
1512
|
+
tmp[2] = iv;
|
|
1513
|
+
Lord[2] = tmp;
|
|
1514
|
+
tmp[1] = "C"; iv = 0; tmp[2]=iv;
|
|
1515
|
+
Lord[3] = tmp; tmp = 0;
|
|
1516
|
+
L[3] = Lord;
|
|
1517
|
+
// we are done with the list. Now add a Plural part
|
|
1518
|
+
def @R2@ = ring(L);
|
|
1519
|
+
setring @R2@;
|
|
1520
|
+
matrix @D[Nnew][Nnew];
|
|
1521
|
+
for (i=1; i<=N; i++)
|
|
1522
|
+
{
|
|
1523
|
+
@D[i,N+i]=1;
|
|
1524
|
+
}
|
|
1525
|
+
def @R2 = nc_algebra(1,@D);
|
|
1526
|
+
setring @R2;
|
|
1527
|
+
kill @R2@;
|
|
1528
|
+
dbprint(ppl,"// -2-1- the ring @R2(_x,_Dx,s) is ready");
|
|
1529
|
+
dbprint(ppl-1, @R2);
|
|
1530
|
+
ideal MM = maxideal(1);
|
|
1531
|
+
MM = 0,s,MM;
|
|
1532
|
+
map R01 = @R, MM;
|
|
1533
|
+
ideal K = R01(K);
|
|
1534
|
+
// total cleanup
|
|
1535
|
+
ideal LD = K;
|
|
1536
|
+
// make leadcoeffs positive
|
|
1537
|
+
for (i=1; i<= ncols(LD); i++)
|
|
1538
|
+
{
|
|
1539
|
+
if (leadcoef(LD[i]) <0 )
|
|
1540
|
+
{
|
|
1541
|
+
LD[i] = -LD[i];
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
export LD;
|
|
1545
|
+
kill @R;
|
|
1546
|
+
return(@R2);
|
|
1547
|
+
}
|
|
1548
|
+
example;
|
|
1549
|
+
{
|
|
1550
|
+
"EXAMPLE:"; echo = 2;
|
|
1551
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
1552
|
+
def R = Weyl(); // Weyl algebra on the variables x,y,Dx,Dy
|
|
1553
|
+
setring R;
|
|
1554
|
+
poly F = x2-y3;
|
|
1555
|
+
ideal I = Dx*F, Dy*F;
|
|
1556
|
+
// note, that I is not holonomic, since it's dimension is not 2
|
|
1557
|
+
gkdim(I); // 3, while dim R = 4
|
|
1558
|
+
def W = SDLoc(I,F);
|
|
1559
|
+
setring W; // = R[s], where s is a new variable
|
|
1560
|
+
LD; // Groebner basis of s-parametric presentation
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
|
|
1564
|
+
// Groebner basis wrt weights and initial ideal business //////////////////////
|
|
1565
|
+
|
|
1566
|
+
proc GBWeight (ideal I, intvec u, intvec v, list #)
|
|
1567
|
+
"USAGE: GBWeight(I,u,v [,s,t,w]);
|
|
1568
|
+
@* I ideal, u,v intvecs, s,t optional ints, w an optional intvec
|
|
1569
|
+
RETURN: ideal, Groebner basis of I w.r.t. the weights u and v
|
|
1570
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
1571
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
1572
|
+
@* holds, i.e. the sequence of variables is given by
|
|
1573
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
1574
|
+
@* belonging to x(i).
|
|
1575
|
+
PURPOSE: computes a Groebner basis with respect to given weights
|
|
1576
|
+
NOTE: The weights u and v are understood as weight vectors for x(i) and D(i),
|
|
1577
|
+
@* respectively. According to (SST), one computes the homogenization of a
|
|
1578
|
+
@* given ideal relative to (u,v), then one computes a Groebner basis and
|
|
1579
|
+
@* returns the dehomogenization of the result.
|
|
1580
|
+
@* If s<>0, @code{std} is used for Groebner basis computations,
|
|
1581
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
1582
|
+
@* If t<>0, a matrix ordering is used for Groebner basis computations,
|
|
1583
|
+
@* otherwise, and by default, a block ordering is used.
|
|
1584
|
+
@* If w is given and consists of exactly 2*n strictly positive entries,
|
|
1585
|
+
@* w is used for constructing the weighted homogenized Weyl algebra,
|
|
1586
|
+
@* see Noro (2002). Otherwise, and by default, the homogenization weight
|
|
1587
|
+
@* (1,...,1) is used.
|
|
1588
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
1589
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
1590
|
+
EXAMPLE: example GBWeight; shows examples
|
|
1591
|
+
"
|
|
1592
|
+
{
|
|
1593
|
+
dmodappMoreAssumeViolation();
|
|
1594
|
+
int ppl = printlevel - voice +2;
|
|
1595
|
+
def save = basering;
|
|
1596
|
+
int n = nvars(save) div 2;
|
|
1597
|
+
int whichengine = 0; // default
|
|
1598
|
+
int methodord = 0; // default
|
|
1599
|
+
intvec homogweights = 1:(2*n); // default
|
|
1600
|
+
if (size(#)>0)
|
|
1601
|
+
{
|
|
1602
|
+
if (intLike(#[1]))
|
|
1603
|
+
{
|
|
1604
|
+
whichengine = int(#[1]);
|
|
1605
|
+
}
|
|
1606
|
+
if (size(#)>1)
|
|
1607
|
+
{
|
|
1608
|
+
if (intLike(#[2]))
|
|
1609
|
+
{
|
|
1610
|
+
methodord = int(#[2]);
|
|
1611
|
+
}
|
|
1612
|
+
if (size(#)>2)
|
|
1613
|
+
{
|
|
1614
|
+
if (typeof(#[3])=="intvec")
|
|
1615
|
+
{
|
|
1616
|
+
if (size(#[3])==2*n && allPositive(#[3])==1)
|
|
1617
|
+
{
|
|
1618
|
+
homogweights = #[3];
|
|
1619
|
+
}
|
|
1620
|
+
else
|
|
1621
|
+
{
|
|
1622
|
+
print("// Homogenization weight vector must consist of positive entries and be");
|
|
1623
|
+
print("// of size " + string(n) + ". Using weight (1,...,1).");
|
|
1624
|
+
}
|
|
1625
|
+
}
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
// 1. create homogenized Weyl algebra
|
|
1630
|
+
// 1.1 create ordering
|
|
1631
|
+
int i;
|
|
1632
|
+
list RL = ringlist(save);
|
|
1633
|
+
int N = 2*n+1;
|
|
1634
|
+
intvec uv = u,v,0;
|
|
1635
|
+
homogweights = homogweights,1;
|
|
1636
|
+
list Lord = list(list("a",homogweights));
|
|
1637
|
+
list C0 = list("C",intvec(0));
|
|
1638
|
+
if (methodord == 0) // default: blockordering
|
|
1639
|
+
{
|
|
1640
|
+
Lord[5] = C0;
|
|
1641
|
+
Lord[4] = list("lp",intvec(1));
|
|
1642
|
+
Lord[3] = list("dp",intvec(1:(N-1)));
|
|
1643
|
+
Lord[2] = list("a",uv);
|
|
1644
|
+
}
|
|
1645
|
+
else // M() ordering
|
|
1646
|
+
{
|
|
1647
|
+
intmat @Ord[N][N];
|
|
1648
|
+
@Ord[1,1..N] = uv; @Ord[2,1..N] = 1:(N-1);
|
|
1649
|
+
for (i=1; i<=N-2; i++)
|
|
1650
|
+
{
|
|
1651
|
+
@Ord[2+i,N - i] = -1;
|
|
1652
|
+
}
|
|
1653
|
+
dbprint(ppl-1,"// the ordering matrix:",@Ord);
|
|
1654
|
+
Lord[2] = list("M",intvec(@Ord));
|
|
1655
|
+
Lord[3] = C0;
|
|
1656
|
+
}
|
|
1657
|
+
// 1.2 the homog var
|
|
1658
|
+
list Lvar = RL[2]; Lvar[N] = safeVarName("h","cv");
|
|
1659
|
+
// 1.3 create commutative ring
|
|
1660
|
+
list L@@Dh = RL; L@@Dh = L@@Dh[1..4];
|
|
1661
|
+
L@@Dh[2] = Lvar; L@@Dh[3] = Lord;
|
|
1662
|
+
def @Dh = ring(L@@Dh); kill L@@Dh;
|
|
1663
|
+
setring @Dh;
|
|
1664
|
+
// 1.4 create non-commutative relations
|
|
1665
|
+
matrix @relD[N][N];
|
|
1666
|
+
for (i=1; i<=n; i++)
|
|
1667
|
+
{
|
|
1668
|
+
@relD[i,n+i] = var(N)^(homogweights[i]+homogweights[n+i]);
|
|
1669
|
+
}
|
|
1670
|
+
def Dh = nc_algebra(1,@relD);
|
|
1671
|
+
setring Dh; kill @Dh;
|
|
1672
|
+
dbprint(ppl-1,"// computing in ring",Dh);
|
|
1673
|
+
// 2. Compute the initial ideal
|
|
1674
|
+
ideal I = imap(save,I);
|
|
1675
|
+
I = homog(I,var(N));
|
|
1676
|
+
// 2.1 the hard part: Groebner basis computation
|
|
1677
|
+
dbprint(ppl, "// starting Groebner basis computation with engine: "+string(whichengine));
|
|
1678
|
+
I = engine(I, whichengine);
|
|
1679
|
+
dbprint(ppl, "// finished Groebner basis computation");
|
|
1680
|
+
dbprint(ppl-1, "// ideal before dehomogenization is " +string(I));
|
|
1681
|
+
I = subst(I,var(N),1); // dehomogenization
|
|
1682
|
+
setring save;
|
|
1683
|
+
I = imap(Dh,I); kill Dh;
|
|
1684
|
+
return(I);
|
|
1685
|
+
}
|
|
1686
|
+
example
|
|
1687
|
+
{
|
|
1688
|
+
"EXAMPLE:"; echo = 2;
|
|
1689
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
1690
|
+
def D2 = Weyl();
|
|
1691
|
+
setring D2;
|
|
1692
|
+
ideal I = 3*x^2*Dy+2*y*Dx,2*x*Dx+3*y*Dy+6;
|
|
1693
|
+
intvec u = -2,-3;
|
|
1694
|
+
intvec v = -u;
|
|
1695
|
+
GBWeight(I,u,v);
|
|
1696
|
+
ideal J = std(I);
|
|
1697
|
+
GBWeight(J,u,v); // same as above
|
|
1698
|
+
u = 0,1;
|
|
1699
|
+
GBWeight(I,u,v);
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
proc inForm (def I, intvec w)
|
|
1703
|
+
"USAGE: inForm(I,w); I ideal or poly, w intvec
|
|
1704
|
+
RETURN: ideal, generated by initial forms of generators of I w.r.t. w, or
|
|
1705
|
+
@* poly, initial form of input poly w.r.t. w
|
|
1706
|
+
PURPOSE: computes the initial form of an ideal or a poly w.r.t. the weight w
|
|
1707
|
+
NOTE: The size of the weight vector must be equal to the number of variables
|
|
1708
|
+
@* of the basering.
|
|
1709
|
+
EXAMPLE: example inForm; shows examples
|
|
1710
|
+
"
|
|
1711
|
+
{
|
|
1712
|
+
string inp1 = typeof(I);
|
|
1713
|
+
if ((inp1 <> "ideal") && (inp1 <> "poly"))
|
|
1714
|
+
{
|
|
1715
|
+
ERROR("first argument has to be an ideal or a poly");
|
|
1716
|
+
}
|
|
1717
|
+
if (size(w) != nvars(basering))
|
|
1718
|
+
{
|
|
1719
|
+
ERROR("weight vector has wrong dimension");
|
|
1720
|
+
}
|
|
1721
|
+
ideal II = I;
|
|
1722
|
+
int j;
|
|
1723
|
+
poly g;
|
|
1724
|
+
ideal J;
|
|
1725
|
+
for (j=1; j<=ncols(II); j++)
|
|
1726
|
+
{
|
|
1727
|
+
g = II[j];
|
|
1728
|
+
J[j] = g - jet(g,deg(g,w)-1,w);
|
|
1729
|
+
}
|
|
1730
|
+
if (inp1 == "ideal")
|
|
1731
|
+
{
|
|
1732
|
+
return(J);
|
|
1733
|
+
}
|
|
1734
|
+
else
|
|
1735
|
+
{
|
|
1736
|
+
return(J[1]);
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
example
|
|
1740
|
+
{
|
|
1741
|
+
"EXAMPLE:"; echo = 2;
|
|
1742
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
1743
|
+
def D = Weyl(); setring D;
|
|
1744
|
+
poly F = 3*x^2*Dy+2*y*Dx;
|
|
1745
|
+
poly G = 2*x*Dx+3*y*Dy+6;
|
|
1746
|
+
ideal I = F,G;
|
|
1747
|
+
intvec w1 = -1,-1,1,1;
|
|
1748
|
+
intvec w2 = -1,-2,1,2;
|
|
1749
|
+
intvec w3 = -2,-3,2,3;
|
|
1750
|
+
inForm(I,w1);
|
|
1751
|
+
inForm(I,w2);
|
|
1752
|
+
inForm(I,w3);
|
|
1753
|
+
inForm(F,w1);
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
proc initialIdealW(ideal I, intvec u, intvec v, list #)
|
|
1757
|
+
"USAGE: initialIdealW(I,u,v [,s,t,w]);
|
|
1758
|
+
@* I ideal, u,v intvecs, s,t optional ints, w an optional intvec
|
|
1759
|
+
RETURN: ideal, GB of initial ideal of the input ideal wrt the weights u and v
|
|
1760
|
+
ASSUME: The basering is the n-th Weyl algebra in characteristic 0 and for all
|
|
1761
|
+
@* 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1 holds, i.e. the
|
|
1762
|
+
@* sequence of variables is given by x(1),...,x(n),D(1),...,D(n),
|
|
1763
|
+
@* where D(i) is the differential operator belonging to x(i).
|
|
1764
|
+
PURPOSE: computes the initial ideal with respect to given weights.
|
|
1765
|
+
NOTE: u and v are understood as weight vectors for x(1..n) and D(1..n)
|
|
1766
|
+
@* respectively.
|
|
1767
|
+
@* If s<>0, @code{std} is used for Groebner basis computations,
|
|
1768
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
1769
|
+
@* If t<>0, a matrix ordering is used for Groebner basis computations,
|
|
1770
|
+
@* otherwise, and by default, a block ordering is used.
|
|
1771
|
+
@* If w is given and consists of exactly 2*n strictly positive entries,
|
|
1772
|
+
@* w is used as homogenization weight.
|
|
1773
|
+
@* Otherwise, and by default, the homogenization weight (1,...,1) is used.
|
|
1774
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
1775
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
1776
|
+
EXAMPLE: example initialIdealW; shows examples
|
|
1777
|
+
"
|
|
1778
|
+
{
|
|
1779
|
+
// assumption check in GBWeight
|
|
1780
|
+
int ppl = printlevel - voice + 2;
|
|
1781
|
+
printlevel = printlevel + 1;
|
|
1782
|
+
I = GBWeight(I,u,v,#);
|
|
1783
|
+
printlevel = printlevel - 1;
|
|
1784
|
+
intvec uv = u,v;
|
|
1785
|
+
I = inForm(I,uv);
|
|
1786
|
+
int eng;
|
|
1787
|
+
if (size(#)>0)
|
|
1788
|
+
{
|
|
1789
|
+
if(typeof(#[1])=="int" || typeof(#[1])=="number")
|
|
1790
|
+
{
|
|
1791
|
+
eng = int(#[1]);
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
dbprint(ppl,"// starting cosmetic Groebner basis computation");
|
|
1795
|
+
I = engine(I,eng);
|
|
1796
|
+
dbprint(ppl,"// finished cosmetic Groebner basis computation");
|
|
1797
|
+
return(I);
|
|
1798
|
+
}
|
|
1799
|
+
example
|
|
1800
|
+
{
|
|
1801
|
+
"EXAMPLE:"; echo = 2;
|
|
1802
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
1803
|
+
def D2 = Weyl();
|
|
1804
|
+
setring D2;
|
|
1805
|
+
ideal I = 3*x^2*Dy+2*y*Dx,2*x*Dx+3*y*Dy+6;
|
|
1806
|
+
intvec u = -2,-3;
|
|
1807
|
+
intvec v = -u;
|
|
1808
|
+
initialIdealW(I,u,v);
|
|
1809
|
+
ideal J = std(I);
|
|
1810
|
+
initialIdealW(J,u,v); // same as above
|
|
1811
|
+
u = 0,1;
|
|
1812
|
+
initialIdealW(I,u,v);
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
proc initialMalgrange (poly f,list #)
|
|
1816
|
+
"USAGE: initialMalgrange(f,[,a,b,v]); f poly, a,b optional ints, v opt. intvec
|
|
1817
|
+
RETURN: ring, Weyl algebra induced by basering, extended by two new vars t,Dt
|
|
1818
|
+
PURPOSE: computes the initial Malgrange ideal of a given polynomial w.r.t. the
|
|
1819
|
+
@* weight vector (-1,0...,0,1,0,...,0) such that the weight of t is -1
|
|
1820
|
+
@* and the weight of Dt is 1.
|
|
1821
|
+
ASSUME: The basering is commutative and over a field of characteristic 0.
|
|
1822
|
+
NOTE: Activate the output ring with the @code{setring} command.
|
|
1823
|
+
@* The returned ring contains the ideal 'inF', being the initial ideal
|
|
1824
|
+
@* of the Malgrange ideal of f.
|
|
1825
|
+
@* Varnames of the basering should not include t and Dt.
|
|
1826
|
+
@* If a<>0, @code{std} is used for Groebner basis computations,
|
|
1827
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
1828
|
+
@* If b<>0, a matrix ordering is used for Groebner basis computations,
|
|
1829
|
+
@* otherwise, and by default, a block ordering is used.
|
|
1830
|
+
@* If a positive weight vector v is given, the weight
|
|
1831
|
+
@* (d,v[1],...,v[n],1,d+1-v[1],...,d+1-v[n]) is used for homogenization
|
|
1832
|
+
@* computations, where d denotes the weighted degree of f.
|
|
1833
|
+
@* Otherwise and by default, v is set to (1,...,1). See Noro (2002).
|
|
1834
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
1835
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
1836
|
+
EXAMPLE: example initialMalgrange; shows examples
|
|
1837
|
+
"
|
|
1838
|
+
{
|
|
1839
|
+
dmodappAssumeViolation();
|
|
1840
|
+
if (!isCommutative())
|
|
1841
|
+
{
|
|
1842
|
+
ERROR("Basering must be commutative.");
|
|
1843
|
+
}
|
|
1844
|
+
int ppl = printlevel - voice + 2;
|
|
1845
|
+
def save = basering;
|
|
1846
|
+
int n = nvars(save);
|
|
1847
|
+
int i;
|
|
1848
|
+
int whichengine = 0; // default
|
|
1849
|
+
int methodord = 0; // default
|
|
1850
|
+
intvec u0 = 1:n; // default
|
|
1851
|
+
if (size(#)>0)
|
|
1852
|
+
{
|
|
1853
|
+
if (intLike(#[1]))
|
|
1854
|
+
{
|
|
1855
|
+
whichengine = int(#[1]);
|
|
1856
|
+
}
|
|
1857
|
+
if (size(#)>1)
|
|
1858
|
+
{
|
|
1859
|
+
if (intLike(#[2]))
|
|
1860
|
+
{
|
|
1861
|
+
methodord = int(#[2]);
|
|
1862
|
+
}
|
|
1863
|
+
if (size(#)>2)
|
|
1864
|
+
{
|
|
1865
|
+
if ((typeof(#[3])=="intvec") && (size(#[3])==n) && (allPositive(#[3])==1))
|
|
1866
|
+
{
|
|
1867
|
+
u0 = #[3];
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1872
|
+
list RL = ringlist(save);
|
|
1873
|
+
RL = RL[1..4]; // if basering is commutative nc_algebra
|
|
1874
|
+
list C0 = list("C",intvec(0));
|
|
1875
|
+
// 1. create homogenization weights
|
|
1876
|
+
// 1.1. get the weighted degree of f
|
|
1877
|
+
list Lord = list(list("wp",u0),C0);
|
|
1878
|
+
list L@r = RL;
|
|
1879
|
+
L@r[3] = Lord;
|
|
1880
|
+
def r = ring(L@r); kill L@r,Lord;
|
|
1881
|
+
setring r;
|
|
1882
|
+
poly f = imap(save,f);
|
|
1883
|
+
int d = deg(f);
|
|
1884
|
+
setring save; kill r;
|
|
1885
|
+
// 1.2 the homogenization weights
|
|
1886
|
+
intvec homogweights = d;
|
|
1887
|
+
homogweights[n+2] = 1;
|
|
1888
|
+
for (i=1; i<=n; i++)
|
|
1889
|
+
{
|
|
1890
|
+
homogweights[i+1] = u0[i];
|
|
1891
|
+
homogweights[n+2+i] = d+1-u0[i];
|
|
1892
|
+
}
|
|
1893
|
+
// 2. create extended Weyl algebra
|
|
1894
|
+
int N = 2*n+2;
|
|
1895
|
+
// 2.1 create names for vars
|
|
1896
|
+
string vart = safeVarName("t","cv");
|
|
1897
|
+
string varDt = safeVarName("D"+vart,"cv");
|
|
1898
|
+
while (varDt <> "D"+vart)
|
|
1899
|
+
{
|
|
1900
|
+
vart = safeVarName("@"+vart,"cv");
|
|
1901
|
+
varDt = safeVarName("D"+vart,"cv");
|
|
1902
|
+
}
|
|
1903
|
+
list Lvar;
|
|
1904
|
+
Lvar[1] = vart; Lvar[n+2] = varDt;
|
|
1905
|
+
for (i=1; i<=n; i++)
|
|
1906
|
+
{
|
|
1907
|
+
Lvar[i+1] = string(var(i));
|
|
1908
|
+
Lvar[i+n+2] = safeVarName("D" + string(var(i)),"cv");
|
|
1909
|
+
}
|
|
1910
|
+
// 2.2 create ordering
|
|
1911
|
+
list Lord = list(list("dp",intvec(1:N)),C0);
|
|
1912
|
+
// 2.3 create the (n+1)-th Weyl algebra
|
|
1913
|
+
list L@D = RL; L@D[2] = Lvar; L@D[3] = Lord;
|
|
1914
|
+
def @D = ring(L@D); kill L@D;
|
|
1915
|
+
setring @D;
|
|
1916
|
+
def D = Weyl();
|
|
1917
|
+
setring D; kill @D;
|
|
1918
|
+
dbprint(ppl,"// the (n+1)-th Weyl algebra :" ,D);
|
|
1919
|
+
// 3. compute the initial ideal
|
|
1920
|
+
// 3.1 create the Malgrange ideal
|
|
1921
|
+
poly f = imap(save,f);
|
|
1922
|
+
ideal I = var(1)-f;
|
|
1923
|
+
for (i=1; i<=n; i++)
|
|
1924
|
+
{
|
|
1925
|
+
I = I, var(n+2+i)+diff(f,var(i+1))*var(n+2);
|
|
1926
|
+
}
|
|
1927
|
+
// I = engine(I,whichengine); // todo efficient to compute GB wrt dp first?
|
|
1928
|
+
// 3.2 computie the initial ideal
|
|
1929
|
+
intvec w = 1,0:n;
|
|
1930
|
+
printlevel = printlevel + 1;
|
|
1931
|
+
I = initialIdealW(I,-w,w,whichengine,methodord,homogweights);
|
|
1932
|
+
printlevel = printlevel - 1;
|
|
1933
|
+
ideal inF = I; attrib(inF,"isSB",1);
|
|
1934
|
+
export(inF);
|
|
1935
|
+
setring save;
|
|
1936
|
+
return(D);
|
|
1937
|
+
}
|
|
1938
|
+
example
|
|
1939
|
+
{
|
|
1940
|
+
"EXAMPLE:"; echo = 2;
|
|
1941
|
+
ring r = 0,(x,y),dp;
|
|
1942
|
+
poly f = x^2+y^3+x*y^2;
|
|
1943
|
+
def D = initialMalgrange(f);
|
|
1944
|
+
setring D;
|
|
1945
|
+
inF;
|
|
1946
|
+
setring r;
|
|
1947
|
+
intvec v = 3,2;
|
|
1948
|
+
def D2 = initialMalgrange(f,1,1,v);
|
|
1949
|
+
setring D2;
|
|
1950
|
+
inF;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
// restriction and integration ////////////////////////////////////////////////
|
|
1955
|
+
|
|
1956
|
+
static proc restrictionModuleEngine (ideal I, intvec w, list #)
|
|
1957
|
+
// returns list L with 2 entries of type ideal
|
|
1958
|
+
// L[1]=basis of free module, L[2]=generating system of submodule
|
|
1959
|
+
// #=eng,m,G; eng=engine; m=min int root of bfctIdeal(I,w); G=GB of I wrt (-w,w)
|
|
1960
|
+
{
|
|
1961
|
+
dmodappMoreAssumeViolation();
|
|
1962
|
+
if (!isHolonomic(I))
|
|
1963
|
+
{
|
|
1964
|
+
ERROR("Given ideal is not holonomic");
|
|
1965
|
+
}
|
|
1966
|
+
int l0,l0set,Gset;
|
|
1967
|
+
ideal G;
|
|
1968
|
+
int whichengine = 0; // default
|
|
1969
|
+
if (size(#)>0)
|
|
1970
|
+
{
|
|
1971
|
+
if (intLike(#[1]))
|
|
1972
|
+
{
|
|
1973
|
+
whichengine = int(#[1]);
|
|
1974
|
+
}
|
|
1975
|
+
if (size(#)>1)
|
|
1976
|
+
{
|
|
1977
|
+
if (intLike(#[2]))
|
|
1978
|
+
{
|
|
1979
|
+
l0 = int(#[2]);
|
|
1980
|
+
l0set = 1;
|
|
1981
|
+
}
|
|
1982
|
+
if (size(#)>2)
|
|
1983
|
+
{
|
|
1984
|
+
if (typeof(#[3])=="ideal")
|
|
1985
|
+
{
|
|
1986
|
+
G = #[3];
|
|
1987
|
+
Gset = 1;
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
}
|
|
1991
|
+
}
|
|
1992
|
+
int ppl = printlevel;
|
|
1993
|
+
int i,j,k;
|
|
1994
|
+
int n = nvars(basering) div 2;
|
|
1995
|
+
if (w == 0:size(w))
|
|
1996
|
+
{
|
|
1997
|
+
ERROR("weight vector must not be zero");
|
|
1998
|
+
}
|
|
1999
|
+
if (size(w)<>n)
|
|
2000
|
+
{
|
|
2001
|
+
ERROR("weight vector must have exactly " + string(n) + " entries");
|
|
2002
|
+
}
|
|
2003
|
+
for (i=1; i<=n; i++)
|
|
2004
|
+
{
|
|
2005
|
+
if (w[i]<0)
|
|
2006
|
+
{
|
|
2007
|
+
ERROR("weight vector must not have negative entries");
|
|
2008
|
+
}
|
|
2009
|
+
}
|
|
2010
|
+
intvec ww = -w,w;
|
|
2011
|
+
if (!Gset)
|
|
2012
|
+
{
|
|
2013
|
+
G = GBWeight(I,-w,w,whichengine);
|
|
2014
|
+
dbprint(ppl,"// found GB wrt weight " +string(w));
|
|
2015
|
+
dbprint(ppl-1,"// " + string(G));
|
|
2016
|
+
}
|
|
2017
|
+
if (!l0set)
|
|
2018
|
+
{
|
|
2019
|
+
ideal inG = inForm(G,ww);
|
|
2020
|
+
inG = engine(inG,whichengine);
|
|
2021
|
+
poly s = 0;
|
|
2022
|
+
for (i=1; i<=n; i++)
|
|
2023
|
+
{
|
|
2024
|
+
s = s + w[i]*var(i)*var(i+n);
|
|
2025
|
+
}
|
|
2026
|
+
vector v = pIntersect(s,inG);
|
|
2027
|
+
list L = bFactor(vec2poly(v));
|
|
2028
|
+
dbprint(ppl,"// found b-function of given ideal wrt weight " + string(w));
|
|
2029
|
+
dbprint(ppl-1,"// roots: "+string(L[1]));
|
|
2030
|
+
dbprint(ppl-1,"// multiplicities: "+string(L[2]));
|
|
2031
|
+
kill inG,v,s;
|
|
2032
|
+
L = intRoots(L); // integral roots of b-function
|
|
2033
|
+
if (L[2]==0:size(L[2])) // no integral roots
|
|
2034
|
+
{
|
|
2035
|
+
return(list(ideal(0),ideal(0)));
|
|
2036
|
+
}
|
|
2037
|
+
intvec v;
|
|
2038
|
+
for (i=1; i<=ncols(L[1]); i++)
|
|
2039
|
+
{
|
|
2040
|
+
v[i] = int(L[1][i]);
|
|
2041
|
+
}
|
|
2042
|
+
l0 = Max(v);
|
|
2043
|
+
dbprint(ppl,"// maximal integral root is " +string(l0));
|
|
2044
|
+
kill L,v;
|
|
2045
|
+
}
|
|
2046
|
+
if (l0 < 0) // maximal integral root is < 0
|
|
2047
|
+
{
|
|
2048
|
+
return(list(ideal(0),ideal(0)));
|
|
2049
|
+
}
|
|
2050
|
+
intvec m;
|
|
2051
|
+
for (i=ncols(G); i>0; i--)
|
|
2052
|
+
{
|
|
2053
|
+
m[i] = deg(G[i],ww);
|
|
2054
|
+
}
|
|
2055
|
+
dbprint(ppl,"// weighted degree of generators of GB is " +string(m));
|
|
2056
|
+
def save = basering;
|
|
2057
|
+
list RL = ringlist(save);
|
|
2058
|
+
RL = RL[1..4];
|
|
2059
|
+
list Lvar;
|
|
2060
|
+
j = 1;
|
|
2061
|
+
intvec neww;
|
|
2062
|
+
for (i=1; i<=n; i++)
|
|
2063
|
+
{
|
|
2064
|
+
if (w[i]>0)
|
|
2065
|
+
{
|
|
2066
|
+
Lvar[j] = string(var(i+n));
|
|
2067
|
+
neww[j] = w[i];
|
|
2068
|
+
j++;
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
list Lord;
|
|
2072
|
+
Lord[1] = list("dp",intvec(1:n));
|
|
2073
|
+
Lord[2] = list("C", intvec(0));
|
|
2074
|
+
RL[2] = Lvar;
|
|
2075
|
+
RL[3] = Lord;
|
|
2076
|
+
def r = ring(RL);
|
|
2077
|
+
kill Lvar, Lord, RL;
|
|
2078
|
+
setring r;
|
|
2079
|
+
ideal B;
|
|
2080
|
+
list Blist;
|
|
2081
|
+
intvec mm = l0,-m+l0;
|
|
2082
|
+
for (i=0; i<=Max(mm); i++)
|
|
2083
|
+
{
|
|
2084
|
+
B = weightKB(std(0),i,neww);
|
|
2085
|
+
Blist[i+1] = B;
|
|
2086
|
+
}
|
|
2087
|
+
setring save;
|
|
2088
|
+
list Blist = imap(r,Blist);
|
|
2089
|
+
ideal ff = maxideal(1);
|
|
2090
|
+
for (i=1; i<=n; i++)
|
|
2091
|
+
{
|
|
2092
|
+
if (w[i]<>0)
|
|
2093
|
+
{
|
|
2094
|
+
ff[i] = 0;
|
|
2095
|
+
}
|
|
2096
|
+
}
|
|
2097
|
+
map f = save,ff;
|
|
2098
|
+
ideal B,M;
|
|
2099
|
+
poly p;
|
|
2100
|
+
for (i=1; i<=size(G); i++)
|
|
2101
|
+
{
|
|
2102
|
+
for (j=1; j<=l0-m[i]+1; j++)
|
|
2103
|
+
{
|
|
2104
|
+
B = Blist[j];
|
|
2105
|
+
for (k=1; k<=ncols(B); k++)
|
|
2106
|
+
{
|
|
2107
|
+
p = B[k]*G[i];
|
|
2108
|
+
p = f(p);
|
|
2109
|
+
M[size(M)+1] = p;
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
}
|
|
2113
|
+
ideal Bl0 = Blist[1..(l0+1)];
|
|
2114
|
+
dbprint(ppl,"// found basis of free module");
|
|
2115
|
+
dbprint(ppl-1,"// " + string(Bl0));
|
|
2116
|
+
dbprint(ppl,"// found generators of submodule");
|
|
2117
|
+
dbprint(ppl-1,"// " + string(M));
|
|
2118
|
+
return(list(Bl0,M));
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
static proc restrictionModuleOutput (ideal B, ideal N, intvec w, int eng, string str)
|
|
2122
|
+
// returns ring, which contains module "str"
|
|
2123
|
+
{
|
|
2124
|
+
int n = nvars(basering) div 2;
|
|
2125
|
+
int i,j;
|
|
2126
|
+
def save = basering;
|
|
2127
|
+
// 1: create new ring
|
|
2128
|
+
list RL = ringlist(save);
|
|
2129
|
+
RL = RL[1..4];
|
|
2130
|
+
list V = RL[2];
|
|
2131
|
+
poly prodvar = 1;
|
|
2132
|
+
int zeropresent;
|
|
2133
|
+
j = 0;
|
|
2134
|
+
for (i=1; i<=n; i++)
|
|
2135
|
+
{
|
|
2136
|
+
if (w[i]<>0)
|
|
2137
|
+
{
|
|
2138
|
+
V = delete(V,i-j);
|
|
2139
|
+
V = delete(V,i-2*j-1+n);
|
|
2140
|
+
j = j+1;
|
|
2141
|
+
prodvar = prodvar*var(i)*var(i+n);
|
|
2142
|
+
}
|
|
2143
|
+
else
|
|
2144
|
+
{
|
|
2145
|
+
zeropresent = 1;
|
|
2146
|
+
}
|
|
2147
|
+
}
|
|
2148
|
+
if (!zeropresent) // restrict/integrate all vars, return input ring
|
|
2149
|
+
{
|
|
2150
|
+
def newR = save;
|
|
2151
|
+
}
|
|
2152
|
+
else
|
|
2153
|
+
{
|
|
2154
|
+
RL[2] = V;
|
|
2155
|
+
V = list();
|
|
2156
|
+
V[1] = list("C", intvec(0));
|
|
2157
|
+
V[2] = list("dp",intvec(1:(2*size(ideal(w)))));
|
|
2158
|
+
RL[3] = V;
|
|
2159
|
+
def @D = ring(RL);
|
|
2160
|
+
setring @D;
|
|
2161
|
+
def newR = Weyl();
|
|
2162
|
+
setring save;
|
|
2163
|
+
kill @D;
|
|
2164
|
+
}
|
|
2165
|
+
// 2. get coker representation of module
|
|
2166
|
+
module M = coeffs(N,B,prodvar);
|
|
2167
|
+
if (zeropresent)
|
|
2168
|
+
{
|
|
2169
|
+
setring newR;
|
|
2170
|
+
module M = imap(save,M);
|
|
2171
|
+
}
|
|
2172
|
+
M = engine(M,eng);
|
|
2173
|
+
M = prune(M);
|
|
2174
|
+
M = engine(M,eng);
|
|
2175
|
+
execute("module " + str + " = M;");
|
|
2176
|
+
execute("export(" + str + ");");
|
|
2177
|
+
setring save;
|
|
2178
|
+
return(newR);
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
proc restrictionModule (ideal I, intvec w, list #)
|
|
2182
|
+
"USAGE: restrictionModule(I,w,[,eng,m,G]);
|
|
2183
|
+
@* I ideal, w intvec, eng and m optional ints, G optional ideal
|
|
2184
|
+
RETURN: ring (a Weyl algebra) containing a module 'resMod'
|
|
2185
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
2186
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
2187
|
+
@* holds, i.e. the sequence of variables is given by
|
|
2188
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
2189
|
+
@* belonging to x(i).
|
|
2190
|
+
@* Further, assume that I is holonomic and that w is n-dimensional with
|
|
2191
|
+
@* non-negative entries.
|
|
2192
|
+
PURPOSE: computes the restriction module of a holonomic ideal to the subspace
|
|
2193
|
+
@* defined by the variables corresponding to the non-zero entries of the
|
|
2194
|
+
@* given intvec
|
|
2195
|
+
NOTE: The output ring is the Weyl algebra defined by the zero entries of w.
|
|
2196
|
+
@* It contains a module 'resMod' being the restriction module of I wrt w.
|
|
2197
|
+
@* If there are no zero entries, the input ring is returned.
|
|
2198
|
+
@* If eng<>0, @code{std} is used for Groebner basis computations,
|
|
2199
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
2200
|
+
@* The minimal integer root of the b-function of I wrt the weight (-w,w)
|
|
2201
|
+
@* can be specified via the optional argument m.
|
|
2202
|
+
@* The optional argument G is used for specifying a Groebner Basis of I
|
|
2203
|
+
@* wrt the weight (-w,w), that is, the initial form of G generates the
|
|
2204
|
+
@* initial ideal of I wrt the weight (-w,w).
|
|
2205
|
+
@* Further note, that the assumptions on m and G (if given) are not
|
|
2206
|
+
@* checked.
|
|
2207
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
2208
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
2209
|
+
EXAMPLE: example restrictionModule; shows examples
|
|
2210
|
+
"
|
|
2211
|
+
{
|
|
2212
|
+
list L = restrictionModuleEngine(I,w,#);
|
|
2213
|
+
int eng;
|
|
2214
|
+
if (size(#)>0)
|
|
2215
|
+
{
|
|
2216
|
+
if (intLike(#[1]))
|
|
2217
|
+
{
|
|
2218
|
+
eng = int(#[1]);
|
|
2219
|
+
}
|
|
2220
|
+
}
|
|
2221
|
+
def newR = restrictionModuleOutput(L[1],L[2],w,eng,"resMod");
|
|
2222
|
+
return(newR);
|
|
2223
|
+
}
|
|
2224
|
+
example
|
|
2225
|
+
{
|
|
2226
|
+
"EXAMPLE:"; echo = 2;
|
|
2227
|
+
ring r = 0,(a,x,b,Da,Dx,Db),dp;
|
|
2228
|
+
def D3 = Weyl();
|
|
2229
|
+
setring D3;
|
|
2230
|
+
ideal I = a*Db-Dx+2*Da, x*Db-Da, x*Da+a*Da+b*Db+1,
|
|
2231
|
+
x*Dx-2*x*Da-a*Da, b*Db^2+Dx*Da-Da^2+Db,
|
|
2232
|
+
a*Dx*Da+2*x*Da^2+a*Da^2+b*Dx*Db+Dx+2*Da;
|
|
2233
|
+
intvec w = 1,0,0;
|
|
2234
|
+
def rm = restrictionModule(I,w);
|
|
2235
|
+
setring rm; rm;
|
|
2236
|
+
print(resMod);
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
static proc restrictionIdealEngine (ideal I, intvec w, string cf, list #)
|
|
2240
|
+
{
|
|
2241
|
+
int eng;
|
|
2242
|
+
if (size(#)>0)
|
|
2243
|
+
{
|
|
2244
|
+
if(intLike(#[1]))
|
|
2245
|
+
{
|
|
2246
|
+
eng = int(#[1]);
|
|
2247
|
+
}
|
|
2248
|
+
}
|
|
2249
|
+
def save = basering;
|
|
2250
|
+
if (cf == "restriction")
|
|
2251
|
+
{
|
|
2252
|
+
def newR = restrictionModule(I,w,#);
|
|
2253
|
+
setring newR;
|
|
2254
|
+
matrix M = resMod;
|
|
2255
|
+
kill resMod;
|
|
2256
|
+
}
|
|
2257
|
+
if (cf == "integral")
|
|
2258
|
+
{
|
|
2259
|
+
def newR = integralModule(I,w,#);
|
|
2260
|
+
setring newR;
|
|
2261
|
+
matrix M = intMod;
|
|
2262
|
+
kill intMod;
|
|
2263
|
+
}
|
|
2264
|
+
int i,r,c;
|
|
2265
|
+
r = nrows(M);
|
|
2266
|
+
c = ncols(M);
|
|
2267
|
+
ideal J;
|
|
2268
|
+
if (r == 1) // nothing to do
|
|
2269
|
+
{
|
|
2270
|
+
J = M;
|
|
2271
|
+
}
|
|
2272
|
+
else
|
|
2273
|
+
{
|
|
2274
|
+
matrix zm[r-1][1]; // zero matrix
|
|
2275
|
+
matrix v[r-1][1];
|
|
2276
|
+
for (i=1; i<=c; i++)
|
|
2277
|
+
{
|
|
2278
|
+
if (M[1,i]<>0)
|
|
2279
|
+
{
|
|
2280
|
+
v = M[2..r,i];
|
|
2281
|
+
if (v == zm)
|
|
2282
|
+
{
|
|
2283
|
+
J[size(J)+1] = M[1,i];
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
}
|
|
2288
|
+
J = engine(J,eng);
|
|
2289
|
+
if (cf == "restriction")
|
|
2290
|
+
{
|
|
2291
|
+
ideal resIdeal = J;
|
|
2292
|
+
export(resIdeal);
|
|
2293
|
+
}
|
|
2294
|
+
if (cf == "integral")
|
|
2295
|
+
{
|
|
2296
|
+
ideal intIdeal = J;
|
|
2297
|
+
export(intIdeal);
|
|
2298
|
+
}
|
|
2299
|
+
setring save;
|
|
2300
|
+
return(newR);
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
proc restrictionIdeal (ideal I, intvec w, list #)
|
|
2304
|
+
"USAGE: restrictionIdeal(I,w,[,eng,m,G]);
|
|
2305
|
+
@* I ideal, w intvec, eng and m optional ints, G optional ideal
|
|
2306
|
+
RETURN: ring (a Weyl algebra) containing an ideal 'resIdeal'
|
|
2307
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
2308
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
2309
|
+
@* holds, i.e. the sequence of variables is given by
|
|
2310
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
2311
|
+
@* belonging to x(i).
|
|
2312
|
+
@* Further, assume that I is holonomic and that w is n-dimensional with
|
|
2313
|
+
@* non-negative entries.
|
|
2314
|
+
PURPOSE: computes the restriction ideal of a holonomic ideal to the subspace
|
|
2315
|
+
@* defined by the variables corresponding to the non-zero entries of the
|
|
2316
|
+
@* given intvec
|
|
2317
|
+
NOTE: The output ring is the Weyl algebra defined by the zero entries of w.
|
|
2318
|
+
@* It contains an ideal 'resIdeal' being the restriction ideal of I wrt w.
|
|
2319
|
+
@* If there are no zero entries, the input ring is returned.
|
|
2320
|
+
@* If eng<>0, @code{std} is used for Groebner basis computations,
|
|
2321
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
2322
|
+
@* The minimal integer root of the b-function of I wrt the weight (-w,w)
|
|
2323
|
+
@* can be specified via the optional argument m.
|
|
2324
|
+
@* The optional argument G is used for specifying a Groebner basis of I
|
|
2325
|
+
@* wrt the weight (-w,w), that is, the initial form of G generates the
|
|
2326
|
+
@* initial ideal of I wrt the weight (-w,w).
|
|
2327
|
+
@* Further note, that the assumptions on m and G (if given) are not
|
|
2328
|
+
@* checked.
|
|
2329
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
2330
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
2331
|
+
EXAMPLE: example restrictionIdeal; shows examples
|
|
2332
|
+
"
|
|
2333
|
+
{
|
|
2334
|
+
def rm = restrictionIdealEngine(I,w,"restriction",#);
|
|
2335
|
+
return(rm);
|
|
2336
|
+
}
|
|
2337
|
+
example
|
|
2338
|
+
{
|
|
2339
|
+
"EXAMPLE:"; echo = 2;
|
|
2340
|
+
ring r = 0,(a,x,b,Da,Dx,Db),dp;
|
|
2341
|
+
def D3 = Weyl();
|
|
2342
|
+
setring D3;
|
|
2343
|
+
ideal I = a*Db-Dx+2*Da,
|
|
2344
|
+
x*Db-Da,
|
|
2345
|
+
x*Da+a*Da+b*Db+1,
|
|
2346
|
+
x*Dx-2*x*Da-a*Da,
|
|
2347
|
+
b*Db^2+Dx*Da-Da^2+Db,
|
|
2348
|
+
a*Dx*Da+2*x*Da^2+a*Da^2+b*Dx*Db+Dx+2*Da;
|
|
2349
|
+
intvec w = 1,0,0;
|
|
2350
|
+
def D2 = restrictionIdeal(I,w);
|
|
2351
|
+
setring D2; D2;
|
|
2352
|
+
resIdeal;
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
proc fourier (ideal I, list #)
|
|
2356
|
+
"USAGE: fourier(I[,v]); I an ideal, v an optional intvec
|
|
2357
|
+
RETURN: ideal
|
|
2358
|
+
PURPOSE: computes the Fourier transform of an ideal in a Weyl algebra
|
|
2359
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
2360
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
2361
|
+
@* holds, i.e. the sequence of variables is given by
|
|
2362
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
2363
|
+
@* belonging to x(i).
|
|
2364
|
+
NOTE: The Fourier automorphism is defined by mapping x(i) to -D(i) and
|
|
2365
|
+
@* D(i) to x(i).
|
|
2366
|
+
@* If v is an intvec with entries ranging from 1 to n, the Fourier
|
|
2367
|
+
@* transform of I restricted to the variables given by v is computed.
|
|
2368
|
+
SEE ALSO: inverseFourier
|
|
2369
|
+
EXAMPLE: example fourier; shows examples
|
|
2370
|
+
"
|
|
2371
|
+
{
|
|
2372
|
+
dmodappMoreAssumeViolation();
|
|
2373
|
+
intvec v;
|
|
2374
|
+
if (size(#)>0)
|
|
2375
|
+
{
|
|
2376
|
+
if(typeof(#[1])=="intvec")
|
|
2377
|
+
{
|
|
2378
|
+
v = #[1];
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2381
|
+
int n = nvars(basering) div 2;
|
|
2382
|
+
int i;
|
|
2383
|
+
if(v <> 0:size(v))
|
|
2384
|
+
{
|
|
2385
|
+
v = sortIntvec(v)[1];
|
|
2386
|
+
for (i=1; i<size(v); i++)
|
|
2387
|
+
{
|
|
2388
|
+
if (v[i] == v[i+1])
|
|
2389
|
+
{
|
|
2390
|
+
ERROR("No double entries allowed in intvec");
|
|
2391
|
+
}
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
else
|
|
2395
|
+
{
|
|
2396
|
+
v = 1..n;
|
|
2397
|
+
}
|
|
2398
|
+
ideal m = maxideal(1);
|
|
2399
|
+
for (i=1; i<=size(v); i++)
|
|
2400
|
+
{
|
|
2401
|
+
if (v[i]<0 || v[i]>n)
|
|
2402
|
+
{
|
|
2403
|
+
ERROR("Entries of intvec must range from 1 to "+string(n));
|
|
2404
|
+
}
|
|
2405
|
+
m[v[i]] = -var(v[i]+n);
|
|
2406
|
+
m[v[i]+n] = var(v[i]);
|
|
2407
|
+
}
|
|
2408
|
+
map F = basering,m;
|
|
2409
|
+
ideal FI = F(I);
|
|
2410
|
+
return(FI);
|
|
2411
|
+
}
|
|
2412
|
+
example
|
|
2413
|
+
{
|
|
2414
|
+
"EXAMPLE:"; echo = 2;
|
|
2415
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
2416
|
+
def D2 = Weyl();
|
|
2417
|
+
setring D2;
|
|
2418
|
+
ideal I = x*Dx+2*y*Dy+2, x^2*Dx+y*Dx+2*x;
|
|
2419
|
+
intvec v = 2;
|
|
2420
|
+
fourier(I,v);
|
|
2421
|
+
fourier(I);
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
proc inverseFourier (ideal I, list #)
|
|
2425
|
+
"USAGE: inverseFourier(I[,v]); I an ideal, v an optional intvec
|
|
2426
|
+
RETURN: ideal
|
|
2427
|
+
PURPOSE: computes the inverse Fourier transform of an ideal in a Weyl algebra
|
|
2428
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
2429
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
2430
|
+
@* holds, i.e. the sequence of variables is given by
|
|
2431
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
2432
|
+
@* belonging to x(i).
|
|
2433
|
+
NOTE: The Fourier automorphism is defined by mapping x(i) to -D(i) and
|
|
2434
|
+
@* D(i) to x(i).
|
|
2435
|
+
@* If v is an intvec with entries ranging from 1 to n, the inverse Fourier
|
|
2436
|
+
@* transform of I restricted to the variables given by v is computed.
|
|
2437
|
+
SEE ALSO: fourier
|
|
2438
|
+
EXAMPLE: example inverseFourier; shows examples
|
|
2439
|
+
"
|
|
2440
|
+
{
|
|
2441
|
+
dmodappMoreAssumeViolation();
|
|
2442
|
+
intvec v;
|
|
2443
|
+
if (size(#)>0)
|
|
2444
|
+
{
|
|
2445
|
+
if(typeof(#[1])=="intvec")
|
|
2446
|
+
{
|
|
2447
|
+
v = #[1];
|
|
2448
|
+
}
|
|
2449
|
+
}
|
|
2450
|
+
int n = nvars(basering) div 2;
|
|
2451
|
+
int i;
|
|
2452
|
+
if(v <> 0:size(v))
|
|
2453
|
+
{
|
|
2454
|
+
v = sortIntvec(v)[1];
|
|
2455
|
+
for (i=1; i<size(v); i++)
|
|
2456
|
+
{
|
|
2457
|
+
if (v[i] == v[i+1])
|
|
2458
|
+
{
|
|
2459
|
+
ERROR("No double entries allowed in intvec");
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
}
|
|
2463
|
+
else
|
|
2464
|
+
{
|
|
2465
|
+
v = 1..n;
|
|
2466
|
+
}
|
|
2467
|
+
ideal m = maxideal(1);
|
|
2468
|
+
for (i=1; i<=size(v); i++)
|
|
2469
|
+
{
|
|
2470
|
+
if (v[i]<0 || v[i]>n)
|
|
2471
|
+
{
|
|
2472
|
+
ERROR("Entries of intvec must range between 1 and "+string(n));
|
|
2473
|
+
}
|
|
2474
|
+
m[v[i]] = var(v[i]+n);
|
|
2475
|
+
m[v[i]+n] = -var(v[i]);
|
|
2476
|
+
}
|
|
2477
|
+
map F = basering,m;
|
|
2478
|
+
ideal FI = F(I);
|
|
2479
|
+
return(FI);
|
|
2480
|
+
}
|
|
2481
|
+
example
|
|
2482
|
+
{
|
|
2483
|
+
"EXAMPLE:"; echo = 2;
|
|
2484
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
2485
|
+
def D2 = Weyl();
|
|
2486
|
+
setring D2;
|
|
2487
|
+
ideal I = x*Dx+2*y*Dy+2, x^2*Dx+y*Dx+2*x;
|
|
2488
|
+
intvec v = 2;
|
|
2489
|
+
ideal FI = fourier(I);
|
|
2490
|
+
inverseFourier(FI);
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
proc integralModule (ideal I, intvec w, list #)
|
|
2494
|
+
"USAGE: integralModule(I,w,[,eng,m,G]);
|
|
2495
|
+
@* I ideal, w intvec, eng and m optional ints, G optional ideal
|
|
2496
|
+
RETURN: ring (a Weyl algebra) containing a module 'intMod'
|
|
2497
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
2498
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
2499
|
+
@* holds, i.e. the sequence of variables is given by
|
|
2500
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
2501
|
+
@* belonging to x(i).
|
|
2502
|
+
@* Further, assume that I is holonomic and that w is n-dimensional with
|
|
2503
|
+
@* non-negative entries.
|
|
2504
|
+
PURPOSE: computes the integral module of a holonomic ideal w.r.t. the subspace
|
|
2505
|
+
@* defined by the variables corresponding to the non-zero entries of the
|
|
2506
|
+
@* given intvec
|
|
2507
|
+
NOTE: The output ring is the Weyl algebra defined by the zero entries of w.
|
|
2508
|
+
@* It contains a module 'intMod' being the integral module of I wrt w.
|
|
2509
|
+
@* If there are no zero entries, the input ring is returned.
|
|
2510
|
+
@* If eng<>0, @code{std} is used for Groebner basis computations,
|
|
2511
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
2512
|
+
@* Let F(I) denote the Fourier transform of I w.r.t. w.
|
|
2513
|
+
@* The minimal integer root of the b-function of F(I) w.r.t. the weight
|
|
2514
|
+
@* (-w,w) can be specified via the optional argument m.
|
|
2515
|
+
@* The optional argument G is used for specifying a Groebner Basis of F(I)
|
|
2516
|
+
@* wrt the weight (-w,w), that is, the initial form of G generates the
|
|
2517
|
+
@* initial ideal of F(I) w.r.t. the weight (-w,w).
|
|
2518
|
+
@* Further note, that the assumptions on m and G (if given) are not
|
|
2519
|
+
@* checked.
|
|
2520
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
2521
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
2522
|
+
EXAMPLE: example integralModule; shows examples
|
|
2523
|
+
"
|
|
2524
|
+
{
|
|
2525
|
+
int l0,l0set,Gset;
|
|
2526
|
+
ideal G;
|
|
2527
|
+
int whichengine = 0; // default
|
|
2528
|
+
if (size(#)>0)
|
|
2529
|
+
{
|
|
2530
|
+
if (intLike(#[1]))
|
|
2531
|
+
{
|
|
2532
|
+
whichengine = int(#[1]);
|
|
2533
|
+
}
|
|
2534
|
+
if (size(#)>1)
|
|
2535
|
+
{
|
|
2536
|
+
if (intLike(#[2]))
|
|
2537
|
+
{
|
|
2538
|
+
l0 = int(#[2]);
|
|
2539
|
+
l0set = 1;
|
|
2540
|
+
}
|
|
2541
|
+
if (size(#)>2)
|
|
2542
|
+
{
|
|
2543
|
+
if (typeof(#[3])=="ideal")
|
|
2544
|
+
{
|
|
2545
|
+
G = #[3];
|
|
2546
|
+
Gset = 1;
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
int ppl = printlevel;
|
|
2552
|
+
int i;
|
|
2553
|
+
int n = nvars(basering) div 2;
|
|
2554
|
+
intvec v;
|
|
2555
|
+
for (i=1; i<=n; i++)
|
|
2556
|
+
{
|
|
2557
|
+
if (w[i]>0)
|
|
2558
|
+
{
|
|
2559
|
+
if (v == 0:size(v))
|
|
2560
|
+
{
|
|
2561
|
+
v[1] = i;
|
|
2562
|
+
}
|
|
2563
|
+
else
|
|
2564
|
+
{
|
|
2565
|
+
v[size(v)+1] = i;
|
|
2566
|
+
}
|
|
2567
|
+
}
|
|
2568
|
+
}
|
|
2569
|
+
ideal FI = fourier(I,v);
|
|
2570
|
+
dbprint(ppl,"// computed Fourier transform of given ideal");
|
|
2571
|
+
dbprint(ppl-1,"// " + string(FI));
|
|
2572
|
+
list L;
|
|
2573
|
+
if (l0set)
|
|
2574
|
+
{
|
|
2575
|
+
if (Gset) // l0 and G given
|
|
2576
|
+
{
|
|
2577
|
+
L = restrictionModuleEngine(FI,w,whichengine,l0,G);
|
|
2578
|
+
}
|
|
2579
|
+
else // l0 given, G not
|
|
2580
|
+
{
|
|
2581
|
+
L = restrictionModuleEngine(FI,w,whichengine,l0);
|
|
2582
|
+
}
|
|
2583
|
+
}
|
|
2584
|
+
else // nothing given
|
|
2585
|
+
{
|
|
2586
|
+
L = restrictionModuleEngine(FI,w,whichengine);
|
|
2587
|
+
}
|
|
2588
|
+
ideal B,N;
|
|
2589
|
+
B = inverseFourier(L[1],v);
|
|
2590
|
+
N = inverseFourier(L[2],v);
|
|
2591
|
+
def newR = restrictionModuleOutput(B,N,w,whichengine,"intMod");
|
|
2592
|
+
return(newR);
|
|
2593
|
+
}
|
|
2594
|
+
example
|
|
2595
|
+
{
|
|
2596
|
+
"EXAMPLE:"; echo = 2;
|
|
2597
|
+
ring r = 0,(x,b,Dx,Db),dp;
|
|
2598
|
+
def D2 = Weyl();
|
|
2599
|
+
setring D2;
|
|
2600
|
+
ideal I = x*Dx+2*b*Db+2, x^2*Dx+b*Dx+2*x;
|
|
2601
|
+
intvec w = 1,0;
|
|
2602
|
+
def im = integralModule(I,w);
|
|
2603
|
+
setring im; im;
|
|
2604
|
+
print(intMod);
|
|
2605
|
+
}
|
|
2606
|
+
|
|
2607
|
+
proc integralIdeal (ideal I, intvec w, list #)
|
|
2608
|
+
"USAGE: integralIdeal(I,w,[,eng,m,G]);
|
|
2609
|
+
@* I ideal, w intvec, eng and m optional ints, G optional ideal
|
|
2610
|
+
RETURN: ring (a Weyl algebra) containing an ideal 'intIdeal'
|
|
2611
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
2612
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
2613
|
+
@* holds, i.e. the sequence of variables is given by
|
|
2614
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
2615
|
+
@* belonging to x(i).
|
|
2616
|
+
@* Further, assume that I is holonomic and that w is n-dimensional with
|
|
2617
|
+
@* non-negative entries.
|
|
2618
|
+
PURPOSE: computes the integral ideal of a holonomic ideal w.r.t. the subspace
|
|
2619
|
+
@* defined by the variables corresponding to the non-zero entries of the
|
|
2620
|
+
@* given intvec.
|
|
2621
|
+
NOTE: The output ring is the Weyl algebra defined by the zero entries of w.
|
|
2622
|
+
@* It contains ideal 'intIdeal' being the integral ideal of I w.r.t. w.
|
|
2623
|
+
@* If there are no zero entries, the input ring is returned.
|
|
2624
|
+
@* If eng<>0, @code{std} is used for Groebner basis computations,
|
|
2625
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
2626
|
+
@* The minimal integer root of the b-function of I wrt the weight (-w,w)
|
|
2627
|
+
@* can be specified via the optional argument m.
|
|
2628
|
+
@* The optional argument G is used for specifying a Groebner basis of I
|
|
2629
|
+
@* wrt the weight (-w,w), that is, the initial form of G generates the
|
|
2630
|
+
@* initial ideal of I wrt the weight (-w,w).
|
|
2631
|
+
@* Further note, that the assumptions on m and G (if given) are not
|
|
2632
|
+
@* checked.
|
|
2633
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
2634
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
2635
|
+
EXAMPLE: example integralIdeal; shows examples
|
|
2636
|
+
"
|
|
2637
|
+
{
|
|
2638
|
+
def im = restrictionIdealEngine(I,w,"integral",#);
|
|
2639
|
+
return(im);
|
|
2640
|
+
}
|
|
2641
|
+
example
|
|
2642
|
+
{
|
|
2643
|
+
"EXAMPLE:"; echo = 2;
|
|
2644
|
+
ring r = 0,(x,b,Dx,Db),dp;
|
|
2645
|
+
def D2 = Weyl();
|
|
2646
|
+
setring D2;
|
|
2647
|
+
ideal I = x*Dx+2*b*Db+2, x^2*Dx+b*Dx+2*x;
|
|
2648
|
+
intvec w = 1,0;
|
|
2649
|
+
def D1 = integralIdeal(I,w);
|
|
2650
|
+
setring D1; D1;
|
|
2651
|
+
intIdeal;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
proc deRhamCohomIdeal (ideal I, list #)
|
|
2655
|
+
"USAGE: deRhamCohomIdeal (I[,w,eng,k,G]);
|
|
2656
|
+
@* I ideal, w optional intvec, eng and k optional ints, G optional ideal
|
|
2657
|
+
RETURN: ideal
|
|
2658
|
+
ASSUME: The basering is the n-th Weyl algebra D over a field of characteristic
|
|
2659
|
+
@* zero and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
2660
|
+
@* holds, i.e. the sequence of variables is given by
|
|
2661
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
2662
|
+
@* belonging to x(i).
|
|
2663
|
+
@* Further, assume that I is of special kind, namely let f in K[x] and
|
|
2664
|
+
@* consider the module K[x,1/f]f^m, where m is smaller than or equal to
|
|
2665
|
+
@* the minimal integer root of the Bernstein-Sato polynomial of f.
|
|
2666
|
+
@* Since this module is known to be a holonomic D-module, it has a cyclic
|
|
2667
|
+
@* presentation D/I.
|
|
2668
|
+
PURPOSE: computes a basis of the n-th de Rham cohomology group of the complement
|
|
2669
|
+
@* of the hypersurface defined by f
|
|
2670
|
+
NOTE: The elements of the basis are of the form f^m*p, where p runs over the
|
|
2671
|
+
@* entries of the returned ideal.
|
|
2672
|
+
@* If I does not satisfy the assumptions described above, the result might
|
|
2673
|
+
@* have no meaning. Note that I can be computed with @code{annfs}.
|
|
2674
|
+
@* If w is an intvec with exactly n strictly positive entries, w is used
|
|
2675
|
+
@* in the computation. Otherwise, and by default, w is set to (1,...,1).
|
|
2676
|
+
@* If eng<>0, @code{std} is used for Groebner basis computations,
|
|
2677
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
2678
|
+
@* Let F(I) denote the Fourier transform of I wrt w.
|
|
2679
|
+
@* An integer smaller than or equal to the minimal integer root of the
|
|
2680
|
+
@* b-function of F(I) wrt the weight (-w,w) can be specified via the
|
|
2681
|
+
@* optional argument k.
|
|
2682
|
+
@* The optional argument G is used for specifying a Groebner Basis of F(I)
|
|
2683
|
+
@* wrt the weight (-w,w), that is, the initial form of G generates the
|
|
2684
|
+
@* initial ideal of F(I) wrt the weight (-w,w).
|
|
2685
|
+
@* Further note, that the assumptions on I, k and G (if given) are not
|
|
2686
|
+
@* checked.
|
|
2687
|
+
THEORY: (SST) pp. 232-235
|
|
2688
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
2689
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
2690
|
+
SEE ALSO: deRhamCohom
|
|
2691
|
+
EXAMPLE: example deRhamCohomIdeal; shows examples
|
|
2692
|
+
"
|
|
2693
|
+
{
|
|
2694
|
+
intvec w = 1:(nvars(basering) div 2);
|
|
2695
|
+
int l0,l0set,Gset;
|
|
2696
|
+
ideal G;
|
|
2697
|
+
int whichengine = 0; // default
|
|
2698
|
+
if (size(#)>0)
|
|
2699
|
+
{
|
|
2700
|
+
if (typeof(#[1])=="intvec")
|
|
2701
|
+
{
|
|
2702
|
+
if (allPositive(#[1])==1)
|
|
2703
|
+
{
|
|
2704
|
+
w = #[1];
|
|
2705
|
+
}
|
|
2706
|
+
else
|
|
2707
|
+
{
|
|
2708
|
+
print("// Entries of intvec must be strictly positive");
|
|
2709
|
+
print("// Using weight " + string(w));
|
|
2710
|
+
}
|
|
2711
|
+
if (size(#)>1)
|
|
2712
|
+
{
|
|
2713
|
+
if (intLike(#[2]))
|
|
2714
|
+
{
|
|
2715
|
+
whichengine = int(#[2]);
|
|
2716
|
+
}
|
|
2717
|
+
if (size(#)>2)
|
|
2718
|
+
{
|
|
2719
|
+
if (intLike(#[3]))
|
|
2720
|
+
{
|
|
2721
|
+
l0 = int(#[3]);
|
|
2722
|
+
l0set = 1;
|
|
2723
|
+
}
|
|
2724
|
+
if (size(#)>3)
|
|
2725
|
+
{
|
|
2726
|
+
if (typeof(#[4])=="ideal")
|
|
2727
|
+
{
|
|
2728
|
+
G = #[4];
|
|
2729
|
+
Gset = 1;
|
|
2730
|
+
}
|
|
2731
|
+
}
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
int ppl = printlevel;
|
|
2737
|
+
int i,j;
|
|
2738
|
+
int n = nvars(basering) div 2;
|
|
2739
|
+
intvec v;
|
|
2740
|
+
for (i=1; i<=n; i++)
|
|
2741
|
+
{
|
|
2742
|
+
if (w[i]>0)
|
|
2743
|
+
{
|
|
2744
|
+
if (v == 0:size(v))
|
|
2745
|
+
{
|
|
2746
|
+
v[1] = i;
|
|
2747
|
+
}
|
|
2748
|
+
else
|
|
2749
|
+
{
|
|
2750
|
+
v[size(v)+1] = i;
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
ideal FI = fourier(I,v);
|
|
2755
|
+
dbprint(ppl,"// computed Fourier transform of given ideal");
|
|
2756
|
+
dbprint(ppl-1,"// " + string(FI));
|
|
2757
|
+
list L;
|
|
2758
|
+
if (l0set)
|
|
2759
|
+
{
|
|
2760
|
+
if (Gset) // l0 and G given
|
|
2761
|
+
{
|
|
2762
|
+
L = restrictionModuleEngine(FI,w,whichengine,l0,G);
|
|
2763
|
+
}
|
|
2764
|
+
else // l0 given, G not
|
|
2765
|
+
{
|
|
2766
|
+
L = restrictionModuleEngine(FI,w,whichengine,l0);
|
|
2767
|
+
}
|
|
2768
|
+
}
|
|
2769
|
+
else // nothing given
|
|
2770
|
+
{
|
|
2771
|
+
L = restrictionModuleEngine(FI,w,whichengine);
|
|
2772
|
+
}
|
|
2773
|
+
ideal B,N;
|
|
2774
|
+
B = inverseFourier(L[1],v);
|
|
2775
|
+
N = inverseFourier(L[2],v);
|
|
2776
|
+
dbprint(ppl,"// computed integral module of given ideal");
|
|
2777
|
+
dbprint(ppl-1,"// " + string(B));
|
|
2778
|
+
dbprint(ppl-1,"// " + string(N));
|
|
2779
|
+
ideal DR;
|
|
2780
|
+
poly p;
|
|
2781
|
+
poly Dt = 1;
|
|
2782
|
+
for (i=1; i<=n; i++)
|
|
2783
|
+
{
|
|
2784
|
+
Dt = Dt*var(i+n);
|
|
2785
|
+
}
|
|
2786
|
+
N = simplify(N,2+8);
|
|
2787
|
+
printlevel = printlevel-1;
|
|
2788
|
+
N = linReduceIdeal(N);
|
|
2789
|
+
N = simplify(N,2+8);
|
|
2790
|
+
for (i=1; i<=size(B); i++)
|
|
2791
|
+
{
|
|
2792
|
+
p = linReduce(B[i],N);
|
|
2793
|
+
if (p<>0)
|
|
2794
|
+
{
|
|
2795
|
+
DR[size(DR)+1] = B[i]*Dt;
|
|
2796
|
+
j=1;
|
|
2797
|
+
while ((j<size(N)) && (p<N[j]))
|
|
2798
|
+
{
|
|
2799
|
+
j++;
|
|
2800
|
+
}
|
|
2801
|
+
N = insertGenerator(N,p,j+1);
|
|
2802
|
+
}
|
|
2803
|
+
}
|
|
2804
|
+
printlevel = printlevel + 1;
|
|
2805
|
+
return(DR);
|
|
2806
|
+
}
|
|
2807
|
+
example
|
|
2808
|
+
{
|
|
2809
|
+
"EXAMPLE:"; echo = 2;
|
|
2810
|
+
ring r = 0,(x,y,z),dp;
|
|
2811
|
+
poly F = x^3+y^3+z^3;
|
|
2812
|
+
bfctAnn(F); // Bernstein-Sato poly of F has minimal integer root -2
|
|
2813
|
+
def W = annRat(1,F^2); // so we compute the annihilator of 1/F^2
|
|
2814
|
+
setring W; W; // Weyl algebra, contains LD = Ann(1/F^2)
|
|
2815
|
+
LD; // K[x,y,z,1/F]F^(-2) is isomorphic to W/LD as W-module
|
|
2816
|
+
deRhamCohomIdeal(LD); // we see that the K-dim is 2
|
|
2817
|
+
}
|
|
2818
|
+
|
|
2819
|
+
proc deRhamCohom (poly f, list #)
|
|
2820
|
+
"USAGE: deRhamCohom(f[,w,eng,m]); f poly, w optional intvec,
|
|
2821
|
+
eng and m optional ints
|
|
2822
|
+
RETURN: ring (a Weyl Algebra) containing a list 'DR' of ideal and int
|
|
2823
|
+
ASSUME: Basering is commutative and over a field of characteristic 0.
|
|
2824
|
+
PURPOSE: computes a basis of the n-th de Rham cohomology group of the complement
|
|
2825
|
+
@* of the hypersurface defined by f, where n denotes the number of
|
|
2826
|
+
@* variables of the basering
|
|
2827
|
+
NOTE: The output ring is the n-th Weyl algebra. It contains a list 'DR' with
|
|
2828
|
+
@* two entries (ideal J and int m) such that {f^m*J[i] : i=1..size(I)} is
|
|
2829
|
+
@* a basis of the n-th de Rham cohomology group of the complement of the
|
|
2830
|
+
@* hypersurface defined by f.
|
|
2831
|
+
@* If w is an intvec with exactly n strictly positive entries, w is used
|
|
2832
|
+
@* in the computation. Otherwise, and by default, w is set to (1,...,1).
|
|
2833
|
+
@* If eng<>0, @code{std} is used for Groebner basis computations,
|
|
2834
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
2835
|
+
@* If m is given, it is assumed to be less than or equal to the minimal
|
|
2836
|
+
@* integer root of the Bernstein-Sato polynomial of f. This assumption is
|
|
2837
|
+
@* not checked. If not specified, m is set to the minimal integer root of
|
|
2838
|
+
@* the Bernstein-Sato polynomial of f.
|
|
2839
|
+
THEORY: (SST) pp. 232-235
|
|
2840
|
+
DISPLAY: If printlevel=1, progress debug messages will be printed,
|
|
2841
|
+
@* if printlevel>=2, all the debug messages will be printed.
|
|
2842
|
+
SEE ALSO: deRhamCohomIdeal
|
|
2843
|
+
EXAMPLE: example deRhamCohom; shows example
|
|
2844
|
+
"
|
|
2845
|
+
{
|
|
2846
|
+
int ppl = printlevel - voice + 2;
|
|
2847
|
+
def save = basering;
|
|
2848
|
+
int n = nvars(save);
|
|
2849
|
+
intvec w = 1:n;
|
|
2850
|
+
int eng,l0,l0given;
|
|
2851
|
+
if (size(#)>0)
|
|
2852
|
+
{
|
|
2853
|
+
if (typeof(#[1])=="intvec")
|
|
2854
|
+
{
|
|
2855
|
+
w = #[1];
|
|
2856
|
+
}
|
|
2857
|
+
if (size(#)>1)
|
|
2858
|
+
{
|
|
2859
|
+
if(intLike(#[2]))
|
|
2860
|
+
{
|
|
2861
|
+
eng = int(#[2]);
|
|
2862
|
+
}
|
|
2863
|
+
if (size(#)>2)
|
|
2864
|
+
{
|
|
2865
|
+
if(intLike(#[3]))
|
|
2866
|
+
{
|
|
2867
|
+
l0 = int(#[3]);
|
|
2868
|
+
l0given = 1;
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
}
|
|
2873
|
+
if (!isCommutative())
|
|
2874
|
+
{
|
|
2875
|
+
ERROR("Basering must be commutative.");
|
|
2876
|
+
}
|
|
2877
|
+
int i;
|
|
2878
|
+
dbprint(ppl,"// Computing s-parametric annihilator Ann(f^s)...");
|
|
2879
|
+
def A = Sannfs(f);
|
|
2880
|
+
setring A;
|
|
2881
|
+
dbprint(ppl,"// ...done");
|
|
2882
|
+
dbprint(ppl-1,"// Got: " + string(LD));
|
|
2883
|
+
poly f = imap(save,f);
|
|
2884
|
+
if (!l0given)
|
|
2885
|
+
{
|
|
2886
|
+
dbprint(ppl,"// Computing b-function of given poly...");
|
|
2887
|
+
ideal LDf = LD,f;
|
|
2888
|
+
LDf = engine(LDf,eng);
|
|
2889
|
+
vector v = pIntersect(var(2*n+1),LDf); // BS poly of f
|
|
2890
|
+
list BS = bFactor(vec2poly(v));
|
|
2891
|
+
dbprint(ppl,"// ...done");
|
|
2892
|
+
dbprint(ppl-1,"// roots: " + string(BS[1]));
|
|
2893
|
+
dbprint(ppl-1,"// multiplicities: " + string(BS[2]));
|
|
2894
|
+
BS = intRoots(BS);
|
|
2895
|
+
intvec iv;
|
|
2896
|
+
for (i=1; i<=ncols(BS[1]); i++)
|
|
2897
|
+
{
|
|
2898
|
+
iv[i] = int(BS[1][i]);
|
|
2899
|
+
}
|
|
2900
|
+
l0 = Min(iv);
|
|
2901
|
+
kill v,iv,BS,LDf;
|
|
2902
|
+
}
|
|
2903
|
+
dbprint(ppl,"// Computing Ann(f^" + string(l0) + ")...");
|
|
2904
|
+
LD = annfspecialOld(LD,f,l0,l0); // Ann(f^l0)
|
|
2905
|
+
// VL dec 2020: since l0 is an integer, no need to update with new annfspecial
|
|
2906
|
+
// create new ring without s
|
|
2907
|
+
list RL = ringlist(A);
|
|
2908
|
+
RL = RL[1..4];
|
|
2909
|
+
list Lt = RL[2];
|
|
2910
|
+
Lt = delete(Lt,2*n+1);
|
|
2911
|
+
RL[2] = Lt;
|
|
2912
|
+
Lt = RL[3];
|
|
2913
|
+
Lt = delete(Lt,2);
|
|
2914
|
+
RL[3] = Lt;
|
|
2915
|
+
def @B = ring(RL);
|
|
2916
|
+
setring @B;
|
|
2917
|
+
def B = Weyl();
|
|
2918
|
+
setring B;
|
|
2919
|
+
kill @B;
|
|
2920
|
+
ideal LD = imap(A,LD);
|
|
2921
|
+
LD = engine(LD,eng);
|
|
2922
|
+
dbprint(ppl,"// ...done");
|
|
2923
|
+
dbprint(ppl-1,"// Got: " + string(LD));
|
|
2924
|
+
kill A;
|
|
2925
|
+
ideal DRJ = deRhamCohomIdeal(LD,w,eng);
|
|
2926
|
+
list DR = DRJ,l0;
|
|
2927
|
+
export(DR);
|
|
2928
|
+
setring save;
|
|
2929
|
+
return(B);
|
|
2930
|
+
}
|
|
2931
|
+
example
|
|
2932
|
+
{
|
|
2933
|
+
"EXAMPLE:"; echo = 2;
|
|
2934
|
+
ring r = 0,(x,y,z),dp;
|
|
2935
|
+
poly f = x^3+y^3+z^3;
|
|
2936
|
+
def A = deRhamCohom(f); // we see that the K-dim is 2
|
|
2937
|
+
setring A;
|
|
2938
|
+
DR;
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
// Appel hypergeometric functions /////////////////////////////////////////////
|
|
2942
|
+
|
|
2943
|
+
proc appelF1()
|
|
2944
|
+
"USAGE: appelF1();
|
|
2945
|
+
RETURN: ring (a parametric Weyl algebra) containing an ideal 'IAppel1'
|
|
2946
|
+
PURPOSE: defines the ideal in a parametric Weyl algebra,
|
|
2947
|
+
@* which annihilates Appel F1 hypergeometric function
|
|
2948
|
+
NOTE: The output ring is a parametric Weyl algebra. It contains an ideal
|
|
2949
|
+
@* 'IAappel1' annihilating Appel F1 hypergeometric function.
|
|
2950
|
+
@* See (SST) p. 48.
|
|
2951
|
+
EXAMPLE: example appelF1; shows example
|
|
2952
|
+
"
|
|
2953
|
+
{
|
|
2954
|
+
// Appel F1, d = b', SST p.48
|
|
2955
|
+
ring @r = (0,a,b,c,d),(x,y,Dx,Dy),(a(0,0,1,1),a(0,0,1,0),dp);
|
|
2956
|
+
def @S = Weyl();
|
|
2957
|
+
setring @S;
|
|
2958
|
+
ideal IAppel1 =
|
|
2959
|
+
(x*Dx)*(x*Dx+y*Dy+c-1) - x*(x*Dx+y*Dy+a)*(x*Dx+b),
|
|
2960
|
+
(y*Dy)*(x*Dx+y*Dy+c-1) - y*(x*Dx+y*Dy+a)*(y*Dy+d),
|
|
2961
|
+
(x-y)*Dx*Dy - d*Dx + b*Dy;
|
|
2962
|
+
export IAppel1;
|
|
2963
|
+
kill @r;
|
|
2964
|
+
return(@S);
|
|
2965
|
+
}
|
|
2966
|
+
example
|
|
2967
|
+
{
|
|
2968
|
+
"EXAMPLE:"; echo = 2;
|
|
2969
|
+
def A = appelF1();
|
|
2970
|
+
setring A;
|
|
2971
|
+
IAppel1;
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
proc appelF2()
|
|
2975
|
+
"USAGE: appelF2();
|
|
2976
|
+
RETURN: ring (a parametric Weyl algebra) containing an ideal 'IAppel2'
|
|
2977
|
+
PURPOSE: defines the ideal in a parametric Weyl algebra,
|
|
2978
|
+
@* which annihilates Appel F2 hypergeometric function
|
|
2979
|
+
NOTE: The output ring is a parametric Weyl algebra. It contains an ideal
|
|
2980
|
+
@* 'IAappel2' annihilating Appel F2 hypergeometric function.
|
|
2981
|
+
@* See (SST) p. 85.
|
|
2982
|
+
EXAMPLE: example appelF2; shows example
|
|
2983
|
+
"
|
|
2984
|
+
{
|
|
2985
|
+
// Appel F2, c = b', SST p.85
|
|
2986
|
+
ring @r = (0,a,b,c),(x,y,Dx,Dy),(a(0,0,1,1),a(0,0,1,0),dp);
|
|
2987
|
+
def @S = Weyl();
|
|
2988
|
+
setring @S;
|
|
2989
|
+
ideal IAppel2 =
|
|
2990
|
+
(x*Dx)^2 - x*(x*Dx+y*Dy+a)*(x*Dx+b),
|
|
2991
|
+
(y*Dy)^2 - y*(x*Dx+y*Dy+a)*(y*Dy+c);
|
|
2992
|
+
export IAppel2;
|
|
2993
|
+
kill @r;
|
|
2994
|
+
return(@S);
|
|
2995
|
+
}
|
|
2996
|
+
example
|
|
2997
|
+
{
|
|
2998
|
+
"EXAMPLE:"; echo = 2;
|
|
2999
|
+
def A = appelF2();
|
|
3000
|
+
setring A;
|
|
3001
|
+
IAppel2;
|
|
3002
|
+
}
|
|
3003
|
+
|
|
3004
|
+
proc appelF4()
|
|
3005
|
+
"USAGE: appelF4();
|
|
3006
|
+
RETURN: ring (a parametric Weyl algebra) containing an ideal 'IAppel4'
|
|
3007
|
+
PURPOSE: defines the ideal in a parametric Weyl algebra,
|
|
3008
|
+
@* which annihilates Appel F4 hypergeometric function
|
|
3009
|
+
NOTE: The output ring is a parametric Weyl algebra. It contains an ideal
|
|
3010
|
+
@* 'IAappel4' annihilating Appel F4 hypergeometric function.
|
|
3011
|
+
@* See (SST) p. 39.
|
|
3012
|
+
EXAMPLE: example appelF4; shows example
|
|
3013
|
+
"
|
|
3014
|
+
{
|
|
3015
|
+
// Appel F4, d = c', SST, p. 39
|
|
3016
|
+
ring @r = (0,a,b,c,d),(x,y,Dx,Dy),(a(0,0,1,1),a(0,0,1,0),dp);
|
|
3017
|
+
def @S = Weyl();
|
|
3018
|
+
setring @S;
|
|
3019
|
+
ideal IAppel4 =
|
|
3020
|
+
Dx*(x*Dx+c-1) - (x*Dx+y*Dy+a)*(x*Dx+y*Dy+b),
|
|
3021
|
+
Dy*(y*Dy+d-1) - (x*Dx+y*Dy+a)*(x*Dx+y*Dy+b);
|
|
3022
|
+
export IAppel4;
|
|
3023
|
+
kill @r;
|
|
3024
|
+
return(@S);
|
|
3025
|
+
}
|
|
3026
|
+
example
|
|
3027
|
+
{
|
|
3028
|
+
"EXAMPLE:"; echo = 2;
|
|
3029
|
+
def A = appelF4();
|
|
3030
|
+
setring A;
|
|
3031
|
+
IAppel4;
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
|
|
3035
|
+
// characteric variety ////////////////////////////////////////////////////////
|
|
3036
|
+
|
|
3037
|
+
proc charVariety(ideal I, list #)
|
|
3038
|
+
"USAGE: charVariety(I [,eng]); I an ideal, eng an optional int
|
|
3039
|
+
RETURN: ring (commutative) containing an ideal 'charVar'
|
|
3040
|
+
PURPOSE: computes an ideal whose zero set is the characteristic variety of I in
|
|
3041
|
+
@* the sense of D-module theory
|
|
3042
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
3043
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
3044
|
+
@* holds, i.e. the sequence of variables is given by
|
|
3045
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
3046
|
+
@* belonging to x(i).
|
|
3047
|
+
NOTE: The output ring is commutative. It contains an ideal 'charVar'.
|
|
3048
|
+
@* If eng<>0, @code{std} is used for Groebner basis computations,
|
|
3049
|
+
@* otherwise, and by default, @code{slimgb} is used.
|
|
3050
|
+
DISPLAY: If @code{printlevel}=1, progress debug messages will be printed,
|
|
3051
|
+
@* if @code{printlevel}>=2, all the debug messages will be printed.
|
|
3052
|
+
SEE ALSO: charInfo
|
|
3053
|
+
EXAMPLE: example charVariety; shows examples
|
|
3054
|
+
"
|
|
3055
|
+
{
|
|
3056
|
+
// assumption check is done in GBWeight
|
|
3057
|
+
int eng;
|
|
3058
|
+
if (size(#)>0)
|
|
3059
|
+
{
|
|
3060
|
+
if (intLike(#[1]))
|
|
3061
|
+
{
|
|
3062
|
+
eng = int(#[1]);
|
|
3063
|
+
}
|
|
3064
|
+
}
|
|
3065
|
+
int ppl = printlevel - voice + 2;
|
|
3066
|
+
def save = basering;
|
|
3067
|
+
int n = nvars(save) div 2;
|
|
3068
|
+
intvec uv = (0:n),(1:n);
|
|
3069
|
+
list RL = ringlist(save);
|
|
3070
|
+
list L = RL[3];
|
|
3071
|
+
L = insert(L,list("a",uv));
|
|
3072
|
+
RL[3] = L;
|
|
3073
|
+
// TODO printlevel
|
|
3074
|
+
def Ra = ring(RL);
|
|
3075
|
+
setring Ra;
|
|
3076
|
+
dbprint(ppl,"// Starting Groebner basis computation...");
|
|
3077
|
+
ideal I = imap(save,I);
|
|
3078
|
+
I = engine(I,eng);
|
|
3079
|
+
dbprint(ppl,"// ... done.");
|
|
3080
|
+
dbprint(ppl-1,"// Got: " + string(I));
|
|
3081
|
+
setring save;
|
|
3082
|
+
RL = ringlist(save);
|
|
3083
|
+
RL = RL[1..4];
|
|
3084
|
+
def newR = ring(RL);
|
|
3085
|
+
setring newR;
|
|
3086
|
+
ideal charVar = imap(Ra,I);
|
|
3087
|
+
charVar = inForm(charVar,uv);
|
|
3088
|
+
// charVar = groebner(charVar);
|
|
3089
|
+
export(charVar);
|
|
3090
|
+
setring save;
|
|
3091
|
+
return(newR);
|
|
3092
|
+
}
|
|
3093
|
+
example
|
|
3094
|
+
{
|
|
3095
|
+
"EXAMPLE:"; echo = 2;
|
|
3096
|
+
ring r = 0,(x,y),Dp;
|
|
3097
|
+
poly F = x3-y2;
|
|
3098
|
+
printlevel = 0;
|
|
3099
|
+
def A = annfs(F);
|
|
3100
|
+
setring A; // Weyl algebra
|
|
3101
|
+
LD; // the annihilator of F
|
|
3102
|
+
def CA = charVariety(LD);
|
|
3103
|
+
setring CA; CA; // commutative ring
|
|
3104
|
+
charVar;
|
|
3105
|
+
dim(std(charVar)); // hence I is holonomic
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
proc charInfo(ideal I)
|
|
3109
|
+
"USAGE: charInfo(I); I an ideal
|
|
3110
|
+
RETURN: ring (commut.) containing ideals 'charVar','singLoc' and list 'primDec'
|
|
3111
|
+
PURPOSE: computes characteristic variety of I (in the sense of D-module theory),
|
|
3112
|
+
@* its singular locus and primary decomposition
|
|
3113
|
+
ASSUME: The basering is the n-th Weyl algebra over a field of characteristic 0
|
|
3114
|
+
@* and for all 1<=i<=n the identity var(i+n)*var(i)=var(i)*var(i+1)+1
|
|
3115
|
+
@* holds, i.e. the sequence of variables is given by
|
|
3116
|
+
@* x(1),...,x(n),D(1),...,D(n), where D(i) is the differential operator
|
|
3117
|
+
@* belonging to x(i).
|
|
3118
|
+
NOTE: In the output ring, which is commutative:
|
|
3119
|
+
@* - the ideal 'charVar' is the characteristic variety char(I),
|
|
3120
|
+
@* - the ideal 'SingLoc' is the singular locus of char(I),
|
|
3121
|
+
@* - the list 'primDec' is the primary decomposition of char(I).
|
|
3122
|
+
DISPLAY: If @code{printlevel}=1, progress debug messages will be printed,
|
|
3123
|
+
@* if @code{printlevel}>=2, all the debug messages will be printed.
|
|
3124
|
+
EXAMPLE: example charInfo; shows examples
|
|
3125
|
+
"
|
|
3126
|
+
{
|
|
3127
|
+
int ppl = printlevel - voice + 2;
|
|
3128
|
+
def save = basering;
|
|
3129
|
+
dbprint(ppl,"// computing characteristic variety...");
|
|
3130
|
+
def A = charVariety(I);
|
|
3131
|
+
setring A;
|
|
3132
|
+
dbprint(ppl,"// ...done");
|
|
3133
|
+
dbprint(ppl-1,"// Got: " + string(charVar));
|
|
3134
|
+
dbprint(ppl,"// computing singular locus...");
|
|
3135
|
+
ideal singLoc = slocus(charVar);
|
|
3136
|
+
singLoc = groebner(singLoc);
|
|
3137
|
+
dbprint(ppl,"// ...done");
|
|
3138
|
+
dbprint(ppl-1,"// Got: " + string(singLoc));
|
|
3139
|
+
dbprint(ppl,"// computing primary decomposition...");
|
|
3140
|
+
list primDec = primdecGTZ(charVar);
|
|
3141
|
+
dbprint(ppl,"// ...done");
|
|
3142
|
+
//export(charVar,singLoc,primDec);
|
|
3143
|
+
export(singLoc,primDec);
|
|
3144
|
+
setring save;
|
|
3145
|
+
return(A);
|
|
3146
|
+
}
|
|
3147
|
+
example
|
|
3148
|
+
{
|
|
3149
|
+
"EXAMPLE:"; echo = 2;
|
|
3150
|
+
ring r = 0,(x,y),Dp;
|
|
3151
|
+
poly F = x3-y2;
|
|
3152
|
+
printlevel = 0;
|
|
3153
|
+
def A = annfs(F);
|
|
3154
|
+
setring A; // Weyl algebra
|
|
3155
|
+
LD; // the annihilator of F
|
|
3156
|
+
def CA = charInfo(LD);
|
|
3157
|
+
setring CA; CA; // commutative ring
|
|
3158
|
+
charVar; // characteristic variety
|
|
3159
|
+
singLoc; // singular locus
|
|
3160
|
+
primDec; // primary decomposition
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
|
|
3164
|
+
// examples ///////////////////////////////////////////////////////////////////
|
|
3165
|
+
|
|
3166
|
+
/*
|
|
3167
|
+
static proc exCusp()
|
|
3168
|
+
{
|
|
3169
|
+
"EXAMPLE:"; echo = 2;
|
|
3170
|
+
ring r = 0,(x,y,Dx,Dy),dp;
|
|
3171
|
+
def R = Weyl(); setring R;
|
|
3172
|
+
poly F = x2-y3;
|
|
3173
|
+
ideal I = (y^3 - x^2)*Dx - 2*x, (y^3 - x^2)*Dy + 3*y^2; // I = Dx*F, Dy*F;
|
|
3174
|
+
def W = SDLoc(I,F);
|
|
3175
|
+
setring W;
|
|
3176
|
+
LD;
|
|
3177
|
+
def U = DLoc0(LD,x2-y3);
|
|
3178
|
+
setring U;
|
|
3179
|
+
LD0;
|
|
3180
|
+
BS;
|
|
3181
|
+
// the same with DLoc:
|
|
3182
|
+
setring R;
|
|
3183
|
+
DLoc(I,F);
|
|
3184
|
+
}
|
|
3185
|
+
|
|
3186
|
+
static proc exWalther1()
|
|
3187
|
+
{
|
|
3188
|
+
// p.18 Rem 3.10
|
|
3189
|
+
ring r = 0,(x,Dx),dp;
|
|
3190
|
+
def R = nc_algebra(1,1);
|
|
3191
|
+
setring R;
|
|
3192
|
+
poly F = x;
|
|
3193
|
+
ideal I = x*Dx+1;
|
|
3194
|
+
def W = SDLoc(I,F);
|
|
3195
|
+
setring W;
|
|
3196
|
+
LD;
|
|
3197
|
+
ideal J = LD, x;
|
|
3198
|
+
eliminate(J,x*Dx); // must be [1]=s // agree!
|
|
3199
|
+
// the same result with Dloc0:
|
|
3200
|
+
def U = DLoc0(LD,x);
|
|
3201
|
+
setring U;
|
|
3202
|
+
LD0;
|
|
3203
|
+
BS;
|
|
3204
|
+
}
|
|
3205
|
+
|
|
3206
|
+
static proc exWalther2()
|
|
3207
|
+
{
|
|
3208
|
+
// p.19 Rem 3.10 cont'd
|
|
3209
|
+
ring r = 0,(x,Dx),dp;
|
|
3210
|
+
def R = nc_algebra(1,1);
|
|
3211
|
+
setring R;
|
|
3212
|
+
poly F = x;
|
|
3213
|
+
ideal I = (x*Dx)^2+1;
|
|
3214
|
+
def W = SDLoc(I,F);
|
|
3215
|
+
setring W;
|
|
3216
|
+
LD;
|
|
3217
|
+
ideal J = LD, x;
|
|
3218
|
+
eliminate(J,x*Dx); // must be [1]=s^2+2*s+2 // agree!
|
|
3219
|
+
// the same result with Dloc0:
|
|
3220
|
+
def U = DLoc0(LD,x);
|
|
3221
|
+
setring U;
|
|
3222
|
+
LD0;
|
|
3223
|
+
BS;
|
|
3224
|
+
// almost the same with DLoc
|
|
3225
|
+
setring R;
|
|
3226
|
+
DLoc(I,F);
|
|
3227
|
+
}
|
|
3228
|
+
|
|
3229
|
+
static proc exWalther3()
|
|
3230
|
+
{
|
|
3231
|
+
// can check with annFs too :-)
|
|
3232
|
+
// p.21 Ex 3.15
|
|
3233
|
+
LIB "nctools.lib";
|
|
3234
|
+
ring r = 0,(x,y,z,w,Dx,Dy,Dz,Dw),dp;
|
|
3235
|
+
def R = Weyl();
|
|
3236
|
+
setring R;
|
|
3237
|
+
poly F = x2+y2+z2+w2;
|
|
3238
|
+
ideal I = Dx,Dy,Dz,Dw;
|
|
3239
|
+
def W = SDLoc(I,F);
|
|
3240
|
+
setring W;
|
|
3241
|
+
LD;
|
|
3242
|
+
ideal J = LD, x2+y2+z2+w2;
|
|
3243
|
+
eliminate(J,x*y*z*w*Dx*Dy*Dz*Dw); // must be [1]=s^2+3*s+2 // agree
|
|
3244
|
+
ring r2 = 0,(x,y,z,w),dp;
|
|
3245
|
+
poly F = x2+y2+z2+w2;
|
|
3246
|
+
def Z = annfs(F);
|
|
3247
|
+
setring Z;
|
|
3248
|
+
LD;
|
|
3249
|
+
BS;
|
|
3250
|
+
// the same result with Dloc0:
|
|
3251
|
+
setring W;
|
|
3252
|
+
def U = DLoc0(LD,x2+y2+z2+w2);
|
|
3253
|
+
setring U;
|
|
3254
|
+
LD0; BS;
|
|
3255
|
+
// the same result with DLoc:
|
|
3256
|
+
setring R;
|
|
3257
|
+
DLoc(I,F);
|
|
3258
|
+
}
|
|
3259
|
+
|
|
3260
|
+
static proc ex_annRat()
|
|
3261
|
+
{
|
|
3262
|
+
// more complicated example for annRat
|
|
3263
|
+
ring r = 0,(x,y,z),dp;
|
|
3264
|
+
poly f = x3+y3+z3; // mir = -2
|
|
3265
|
+
poly g = x*y*z;
|
|
3266
|
+
def A = annRat(g,f);
|
|
3267
|
+
setring A;
|
|
3268
|
+
}
|
|
3269
|
+
*/
|