passagemath-singular 10.6.31rc3__cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_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-gnu.so +0 -0
- passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
- passagemath_singular-10.6.31rc3.dist-info/RECORD +491 -0
- passagemath_singular-10.6.31rc3.dist-info/WHEEL +6 -0
- passagemath_singular-10.6.31rc3.dist-info/top_level.txt +3 -0
- passagemath_singular.libs/libSingular-4-20aec911.4.1.so +0 -0
- passagemath_singular.libs/libcddgmp-21acf0c6.so.0.1.3 +0 -0
- passagemath_singular.libs/libfactory-4-fcee31da.4.1.so +0 -0
- passagemath_singular.libs/libflint-66e12231.so.21.0.0 +0 -0
- passagemath_singular.libs/libgf2x-a4cdec90.so.3.0.0 +0 -0
- passagemath_singular.libs/libgfortran-83c28eba.so.5.0.0 +0 -0
- passagemath_singular.libs/libgmp-6e109695.so.10.5.0 +0 -0
- passagemath_singular.libs/libgsl-cda90e79.so.28.0.0 +0 -0
- passagemath_singular.libs/libmpfr-82690d50.so.6.2.1 +0 -0
- passagemath_singular.libs/libntl-e6f0d543.so.44.0.1 +0 -0
- passagemath_singular.libs/libomalloc-0-5c9e866e.9.6.so +0 -0
- passagemath_singular.libs/libopenblasp-r0-6dcb67f9.3.29.so +0 -0
- passagemath_singular.libs/libpolys-4-5c0a87e0.4.1.so +0 -0
- passagemath_singular.libs/libquadmath-2284e583.so.0.0.0 +0 -0
- passagemath_singular.libs/libreadline-ea270e21.so.8.2 +0 -0
- passagemath_singular.libs/libsingular_resources-4-a1aafc6d.4.1.so +0 -0
- passagemath_singular.libs/libtinfo-ceb117d9.so.6.3 +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-gnu.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-gnu.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-gnu.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-gnu.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-gnu.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-gnu.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-gnu.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-gnu.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
- sage/algebras/quatalg/quaternion_algebra_element.cpython-314-x86_64-linux-gnu.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-gnu.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-gnu.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-gnu.so +0 -0
- sage/libs/singular/option.pyx +671 -0
- sage/libs/singular/polynomial.cpython-314-x86_64-linux-gnu.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-gnu.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-gnu.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-gnu.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-gnu.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-gnu.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-gnu.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-gnu.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-gnu.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,1542 @@
|
|
|
1
|
+
////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version VecField.lib 4.1.1.0 Feb_2019 "; //$Id: fc7d58881d25cc4c962761fddf50dc31ec94eaf9 $
|
|
3
|
+
category="Non-commutative Algebra";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: VecField.lib vector fields, with algorithms for
|
|
6
|
+
jordan and diagonal forms
|
|
7
|
+
AUTHORS: Adrian Rettich, rettich@mathematik.uni-kl.de
|
|
8
|
+
Raul Epure, epure@mathematik.uni-kl.de
|
|
9
|
+
REFERENCES: [1] Kyoji Saito, Quasihomogene isolierte
|
|
10
|
+
Singularitaeten von Hyperflaechen, 1971
|
|
11
|
+
OVERVIEW:
|
|
12
|
+
|
|
13
|
+
Implements a class VecField, represented by a vector.
|
|
14
|
+
For example, 'VecField V = [x3,xy]' declares the vector field
|
|
15
|
+
v = x3 d_x+xy d_y. Instead of a vector, an nx1 matrix is also
|
|
16
|
+
accepted. The vector can be recovered as V.vec.
|
|
17
|
+
Supports coordinate transformations (via maps), which are
|
|
18
|
+
represented by tracking a map 'V.coordinates' which maps
|
|
19
|
+
the standard coordinates to those in which V is currently
|
|
20
|
+
represented. V.dimension stores the vector field's dimension,
|
|
21
|
+
which is just nvars(basering), and V.lin yields the linear part
|
|
22
|
+
of V. You may set an additional parameter V.precision,
|
|
23
|
+
which dictates the degree to which operations on the
|
|
24
|
+
vector field should be exact.
|
|
25
|
+
The default precision is 1. Precision is preserved across
|
|
26
|
+
transformations, additions, and all other manipulations
|
|
27
|
+
of vector fields.
|
|
28
|
+
|
|
29
|
+
PROCEDURES:
|
|
30
|
+
|
|
31
|
+
applyVecField(VecField V, ..., [int n]); apply V to a poly p / an ideal I as an operator;
|
|
32
|
+
you can also use 'V*p'/'V*I'. If an integer n is passed,
|
|
33
|
+
consider V up to degree n.
|
|
34
|
+
|
|
35
|
+
changeCoordinates(VecField V, map psi); transform V by psi; you can also use 'V*phi'
|
|
36
|
+
|
|
37
|
+
jordanVecField(VecField V); transform V s.t. the linear part is in Jordan normal form
|
|
38
|
+
|
|
39
|
+
diagonalizeVecFieldLin(list l); l a list of VecFields. Change coordinates s.t. all
|
|
40
|
+
linear parts are diagonal simultaneously.
|
|
41
|
+
|
|
42
|
+
SaitoBase(VecField V); algorithm to find a basis where the semisimple
|
|
43
|
+
and nilpotent parts are easily read off
|
|
44
|
+
|
|
45
|
+
diagonalizeVecField(list l); diagonalize all VecFields in l simultaneously
|
|
46
|
+
|
|
47
|
+
vecFieldToMatrix(VecField V,ideal W); matrix representation of V in the basis W
|
|
48
|
+
|
|
49
|
+
decomposeVecField(...); split a vectorfield V / all entries of a list of
|
|
50
|
+
vectorfields l into semisimple and nilpotent components
|
|
51
|
+
|
|
52
|
+
diagonalizeMatrixSimul(list l); find transformation which simultaneously diagonalizes
|
|
53
|
+
all matrices in l
|
|
54
|
+
|
|
55
|
+
invertAlgebraMorphism(map p,int n); return inverse of p exact up to degree n
|
|
56
|
+
";
|
|
57
|
+
|
|
58
|
+
LIB "polylib.lib";
|
|
59
|
+
LIB "linalg.lib";
|
|
60
|
+
LIB "matrix.lib";
|
|
61
|
+
LIB "arr.lib";
|
|
62
|
+
|
|
63
|
+
/////////////////////////////////////////////////////////////
|
|
64
|
+
|
|
65
|
+
// CONSTRUCTOR
|
|
66
|
+
|
|
67
|
+
static proc mod_init()
|
|
68
|
+
{
|
|
69
|
+
// dimension: dimension of the vector field (taken from basering)
|
|
70
|
+
// vec: coefficients of the new vector field, a (dimension)x1 matrix
|
|
71
|
+
// lin: the linear part of the vector field
|
|
72
|
+
// coordinates: a map phi:basering --> basering mapping the standard
|
|
73
|
+
// coordinates to those in which the VecField is represented
|
|
74
|
+
// precision: default degree up to which calculations shall be
|
|
75
|
+
// exact. precision=-1 means infinity
|
|
76
|
+
newstruct("VecField","int dimension,matrix vec,matrix lin,map coordinates,int precision");
|
|
77
|
+
// override operators:
|
|
78
|
+
system("install","VecField","=",defvecfield,1);
|
|
79
|
+
system("install","VecField","==",eqvecfield,2);
|
|
80
|
+
system("install","VecField","!=",ineqvecfield,2);
|
|
81
|
+
system("install","VecField",">",cmpvecfield,2);
|
|
82
|
+
system("install","VecField","<",cmpvecfield,2);
|
|
83
|
+
system("install","VecField","+",addvecfield,2);
|
|
84
|
+
system("install","VecField","-",subvecfield,2);
|
|
85
|
+
system("install","VecField","*",VecFieldMult,2);
|
|
86
|
+
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// PROCEDURES
|
|
90
|
+
|
|
91
|
+
static proc defvecfield(v)
|
|
92
|
+
"
|
|
93
|
+
USAGE: defvecfield(vector v), where v are the coefficients of the vector field
|
|
94
|
+
RETURN: new vector field of same dimension as base ring
|
|
95
|
+
ASSUME: v has at most nvars() entries
|
|
96
|
+
NOTE: if you want a different precision than the default of 1, manually set V.precision
|
|
97
|
+
after declaration.
|
|
98
|
+
"
|
|
99
|
+
{
|
|
100
|
+
VecField V;
|
|
101
|
+
// dimension: automatically the same as the base ring
|
|
102
|
+
V.dimension = nvars(basering);
|
|
103
|
+
if(nrows(v) > V.dimension)
|
|
104
|
+
{
|
|
105
|
+
ERROR("ERROR in defvecfield: vector should have at most nvars() entries");
|
|
106
|
+
}
|
|
107
|
+
// if vector has fewer entries than expected, fill with zeroes.
|
|
108
|
+
matrix vtemp[V.dimension][1];
|
|
109
|
+
for(int i=1;i<=nrows(v);i++)
|
|
110
|
+
{
|
|
111
|
+
if(typeof(v) == "vector")
|
|
112
|
+
{
|
|
113
|
+
vtemp[i,1] = v[i];
|
|
114
|
+
}
|
|
115
|
+
else
|
|
116
|
+
{
|
|
117
|
+
if(typeof(v) == "matrix")
|
|
118
|
+
{
|
|
119
|
+
vtemp[i,1] = v[i,1];
|
|
120
|
+
}
|
|
121
|
+
else
|
|
122
|
+
{
|
|
123
|
+
ERROR("ERROR while defining VecField: right-handside must be a vector or matrix");
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
V.vec = vtemp;
|
|
128
|
+
|
|
129
|
+
// V.lin is just the linear part of the jacobian of v
|
|
130
|
+
V.lin = jet(jacob(ideal(v)),0);
|
|
131
|
+
if(ncols(V.lin) < V.dimension || nrows(V.lin) < V.dimension)
|
|
132
|
+
{
|
|
133
|
+
V.lin = extendMatrix(V.lin,V.dimension,V.dimension);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// coordinates: start out with the base coordinates, i.e. the identity map
|
|
137
|
+
V.coordinates = identityMap();
|
|
138
|
+
|
|
139
|
+
// set default precision to 1
|
|
140
|
+
V.precision = 1;
|
|
141
|
+
|
|
142
|
+
return(V);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static proc addvecfield(VecField V,VecField W)
|
|
146
|
+
"
|
|
147
|
+
USAGE: addvecfield(VecField V,VecField W)
|
|
148
|
+
ASSUME: V and W are of same dimension
|
|
149
|
+
RETURN: new vector field V+W
|
|
150
|
+
NOTE: if V,W have different coordinate maps, this converts W to the same
|
|
151
|
+
coordinates as V. If V,W have different precision,
|
|
152
|
+
the precision of V is used.
|
|
153
|
+
"
|
|
154
|
+
{
|
|
155
|
+
if(V.dimension != W.dimension)
|
|
156
|
+
{
|
|
157
|
+
ERROR("ERROR in addvecfield: vector fields must be of same dimension");
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if(! eqMap(V.coordinates,W.coordinates))
|
|
161
|
+
{
|
|
162
|
+
map f = invertAlgebraMorphism(W.coordinates,V.precision);
|
|
163
|
+
map g = V.coordinates;
|
|
164
|
+
map h = g(f);
|
|
165
|
+
VecField WW = changeCoordinates(W,h);
|
|
166
|
+
matrix newV = V.vec + WW.vec;
|
|
167
|
+
VecField N = [newV[1..nrows(newV),1]];
|
|
168
|
+
N.precision = V.precision;
|
|
169
|
+
N.coordinates = V.coordinates;
|
|
170
|
+
return(N);
|
|
171
|
+
}
|
|
172
|
+
else
|
|
173
|
+
{
|
|
174
|
+
matrix newV = V.vec+W.vec;
|
|
175
|
+
VecField N = [newV[1..nrows(newV),1]];
|
|
176
|
+
N.precision = V.precision;
|
|
177
|
+
N.coordinates = V.coordinates;
|
|
178
|
+
return(N);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
static proc subvecfield(VecField V,VecField W)
|
|
183
|
+
"
|
|
184
|
+
USAGE: subvecfield(VecField V,VecField W)
|
|
185
|
+
ASSUME: V,W have same dimension
|
|
186
|
+
RETURN: new vector field V-W
|
|
187
|
+
NOTE: if V,W have different coordinate maps, this converts W to the same
|
|
188
|
+
coordinates as V. If V,W have different precision, the precision of V is used.
|
|
189
|
+
"
|
|
190
|
+
{
|
|
191
|
+
if(V.dimension == W.dimension)
|
|
192
|
+
{
|
|
193
|
+
matrix newV = -W.vec;
|
|
194
|
+
VecField N = [newV[1..nrows(newV),1]];
|
|
195
|
+
N.coordinates = W.coordinates;
|
|
196
|
+
N.precision = W.precision;
|
|
197
|
+
return(addvecfield(V,N));
|
|
198
|
+
}
|
|
199
|
+
else
|
|
200
|
+
{
|
|
201
|
+
ERROR("ERROR in subvecfield: vector fields must be of same dimension");
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
static proc VecFieldMult(VecField V,p)
|
|
205
|
+
{
|
|
206
|
+
if(typeof(p) == "VecField")
|
|
207
|
+
{
|
|
208
|
+
return(liebracket(V,p));
|
|
209
|
+
}
|
|
210
|
+
else
|
|
211
|
+
{
|
|
212
|
+
if((typeof(p) == "poly") or (typeof(p) == "ideal"))
|
|
213
|
+
{
|
|
214
|
+
return(applyVecField(V,p));
|
|
215
|
+
}
|
|
216
|
+
else
|
|
217
|
+
{
|
|
218
|
+
if(typeof(p) == "map")
|
|
219
|
+
{
|
|
220
|
+
return(changeCoordinates(V,p));
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
ERROR("ERROR in multiplying VecField: right-hand side
|
|
225
|
+
must be of type VecField, poly, or ideal");
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
static proc liebracket(VecField V,VecField W)
|
|
229
|
+
"
|
|
230
|
+
USAGE: liebracket(VecField V,VecField W)
|
|
231
|
+
ASSUME: linear parts of V and W have same dimension as matrices,
|
|
232
|
+
and V,W are given in the same coordinates
|
|
233
|
+
RETURN: [V,W]
|
|
234
|
+
NOTE: precision is taken from V.
|
|
235
|
+
"
|
|
236
|
+
{
|
|
237
|
+
if(nrows(V.lin)!=nrows(W.lin) || ncols(V.lin)!=ncols(W.lin))
|
|
238
|
+
{
|
|
239
|
+
ERROR("error in liebracket: dimensions must agree");
|
|
240
|
+
}
|
|
241
|
+
if(! eqMap(V.coordinates,W.coordinates))
|
|
242
|
+
{
|
|
243
|
+
ERROR("error in liebracket: coordinate systems must be the same");
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
matrix A = jacob(ideal(V.vec))*W.vec -jacob(ideal(W.vec))*V.vec;
|
|
247
|
+
vector v = A[1];
|
|
248
|
+
VecField X = v;
|
|
249
|
+
X.coordinates = V.coordinates;
|
|
250
|
+
X.precision = V.precision;
|
|
251
|
+
return(X);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
static proc cmpvecfield(VecField V,VecField W)
|
|
255
|
+
"
|
|
256
|
+
USAGE: cmpvecfield(VecField V,VecField W)
|
|
257
|
+
RETURN: 0 if V==W, -1 if dimensions are different, 1 otherwise
|
|
258
|
+
"
|
|
259
|
+
{
|
|
260
|
+
if(V.dimension != W.dimension)
|
|
261
|
+
{
|
|
262
|
+
return(-1);
|
|
263
|
+
}
|
|
264
|
+
if(V.vec == W.vec)
|
|
265
|
+
{
|
|
266
|
+
if(eqMap(V.coordinates,W.coordinates))
|
|
267
|
+
{
|
|
268
|
+
return(0);
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return(1);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
static proc eqvecfield(VecField V,VecField W)
|
|
275
|
+
"
|
|
276
|
+
USAGE: eqvecfield(VecField V,VecField W)
|
|
277
|
+
RETURN: 1 if V==W, 0 otherwise
|
|
278
|
+
"
|
|
279
|
+
{
|
|
280
|
+
return(cmpvecfield(V,W)==0);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
static proc ineqvecfield(VecField V,VecField W)
|
|
284
|
+
"
|
|
285
|
+
USAGE: ineqvecfield(VecField V,VecField W)
|
|
286
|
+
RETURN: 0 if V==W, 1 otherwise
|
|
287
|
+
"
|
|
288
|
+
{
|
|
289
|
+
return(!eqvecfield(V,W));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
proc applyVecField(VecField V,p,list #)
|
|
294
|
+
"
|
|
295
|
+
USAGE: applyVecField(VecField V, poly/ideal p [,int n])
|
|
296
|
+
RETURN: if p is a polynomial, return a polynomial V(p), if p is an ideal, the ideal V(p).
|
|
297
|
+
If an optional n is given, only the parts of V up to and including degree n are
|
|
298
|
+
applied to p.
|
|
299
|
+
EXAMPLE: example applyVecField
|
|
300
|
+
"
|
|
301
|
+
{
|
|
302
|
+
int n = -1;
|
|
303
|
+
if(size(#) > 0)
|
|
304
|
+
{
|
|
305
|
+
if(typeof(#[1]) == "int")
|
|
306
|
+
{
|
|
307
|
+
n = #[1];
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if(typeof(p) == "poly")
|
|
312
|
+
{
|
|
313
|
+
poly q = 0;
|
|
314
|
+
for(int j=1;j<=V.dimension;j++)
|
|
315
|
+
{
|
|
316
|
+
if(n == -1)
|
|
317
|
+
{
|
|
318
|
+
q = q+V.vec[j,1]*diff(p,var(j));
|
|
319
|
+
}
|
|
320
|
+
else
|
|
321
|
+
{
|
|
322
|
+
q = q+jet(V.vec[j,1],n)*diff(p,var(j));
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return(q);
|
|
326
|
+
}
|
|
327
|
+
else
|
|
328
|
+
{
|
|
329
|
+
if(typeof(p) != "ideal")
|
|
330
|
+
{
|
|
331
|
+
ERROR("ERROR in applyVecField: p must be of type poly or ideal");
|
|
332
|
+
}
|
|
333
|
+
ideal J = 0;
|
|
334
|
+
for(int j=1;j<=ncols(p);j++)
|
|
335
|
+
{
|
|
336
|
+
J = (J,applyVecField(V,p[j],n));
|
|
337
|
+
}
|
|
338
|
+
J = J[2..ncols(J)]; // delete the leading '0' generator
|
|
339
|
+
return(J);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
example
|
|
343
|
+
{
|
|
344
|
+
"EXAMPLE: "; echo = 2;
|
|
345
|
+
int oldp = printlevel;
|
|
346
|
+
printlevel = 1;
|
|
347
|
+
ring r = 0, (x, y, z),ds;
|
|
348
|
+
vector v = [-1,-1,-1];
|
|
349
|
+
VecField V = v;
|
|
350
|
+
poly f = x3+2y3+xz2;
|
|
351
|
+
poly g = V*f;
|
|
352
|
+
ideal I = (x2,y);
|
|
353
|
+
ideal J = V*I;
|
|
354
|
+
printlevel = oldp;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
proc changeCoordinates(VecField V, map psi)
|
|
358
|
+
"
|
|
359
|
+
USAGE: changeCoordinates(vecField V, map psi), where psi is an algebra morphism
|
|
360
|
+
k[x1,...,xn]->k[y1,...,ym] expressing the new basis in terms of the old.
|
|
361
|
+
RETURN: A new vecfield in the new coordinates.
|
|
362
|
+
NOTE: the coordinate change necessitates inverting psi.
|
|
363
|
+
The inversion will be correct up to the precision of V.
|
|
364
|
+
EXAMPLE: example changeCoordinates
|
|
365
|
+
"
|
|
366
|
+
{
|
|
367
|
+
|
|
368
|
+
int n = V.precision;
|
|
369
|
+
map prevcoords = V.coordinates;
|
|
370
|
+
map prevcoordsinv = invertAlgebraMorphism(prevcoords,n);
|
|
371
|
+
map psiinv = invertAlgebraMorphism(psi,n);
|
|
372
|
+
map compo = psi(prevcoords);
|
|
373
|
+
map compoinv = prevcoordsinv(psiinv);
|
|
374
|
+
|
|
375
|
+
ideal p = maxideal(1);
|
|
376
|
+
ideal F = psiinv(p);
|
|
377
|
+
ideal G = substitute(V.vec,p,F);
|
|
378
|
+
ideal H = G;
|
|
379
|
+
matrix m[nvars(basering)][1] = H[1..ncols(H)];
|
|
380
|
+
|
|
381
|
+
matrix JacIntermittent = jacob(ideal(psi));
|
|
382
|
+
matrix Jac = substitute(JacIntermittent,p,F);
|
|
383
|
+
|
|
384
|
+
matrix result = Jac*m;
|
|
385
|
+
if(V.precision>=0)
|
|
386
|
+
{
|
|
387
|
+
result = jet(result,V.precision);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
VecField W = [result[1..nrows(result),1]];
|
|
391
|
+
ideal newcoords = ideal(prevcoords(psi));
|
|
392
|
+
if(V.precision>=0)
|
|
393
|
+
{
|
|
394
|
+
newcoords = jet(newcoords,V.precision);
|
|
395
|
+
}
|
|
396
|
+
map newmap = basering,newcoords;
|
|
397
|
+
W.coordinates = newmap;
|
|
398
|
+
W.precision = V.precision;
|
|
399
|
+
|
|
400
|
+
return(W);
|
|
401
|
+
}
|
|
402
|
+
example
|
|
403
|
+
{
|
|
404
|
+
"EXAMPLE: "; echo = 2;
|
|
405
|
+
ring r = 0, (x, y, z),ds;
|
|
406
|
+
vector v = [-1,-1,-1];
|
|
407
|
+
VecField V = v;
|
|
408
|
+
V.precision = 4;
|
|
409
|
+
map phi = r, x-2y2+z3,2y+y3+z,z;
|
|
410
|
+
VecField W = changeCoordinates(V,phi);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
proc jordanVecField(VecField V)
|
|
415
|
+
"
|
|
416
|
+
USAGE: jordanVecField(VecField V)
|
|
417
|
+
RETURN: new vecfield W in coordinates s.t. W.lin is in Jordan normal
|
|
418
|
+
form.
|
|
419
|
+
ASSUME: eigenvalues of V.lin in basefield.
|
|
420
|
+
EXAMPLE: example jordanVecField
|
|
421
|
+
"
|
|
422
|
+
{
|
|
423
|
+
list l = jordanbasis(V.lin); // l[1] is the transformation matrix
|
|
424
|
+
matrix trafoMat = inverse(l[1]);
|
|
425
|
+
// SINGULAR puts the ones below the diagonal, just like we want
|
|
426
|
+
matrix v = pvector();
|
|
427
|
+
matrix X = trafoMat*v;
|
|
428
|
+
vector x = [X[1..nrows(X),1]];
|
|
429
|
+
ideal J = transpose(x);
|
|
430
|
+
map j = basering,J;
|
|
431
|
+
VecField W = changeCoordinates(V,j);
|
|
432
|
+
W.precision = V.precision;
|
|
433
|
+
return(W);
|
|
434
|
+
}
|
|
435
|
+
example
|
|
436
|
+
{
|
|
437
|
+
"EXAMPLE: "; echo = 2;
|
|
438
|
+
ring r = 0, (x, y, z),ds;
|
|
439
|
+
vector v = [-1,-1,-1];
|
|
440
|
+
VecField V = v;
|
|
441
|
+
V.precision = 4;
|
|
442
|
+
map phi = r, x-2y2+z3,2y+y3+z,z;
|
|
443
|
+
VecField W = changeCoordinates(V,phi);
|
|
444
|
+
VecField X = jordanVecField(W);
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
proc diagonalizeVecFieldLin(list #)
|
|
448
|
+
"
|
|
449
|
+
USAGE: diagonalizeVecFieldLin(list l), where l is a list of VecFields
|
|
450
|
+
RETURN: list W of the same VecFields in new coords s.t. the linear parts are diagonal,
|
|
451
|
+
all in the same coordinates
|
|
452
|
+
ASSUME: All linear parts of the entries of l are simultaneously diagonalizable.
|
|
453
|
+
EXAMPLE: example diagonalizeVecFieldLin
|
|
454
|
+
"
|
|
455
|
+
{
|
|
456
|
+
list l = #;
|
|
457
|
+
list matrices;
|
|
458
|
+
int i;
|
|
459
|
+
for(i=1;i<=size(l);i++)
|
|
460
|
+
{
|
|
461
|
+
matrices = insert(matrices,l[i].lin,size(matrices));
|
|
462
|
+
}
|
|
463
|
+
matrix diagtrafo = diagonalizeMatrixSimul(matrices);
|
|
464
|
+
|
|
465
|
+
matrix trafo = inverse(diagtrafo)*pvector();
|
|
466
|
+
ideal I = (transpose(trafo));
|
|
467
|
+
|
|
468
|
+
map coordChange = basering,I;
|
|
469
|
+
|
|
470
|
+
list W;
|
|
471
|
+
VecField temp;
|
|
472
|
+
for(i=1;i<=size(l);i++)
|
|
473
|
+
{
|
|
474
|
+
temp = changeCoordinates(l[i],coordChange);
|
|
475
|
+
W = insert(W,temp,size(W));
|
|
476
|
+
}
|
|
477
|
+
return(W);
|
|
478
|
+
}
|
|
479
|
+
example
|
|
480
|
+
{
|
|
481
|
+
"EXAMPLE: "; echo = 2;
|
|
482
|
+
ring r = 0, (x, y, z),ds;
|
|
483
|
+
vector v = [-1,-1,-1];
|
|
484
|
+
VecField V = v;
|
|
485
|
+
V.precision = 4;
|
|
486
|
+
map phi = r, x-2y2+z3,2y+y3+z,z;
|
|
487
|
+
VecField W = changeCoordinates(V,phi);
|
|
488
|
+
VecField X = [-2,1,0];
|
|
489
|
+
list d = diagonalizeVecFieldLin(W,X);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
|
|
493
|
+
proc SaitoBase(VecField V)
|
|
494
|
+
"
|
|
495
|
+
USAGE: SaitoBase(VecField V)
|
|
496
|
+
RETURN: new VecField W in the base from [1] thm. 3.1, where semisimple and
|
|
497
|
+
nilpotent components are easily read off.
|
|
498
|
+
NOTE: the algorithm requires inversions of algebra morphisms. These will be
|
|
499
|
+
exact to the precision of V. Warning: The algorithm assumes
|
|
500
|
+
standard coordinates. If V is not given in standard coordinates, it will
|
|
501
|
+
be converted to standard coordinates, but not converted back at the end,
|
|
502
|
+
so the resulting transformation is from standard coordinates to the
|
|
503
|
+
Saito coordinates. If you want the entire transformation from your original
|
|
504
|
+
coordinates to the Saito ones, add the inverse of your original coordinate
|
|
505
|
+
transformation manually.
|
|
506
|
+
Note that weight vectors only take Int64,
|
|
507
|
+
making the algorithm fail for very large entries in V.vec.
|
|
508
|
+
EXAMPLE: example SaitoBase
|
|
509
|
+
"
|
|
510
|
+
{
|
|
511
|
+
|
|
512
|
+
// Saito works on standard coordinates, so we replace the coordinates of V by the
|
|
513
|
+
// standard coordinates.
|
|
514
|
+
// Note that we do not convert back, the user would have to do that themselves.
|
|
515
|
+
map oldcoords = V.coordinates;
|
|
516
|
+
map standardCoords = basering,(maxideal(1));
|
|
517
|
+
V.coordinates = standardCoords;
|
|
518
|
+
|
|
519
|
+
// step one is just choosing coordinates s.t. the linear part of V is in JNF.
|
|
520
|
+
VecField W = jordanVecField(V);
|
|
521
|
+
|
|
522
|
+
// k loop: compute one step in the sequence of coordinate systems:
|
|
523
|
+
int i,k;
|
|
524
|
+
map newbasemap; ideal WHS; matrix eigenvals,D,thesolution; intvec weights;
|
|
525
|
+
list l,sols; poly h,g;
|
|
526
|
+
for(k=2;k<=1+V.precision;k++)
|
|
527
|
+
{
|
|
528
|
+
//print("DEBUG: k=");print(k);
|
|
529
|
+
//print("DEBUG: W=");print(W);
|
|
530
|
+
// we need the eigenvalues of W to use as homogeneous weights later on
|
|
531
|
+
eigenvals = diagEntries(W.lin);
|
|
532
|
+
weights = vecToIntvec(eigenvals);
|
|
533
|
+
// newbase will hold the new coordinates. We compute an entire step k,
|
|
534
|
+
// then convert W to newbase.
|
|
535
|
+
matrix newbase[W.dimension][1];
|
|
536
|
+
|
|
537
|
+
// i loop: compute one new coordinate in the current step of the sequence:
|
|
538
|
+
for(i=1;i<=W.dimension;i++)
|
|
539
|
+
{
|
|
540
|
+
//print("DEBUG: i");print(i);
|
|
541
|
+
// compute the complement of the weakly homogeneous space (see below)
|
|
542
|
+
WHS = weaklyHomogeneousSpaceComplement(k,int(leadcoef(eigenvals[i,1])),weights);
|
|
543
|
+
// use this to compute the matrix representation of W restricted to WHS in
|
|
544
|
+
// the monomial basis
|
|
545
|
+
D = vecFieldToMatrix(W,WHS);
|
|
546
|
+
// subtract current eigenvalue (see algorithm)
|
|
547
|
+
D = D-eigenvals[i,1]*unitmat(ncols(D));
|
|
548
|
+
//print("DEBUG: curEigVal");print(eigenvals[i,1]);
|
|
549
|
+
//print("DEBUG: WHS");print(WHS);
|
|
550
|
+
//print("DEBUG: D");print(D);
|
|
551
|
+
|
|
552
|
+
// D should not be the zero matrix. if it is, we can continue by skipping
|
|
553
|
+
// the current step, but something may have gone wrong.
|
|
554
|
+
if(ncols(D) <= 0)
|
|
555
|
+
{
|
|
556
|
+
print("WARNING: D is the zero matrix in SaitoBase");
|
|
557
|
+
newbase[i,1] = var(i);
|
|
558
|
+
}
|
|
559
|
+
else
|
|
560
|
+
{
|
|
561
|
+
// compute the polynomial g from the algorithm
|
|
562
|
+
g = W.vec[i,1];
|
|
563
|
+
g = homogeneousPart(g,k);
|
|
564
|
+
g = -g; // g is now -{g_m(x_m)}_m+1,_x_m
|
|
565
|
+
//print("DEBUG: g");print(g);
|
|
566
|
+
|
|
567
|
+
// see whether g is already weakly quasihomogeneous. If so, set h=0:
|
|
568
|
+
if(deg(g,weights) == eigenvals[i,1])
|
|
569
|
+
{
|
|
570
|
+
//print("DEBUG: g is already weakly quasihomogeneous in SaitoBase");
|
|
571
|
+
newbase[i,1] = var(i);
|
|
572
|
+
i++; // continue does not increment for us!
|
|
573
|
+
continue; // newbase is same as old base, can skip to the next component
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
// g is not weakly quasihomogeneous. Satio: there exists h(i) s.t. D*h(i) = g
|
|
577
|
+
// compute h(i) via LU decomposition, representing g as a
|
|
578
|
+
// vector in the basis of WHS.
|
|
579
|
+
l = ludecomp(D);
|
|
580
|
+
sols =lusolve(l[1],l[2],l[3],homogeneousPolyToVec(g,WHS));
|
|
581
|
+
|
|
582
|
+
// by Saito, there should be a solution. If no solutions are found for a valid
|
|
583
|
+
// input, then my code is incorrect.
|
|
584
|
+
if(sols[1]==0)
|
|
585
|
+
{
|
|
586
|
+
//print("DEBUG: D=");print(D);
|
|
587
|
+
ERROR("ERROR in SaitoBase: no solutions found.
|
|
588
|
+
This implies a mistake in the library.");
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
thesolution = sols[2]; // this is h from p.137, represented as a vector.
|
|
592
|
+
h = vecToHomogeneousPoly(thesolution,WHS);
|
|
593
|
+
//print("DEBUG: h=");print(h);
|
|
594
|
+
|
|
595
|
+
// x_(i+1) = x_(i)+h.
|
|
596
|
+
newbase[i,1] = var(i)+h;
|
|
597
|
+
}
|
|
598
|
+
} // end of i-loop: we have computed a new basis.
|
|
599
|
+
|
|
600
|
+
// new basis is represented as polynomials in terms of the old basis.
|
|
601
|
+
// View them as a map to change W accordingly.
|
|
602
|
+
newbasemap = basering,newbase[1..W.dimension,1];
|
|
603
|
+
//print("DEBUG: newbasemap=");print(newbasemap);
|
|
604
|
+
W = changeCoordinates(W,newbasemap);
|
|
605
|
+
//print("DEBUG: new W = ");print(W);
|
|
606
|
+
kill newbase;
|
|
607
|
+
} // end of k-loop: we have computed enough steps in the coordinate sequence to be
|
|
608
|
+
// exact up to V.precision.
|
|
609
|
+
|
|
610
|
+
return(W);
|
|
611
|
+
}
|
|
612
|
+
example
|
|
613
|
+
{
|
|
614
|
+
"EXAMPLE: "; echo = 2;
|
|
615
|
+
ring r = 0, (x, y, z),ds;
|
|
616
|
+
vector v = [-1,-1,-1];
|
|
617
|
+
VecField V = v;
|
|
618
|
+
V.precision = 4;
|
|
619
|
+
map phi = r, x-2y2+z3,2y+y3+z,z;
|
|
620
|
+
VecField W = changeCoordinates(V,phi);
|
|
621
|
+
VecField WS = SaitoBase(W);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
proc diagonalizeVecField(list #)
|
|
625
|
+
"
|
|
626
|
+
USAGE: diagonalizeVecField(list l), l a list of VecFields
|
|
627
|
+
RETURN: list of VecFields W such that they are all simultaneously diagonal.
|
|
628
|
+
ASSUME: all input VecFields have to be simultaneously diagonalizable.
|
|
629
|
+
NOTE: the algorithm requires inversions of algebra morphisms. These will be
|
|
630
|
+
exact to the precision of l[1]. Warning: The algorithm assumes
|
|
631
|
+
standard coordinates. If V is not given in standard coordinates, it will
|
|
632
|
+
be converted to standard coordinates, but not converted back at the end,
|
|
633
|
+
so the resulting transformation is from standard coordinates to the
|
|
634
|
+
Saito coordinates. If you want the entire transformation from your original
|
|
635
|
+
coordinates to the Saito ones, add the inverse of your original coordinate
|
|
636
|
+
transformation manually.
|
|
637
|
+
Note that weight vectors only take Int64,
|
|
638
|
+
making the algorithm fail for very large entries in V.vec.
|
|
639
|
+
EXAMPLE: example diagonalizeVecField
|
|
640
|
+
"
|
|
641
|
+
{
|
|
642
|
+
// note: comments are sparse in this procedure as it is essentially the same as SaitoBase(),
|
|
643
|
+
// just with lists. See SaitoBase() for more documentation.
|
|
644
|
+
list l = #;
|
|
645
|
+
// Saito works on standard coordinates
|
|
646
|
+
list oldcoords;
|
|
647
|
+
int i,j,k;
|
|
648
|
+
for(i=1;i<=size(l);i++)
|
|
649
|
+
{
|
|
650
|
+
oldcoords = insert(oldcoords,l[i].coordinates,size(oldcoords));
|
|
651
|
+
}
|
|
652
|
+
map standardCoords = basering,(maxideal(1));
|
|
653
|
+
for(i=1;i<=size(l);i++)
|
|
654
|
+
{
|
|
655
|
+
l[i].coordinates = standardCoords;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
// step one of the algorithm
|
|
659
|
+
list W = diagonalizeVecFieldLin(l);
|
|
660
|
+
//print("DEBUG: W after diagonalizeSimul");print(W);
|
|
661
|
+
|
|
662
|
+
// k-loop: compute one step in the sequence of coordinate systems:
|
|
663
|
+
int numSteps = W[1].precision;
|
|
664
|
+
poly h,p; matrix thesolution,curVec,curEigVals,gj,t;
|
|
665
|
+
list sols,eigenvals,myLeadCoefs,weights; ideal M;
|
|
666
|
+
int counter,numRows,nontrivialFlag,irow,a; map newbasemap;
|
|
667
|
+
for(k=2;k<=1+numSteps;k++)
|
|
668
|
+
{
|
|
669
|
+
//print("DEBUG: k=");print(k);
|
|
670
|
+
// eigenvals will contain a list of arrays, where the n-th array contains
|
|
671
|
+
// all eigenvals of the n-th vecfield
|
|
672
|
+
for(i=1;i<=size(W);i++)
|
|
673
|
+
{
|
|
674
|
+
t = diagEntries(W[i].lin);
|
|
675
|
+
eigenvals = insert(eigenvals,t,size(eigenvals));
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
// the new base will be the same for all vecfields, so need
|
|
679
|
+
// only one matrix here, not a list
|
|
680
|
+
matrix newbase[W[1].dimension][1];
|
|
681
|
+
|
|
682
|
+
// i-loop: compute one new coordinate in the current step of the sequence
|
|
683
|
+
for(i=1;i<=W[1].dimension;i++)
|
|
684
|
+
{
|
|
685
|
+
//print("DEBUG: i");print(i);
|
|
686
|
+
for(j=1;j<=size(W);j++)
|
|
687
|
+
{
|
|
688
|
+
weights = insert(weights,vecToIntvec(eigenvals[j]),size(weights));
|
|
689
|
+
curEigVals = eigenvals[j];
|
|
690
|
+
myLeadCoefs = insert(myLeadCoefs,int(leadcoef(curEigVals[i,1])),size(myLeadCoefs));
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
list D; // one matrix D per vecfield
|
|
694
|
+
|
|
695
|
+
nontrivialFlag = 0;
|
|
696
|
+
|
|
697
|
+
for(j=1;j<=size(W);j++)
|
|
698
|
+
{
|
|
699
|
+
//print("DEBUG: j");print(j);
|
|
700
|
+
M = maxideal(k);
|
|
701
|
+
// notable difference to SaitoBase():
|
|
702
|
+
// we do not compute the weakly homogeneous space.
|
|
703
|
+
// Instead, as we know the vector fields are diagonalizable,
|
|
704
|
+
// we can simply apply V to
|
|
705
|
+
// all homogeneous monomials
|
|
706
|
+
// and use the resulting coefficients as diagonal entries.
|
|
707
|
+
matrix Dcur[ncols(M)][ncols(M)];
|
|
708
|
+
for(a=1;a<=ncols(M);a++)
|
|
709
|
+
{
|
|
710
|
+
p = applyVecField(W[j],M[a],1);//apply W.lin to all monomials of deg k
|
|
711
|
+
//print("DEBUG: M[a],p");print(M[a]);print(p);
|
|
712
|
+
Dcur[a,a] = leadcoef(p);
|
|
713
|
+
}
|
|
714
|
+
D = insert(D,Dcur,size(D));
|
|
715
|
+
curEigVals = eigenvals[j];
|
|
716
|
+
//print("DEBUG: curEigVals");print(curEigVals);
|
|
717
|
+
D[j] = D[j]-curEigVals[i,1]*unitmat(ncols(D[j]));
|
|
718
|
+
//print("DEBUG: D[j]");print(D[j]);
|
|
719
|
+
if(ncols(D[j])>0)
|
|
720
|
+
{
|
|
721
|
+
nontrivialFlag = 1;
|
|
722
|
+
}
|
|
723
|
+
kill Dcur;
|
|
724
|
+
}
|
|
725
|
+
if(nontrivialFlag == 0)
|
|
726
|
+
{
|
|
727
|
+
// this should not happen. Something must be wrong.
|
|
728
|
+
print("WARNING: all D are the zero matrix in diagonalizeVecField");
|
|
729
|
+
newbase[i,1] = var(i);
|
|
730
|
+
}
|
|
731
|
+
else
|
|
732
|
+
{
|
|
733
|
+
// paste all Ds together into one single matrix
|
|
734
|
+
numRows = 0;
|
|
735
|
+
for(j=1;j<=size(W);j++)
|
|
736
|
+
{
|
|
737
|
+
numRows = numRows + nrows(D[j]);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
matrix Dcomp[numRows][ncols(D[1])] = transpose(concat(D));
|
|
741
|
+
// note: ordinarily we would need to transpose each D[j] first, but as
|
|
742
|
+
// they are all diagonal, we skip that step.
|
|
743
|
+
|
|
744
|
+
// compute the polynomials g
|
|
745
|
+
for(j=1;j<=size(W);j++)
|
|
746
|
+
{
|
|
747
|
+
curVec = W[j].vec;
|
|
748
|
+
poly g(j) = curVec[i,1];
|
|
749
|
+
g(j) = homogeneousPart(g(j),k);
|
|
750
|
+
g(j) = -g(j); // g(j) is now -{g_m(x_m)}_m+1,_x_m
|
|
751
|
+
//print("DEBUG: g(j)");print(g(j));
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
// paste the vector representations of all g(j) together into one big vector:
|
|
755
|
+
matrix g[numRows][1];
|
|
756
|
+
counter = 1;
|
|
757
|
+
for(j=1;j<=size(W);j++)
|
|
758
|
+
{
|
|
759
|
+
gj = homogeneousPolyToVec(g(j),maxideal(k));
|
|
760
|
+
kill g(j);
|
|
761
|
+
for(irow=1;irow<=nrows(D[j]);irow++)
|
|
762
|
+
{
|
|
763
|
+
g[counter,1] = gj[irow,1];
|
|
764
|
+
counter++;
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
//print("DEBUG: g");print(g);
|
|
768
|
+
//exists h(i): D*h(i) = g(i)
|
|
769
|
+
l = ludecomp(Dcomp);
|
|
770
|
+
sols =lusolve(l[1],l[2],l[3],g);
|
|
771
|
+
if(sols[1]==0)
|
|
772
|
+
{
|
|
773
|
+
//print("DEBUG: Dcomp=");print(Dcomp);
|
|
774
|
+
ERROR("error in diagonalizeVecField: no solutions found");
|
|
775
|
+
}
|
|
776
|
+
thesolution = sols[2];
|
|
777
|
+
h = vecToHomogeneousPoly(thesolution,maxideal(k));
|
|
778
|
+
//print("DEBUG: h=");print(h);
|
|
779
|
+
|
|
780
|
+
newbase[i,1] = var(i)+h;
|
|
781
|
+
}
|
|
782
|
+
kill Dcomp,D,g;
|
|
783
|
+
} // end of i-loop
|
|
784
|
+
|
|
785
|
+
newbasemap = basering,newbase[1..W[1].dimension,1];
|
|
786
|
+
//print("DEBUG: newbasemap=");print(newbasemap);
|
|
787
|
+
for(i=1;i<=size(W);i++)
|
|
788
|
+
{
|
|
789
|
+
W[i] = changeCoordinates(W[i],newbasemap);
|
|
790
|
+
//print("DEBUG: new W[i] = ");print(W[i]);
|
|
791
|
+
}
|
|
792
|
+
kill newbase;
|
|
793
|
+
} // end of k-loop
|
|
794
|
+
return(W);
|
|
795
|
+
}
|
|
796
|
+
example
|
|
797
|
+
{
|
|
798
|
+
"EXAMPLE: "; echo = 2;
|
|
799
|
+
int oldp = printlevel;
|
|
800
|
+
printlevel = 1;
|
|
801
|
+
ring r = 0, (x, y, z),ds;
|
|
802
|
+
vector v = [-1,-1,-1];
|
|
803
|
+
VecField V = v;
|
|
804
|
+
V.precision = 4;
|
|
805
|
+
map phi = r, x-2y2+z3,2y+y3+z,z;
|
|
806
|
+
VecField W = changeCoordinates(V,phi);
|
|
807
|
+
VecField X = [-2,1,0];
|
|
808
|
+
VecField WS = diagonalizeVecField(W,X);
|
|
809
|
+
printlevel = oldp;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
proc vecFieldToMatrix(VecField V,ideal W)
|
|
813
|
+
"
|
|
814
|
+
USAGE: vecFieldToMatrix(VecField V,ideal W)
|
|
815
|
+
RETURN: the matrix representation of V restricted to span(W), in the basis specified by W.
|
|
816
|
+
EXAMPLE: example vecFieldToMatrix
|
|
817
|
+
"
|
|
818
|
+
{
|
|
819
|
+
matrix D[ncols(W)][ncols(W)]; // this will hold the matrix representation
|
|
820
|
+
matrix linpart;
|
|
821
|
+
VecField Vtemp;
|
|
822
|
+
poly p,mon,lcoef;
|
|
823
|
+
int h;
|
|
824
|
+
for(int j=1;j<=ncols(W);j++)
|
|
825
|
+
{
|
|
826
|
+
// compute the image of the j-th basis vector:
|
|
827
|
+
// only the image of the linear part of V is interesting
|
|
828
|
+
linpart = V.lin * pvector();
|
|
829
|
+
Vtemp = [linpart[1..nrows(linpart),1]];
|
|
830
|
+
Vtemp.precision = V.precision;
|
|
831
|
+
p = applyVecField(Vtemp,W[j]);
|
|
832
|
+
|
|
833
|
+
// find out how to write this in the basis again by brute force:
|
|
834
|
+
while(p != 0)
|
|
835
|
+
{
|
|
836
|
+
mon = leadmonom(p);
|
|
837
|
+
lcoef = leadcoef(p);
|
|
838
|
+
p = p-mon*lcoef;
|
|
839
|
+
for(h=1;h<=ncols(W);h++)
|
|
840
|
+
{
|
|
841
|
+
if(mon == W[h])
|
|
842
|
+
{
|
|
843
|
+
D[h,j] = lcoef;
|
|
844
|
+
} else
|
|
845
|
+
{
|
|
846
|
+
D[h,j] = 0;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
return(D);
|
|
853
|
+
}
|
|
854
|
+
example
|
|
855
|
+
{
|
|
856
|
+
"EXAMPLE: "; echo = 2;
|
|
857
|
+
int oldp = printlevel;
|
|
858
|
+
printlevel = 1;
|
|
859
|
+
ring r = 0, (x, y, z),ds;
|
|
860
|
+
vector v = [-1,-1,-1];
|
|
861
|
+
VecField V = v;
|
|
862
|
+
V.precision = 4;
|
|
863
|
+
map phi = r, x-2y2+z3,2y+y3+z,z;
|
|
864
|
+
VecField W = changeCoordinates(V,phi);
|
|
865
|
+
matrix m = vecFieldToMatrix(W,maxideal(2));
|
|
866
|
+
printlevel = oldp;
|
|
867
|
+
}
|
|
868
|
+
|
|
869
|
+
proc decomposeVecField(list #)
|
|
870
|
+
"
|
|
871
|
+
USAGE: decomposeVecField(VecField V) or decomposeVecField(list s), s a list of VecFields
|
|
872
|
+
RETURN: list l containing two VecFields, where l[1] is the semisimple part of V, l[2] the
|
|
873
|
+
nilpotent part. If called with a list, l[2n-1] is the semisimple part of the
|
|
874
|
+
n-th VecField, l[2n] its nilpotent part.
|
|
875
|
+
ASSUME: The algorithm assumes standard coordinates. If V is not given in standard
|
|
876
|
+
coordinates, it will be converted to standard coordinates, but not converted back
|
|
877
|
+
at the end, so the resulting transformation is from standard coordinates to the
|
|
878
|
+
new coordinates. If you want the entire transformation from your original coordinates
|
|
879
|
+
to the new ones, add the inverse of your original coordinate transformation manually.
|
|
880
|
+
EXAMPLE: example decomposeVecField
|
|
881
|
+
"
|
|
882
|
+
{
|
|
883
|
+
if(size(#) == 1)
|
|
884
|
+
{
|
|
885
|
+
VecField W = SaitoBase(#[1]);
|
|
886
|
+
map backtrafo = invertAlgebraMorphism(W.coordinates,W.precision);
|
|
887
|
+
matrix diagMatrix = diag(diagEntries(W.lin));
|
|
888
|
+
matrix diagPart = diagMatrix * pvector();
|
|
889
|
+
VecField l1 = [diagPart[1..nrows(diagPart),1]];
|
|
890
|
+
l1.precision = W.precision;
|
|
891
|
+
l1.coordinates = W.coordinates; // since l1 was not computed by a coord change,
|
|
892
|
+
// force the correct coordinates
|
|
893
|
+
VecField l2 = W - l1;
|
|
894
|
+
l2.precision = W.precision;
|
|
895
|
+
l1 = changeCoordinates(l1,backtrafo);
|
|
896
|
+
l2 = changeCoordinates(l2,backtrafo);
|
|
897
|
+
list l = l1,l2;
|
|
898
|
+
return(l);
|
|
899
|
+
}
|
|
900
|
+
else
|
|
901
|
+
{
|
|
902
|
+
list l,temp;
|
|
903
|
+
for(int i=1;i<=size(#);i++)
|
|
904
|
+
{
|
|
905
|
+
temp = decomposeVecField(#[i]);
|
|
906
|
+
l = insert(l,temp[1],size(l));
|
|
907
|
+
l = insert(l,temp[2],size(l));
|
|
908
|
+
}
|
|
909
|
+
return(l);
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
example
|
|
913
|
+
{
|
|
914
|
+
"EXAMPLE: "; echo = 2;
|
|
915
|
+
ring r = 0, (x, y, z),ds;
|
|
916
|
+
vector v = [-1,-1,-1];
|
|
917
|
+
VecField V = v;
|
|
918
|
+
V.precision = 4;
|
|
919
|
+
map phi = r, x-2y2+z3,2y+y3+z,z;
|
|
920
|
+
VecField W = changeCoordinates(V,phi);
|
|
921
|
+
list l = decomposeVecField(W);
|
|
922
|
+
}
|
|
923
|
+
|
|
924
|
+
|
|
925
|
+
proc invertAlgebraMorphism(p,int n)
|
|
926
|
+
"
|
|
927
|
+
USAGE: invertAlgebraMorphism(map p,int n), where p is an algebra
|
|
928
|
+
morphism k[x1,...,xn]->k[y1,...,ym],
|
|
929
|
+
or invertAlgebraMorphism(ideal p,int n) if you represent the map as an ideal
|
|
930
|
+
RETURN: the inverse of p mod (maxideal)^n.
|
|
931
|
+
If n=-1, try for infinite precision. If input was an ideal, return an ideal.
|
|
932
|
+
NOTE: the algorithm used is described in [1], chapter 3.2
|
|
933
|
+
EXAMPLE: example invertAlgebraMorphism
|
|
934
|
+
"
|
|
935
|
+
{
|
|
936
|
+
int myindex;
|
|
937
|
+
if(typeof(p) == "map")
|
|
938
|
+
{
|
|
939
|
+
// to do this, we apply p to each ring variable,
|
|
940
|
+
// then use the algorithm that inverts morphisms
|
|
941
|
+
// when they are represented as an ideal
|
|
942
|
+
ideal P = maxideal(1);
|
|
943
|
+
ideal I = p(P);
|
|
944
|
+
ideal J = invertAlgebraMorphism(I,n);
|
|
945
|
+
map f = basering,J;
|
|
946
|
+
return(f);
|
|
947
|
+
}
|
|
948
|
+
else
|
|
949
|
+
{
|
|
950
|
+
if(typeof(p) == "ideal")
|
|
951
|
+
{
|
|
952
|
+
ring oldbasering = basering;
|
|
953
|
+
int numvars = nvars(basering);
|
|
954
|
+
|
|
955
|
+
// we only invert to the n-th exponent, so the (n+1)-th should be modded out
|
|
956
|
+
// n=-1 means "infinity"
|
|
957
|
+
if(n>=0)
|
|
958
|
+
{
|
|
959
|
+
ideal Max = maxideal(n+1);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
// choose ordering s.t. y^n < x^1:
|
|
963
|
+
ring k = 0,(x(1..numvars),y(1..numvars)),lp;
|
|
964
|
+
|
|
965
|
+
// the x are copies of the original ring variables
|
|
966
|
+
map inclusionmap = oldbasering,x(1..numvars);
|
|
967
|
+
|
|
968
|
+
ideal F = inclusionmap(p);
|
|
969
|
+
ideal Max = inclusionmap(Max);
|
|
970
|
+
|
|
971
|
+
// if precision is not infinity, pass to quotient ring
|
|
972
|
+
if(n>=0)
|
|
973
|
+
{
|
|
974
|
+
qring qk = std(Max);
|
|
975
|
+
ideal F = fetch(k,F);
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
ideal I; // I will be the ideal I from the paper
|
|
979
|
+
for(int j=1;j<=numvars;j++)
|
|
980
|
+
{
|
|
981
|
+
I = (I,y(j)-F[j]);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
I = I[2..ncols(I)]; // cut leading '0' entry
|
|
986
|
+
// I is now the ideal from van den Essen, p64
|
|
987
|
+
|
|
988
|
+
option(redSB); // need to do this for the algo to work
|
|
989
|
+
I = qslimgb(I);
|
|
990
|
+
|
|
991
|
+
ideal Inew;
|
|
992
|
+
for(j=1;j<=ncols(I);j++)
|
|
993
|
+
{
|
|
994
|
+
if(deg(I[j],(1:numvars,0:numvars)) > 0)
|
|
995
|
+
{
|
|
996
|
+
Inew = (Inew,I[j]);
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
I = Inew[2..ncols(Inew)];
|
|
1001
|
+
|
|
1002
|
+
// normalize groebner basis
|
|
1003
|
+
for(j=1;j<=ncols(I);j++)
|
|
1004
|
+
{
|
|
1005
|
+
I[j] = I[j]/leadcoef(I[j]);
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
// I should now be of the form in thm. 3.2.1i. Extract the Gs:
|
|
1009
|
+
for(j=ncols(I)+1;j<=numvars;j++) // fill with zeroes if I too short
|
|
1010
|
+
{
|
|
1011
|
+
I = (I,0);
|
|
1012
|
+
// this should not happen unless there is an error in my code.
|
|
1013
|
+
print("WARNING: I was too short in invertAlgebraMorphismIdeal");
|
|
1014
|
+
}
|
|
1015
|
+
I = -1*I;
|
|
1016
|
+
|
|
1017
|
+
// sort I by leading monomial
|
|
1018
|
+
ideal J = (0:numvars);
|
|
1019
|
+
|
|
1020
|
+
for(j=1;j<=numvars;j++)
|
|
1021
|
+
{
|
|
1022
|
+
myindex = varNum(leadmonom(I[j]));
|
|
1023
|
+
if(myindex < 1)
|
|
1024
|
+
{
|
|
1025
|
+
ERROR("ERROR in invertAlgebraMorphismIdeal: map not invertible");
|
|
1026
|
+
}
|
|
1027
|
+
J[myindex] = I[j]+leadmonom(I[j]);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
// J should be the inverse of p now; just have to get it back to
|
|
1031
|
+
// the original ring
|
|
1032
|
+
// in particular, J hopefully contains no xs anymore, just ys.
|
|
1033
|
+
// we have phiinverse(xi)=Gi(y1,...,yn).
|
|
1034
|
+
// as in our case yi=xi, simply map back:
|
|
1035
|
+
setring(oldbasering);
|
|
1036
|
+
ideal allvars = (maxideal(1),maxideal(1));
|
|
1037
|
+
if(n>=0)
|
|
1038
|
+
{
|
|
1039
|
+
map backmap = qk,allvars;
|
|
1040
|
+
} else
|
|
1041
|
+
{
|
|
1042
|
+
map backmap = k,allvars;
|
|
1043
|
+
}
|
|
1044
|
+
ideal result = backmap(J);
|
|
1045
|
+
return(result);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
ERROR("ERROR in invertAlgebraMorphism: input must be of type map or ideal");
|
|
1049
|
+
}
|
|
1050
|
+
example
|
|
1051
|
+
{
|
|
1052
|
+
"EXAMPLE: "; echo = 2;
|
|
1053
|
+
ring r = 0, (x, y, z),ds;
|
|
1054
|
+
vector v = [-1,-1,-1];
|
|
1055
|
+
VecField V = v;
|
|
1056
|
+
V.precision = 4;
|
|
1057
|
+
map phi = r, x-2y2+z3,2y+y3+z,z;
|
|
1058
|
+
map phiinv = invertAlgebraMorphism(phi,4);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
proc diagonalizeMatrixSimul(list l)
|
|
1062
|
+
"
|
|
1063
|
+
USAGE: diagonalizeMatrixSimul(list l), where l is a list of quadratic matrices
|
|
1064
|
+
of same dimensions
|
|
1065
|
+
RETURN: trafo matrix U s.t. U*A*inv(U) is diagonal for each A in l
|
|
1066
|
+
ASSUME: matrices are simultaneously diagonalizable, nvars(basering)>=dimension of the matrices
|
|
1067
|
+
EXAMPLE: example diagonalizeMatrixSimul
|
|
1068
|
+
"
|
|
1069
|
+
{
|
|
1070
|
+
if(size(l)==0)
|
|
1071
|
+
{
|
|
1072
|
+
matrix m[1][1];
|
|
1073
|
+
return(m);
|
|
1074
|
+
}
|
|
1075
|
+
int numRows = nrows(l[1]);
|
|
1076
|
+
module M = unitmat(numRows);
|
|
1077
|
+
list spaces = diagonalizeMatrixSimulRec(l,M); // now holds the intersected eigenspaces
|
|
1078
|
+
|
|
1079
|
+
matrix ret[numRows][numRows]; // this will be the transformation matrix.
|
|
1080
|
+
int pos=1;
|
|
1081
|
+
int i,j,k;
|
|
1082
|
+
matrix m;
|
|
1083
|
+
for(i=1;i<=size(spaces);i++)
|
|
1084
|
+
{
|
|
1085
|
+
M = spaces[i];
|
|
1086
|
+
m = M;
|
|
1087
|
+
for(j=1;j<=ncols(m);j++)
|
|
1088
|
+
{
|
|
1089
|
+
for(k=1;k<=nrows(m);k++)
|
|
1090
|
+
{
|
|
1091
|
+
ret[k,pos] = m[k,j];
|
|
1092
|
+
}
|
|
1093
|
+
pos++;
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
return(ret);
|
|
1097
|
+
}
|
|
1098
|
+
example
|
|
1099
|
+
{
|
|
1100
|
+
"EXAMPLE: "; echo = 2;
|
|
1101
|
+
ring r = 0,(x(1),x(2),x(3),x(4)),dp;
|
|
1102
|
+
|
|
1103
|
+
matrix a[4][4] = 2,0,0,0, 0,3,0,0, 0,0,3,0, 0,0,0,5 ;
|
|
1104
|
+
matrix b[4][4] = 6,0,0,0, 0,6,0,0, 0,0,2,0, 0,0,0,7 ;
|
|
1105
|
+
|
|
1106
|
+
matrix trafo[4][4] = 3,3,0,0, 0,1,3,0, 2,0,1,0, 0,2,2,3;
|
|
1107
|
+
matrix invtrafo = inverse(trafo);
|
|
1108
|
+
|
|
1109
|
+
matrix at = invtrafo * a * trafo;
|
|
1110
|
+
matrix bt = invtrafo * b * trafo;
|
|
1111
|
+
|
|
1112
|
+
list l;
|
|
1113
|
+
l = insert(l,at);
|
|
1114
|
+
l = insert(l,bt);
|
|
1115
|
+
|
|
1116
|
+
matrix diagtrafo = diagonalizeMatrixSimul(l);
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
|
|
1120
|
+
///////////////////////////////////////////
|
|
1121
|
+
// AUXILIARY FUNCTIONS ////////////////////
|
|
1122
|
+
///////////////////////////////////////////
|
|
1123
|
+
|
|
1124
|
+
// this is the recursive implementation of simultaneous
|
|
1125
|
+
// diagonalization. Do not call this by hand;
|
|
1126
|
+
// instead use diagonalizeMatrixSimul().
|
|
1127
|
+
// matrices is a list of matrices of same dimension,
|
|
1128
|
+
// spaces a list of modules (intersections of eigenspaces)
|
|
1129
|
+
static proc diagonalizeMatrixSimulRec(list matrices,list spaces)
|
|
1130
|
+
{
|
|
1131
|
+
if(size(matrices) == 0)
|
|
1132
|
+
{
|
|
1133
|
+
return(spaces); // this ends the recursion
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
list intersectedSpaces; // this will hold the intersected spaces
|
|
1137
|
+
list jordanb = jordanbasis(matrices[1]); // jordanb[1] is the transformation matrix
|
|
1138
|
+
matrix diagMat = inverse(jordanb[1]) * matrices[1] * jordanb[1];
|
|
1139
|
+
matrix trafoMat = jordanb[1];
|
|
1140
|
+
matrix eigenvals = diagEntries(diagMat);
|
|
1141
|
+
|
|
1142
|
+
matrices = delete(matrices,1); // shorten list for the recursion
|
|
1143
|
+
int i = 1;
|
|
1144
|
+
int j,range;
|
|
1145
|
+
module M,toIntersect;
|
|
1146
|
+
while(i<=nrows(trafoMat))
|
|
1147
|
+
{
|
|
1148
|
+
range = 0;
|
|
1149
|
+
// increment range s.t. range+1 is the dimension of the current eigenspace
|
|
1150
|
+
for(j=1;j+i<=nrows(eigenvals);j++)
|
|
1151
|
+
{
|
|
1152
|
+
if(eigenvals[j+i,1]==eigenvals[i,1])
|
|
1153
|
+
{
|
|
1154
|
+
range++;
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
module eigenspace;
|
|
1159
|
+
for(j=i;j<=i+range;j++)
|
|
1160
|
+
{
|
|
1161
|
+
eigenspace = (eigenspace,matrixCol(trafoMat,j));
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
for(j=1;j<=size(spaces);j++)
|
|
1165
|
+
{
|
|
1166
|
+
toIntersect = spaces[j];
|
|
1167
|
+
M = intersect(eigenspace,toIntersect);
|
|
1168
|
+
if(size(M) != 0)
|
|
1169
|
+
{
|
|
1170
|
+
intersectedSpaces = insert(intersectedSpaces,M,size(intersectedSpaces));
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
i = i+range+1;
|
|
1175
|
+
kill eigenspace;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
return(diagonalizeMatrixSimulRec(matrices,intersectedSpaces));
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
static proc homogeneousPolyToVec(poly p,ideal W)
|
|
1182
|
+
"
|
|
1183
|
+
USAGE: homogeneousPolyToVec(poly p, ideal W)
|
|
1184
|
+
ASSUME: p homogeneous and contained in the space spanned by W,
|
|
1185
|
+
e.g. p quasihomogeneous and W is the result of weaklyHomogeneousSpace(...)
|
|
1186
|
+
RETURN: nx1 matrix containing the coefficients of p in the order given by W
|
|
1187
|
+
"
|
|
1188
|
+
{
|
|
1189
|
+
matrix v[ncols(W)][1];
|
|
1190
|
+
matrix thecoeffs = coef(p,productOfRingVars());
|
|
1191
|
+
int j,k;
|
|
1192
|
+
for(j=1;j<=ncols(W);j++)
|
|
1193
|
+
{
|
|
1194
|
+
for(k = 1;k<=ncols(thecoeffs);k++)
|
|
1195
|
+
{
|
|
1196
|
+
if(thecoeffs[1,k] == W[j])
|
|
1197
|
+
{
|
|
1198
|
+
v[j,1] = thecoeffs[2,k];
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
return(v);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
static proc vecToHomogeneousPoly(matrix v,ideal W)
|
|
1206
|
+
"
|
|
1207
|
+
USAGE: vecToHomogeneousPoly(vec v,ideal W)
|
|
1208
|
+
ASSUME: v is a nx1 matrix, where n=ncols(W)
|
|
1209
|
+
RETURN: the polynomial in W whose coefficients are v (W represents the basis)
|
|
1210
|
+
"
|
|
1211
|
+
{
|
|
1212
|
+
poly p;
|
|
1213
|
+
for(int j=1;j<=ncols(W);j++)
|
|
1214
|
+
{
|
|
1215
|
+
p = p+v[j,1]*W[j];
|
|
1216
|
+
}
|
|
1217
|
+
return(p);
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
static proc weaklyHomogeneousSpace(int n, int lambda, intvec weights)
|
|
1221
|
+
"
|
|
1222
|
+
USAGE: weaklyHomogeneousSpace(int n, int lambda, intvec weights)
|
|
1223
|
+
RETURN: ideal of all monomials which are homogeneous of degree n
|
|
1224
|
+
AND weakly homogeneous of degree lambda with the given weights
|
|
1225
|
+
ASSUME: weights has exactly as many entries as nvars(basering)
|
|
1226
|
+
NOTE: if no such monomials exist, the zero ideal is returned.
|
|
1227
|
+
The monomials in the returned ideal are sorted according to the basering's ordering.
|
|
1228
|
+
"
|
|
1229
|
+
{
|
|
1230
|
+
ideal H = maxideal(n); // contains all homogeneous monomials of degree n
|
|
1231
|
+
ideal W; // this will hold those monomials that lie in the WHS
|
|
1232
|
+
matrix w[nvars(basering)][1] = weights;
|
|
1233
|
+
|
|
1234
|
+
// we compute this by brute force: for each monomial in H,
|
|
1235
|
+
// check whether it is wh of lambda,weights.
|
|
1236
|
+
poly mon;
|
|
1237
|
+
matrix res;
|
|
1238
|
+
for(int j=1;j<=ncols(H);j++)
|
|
1239
|
+
{
|
|
1240
|
+
mon = H[j];
|
|
1241
|
+
matrix expos[nvars(basering)][1] = leadexp(mon);
|
|
1242
|
+
expos = transpose(expos);
|
|
1243
|
+
res = expos*w;
|
|
1244
|
+
kill expos;
|
|
1245
|
+
if(res[1,1] == lambda)
|
|
1246
|
+
{
|
|
1247
|
+
W = (W,mon);
|
|
1248
|
+
}
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
// if ncols(W)==1, then W=0 => WHS is empty.
|
|
1252
|
+
if(ncols(W)==1)
|
|
1253
|
+
{
|
|
1254
|
+
return(W);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
W = W[2..ncols(W)]; // delete leading 0 entry
|
|
1258
|
+
return(W);
|
|
1259
|
+
// the monomials in W are now sorted accordingly to the ring ordering
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1262
|
+
static proc weaklyHomogeneousSpaceComplement(int n, int lambda, intvec weights)
|
|
1263
|
+
"
|
|
1264
|
+
USAGE: weaklyHomogeneousSpaceComplement(int n, int lambda, intvec weights)
|
|
1265
|
+
RETURN: ideal of all monomials which are homogeneous of degree n
|
|
1266
|
+
but NOT weakly homogeneous of degree lambda with the given weights
|
|
1267
|
+
ASSUME: size(weights)==nvars(basering)
|
|
1268
|
+
NOTE: if no such monomials exist, the zero ideal is returned.
|
|
1269
|
+
The monomials in the returned ideal are sorted according to the ring ordering.
|
|
1270
|
+
"
|
|
1271
|
+
{
|
|
1272
|
+
// for documentation see weaklyHomogeneousSpace();
|
|
1273
|
+
// this is the same except we only return the monomials
|
|
1274
|
+
// that fail the check instead of those that pass.
|
|
1275
|
+
ideal H = maxideal(n);
|
|
1276
|
+
ideal W;
|
|
1277
|
+
matrix w[nvars(basering)][1] = weights;
|
|
1278
|
+
poly mon;
|
|
1279
|
+
matrix res;
|
|
1280
|
+
for(int j=1;j<=ncols(H);j++)
|
|
1281
|
+
{
|
|
1282
|
+
mon = H[j];
|
|
1283
|
+
matrix expos[nvars(basering)][1] = leadexp(mon);
|
|
1284
|
+
expos = transpose(expos);
|
|
1285
|
+
res = expos*w;
|
|
1286
|
+
kill expos;
|
|
1287
|
+
if(res[1,1] != lambda) // this line is the only difference to weaklyHomogeneousSpace()
|
|
1288
|
+
{
|
|
1289
|
+
W = (W,mon);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
if(ncols(W)==1)
|
|
1293
|
+
{
|
|
1294
|
+
return(W);
|
|
1295
|
+
}
|
|
1296
|
+
W = W[2..ncols(W)]; // delete leading 0 entry
|
|
1297
|
+
return(W);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
static proc extendMatrix(matrix A,int rows,int cols)
|
|
1301
|
+
"
|
|
1302
|
+
USAGE: extendMatrix(matrix A,int rows,int cols)
|
|
1303
|
+
RETURN: A extended with zeroes s.t. it is now a rowsxcols matrix
|
|
1304
|
+
ASSUME: nrows(A) <= rows, ncols(A) <= cols
|
|
1305
|
+
"
|
|
1306
|
+
{
|
|
1307
|
+
matrix B[rows][cols];
|
|
1308
|
+
int i,j;
|
|
1309
|
+
for(i=1;i<=ncols(A);i++)
|
|
1310
|
+
{
|
|
1311
|
+
for(j=1;j<=nrows(A);j++)
|
|
1312
|
+
{
|
|
1313
|
+
B[j,i] = A[j,i];
|
|
1314
|
+
}
|
|
1315
|
+
}
|
|
1316
|
+
return(B);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
static proc eqIdeal(ideal I,ideal J)
|
|
1320
|
+
"
|
|
1321
|
+
USAGE: eqIdeal(ideal I, ideal J)
|
|
1322
|
+
RETURN: 1 if ideals are equal, 0 otherwise
|
|
1323
|
+
"
|
|
1324
|
+
{
|
|
1325
|
+
J = std(J);
|
|
1326
|
+
I = std(I);
|
|
1327
|
+
if(ncols(I) != ncols(J))
|
|
1328
|
+
{
|
|
1329
|
+
return(0);
|
|
1330
|
+
}
|
|
1331
|
+
for(int j=1;j<=ncols(I);j++)
|
|
1332
|
+
{
|
|
1333
|
+
if(I[j]!=J[j])
|
|
1334
|
+
{
|
|
1335
|
+
return(0);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
return(1);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
static proc eqMap(map f, map g)
|
|
1343
|
+
"
|
|
1344
|
+
USAGE: eqMap(map f,map g)
|
|
1345
|
+
ASSUME: domain of f,g are the same, codomain of f, g are the same, domain is current basering
|
|
1346
|
+
RETURN: 1 if maps are equal, 0 otherwise
|
|
1347
|
+
"
|
|
1348
|
+
{
|
|
1349
|
+
// note: maps are equal iff they are equal on each ring variable
|
|
1350
|
+
ideal P = maxideal(1);
|
|
1351
|
+
ideal F = f(P);
|
|
1352
|
+
ideal G = g(P);
|
|
1353
|
+
for(int j=1;j<=ncols(F);j++)
|
|
1354
|
+
{
|
|
1355
|
+
if(F[j]!=G[j])
|
|
1356
|
+
{
|
|
1357
|
+
return(0);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
return(1);
|
|
1361
|
+
}
|
|
1362
|
+
|
|
1363
|
+
|
|
1364
|
+
static proc identityMap() // this does not yet exist in SINGULAR ...
|
|
1365
|
+
"
|
|
1366
|
+
USAGE: identityMap()
|
|
1367
|
+
RETURN: a map basering -> basering which is the identity map
|
|
1368
|
+
"
|
|
1369
|
+
{
|
|
1370
|
+
ideal P = maxideal(1);
|
|
1371
|
+
map f = basering,P;
|
|
1372
|
+
return(f);
|
|
1373
|
+
}
|
|
1374
|
+
|
|
1375
|
+
static proc pvector()
|
|
1376
|
+
"
|
|
1377
|
+
USAGE: pvector()
|
|
1378
|
+
RETURN: a nvars x 1 matrix consisting of the ring variables in order
|
|
1379
|
+
"
|
|
1380
|
+
{
|
|
1381
|
+
ideal I = maxideal(1);
|
|
1382
|
+
matrix v[nvars(basering)][1] = [I[1..nvars(basering)]];
|
|
1383
|
+
return(v);
|
|
1384
|
+
}
|
|
1385
|
+
|
|
1386
|
+
static proc mirrorMatrixHorizontal(matrix m)
|
|
1387
|
+
"
|
|
1388
|
+
USAGE: mirrorMatrixHorizontal(matrix m)
|
|
1389
|
+
RETURN: m mirrored about the vertical axis
|
|
1390
|
+
"
|
|
1391
|
+
{
|
|
1392
|
+
matrix n[nrows(m)][ncols(m)];
|
|
1393
|
+
for(int i=1;i<=ncols(m);i++)
|
|
1394
|
+
{
|
|
1395
|
+
n[1..nrows(m),i] = m[1..nrows(m),ncols(m)-i+1];
|
|
1396
|
+
}
|
|
1397
|
+
return(n);
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
static proc mirrorMatrixVertictal(matrix m)
|
|
1401
|
+
"
|
|
1402
|
+
USAGE: mirrorMatrixVertical(matrix m)
|
|
1403
|
+
RETURN: m mirrored about the horizontal axis
|
|
1404
|
+
"
|
|
1405
|
+
{
|
|
1406
|
+
matrix n[nrows(m)][ncols(m)];
|
|
1407
|
+
for(int i=1;i<=nrows(m);i++)
|
|
1408
|
+
{
|
|
1409
|
+
n[i,1..ncols(m)] = m[nrows(m)-i+1,1..ncols(m)];
|
|
1410
|
+
}
|
|
1411
|
+
return(n);
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
static proc isInverse(map phi,map psi)
|
|
1415
|
+
"
|
|
1416
|
+
USAGE: isInverse(map phi, map psi)
|
|
1417
|
+
RETURN: 1 if the maps are inverse to each other, 0 otherwise
|
|
1418
|
+
ASSUME: both phi and psi are maps basering -> basering
|
|
1419
|
+
"
|
|
1420
|
+
{
|
|
1421
|
+
map phipsi = phi(psi);
|
|
1422
|
+
map psiphi = psi(phi);
|
|
1423
|
+
for(int i=1;i<=nvars(basering);i++)
|
|
1424
|
+
{
|
|
1425
|
+
if(phipsi(var(i)) != var(i))
|
|
1426
|
+
{
|
|
1427
|
+
return(0);
|
|
1428
|
+
}
|
|
1429
|
+
if(psiphi(var(i)) != var(i))
|
|
1430
|
+
{
|
|
1431
|
+
return(0);
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
return(1);
|
|
1435
|
+
}
|
|
1436
|
+
|
|
1437
|
+
static proc homogeneousPart(poly f, int n)
|
|
1438
|
+
"
|
|
1439
|
+
USAGE: homogeneousPart(poly f, int n)
|
|
1440
|
+
RETURN: the homogeneous part of f of degree n
|
|
1441
|
+
"
|
|
1442
|
+
{
|
|
1443
|
+
poly g = jet(f,n);
|
|
1444
|
+
poly c = 0;
|
|
1445
|
+
int origSize = size(g);
|
|
1446
|
+
poly mon;
|
|
1447
|
+
for(int j=1;j <= origSize;j++)
|
|
1448
|
+
{
|
|
1449
|
+
mon = leadmonom(g);
|
|
1450
|
+
mon = mon*leadcoef(g);
|
|
1451
|
+
g = g-mon;
|
|
1452
|
+
if(deg(mon)==n)
|
|
1453
|
+
{
|
|
1454
|
+
c = c+mon;
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
// c now consists of the homogeneous part of degree n
|
|
1458
|
+
return(c);
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
static proc diagEntries(matrix A)
|
|
1462
|
+
"
|
|
1463
|
+
USAGE: diagEntries(matrix A)
|
|
1464
|
+
ASSUME: A is quadratic
|
|
1465
|
+
RETURN: nx1 matrix containing the diagonal entries of A
|
|
1466
|
+
"
|
|
1467
|
+
{
|
|
1468
|
+
matrix v[ncols(A)][1];
|
|
1469
|
+
for(int i=1;i<=ncols(A);i++)
|
|
1470
|
+
{
|
|
1471
|
+
v[i,1] = A[i,i];
|
|
1472
|
+
}
|
|
1473
|
+
return(v);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
static proc productOfRingVars()
|
|
1477
|
+
"
|
|
1478
|
+
USAGE: productOfRingVars()
|
|
1479
|
+
RETURN: poly which is the product of all ring variables
|
|
1480
|
+
"
|
|
1481
|
+
{
|
|
1482
|
+
poly p = 1;
|
|
1483
|
+
for(int i=1;i<=nvars(basering);i++)
|
|
1484
|
+
{
|
|
1485
|
+
p = p*var(i);
|
|
1486
|
+
}
|
|
1487
|
+
return(p);
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
|
|
1491
|
+
static proc vecToIntvec(matrix v)
|
|
1492
|
+
"
|
|
1493
|
+
USAGE: vecToIntVec(matrix v)
|
|
1494
|
+
RETURN: an intvec containing the entries of v
|
|
1495
|
+
ASSUME: v is mx1 and contains only integers
|
|
1496
|
+
"
|
|
1497
|
+
{
|
|
1498
|
+
intvec ret = (0:nrows(v));
|
|
1499
|
+
for(int i=1;i<=nrows(v);i++)
|
|
1500
|
+
{
|
|
1501
|
+
ret[i] = int(leadcoef(v[i,1]));
|
|
1502
|
+
}
|
|
1503
|
+
return(ret);
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
static proc matrixRow(matrix m, int n)
|
|
1507
|
+
"
|
|
1508
|
+
USAGE: matrixRow(matrix m, int n)
|
|
1509
|
+
RETURN: the n-th row of m (as a matrix with one row). If n>nrows(m), returns a zero row.
|
|
1510
|
+
"
|
|
1511
|
+
{
|
|
1512
|
+
matrix ret[1][ncols(m)];
|
|
1513
|
+
if(n>nrows(m))
|
|
1514
|
+
{
|
|
1515
|
+
return(ret);
|
|
1516
|
+
}
|
|
1517
|
+
for(int i=1;i<=ncols(m);i++)
|
|
1518
|
+
{
|
|
1519
|
+
ret[1,i] = m[n,i];
|
|
1520
|
+
}
|
|
1521
|
+
return(ret);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
static proc matrixCol(matrix m, int n)
|
|
1525
|
+
"
|
|
1526
|
+
USAGE: matrixCol(matrix m, int n)
|
|
1527
|
+
RETURN: the n-th column of m (as a matrix with one column).
|
|
1528
|
+
If n>ncols(m), returns a zero column.
|
|
1529
|
+
"
|
|
1530
|
+
{
|
|
1531
|
+
matrix ret[nrows(m)][1];
|
|
1532
|
+
if(n>ncols(m))
|
|
1533
|
+
{
|
|
1534
|
+
return(ret);
|
|
1535
|
+
}
|
|
1536
|
+
for(int i=1;i<=nrows(m);i++)
|
|
1537
|
+
{
|
|
1538
|
+
ret[i,1] = m[i,n];
|
|
1539
|
+
}
|
|
1540
|
+
return(ret);
|
|
1541
|
+
}
|
|
1542
|
+
|