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,1128 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version tropicalNewton.lib 4.3.1.3 Feb_2023 "; // $Id: 2f93e585edb963267ca766cd66305828ae6e7c4e $
|
|
3
|
+
category="Tropical Geometry";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: tropicalNewton.lib Computations in Tropical Geometry
|
|
6
|
+
using Newton Polygon methods
|
|
7
|
+
|
|
8
|
+
AUTHORS: Tommy Hofman, email: thofmann@mathematik.uni.kl.de
|
|
9
|
+
Yue Ren, email: reny@cs.bgu.ac.il
|
|
10
|
+
|
|
11
|
+
OVERVIEW:
|
|
12
|
+
This libraries contains algorithms for computing
|
|
13
|
+
- non-trivial points on tropical varieties,
|
|
14
|
+
- zero-dimensional tropical varieties,
|
|
15
|
+
- one-codimensional links of tropical varieties
|
|
16
|
+
based on Newton polygon methods.
|
|
17
|
+
|
|
18
|
+
REFERENCES: Hofmann, Ren: Computing tropical points and tropical links, arXiv:1611.02878
|
|
19
|
+
(WARNING: this library follows the max convention instead
|
|
20
|
+
and triangular sets follow the definition of the Singular book)
|
|
21
|
+
|
|
22
|
+
SEE ALSO: tropicalVariety, tropical_lib
|
|
23
|
+
|
|
24
|
+
KEYWORDS: tropical geometry; tropical varieties; Newton polygons
|
|
25
|
+
|
|
26
|
+
PROCEDURES:
|
|
27
|
+
setUniformizingParameter() sets the uniformizingParameter
|
|
28
|
+
val() returns valuation of element in ground field
|
|
29
|
+
newtonPolygonNegSlopes() returns negative of the Newton Polyong slopes
|
|
30
|
+
cccMatrixToPositiveIntvec() helper function to turn a computed valuation vector
|
|
31
|
+
into a usable weight vector in Singular
|
|
32
|
+
tropicalPointNewton() computes point on tropical variety
|
|
33
|
+
switchRingsAndComputeInitialIdeal()
|
|
34
|
+
switches rings and computes initial ideal
|
|
35
|
+
tropicalVarietyNewton() computes tropical variety of zero-dimensional ideal
|
|
36
|
+
tropicalLinkNewton() computes tropical variety that is polyhedral fan
|
|
37
|
+
and has codimension one lineality space
|
|
38
|
+
";
|
|
39
|
+
|
|
40
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
41
|
+
|
|
42
|
+
LIB "gfan.lib";
|
|
43
|
+
LIB "tropical.lib";
|
|
44
|
+
LIB "triang.lib";
|
|
45
|
+
LIB "linalg.lib";
|
|
46
|
+
LIB "ring.lib";
|
|
47
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
48
|
+
|
|
49
|
+
proc setUniformizingParameter(number p)
|
|
50
|
+
"USAGE: setUniformizingParameter(p); p number
|
|
51
|
+
RETURN: none, sets the uniformizing parameter as p
|
|
52
|
+
ASSUME: char(K)==0 and p prime number or
|
|
53
|
+
trdeg(K)>0 and p transcendental variable or
|
|
54
|
+
p==0
|
|
55
|
+
EXAMPLE: example setUniformizingParameter; shows an example
|
|
56
|
+
"
|
|
57
|
+
{
|
|
58
|
+
// kill uniformizingParemeter if previously defined
|
|
59
|
+
if (defined(uniformizingParameter))
|
|
60
|
+
{
|
|
61
|
+
kill uniformizingParameter;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// input sanity check
|
|
65
|
+
if (p!=0)
|
|
66
|
+
{
|
|
67
|
+
if (pardeg(p)==0)
|
|
68
|
+
{
|
|
69
|
+
if(char(basering)!=0 && prime(int(p))!=p)
|
|
70
|
+
{
|
|
71
|
+
ERROR("setUniformizingParameter: unexpected parameters");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else
|
|
75
|
+
{
|
|
76
|
+
if (size(p)!=2 || pardeg(p)!=1)
|
|
77
|
+
{
|
|
78
|
+
ERROR("setUniformizingParameter: unexpected parameters");
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// set uniformizingParameter and export it
|
|
84
|
+
number uniformizingParameter = p;
|
|
85
|
+
export(uniformizingParameter);
|
|
86
|
+
}
|
|
87
|
+
example
|
|
88
|
+
{ "EXAMPLE:"; echo = 2;
|
|
89
|
+
// poor man's polynomials over Puiseux series:
|
|
90
|
+
ring r = (0,t),x,dp;
|
|
91
|
+
setUniformizingParameter(t);
|
|
92
|
+
val(t2+t3);
|
|
93
|
+
val(t^-2+t^-3);
|
|
94
|
+
// poor man's polynomials over p-adic numbers:
|
|
95
|
+
ring s = 0,x,dp;
|
|
96
|
+
setUniformizingParameter(2);
|
|
97
|
+
val(12);
|
|
98
|
+
val(1/12);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
proc val(number c)
|
|
102
|
+
"USAGE: val(c); c number
|
|
103
|
+
RETURN: int, the valuation of a element in the ground field
|
|
104
|
+
ASSUME: uniformizingParameter is set and c!=0
|
|
105
|
+
EXAMPLE: example val; shows an example
|
|
106
|
+
"
|
|
107
|
+
{
|
|
108
|
+
if (defined(uniformizingParameter)==0)
|
|
109
|
+
{
|
|
110
|
+
ERROR("val: uniformizingParameter not set");
|
|
111
|
+
}
|
|
112
|
+
if (c==0)
|
|
113
|
+
{
|
|
114
|
+
ERROR("val: input is 0");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if (uniformizingParameter==0)
|
|
118
|
+
{
|
|
119
|
+
return (0);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
int vc = 0;
|
|
123
|
+
if (pardeg(uniformizingParameter)>0)
|
|
124
|
+
{
|
|
125
|
+
def origin = basering;
|
|
126
|
+
number c_denom = denominator(c);
|
|
127
|
+
number c_num = numerator(c);
|
|
128
|
+
ring r_Val = create_ring(0, string(uniformizingParameter), "ds");
|
|
129
|
+
poly c_denom = imap(origin,c_denom);
|
|
130
|
+
poly c_num = imap(origin,c_num);
|
|
131
|
+
vc = ord(c_num)-ord(c_denom);
|
|
132
|
+
setring origin;
|
|
133
|
+
}
|
|
134
|
+
else
|
|
135
|
+
{
|
|
136
|
+
int c_denom = int(denominator(c));
|
|
137
|
+
int c_num = int(numerator(c));
|
|
138
|
+
int p = int(uniformizingParameter);
|
|
139
|
+
|
|
140
|
+
while (c_num mod p==0)
|
|
141
|
+
{
|
|
142
|
+
c_num = c_num div p;
|
|
143
|
+
vc++;
|
|
144
|
+
}
|
|
145
|
+
while (c_denom mod p==0)
|
|
146
|
+
{
|
|
147
|
+
c_denom = c_denom div p;
|
|
148
|
+
vc--;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
return (vc);
|
|
153
|
+
}
|
|
154
|
+
example
|
|
155
|
+
{ "EXAMPLE:"; echo = 2;
|
|
156
|
+
// poor man's polynomials over Puiseux series:
|
|
157
|
+
ring r = (0,t),x,dp;
|
|
158
|
+
setUniformizingParameter(t);
|
|
159
|
+
val(t2+t3);
|
|
160
|
+
val(t^-2+t^-3);
|
|
161
|
+
// poor man's polynomials over p-adic numbers:
|
|
162
|
+
ring s = 0,x,dp;
|
|
163
|
+
setUniformizingParameter(2);
|
|
164
|
+
val(12);
|
|
165
|
+
val(1/12);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
proc newtonPolygonNegSlopes(poly g, list #)
|
|
169
|
+
"USAGE: newtonPolygonNegSlopes(g,b); g poly, b int
|
|
170
|
+
RETURN: list, the negative slopes of the Newton Polygon of g
|
|
171
|
+
if b==1, computes root (type poly) instead if (easily) possible
|
|
172
|
+
ASSUME: uniformizingParameter is set and g univariate
|
|
173
|
+
EXAMPLE: example newtonPolygonNegSlopes; shows an example
|
|
174
|
+
"
|
|
175
|
+
{
|
|
176
|
+
if (size(#)>0)
|
|
177
|
+
{
|
|
178
|
+
if (#[1]==1 && size(g)==2)
|
|
179
|
+
{
|
|
180
|
+
if (deg(g[1])==1 && deg(g[2])==0)
|
|
181
|
+
{
|
|
182
|
+
poly root = -leadcoef(g[2])/leadcoef(g[1]);
|
|
183
|
+
return (list(root));
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (defined(uniformizingParameter)==0)
|
|
189
|
+
{
|
|
190
|
+
ERROR("newtonPolygonNegSlopes: uniformizingParameter not set");
|
|
191
|
+
}
|
|
192
|
+
int k = size(g);
|
|
193
|
+
intmat M [k+1][3];
|
|
194
|
+
for (int i=1; i<=k; i++)
|
|
195
|
+
{
|
|
196
|
+
M[i,1] = 1;
|
|
197
|
+
M[i,2] = deg(g[i]);
|
|
198
|
+
M[i,3] = val(leadcoef(g[i]));
|
|
199
|
+
}
|
|
200
|
+
M[k+1,1] = 0;
|
|
201
|
+
M[k+1,2] = 0;
|
|
202
|
+
M[k+1,3] = 1;
|
|
203
|
+
cone Delta = coneViaPoints(M);
|
|
204
|
+
bigintmat F = facets(Delta);
|
|
205
|
+
|
|
206
|
+
list slopes;
|
|
207
|
+
number slope;
|
|
208
|
+
for (i=1; i<=nrows(F); i++)
|
|
209
|
+
{
|
|
210
|
+
if (F[i,3]!=0)
|
|
211
|
+
{
|
|
212
|
+
slope = number(F[i,2])/number(F[i,3]);
|
|
213
|
+
slopes[size(slopes)+1] = slope;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
return (slopes);
|
|
217
|
+
}
|
|
218
|
+
example
|
|
219
|
+
{ "EXAMPLE:"; echo = 2;
|
|
220
|
+
ring r = (0,t),x,dp;
|
|
221
|
+
setUniformizingParameter(t);
|
|
222
|
+
poly g = tx2+x+1;
|
|
223
|
+
newtonPolygonNegSlopes(g);
|
|
224
|
+
// poor man's polynomials over p-adic numbers:
|
|
225
|
+
ring s = 0,x,dp;
|
|
226
|
+
setUniformizingParameter(3);
|
|
227
|
+
poly g = x2+9x+1;
|
|
228
|
+
newtonPolygonNegSlopes(g);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
static proc listDot(list VV, intvec expv)
|
|
233
|
+
{
|
|
234
|
+
number ld;
|
|
235
|
+
for (int i=1; i<=size(expv); i++)
|
|
236
|
+
{
|
|
237
|
+
if (expv[i]>0)
|
|
238
|
+
{
|
|
239
|
+
if (typeof(VV[i])=="number")
|
|
240
|
+
{
|
|
241
|
+
ld = ld + VV[i]*expv[i];
|
|
242
|
+
}
|
|
243
|
+
else
|
|
244
|
+
{
|
|
245
|
+
ERROR("listDot: unknown or invalid relevant entry");
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
return (ld);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
static proc lexSmallestVariableIndex(poly g)
|
|
254
|
+
{
|
|
255
|
+
intvec alpha = leadexp(g);
|
|
256
|
+
for (int i=1; i<=nvars(basering); i++)
|
|
257
|
+
{
|
|
258
|
+
if (alpha[i]>0)
|
|
259
|
+
{
|
|
260
|
+
return (i);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return (-1);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
static proc numbersLessThanAsRationalNumbers(number a, number b)
|
|
267
|
+
{
|
|
268
|
+
int a_num = int(numerator(a));
|
|
269
|
+
int a_denom = int(denominator(a));
|
|
270
|
+
int b_num = int(numerator(b));
|
|
271
|
+
int b_denom = int(denominator(b));
|
|
272
|
+
return (a_num*b_denom-b_num*a_denom<0);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
static proc expectedValuation(poly h, list VV)
|
|
276
|
+
{
|
|
277
|
+
number vh = val(leadcoef(h[1]))+listDot(VV,leadexp(h[1]));
|
|
278
|
+
number vhh;
|
|
279
|
+
int amb = 0;
|
|
280
|
+
for (int i=2; i<=size(h); i++)
|
|
281
|
+
{
|
|
282
|
+
vhh = val(leadcoef(h[i]))+listDot(VV,leadexp(h[i]));
|
|
283
|
+
if (vh == vhh)
|
|
284
|
+
{
|
|
285
|
+
amb = 1;
|
|
286
|
+
}
|
|
287
|
+
if (numbersLessThanAsRationalNumbers(vhh,vh))
|
|
288
|
+
{
|
|
289
|
+
vh = vhh;
|
|
290
|
+
amb = 0;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
if (amb > 0)
|
|
294
|
+
{
|
|
295
|
+
"h:"; h;
|
|
296
|
+
"VV:"; VV;
|
|
297
|
+
ERROR("expectedValuation: valuation ambiguous");
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
return (vh);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
static proc expectedNewtonPolygonNegSlopes(poly g, list VV, list #)
|
|
304
|
+
{
|
|
305
|
+
int k = size(VV);
|
|
306
|
+
for (int i=1; i<=size(VV); i++)
|
|
307
|
+
{
|
|
308
|
+
if (typeof(VV[i])=="poly")
|
|
309
|
+
{
|
|
310
|
+
g = subst(g,var(i),VV[i]);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
if (size(#)>0)
|
|
315
|
+
{
|
|
316
|
+
if (#[1]==1 && size(g)==2)
|
|
317
|
+
{
|
|
318
|
+
if (deg(g[1])==1 && deg(g[2])==0)
|
|
319
|
+
{
|
|
320
|
+
poly root = -leadcoef(g[2])/leadcoef(g[1]);
|
|
321
|
+
return (list(root));
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
int n = lexSmallestVariableIndex(g);
|
|
327
|
+
matrix G = coef(g,var(n));
|
|
328
|
+
|
|
329
|
+
k = ncols(G);
|
|
330
|
+
intmat M[k+1][3];
|
|
331
|
+
number vh;
|
|
332
|
+
for (i=1; i<=k; i++)
|
|
333
|
+
{
|
|
334
|
+
vh = expectedValuation(G[2,i],VV);
|
|
335
|
+
M[i,1] = int(denominator(vh));
|
|
336
|
+
M[i,2] = deg(G[1,i]);
|
|
337
|
+
M[i,3] = int(numerator(vh));
|
|
338
|
+
}
|
|
339
|
+
M[k+1,1] = 0;
|
|
340
|
+
M[k+1,2] = 0;
|
|
341
|
+
M[k+1,3] = 1;
|
|
342
|
+
|
|
343
|
+
cone Delta = coneViaPoints(M);
|
|
344
|
+
bigintmat F = facets(Delta);
|
|
345
|
+
|
|
346
|
+
list slopes;
|
|
347
|
+
number slope;
|
|
348
|
+
for (i=1; i<=nrows(F); i++)
|
|
349
|
+
{
|
|
350
|
+
if (F[i,3]!=0)
|
|
351
|
+
{
|
|
352
|
+
slope = number(F[i,2])/number(F[i,3]);
|
|
353
|
+
slopes[size(slopes)+1] = slope;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
return (slopes);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
static proc randomValuedNumber(list #)
|
|
361
|
+
{
|
|
362
|
+
int n = 99;
|
|
363
|
+
if (size(#)>0)
|
|
364
|
+
{
|
|
365
|
+
n = #[1];
|
|
366
|
+
}
|
|
367
|
+
int v = random(0,n);
|
|
368
|
+
|
|
369
|
+
number c = random(1,99)*uniformizingParameter^v;
|
|
370
|
+
c = c+random(0,99)*uniformizingParameter^(v+random(0,n div 3));
|
|
371
|
+
c = c+random(0,99)*uniformizingParameter^(v+random(0,n div 3));
|
|
372
|
+
|
|
373
|
+
return (c);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
static proc listOfNumbersToMatrix(list L)
|
|
378
|
+
{
|
|
379
|
+
int k = size(L);
|
|
380
|
+
matrix Lmat[1][k];
|
|
381
|
+
for (int i=1; i<=k; i++)
|
|
382
|
+
{
|
|
383
|
+
if (typeof(L[i]) == "number")
|
|
384
|
+
{
|
|
385
|
+
Lmat[1,i] = L[i];
|
|
386
|
+
}
|
|
387
|
+
if (typeof(L[i]) == "poly")
|
|
388
|
+
{
|
|
389
|
+
Lmat[1,i] = val(number(L[i]));
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
return (Lmat);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
proc cccMatrixToPositiveIntvec(matrix L)
|
|
397
|
+
"USAGE: cccMatrixToPositiveIntvec(M); M matrix
|
|
398
|
+
RETURN: intvec, strictly positive equivalent as weight vector to row vector in M
|
|
399
|
+
ASSUME: constant coefficient case only,
|
|
400
|
+
will scale weight vector and add vectors of ones to it
|
|
401
|
+
EXAMPLE: example cccMatrixToPositiveIntvec; shows an example
|
|
402
|
+
"
|
|
403
|
+
{
|
|
404
|
+
int k = ncols(L);
|
|
405
|
+
intvec denoms;
|
|
406
|
+
intvec enums;
|
|
407
|
+
int denoms_gcd = int(denominator(number(L[1,1])));
|
|
408
|
+
int denoms_prod = int(denominator(number(L[1,1])));
|
|
409
|
+
for (int i=2; i<=k; i++)
|
|
410
|
+
{
|
|
411
|
+
denoms_gcd = gcd(denoms_gcd,int(denominator(number(L[1,i]))));
|
|
412
|
+
denoms_prod = denoms_prod*int(denominator(number(L[1,i])));
|
|
413
|
+
}
|
|
414
|
+
int denoms_lcm = denoms_prod div denoms_gcd;
|
|
415
|
+
|
|
416
|
+
intvec w;
|
|
417
|
+
for (i=1; i<=k; i++)
|
|
418
|
+
{
|
|
419
|
+
w[i] = int(number(L[1,i])*denoms_lcm);
|
|
420
|
+
}
|
|
421
|
+
return (addOneVectorUntilPositive(w));
|
|
422
|
+
}
|
|
423
|
+
example
|
|
424
|
+
{ "EXAMPLE:"; echo = 2;
|
|
425
|
+
ring r = (0,t),(p01,p02,p12,p03,p13,p23,p04,p14,p24,p34),dp;
|
|
426
|
+
number uniformizingParameter = t;
|
|
427
|
+
export(uniformizingParameter);
|
|
428
|
+
ideal I =
|
|
429
|
+
p23*p14-p13*p24+p12*p34,
|
|
430
|
+
p23*p04-p03*p24+p02*p34,
|
|
431
|
+
p13*p04-p03*p14+p01*p34,
|
|
432
|
+
p12*p04-p02*p14+p01*p24,
|
|
433
|
+
p12*p03-p02*p13+p01*p23;
|
|
434
|
+
system("--random",1337);
|
|
435
|
+
matrix p = tropicalPointNewton(I);
|
|
436
|
+
print(p);
|
|
437
|
+
intvec w = cccMatrixToPositiveIntvec(p);
|
|
438
|
+
print(w);
|
|
439
|
+
def s = switchRingsAndComputeInitialIdeal(I,w);
|
|
440
|
+
kill uniformizingParameter;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
static proc oneVector(int n)
|
|
444
|
+
{
|
|
445
|
+
intvec w;
|
|
446
|
+
for (int i=1; i<=n; i++)
|
|
447
|
+
{
|
|
448
|
+
w[i] = 1;
|
|
449
|
+
}
|
|
450
|
+
return (w);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
static proc addOneVectorUntilPositive(intvec w)
|
|
454
|
+
{
|
|
455
|
+
int n = size(w);
|
|
456
|
+
int w_min = w[1];
|
|
457
|
+
for (int i=2; i<=n; i++)
|
|
458
|
+
{
|
|
459
|
+
if (w[i]<w_min)
|
|
460
|
+
{
|
|
461
|
+
w_min = w[i];
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
return (w-(w_min-1)*oneVector(n));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
proc tropicalPointNewton(ideal I, list #)
|
|
468
|
+
"USAGE: tropicalPointsLasVegas(I); I ideal
|
|
469
|
+
RETURN: matrix, a matrix containing a tropical point as row vector
|
|
470
|
+
ASSUME: uniformizingParameter is set and I monomial free
|
|
471
|
+
NOTE: if printlevel sufficiently high will print intermediate data and timings
|
|
472
|
+
returns error if randomly chosen hyperplanes are not generic
|
|
473
|
+
EXAMPLE: example tropicalPointNewton; shows an example
|
|
474
|
+
"
|
|
475
|
+
{
|
|
476
|
+
if (defined(uniformizingParameter)==0)
|
|
477
|
+
{
|
|
478
|
+
ERROR("tropicalPointNewton: uniformizingParameter not set");
|
|
479
|
+
}
|
|
480
|
+
int ttotal = timer;
|
|
481
|
+
ring origin = basering;
|
|
482
|
+
|
|
483
|
+
int tindepSet = timer;
|
|
484
|
+
ideal stdI = std(I);
|
|
485
|
+
attrib(stdI,"isSB",1);
|
|
486
|
+
intvec u = indepSet(stdI);
|
|
487
|
+
tindepSet = timer - tindepSet;
|
|
488
|
+
dbprint("maximal independent set: "+string(u));
|
|
489
|
+
|
|
490
|
+
int n = nvars(origin);
|
|
491
|
+
ideal @map_im;
|
|
492
|
+
list VV;
|
|
493
|
+
number c;
|
|
494
|
+
list vars;
|
|
495
|
+
for (int i=1; i<=n; i++)
|
|
496
|
+
{
|
|
497
|
+
if (u[i]==0)
|
|
498
|
+
{
|
|
499
|
+
@map_im[i]=var(i);
|
|
500
|
+
vars=vars+list(string(var(i)));
|
|
501
|
+
}
|
|
502
|
+
else
|
|
503
|
+
{
|
|
504
|
+
c = randomValuedNumber(#);
|
|
505
|
+
VV[i]=number(val(c));
|
|
506
|
+
dbprint("substituting "+string(var(i))+" with number of valuation "+string(VV[i]));
|
|
507
|
+
@map_im[i]=c;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
map @map=basering,@map_im;
|
|
511
|
+
ideal J=@map(I);
|
|
512
|
+
|
|
513
|
+
ring s = create_ring(ring_list(origin)[1], vars, "lp", "no_minpoly");
|
|
514
|
+
ideal J = imap(origin,J);
|
|
515
|
+
int tstdlp = timer;
|
|
516
|
+
dbprint("computing triangular decomposition (picking first factor)");
|
|
517
|
+
J = satstd(J);
|
|
518
|
+
attrib(J,"isSB",1);
|
|
519
|
+
if (dim(J)>0)
|
|
520
|
+
{
|
|
521
|
+
dbprint("not zero-dimensional, please restart algorithm");
|
|
522
|
+
bigintmat O[1][1];
|
|
523
|
+
return (O);
|
|
524
|
+
}
|
|
525
|
+
if (!isTriangularSet(J))
|
|
526
|
+
{
|
|
527
|
+
J = triangL(J)[1];
|
|
528
|
+
}
|
|
529
|
+
tstdlp = timer - tstdlp;
|
|
530
|
+
|
|
531
|
+
dbprint("starting analysis of Newton polygons");
|
|
532
|
+
setring origin;
|
|
533
|
+
J = imap(s,J);
|
|
534
|
+
|
|
535
|
+
int tnewton = timer;
|
|
536
|
+
list Vlocal = newtonPolygonNegSlopes(J[1],1);
|
|
537
|
+
int l = lexSmallestVariableIndex(J[1]);
|
|
538
|
+
VV[l] = Vlocal[1];
|
|
539
|
+
dbprint("possible valuations for "+string(var(l))+" (picking first): "+string(Vlocal));
|
|
540
|
+
|
|
541
|
+
for (i=2; i<=size(J); i++)
|
|
542
|
+
{
|
|
543
|
+
Vlocal = expectedNewtonPolygonNegSlopes(J[i],VV,1);
|
|
544
|
+
l = lexSmallestVariableIndex(J[i]);
|
|
545
|
+
dbprint("possible valuations for "+string(var(l))+" (picking first): "+string(Vlocal));
|
|
546
|
+
VV[l] = Vlocal[1];
|
|
547
|
+
}
|
|
548
|
+
tnewton = timer-tnewton;
|
|
549
|
+
matrix w = -listOfNumbersToMatrix(VV);
|
|
550
|
+
|
|
551
|
+
ttotal = timer-ttotal;
|
|
552
|
+
dbprint("time used total: "+string(ttotal));
|
|
553
|
+
dbprint("computing independent set: "+string(tindepSet));
|
|
554
|
+
dbprint("computing triangular decomposition: "+string(tstdlp));
|
|
555
|
+
dbprint("analyzing newton polygons: "+string(tnewton));
|
|
556
|
+
|
|
557
|
+
return (w);
|
|
558
|
+
}
|
|
559
|
+
example
|
|
560
|
+
{ "EXAMPLE:"; echo = 2;
|
|
561
|
+
ring r = (0,t),(p01,p02,p12,p03,p13,p23,p04,p14,p24,p34),dp;
|
|
562
|
+
number uniformizingParameter = t;
|
|
563
|
+
export(uniformizingParameter);
|
|
564
|
+
ideal I =
|
|
565
|
+
p23*p14-p13*p24+p12*p34,
|
|
566
|
+
p23*p04-p03*p24+p02*p34,
|
|
567
|
+
p13*p04-p03*p14+p01*p34,
|
|
568
|
+
p12*p04-p02*p14+p01*p24,
|
|
569
|
+
p12*p03-p02*p13+p01*p23;
|
|
570
|
+
system("--random",1337);
|
|
571
|
+
printlevel = 3;
|
|
572
|
+
matrix p = tropicalPointNewton(I);
|
|
573
|
+
print(p);
|
|
574
|
+
intvec w = cccMatrixToPositiveIntvec(p);
|
|
575
|
+
print(w);
|
|
576
|
+
def s = switchRingsAndComputeInitialIdeal(I,w);
|
|
577
|
+
kill uniformizingParameter;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
static proc sumOfLeadExpV(poly f)
|
|
582
|
+
{
|
|
583
|
+
intvec expvSum;
|
|
584
|
+
expvSum = leadexp(f[1]);
|
|
585
|
+
for (int i=2; i<=size(f); i++)
|
|
586
|
+
{
|
|
587
|
+
expvSum = expvSum + leadexp(f[i]);
|
|
588
|
+
}
|
|
589
|
+
return (expvSum);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
static proc isTriangularSet(ideal F)
|
|
594
|
+
{
|
|
595
|
+
// checks whether F has the right amount of elements
|
|
596
|
+
int n = size(F);
|
|
597
|
+
if (n!=nvars(basering))
|
|
598
|
+
{
|
|
599
|
+
return (0);
|
|
600
|
+
}
|
|
601
|
+
int i,j;
|
|
602
|
+
poly fi;
|
|
603
|
+
intvec expvSum;
|
|
604
|
+
for (i=1; i<=n; i++)
|
|
605
|
+
{
|
|
606
|
+
fi = F[i];
|
|
607
|
+
expvSum = sumOfLeadExpV(fi);
|
|
608
|
+
// checks whether fi has monomial containing x_i
|
|
609
|
+
if (expvSum[n-i+1]==0)
|
|
610
|
+
{
|
|
611
|
+
return (0);
|
|
612
|
+
}
|
|
613
|
+
// checks whether fi has no monomial containing x_j, j>i
|
|
614
|
+
for (j=i+1; j<=n; j++)
|
|
615
|
+
{
|
|
616
|
+
if (expvSum[n-j+1]>0)
|
|
617
|
+
{
|
|
618
|
+
return (0);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
return (1);
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
proc tropicalVarietyNewton(ideal I)
|
|
627
|
+
"USAGE: tropicalVarietyNewton(I); I ideal
|
|
628
|
+
RETURN: matrix, a matrix containing all elements of the tropical variety
|
|
629
|
+
ASSUME: uniformizingParameter is set, I monomial free and zero-dimensional
|
|
630
|
+
EXAMPLE: example tropicalVarietyNewton; shows an example
|
|
631
|
+
"
|
|
632
|
+
{
|
|
633
|
+
if (defined(uniformizingParameter)==0)
|
|
634
|
+
{
|
|
635
|
+
ERROR("tropicalVarietyNewton: uniformizingParameter not set");
|
|
636
|
+
}
|
|
637
|
+
if(ordstr(basering)[1,2]!="lp")
|
|
638
|
+
{
|
|
639
|
+
ERROR("tropicalVarietyNewton: order must be lp");
|
|
640
|
+
}
|
|
641
|
+
|
|
642
|
+
if (!isTriangularSet(I))
|
|
643
|
+
{
|
|
644
|
+
I = satstd(I);
|
|
645
|
+
attrib(I,"isSB",1);
|
|
646
|
+
if (!isTriangularSet(I))
|
|
647
|
+
{
|
|
648
|
+
list triangI = triangL(I);
|
|
649
|
+
}
|
|
650
|
+
else
|
|
651
|
+
{
|
|
652
|
+
list triangI = I;
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
else
|
|
656
|
+
{
|
|
657
|
+
list triangI = I;
|
|
658
|
+
}
|
|
659
|
+
int i,ii,j,jj,k,l;
|
|
660
|
+
list Vlocal;
|
|
661
|
+
ideal J;
|
|
662
|
+
list VV;
|
|
663
|
+
for (ii=1; ii<=size(triangI); ii++)
|
|
664
|
+
{
|
|
665
|
+
J = triangI[ii];
|
|
666
|
+
Vlocal = newtonPolygonNegSlopes(J[1],1);
|
|
667
|
+
for (jj=1; jj<=size(Vlocal); jj++)
|
|
668
|
+
{
|
|
669
|
+
list Vjj;
|
|
670
|
+
l = lexSmallestVariableIndex(J[1]);
|
|
671
|
+
Vjj[l] = Vlocal[jj];
|
|
672
|
+
VV[jj] = Vjj;
|
|
673
|
+
kill Vjj;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
for (i=2; i<=size(J); i++)
|
|
677
|
+
{
|
|
678
|
+
k = size(VV);
|
|
679
|
+
for (jj=1; jj<=k; jj++)
|
|
680
|
+
{
|
|
681
|
+
list Vlocal(jj) = expectedNewtonPolygonNegSlopes(J[i],VV[jj],1);
|
|
682
|
+
}
|
|
683
|
+
l = lexSmallestVariableIndex(J[i]);
|
|
684
|
+
for (jj=1; jj<=k; jj++)
|
|
685
|
+
{
|
|
686
|
+
for (j=1; j<=size(Vlocal(jj)); j++)
|
|
687
|
+
{
|
|
688
|
+
if (j==1)
|
|
689
|
+
{
|
|
690
|
+
VV[jj][l] = Vlocal(jj)[1];
|
|
691
|
+
}
|
|
692
|
+
else
|
|
693
|
+
{
|
|
694
|
+
VV[size(VV)+1] = VV[jj];
|
|
695
|
+
VV[size(VV)][l] = Vlocal(jj)[j];
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
for (jj=1; jj<=k; jj++)
|
|
700
|
+
{
|
|
701
|
+
kill Vlocal(jj);
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
list TI;
|
|
706
|
+
list VVjj;
|
|
707
|
+
for (jj=1; jj<=size(VV); jj++)
|
|
708
|
+
{
|
|
709
|
+
VVjj = VV[jj];
|
|
710
|
+
matrix Vjj[1][size(VVjj)] = VVjj[1..size(VVjj)];
|
|
711
|
+
TI[jj] = -Vjj;
|
|
712
|
+
kill Vjj;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
return (TI);
|
|
716
|
+
}
|
|
717
|
+
example
|
|
718
|
+
{ "EXAMPLE:"; echo = 2;
|
|
719
|
+
ring r = (0,t),(z,y,x),lp;
|
|
720
|
+
number uniformizingParameter = t;
|
|
721
|
+
export(uniformizingParameter);
|
|
722
|
+
ideal I = tx2+x+1,txy2+xy+1,xyz+1;
|
|
723
|
+
list TI = tropicalVarietyNewton(I);
|
|
724
|
+
for (int i=1; i<=size(TI); i++)
|
|
725
|
+
{ print(TI[i]); }
|
|
726
|
+
kill uniformizingParameter;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
proc switchRingsAndComputeInitialIdeal(ideal I, intvec w)
|
|
731
|
+
"USAGE: switchRingsAndComputeInitialIdeal(I,w); I ideal, w intvec
|
|
732
|
+
RETURN: ring, a ring containing the initial ideal with respect to w
|
|
733
|
+
ASSUME: constant coefficient case and w strictly positive integer
|
|
734
|
+
NOTE: if printlevel sufficiently high will print timing
|
|
735
|
+
EXAMPLE: example switchRingsAndComputeInitialIdeal; shows an example
|
|
736
|
+
"
|
|
737
|
+
{
|
|
738
|
+
def origin = basering;
|
|
739
|
+
intvec wOne = oneVector(nvars(origin));
|
|
740
|
+
list ordering = list(list("a", wOne), list("wp", w));
|
|
741
|
+
ring rInitialIdeal = create_ring(ring_list(origin)[1], "("+varstr(origin)+")", ordering, "no_minpoly");
|
|
742
|
+
ideal I = imap(origin,I);
|
|
743
|
+
int tinI = timer;
|
|
744
|
+
option(redSB);
|
|
745
|
+
ideal stdI = satstd(I);
|
|
746
|
+
ideal inI = initial(stdI,w);
|
|
747
|
+
tinI = timer-tinI;
|
|
748
|
+
dbprint("time used computing initial ideal: "+string(tinI));
|
|
749
|
+
|
|
750
|
+
export(I);
|
|
751
|
+
export(stdI);
|
|
752
|
+
export(inI);
|
|
753
|
+
return (rInitialIdeal);
|
|
754
|
+
}
|
|
755
|
+
example
|
|
756
|
+
{ "EXAMPLE:"; echo = 2;
|
|
757
|
+
ring r = (0,t),(p01,p02,p12,p03,p13,p23,p04,p14,p24,p34),dp;
|
|
758
|
+
number uniformizingParameter = t;
|
|
759
|
+
export(uniformizingParameter);
|
|
760
|
+
ideal I =
|
|
761
|
+
p23*p14-p13*p24+p12*p34,
|
|
762
|
+
p23*p04-p03*p24+p02*p34,
|
|
763
|
+
p13*p04-p03*p14+p01*p34,
|
|
764
|
+
p12*p04-p02*p14+p01*p24,
|
|
765
|
+
p12*p03-p02*p13+p01*p23;
|
|
766
|
+
system("--random",1337);
|
|
767
|
+
printlevel = 3;
|
|
768
|
+
matrix p = tropicalPointNewton(I);
|
|
769
|
+
print(p);
|
|
770
|
+
intvec w = cccMatrixToPositiveIntvec(p);
|
|
771
|
+
print(w);
|
|
772
|
+
def s = switchRingsAndComputeInitialIdeal(I,w);
|
|
773
|
+
kill uniformizingParameter;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
static proc pivotIndices(matrix H)
|
|
777
|
+
{
|
|
778
|
+
intvec p;
|
|
779
|
+
p[ncols(H)]=0;
|
|
780
|
+
int pp;
|
|
781
|
+
int i,j;
|
|
782
|
+
for (i=1; i<=ncols(H); i++)
|
|
783
|
+
{
|
|
784
|
+
for (j=nrows(H); j>=0; j--)
|
|
785
|
+
{
|
|
786
|
+
if (H[j,i]!=0)
|
|
787
|
+
{
|
|
788
|
+
if (j>pp)
|
|
789
|
+
{
|
|
790
|
+
p[i] = 1;
|
|
791
|
+
pp = j;
|
|
792
|
+
}
|
|
793
|
+
break;
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
return (p);
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
static proc varstrIntvec(intvec p)
|
|
802
|
+
{
|
|
803
|
+
string s;
|
|
804
|
+
for (int i=1; i<=size(p); i++)
|
|
805
|
+
{
|
|
806
|
+
s = s+varstr(p[i])+",";
|
|
807
|
+
}
|
|
808
|
+
s = s[1..size(s)-1];
|
|
809
|
+
return (s);
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
static proc substRing(int i, string orderstring)
|
|
814
|
+
{
|
|
815
|
+
int n = nvars(basering);
|
|
816
|
+
if (i==1)
|
|
817
|
+
{
|
|
818
|
+
intvec p = 2..n;
|
|
819
|
+
}
|
|
820
|
+
else
|
|
821
|
+
{
|
|
822
|
+
if (i==n)
|
|
823
|
+
{
|
|
824
|
+
intvec p = 1..n-1;
|
|
825
|
+
}
|
|
826
|
+
else
|
|
827
|
+
{
|
|
828
|
+
intvec p = 1..i-1,i+1..n;
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
ring ssub = create_ring("(0,t)", "("+varstrIntvec(p)+")", orderstring);
|
|
832
|
+
return (ssub);
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
|
|
836
|
+
static proc extendTropNewton(matrix Ti, int i, number toAdd, intvec toFill)
|
|
837
|
+
{
|
|
838
|
+
// extend TI by one, inserting toAdd in position i
|
|
839
|
+
int n = ncols(Ti)+1;
|
|
840
|
+
matrix Tii[1][n];
|
|
841
|
+
Tii[1,i] = toAdd;
|
|
842
|
+
if (i==1)
|
|
843
|
+
{
|
|
844
|
+
Tii[1,2..n] = Ti[1,1..n-1];
|
|
845
|
+
}
|
|
846
|
+
else
|
|
847
|
+
{
|
|
848
|
+
if (i==n)
|
|
849
|
+
{
|
|
850
|
+
Tii[1,1..n-1] = Ti[1,1..n-1];
|
|
851
|
+
}
|
|
852
|
+
else
|
|
853
|
+
{
|
|
854
|
+
Tii[1,1..i-1] = Ti[1,1..i-1];
|
|
855
|
+
Tii[1,i+1..n] = Ti[1,i..n-1];
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
// extend Tii, inserting 0 in the 1 positions of toFill
|
|
859
|
+
n = n+sum(toFill);
|
|
860
|
+
matrix Tiii[1][n];
|
|
861
|
+
int TiiCounter=1;
|
|
862
|
+
for (int j=1; j<=n; j++)
|
|
863
|
+
{
|
|
864
|
+
if (toFill[j]==1)
|
|
865
|
+
{
|
|
866
|
+
Tiii[1,j]=0;
|
|
867
|
+
}
|
|
868
|
+
else
|
|
869
|
+
{
|
|
870
|
+
Tiii[1,j]=Tii[1,TiiCounter];
|
|
871
|
+
TiiCounter++;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
return (Tiii);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
static proc mergeTropNewton(list T, list Ti, int i, number toAdd, intvec toFill)
|
|
879
|
+
{
|
|
880
|
+
int ii,j;
|
|
881
|
+
matrix Tii;
|
|
882
|
+
for (ii=1; ii<=size(Ti); ii++)
|
|
883
|
+
{
|
|
884
|
+
Tii=extendTropNewton(Ti[ii],i,toAdd,toFill);
|
|
885
|
+
for (j=1; j<=size(T); j++)
|
|
886
|
+
{
|
|
887
|
+
if (T[j]==Tii)
|
|
888
|
+
{
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
if (j>size(T))
|
|
893
|
+
{
|
|
894
|
+
T[size(T)+1] = Tii;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
return (T);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
proc tropicalLinkNewton(ideal inI)
|
|
902
|
+
"USAGE: tropicalLinkNewton(inI); inI ideal
|
|
903
|
+
RETURN: matrix, a matrix containing generators of all rays of the tropical variety
|
|
904
|
+
ASSUME: constant coefficient case, inI is monomial free,
|
|
905
|
+
its tropical variety has codimension one lineality space and
|
|
906
|
+
is a polyhedral fan
|
|
907
|
+
NOTE: if printlevel sufficiently high will print intermediate results
|
|
908
|
+
EXAMPLE: example tropicalLinkNewton; shows an example
|
|
909
|
+
"
|
|
910
|
+
{
|
|
911
|
+
ring origin=basering;
|
|
912
|
+
dbprint("reducing to one-dimensional fan");
|
|
913
|
+
cone C0 = homogeneitySpace(inI);
|
|
914
|
+
intmat HH = intmat(generatorsOfLinealitySpace(C0));
|
|
915
|
+
matrix H = gauss_nf(HH);
|
|
916
|
+
|
|
917
|
+
intvec p = pivotIndices(H);
|
|
918
|
+
string resVars;
|
|
919
|
+
ideal resImage;
|
|
920
|
+
for (int i=1; i<=nvars(basering); i++)
|
|
921
|
+
{
|
|
922
|
+
if (p[i]==1)
|
|
923
|
+
{
|
|
924
|
+
resImage[i]=1;
|
|
925
|
+
}
|
|
926
|
+
else
|
|
927
|
+
{
|
|
928
|
+
resImage[i]=var(i);
|
|
929
|
+
resVars = resVars+varstr(i)+",";
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
resVars = resVars[1..size(resVars)-1];
|
|
933
|
+
|
|
934
|
+
ring srestr = create_ring("("+string(char(origin))+",t)", "("+resVars+")", "dp");
|
|
935
|
+
number uniformizingParameter = t;
|
|
936
|
+
map resMap = origin,imap(origin,resImage);
|
|
937
|
+
ideal inI = resMap(inI);
|
|
938
|
+
inI = satstd(inI);
|
|
939
|
+
|
|
940
|
+
dbprint("intersecting with pairs of affine hyperplanes");
|
|
941
|
+
ideal substImagePos;
|
|
942
|
+
ideal substImageNeg;
|
|
943
|
+
int n = nvars(srestr);
|
|
944
|
+
list T;
|
|
945
|
+
int j;
|
|
946
|
+
for (i=1; i<=n; i++)
|
|
947
|
+
{
|
|
948
|
+
setring srestr;
|
|
949
|
+
substImagePos = maxideal(1);
|
|
950
|
+
substImagePos[i] = t;
|
|
951
|
+
substImageNeg = maxideal(1);
|
|
952
|
+
substImageNeg[i] = t^(-1);
|
|
953
|
+
|
|
954
|
+
def ssubstDP = substRing(i,"dp");
|
|
955
|
+
setring ssubstDP;
|
|
956
|
+
ideal substImagePos = imap(srestr,substImagePos);
|
|
957
|
+
map substMapPos = srestr,substImagePos;
|
|
958
|
+
ideal inIPos = substMapPos(inI);
|
|
959
|
+
if (dim(std(inIPos))<0)
|
|
960
|
+
{
|
|
961
|
+
setring srestr;
|
|
962
|
+
kill ssubstDP;
|
|
963
|
+
dbprint(string(i)+": empty");
|
|
964
|
+
i++;
|
|
965
|
+
continue;
|
|
966
|
+
}
|
|
967
|
+
dbprint(string(i)+": non-empty, computing tropical variety");
|
|
968
|
+
|
|
969
|
+
setring srestr;
|
|
970
|
+
kill ssubstDP;
|
|
971
|
+
def ssubstLP = substRing(i,"lp");
|
|
972
|
+
setring ssubstLP;
|
|
973
|
+
ideal substImagePos = imap(srestr,substImagePos);
|
|
974
|
+
map substMapPos = srestr,substImagePos;
|
|
975
|
+
ideal inIPos = std(substMapPos(inI));
|
|
976
|
+
number uniformizingParameter=t;
|
|
977
|
+
export(uniformizingParameter);
|
|
978
|
+
list Tpos = tropicalVarietyNewton(inIPos);
|
|
979
|
+
ideal substImageNeg = imap(srestr,substImageNeg);
|
|
980
|
+
map substMapNeg = srestr,substImageNeg;
|
|
981
|
+
ideal inINeg = std(substMapNeg(inI));
|
|
982
|
+
list Tneg = tropicalVarietyNewton(inINeg);
|
|
983
|
+
setring srestr;
|
|
984
|
+
list Tpos = imap(ssubstLP,Tpos);
|
|
985
|
+
list Tneg = imap(ssubstLP,Tneg);
|
|
986
|
+
kill ssubstLP;
|
|
987
|
+
T = mergeTropNewton(T,Tpos,i,number(1),p);
|
|
988
|
+
T = mergeTropNewton(T,Tneg,i,number(-1),p);
|
|
989
|
+
dbprint("total number of rays: "+string(size(T)));
|
|
990
|
+
kill Tpos;
|
|
991
|
+
kill Tneg;
|
|
992
|
+
}
|
|
993
|
+
setring origin;
|
|
994
|
+
return(imap(srestr,T));
|
|
995
|
+
}
|
|
996
|
+
example
|
|
997
|
+
{ "EXAMPLE:"; echo = 2;
|
|
998
|
+
// a 10 valent facet in tropical Grass(3,7)
|
|
999
|
+
ring r = (0,t),
|
|
1000
|
+
(p012,p013,p023,p123,p014,p024,p124,p034,p134,p234,
|
|
1001
|
+
p015,p025,p125,p035,p135,p235,p045,p145,p245,p345,
|
|
1002
|
+
p016,p026,p126,p036,p136,p236,p046,p146,p246,p346,
|
|
1003
|
+
p056,p156,p256,p356,p456),
|
|
1004
|
+
wp(4,7,5,7,4,4,4,7,5,7,2,1,2,4,4,4,2,1,2,4,7,5,7,7,
|
|
1005
|
+
5,7,7,5,7,4,4,4,4,4,4);
|
|
1006
|
+
number uniformizingParameter = t;
|
|
1007
|
+
export(uniformizingParameter);
|
|
1008
|
+
ideal inI =
|
|
1009
|
+
p345*p136+p134*p356, p125*p045+p015*p245, p124*p015-p014*p125,
|
|
1010
|
+
p135*p245-p125*p345, p135*p045+p015*p345, p124*p045+p014*p245,
|
|
1011
|
+
p024*p125-p012*p245, p145*p236-p124*p356, p124*p135-p123*p145,
|
|
1012
|
+
p024*p015+p012*p045, p134*p026+p023*p146-p024*p136,
|
|
1013
|
+
p145*p036+p014*p356, p014*p135-p013*p145, p234*p145+p124*p345,
|
|
1014
|
+
p034*p145-p014*p345, p024*p135-p012*p345, p125*p035+p015*p235,
|
|
1015
|
+
p235*p045-p035*p245, p234*p136-p134*p236, p134*p036-p034*p136,
|
|
1016
|
+
p146*p356-p136*p456, p135*p146-p134*p156,
|
|
1017
|
+
p135*p026+p023*p156+p012*p356, p124*p035+p014*p235,
|
|
1018
|
+
p123*p025+p012*p235, p013*p025-p012*p035, p345*p146+p134*p456,
|
|
1019
|
+
p125*p036+p015*p236, p345*p026-p023*p456+p024*p356,
|
|
1020
|
+
p123*p015-p013*p125, p234*p025-p024*p235, p034*p025-p024*p035,
|
|
1021
|
+
p234*p125+p123*p245, p245*p036-p045*p236, p123*p045+p013*p245,
|
|
1022
|
+
p034*p125-p013*p245, p234*p015+p013*p245, p245*p156+p125*p456,
|
|
1023
|
+
p034*p015+p013*p045, p045*p156-p015*p456, p135*p236-p123*p356,
|
|
1024
|
+
p235*p146-p134*p256, p135*p036+p013*p356, p124*p036+p014*p236,
|
|
1025
|
+
p123*p014-p013*p124, p035*p146-p134*p056, p145*p126+p124*p156,
|
|
1026
|
+
p234*p045-p034*p245, p235*p026+p023*p256-p025*p236,
|
|
1027
|
+
p145*p016+p014*p156, p035*p026+p023*p056-p025*p036,
|
|
1028
|
+
p345*p236+p234*p356, p234*p135+p123*p345, p345*p036+p034*p356,
|
|
1029
|
+
p034*p135-p013*p345, p345*p156+p135*p456, p124*p034+p014*p234,
|
|
1030
|
+
p145*p246-p124*p456, p123*p024+p012*p234, p145*p046+p014*p456,
|
|
1031
|
+
p013*p024-p012*p034, p024*p156+p012*p456, p125*p056+p015*p256,
|
|
1032
|
+
p245*p056-p045*p256, p236*p146-p136*p246, p134*p126+p123*p146,
|
|
1033
|
+
p136*p046-p036*p146, p235*p036-p035*p236, p134*p016+p013*p146,
|
|
1034
|
+
p123*p035+p013*p235, p235*p156-p135*p256,
|
|
1035
|
+
p123*p026-p023*p126+p012*p236, p135*p056-p035*p156,
|
|
1036
|
+
p023*p016-p013*p026+p012*p036, p124*p056+p014*p256,
|
|
1037
|
+
p234*p146-p134*p246, p025*p126-p012*p256, p134*p046-p034*p146,
|
|
1038
|
+
p025*p016+p012*p056, p234*p035-p034*p235, p345*p256+p235*p456,
|
|
1039
|
+
p234*p026+p023*p246-p024*p236, p345*p056+p035*p456,
|
|
1040
|
+
p034*p026+p023*p046-p024*p036, p125*p016-p015*p126,
|
|
1041
|
+
p025*p246-p024*p256, p025*p046-p024*p056, p245*p126-p125*p246,
|
|
1042
|
+
p125*p046+p015*p246, p045*p126+p015*p246, p245*p016-p015*p246,
|
|
1043
|
+
p045*p016-p015*p046, p123*p036+p013*p236, p236*p156+p126*p356,
|
|
1044
|
+
p135*p126+p123*p156, p036*p156-p016*p356, p135*p016+p013*p156,
|
|
1045
|
+
p124*p016-p014*p126, p235*p056-p035*p256, p245*p046-p045*p246,
|
|
1046
|
+
p234*p036-p034*p236, p123*p034+p013*p234, p246*p356-p236*p456,
|
|
1047
|
+
p234*p156-p123*p456, p135*p246-p123*p456, p345*p126-p123*p456,
|
|
1048
|
+
p046*p356-p036*p456, p034*p156+p013*p456, p135*p046+p013*p456,
|
|
1049
|
+
p345*p016-p013*p456, p124*p046+p014*p246, p024*p126-p012*p246,
|
|
1050
|
+
p024*p016+p012*p046, p345*p246+p234*p456, p345*p046+p034*p456,
|
|
1051
|
+
p235*p126+p123*p256, p236*p056-p036*p256, p123*p056+p013*p256,
|
|
1052
|
+
p035*p126-p013*p256, p235*p016+p013*p256, p035*p016+p013*p056,
|
|
1053
|
+
p235*p246-p234*p256, p234*p056-p034*p256, p035*p246-p034*p256,
|
|
1054
|
+
p235*p046-p034*p256, p035*p046-p034*p056, p126*p036+p016*p236,
|
|
1055
|
+
p123*p016-p013*p126, p234*p126+p123*p246, p236*p046-p036*p246,
|
|
1056
|
+
p123*p046+p013*p246, p034*p126-p013*p246, p234*p016+p013*p246,
|
|
1057
|
+
p246*p156+p126*p456, p034*p016+p013*p046, p046*p156-p016*p456,
|
|
1058
|
+
p234*p046-p034*p246, p126*p056+p016*p256, p246*p056-p046*p256,
|
|
1059
|
+
p126*p046+p016*p246, p024*p235*p145+p124*p025*p345,
|
|
1060
|
+
p024*p035*p145-p014*p025*p345, p123*p145*p245-p124*p125*p345,
|
|
1061
|
+
p013*p145*p245-p014*p125*p345, p013*p045*p145+p014*p015*p345,
|
|
1062
|
+
p024*p235*p136-p134*p025*p236, p123*p245*p136+p134*p125*p236,
|
|
1063
|
+
p013*p245*p136+p134*p015*p236, p034*p245*p136-p134*p045*p236,
|
|
1064
|
+
p134*p156*p356-p135*p136*p456, p123*p145*p146-p124*p134*p156,
|
|
1065
|
+
p013*p145*p146-p014*p134*p156, p013*p145*p026+p023*p014*p156+p012*p014*p356,
|
|
1066
|
+
p124*p025*p156+p012*p145*p256, p012*p145*p056-p014*p025*p156,
|
|
1067
|
+
p024*p145*p256-p124*p025*p456, p024*p145*p056+p014*p025*p456,
|
|
1068
|
+
p034*p235*p136-p134*p035*p236, p134*p256*p356-p235*p136*p456,
|
|
1069
|
+
p134*p056*p356-p035*p136*p456, p025*p036*p146-p024*p136*p056,
|
|
1070
|
+
p013*p125*p026-p023*p015*p126+p012*p015*p236,
|
|
1071
|
+
p123*p245*p146+p134*p125*p246, p013*p245*p146+p134*p015*p246,
|
|
1072
|
+
p013*p245*p026-p023*p015*p246-p012*p045*p236,
|
|
1073
|
+
p013*p045*p026-p023*p015*p046-p012*p045*p036,
|
|
1074
|
+
p034*p245*p146-p134*p045*p246, p013*p124*p026-p023*p014*p126+p012*p014*p236,
|
|
1075
|
+
p013*p145*p056-p014*p035*p156, p024*p256*p356-p025*p236*p456,
|
|
1076
|
+
p024*p056*p356-p025*p036*p456, p234*p256*p356-p235*p236*p456,
|
|
1077
|
+
p034*p256*p356-p035*p236*p456, p034*p056*p356-p035*p036*p456,
|
|
1078
|
+
p012*p235*p145*p245+p124*p025*p125*p345,
|
|
1079
|
+
p012*p035*p145*p245-p014*p025*p125*p345,
|
|
1080
|
+
p012*p035*p045*p145+p014*p015*p025*p345,
|
|
1081
|
+
p012*p235*p245*p136-p134*p025*p125*p236,
|
|
1082
|
+
p012*p035*p245*p136+p134*p015*p025*p236,
|
|
1083
|
+
p024*p035*p245*p136-p134*p025*p045*p236,
|
|
1084
|
+
p014*p025*p125*p156+p012*p015*p145*p256,
|
|
1085
|
+
p012*p145*p245*p256-p124*p025*p125*p456,
|
|
1086
|
+
p012*p045*p145*p256+p014*p025*p125*p456,
|
|
1087
|
+
p012*p245*p256*p356-p025*p125*p236*p456,
|
|
1088
|
+
p012*p045*p256*p356+p015*p025*p236*p456,
|
|
1089
|
+
p012*p045*p056*p356+p015*p025*p036*p456,
|
|
1090
|
+
p123*p245*p256*p356+p125*p235*p236*p456,
|
|
1091
|
+
p013*p245*p256*p356+p015*p235*p236*p456,
|
|
1092
|
+
p013*p045*p256*p356+p015*p035*p236*p456,
|
|
1093
|
+
p013*p045*p056*p356+p015*p035*p036*p456;
|
|
1094
|
+
system("--random",1337);
|
|
1095
|
+
printlevel = 3;
|
|
1096
|
+
list TinI = tropicalLinkNewton(inI);
|
|
1097
|
+
for (int i=1; i<=size(TinI); i++)
|
|
1098
|
+
{ print(TinI[i]); }
|
|
1099
|
+
}
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
// disabled routines to check characteristic-freeness of tropical points
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
// proc stepwiseSaturation(ideal I)
|
|
1107
|
+
// {
|
|
1108
|
+
// if (I!=1)
|
|
1109
|
+
// {
|
|
1110
|
+
// list variablesToBeSaturated;
|
|
1111
|
+
// int l = nvars(basering);
|
|
1112
|
+
// for (int i=1; i<=l; i++)
|
|
1113
|
+
// { variablesToBeSaturated[i]=l-i+1; }
|
|
1114
|
+
|
|
1115
|
+
// while (size(variablesToBeSaturated)>0)
|
|
1116
|
+
// {
|
|
1117
|
+
// dbprint("variablesToBeSaturated: "+string(variablesToBeSaturated));
|
|
1118
|
+
// I = saturateWithRespectToVariable(I,variablesToBeSaturated[1]);
|
|
1119
|
+
// variablesToBeSaturated = delete(variablesToBeSaturated,1);
|
|
1120
|
+
// if ((I==1) || (I==-1))
|
|
1121
|
+
// {
|
|
1122
|
+
// break;
|
|
1123
|
+
// }
|
|
1124
|
+
// }
|
|
1125
|
+
// }
|
|
1126
|
+
|
|
1127
|
+
// return (I);
|
|
1128
|
+
// }
|