passagemath-singular 10.6.31rc3__cp314-cp314-musllinux_1_2_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-singular might be problematic. Click here for more details.
- PySingular.cpython-314-x86_64-linux-musl.so +0 -0
- passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
- passagemath_singular-10.6.31rc3.dist-info/RECORD +493 -0
- passagemath_singular-10.6.31rc3.dist-info/WHEEL +5 -0
- passagemath_singular-10.6.31rc3.dist-info/top_level.txt +3 -0
- passagemath_singular.libs/libSingular-4-67059f19.4.1.so +0 -0
- passagemath_singular.libs/libcddgmp-30166d29.so.0.1.3 +0 -0
- passagemath_singular.libs/libfactory-4-9d37bcf4.4.1.so +0 -0
- passagemath_singular.libs/libflint-fd6f12fc.so.21.0.0 +0 -0
- passagemath_singular.libs/libgcc_s-0cd532bd.so.1 +0 -0
- passagemath_singular.libs/libgf2x-9e30c3e3.so.3.0.0 +0 -0
- passagemath_singular.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
- passagemath_singular.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
- passagemath_singular.libs/libgsl-42cda06f.so.28.0.0 +0 -0
- passagemath_singular.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
- passagemath_singular.libs/libncursesw-9c9e32c3.so.6.5 +0 -0
- passagemath_singular.libs/libntl-26885ca2.so.44.0.1 +0 -0
- passagemath_singular.libs/libomalloc-0-e9ff96db.9.6.so +0 -0
- passagemath_singular.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
- passagemath_singular.libs/libpolys-4-8bcf8e7d.4.1.so +0 -0
- passagemath_singular.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
- passagemath_singular.libs/libreadline-06542304.so.8.2 +0 -0
- passagemath_singular.libs/libsingular_resources-4-73bf7623.4.1.so +0 -0
- passagemath_singular.libs/libstdc++-5d72f927.so.6.0.33 +0 -0
- sage/algebras/all__sagemath_singular.py +3 -0
- sage/algebras/fusion_rings/all.py +19 -0
- sage/algebras/fusion_rings/f_matrix.py +2448 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +5 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +538 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +3 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +331 -0
- sage/algebras/fusion_rings/fusion_double.py +899 -0
- sage/algebras/fusion_rings/fusion_ring.py +1580 -0
- sage/algebras/fusion_rings/poly_tup_engine.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/poly_tup_engine.pxd +24 -0
- sage/algebras/fusion_rings/poly_tup_engine.pyx +579 -0
- sage/algebras/fusion_rings/shm_managers.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/fusion_rings/shm_managers.pxd +24 -0
- sage/algebras/fusion_rings/shm_managers.pyx +780 -0
- sage/algebras/letterplace/all.py +1 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.pxd +18 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.pyx +755 -0
- sage/algebras/letterplace/free_algebra_letterplace.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/letterplace/free_algebra_letterplace.pxd +35 -0
- sage/algebras/letterplace/free_algebra_letterplace.pyx +914 -0
- sage/algebras/letterplace/letterplace_ideal.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/letterplace/letterplace_ideal.pyx +408 -0
- sage/algebras/quatalg/all.py +2 -0
- sage/algebras/quatalg/quaternion_algebra.py +4778 -0
- sage/algebras/quatalg/quaternion_algebra_cython.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
- sage/algebras/quatalg/quaternion_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_element.pxd +29 -0
- sage/algebras/quatalg/quaternion_algebra_element.pyx +2176 -0
- sage/all__sagemath_singular.py +11 -0
- sage/ext_data/all__sagemath_singular.py +1 -0
- sage/ext_data/singular/function_field/core.lib +98 -0
- sage/interfaces/all__sagemath_singular.py +1 -0
- sage/interfaces/singular.py +2835 -0
- sage/libs/all__sagemath_singular.py +1 -0
- sage/libs/singular/__init__.py +1 -0
- sage/libs/singular/decl.pxd +1168 -0
- sage/libs/singular/function.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/function.pxd +87 -0
- sage/libs/singular/function.pyx +1901 -0
- sage/libs/singular/function_factory.py +61 -0
- sage/libs/singular/groebner_strategy.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/groebner_strategy.pxd +22 -0
- sage/libs/singular/groebner_strategy.pyx +582 -0
- sage/libs/singular/option.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/option.pyx +671 -0
- sage/libs/singular/polynomial.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/polynomial.pxd +39 -0
- sage/libs/singular/polynomial.pyx +661 -0
- sage/libs/singular/ring.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/ring.pxd +58 -0
- sage/libs/singular/ring.pyx +893 -0
- sage/libs/singular/singular.cpython-314-x86_64-linux-musl.so +0 -0
- sage/libs/singular/singular.pxd +72 -0
- sage/libs/singular/singular.pyx +1944 -0
- sage/libs/singular/standard_options.py +145 -0
- sage/matrix/all__sagemath_singular.py +1 -0
- sage/matrix/matrix_mpolynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
- sage/matrix/matrix_mpolynomial_dense.pxd +7 -0
- sage/matrix/matrix_mpolynomial_dense.pyx +615 -0
- sage/rings/all__sagemath_singular.py +1 -0
- sage/rings/function_field/all__sagemath_singular.py +1 -0
- sage/rings/function_field/derivations_polymod.py +911 -0
- sage/rings/function_field/element_polymod.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/function_field/element_polymod.pyx +406 -0
- sage/rings/function_field/function_field_polymod.py +2611 -0
- sage/rings/function_field/ideal_polymod.py +1775 -0
- sage/rings/function_field/order_polymod.py +1475 -0
- sage/rings/function_field/place_polymod.py +681 -0
- sage/rings/polynomial/all__sagemath_singular.py +1 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +5 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +339 -0
- sage/rings/polynomial/multi_polynomial_libsingular.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/multi_polynomial_libsingular.pxd +30 -0
- sage/rings/polynomial/multi_polynomial_libsingular.pyx +6277 -0
- sage/rings/polynomial/plural.cpython-314-x86_64-linux-musl.so +0 -0
- sage/rings/polynomial/plural.pxd +48 -0
- sage/rings/polynomial/plural.pyx +3171 -0
- sage/symbolic/all__sagemath_singular.py +1 -0
- sage/symbolic/comparison_impl.pxi +428 -0
- sage/symbolic/constants_c_impl.pxi +178 -0
- sage/symbolic/expression.cpython-314-x86_64-linux-musl.so +0 -0
- sage/symbolic/expression.pxd +7 -0
- sage/symbolic/expression.pyx +14200 -0
- sage/symbolic/getitem_impl.pxi +202 -0
- sage/symbolic/pynac.pxi +572 -0
- sage/symbolic/pynac_constant_impl.pxi +133 -0
- sage/symbolic/pynac_function_impl.pxi +206 -0
- sage/symbolic/pynac_impl.pxi +2576 -0
- sage/symbolic/pynac_wrap.h +124 -0
- sage/symbolic/series_impl.pxi +272 -0
- sage/symbolic/substitution_map_impl.pxi +94 -0
- sage_wheels/bin/ESingular +0 -0
- sage_wheels/bin/Singular +0 -0
- sage_wheels/bin/TSingular +0 -0
- sage_wheels/lib/singular/MOD/cohomo.la +41 -0
- sage_wheels/lib/singular/MOD/cohomo.so +0 -0
- sage_wheels/lib/singular/MOD/customstd.la +41 -0
- sage_wheels/lib/singular/MOD/customstd.so +0 -0
- sage_wheels/lib/singular/MOD/freealgebra.la +41 -0
- sage_wheels/lib/singular/MOD/freealgebra.so +0 -0
- sage_wheels/lib/singular/MOD/gfanlib.la +41 -0
- sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
- sage_wheels/lib/singular/MOD/gitfan.la +41 -0
- sage_wheels/lib/singular/MOD/gitfan.so +0 -0
- sage_wheels/lib/singular/MOD/interval.la +41 -0
- sage_wheels/lib/singular/MOD/interval.so +0 -0
- sage_wheels/lib/singular/MOD/loctriv.la +41 -0
- sage_wheels/lib/singular/MOD/loctriv.so +0 -0
- sage_wheels/lib/singular/MOD/machinelearning.la +41 -0
- sage_wheels/lib/singular/MOD/machinelearning.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldQ.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldQ.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldZp.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldZp.so +0 -0
- sage_wheels/lib/singular/MOD/partialgb.la +41 -0
- sage_wheels/lib/singular/MOD/partialgb.so +0 -0
- sage_wheels/lib/singular/MOD/pyobject.la +41 -0
- sage_wheels/lib/singular/MOD/pyobject.so +0 -0
- sage_wheels/lib/singular/MOD/singmathic.la +41 -0
- sage_wheels/lib/singular/MOD/singmathic.so +0 -0
- sage_wheels/lib/singular/MOD/sispasm.la +41 -0
- sage_wheels/lib/singular/MOD/sispasm.so +0 -0
- sage_wheels/lib/singular/MOD/subsets.la +41 -0
- sage_wheels/lib/singular/MOD/subsets.so +0 -0
- sage_wheels/lib/singular/MOD/systhreads.la +41 -0
- sage_wheels/lib/singular/MOD/systhreads.so +0 -0
- sage_wheels/lib/singular/MOD/syzextra.la +41 -0
- sage_wheels/lib/singular/MOD/syzextra.so +0 -0
- sage_wheels/libexec/singular/MOD/change_cost +0 -0
- sage_wheels/libexec/singular/MOD/singularsurf +11 -0
- sage_wheels/libexec/singular/MOD/singularsurf_jupyter +9 -0
- sage_wheels/libexec/singular/MOD/singularsurf_win +10 -0
- sage_wheels/libexec/singular/MOD/solve_IP +0 -0
- sage_wheels/libexec/singular/MOD/surfex +16 -0
- sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
- sage_wheels/share/factory/gftables/10201 +342 -0
- sage_wheels/share/factory/gftables/1024 +37 -0
- sage_wheels/share/factory/gftables/10609 +356 -0
- sage_wheels/share/factory/gftables/11449 +384 -0
- sage_wheels/share/factory/gftables/11881 +398 -0
- sage_wheels/share/factory/gftables/121 +6 -0
- sage_wheels/share/factory/gftables/12167 +408 -0
- sage_wheels/share/factory/gftables/125 +7 -0
- sage_wheels/share/factory/gftables/12769 +428 -0
- sage_wheels/share/factory/gftables/128 +7 -0
- sage_wheels/share/factory/gftables/1331 +47 -0
- sage_wheels/share/factory/gftables/1369 +48 -0
- sage_wheels/share/factory/gftables/14641 +490 -0
- sage_wheels/share/factory/gftables/15625 +523 -0
- sage_wheels/share/factory/gftables/16 +3 -0
- sage_wheels/share/factory/gftables/16129 +540 -0
- sage_wheels/share/factory/gftables/16384 +549 -0
- sage_wheels/share/factory/gftables/16807 +563 -0
- sage_wheels/share/factory/gftables/1681 +58 -0
- sage_wheels/share/factory/gftables/169 +8 -0
- sage_wheels/share/factory/gftables/17161 +574 -0
- sage_wheels/share/factory/gftables/1849 +64 -0
- sage_wheels/share/factory/gftables/18769 +628 -0
- sage_wheels/share/factory/gftables/19321 +646 -0
- sage_wheels/share/factory/gftables/19683 +659 -0
- sage_wheels/share/factory/gftables/2048 +71 -0
- sage_wheels/share/factory/gftables/2187 +75 -0
- sage_wheels/share/factory/gftables/2197 +76 -0
- sage_wheels/share/factory/gftables/2209 +76 -0
- sage_wheels/share/factory/gftables/22201 +742 -0
- sage_wheels/share/factory/gftables/22801 +762 -0
- sage_wheels/share/factory/gftables/2401 +82 -0
- sage_wheels/share/factory/gftables/243 +11 -0
- sage_wheels/share/factory/gftables/24389 +815 -0
- sage_wheels/share/factory/gftables/24649 +824 -0
- sage_wheels/share/factory/gftables/25 +3 -0
- sage_wheels/share/factory/gftables/256 +11 -0
- sage_wheels/share/factory/gftables/26569 +888 -0
- sage_wheels/share/factory/gftables/27 +3 -0
- sage_wheels/share/factory/gftables/27889 +932 -0
- sage_wheels/share/factory/gftables/2809 +96 -0
- sage_wheels/share/factory/gftables/28561 +954 -0
- sage_wheels/share/factory/gftables/289 +12 -0
- sage_wheels/share/factory/gftables/29791 +995 -0
- sage_wheels/share/factory/gftables/29929 +1000 -0
- sage_wheels/share/factory/gftables/3125 +107 -0
- sage_wheels/share/factory/gftables/32 +4 -0
- sage_wheels/share/factory/gftables/32041 +1070 -0
- sage_wheels/share/factory/gftables/32761 +1094 -0
- sage_wheels/share/factory/gftables/32768 +1095 -0
- sage_wheels/share/factory/gftables/343 +14 -0
- sage_wheels/share/factory/gftables/3481 +118 -0
- sage_wheels/share/factory/gftables/361 +14 -0
- sage_wheels/share/factory/gftables/36481 +1218 -0
- sage_wheels/share/factory/gftables/3721 +126 -0
- sage_wheels/share/factory/gftables/37249 +1244 -0
- sage_wheels/share/factory/gftables/38809 +1296 -0
- sage_wheels/share/factory/gftables/39601 +1322 -0
- sage_wheels/share/factory/gftables/4 +3 -0
- sage_wheels/share/factory/gftables/4096 +139 -0
- sage_wheels/share/factory/gftables/44521 +1486 -0
- sage_wheels/share/factory/gftables/4489 +152 -0
- sage_wheels/share/factory/gftables/49 +4 -0
- sage_wheels/share/factory/gftables/4913 +166 -0
- sage_wheels/share/factory/gftables/49729 +1660 -0
- sage_wheels/share/factory/gftables/5041 +170 -0
- sage_wheels/share/factory/gftables/50653 +1691 -0
- sage_wheels/share/factory/gftables/512 +20 -0
- sage_wheels/share/factory/gftables/51529 +1720 -0
- sage_wheels/share/factory/gftables/52441 +1750 -0
- sage_wheels/share/factory/gftables/529 +20 -0
- sage_wheels/share/factory/gftables/5329 +180 -0
- sage_wheels/share/factory/gftables/54289 +1812 -0
- sage_wheels/share/factory/gftables/57121 +1906 -0
- sage_wheels/share/factory/gftables/58081 +1938 -0
- sage_wheels/share/factory/gftables/59049 +1971 -0
- sage_wheels/share/factory/gftables/6241 +210 -0
- sage_wheels/share/factory/gftables/625 +23 -0
- sage_wheels/share/factory/gftables/63001 +2102 -0
- sage_wheels/share/factory/gftables/64 +5 -0
- sage_wheels/share/factory/gftables/6561 +221 -0
- sage_wheels/share/factory/gftables/6859 +231 -0
- sage_wheels/share/factory/gftables/6889 +232 -0
- sage_wheels/share/factory/gftables/729 +27 -0
- sage_wheels/share/factory/gftables/7921 +266 -0
- sage_wheels/share/factory/gftables/8 +3 -0
- sage_wheels/share/factory/gftables/81 +5 -0
- sage_wheels/share/factory/gftables/8192 +276 -0
- sage_wheels/share/factory/gftables/841 +30 -0
- sage_wheels/share/factory/gftables/9 +3 -0
- sage_wheels/share/factory/gftables/9409 +316 -0
- sage_wheels/share/factory/gftables/961 +34 -0
- sage_wheels/share/info/singular.info +191898 -0
- sage_wheels/share/singular/LIB/GND.lib +1359 -0
- sage_wheels/share/singular/LIB/JMBTest.lib +976 -0
- sage_wheels/share/singular/LIB/JMSConst.lib +1363 -0
- sage_wheels/share/singular/LIB/KVequiv.lib +699 -0
- sage_wheels/share/singular/LIB/SingularityDBM.lib +491 -0
- sage_wheels/share/singular/LIB/VecField.lib +1542 -0
- sage_wheels/share/singular/LIB/absfact.lib +959 -0
- sage_wheels/share/singular/LIB/ainvar.lib +730 -0
- sage_wheels/share/singular/LIB/aksaka.lib +419 -0
- sage_wheels/share/singular/LIB/alexpoly.lib +2542 -0
- sage_wheels/share/singular/LIB/algebra.lib +1193 -0
- sage_wheels/share/singular/LIB/all.lib +136 -0
- sage_wheels/share/singular/LIB/arcpoint.lib +514 -0
- sage_wheels/share/singular/LIB/arnold.lib +4553 -0
- sage_wheels/share/singular/LIB/arnoldclassify.lib +2058 -0
- sage_wheels/share/singular/LIB/arr.lib +3486 -0
- sage_wheels/share/singular/LIB/assprimeszerodim.lib +755 -0
- sage_wheels/share/singular/LIB/autgradalg.lib +3361 -0
- sage_wheels/share/singular/LIB/bfun.lib +1964 -0
- sage_wheels/share/singular/LIB/bimodules.lib +774 -0
- sage_wheels/share/singular/LIB/brillnoether.lib +226 -0
- sage_wheels/share/singular/LIB/brnoeth.lib +5017 -0
- sage_wheels/share/singular/LIB/central.lib +2169 -0
- sage_wheels/share/singular/LIB/chern.lib +4162 -0
- sage_wheels/share/singular/LIB/cimonom.lib +571 -0
- sage_wheels/share/singular/LIB/cisimplicial.lib +1835 -0
- sage_wheels/share/singular/LIB/classify.lib +3239 -0
- sage_wheels/share/singular/LIB/classify2.lib +1462 -0
- sage_wheels/share/singular/LIB/classifyMapGerms.lib +1515 -0
- sage_wheels/share/singular/LIB/classify_aeq.lib +3253 -0
- sage_wheels/share/singular/LIB/classifyceq.lib +2092 -0
- sage_wheels/share/singular/LIB/classifyci.lib +1133 -0
- sage_wheels/share/singular/LIB/combinat.lib +91 -0
- sage_wheels/share/singular/LIB/compregb.lib +276 -0
- sage_wheels/share/singular/LIB/control.lib +1636 -0
- sage_wheels/share/singular/LIB/crypto.lib +3795 -0
- sage_wheels/share/singular/LIB/curveInv.lib +667 -0
- sage_wheels/share/singular/LIB/curvepar.lib +1817 -0
- sage_wheels/share/singular/LIB/customstd.lib +100 -0
- sage_wheels/share/singular/LIB/deRham.lib +5979 -0
- sage_wheels/share/singular/LIB/decodegb.lib +2134 -0
- sage_wheels/share/singular/LIB/decomp.lib +1655 -0
- sage_wheels/share/singular/LIB/deflation.lib +872 -0
- sage_wheels/share/singular/LIB/deform.lib +925 -0
- sage_wheels/share/singular/LIB/difform.lib +3055 -0
- sage_wheels/share/singular/LIB/divisors.lib +750 -0
- sage_wheels/share/singular/LIB/dmod.lib +5817 -0
- sage_wheels/share/singular/LIB/dmodapp.lib +3269 -0
- sage_wheels/share/singular/LIB/dmodideal.lib +1211 -0
- sage_wheels/share/singular/LIB/dmodloc.lib +2645 -0
- sage_wheels/share/singular/LIB/dmodvar.lib +818 -0
- sage_wheels/share/singular/LIB/dummy.lib +17 -0
- sage_wheels/share/singular/LIB/elim.lib +1009 -0
- sage_wheels/share/singular/LIB/ellipticcovers.lib +548 -0
- sage_wheels/share/singular/LIB/enumpoints.lib +146 -0
- sage_wheels/share/singular/LIB/equising.lib +2127 -0
- sage_wheels/share/singular/LIB/ffmodstd.lib +2384 -0
- sage_wheels/share/singular/LIB/ffsolve.lib +1289 -0
- sage_wheels/share/singular/LIB/findifs.lib +778 -0
- sage_wheels/share/singular/LIB/finitediff.lib +1768 -0
- sage_wheels/share/singular/LIB/finvar.lib +7989 -0
- sage_wheels/share/singular/LIB/fpadim.lib +2429 -0
- sage_wheels/share/singular/LIB/fpalgebras.lib +1666 -0
- sage_wheels/share/singular/LIB/fpaprops.lib +1462 -0
- sage_wheels/share/singular/LIB/freegb.lib +3853 -0
- sage_wheels/share/singular/LIB/general.lib +1350 -0
- sage_wheels/share/singular/LIB/gfan.lib +1768 -0
- sage_wheels/share/singular/LIB/gitfan.lib +3130 -0
- sage_wheels/share/singular/LIB/gkdim.lib +99 -0
- sage_wheels/share/singular/LIB/gmspoly.lib +589 -0
- sage_wheels/share/singular/LIB/gmssing.lib +1739 -0
- sage_wheels/share/singular/LIB/goettsche.lib +909 -0
- sage_wheels/share/singular/LIB/graal.lib +1366 -0
- sage_wheels/share/singular/LIB/gradedModules.lib +2541 -0
- sage_wheels/share/singular/LIB/graphics.lib +360 -0
- sage_wheels/share/singular/LIB/grobcov.lib +7706 -0
- sage_wheels/share/singular/LIB/groups.lib +1123 -0
- sage_wheels/share/singular/LIB/grwalk.lib +507 -0
- sage_wheels/share/singular/LIB/hdepth.lib +194 -0
- sage_wheels/share/singular/LIB/help.cnf +57 -0
- sage_wheels/share/singular/LIB/hess.lib +1946 -0
- sage_wheels/share/singular/LIB/hnoether.lib +4292 -0
- sage_wheels/share/singular/LIB/hodge.lib +400 -0
- sage_wheels/share/singular/LIB/homolog.lib +1965 -0
- sage_wheels/share/singular/LIB/hyperel.lib +975 -0
- sage_wheels/share/singular/LIB/inout.lib +679 -0
- sage_wheels/share/singular/LIB/integralbasis.lib +6224 -0
- sage_wheels/share/singular/LIB/interval.lib +1418 -0
- sage_wheels/share/singular/LIB/intprog.lib +778 -0
- sage_wheels/share/singular/LIB/invar.lib +443 -0
- sage_wheels/share/singular/LIB/involut.lib +980 -0
- sage_wheels/share/singular/LIB/jacobson.lib +1215 -0
- sage_wheels/share/singular/LIB/kskernel.lib +534 -0
- sage_wheels/share/singular/LIB/latex.lib +3146 -0
- sage_wheels/share/singular/LIB/lejeune.lib +651 -0
- sage_wheels/share/singular/LIB/linalg.lib +2040 -0
- sage_wheels/share/singular/LIB/locnormal.lib +212 -0
- sage_wheels/share/singular/LIB/lrcalc.lib +526 -0
- sage_wheels/share/singular/LIB/makedbm.lib +294 -0
- sage_wheels/share/singular/LIB/mathml.lib +813 -0
- sage_wheels/share/singular/LIB/matrix.lib +1372 -0
- sage_wheels/share/singular/LIB/maxlike.lib +1132 -0
- sage_wheels/share/singular/LIB/methods.lib +212 -0
- sage_wheels/share/singular/LIB/moddiq.lib +322 -0
- sage_wheels/share/singular/LIB/modfinduni.lib +181 -0
- sage_wheels/share/singular/LIB/modnormal.lib +218 -0
- sage_wheels/share/singular/LIB/modprimdec.lib +1278 -0
- sage_wheels/share/singular/LIB/modquotient.lib +269 -0
- sage_wheels/share/singular/LIB/modstd.lib +1024 -0
- sage_wheels/share/singular/LIB/modular.lib +545 -0
- sage_wheels/share/singular/LIB/modules.lib +2561 -0
- sage_wheels/share/singular/LIB/modwalk.lib +609 -0
- sage_wheels/share/singular/LIB/mondromy.lib +1016 -0
- sage_wheels/share/singular/LIB/monomialideal.lib +3851 -0
- sage_wheels/share/singular/LIB/mprimdec.lib +2353 -0
- sage_wheels/share/singular/LIB/mregular.lib +1863 -0
- sage_wheels/share/singular/LIB/multigrading.lib +5629 -0
- sage_wheels/share/singular/LIB/ncHilb.lib +777 -0
- sage_wheels/share/singular/LIB/ncModslimgb.lib +791 -0
- sage_wheels/share/singular/LIB/ncalg.lib +16311 -0
- sage_wheels/share/singular/LIB/ncall.lib +31 -0
- sage_wheels/share/singular/LIB/ncdecomp.lib +468 -0
- sage_wheels/share/singular/LIB/ncfactor.lib +13371 -0
- sage_wheels/share/singular/LIB/ncfrac.lib +1023 -0
- sage_wheels/share/singular/LIB/nchilbert.lib +448 -0
- sage_wheels/share/singular/LIB/nchomolog.lib +759 -0
- sage_wheels/share/singular/LIB/ncloc.lib +361 -0
- sage_wheels/share/singular/LIB/ncpreim.lib +795 -0
- sage_wheels/share/singular/LIB/ncrat.lib +2849 -0
- sage_wheels/share/singular/LIB/nctools.lib +1887 -0
- sage_wheels/share/singular/LIB/nets.lib +1456 -0
- sage_wheels/share/singular/LIB/nfmodstd.lib +1000 -0
- sage_wheels/share/singular/LIB/nfmodsyz.lib +732 -0
- sage_wheels/share/singular/LIB/noether.lib +1106 -0
- sage_wheels/share/singular/LIB/normal.lib +8700 -0
- sage_wheels/share/singular/LIB/normaliz.lib +2226 -0
- sage_wheels/share/singular/LIB/ntsolve.lib +362 -0
- sage_wheels/share/singular/LIB/numerAlg.lib +560 -0
- sage_wheels/share/singular/LIB/numerDecom.lib +2261 -0
- sage_wheels/share/singular/LIB/olga.lib +1933 -0
- sage_wheels/share/singular/LIB/orbitparam.lib +351 -0
- sage_wheels/share/singular/LIB/parallel.lib +319 -0
- sage_wheels/share/singular/LIB/paraplanecurves.lib +3110 -0
- sage_wheels/share/singular/LIB/perron.lib +202 -0
- sage_wheels/share/singular/LIB/pfd.lib +2223 -0
- sage_wheels/share/singular/LIB/phindex.lib +642 -0
- sage_wheels/share/singular/LIB/pointid.lib +673 -0
- sage_wheels/share/singular/LIB/polybori.lib +1430 -0
- sage_wheels/share/singular/LIB/polyclass.lib +525 -0
- sage_wheels/share/singular/LIB/polylib.lib +1174 -0
- sage_wheels/share/singular/LIB/polymake.lib +1902 -0
- sage_wheels/share/singular/LIB/presolve.lib +1533 -0
- sage_wheels/share/singular/LIB/primdec.lib +9576 -0
- sage_wheels/share/singular/LIB/primdecint.lib +1782 -0
- sage_wheels/share/singular/LIB/primitiv.lib +401 -0
- sage_wheels/share/singular/LIB/puiseuxexpansions.lib +1631 -0
- sage_wheels/share/singular/LIB/purityfiltration.lib +960 -0
- sage_wheels/share/singular/LIB/qhmoduli.lib +1561 -0
- sage_wheels/share/singular/LIB/qmatrix.lib +293 -0
- sage_wheels/share/singular/LIB/random.lib +455 -0
- sage_wheels/share/singular/LIB/ratgb.lib +489 -0
- sage_wheels/share/singular/LIB/realclassify.lib +5759 -0
- sage_wheels/share/singular/LIB/realizationMatroids.lib +772 -0
- sage_wheels/share/singular/LIB/realrad.lib +1197 -0
- sage_wheels/share/singular/LIB/recover.lib +2628 -0
- sage_wheels/share/singular/LIB/redcgs.lib +3984 -0
- sage_wheels/share/singular/LIB/reesclos.lib +465 -0
- sage_wheels/share/singular/LIB/resbinomial.lib +2802 -0
- sage_wheels/share/singular/LIB/resgraph.lib +789 -0
- sage_wheels/share/singular/LIB/resjung.lib +820 -0
- sage_wheels/share/singular/LIB/resolve.lib +5110 -0
- sage_wheels/share/singular/LIB/resources.lib +170 -0
- sage_wheels/share/singular/LIB/reszeta.lib +5473 -0
- sage_wheels/share/singular/LIB/ring.lib +1328 -0
- sage_wheels/share/singular/LIB/ringgb.lib +343 -0
- sage_wheels/share/singular/LIB/rinvar.lib +1153 -0
- sage_wheels/share/singular/LIB/rootisolation.lib +1481 -0
- sage_wheels/share/singular/LIB/rootsmr.lib +709 -0
- sage_wheels/share/singular/LIB/rootsur.lib +886 -0
- sage_wheels/share/singular/LIB/rstandard.lib +607 -0
- sage_wheels/share/singular/LIB/rwalk.lib +336 -0
- sage_wheels/share/singular/LIB/sagbi.lib +1353 -0
- sage_wheels/share/singular/LIB/sagbiNormaliz.lib +1622 -0
- sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
- sage_wheels/share/singular/LIB/sagbigrob.lib +449 -0
- sage_wheels/share/singular/LIB/schreyer.lib +321 -0
- sage_wheels/share/singular/LIB/schubert.lib +2551 -0
- sage_wheels/share/singular/LIB/sets.lib +524 -0
- sage_wheels/share/singular/LIB/sheafcoh.lib +1663 -0
- sage_wheels/share/singular/LIB/signcond.lib +437 -0
- sage_wheels/share/singular/LIB/sing.lib +1094 -0
- sage_wheels/share/singular/LIB/sing4ti2.lib +419 -0
- sage_wheels/share/singular/LIB/solve.lib +2243 -0
- sage_wheels/share/singular/LIB/spcurve.lib +1077 -0
- sage_wheels/share/singular/LIB/spectrum.lib +62 -0
- sage_wheels/share/singular/LIB/sresext.lib +757 -0
- sage_wheels/share/singular/LIB/ssi.lib +143 -0
- sage_wheels/share/singular/LIB/standard.lib +2769 -0
- sage_wheels/share/singular/LIB/stanleyreisner.lib +473 -0
- sage_wheels/share/singular/LIB/stdmodule.lib +547 -0
- sage_wheels/share/singular/LIB/stratify.lib +1070 -0
- sage_wheels/share/singular/LIB/surf.lib +506 -0
- sage_wheels/share/singular/LIB/surf_jupyter.lib +223 -0
- sage_wheels/share/singular/LIB/surfacesignature.lib +522 -0
- sage_wheels/share/singular/LIB/surfex.lib +1462 -0
- sage_wheels/share/singular/LIB/swalk.lib +877 -0
- sage_wheels/share/singular/LIB/symodstd.lib +1570 -0
- sage_wheels/share/singular/LIB/systhreads.lib +74 -0
- sage_wheels/share/singular/LIB/tasks.lib +1324 -0
- sage_wheels/share/singular/LIB/tateProdCplxNegGrad.lib +2412 -0
- sage_wheels/share/singular/LIB/teachstd.lib +858 -0
- sage_wheels/share/singular/LIB/template.lib +116 -0
- sage_wheels/share/singular/LIB/toric.lib +1119 -0
- sage_wheels/share/singular/LIB/transformation.lib +116 -0
- sage_wheels/share/singular/LIB/triang.lib +1197 -0
- sage_wheels/share/singular/LIB/tropical.lib +8741 -0
- sage_wheels/share/singular/LIB/tropicalEllipticCovers.lib +2922 -0
- sage_wheels/share/singular/LIB/tropicalNewton.lib +1128 -0
- sage_wheels/share/singular/LIB/tst.lib +1108 -0
- sage_wheels/share/singular/LIB/weierstr.lib +241 -0
- sage_wheels/share/singular/LIB/zeroset.lib +1478 -0
- sage_wheels/share/singular/emacs/.emacs-general +184 -0
- sage_wheels/share/singular/emacs/.emacs-singular +234 -0
- sage_wheels/share/singular/emacs/COPYING +44 -0
- sage_wheels/share/singular/emacs/cmd-cmpl.el +241 -0
- sage_wheels/share/singular/emacs/ex-cmpl.el +1681 -0
- sage_wheels/share/singular/emacs/hlp-cmpl.el +4318 -0
- sage_wheels/share/singular/emacs/lib-cmpl.el +179 -0
- sage_wheels/share/singular/emacs/singular.el +4273 -0
- sage_wheels/share/singular/emacs/singular.xpm +39 -0
- sage_wheels/share/singular/singular.idx +5002 -0
|
@@ -0,0 +1,1289 @@
|
|
|
1
|
+
/////////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version ffsolve.lib 4.1.2.0 Feb_2019 "; // $Id: e8be7d9c0d91a741397580f298f87dc6df4d887c $
|
|
3
|
+
category="Symbolic-numerical solving";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: ffsolve.lib multivariate equation solving over finite fields
|
|
6
|
+
AUTHOR: Gergo Gyula Borus, borisz@borisz.net
|
|
7
|
+
KEYWORDS: multivariate equations; finite field
|
|
8
|
+
|
|
9
|
+
PROCEDURES:
|
|
10
|
+
ffsolve(); finite field solving using heuristically chosen method
|
|
11
|
+
PEsolve(); solve system of multivariate equations over finite field
|
|
12
|
+
simplesolver(); solver using modified exhausting search
|
|
13
|
+
GBsolve(); multivariate solver using Groebner-basis
|
|
14
|
+
XLsolve(); multivariate polynomial solver using linearization
|
|
15
|
+
ZZsolve(); solve system of multivariate equations over finite field
|
|
16
|
+
";
|
|
17
|
+
|
|
18
|
+
LIB "presolve.lib";
|
|
19
|
+
LIB "general.lib";
|
|
20
|
+
LIB "ring.lib";
|
|
21
|
+
LIB "standard.lib";
|
|
22
|
+
LIB "matrix.lib";
|
|
23
|
+
|
|
24
|
+
////////////////////////////////////////////////////////////////////
|
|
25
|
+
proc ffsolve(ideal equations, list #)
|
|
26
|
+
"USAGE: ffsolve(I[, L]); I ideal, L list of strings
|
|
27
|
+
RETURN: list L, the common roots of I as ideal
|
|
28
|
+
ASSUME: basering is a finite field of type (p^n,a)
|
|
29
|
+
"
|
|
30
|
+
{
|
|
31
|
+
list solutions, lSolvers, tempsols;
|
|
32
|
+
int i,j, k,n, R, found;
|
|
33
|
+
ideal factors, linfacs;
|
|
34
|
+
poly lp;
|
|
35
|
+
// check assumptions
|
|
36
|
+
if(npars(basering)>1)
|
|
37
|
+
{
|
|
38
|
+
ERROR("Basering must have at most one parameter");
|
|
39
|
+
}
|
|
40
|
+
if(char(basering)==0)
|
|
41
|
+
{
|
|
42
|
+
ERROR("Basering must have finite characteristic");
|
|
43
|
+
}
|
|
44
|
+
if(hasGFCoefficient(basering))
|
|
45
|
+
{
|
|
46
|
+
ERROR("not implemented for Galois fields");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if(size(#))
|
|
50
|
+
{
|
|
51
|
+
if(size(#)==1 and typeof(#[1])=="list")
|
|
52
|
+
{ lSolvers = #[1]; }
|
|
53
|
+
else
|
|
54
|
+
{ lSolvers = #; }
|
|
55
|
+
}
|
|
56
|
+
else
|
|
57
|
+
{
|
|
58
|
+
if(deg(equations) == 2)
|
|
59
|
+
{
|
|
60
|
+
lSolvers = "XLsolve", "PEsolve", "simplesolver", "GBsolve", "ZZsolve";
|
|
61
|
+
}
|
|
62
|
+
else
|
|
63
|
+
{
|
|
64
|
+
lSolvers = "PEsolve", "simplesolver", "GBsolve", "ZZsolve", "XLsolve";
|
|
65
|
+
}
|
|
66
|
+
if(deg(equations) == 1)
|
|
67
|
+
{
|
|
68
|
+
lSolvers = "GBsolve";
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
n = size(lSolvers);
|
|
72
|
+
R = random(1, n*(3*n+1) div 2);
|
|
73
|
+
string solver;
|
|
74
|
+
for(i=1;i<n+1;i++)
|
|
75
|
+
{
|
|
76
|
+
if(R<=(2*n+1-i))
|
|
77
|
+
{
|
|
78
|
+
solver = lSolvers[i];
|
|
79
|
+
}
|
|
80
|
+
else
|
|
81
|
+
{
|
|
82
|
+
R=R-(2*n+1-i);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
if(nvars(basering)==1)
|
|
87
|
+
{
|
|
88
|
+
return(facstd(equations));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// search for the first univariate polynomial
|
|
92
|
+
found = 0;
|
|
93
|
+
for(i=1; i<=ncols(equations); i++)
|
|
94
|
+
{
|
|
95
|
+
if(univariate(equations[i])>0)
|
|
96
|
+
{
|
|
97
|
+
factors=factorize(equations[i],1);
|
|
98
|
+
for(j=1; j<=ncols(factors); j++)
|
|
99
|
+
{
|
|
100
|
+
if(deg(factors[j])==1)
|
|
101
|
+
{
|
|
102
|
+
linfacs[size(linfacs)+1] = factors[j];
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if(deg(linfacs[1])>0)
|
|
106
|
+
{
|
|
107
|
+
found=1;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
// if there is, collect its the linear factors
|
|
113
|
+
if(found)
|
|
114
|
+
{
|
|
115
|
+
// substitute the root and call recursively
|
|
116
|
+
ideal neweqs, invmapideal, ti;
|
|
117
|
+
map invmap;
|
|
118
|
+
for(k=1; k<=ncols(linfacs); k++)
|
|
119
|
+
{
|
|
120
|
+
lp = linfacs[k];
|
|
121
|
+
neweqs = reduce(equations, lp);
|
|
122
|
+
|
|
123
|
+
intvec varexp = leadexp(lp);
|
|
124
|
+
def original_ring = basering;
|
|
125
|
+
def newRing = clonering(nvars(original_ring)-1);
|
|
126
|
+
setring newRing;
|
|
127
|
+
ideal mappingIdeal;
|
|
128
|
+
j=1;
|
|
129
|
+
for(i=1; i<=size(varexp); i++)
|
|
130
|
+
{
|
|
131
|
+
if(varexp[i])
|
|
132
|
+
{
|
|
133
|
+
mappingIdeal[i] = 0;
|
|
134
|
+
}
|
|
135
|
+
else
|
|
136
|
+
{
|
|
137
|
+
mappingIdeal[i] = var(j);
|
|
138
|
+
j++;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
map recmap = original_ring, mappingIdeal;
|
|
142
|
+
list tsols = ffsolve(recmap(neweqs), lSolvers);
|
|
143
|
+
if(size(tsols)==0)
|
|
144
|
+
{
|
|
145
|
+
tsols = list(ideal(1));
|
|
146
|
+
}
|
|
147
|
+
setring original_ring;
|
|
148
|
+
j=1;
|
|
149
|
+
for(i=1;i<=size(varexp);i++)
|
|
150
|
+
{
|
|
151
|
+
if(varexp[i]==0)
|
|
152
|
+
{
|
|
153
|
+
invmapideal[j] = var(i);
|
|
154
|
+
j++;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
invmap = newRing, invmapideal;
|
|
158
|
+
tempsols = invmap(tsols);
|
|
159
|
+
|
|
160
|
+
// combine the solutions
|
|
161
|
+
for(j=1; j<=size(tempsols); j++)
|
|
162
|
+
{
|
|
163
|
+
ti = std(tempsols[j]+lp);
|
|
164
|
+
if(deg(ti)>0)
|
|
165
|
+
{
|
|
166
|
+
solutions = insert(solutions,ti);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
else
|
|
172
|
+
{
|
|
173
|
+
execute("solutions="+solver+"(equations);") ;
|
|
174
|
+
}
|
|
175
|
+
return(solutions);
|
|
176
|
+
}
|
|
177
|
+
example
|
|
178
|
+
{
|
|
179
|
+
"EXAMPLE:";echo=2;
|
|
180
|
+
ring R = (2,a),x(1..3),lp;
|
|
181
|
+
minpoly=a2+a+1;
|
|
182
|
+
ideal I;
|
|
183
|
+
I[1]=x(1)^2*x(2)+(a)*x(1)*x(2)^2+(a+1);
|
|
184
|
+
I[2]=x(1)^2*x(2)*x(3)^2+(a)*x(1);
|
|
185
|
+
I[3]=(a+1)*x(1)*x(3)+(a+1)*x(1);
|
|
186
|
+
ffsolve(I);
|
|
187
|
+
}
|
|
188
|
+
////////////////////////////////////////////////////////////////////
|
|
189
|
+
proc PEsolve(ideal L, list #)
|
|
190
|
+
"USAGE: PEsolve(I[, i]); I ideal, i optional integer
|
|
191
|
+
solve I (system of multivariate equations) over a
|
|
192
|
+
finite field using an equvalence property when i is
|
|
193
|
+
not given or set to 2, otherwise if i is set to 0
|
|
194
|
+
then check whether common roots exists
|
|
195
|
+
RETURN: list if optional parameter is not given or set to 2,
|
|
196
|
+
integer if optional is set to 0
|
|
197
|
+
ASSUME: basering is a finite field of type (p^n,a)
|
|
198
|
+
NOTE: When the optional parameter is set to 0, speoff only
|
|
199
|
+
checks if I has common roots, then return 1, otherwise
|
|
200
|
+
return 0.
|
|
201
|
+
"
|
|
202
|
+
{
|
|
203
|
+
int mode, i,j;
|
|
204
|
+
list results, rs, start;
|
|
205
|
+
poly g;
|
|
206
|
+
// check assumptions
|
|
207
|
+
if(npars(basering)>1)
|
|
208
|
+
{
|
|
209
|
+
ERROR("Basering must have at most one parameter");
|
|
210
|
+
}
|
|
211
|
+
if(char(basering)==0)
|
|
212
|
+
{
|
|
213
|
+
ERROR("Basering must have finite characteristic");
|
|
214
|
+
}
|
|
215
|
+
if(hasGFCoefficient(basering))
|
|
216
|
+
{
|
|
217
|
+
ERROR("not implemented for Galois fields");
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
if( size(#) > 0 )
|
|
221
|
+
{
|
|
222
|
+
mode = #[1];
|
|
223
|
+
}
|
|
224
|
+
else
|
|
225
|
+
{
|
|
226
|
+
mode = 2;
|
|
227
|
+
}
|
|
228
|
+
L = simplify(L,15);
|
|
229
|
+
g = productOfEqs( L );
|
|
230
|
+
|
|
231
|
+
if(g == 0)
|
|
232
|
+
{
|
|
233
|
+
if(mode==0)
|
|
234
|
+
{
|
|
235
|
+
return(0);
|
|
236
|
+
}
|
|
237
|
+
return( list() );
|
|
238
|
+
}
|
|
239
|
+
if(g == 1)
|
|
240
|
+
{
|
|
241
|
+
list vectors = every_vector();
|
|
242
|
+
for(j=1; j<=size(vectors); j++)
|
|
243
|
+
{
|
|
244
|
+
ideal res;
|
|
245
|
+
for(i=1; i<=nvars(basering); i++)
|
|
246
|
+
{
|
|
247
|
+
res[i] = var(i)-vectors[j][i];
|
|
248
|
+
}
|
|
249
|
+
results[size(results)+1] = std(res);
|
|
250
|
+
}
|
|
251
|
+
return( results );
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if( mode == 0 )
|
|
255
|
+
{
|
|
256
|
+
return( 1 );
|
|
257
|
+
}
|
|
258
|
+
else
|
|
259
|
+
{
|
|
260
|
+
for(i=1; i<=nvars(basering); i++)
|
|
261
|
+
{
|
|
262
|
+
start[i] = 0:order_of_extension();
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
if( mode == 1)
|
|
266
|
+
{
|
|
267
|
+
results[size(results)+1] = melyseg(g, start);
|
|
268
|
+
}
|
|
269
|
+
else
|
|
270
|
+
{
|
|
271
|
+
while(1)
|
|
272
|
+
{
|
|
273
|
+
start = melyseg(g, start);
|
|
274
|
+
if( size(start) > 0 )
|
|
275
|
+
{
|
|
276
|
+
ideal res;
|
|
277
|
+
for(i=1; i<=nvars(basering); i++)
|
|
278
|
+
{
|
|
279
|
+
res[i] = var(i)-vec2elm(start[i]);
|
|
280
|
+
}
|
|
281
|
+
results[size(results)+1] = std(res);
|
|
282
|
+
start = increment(start);
|
|
283
|
+
}else{
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return(results);
|
|
290
|
+
}
|
|
291
|
+
example
|
|
292
|
+
{
|
|
293
|
+
"EXAMPLE:";echo=2;
|
|
294
|
+
ring R = (2,a),x(1..3),lp;
|
|
295
|
+
minpoly=a2+a+1;
|
|
296
|
+
ideal I;
|
|
297
|
+
I[1]=x(1)^2*x(2)+(a)*x(1)*x(2)^2+(a+1);
|
|
298
|
+
I[2]=x(1)^2*x(2)*x(3)^2+(a)*x(1);
|
|
299
|
+
I[3]=(a+1)*x(1)*x(3)+(a+1)*x(1);
|
|
300
|
+
PEsolve(I);
|
|
301
|
+
}
|
|
302
|
+
////////////////////////////////////////////////////////////////////
|
|
303
|
+
proc simplesolver(ideal E)
|
|
304
|
+
"USAGE: simplesolver(I); I ideal
|
|
305
|
+
solve I (system of multivariate equations) over a
|
|
306
|
+
finite field by exhausting search
|
|
307
|
+
RETURN: list L, the common roots of I as ideal
|
|
308
|
+
ASSUME: basering is a finite field of type (p^n,a)
|
|
309
|
+
"
|
|
310
|
+
{
|
|
311
|
+
int i,j,k,t, correct;
|
|
312
|
+
list solutions = list(std(ideal()));
|
|
313
|
+
list partial_solutions;
|
|
314
|
+
ideal partial_system, curr_sol, curr_sys, factors;
|
|
315
|
+
poly univar_poly;
|
|
316
|
+
intvec ones = 1:nvars(basering);
|
|
317
|
+
E = E+defaultIdeal();
|
|
318
|
+
// check assumptions
|
|
319
|
+
if(npars(basering)>1)
|
|
320
|
+
{
|
|
321
|
+
ERROR("Basering must have at most one parameter");
|
|
322
|
+
}
|
|
323
|
+
if(char(basering)==0)
|
|
324
|
+
{
|
|
325
|
+
ERROR("Basering must have finite characteristic");
|
|
326
|
+
}
|
|
327
|
+
if(hasGFCoefficient(basering))
|
|
328
|
+
{
|
|
329
|
+
ERROR("not implemented for Galois fields");
|
|
330
|
+
}
|
|
331
|
+
for(k=1; k<=nvars(basering); k++)
|
|
332
|
+
{
|
|
333
|
+
partial_solutions = list();
|
|
334
|
+
for(i=1; i<=size(solutions); i++)
|
|
335
|
+
{
|
|
336
|
+
partial_system = reduce(E, solutions[i]);
|
|
337
|
+
for(j=1; j<=ncols(partial_system); j++)
|
|
338
|
+
{
|
|
339
|
+
if(univariate(partial_system[j])>0)
|
|
340
|
+
{
|
|
341
|
+
univar_poly = partial_system[j];
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
factors = factorize(univar_poly,1);
|
|
346
|
+
for(j=1; j<=ncols(factors); j++)
|
|
347
|
+
{
|
|
348
|
+
if(deg(factors[j], ones)==1)
|
|
349
|
+
{
|
|
350
|
+
curr_sol = std(solutions[i]+ideal(factors[j]));
|
|
351
|
+
curr_sys = reduce(E, curr_sol);
|
|
352
|
+
correct = 1;
|
|
353
|
+
for(t=1; t<=ncols(curr_sys); t++)
|
|
354
|
+
{
|
|
355
|
+
if(deg(curr_sys[t])==0)
|
|
356
|
+
{
|
|
357
|
+
correct = 0;
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if(correct)
|
|
362
|
+
{
|
|
363
|
+
partial_solutions = insert(partial_solutions, curr_sol);
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
solutions = partial_solutions;
|
|
369
|
+
}
|
|
370
|
+
return(solutions);
|
|
371
|
+
}
|
|
372
|
+
example
|
|
373
|
+
{
|
|
374
|
+
"EXAMPLE:";echo=2;
|
|
375
|
+
ring R = (2,a),x(1..3),lp;
|
|
376
|
+
minpoly=a2+a+1;
|
|
377
|
+
ideal I;
|
|
378
|
+
I[1]=x(1)^2*x(2)+(a)*x(1)*x(2)^2+(a+1);
|
|
379
|
+
I[2]=x(1)^2*x(2)*x(3)^2+(a)*x(1);
|
|
380
|
+
I[3]=(a+1)*x(1)*x(3)+(a+1)*x(1);
|
|
381
|
+
simplesolver(I);
|
|
382
|
+
}
|
|
383
|
+
////////////////////////////////////////////////////////////////////
|
|
384
|
+
proc GBsolve(ideal equation_system)
|
|
385
|
+
"USAGE: GBsolve(I); I ideal
|
|
386
|
+
solve I (system of multivariate equations) over an
|
|
387
|
+
extension of Z/p by Groebner basis methods
|
|
388
|
+
RETURN: list L, the common roots of I as ideal
|
|
389
|
+
ASSUME: basering is a finite field of type (p^n,a)
|
|
390
|
+
"
|
|
391
|
+
{
|
|
392
|
+
int i,j, prop, newelement, number_new_vars;
|
|
393
|
+
ideal ls;
|
|
394
|
+
list results, slvbl, linsol, ctrl, new_sols, varinfo;
|
|
395
|
+
ideal I, linear_solution, unsolved_part, univar_part, multivar_part, unsolved_vars;
|
|
396
|
+
intvec unsolved_var_nums;
|
|
397
|
+
string new_vars;
|
|
398
|
+
// check assumptions
|
|
399
|
+
if(npars(basering)>1)
|
|
400
|
+
{
|
|
401
|
+
ERROR("Basering must have at most one parameter");
|
|
402
|
+
}
|
|
403
|
+
if(char(basering)==0)
|
|
404
|
+
{
|
|
405
|
+
ERROR("Basering must have finite characteristic");
|
|
406
|
+
}
|
|
407
|
+
if(hasGFCoefficient(basering))
|
|
408
|
+
{
|
|
409
|
+
ERROR("not implemented for Galois fields");
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
def original_ring = basering;
|
|
413
|
+
if(npars(basering)==1)
|
|
414
|
+
{
|
|
415
|
+
int prime_coeff_field=0;
|
|
416
|
+
string minpolystr = "minpoly="+
|
|
417
|
+
get_minpoly_str(size(original_ring),parstr(original_ring,1))+";" ;
|
|
418
|
+
}
|
|
419
|
+
else
|
|
420
|
+
{
|
|
421
|
+
int prime_coeff_field=1;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
option(redSB);
|
|
425
|
+
|
|
426
|
+
equation_system = simplify(equation_system,15);
|
|
427
|
+
|
|
428
|
+
ideal standard_basis = std(equation_system);
|
|
429
|
+
list basis_factors = facstd(standard_basis);
|
|
430
|
+
if( basis_factors[1][1] == 1)
|
|
431
|
+
{
|
|
432
|
+
return(results)
|
|
433
|
+
};
|
|
434
|
+
|
|
435
|
+
for(i=1; i<= size(basis_factors); i++)
|
|
436
|
+
{
|
|
437
|
+
prop = 0;
|
|
438
|
+
for(j=1; j<=size(basis_factors[i]); j++)
|
|
439
|
+
{
|
|
440
|
+
if( univariate(basis_factors[i][j])>0 and deg(basis_factors[i][j])>1)
|
|
441
|
+
{
|
|
442
|
+
prop =1;
|
|
443
|
+
break;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
if(prop == 0)
|
|
447
|
+
{
|
|
448
|
+
ls = solvelinearpart( basis_factors[i] );
|
|
449
|
+
if(ncols(ls) == nvars(basering) )
|
|
450
|
+
{
|
|
451
|
+
ctrl, newelement = add_if_new(ctrl, ls);
|
|
452
|
+
if(newelement)
|
|
453
|
+
{
|
|
454
|
+
results = insert(results, ls);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
else
|
|
458
|
+
{
|
|
459
|
+
slvbl = insert(slvbl, list(basis_factors[i],ls) );
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if(size(slvbl)<>0)
|
|
464
|
+
{
|
|
465
|
+
for(int E = 1; E<= size(slvbl); E++)
|
|
466
|
+
{
|
|
467
|
+
I = slvbl[E][1];
|
|
468
|
+
linear_solution = slvbl[E][2];
|
|
469
|
+
attrib(I,"isSB",1);
|
|
470
|
+
unsolved_part = reduce(I,linear_solution);
|
|
471
|
+
univar_part = ideal();
|
|
472
|
+
multivar_part = ideal();
|
|
473
|
+
for(i=1; i<=ncols(I); i++)
|
|
474
|
+
{
|
|
475
|
+
if(univariate(I[i])>0)
|
|
476
|
+
{
|
|
477
|
+
univar_part = univar_part+I[i];
|
|
478
|
+
}
|
|
479
|
+
else
|
|
480
|
+
{
|
|
481
|
+
multivar_part = multivar_part+I[i];
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
varinfo = variables(univar_part);
|
|
485
|
+
unsolved_vars = varinfo[3];
|
|
486
|
+
unsolved_var_nums = varinfo[4];
|
|
487
|
+
number_new_vars = ncols(unsolved_vars);
|
|
488
|
+
|
|
489
|
+
new_vars = "@y(1.."+string(number_new_vars)+")";
|
|
490
|
+
def R_new = changevar(new_vars, original_ring);
|
|
491
|
+
setring R_new;
|
|
492
|
+
if( !prime_coeff_field )
|
|
493
|
+
{
|
|
494
|
+
execute(minpolystr);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
ideal mapping_ideal;
|
|
498
|
+
for(i=1; i<=size(unsolved_var_nums); i++)
|
|
499
|
+
{
|
|
500
|
+
mapping_ideal[unsolved_var_nums[i]] = var(i);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
map F = original_ring, mapping_ideal;
|
|
504
|
+
ideal I_new = F( multivar_part );
|
|
505
|
+
|
|
506
|
+
list sol_new;
|
|
507
|
+
int unsolvable = 0;
|
|
508
|
+
sol_new = simplesolver(I_new);
|
|
509
|
+
if( size(sol_new) == 0)
|
|
510
|
+
{
|
|
511
|
+
unsolvable = 1;
|
|
512
|
+
}
|
|
513
|
+
setring original_ring;
|
|
514
|
+
if(unsolvable)
|
|
515
|
+
{
|
|
516
|
+
list sol_old = list();
|
|
517
|
+
}
|
|
518
|
+
else
|
|
519
|
+
{
|
|
520
|
+
map G = R_new, unsolved_vars;
|
|
521
|
+
new_sols = G(sol_new);
|
|
522
|
+
for(i=1; i<=size(new_sols); i++)
|
|
523
|
+
{
|
|
524
|
+
ideal sol = new_sols[i]+linear_solution;
|
|
525
|
+
sol = std(sol);
|
|
526
|
+
ctrl, newelement = add_if_new(ctrl, sol);
|
|
527
|
+
if(newelement)
|
|
528
|
+
{
|
|
529
|
+
results = insert(results, sol);
|
|
530
|
+
}
|
|
531
|
+
kill sol;
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
kill G;
|
|
535
|
+
kill R_new;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
return( results );
|
|
539
|
+
}
|
|
540
|
+
example
|
|
541
|
+
{
|
|
542
|
+
"EXAMPLE:";echo=2;
|
|
543
|
+
ring R = (2,a),x(1..3),lp;
|
|
544
|
+
minpoly=a2+a+1;
|
|
545
|
+
ideal I;
|
|
546
|
+
I[1]=x(1)^2*x(2)+(a)*x(1)*x(2)^2+(a+1);
|
|
547
|
+
I[2]=x(1)^2*x(2)*x(3)^2+(a)*x(1);
|
|
548
|
+
I[3]=(a+1)*x(1)*x(3)+(a+1)*x(1);
|
|
549
|
+
GBsolve(I);
|
|
550
|
+
}
|
|
551
|
+
////////////////////////////////////////////////////////////////////
|
|
552
|
+
proc XLsolve(ideal I, list #)
|
|
553
|
+
"USAGE: XLsolve(I[, d]); I ideal, d optional integer
|
|
554
|
+
solve I (system of multivariate polynomials) with a
|
|
555
|
+
variant of the linearization technique, multiplying
|
|
556
|
+
the polynomials with monomials of degree at most d
|
|
557
|
+
(default is 2)
|
|
558
|
+
RETURN: list L of the common roots of I as ideals
|
|
559
|
+
ASSUME: basering is a finite field of type (p^n,a)"
|
|
560
|
+
{
|
|
561
|
+
int i,j,k, D;
|
|
562
|
+
int SD = deg(I);
|
|
563
|
+
list solutions;
|
|
564
|
+
if(size(#))
|
|
565
|
+
{
|
|
566
|
+
if(typeof(#[1])=="int") { D = #[1]; }
|
|
567
|
+
}
|
|
568
|
+
else
|
|
569
|
+
{ D = 2; }
|
|
570
|
+
list lMonomialsForMultiplying = monomialsOfDegreeAtMost(D+SD);
|
|
571
|
+
|
|
572
|
+
int m = ncols(I);
|
|
573
|
+
list extended_system;
|
|
574
|
+
list mm;
|
|
575
|
+
for(k=1; k<=size(lMonomialsForMultiplying)-SD; k++)
|
|
576
|
+
{
|
|
577
|
+
mm = lMonomialsForMultiplying[k];
|
|
578
|
+
for(i=1; i<=m; i++)
|
|
579
|
+
{
|
|
580
|
+
for(j=1; j<=size(mm); j++)
|
|
581
|
+
{
|
|
582
|
+
extended_system[size(extended_system)+1] = reduce(I[i]*mm[j], defaultIdeal());
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
ideal new_system = I;
|
|
587
|
+
for(i=1; i<=size(extended_system); i++)
|
|
588
|
+
{
|
|
589
|
+
new_system[m+i] = extended_system[i];
|
|
590
|
+
}
|
|
591
|
+
ideal reduced_system = linearReduce( new_system, lMonomialsForMultiplying);
|
|
592
|
+
|
|
593
|
+
solutions = simplesolver(reduced_system);
|
|
594
|
+
|
|
595
|
+
return(solutions);
|
|
596
|
+
}
|
|
597
|
+
example
|
|
598
|
+
{
|
|
599
|
+
"EXAMPLE:";echo=2;
|
|
600
|
+
ring R = (2,a),x(1..3),lp;
|
|
601
|
+
minpoly=a2+a+1;
|
|
602
|
+
ideal I;
|
|
603
|
+
I[1]=(a)*x(1)^2+x(2)^2+(a+1);
|
|
604
|
+
I[2]=(a)*x(1)^2+(a)*x(1)*x(3)+(a)*x(2)^2+1;
|
|
605
|
+
I[3]=(a)*x(1)*x(3)+1;
|
|
606
|
+
I[4]=x(1)^2+x(1)*x(3)+(a);
|
|
607
|
+
XLsolve(I, 3);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
////////////////////////////////////////////////////////////////////
|
|
611
|
+
proc ZZsolve(ideal I)
|
|
612
|
+
"USAGE: ZZsolve(I); I ideal
|
|
613
|
+
solve I (system of multivariate equations) over a
|
|
614
|
+
finite field by mapping the polynomials to a single
|
|
615
|
+
univariate polynomial over extension of the basering
|
|
616
|
+
RETURN: list, the common roots of I as ideal
|
|
617
|
+
ASSUME: basering is a finite field of type (p^n,a)
|
|
618
|
+
"
|
|
619
|
+
{
|
|
620
|
+
int i, j, nv, numeqs,r,l,e;
|
|
621
|
+
def original_ring = basering;
|
|
622
|
+
// check assumptions
|
|
623
|
+
if(npars(basering)>1)
|
|
624
|
+
{
|
|
625
|
+
ERROR("Basering must have at most one parameter");
|
|
626
|
+
}
|
|
627
|
+
if(char(basering)==0)
|
|
628
|
+
{
|
|
629
|
+
ERROR("Basering must have finite characteristic");
|
|
630
|
+
}
|
|
631
|
+
if(hasGFCoefficient(basering))
|
|
632
|
+
{
|
|
633
|
+
ERROR("not implemented for Galois fields");
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
nv = nvars(original_ring);
|
|
637
|
+
numeqs = ncols(I);
|
|
638
|
+
l = numeqs % nv;
|
|
639
|
+
if( l == 0)
|
|
640
|
+
{
|
|
641
|
+
r = numeqs div nv;
|
|
642
|
+
}
|
|
643
|
+
else
|
|
644
|
+
{
|
|
645
|
+
r = (numeqs div nv) +1;
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
list list_of_equations;
|
|
650
|
+
for(i=1; i<=r; i++)
|
|
651
|
+
{
|
|
652
|
+
list_of_equations[i] = ideal();
|
|
653
|
+
}
|
|
654
|
+
for(i=0; i<numeqs; i++)
|
|
655
|
+
{
|
|
656
|
+
list_of_equations[(i div nv)+1][(i % nv) +1] = I[i+1];
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
ring ring_for_matrix = (char(original_ring),@y),(x(1..nv),@X,@c(1..nv)(1..nv)),lp;
|
|
660
|
+
execute("minpoly="+Z_get_minpoly(size(original_ring)^nv, parstr(1))+";");
|
|
661
|
+
|
|
662
|
+
ideal IV;
|
|
663
|
+
for(i=1; i<=nv; i++)
|
|
664
|
+
{
|
|
665
|
+
IV[i] = var(i);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
matrix M_C[nv][nv];
|
|
669
|
+
for(i=1;i<=nrows(M_C); i++)
|
|
670
|
+
{
|
|
671
|
+
for(j=1; j<=ncols(M_C); j++)
|
|
672
|
+
{
|
|
673
|
+
M_C[i,j] = @c(i)(j);
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
poly X = Z_phi(IV);
|
|
678
|
+
ideal IX_power_poly;
|
|
679
|
+
ideal IX_power_var;
|
|
680
|
+
for(i=1; i<=nv; i++)
|
|
681
|
+
{
|
|
682
|
+
e = (size(original_ring)^(i-1));
|
|
683
|
+
IX_power_poly[i] = X^e;
|
|
684
|
+
IX_power_var[i] = @X^e;
|
|
685
|
+
}
|
|
686
|
+
IX_power_poly = reduce(IX_power_poly, Z_default_ideal(nv, size(original_ring)));
|
|
687
|
+
|
|
688
|
+
def M = matrix(IX_power_poly,1,nv)*M_C - matrix(IV,1,nv);
|
|
689
|
+
|
|
690
|
+
ideal IC;
|
|
691
|
+
for(i=1; i<=ncols(M); i++)
|
|
692
|
+
{
|
|
693
|
+
for(j=1; j<=ncols(IV); j++)
|
|
694
|
+
{
|
|
695
|
+
IC[(i-1)*ncols(M)+j] = coeffs(M[1,i],IV[j])[2,1];
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
ideal IC_solultion = std(Presolve::solvelinearpart(IC));
|
|
700
|
+
|
|
701
|
+
matrix M_C_sol[nv][nv];
|
|
702
|
+
for(i=1;i<=nrows(M_C_sol); i++)
|
|
703
|
+
{
|
|
704
|
+
for(j=1; j<=ncols(M_C_sol); j++)
|
|
705
|
+
{
|
|
706
|
+
M_C_sol[i,j] = reduce(@c(i)(j), std(IC_solultion));
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
ideal I_subs;
|
|
710
|
+
I_subs = ideal(matrix(IX_power_var,1,nv)*M_C_sol);
|
|
711
|
+
|
|
712
|
+
setring original_ring;
|
|
713
|
+
string var_str = varstr(original_ring)+",@X,@y";
|
|
714
|
+
string minpoly_str = "minpoly="+string(minpoly)+";";
|
|
715
|
+
def ring_for_substitution = Ring::changevar(var_str, original_ring);
|
|
716
|
+
|
|
717
|
+
setring ring_for_substitution;
|
|
718
|
+
execute(minpoly_str);
|
|
719
|
+
|
|
720
|
+
ideal I_subs = imap(ring_for_matrix, I_subs);
|
|
721
|
+
ideal I = imap(original_ring, I);
|
|
722
|
+
list list_of_equations = imap(original_ring, list_of_equations);
|
|
723
|
+
|
|
724
|
+
list list_of_F;
|
|
725
|
+
for(i=1; i<=r; i++)
|
|
726
|
+
{
|
|
727
|
+
list_of_F[i] = Z_phi( list_of_equations[i] );
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
for(i=1; i<=nv; i++)
|
|
731
|
+
{
|
|
732
|
+
for(j=1; j<=r; j++)
|
|
733
|
+
{
|
|
734
|
+
list_of_F[j] = subst( list_of_F[j], var(i), I_subs[i] );
|
|
735
|
+
}
|
|
736
|
+
}
|
|
737
|
+
int s = size(original_ring);
|
|
738
|
+
if(npars(original_ring)==1)
|
|
739
|
+
{
|
|
740
|
+
for(j=1; j<=r; j++)
|
|
741
|
+
{
|
|
742
|
+
list_of_F[j] = subst(list_of_F[j], par(1), (@y^( (s^nv-1) div (s-1) )));
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
ring temp_ring = (char(original_ring),@y),@X,lp;
|
|
747
|
+
list list_of_F = imap(ring_for_substitution, list_of_F);
|
|
748
|
+
|
|
749
|
+
ring ring_for_factorization = (char(original_ring),@y),X,lp;
|
|
750
|
+
execute("minpoly="+Z_get_minpoly(size(original_ring)^nv, parstr(1))+";");
|
|
751
|
+
map rho = temp_ring,X;
|
|
752
|
+
list list_of_F = rho(list_of_F);
|
|
753
|
+
poly G = 0;
|
|
754
|
+
for(i=1; i<=r; i++)
|
|
755
|
+
{
|
|
756
|
+
G = gcd(G, list_of_F[i]);
|
|
757
|
+
}
|
|
758
|
+
if(G==1)
|
|
759
|
+
{
|
|
760
|
+
return(list());
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
list factors = Presolve::linearpart(factorize(G,1));
|
|
764
|
+
|
|
765
|
+
ideal check;
|
|
766
|
+
for(i=1; i<=nv; i++)
|
|
767
|
+
{
|
|
768
|
+
check[i] = X^(size(original_ring)^(i-1));
|
|
769
|
+
}
|
|
770
|
+
list fsols;
|
|
771
|
+
|
|
772
|
+
matrix sc;
|
|
773
|
+
list sl;
|
|
774
|
+
def sM;
|
|
775
|
+
matrix M_for_sol = fetch(ring_for_matrix, M_C_sol);
|
|
776
|
+
for(i=1; i<=size(factors[1]); i++)
|
|
777
|
+
{
|
|
778
|
+
sc = matrix(reduce(check, std(factors[1][i])), 1,nv );
|
|
779
|
+
|
|
780
|
+
sl = list();
|
|
781
|
+
sM = sc*M_for_sol;
|
|
782
|
+
for(j=1; j<=ncols(sM); j++)
|
|
783
|
+
{
|
|
784
|
+
sl[j] = sM[1,j];
|
|
785
|
+
}
|
|
786
|
+
fsols[i] = sl;
|
|
787
|
+
}
|
|
788
|
+
if(size(fsols)==0)
|
|
789
|
+
{
|
|
790
|
+
return(list());
|
|
791
|
+
}
|
|
792
|
+
setring ring_for_substitution;
|
|
793
|
+
list ssols = imap(ring_for_factorization, fsols);
|
|
794
|
+
if(npars(original_ring)==1)
|
|
795
|
+
{
|
|
796
|
+
execute("poly P="+Z_get_minpoly(size(original_ring)^nv, "@y"));
|
|
797
|
+
poly RP = gcd(P, (@y^( (s^nv-1) div (s-1) ))-a);
|
|
798
|
+
for(i=1; i<=size(ssols); i++)
|
|
799
|
+
{
|
|
800
|
+
for(j=1; j<=size(ssols[i]); j++)
|
|
801
|
+
{
|
|
802
|
+
ssols[i][j] = reduce( ssols[i][j], std(RP));
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
setring original_ring;
|
|
807
|
+
list solutions = imap(ring_for_substitution, ssols);
|
|
808
|
+
list final_solutions;
|
|
809
|
+
ideal ps;
|
|
810
|
+
for(i=1; i<=size(solutions); i++)
|
|
811
|
+
{
|
|
812
|
+
ps = ideal();
|
|
813
|
+
for(j=1; j<=nvars(original_ring); j++)
|
|
814
|
+
{
|
|
815
|
+
ps[j] = var(j)-solutions[i][j];
|
|
816
|
+
}
|
|
817
|
+
final_solutions = insert(final_solutions, std(ps));
|
|
818
|
+
}
|
|
819
|
+
return(final_solutions);
|
|
820
|
+
}
|
|
821
|
+
example
|
|
822
|
+
{
|
|
823
|
+
"EXAMPLE:";echo=2;
|
|
824
|
+
ring R = (2,a),x(1..3),lp;
|
|
825
|
+
minpoly=a2+a+1;
|
|
826
|
+
ideal I;
|
|
827
|
+
I[1]=x(1)^2*x(2)+(a)*x(1)*x(2)^2+(a+1);
|
|
828
|
+
I[2]=x(1)^2*x(2)*x(3)^2+(a)*x(1);
|
|
829
|
+
I[3]=(a+1)*x(1)*x(3)+(a+1)*x(1);
|
|
830
|
+
ZZsolve(I);
|
|
831
|
+
}
|
|
832
|
+
////////////////////////////////////////////////////////////////////
|
|
833
|
+
////////////////////////////////////////////////////////////////////
|
|
834
|
+
static proc linearReduce(ideal I, list mons)
|
|
835
|
+
{
|
|
836
|
+
//system("--no-warn", 1);
|
|
837
|
+
int LRtime = rtimer;
|
|
838
|
+
int i,j ;
|
|
839
|
+
int prime_field = 1;
|
|
840
|
+
list solutions, monomials;
|
|
841
|
+
for(i=1; i<=size(mons); i++)
|
|
842
|
+
{
|
|
843
|
+
monomials = reorderMonomials(mons[i])+monomials;
|
|
844
|
+
}
|
|
845
|
+
int number_of_monomials = size(monomials);
|
|
846
|
+
|
|
847
|
+
def original_ring = basering;
|
|
848
|
+
if(npars(basering)==1)
|
|
849
|
+
{
|
|
850
|
+
prime_field=0;
|
|
851
|
+
string minpolystr = "minpoly="
|
|
852
|
+
+get_minpoly_str(size(original_ring),parstr(original_ring,1))+";" ;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
def ring_for_var_change = addNvarsTo(original_ring, number_of_monomials, "@y", 2);
|
|
856
|
+
|
|
857
|
+
setring ring_for_var_change;
|
|
858
|
+
if( prime_field == 0)
|
|
859
|
+
{
|
|
860
|
+
execute(minpolystr);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
list monomials = imap(original_ring, monomials);
|
|
864
|
+
ideal I = imap(original_ring, I);
|
|
865
|
+
ideal C;
|
|
866
|
+
intvec weights=1:nvars(original_ring);
|
|
867
|
+
|
|
868
|
+
for(i=1; i<= number_of_monomials; i++)
|
|
869
|
+
{
|
|
870
|
+
C[i] = monomials[i] - @y(i);
|
|
871
|
+
weights = weights,deg(monomials[i])+1;
|
|
872
|
+
}
|
|
873
|
+
ideal linear_eqs = I;
|
|
874
|
+
for(i=1; i<=ncols(C); i++)
|
|
875
|
+
{
|
|
876
|
+
linear_eqs = reduce(linear_eqs, C[i]);
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
string new_vars = "@y(1.."+string( number_of_monomials )+")";
|
|
880
|
+
def ring_for_elimination = changevar( new_vars, ring_for_var_change);
|
|
881
|
+
setring ring_for_elimination;
|
|
882
|
+
if( prime_field == 0)
|
|
883
|
+
{
|
|
884
|
+
execute(minpolystr);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
ideal I = imap(ring_for_var_change, linear_eqs);
|
|
888
|
+
ideal lin_sol = solvelinearpart(I);
|
|
889
|
+
def ring_for_back_change = changeord( list(list("wp",weights),list("C",0:1)), ring_for_var_change);
|
|
890
|
+
|
|
891
|
+
setring ring_for_back_change;
|
|
892
|
+
if( prime_field == 0)
|
|
893
|
+
{
|
|
894
|
+
execute(minpolystr);
|
|
895
|
+
}
|
|
896
|
+
|
|
897
|
+
ideal lin_sol = imap(ring_for_elimination, lin_sol);
|
|
898
|
+
ideal C = imap(ring_for_var_change, C);
|
|
899
|
+
ideal J = lin_sol;
|
|
900
|
+
for(i=1; i<=ncols(C); i++)
|
|
901
|
+
{
|
|
902
|
+
J = reduce(J, C[i]);
|
|
903
|
+
}
|
|
904
|
+
setring original_ring;
|
|
905
|
+
ideal J = imap(ring_for_back_change, J);
|
|
906
|
+
return(J);
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
static proc monomialsOfDegreeAtMost(int k)
|
|
910
|
+
{
|
|
911
|
+
int Mtime = rtimer;
|
|
912
|
+
list monomials, monoms, monoms_one, lower_monoms;
|
|
913
|
+
int n = nvars(basering);
|
|
914
|
+
int t,i,l,j,s;
|
|
915
|
+
for(i=1; i<=n; i++)
|
|
916
|
+
{
|
|
917
|
+
monoms_one[i] = var(i);
|
|
918
|
+
}
|
|
919
|
+
monomials = list(monoms_one);
|
|
920
|
+
if(1 < k)
|
|
921
|
+
{
|
|
922
|
+
for(t=2; t<=k; t++)
|
|
923
|
+
{
|
|
924
|
+
lower_monoms = monomials[t-1];
|
|
925
|
+
monoms = list();
|
|
926
|
+
s = 1;
|
|
927
|
+
for(i=1; i<=n; i++)
|
|
928
|
+
{
|
|
929
|
+
for(j=s; j<=size(lower_monoms); j++)
|
|
930
|
+
{
|
|
931
|
+
monoms = monoms+list(lower_monoms[j]*var(i));
|
|
932
|
+
}
|
|
933
|
+
s = s + int(binomial(n+t-2-i, t-2));
|
|
934
|
+
}
|
|
935
|
+
monomials[t] = monoms;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
return(monomials);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
static proc reorderMonomials(list monomials)
|
|
942
|
+
{
|
|
943
|
+
list univar_monoms, mixed_monoms;
|
|
944
|
+
|
|
945
|
+
for(int j=1; j<=size(monomials); j++)
|
|
946
|
+
{
|
|
947
|
+
if( univariate(monomials[j])>0 )
|
|
948
|
+
{
|
|
949
|
+
univar_monoms = univar_monoms + list(monomials[j]);
|
|
950
|
+
}
|
|
951
|
+
else
|
|
952
|
+
{
|
|
953
|
+
mixed_monoms = mixed_monoms + list(monomials[j]);
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
return(univar_monoms + mixed_monoms);
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
static proc melyseg(poly g, list start)
|
|
961
|
+
{
|
|
962
|
+
list gsub = g;
|
|
963
|
+
int i = 1;
|
|
964
|
+
|
|
965
|
+
while( start[1][1] <> char(basering) )
|
|
966
|
+
{
|
|
967
|
+
gsub[i+1] = subst( gsub[i], var(i), vec2elm(start[i]));
|
|
968
|
+
if( gsub[i+1] == 0 )
|
|
969
|
+
{
|
|
970
|
+
list new = increment(start,i);
|
|
971
|
+
for(int l=1; l<=size(start); l++)
|
|
972
|
+
{
|
|
973
|
+
if(start[l]<>new[l])
|
|
974
|
+
{
|
|
975
|
+
i = l;
|
|
976
|
+
break;
|
|
977
|
+
}
|
|
978
|
+
}
|
|
979
|
+
start = new;
|
|
980
|
+
}
|
|
981
|
+
else
|
|
982
|
+
{
|
|
983
|
+
if(i == nvars(basering))
|
|
984
|
+
{
|
|
985
|
+
return(start);
|
|
986
|
+
}else{
|
|
987
|
+
i++;
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
return(list());
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
static proc productOfEqs(ideal I)
|
|
995
|
+
{
|
|
996
|
+
//system("--no-warn", 1);
|
|
997
|
+
ideal eqs = sort_ideal(I);
|
|
998
|
+
int i,q;
|
|
999
|
+
poly g = 1;
|
|
1000
|
+
q = size(basering);
|
|
1001
|
+
ideal I = defaultIdeal();
|
|
1002
|
+
|
|
1003
|
+
for(i=1; i<=size(eqs); i++)
|
|
1004
|
+
{
|
|
1005
|
+
if(g==0){return(g);}
|
|
1006
|
+
g = reduce(g*(eqs[i]^(q-1)-1), I);
|
|
1007
|
+
}
|
|
1008
|
+
return( g );
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
static proc clonering(list #)
|
|
1012
|
+
{
|
|
1013
|
+
def original_ring = basering;
|
|
1014
|
+
int n = nvars(original_ring);
|
|
1015
|
+
int prime_field=npars(basering);
|
|
1016
|
+
if(prime_field)
|
|
1017
|
+
{
|
|
1018
|
+
string minpolystr = "minpoly="+
|
|
1019
|
+
get_minpoly_str(size(original_ring),parstr(original_ring,1))+";" ;
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
if(size(#))
|
|
1023
|
+
{
|
|
1024
|
+
int newvars = #[1];
|
|
1025
|
+
}
|
|
1026
|
+
else
|
|
1027
|
+
{
|
|
1028
|
+
int newvars = nvars(original_ring);
|
|
1029
|
+
}
|
|
1030
|
+
string newvarstr = "v(1.."+string(newvars)+")";
|
|
1031
|
+
def newring = changevar(newvarstr, original_ring);
|
|
1032
|
+
setring newring;
|
|
1033
|
+
if( prime_field )
|
|
1034
|
+
{
|
|
1035
|
+
execute(minpolystr);
|
|
1036
|
+
}
|
|
1037
|
+
return(newring);
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
static proc defaultIdeal()
|
|
1041
|
+
{
|
|
1042
|
+
ideal I;
|
|
1043
|
+
for(int i=1; i<=nvars(basering); i++)
|
|
1044
|
+
{
|
|
1045
|
+
I[i] = var(i)^size(basering)-var(i);
|
|
1046
|
+
}
|
|
1047
|
+
return( std(I) );
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
static proc order_of_extension()
|
|
1051
|
+
{
|
|
1052
|
+
int oe=1;
|
|
1053
|
+
list rl = ringlist(basering);
|
|
1054
|
+
if( size(rl[1]) <> 1)
|
|
1055
|
+
{
|
|
1056
|
+
oe = deg( subst(minpoly,par(1),var(1)) );
|
|
1057
|
+
}
|
|
1058
|
+
return(oe);
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
static proc vec2elm(intvec v)
|
|
1062
|
+
{
|
|
1063
|
+
number g = 1;
|
|
1064
|
+
if(npars(basering) == 1) { g=par(1); }
|
|
1065
|
+
number e=0;
|
|
1066
|
+
int oe = size(v);
|
|
1067
|
+
for(int i=1; i<=oe; i++)
|
|
1068
|
+
{
|
|
1069
|
+
e = e+v[i]*g^(oe-i);
|
|
1070
|
+
}
|
|
1071
|
+
return(e);
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
static proc increment(list l, list #)
|
|
1075
|
+
{
|
|
1076
|
+
int c, i, j, oe;
|
|
1077
|
+
oe = order_of_extension();
|
|
1078
|
+
c = char(basering);
|
|
1079
|
+
|
|
1080
|
+
if( size(#) == 1 )
|
|
1081
|
+
{
|
|
1082
|
+
i = #[1];
|
|
1083
|
+
}
|
|
1084
|
+
else
|
|
1085
|
+
{
|
|
1086
|
+
i = size(l);
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
l[i] = nextVec(l[i]);
|
|
1090
|
+
while( l[i][1] == c && i>1 )
|
|
1091
|
+
{
|
|
1092
|
+
l[i] = 0:oe;
|
|
1093
|
+
i--;
|
|
1094
|
+
l[i] = nextVec(l[i]);
|
|
1095
|
+
}
|
|
1096
|
+
if( i < size(l) )
|
|
1097
|
+
{
|
|
1098
|
+
for(j=i+1; j<=size(l); j++)
|
|
1099
|
+
{
|
|
1100
|
+
l[j] = 0:oe;
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
return(l);
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
static proc nextVec(intvec l)
|
|
1107
|
+
{
|
|
1108
|
+
int c, i, j;
|
|
1109
|
+
i = size(l);
|
|
1110
|
+
c = char(basering);
|
|
1111
|
+
l[i] = l[i] + 1;
|
|
1112
|
+
while( l[i] == c && i>1 )
|
|
1113
|
+
{
|
|
1114
|
+
l[i] = 0;
|
|
1115
|
+
i--;
|
|
1116
|
+
l[i] = l[i] + 1;
|
|
1117
|
+
}
|
|
1118
|
+
return(l);
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
static proc every_vector()
|
|
1122
|
+
{
|
|
1123
|
+
list element, list_of_elements;
|
|
1124
|
+
|
|
1125
|
+
for(int i=1; i<=nvars(basering); i++)
|
|
1126
|
+
{
|
|
1127
|
+
element[i] = 0:order_of_extension();
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
while(size(list_of_elements) < size(basering)^nvars(basering))
|
|
1131
|
+
{
|
|
1132
|
+
list_of_elements = list_of_elements + list(element);
|
|
1133
|
+
element = increment(element);
|
|
1134
|
+
}
|
|
1135
|
+
for(int i=1; i<=size(list_of_elements); i++)
|
|
1136
|
+
{
|
|
1137
|
+
for(int j=1; j<=size(list_of_elements[i]); j++)
|
|
1138
|
+
{
|
|
1139
|
+
list_of_elements[i][j] = vec2elm(list_of_elements[i][j]);
|
|
1140
|
+
}
|
|
1141
|
+
}
|
|
1142
|
+
return(list_of_elements);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
static proc num2int(number a)
|
|
1146
|
+
{
|
|
1147
|
+
int N=0;
|
|
1148
|
+
if(order_of_extension() == 1)
|
|
1149
|
+
{
|
|
1150
|
+
N = int(a);
|
|
1151
|
+
if(N<0)
|
|
1152
|
+
{
|
|
1153
|
+
N = N + char(basering);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
else
|
|
1157
|
+
{
|
|
1158
|
+
ideal C = coeffs(subst(a,par(1),var(1)),var(1));
|
|
1159
|
+
for(int i=1; i<=ncols(C); i++)
|
|
1160
|
+
{
|
|
1161
|
+
int c = int(C[i]);
|
|
1162
|
+
if(c<0) { c = c + char(basering); }
|
|
1163
|
+
N = N + c*char(basering)^(i-1);
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
return(N);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
static proc get_minpoly_str(int size_of_ring, string parname)
|
|
1170
|
+
{
|
|
1171
|
+
def original_ring = basering;
|
|
1172
|
+
ring new_ring = (size_of_ring, A),x,lp;
|
|
1173
|
+
string S = string(minpoly);
|
|
1174
|
+
string SMP;
|
|
1175
|
+
if(S=="0")
|
|
1176
|
+
{
|
|
1177
|
+
SMP = SMP+parname;
|
|
1178
|
+
}
|
|
1179
|
+
else
|
|
1180
|
+
{
|
|
1181
|
+
for(int i=1; i<=size(S); i++)
|
|
1182
|
+
{
|
|
1183
|
+
if(S[i]=="A")
|
|
1184
|
+
{
|
|
1185
|
+
SMP = SMP+parname;
|
|
1186
|
+
}
|
|
1187
|
+
else
|
|
1188
|
+
{
|
|
1189
|
+
SMP = SMP+S[i];
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
return(SMP);
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
static proc sort_ideal(ideal I)
|
|
1197
|
+
{
|
|
1198
|
+
ideal OI;
|
|
1199
|
+
int i,j,M;
|
|
1200
|
+
poly P;
|
|
1201
|
+
M = ncols(I);
|
|
1202
|
+
OI = I;
|
|
1203
|
+
for(i=2; i<=M; i++)
|
|
1204
|
+
{
|
|
1205
|
+
j=i;
|
|
1206
|
+
while(size(OI[j-1])>size(OI[j]))
|
|
1207
|
+
{
|
|
1208
|
+
P = OI[j-1];
|
|
1209
|
+
OI[j-1] = OI[j];
|
|
1210
|
+
OI[j] = P;
|
|
1211
|
+
j--;
|
|
1212
|
+
if(j==1) break;
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
return(OI);
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
static proc add_if_new(list L, ideal I)
|
|
1219
|
+
{
|
|
1220
|
+
int i, newelement;
|
|
1221
|
+
poly P;
|
|
1222
|
+
|
|
1223
|
+
I=std(I);
|
|
1224
|
+
for(i=1; i<=nvars(basering); i++)
|
|
1225
|
+
{
|
|
1226
|
+
P = P + reduce(var(i),I)*var(1)^(i-1);
|
|
1227
|
+
}
|
|
1228
|
+
newelement=1;
|
|
1229
|
+
for(i=1; i<=size(L); i++)
|
|
1230
|
+
{
|
|
1231
|
+
if(L[i]==P)
|
|
1232
|
+
{
|
|
1233
|
+
newelement=0;
|
|
1234
|
+
break;
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
if(newelement)
|
|
1238
|
+
{
|
|
1239
|
+
L = insert(L, P);
|
|
1240
|
+
}
|
|
1241
|
+
return(L,newelement);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
static proc Z_get_minpoly(int size_of_ring, string parname)
|
|
1245
|
+
{
|
|
1246
|
+
def original_ring = basering;
|
|
1247
|
+
ring new_ring = (size_of_ring, A),x,lp;
|
|
1248
|
+
string S = string(minpoly);
|
|
1249
|
+
string SMP;
|
|
1250
|
+
if(S=="0")
|
|
1251
|
+
{
|
|
1252
|
+
SMP = SMP+parname;
|
|
1253
|
+
}
|
|
1254
|
+
else
|
|
1255
|
+
{
|
|
1256
|
+
for(int i=1; i<=size(S); i++)
|
|
1257
|
+
{
|
|
1258
|
+
if(S[i]=="A")
|
|
1259
|
+
{
|
|
1260
|
+
SMP = SMP+parname;
|
|
1261
|
+
}
|
|
1262
|
+
else
|
|
1263
|
+
{
|
|
1264
|
+
SMP = SMP+S[i];
|
|
1265
|
+
}
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
return(SMP);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
static proc Z_phi(ideal I)
|
|
1272
|
+
{
|
|
1273
|
+
poly f;
|
|
1274
|
+
for(int i=1; i<= ncols(I); i++)
|
|
1275
|
+
{
|
|
1276
|
+
f = f+I[i]*@y^(i-1);
|
|
1277
|
+
}
|
|
1278
|
+
return(f);
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
static proc Z_default_ideal(int number_of_variables, int q)
|
|
1282
|
+
{
|
|
1283
|
+
ideal DI;
|
|
1284
|
+
for(int i=1; i<=number_of_variables; i++)
|
|
1285
|
+
{
|
|
1286
|
+
DI[i] = var(i)^q-var(i);
|
|
1287
|
+
}
|
|
1288
|
+
return(std(DI));
|
|
1289
|
+
}
|