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,24 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-singular
|
|
2
|
+
from sage.algebras.fusion_rings.shm_managers cimport KSHandler
|
|
3
|
+
from sage.rings.number_field.number_field_element cimport NumberFieldElement_absolute
|
|
4
|
+
from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomial_libsingular, MPolynomialRing_libsingular
|
|
5
|
+
from sage.rings.polynomial.polydict cimport ETuple
|
|
6
|
+
|
|
7
|
+
cpdef tuple poly_to_tup(MPolynomial_libsingular poly)
|
|
8
|
+
cpdef MPolynomial_libsingular _tup_to_poly(tuple eq_tup, MPolynomialRing_libsingular parent)
|
|
9
|
+
cpdef tuple resize(tuple eq_tup, dict idx_map, int nvars)
|
|
10
|
+
cpdef list get_variables_degrees(list eqns, int nvars)
|
|
11
|
+
cpdef list variables(tuple eq_tup)
|
|
12
|
+
cpdef constant_coeff(tuple eq_tup, field)
|
|
13
|
+
cpdef tuple apply_coeff_map(tuple eq_tup, coeff_map)
|
|
14
|
+
# cpdef bint tup_fixes_sq(tuple eq_tup)
|
|
15
|
+
cdef bint tup_fixes_sq(tuple eq_tup) noexcept
|
|
16
|
+
cdef dict subs_squares(dict eq_dict, KSHandler known_sq)
|
|
17
|
+
cpdef dict compute_known_powers(max_degs, dict val_dict, one)
|
|
18
|
+
cdef dict subs(tuple poly_tup, dict known_powers, one)
|
|
19
|
+
cpdef tup_to_univ_poly(tuple eq_tup, univ_poly_ring)
|
|
20
|
+
cpdef tuple poly_tup_sortkey(tuple eq_tup)
|
|
21
|
+
cdef tuple reduce_poly_dict(dict eq_dict, ETuple nonz, KSHandler known_sq, NumberFieldElement_absolute one)
|
|
22
|
+
cdef tuple _flatten_coeffs(tuple eq_tup)
|
|
23
|
+
cpdef tuple _unflatten_coeffs(field, tuple eq_tup)
|
|
24
|
+
cdef int has_appropriate_linear_term(tuple eq_tup) noexcept
|
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-singular
|
|
2
|
+
"""
|
|
3
|
+
Arithmetic Engine for Polynomials as Tuples
|
|
4
|
+
"""
|
|
5
|
+
# ****************************************************************************
|
|
6
|
+
# Copyright (C) 2021 Guillermo Aboumrad <gh_willieab>
|
|
7
|
+
#
|
|
8
|
+
# Distributed under the terms of the GNU General Public License (GPL)
|
|
9
|
+
# https://www.gnu.org/licenses/
|
|
10
|
+
# ****************************************************************************
|
|
11
|
+
|
|
12
|
+
###########
|
|
13
|
+
# API #
|
|
14
|
+
###########
|
|
15
|
+
|
|
16
|
+
cpdef inline tuple poly_to_tup(MPolynomial_libsingular poly):
|
|
17
|
+
r"""
|
|
18
|
+
Convert a polynomial object into the internal representation as tuple of
|
|
19
|
+
``(ETuple exp, NumberFieldElement coeff)`` pairs.
|
|
20
|
+
|
|
21
|
+
EXAMPLES::
|
|
22
|
+
|
|
23
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup
|
|
24
|
+
sage: R.<x, y> = PolynomialRing(QQ)
|
|
25
|
+
sage: poly_to_tup(x**2 + 1)
|
|
26
|
+
(((2, 0), 1), ((0, 0), 1))
|
|
27
|
+
sage: poly_to_tup(x**2*y**4 - 4/5*x*y**2 + 1/3 * y)
|
|
28
|
+
(((2, 4), 1), ((1, 2), -4/5), ((0, 1), 1/3))
|
|
29
|
+
"""
|
|
30
|
+
return tuple(poly.monomial_coefficients().items())
|
|
31
|
+
|
|
32
|
+
cpdef inline MPolynomial_libsingular _tup_to_poly(tuple eq_tup, MPolynomialRing_libsingular parent):
|
|
33
|
+
r"""
|
|
34
|
+
Return a polynomial object from its tuple of pairs representation.
|
|
35
|
+
|
|
36
|
+
Inverse of :meth:`poly_to_tup`:
|
|
37
|
+
|
|
38
|
+
- ``poly_to_tup(tup_to_poly(eq_tup, ring)) == eq_tup`` and
|
|
39
|
+
- ``tup_to_poly(poly_to_tup(eq), eq.parent()) == eq``.
|
|
40
|
+
|
|
41
|
+
.. NOTE::
|
|
42
|
+
|
|
43
|
+
Assumes ``all(parent.ngens() == len(exp_tup) for exp_tup, c in eq_tup)``.
|
|
44
|
+
This method is meant for internal use.
|
|
45
|
+
|
|
46
|
+
.. WARNING::
|
|
47
|
+
|
|
48
|
+
Unsafe for client use, since it avoids implicit casting and
|
|
49
|
+
it may lead to segmentation faults.
|
|
50
|
+
|
|
51
|
+
EXAMPLES::
|
|
52
|
+
|
|
53
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import _tup_to_poly
|
|
54
|
+
sage: K = CyclotomicField(20)
|
|
55
|
+
sage: R.<x, y> = PolynomialRing(K)
|
|
56
|
+
sage: poly_tup = (((2, 0), K.one()), ((0, 0), K.one()))
|
|
57
|
+
sage: _tup_to_poly(poly_tup, parent=R)
|
|
58
|
+
x^2 + 1
|
|
59
|
+
sage: poly = x**2*y**4 - 4/5*x*y**2 + 1/3 * y
|
|
60
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup
|
|
61
|
+
sage: _tup_to_poly(poly_to_tup(poly), parent=R) == poly
|
|
62
|
+
True
|
|
63
|
+
|
|
64
|
+
TESTS::
|
|
65
|
+
|
|
66
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup, _tup_to_poly
|
|
67
|
+
sage: R.<x, y, z> = PolynomialRing(CyclotomicField(20))
|
|
68
|
+
sage: r = R.random_element()
|
|
69
|
+
sage: _tup_to_poly(poly_to_tup(r), parent=R) == r
|
|
70
|
+
True
|
|
71
|
+
sage: R = PolynomialRing(QQ, 'fx', 100)
|
|
72
|
+
sage: r = R.random_element()
|
|
73
|
+
sage: _tup_to_poly(poly_to_tup(r), parent=R) == r
|
|
74
|
+
True
|
|
75
|
+
"""
|
|
76
|
+
return parent._element_constructor_(dict(eq_tup), check=False)
|
|
77
|
+
|
|
78
|
+
cdef inline tuple _flatten_coeffs(tuple eq_tup):
|
|
79
|
+
r"""
|
|
80
|
+
Flatten cyclotomic coefficients to a representation as a tuple of rational
|
|
81
|
+
coefficients.
|
|
82
|
+
|
|
83
|
+
This is used to avoid pickling cyclotomic coefficient objects, which fails
|
|
84
|
+
with new PARI settings introduced in :issue:`30537`.
|
|
85
|
+
"""
|
|
86
|
+
cdef list flat = []
|
|
87
|
+
cdef NumberFieldElement_absolute cyc_coeff
|
|
88
|
+
for exp, cyc_coeff in eq_tup:
|
|
89
|
+
flat.append((exp, tuple(cyc_coeff._coefficients())))
|
|
90
|
+
return tuple(flat)
|
|
91
|
+
|
|
92
|
+
cpdef tuple _unflatten_coeffs(field, tuple eq_tup):
|
|
93
|
+
r"""
|
|
94
|
+
Restore cyclotomic coefficient object from its tuple of rational
|
|
95
|
+
coefficients representation.
|
|
96
|
+
|
|
97
|
+
Used to circumvent pickling issue introduced by PARI settings
|
|
98
|
+
in :issue:`30537`.
|
|
99
|
+
|
|
100
|
+
EXAMPLES::
|
|
101
|
+
|
|
102
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import _unflatten_coeffs
|
|
103
|
+
sage: fm = FusionRing("A2", 2).get_fmatrix()
|
|
104
|
+
sage: p = fm._poly_ring.random_element()
|
|
105
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup
|
|
106
|
+
sage: flat_poly_tup = list()
|
|
107
|
+
sage: for exp, cyc_coeff in poly_to_tup(p):
|
|
108
|
+
....: flat_poly_tup.append((exp, tuple(cyc_coeff._coefficients())))
|
|
109
|
+
sage: flat_poly_tup = tuple(flat_poly_tup)
|
|
110
|
+
sage: _unflatten_coeffs(fm.field(), flat_poly_tup) == poly_to_tup(p)
|
|
111
|
+
True
|
|
112
|
+
"""
|
|
113
|
+
cdef list unflat = []
|
|
114
|
+
for exp, coeff_tup in eq_tup:
|
|
115
|
+
unflat.append((exp, field(list(coeff_tup))))
|
|
116
|
+
return tuple(unflat)
|
|
117
|
+
|
|
118
|
+
#################################
|
|
119
|
+
# Useful private predicates #
|
|
120
|
+
#################################
|
|
121
|
+
|
|
122
|
+
cdef inline int has_appropriate_linear_term(tuple eq_tup) noexcept:
|
|
123
|
+
r"""
|
|
124
|
+
Determine whether the given tuple of pairs (of length 2) contains
|
|
125
|
+
an *appropriate* linear term.
|
|
126
|
+
|
|
127
|
+
In this context, a linear term is said to be *appropriate* if
|
|
128
|
+
it is in the largest variable in the given polynomial (w.r.t.
|
|
129
|
+
the degrevlex ordering), the monomial in which the linear term
|
|
130
|
+
appears is univariate, and the linear term is not a common factor in
|
|
131
|
+
the polynomial.
|
|
132
|
+
|
|
133
|
+
OUTPUT:
|
|
134
|
+
|
|
135
|
+
If the given polynomial contains an appropriate linear term, this method
|
|
136
|
+
returns the index of the monomial in which the term appears.
|
|
137
|
+
|
|
138
|
+
Otherwise, the method returns `-1`.
|
|
139
|
+
"""
|
|
140
|
+
max_var = degrees(eq_tup).nonzero_positions()[0]
|
|
141
|
+
cdef ETuple m
|
|
142
|
+
cdef int i
|
|
143
|
+
for i in range(2):
|
|
144
|
+
m = eq_tup[i][0]
|
|
145
|
+
if m._nonzero == 1 and m._data[1] == 1 and m._data[0] == max_var and eq_tup[(i+1) % 2][0][max_var] == 0:
|
|
146
|
+
return i
|
|
147
|
+
return -1
|
|
148
|
+
|
|
149
|
+
######################
|
|
150
|
+
# "Change rings" #
|
|
151
|
+
######################
|
|
152
|
+
|
|
153
|
+
cpdef inline tup_to_univ_poly(tuple eq_tup, univ_poly_ring):
|
|
154
|
+
r"""
|
|
155
|
+
Given a tuple of pairs representing a univariate polynomial and a univariate
|
|
156
|
+
polynomial ring, return a univariate polynomial object.
|
|
157
|
+
|
|
158
|
+
Each pair in the tuple is assumed to be of the form ``(ETuple, coeff)``,
|
|
159
|
+
where ``coeff`` is an element of ``univ_poly_ring.base_ring()``.
|
|
160
|
+
|
|
161
|
+
EXAMPLES::
|
|
162
|
+
|
|
163
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import tup_to_univ_poly
|
|
164
|
+
sage: from sage.rings.polynomial.polydict import ETuple
|
|
165
|
+
sage: K = CyclotomicField(56)
|
|
166
|
+
sage: poly_tup = ((ETuple([0, 3, 0]), K(2)), (ETuple([0, 1, 0]), K(-1)), (ETuple([0, 0, 0]), K(-2/3)))
|
|
167
|
+
sage: R = K['b']
|
|
168
|
+
sage: tup_to_univ_poly(poly_tup, R)
|
|
169
|
+
2*b^3 - b - 2/3
|
|
170
|
+
|
|
171
|
+
TESTS::
|
|
172
|
+
|
|
173
|
+
sage: poly_tup = ((ETuple([0, 0, 0]), K(-1/5)), )
|
|
174
|
+
sage: tup_to_univ_poly(poly_tup, R)
|
|
175
|
+
-1/5
|
|
176
|
+
"""
|
|
177
|
+
cdef ETuple exp
|
|
178
|
+
cdef NumberFieldElement_absolute c
|
|
179
|
+
return univ_poly_ring({exp._data[1] if exp._nonzero else 0: c for exp, c in eq_tup})
|
|
180
|
+
|
|
181
|
+
cpdef inline tuple resize(tuple eq_tup, dict idx_map, int nvars):
|
|
182
|
+
r"""
|
|
183
|
+
Return a tuple representing a polynomial in a ring with
|
|
184
|
+
``len(sorted_vars)`` generators.
|
|
185
|
+
|
|
186
|
+
This method is used for creating polynomial objects with the
|
|
187
|
+
"right number" of variables for computing Groebner bases of the
|
|
188
|
+
partitioned equations graph and for adding constraints ensuring certain
|
|
189
|
+
F-symbols are nonzero.
|
|
190
|
+
|
|
191
|
+
EXAMPLES::
|
|
192
|
+
|
|
193
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import resize
|
|
194
|
+
sage: from sage.rings.polynomial.polydict import ETuple
|
|
195
|
+
sage: K = CyclotomicField(56)
|
|
196
|
+
sage: poly_tup = ((ETuple([0, 3, 0, 2]), K(2)), (ETuple([0, 1, 0, 1]), K(-1)), (ETuple([0, 0, 0, 0]), K(-2/3)))
|
|
197
|
+
sage: idx_map = {1: 0, 3: 1}
|
|
198
|
+
sage: resize(poly_tup, idx_map, 2)
|
|
199
|
+
(((3, 2), 2), ((1, 1), -1), ((0, 0), -2/3))
|
|
200
|
+
|
|
201
|
+
sage: R = PolynomialRing(K, 'fx', 20)
|
|
202
|
+
sage: R.inject_variables()
|
|
203
|
+
Defining fx0, fx1, fx2, fx3, fx4, fx5, fx6, fx7, fx8, fx9, fx10, fx11, fx12, fx13, fx14, fx15, fx16, fx17, fx18, fx19
|
|
204
|
+
sage: sparse_poly = R(fx0**2 * fx17 + fx3)
|
|
205
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup, _tup_to_poly
|
|
206
|
+
sage: S.<x, y, z> = PolynomialRing(K)
|
|
207
|
+
sage: _tup_to_poly(resize(poly_to_tup(sparse_poly), {0:0, 3:1, 17:2}, 3), parent=S)
|
|
208
|
+
x^2*z + y
|
|
209
|
+
"""
|
|
210
|
+
cdef ETuple exp, new_e
|
|
211
|
+
cdef NumberFieldElement_absolute c
|
|
212
|
+
cdef list resized = list()
|
|
213
|
+
for exp, c in eq_tup:
|
|
214
|
+
new_e = ETuple({idx_map[pos]: d for pos, d in exp.sparse_iter()}, nvars)
|
|
215
|
+
resized.append((new_e, c))
|
|
216
|
+
return tuple(resized)
|
|
217
|
+
|
|
218
|
+
###########################
|
|
219
|
+
# Convenience methods #
|
|
220
|
+
###########################
|
|
221
|
+
|
|
222
|
+
cdef inline ETuple degrees(tuple poly_tup):
|
|
223
|
+
r"""
|
|
224
|
+
Return the maximal degree of each variable in the polynomial.
|
|
225
|
+
"""
|
|
226
|
+
# Deal with the empty tuple, representing the zero polynomial
|
|
227
|
+
if not poly_tup:
|
|
228
|
+
return ETuple()
|
|
229
|
+
cdef ETuple max_degs
|
|
230
|
+
cdef int i
|
|
231
|
+
max_degs = <ETuple> (<tuple> poly_tup[0])[0]
|
|
232
|
+
for i in range(1, len(poly_tup)):
|
|
233
|
+
max_degs = max_degs.emax(<ETuple> (<tuple> poly_tup[i])[0])
|
|
234
|
+
return max_degs
|
|
235
|
+
|
|
236
|
+
cpdef list get_variables_degrees(list eqns, int nvars):
|
|
237
|
+
r"""
|
|
238
|
+
Find maximum degrees for each variable in equations.
|
|
239
|
+
|
|
240
|
+
EXAMPLES::
|
|
241
|
+
|
|
242
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import get_variables_degrees
|
|
243
|
+
sage: R.<x, y, z> = PolynomialRing(QQ)
|
|
244
|
+
sage: polys = [x**2 + 1, x*y*z**2 - 4*x*y, x*z**3 - 4/3*y + 1]
|
|
245
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup
|
|
246
|
+
sage: get_variables_degrees([poly_to_tup(p) for p in polys], 3)
|
|
247
|
+
[2, 1, 3]
|
|
248
|
+
"""
|
|
249
|
+
if not eqns:
|
|
250
|
+
return [0]*nvars
|
|
251
|
+
cdef ETuple max_deg
|
|
252
|
+
cdef int i
|
|
253
|
+
max_deg = degrees(eqns[0])
|
|
254
|
+
for i in range(1, len(eqns)):
|
|
255
|
+
max_deg = max_deg.emax(degrees(<tuple>(eqns[i])))
|
|
256
|
+
cdef list dense = [0] * len(max_deg)
|
|
257
|
+
for i in range(max_deg._nonzero):
|
|
258
|
+
dense[max_deg._data[2*i]] = max_deg._data[2*i+1]
|
|
259
|
+
return dense
|
|
260
|
+
|
|
261
|
+
cpdef list variables(tuple eq_tup):
|
|
262
|
+
"""
|
|
263
|
+
Return indices of all variables appearing in ``eq_tup``.
|
|
264
|
+
|
|
265
|
+
EXAMPLES::
|
|
266
|
+
|
|
267
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import variables
|
|
268
|
+
sage: from sage.rings.polynomial.polydict import ETuple
|
|
269
|
+
sage: poly_tup = ((ETuple([0, 3, 0]), 2), (ETuple([0, 1, 0]), -1), (ETuple([0, 0, 0]), -2/3))
|
|
270
|
+
sage: variables(poly_tup)
|
|
271
|
+
[1]
|
|
272
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup
|
|
273
|
+
sage: R.<x, y, z> = PolynomialRing(QQ)
|
|
274
|
+
sage: variables(poly_to_tup(x*2*y + y**3 - 4/3*x))
|
|
275
|
+
[0, 1]
|
|
276
|
+
sage: variables(poly_to_tup(R(1/4)))
|
|
277
|
+
[]
|
|
278
|
+
"""
|
|
279
|
+
return degrees(eq_tup).nonzero_positions()
|
|
280
|
+
|
|
281
|
+
cpdef constant_coeff(tuple eq_tup, field):
|
|
282
|
+
r"""
|
|
283
|
+
Return the constant coefficient of the polynomial represented by
|
|
284
|
+
given tuple.
|
|
285
|
+
|
|
286
|
+
EXAMPLES::
|
|
287
|
+
|
|
288
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import constant_coeff
|
|
289
|
+
sage: from sage.rings.polynomial.polydict import ETuple
|
|
290
|
+
sage: poly_tup = ((ETuple([0, 3, 0]), 2), (ETuple([0, 1, 0]), -1), (ETuple([0, 0, 0]), -2/3))
|
|
291
|
+
sage: constant_coeff(poly_tup, QQ)
|
|
292
|
+
-2/3
|
|
293
|
+
sage: R.<x, y, z> = PolynomialRing(QQ)
|
|
294
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup
|
|
295
|
+
sage: constant_coeff(poly_to_tup(x**5 + x*y*z - 9), QQ)
|
|
296
|
+
-9
|
|
297
|
+
"""
|
|
298
|
+
cdef ETuple exp
|
|
299
|
+
for exp, coeff in eq_tup:
|
|
300
|
+
if exp.is_constant():
|
|
301
|
+
return coeff
|
|
302
|
+
return field.zero()
|
|
303
|
+
|
|
304
|
+
cpdef tuple apply_coeff_map(tuple eq_tup, coeff_map):
|
|
305
|
+
"""
|
|
306
|
+
Apply ``coeff_map`` to coefficients.
|
|
307
|
+
|
|
308
|
+
EXAMPLES::
|
|
309
|
+
|
|
310
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import apply_coeff_map
|
|
311
|
+
sage: sq = lambda x : x**2
|
|
312
|
+
sage: R.<x, y, z> = PolynomialRing(ZZ)
|
|
313
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup, _tup_to_poly
|
|
314
|
+
sage: _tup_to_poly(apply_coeff_map(poly_to_tup(x + 2*y + 3*z), sq), parent=R)
|
|
315
|
+
x + 4*y + 9*z
|
|
316
|
+
"""
|
|
317
|
+
cdef ETuple exp
|
|
318
|
+
cdef list new_tup = []
|
|
319
|
+
for exp, coeff in eq_tup:
|
|
320
|
+
new_tup.append((exp, coeff_map(coeff)))
|
|
321
|
+
return tuple(new_tup)
|
|
322
|
+
|
|
323
|
+
# cpdef inline bint tup_fixes_sq(tuple eq_tup):
|
|
324
|
+
cdef inline bint tup_fixes_sq(tuple eq_tup) noexcept:
|
|
325
|
+
r"""
|
|
326
|
+
Determine if given equation fixes the square of a variable.
|
|
327
|
+
|
|
328
|
+
An equation fixes the sq of a variable if it is of the form `a*x^2 + c`
|
|
329
|
+
for *nonzero* constants `a`, `c`.
|
|
330
|
+
"""
|
|
331
|
+
if len(eq_tup) != 2:
|
|
332
|
+
return False
|
|
333
|
+
# To access _attributes, we must cdef ETuple
|
|
334
|
+
cdef ETuple lm = eq_tup[0][0]
|
|
335
|
+
if lm._nonzero != 1 or lm._data[1] != 2:
|
|
336
|
+
return False
|
|
337
|
+
cdef ETuple tm = eq_tup[1][0]
|
|
338
|
+
if tm._nonzero != 0:
|
|
339
|
+
return False
|
|
340
|
+
return True
|
|
341
|
+
|
|
342
|
+
######################
|
|
343
|
+
# Simplification #
|
|
344
|
+
######################
|
|
345
|
+
|
|
346
|
+
cdef dict subs_squares(dict eq_dict, KSHandler known_sq):
|
|
347
|
+
r"""
|
|
348
|
+
Substitute for known squares into a given polynomial.
|
|
349
|
+
|
|
350
|
+
INPUT:
|
|
351
|
+
|
|
352
|
+
- ``eq_dict`` -- dictionary of ``(ETuple, coeff)`` pairs representing
|
|
353
|
+
a polynomial
|
|
354
|
+
- ``known_sq`` -- dictionary of ``(int i, NumberFieldElement a)`` pairs
|
|
355
|
+
such that `x_i^2 - a = 0`
|
|
356
|
+
|
|
357
|
+
OUTPUT:
|
|
358
|
+
|
|
359
|
+
A dictionary of ``(ETuple, coeff)`` pairs.
|
|
360
|
+
"""
|
|
361
|
+
cdef dict subbed, new_e
|
|
362
|
+
cdef ETuple exp
|
|
363
|
+
cdef int idx, power
|
|
364
|
+
subbed = dict()
|
|
365
|
+
for exp, coeff in eq_dict.items():
|
|
366
|
+
new_e = dict()
|
|
367
|
+
for idx, power in exp.sparse_iter():
|
|
368
|
+
if known_sq.contains(idx):
|
|
369
|
+
coeff *= pow(known_sq.get(idx), power // 2)
|
|
370
|
+
# New power is 1 if power is odd
|
|
371
|
+
if power & True:
|
|
372
|
+
new_e[idx] = 1
|
|
373
|
+
else:
|
|
374
|
+
new_e[idx] = power
|
|
375
|
+
exp = ETuple(new_e, len(exp))
|
|
376
|
+
# If exponent tuple is already present in dictionary, coefficients are added
|
|
377
|
+
if exp in subbed:
|
|
378
|
+
subbed[exp] += coeff
|
|
379
|
+
else:
|
|
380
|
+
subbed[exp] = coeff
|
|
381
|
+
return subbed
|
|
382
|
+
|
|
383
|
+
cdef dict remove_gcf(dict eq_dict, ETuple nonz):
|
|
384
|
+
r"""
|
|
385
|
+
Return a dictionary of ``(ETuple, coeff)`` pairs describing the
|
|
386
|
+
polynomial ``eq / GCF(eq)``.
|
|
387
|
+
|
|
388
|
+
The input ``nonz`` is an ``ETuple`` indicating the positions of
|
|
389
|
+
variables known to be nonzero. The entries of ``nonz`` are assumed to
|
|
390
|
+
be some relatively large number, like 100.
|
|
391
|
+
"""
|
|
392
|
+
# Find common variables, filtered according to known nonzeros
|
|
393
|
+
cdef ETuple common_powers, exp
|
|
394
|
+
cdef NumberFieldElement_absolute c
|
|
395
|
+
common_powers = nonz
|
|
396
|
+
for exp, c in eq_dict.items():
|
|
397
|
+
common_powers = common_powers.emin(exp)
|
|
398
|
+
cdef dict ret = {}
|
|
399
|
+
for exp, c in eq_dict.items():
|
|
400
|
+
ret[exp.esub(common_powers)] = c
|
|
401
|
+
return ret
|
|
402
|
+
|
|
403
|
+
cdef tuple to_monic(dict eq_dict, one):
|
|
404
|
+
"""
|
|
405
|
+
Return tuple of pairs ``(ETuple, coeff)`` describing the monic polynomial
|
|
406
|
+
associated to ``eq_dict``.
|
|
407
|
+
|
|
408
|
+
Here, the leading coefficient is chosen according to the degree reverse
|
|
409
|
+
lexicographic ordering (default for multivariate polynomial rings).
|
|
410
|
+
"""
|
|
411
|
+
if not eq_dict:
|
|
412
|
+
return ()
|
|
413
|
+
cdef list ord_monoms = sorted(eq_dict, key=monom_sortkey)
|
|
414
|
+
cdef ETuple lm = ord_monoms[-1]
|
|
415
|
+
cdef NumberFieldElement_absolute lc = eq_dict[lm]
|
|
416
|
+
if not lc:
|
|
417
|
+
return ()
|
|
418
|
+
cdef list ret = [(lm, one)]
|
|
419
|
+
inv_lc = lc.inverse_of_unit()
|
|
420
|
+
cdef int i, n
|
|
421
|
+
n = len(ord_monoms)
|
|
422
|
+
for i in range(n-1):
|
|
423
|
+
ret.append((ord_monoms[n-2-i], inv_lc * eq_dict[ord_monoms[n-2-i]]))
|
|
424
|
+
return tuple(ret)
|
|
425
|
+
|
|
426
|
+
cdef tuple reduce_poly_dict(dict eq_dict, ETuple nonz, KSHandler known_sq, NumberFieldElement_absolute one):
|
|
427
|
+
"""
|
|
428
|
+
Return a tuple describing a monic polynomial with no known nonzero
|
|
429
|
+
gcf and no known squares.
|
|
430
|
+
"""
|
|
431
|
+
if not eq_dict:
|
|
432
|
+
return ()
|
|
433
|
+
cdef dict sq_rmvd = subs_squares(eq_dict, known_sq)
|
|
434
|
+
cdef dict gcf_rmvd = remove_gcf(sq_rmvd, nonz)
|
|
435
|
+
return to_monic(gcf_rmvd, one)
|
|
436
|
+
|
|
437
|
+
####################
|
|
438
|
+
# Substitution #
|
|
439
|
+
####################
|
|
440
|
+
|
|
441
|
+
cpdef dict compute_known_powers(max_degs, dict val_dict, one):
|
|
442
|
+
"""
|
|
443
|
+
Pre-compute powers of known values for efficiency when preparing to
|
|
444
|
+
substitute into a list of polynomials.
|
|
445
|
+
|
|
446
|
+
INPUT:
|
|
447
|
+
|
|
448
|
+
- ``max_deg`` -- an ``ETuple`` indicating the maximal degree of
|
|
449
|
+
each variable
|
|
450
|
+
- ``val_dict`` -- dictionary of ``(var_idx, poly_tup)`` key-value pairs
|
|
451
|
+
- ``poly_tup`` -- tuple of ``(ETuple, coeff)`` pairs representing a
|
|
452
|
+
multivariate polynomial
|
|
453
|
+
|
|
454
|
+
EXAMPLES::
|
|
455
|
+
|
|
456
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import compute_known_powers
|
|
457
|
+
sage: R.<x, y, z> = PolynomialRing(QQ)
|
|
458
|
+
sage: polys = [x**3 + 1, x**2*y + z**3, y**2 - 3*y]
|
|
459
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_to_tup
|
|
460
|
+
sage: known_val = { 0 : poly_to_tup(R(-1)), 2 : poly_to_tup(y**2) }
|
|
461
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import get_variables_degrees
|
|
462
|
+
sage: max_deg = get_variables_degrees([poly_to_tup(p) for p in polys], 3)
|
|
463
|
+
sage: compute_known_powers(max_deg, known_val, R.base_ring().one())
|
|
464
|
+
{0: [(((0, 0, 0), 1),),
|
|
465
|
+
(((0, 0, 0), -1),),
|
|
466
|
+
(((0, 0, 0), 1),),
|
|
467
|
+
(((0, 0, 0), -1),)],
|
|
468
|
+
2: [(((0, 0, 0), 1),),
|
|
469
|
+
(((0, 2, 0), 1),),
|
|
470
|
+
(((0, 4, 0), 1),),
|
|
471
|
+
(((0, 6, 0), 1),)]}
|
|
472
|
+
"""
|
|
473
|
+
assert (max_degs and max(max_degs) <= 100) or True, "cannot substitute for degree larger than 100"
|
|
474
|
+
cdef ETuple max_deg = ETuple(list(max_degs))
|
|
475
|
+
max_deg = max_deg.emin(ETuple({idx: 100 for idx in val_dict}, len(max_deg)))
|
|
476
|
+
cdef dict known_powers
|
|
477
|
+
# Get polynomial unit as tuple to initialize list elements
|
|
478
|
+
cdef tuple one_tup = ((max_deg._new(), one), )
|
|
479
|
+
cdef int d, power, var_idx
|
|
480
|
+
known_powers = {var_idx: [one_tup]*(d+1) for var_idx, d in max_deg.sparse_iter()}
|
|
481
|
+
for var_idx, d in max_deg.sparse_iter():
|
|
482
|
+
for power in range(d):
|
|
483
|
+
known_powers[var_idx][power+1] = tup_mul(known_powers[var_idx][power], val_dict[var_idx])
|
|
484
|
+
return known_powers
|
|
485
|
+
|
|
486
|
+
cdef dict subs(tuple poly_tup, dict known_powers, one):
|
|
487
|
+
"""
|
|
488
|
+
Substitute given variables into a polynomial tuple.
|
|
489
|
+
"""
|
|
490
|
+
cdef dict subbed = {}
|
|
491
|
+
cdef ETuple exp, m, shifted_exp
|
|
492
|
+
cdef int var_idx, power
|
|
493
|
+
cdef tuple temp
|
|
494
|
+
for exp, coeff in poly_tup:
|
|
495
|
+
# Get polynomial unit as tuple
|
|
496
|
+
temp = ((exp._new(), one), )
|
|
497
|
+
for var_idx, power in exp.sparse_iter():
|
|
498
|
+
if var_idx in known_powers:
|
|
499
|
+
exp = exp.eadd_p(-power, var_idx)
|
|
500
|
+
temp = tup_mul(temp, known_powers[var_idx][power])
|
|
501
|
+
for m, c in temp:
|
|
502
|
+
shifted_exp = exp.eadd(m)
|
|
503
|
+
if shifted_exp in subbed:
|
|
504
|
+
subbed[shifted_exp] += coeff * c
|
|
505
|
+
else:
|
|
506
|
+
subbed[shifted_exp] = coeff * c
|
|
507
|
+
return subbed
|
|
508
|
+
|
|
509
|
+
cdef tuple tup_mul(tuple p1, tuple p2):
|
|
510
|
+
r"""
|
|
511
|
+
Multiplication of two polynomial tuples using schoolbook multiplication.
|
|
512
|
+
"""
|
|
513
|
+
cdef dict prod = {}
|
|
514
|
+
cdef ETuple xi, yj, shifted_exp
|
|
515
|
+
for xi, ai in p1:
|
|
516
|
+
for yj, bj in p2:
|
|
517
|
+
shifted_exp = xi.eadd(yj)
|
|
518
|
+
if shifted_exp in prod:
|
|
519
|
+
prod[shifted_exp] += ai * bj
|
|
520
|
+
else:
|
|
521
|
+
prod[shifted_exp] = ai * bj
|
|
522
|
+
return tuple(prod.items())
|
|
523
|
+
|
|
524
|
+
###############
|
|
525
|
+
# Sorting #
|
|
526
|
+
###############
|
|
527
|
+
|
|
528
|
+
cdef tuple monom_sortkey(ETuple exp):
|
|
529
|
+
r"""
|
|
530
|
+
Produce a sortkey for a monomial exponent with respect to degree
|
|
531
|
+
reversed lexicographic ordering.
|
|
532
|
+
"""
|
|
533
|
+
cdef int deg = exp.unweighted_degree()
|
|
534
|
+
# for i in range(exp._nonzero):
|
|
535
|
+
# exp._data[2*i+1] = -exp._data[2*i+1]
|
|
536
|
+
cdef ETuple rev = exp.reversed().emul(-1)
|
|
537
|
+
return (deg, rev)
|
|
538
|
+
|
|
539
|
+
cpdef tuple poly_tup_sortkey(tuple eq_tup):
|
|
540
|
+
r"""
|
|
541
|
+
Return the sortkey of a polynomial represented as a tuple of
|
|
542
|
+
``(ETuple, coeff)`` pairs with respect to the degree
|
|
543
|
+
lexicographical term order.
|
|
544
|
+
|
|
545
|
+
Using this key to sort polynomial tuples results in comparing polynomials
|
|
546
|
+
term by term (we assume the tuple representation is sorted so that the
|
|
547
|
+
leading term with respect to the degree reverse lexicographical order
|
|
548
|
+
comes first). For each term, we first compare degrees, then the monomials
|
|
549
|
+
themselves. Different polynomials can have the same sortkey.
|
|
550
|
+
|
|
551
|
+
EXAMPLES::
|
|
552
|
+
|
|
553
|
+
sage: F = CyclotomicField(20)
|
|
554
|
+
sage: zeta20 = F.gen()
|
|
555
|
+
sage: R.<x, y, z> = PolynomialRing(F)
|
|
556
|
+
sage: from sage.algebras.fusion_rings.poly_tup_engine import poly_tup_sortkey, poly_to_tup
|
|
557
|
+
sage: p = (zeta20 + 1)*x^2 + (zeta20^3 + 6)*x*z + (zeta20^2 + 7*zeta20)*z^2 + (2/3*zeta20 + 1/4)*x + y
|
|
558
|
+
sage: p1 = poly_to_tup(p); p1
|
|
559
|
+
(((2, 0, 0), zeta20 + 1),
|
|
560
|
+
((1, 0, 1), zeta20^3 + 6),
|
|
561
|
+
((0, 0, 2), zeta20^2 + 7*zeta20),
|
|
562
|
+
((1, 0, 0), 2/3*zeta20 + 1/4),
|
|
563
|
+
((0, 1, 0), 1))
|
|
564
|
+
sage: poly_tup_sortkey(p1)
|
|
565
|
+
(2, 0, 2, 2, 0, 1, -2, 1, 2, -2, 2, 1, 0, 1, 1, -1, 1)
|
|
566
|
+
"""
|
|
567
|
+
cdef ETuple exp
|
|
568
|
+
cdef int i
|
|
569
|
+
cdef list key = []
|
|
570
|
+
for exp, c in eq_tup:
|
|
571
|
+
# Compare by term degree
|
|
572
|
+
key.append(exp.unweighted_degree())
|
|
573
|
+
# Next compare by term w.r.t. lex order
|
|
574
|
+
for i in range(exp._nonzero):
|
|
575
|
+
# key.append(exp._length-1-exp._data[2*(nnz-i-1)])
|
|
576
|
+
# key.append(-exp._data[2*(nnz-i-1)+1])
|
|
577
|
+
key.append(-exp._data[2*i])
|
|
578
|
+
key.append(exp._data[2*i+1])
|
|
579
|
+
return tuple(key)
|
|
Binary file
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# sage_setup: distribution = sagemath-singular
|
|
2
|
+
cimport numpy as np
|
|
3
|
+
from sage.rings.number_field.number_field_base cimport NumberField
|
|
4
|
+
from sage.rings.number_field.number_field_element cimport NumberFieldElement_absolute
|
|
5
|
+
|
|
6
|
+
cdef class KSHandler:
|
|
7
|
+
cdef list obj_cache
|
|
8
|
+
cdef np.ndarray ks_dat
|
|
9
|
+
cdef NumberField field
|
|
10
|
+
cdef public object shm
|
|
11
|
+
|
|
12
|
+
cdef bint contains(self, int idx) noexcept
|
|
13
|
+
cdef NumberFieldElement_absolute get(self, int idx)
|
|
14
|
+
cdef setitem(self, int idx, rhs)
|
|
15
|
+
cpdef update(self, list eqns)
|
|
16
|
+
|
|
17
|
+
cdef class FvarsHandler:
|
|
18
|
+
cdef dict sext_to_idx, obj_cache
|
|
19
|
+
cdef int bytes, ngens
|
|
20
|
+
cdef np.ndarray fvars
|
|
21
|
+
cdef NumberField field
|
|
22
|
+
cdef object fvars_t, pid_list
|
|
23
|
+
cdef Py_ssize_t child_id
|
|
24
|
+
cdef public object shm
|