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,1887 @@
|
|
|
1
|
+
//////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version nctools.lib 4.1.2.0 Feb_2019 "; // $Id: 8f1f954075fe93b2e3e3dbc34e516b3c0e25b117 $
|
|
3
|
+
category="Noncommutative";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: nctools.lib General tools for noncommutative algebras
|
|
6
|
+
AUTHORS: Levandovskyy V., levandov@mathematik.uni-kl.de,
|
|
7
|
+
@* Lobillo, F.J., jlobillo@ugr.es,
|
|
8
|
+
@* Rabelo, C., crabelo@ugr.es,
|
|
9
|
+
@* Motsak, O., U@D, where U={motsak}, D={mathematik.uni-kl.de}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
OVERVIEW:
|
|
13
|
+
Support: DFG (Deutsche Forschungsgesellschaft) and Metodos algebraicos y efectivos
|
|
14
|
+
en grupos cuanticos, BFM2001-3141, MCYT, Jose Gomez-Torrecillas (Main researcher).
|
|
15
|
+
|
|
16
|
+
PROCEDURES:
|
|
17
|
+
Gweights(r); compute weights for a compatible ordering in a G-algebra,
|
|
18
|
+
weightedRing(r); change the ordering of a ring to a weighted one,
|
|
19
|
+
ndcond(); the ideal of non-degeneracy conditions in G-algebra,
|
|
20
|
+
Weyl([p]); create Weyl algebra structure in a basering (two different realizations),
|
|
21
|
+
makeWeyl(n, [p]); return n-th Weyl algebra in (x(i),D(i)) presentation,
|
|
22
|
+
makeHeisenberg(N, [p,d]); return n-th Heisenberg algebra in (x(i),y(i),h) realization,
|
|
23
|
+
Exterior(); return qring, the exterior algebra of a basering,
|
|
24
|
+
findimAlgebra(M,[r]); create finite dimensional algebra structure from the basering and the multiplication matrix M,
|
|
25
|
+
superCommutative([b,e,Q]); return qring, a super-commutative algebra over a basering,
|
|
26
|
+
rightStd(I); compute right Groebner basis of an ideal,
|
|
27
|
+
rightNF(f,I); compute right normal form wrt a submodule,
|
|
28
|
+
rightModulo(M,N); compute kernel of a homomorphism of right modules,
|
|
29
|
+
moduloSlim(A,B); compute modulo command via slimgb
|
|
30
|
+
ncRelations(r); recover the non-commutative relations of a G-algebra,
|
|
31
|
+
isCentral(p); check for the commutativity of a polynomial in the G-algebra,
|
|
32
|
+
isNC(); check whether basering is noncommutative,
|
|
33
|
+
isCommutative(); check whether basering is commutative
|
|
34
|
+
isWeyl(); check whether basering is a Weyl algebra
|
|
35
|
+
UpOneMatrix(); return NxN matrix with 1's in the whole upper triagle,
|
|
36
|
+
AltVarStart(); return first alternating variable of a super-commutative algebra,
|
|
37
|
+
AltVarEnd(); return last alternating variable of a super-commutative algebra,
|
|
38
|
+
IsSCA(); check whether current ring is a super-commutative algebra,
|
|
39
|
+
makeModElimRing(R); equip a ring with module elimination ordering,
|
|
40
|
+
embedMat(M,m,n); embeds matrix M in a left upper corner of m times n matrix
|
|
41
|
+
";
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
LIB "ring.lib"; // for rootofUnity
|
|
45
|
+
LIB "polylib.lib"; // for newtonDiag
|
|
46
|
+
LIB "matrix.lib"; // for submat
|
|
47
|
+
|
|
48
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
49
|
+
|
|
50
|
+
// This procedure computes a weights vector for a G-algebra r
|
|
51
|
+
|
|
52
|
+
proc Gweights(def r)
|
|
53
|
+
"USAGE: Gweights(r); r a ring or a square matrix
|
|
54
|
+
RETURN: intvec
|
|
55
|
+
PURPOSE: compute an appropriate weight int vector for a G-algebra, i.e., such that
|
|
56
|
+
\foral\;i<j\;\;lm_w(d_{ij}) <_w x_i x_j.
|
|
57
|
+
@* the polynomials d_{ij} are taken from r itself, if it is of the type ring
|
|
58
|
+
@* or defined by the given square polynomial matrix
|
|
59
|
+
THEORY: @code{Gweights} returns an integer vector, whose weighting should be used to redefine the G-algebra in order
|
|
60
|
+
to get the same non-commutative structure w.r.t. a weighted ordering. If the input is a matrix and the output is the zero
|
|
61
|
+
vector then there is not a G-algebra structure associated to these relations with respect to the given variables.
|
|
62
|
+
@*Another possibility is to use @code{weightedRing} to obtain directly a G-algebra with the new appropriate (weighted) ordering.
|
|
63
|
+
EXAMPLE: example Gweights; shows examples
|
|
64
|
+
SEE ALSO: weightedRing
|
|
65
|
+
"{
|
|
66
|
+
int novalid=0;
|
|
67
|
+
if (typeof(r)=="ring") //a ring is admissible as input
|
|
68
|
+
{
|
|
69
|
+
setring r;
|
|
70
|
+
matrix tails;
|
|
71
|
+
def l = ncRelations(r);
|
|
72
|
+
tails = l[2]; // l=C,D we need D, the tails of the relations
|
|
73
|
+
}
|
|
74
|
+
else
|
|
75
|
+
{
|
|
76
|
+
matrix tails;
|
|
77
|
+
if ( (typeof(r)=="matrix") || (typeof(r)=="intmat") )
|
|
78
|
+
{
|
|
79
|
+
if ( nrows(r)==ncols(r) ) //the input is a square matrix
|
|
80
|
+
{
|
|
81
|
+
tails = matrix(r);
|
|
82
|
+
}
|
|
83
|
+
else
|
|
84
|
+
{
|
|
85
|
+
novalid = 1;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else
|
|
89
|
+
{
|
|
90
|
+
novalid=1;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
if (novalid==0)
|
|
94
|
+
{
|
|
95
|
+
intmat IM = SimplMat(tails);
|
|
96
|
+
if ( size(IM)>1 )
|
|
97
|
+
{
|
|
98
|
+
int n = ncols(tails);
|
|
99
|
+
int m = nrows(IM)-1;
|
|
100
|
+
int m1 = 0;
|
|
101
|
+
int m2 = m;
|
|
102
|
+
int m3 = 0;
|
|
103
|
+
ring simplexring=(real,10),(x),lp;// The simplex procedure requires a basering of this type
|
|
104
|
+
matrix M = IM;
|
|
105
|
+
list sol = simplex (M,m,n,m1,m2,m3);
|
|
106
|
+
return(weightvector(sol));
|
|
107
|
+
}
|
|
108
|
+
else
|
|
109
|
+
{
|
|
110
|
+
"Invalid input"; //usually because the input is a one variable ring
|
|
111
|
+
return();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
else
|
|
115
|
+
{
|
|
116
|
+
"The input must be a ring or a square matrix";
|
|
117
|
+
return();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
example
|
|
121
|
+
{
|
|
122
|
+
"EXAMPLE:";echo=2;
|
|
123
|
+
ring r = (0,q),(a,b,c,d),lp;
|
|
124
|
+
matrix C[4][4];
|
|
125
|
+
C[1,2]=q; C[1,3]=q; C[1,4]=1; C[2,3]=1; C[2,4]=q; C[3,4]=q;
|
|
126
|
+
matrix D[4][4];
|
|
127
|
+
D[1,4]=(q-1/q)*b*c;
|
|
128
|
+
def S = nc_algebra(C,D); setring S; S;
|
|
129
|
+
Gweights(S);
|
|
130
|
+
def D=fetch(r,D);
|
|
131
|
+
Gweights(D);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
135
|
+
|
|
136
|
+
// This procedure take a ring r, call to Gweights(r) and use the output
|
|
137
|
+
// of Gweights(r) to make a change of order in r
|
|
138
|
+
// The output is a new ring, equal to r but the order
|
|
139
|
+
// r must be a G-algebra
|
|
140
|
+
|
|
141
|
+
proc weightedRing(def r)
|
|
142
|
+
"USAGE: weightedRing(r); r a ring
|
|
143
|
+
RETURN: ring
|
|
144
|
+
PURPOSE: equip the variables of the given ring with weights such that the relations of new ring (with weighted variables) satisfies the ordering condition for G-algebras:
|
|
145
|
+
e.g. \forall\;i<j\;\;lm_w(d_{ij})<_w x_i x_j.
|
|
146
|
+
NOTE: activate this ring with the \"setring\" command
|
|
147
|
+
EXAMPLE: example weightedRing; shows examples
|
|
148
|
+
SEE ALSO: Gweights
|
|
149
|
+
"{
|
|
150
|
+
def wv=Gweights(r);
|
|
151
|
+
if (typeof(wv)=="intvec")
|
|
152
|
+
{
|
|
153
|
+
setring r;
|
|
154
|
+
int n=nvars(r);
|
|
155
|
+
// Generating an nxn-intmat order
|
|
156
|
+
intmat m[n][n];
|
|
157
|
+
m[1,1]=wv[1];
|
|
158
|
+
int i;
|
|
159
|
+
for (i=2; i<=n; i++)
|
|
160
|
+
{
|
|
161
|
+
m[1,i]=wv[i];
|
|
162
|
+
m[i,n+2-i]=1;
|
|
163
|
+
}
|
|
164
|
+
// End of generation.
|
|
165
|
+
def lr=ncRelations(r);
|
|
166
|
+
setring(r);
|
|
167
|
+
ring newring = create_ring(ring_list(r)[1], ringlist(r)[2], "M("+string(m)+")", "no_minpoly");
|
|
168
|
+
def lnewring=imap(r,lr);
|
|
169
|
+
return( nc_algebra(lnewring[1],lnewring[2]) );
|
|
170
|
+
}
|
|
171
|
+
else
|
|
172
|
+
{
|
|
173
|
+
"Invalid input.";//usually because the input is a one variable ring
|
|
174
|
+
return();
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
example
|
|
178
|
+
{
|
|
179
|
+
"EXAMPLE:";echo=2;
|
|
180
|
+
ring r = (0,q),(a,b,c,d),lp;
|
|
181
|
+
matrix C[4][4];
|
|
182
|
+
C[1,2]=q; C[1,3]=q; C[1,4]=1; C[2,3]=1; C[2,4]=q; C[3,4]=q;
|
|
183
|
+
matrix D[4][4];
|
|
184
|
+
D[1,4]=(q-1/q)*b*c;
|
|
185
|
+
def S = nc_algebra(C,D); setring S; S;
|
|
186
|
+
def t=weightedRing(S);
|
|
187
|
+
setring t; t;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
191
|
+
|
|
192
|
+
// This procedure computes ei+ej-f with f running in Newton(pij) and deletes the zero rows
|
|
193
|
+
|
|
194
|
+
static proc Cij(intmat M, int i,int j)
|
|
195
|
+
{
|
|
196
|
+
M=(-1)*M;
|
|
197
|
+
int nc=ncols(M);
|
|
198
|
+
intvec N;
|
|
199
|
+
int k;
|
|
200
|
+
for (k=1; k<=nrows(M); k++)
|
|
201
|
+
{
|
|
202
|
+
M[k,i]=M[k,i]+1;
|
|
203
|
+
M[k,j]=M[k,j]+1;
|
|
204
|
+
if (intvec(M[k,1..nc])!=0)
|
|
205
|
+
{
|
|
206
|
+
N=N,intvec(M[k,1..nc]);
|
|
207
|
+
} // we only want non-zero rows
|
|
208
|
+
}
|
|
209
|
+
if (size(N)>1)
|
|
210
|
+
{
|
|
211
|
+
N=N[2..size(N)]; // Deleting the zero added in the definition of N
|
|
212
|
+
M=intmat(N,size(N) div nc,nc); // Conversion from vector to matrix
|
|
213
|
+
}
|
|
214
|
+
else
|
|
215
|
+
{
|
|
216
|
+
intmat M[1][1]=0;
|
|
217
|
+
}
|
|
218
|
+
return (M);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
222
|
+
|
|
223
|
+
// This procedure run over the matrix of pij calculating Cij
|
|
224
|
+
|
|
225
|
+
static proc Ct(matrix P)
|
|
226
|
+
{
|
|
227
|
+
int k = ncols(P);
|
|
228
|
+
intvec T = 0;
|
|
229
|
+
int i,j;
|
|
230
|
+
// int notails=1;
|
|
231
|
+
def S;
|
|
232
|
+
for (j=2; j<=k; j++)
|
|
233
|
+
{
|
|
234
|
+
for (i=1; i<j; i++)
|
|
235
|
+
{
|
|
236
|
+
if ( P[i,j] != 0 )
|
|
237
|
+
{
|
|
238
|
+
// notails=0;
|
|
239
|
+
S = newtonDiag(P[i,j]);
|
|
240
|
+
S = Cij(S,i,j);
|
|
241
|
+
if ( size(S)>1 )
|
|
242
|
+
{
|
|
243
|
+
T = T,S;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
if ( size(T)==1 )
|
|
249
|
+
{
|
|
250
|
+
intmat C[1][1] = 0;
|
|
251
|
+
}
|
|
252
|
+
else
|
|
253
|
+
{
|
|
254
|
+
T=T[2..size(T)]; // Deleting the zero added in the definition of T
|
|
255
|
+
intmat C = intmat(T,size(T) div k,k); // Conversion from vector to matrix
|
|
256
|
+
}
|
|
257
|
+
return (C);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
261
|
+
|
|
262
|
+
// The purpose of this procedure is to produce the input matrix required by simplex procedure
|
|
263
|
+
|
|
264
|
+
static proc SimplMat(matrix P)
|
|
265
|
+
{
|
|
266
|
+
intmat C=Ct(P);
|
|
267
|
+
if (size(C)>1)
|
|
268
|
+
{
|
|
269
|
+
int r = nrows(C);
|
|
270
|
+
int n = ncols(C);
|
|
271
|
+
int f = 1+n+r;
|
|
272
|
+
intmat M[f][n+1]=0;
|
|
273
|
+
int i;
|
|
274
|
+
for (i=2; i<=(n+1); i++)
|
|
275
|
+
{
|
|
276
|
+
M[1,i]=-1; // (0,-1,-1,-1,...) objective function in the first row
|
|
277
|
+
}
|
|
278
|
+
for (i=2; i<=f; i++) {M[i,1]=1;} // All the independent terms are 1
|
|
279
|
+
for (i=2; i<=(n+1); i++) {M[i,i]=-1;} // wi>=1 is an identity matrix
|
|
280
|
+
M[(n+2)..f,2..(n+1)]=(-1)*intvec(C); // <wi,a> >= 1, a in C ...
|
|
281
|
+
}
|
|
282
|
+
else
|
|
283
|
+
{
|
|
284
|
+
int n = ncols(P);
|
|
285
|
+
int f = 1+n;
|
|
286
|
+
intmat M[f][n+1]=0;
|
|
287
|
+
int i;
|
|
288
|
+
for (i=2; i<=(n+1); i++) {M[1,i]=-1;} // (0,-1,-1,-1,...) objective function in the first row
|
|
289
|
+
for (i=2; i<=f; i++) {M[i,1]=1;} // All the independent terms are 1
|
|
290
|
+
for (i=2; i<=(n+1); i++) {M[i,i]=-1;} // wi>=1 is an identity matrix
|
|
291
|
+
}
|
|
292
|
+
return (M);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
296
|
+
|
|
297
|
+
// This procedure generates a nice output of the simplex method consisting of a vector
|
|
298
|
+
// with the solutions. The vector is ordered.
|
|
299
|
+
|
|
300
|
+
static proc weightvector(list l)
|
|
301
|
+
"ASSUME: l is the output of simplex.
|
|
302
|
+
RETURN: if there is a solution, an intvec with it will be returned"
|
|
303
|
+
{
|
|
304
|
+
matrix m=l[1];
|
|
305
|
+
intvec nv=l[3];
|
|
306
|
+
int sol=l[2];
|
|
307
|
+
int rows=nrows(m);
|
|
308
|
+
int N=l[6];
|
|
309
|
+
intmat wv[1][N]=0;
|
|
310
|
+
int i;
|
|
311
|
+
if (sol)
|
|
312
|
+
{
|
|
313
|
+
"no solution satisfies the given constraints";
|
|
314
|
+
}
|
|
315
|
+
else
|
|
316
|
+
{
|
|
317
|
+
for ( i = 2; i <= rows; i++ )
|
|
318
|
+
{
|
|
319
|
+
if ( nv[i-1] <= N )
|
|
320
|
+
{
|
|
321
|
+
wv[1,nv[i-1]]=int(m[i,1]);
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return (intvec(wv));
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
331
|
+
|
|
332
|
+
// This procedure recover the non-conmutative relations (matrices C and D)
|
|
333
|
+
|
|
334
|
+
proc ncRelations(def r)
|
|
335
|
+
"USAGE: ncRelations(r); r a ring
|
|
336
|
+
RETURN: list L with two elements, both elements are of type matrix:
|
|
337
|
+
@* L[1] = matrix of coefficients C,
|
|
338
|
+
@* L[2] = matrix of polynomials D
|
|
339
|
+
PURPOSE: recover the noncommutative relations via matrices C and D from
|
|
340
|
+
a noncommutative ring
|
|
341
|
+
SEE ALSO: ringlist, G-algebras
|
|
342
|
+
EXAMPLE: example ncRelations; shows examples
|
|
343
|
+
"{
|
|
344
|
+
list l;
|
|
345
|
+
if (typeof(r)=="ring")
|
|
346
|
+
{
|
|
347
|
+
int n=nvars(r);
|
|
348
|
+
matrix C[n][n]=0;
|
|
349
|
+
matrix D[n][n]=0;
|
|
350
|
+
poly f; poly g;
|
|
351
|
+
if (n>1)
|
|
352
|
+
{
|
|
353
|
+
int i,j;
|
|
354
|
+
for (i=2; i<=n; i++)
|
|
355
|
+
{
|
|
356
|
+
for (j=1; j<i; j++)
|
|
357
|
+
{
|
|
358
|
+
f=var(i)*var(j); // yx=c*xy+...
|
|
359
|
+
g=var(j)*var(i); // xy
|
|
360
|
+
while (C[j,i]==0)
|
|
361
|
+
{
|
|
362
|
+
if (leadmonom(f)==leadmonom(g))
|
|
363
|
+
{
|
|
364
|
+
C[j,i]=leadcoef(f);
|
|
365
|
+
D[j,i]=D[j,i]+f-lead(f);
|
|
366
|
+
}
|
|
367
|
+
else
|
|
368
|
+
{
|
|
369
|
+
D[j,i]=D[j,i]+lead(f);
|
|
370
|
+
f=f-lead(f);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
l=C,D;
|
|
376
|
+
}
|
|
377
|
+
else { "The ring must have two or more variables"; }
|
|
378
|
+
}
|
|
379
|
+
else { "The input must be of a type ring";}
|
|
380
|
+
return (l);
|
|
381
|
+
}
|
|
382
|
+
example
|
|
383
|
+
{
|
|
384
|
+
"EXAMPLE:";echo=2;
|
|
385
|
+
ring r = 0,(x,y,z),dp;
|
|
386
|
+
matrix C[3][3]=0,1,2,0,0,-1,0,0,0;
|
|
387
|
+
print(C);
|
|
388
|
+
matrix D[3][3]=0,1,2y,0,0,-2x+y+1;
|
|
389
|
+
print(D);
|
|
390
|
+
def S=nc_algebra(C,D);setring S; S;
|
|
391
|
+
def l=ncRelations(S);
|
|
392
|
+
print (l[1]);
|
|
393
|
+
print (l[2]);
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
397
|
+
|
|
398
|
+
proc findimAlgebra(matrix M, list #)
|
|
399
|
+
"USAGE: findimAlgebra(M,[r]); M a matrix, r an optional ring
|
|
400
|
+
RETURN: ring
|
|
401
|
+
PURPOSE: define a finite dimensional algebra structure on a ring
|
|
402
|
+
NOTE: the matrix M is used to define the relations x(i)*x(j) = M[i,j] in the
|
|
403
|
+
basering (by default) or in the optional ring r.
|
|
404
|
+
@* The procedure equips the ring with the noncommutative structure.
|
|
405
|
+
@* The procedure exports the ideal (not a two-sided Groebner basis!), called @code{fdQuot}, for further qring definition.
|
|
406
|
+
THEORY: finite dimensional algebra can be represented as a factor algebra
|
|
407
|
+
of a G-algebra modulo certain two-sided ideal. The relations of a f.d. algebra are thus naturally divided into two groups: firstly, the relations
|
|
408
|
+
on the variables of the ring, making it into G-algebra and the rest of them, which constitute the ideal which will be factored out.
|
|
409
|
+
EXAMPLE: example findimAlgebra; shows examples
|
|
410
|
+
"
|
|
411
|
+
{
|
|
412
|
+
if (size(#) >0)
|
|
413
|
+
{
|
|
414
|
+
if ( typeof(#[1])!="ring" ) { return();}
|
|
415
|
+
else
|
|
416
|
+
{
|
|
417
|
+
def @R1 = #[1];
|
|
418
|
+
setring @R1;
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
int i,j;
|
|
422
|
+
int n=nvars(basering);
|
|
423
|
+
poly p;
|
|
424
|
+
ideal I;
|
|
425
|
+
number c;
|
|
426
|
+
matrix C[n][n];
|
|
427
|
+
matrix D[n][n];
|
|
428
|
+
for (i=1; i<=n; i++)
|
|
429
|
+
{
|
|
430
|
+
for (j=i; j<=n; j++)
|
|
431
|
+
{
|
|
432
|
+
p=var(i)*var(j)-M[i,j];
|
|
433
|
+
if ( (ncols(I)==1) && (I[1]==0) ) { I=p; }
|
|
434
|
+
else { I=I,p; }
|
|
435
|
+
if (j>i)
|
|
436
|
+
{
|
|
437
|
+
if ((M[i,j]!=0) && (M[j,i]!=0))
|
|
438
|
+
{
|
|
439
|
+
c = leadcoef(M[j,i])/leadcoef(M[i,j]);
|
|
440
|
+
}
|
|
441
|
+
else
|
|
442
|
+
{
|
|
443
|
+
c = 1;
|
|
444
|
+
}
|
|
445
|
+
C[i,j]=c;
|
|
446
|
+
D[i,j]= M[j,i] -c*M[i,j];
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
def save = basering;
|
|
451
|
+
def S = nc_algebra(C,D); setring S;
|
|
452
|
+
ideal fdQuot = fetch(save,I);
|
|
453
|
+
export fdQuot;
|
|
454
|
+
return(S);
|
|
455
|
+
}
|
|
456
|
+
example
|
|
457
|
+
{
|
|
458
|
+
"EXAMPLE:";echo=2;
|
|
459
|
+
ring r=(0,a,b),(x(1..3)),dp;
|
|
460
|
+
matrix S[3][3];
|
|
461
|
+
S[2,3]=a*x(1); S[3,2]=-b*x(1);
|
|
462
|
+
def A=findimAlgebra(S); setring A;
|
|
463
|
+
fdQuot = twostd(fdQuot);
|
|
464
|
+
qring Qr = fdQuot;
|
|
465
|
+
Qr;
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
469
|
+
|
|
470
|
+
proc isCentral(poly p, list #)
|
|
471
|
+
"USAGE: isCentral(p); p poly
|
|
472
|
+
RETURN: int, 1 if p commutes with all variables and 0 otherwise
|
|
473
|
+
PURPOSE: check whether p is central in a basering (that is, commutes with every generator of the ring)
|
|
474
|
+
NOTE: if @code{printlevel} > 0, the procedure displays intermediate information (by default, @code{printlevel}=0 )
|
|
475
|
+
EXAMPLE: example isCentral; shows examples
|
|
476
|
+
"{
|
|
477
|
+
//v an integer (with v!=0, procedure will be verbose)
|
|
478
|
+
int N = nvars(basering);
|
|
479
|
+
int in;
|
|
480
|
+
int flag = 1;
|
|
481
|
+
poly q = 0;
|
|
482
|
+
for (in=1; in<=N; in++)
|
|
483
|
+
{
|
|
484
|
+
q = p*var(in)-var(in)*p;
|
|
485
|
+
if (q!=0)
|
|
486
|
+
{
|
|
487
|
+
if ( (size(#) >0 ) || (printlevel>0) )
|
|
488
|
+
{
|
|
489
|
+
"Non-central at:", var(in);
|
|
490
|
+
}
|
|
491
|
+
flag = 0;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
return(flag);
|
|
495
|
+
}
|
|
496
|
+
example
|
|
497
|
+
{
|
|
498
|
+
"EXAMPLE:";echo=2;
|
|
499
|
+
ring r=0,(x,y,z),dp;
|
|
500
|
+
matrix D[3][3]=0;
|
|
501
|
+
D[1,2]=-z;
|
|
502
|
+
D[1,3]=2*x;
|
|
503
|
+
D[2,3]=-2*y;
|
|
504
|
+
def S = nc_algebra(1,D); setring S;
|
|
505
|
+
S; // this is U(sl_2)
|
|
506
|
+
poly c = 4*x*y+z^2-2*z;
|
|
507
|
+
printlevel = 0;
|
|
508
|
+
isCentral(c);
|
|
509
|
+
poly h = x*c;
|
|
510
|
+
printlevel = 1;
|
|
511
|
+
isCentral(h);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
515
|
+
|
|
516
|
+
proc UpOneMatrix(int N)
|
|
517
|
+
"USAGE: UpOneMatrix(n); n an integer
|
|
518
|
+
RETURN: intmat
|
|
519
|
+
PURPOSE: compute an n x n matrix with 1's in the whole upper triangle
|
|
520
|
+
NOTE: helpful for setting noncommutative algebras with complicated
|
|
521
|
+
coefficient matrices
|
|
522
|
+
EXAMPLE: example UpOneMatrix; shows examples
|
|
523
|
+
"{
|
|
524
|
+
int ii,jj;
|
|
525
|
+
intmat U[N][N]=0;
|
|
526
|
+
for (ii=1;ii<N;ii++)
|
|
527
|
+
{
|
|
528
|
+
for (jj=ii+1;jj<=N;jj++)
|
|
529
|
+
{
|
|
530
|
+
U[ii,jj]=1;
|
|
531
|
+
}
|
|
532
|
+
}
|
|
533
|
+
return(U);
|
|
534
|
+
}
|
|
535
|
+
example
|
|
536
|
+
{
|
|
537
|
+
"EXAMPLE:";echo=2;
|
|
538
|
+
ring r = (0,q),(x,y,z),dp;
|
|
539
|
+
matrix C = UpOneMatrix(3);
|
|
540
|
+
C[1,3] = q;
|
|
541
|
+
print(C);
|
|
542
|
+
def S = nc_algebra(C,0); setring S;
|
|
543
|
+
S;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
547
|
+
proc ndcond(list #)
|
|
548
|
+
"USAGE: ndcond();
|
|
549
|
+
RETURN: ideal
|
|
550
|
+
PURPOSE: compute the non-degeneracy conditions of the basering
|
|
551
|
+
NOTE: if @code{printlevel} > 0, the procedure displays intermediate information (by default, @code{printlevel}=0 )
|
|
552
|
+
EXAMPLE: example ndcond; shows examples
|
|
553
|
+
"
|
|
554
|
+
{
|
|
555
|
+
// internal documentation, for tests etc
|
|
556
|
+
// 1st arg: v an optional integer (if v!=0, will be verbose)
|
|
557
|
+
// if the second argument is given, produces ndc w.r.t. powers x^N
|
|
558
|
+
int N = 1;
|
|
559
|
+
int Verbose = 0;
|
|
560
|
+
if ( size(#)>=1 ) { Verbose = int(#[1]); }
|
|
561
|
+
if ( size(#)>=2 ) { N = int(#[2]); }
|
|
562
|
+
Verbose = ((Verbose) || (printlevel>0));
|
|
563
|
+
int cnt = 1;
|
|
564
|
+
int numvars = nvars(basering);
|
|
565
|
+
int a,b,c;
|
|
566
|
+
poly p = 1;
|
|
567
|
+
ideal res = 0;
|
|
568
|
+
for (cnt=1; cnt<=N; cnt++)
|
|
569
|
+
{
|
|
570
|
+
if (Verbose) { "Processing degree :",cnt;}
|
|
571
|
+
for (a=1; a<=numvars-2; a++)
|
|
572
|
+
{
|
|
573
|
+
for (b=a+1; b<=numvars-1; b++)
|
|
574
|
+
{
|
|
575
|
+
for(c=b+1; c<=numvars; c++)
|
|
576
|
+
{
|
|
577
|
+
p = (var(c)^cnt)*(var(b)^cnt);
|
|
578
|
+
p = p*(var(a)^cnt);
|
|
579
|
+
p = p-(var(c)^cnt)*((var(b)^cnt)*(var(a)^cnt));
|
|
580
|
+
if (Verbose) {a,".",b,".",c,".";}
|
|
581
|
+
if (p!=0)
|
|
582
|
+
{
|
|
583
|
+
if ( res==0 )
|
|
584
|
+
{
|
|
585
|
+
res[1] = p;
|
|
586
|
+
}
|
|
587
|
+
else
|
|
588
|
+
{
|
|
589
|
+
res = res,p;
|
|
590
|
+
}
|
|
591
|
+
if (Verbose) { "failed:",p; }
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
if (Verbose) { "done"; }
|
|
597
|
+
}
|
|
598
|
+
return(res);
|
|
599
|
+
}
|
|
600
|
+
example
|
|
601
|
+
{
|
|
602
|
+
"EXAMPLE:";echo=2;
|
|
603
|
+
ring r = (0,q1,q2),(x,y,z),dp;
|
|
604
|
+
matrix C[3][3];
|
|
605
|
+
C[1,2]=q2; C[1,3]=q1; C[2,3]=1;
|
|
606
|
+
matrix D[3][3];
|
|
607
|
+
D[1,2]=x; D[1,3]=z;
|
|
608
|
+
def S = nc_algebra(C,D); setring S;
|
|
609
|
+
S;
|
|
610
|
+
ideal j=ndcond(); // the silent version
|
|
611
|
+
j;
|
|
612
|
+
printlevel=1;
|
|
613
|
+
ideal i=ndcond(); // the verbose version
|
|
614
|
+
i;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
619
|
+
proc Weyl(list #)
|
|
620
|
+
"USAGE: Weyl()
|
|
621
|
+
RETURN: ring
|
|
622
|
+
PURPOSE: create a Weyl algebra structure on the basering
|
|
623
|
+
NOTE: Activate this ring using the command @code{setring}.
|
|
624
|
+
@*Assume the number of variables of a basering is 2k.
|
|
625
|
+
(if the number of variables is odd, an error message will be returned)
|
|
626
|
+
@* by default, the procedure treats first k variables as coordinates x_i and the last k as differentials d_i
|
|
627
|
+
@* if a non-zero optional argument is given, the procedure treats 2k variables of a basering as k pairs (x_i,d_i), i.e. variables with odd numbers are treated as coordinates and with even numbers as differentials
|
|
628
|
+
SEE ALSO: makeWeyl
|
|
629
|
+
EXAMPLE: example Weyl; shows examples
|
|
630
|
+
"
|
|
631
|
+
{
|
|
632
|
+
//there are two possibilities for choosing the PBW basis.
|
|
633
|
+
//The variables have names x(i) for coordinates and d(i) for partial
|
|
634
|
+
// differentiations. By default, the procedure
|
|
635
|
+
//creates a ring, where the variables are ordered as x(1..n),d(1..n). the
|
|
636
|
+
// tensor product-like realization x(1),d(1),x(2),d(2),... is used.
|
|
637
|
+
string rname=nameof(basering);
|
|
638
|
+
if ( rname == "basering") // i.e. no ring has been set yet
|
|
639
|
+
{
|
|
640
|
+
"You have to call the procedure from the ring";
|
|
641
|
+
return();
|
|
642
|
+
}
|
|
643
|
+
int @chr = 0;
|
|
644
|
+
if ( size(#) > 0 )
|
|
645
|
+
{
|
|
646
|
+
if ( typeof( #[1] ) == "int" )
|
|
647
|
+
{
|
|
648
|
+
@chr = #[1];
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
int nv = nvars(basering);
|
|
652
|
+
int N = nv div 2;
|
|
653
|
+
if ((nv % 2) != 0)
|
|
654
|
+
{
|
|
655
|
+
"Cannot create Weyl structure for an odd number of generators";
|
|
656
|
+
return();
|
|
657
|
+
}
|
|
658
|
+
matrix @D[nv][nv];
|
|
659
|
+
int i;
|
|
660
|
+
for ( i=1; i<=N; i++ )
|
|
661
|
+
{
|
|
662
|
+
if ( @chr==0 ) // default
|
|
663
|
+
{
|
|
664
|
+
@D[i,N+i]=1;
|
|
665
|
+
}
|
|
666
|
+
else
|
|
667
|
+
{
|
|
668
|
+
@D[2*i-1,2*i]=1;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
def @R = nc_algebra(1,@D);
|
|
672
|
+
return(@R);
|
|
673
|
+
}
|
|
674
|
+
example
|
|
675
|
+
{
|
|
676
|
+
"EXAMPLE:";echo=2;
|
|
677
|
+
ring A1=0,(x(1..2),d(1..2)),dp;
|
|
678
|
+
def S=Weyl();
|
|
679
|
+
setring S; S;
|
|
680
|
+
kill A1,S;
|
|
681
|
+
ring B1=0,(x1,d1,x2,d2),dp;
|
|
682
|
+
def S=Weyl(1);
|
|
683
|
+
setring S; S;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
687
|
+
proc makeHeisenberg(int N, list #)
|
|
688
|
+
"USAGE: makeHeisenberg(n, [p,d]); int n (setting 2n+1 variables), optional int p (field characteristic), optional int d (power of h in the commutator)
|
|
689
|
+
RETURN: ring
|
|
690
|
+
PURPOSE: create the n-th Heisenberg algebra in the variables x(1),y(1),...,x(n),y(n),h over the rationals Q or F_p with the relations
|
|
691
|
+
\forall\;i\in\{1,2,\ldots,n\}\;\;y(j)x(i) = x(i)y(j)+h^d.
|
|
692
|
+
SEE ALSO: makeWeyl
|
|
693
|
+
NOTE: activate this ring with the @code{setring} command
|
|
694
|
+
@* If p is not prime, the next larger prime number will be used.
|
|
695
|
+
EXAMPLE: example makeHeisenberg; shows examples
|
|
696
|
+
"
|
|
697
|
+
{
|
|
698
|
+
int @chr = 0;
|
|
699
|
+
int @deg = 1;
|
|
700
|
+
if ( size(#) > 0 )
|
|
701
|
+
{
|
|
702
|
+
if ( typeof( #[1] ) == "int" )
|
|
703
|
+
{
|
|
704
|
+
@chr = #[1];
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
if ( size(#) > 1 )
|
|
708
|
+
{
|
|
709
|
+
if ( typeof( #[2] ) == "int" )
|
|
710
|
+
{
|
|
711
|
+
@deg = #[2];
|
|
712
|
+
if (@deg <1) { @deg = 1; }
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
ring @@r=@chr,(x(1..N),y(1..N),h),lp;
|
|
716
|
+
matrix D[2*N+1][2*N+1];
|
|
717
|
+
int i;
|
|
718
|
+
for (i=1;i<=N;i++)
|
|
719
|
+
{
|
|
720
|
+
D[i,N+i]=h^@deg;
|
|
721
|
+
}
|
|
722
|
+
return(nc_algebra(1,D));
|
|
723
|
+
}
|
|
724
|
+
example
|
|
725
|
+
{
|
|
726
|
+
"EXAMPLE:";echo=2;
|
|
727
|
+
def a = makeHeisenberg(2);
|
|
728
|
+
setring a; a;
|
|
729
|
+
def H3 = makeHeisenberg(3, 7, 2);
|
|
730
|
+
setring H3; H3;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
735
|
+
proc superCommutative(list #)
|
|
736
|
+
"USAGE: superCommutative([b,[e, [Q]]]);
|
|
737
|
+
RETURN: qring
|
|
738
|
+
PURPOSE: create a super-commutative algebra (as a GR-algebra) over a basering,
|
|
739
|
+
NOTE: activate this qring with the \"setring\" command.
|
|
740
|
+
NOTE: if b==e then the resulting ring is commutative.
|
|
741
|
+
@* By default, @code{b=1, e=nvars(basering), Q=0}.
|
|
742
|
+
THEORY: given a basering, this procedure introduces the anti-commutative relations
|
|
743
|
+
@* var(j)var(i)=-var(i)var(j) for all e>=j>i>=b and creates the quotient
|
|
744
|
+
@* of the anti-commutative algebra modulo the two-sided ideal, generated by
|
|
745
|
+
@* x(b)^2, ..., x(e)^2[ + Q]
|
|
746
|
+
DISPLAY: If @code{printlevel} > 1, warning debug messages will be printed
|
|
747
|
+
EXAMPLE: example superCommutative; shows examples
|
|
748
|
+
"
|
|
749
|
+
{
|
|
750
|
+
int fprot = (printlevel > 1); // (find(option(),"prot") != 0);
|
|
751
|
+
|
|
752
|
+
string rname=nameof(basering);
|
|
753
|
+
|
|
754
|
+
if ( rname == "basering") // i.e. no ring has been set yet
|
|
755
|
+
{
|
|
756
|
+
ERROR("You have to call the procedure from the ring");
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
def saveRing = basering;
|
|
760
|
+
|
|
761
|
+
int N = nvars(saveRing);
|
|
762
|
+
int b = 1;
|
|
763
|
+
int e = N;
|
|
764
|
+
int flag = 0;
|
|
765
|
+
|
|
766
|
+
ideal Q = 0;
|
|
767
|
+
|
|
768
|
+
if(size(#)>0)
|
|
769
|
+
{
|
|
770
|
+
if(typeof(#[1]) != "int")
|
|
771
|
+
{
|
|
772
|
+
ERROR("The argument 'b' must be an integer!");
|
|
773
|
+
}
|
|
774
|
+
b = #[1];
|
|
775
|
+
|
|
776
|
+
if((b < 1)||(b > N))
|
|
777
|
+
{
|
|
778
|
+
ERROR("The argument 'b' must within [1..nvars(basering)]!");
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
if(size(#)>1)
|
|
784
|
+
{
|
|
785
|
+
if(typeof(#[2]) != "int")
|
|
786
|
+
{
|
|
787
|
+
ERROR("The argument 'e' must be an integer!");
|
|
788
|
+
}
|
|
789
|
+
e = #[2];
|
|
790
|
+
|
|
791
|
+
if((e < 1)||(e > N))
|
|
792
|
+
{
|
|
793
|
+
ERROR("The argument 'e' must within [1..nvars(basering)]!");
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
if(e < b)
|
|
797
|
+
{
|
|
798
|
+
ERROR("The argument 'e' must be bigger or equal to 'b'!");
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
if(size(#)>2)
|
|
803
|
+
{
|
|
804
|
+
if(typeof(#[3]) != "ideal")
|
|
805
|
+
{
|
|
806
|
+
ERROR("The argument 'Q' must be an ideal!");
|
|
807
|
+
}
|
|
808
|
+
Q = #[3];
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
/* if(size(#)>3)
|
|
812
|
+
{
|
|
813
|
+
if(typeof(#[4]) != "int")
|
|
814
|
+
{
|
|
815
|
+
ERROR("The argument 'flag' must be an integer!");
|
|
816
|
+
}
|
|
817
|
+
flag = #[4];
|
|
818
|
+
}
|
|
819
|
+
*/
|
|
820
|
+
|
|
821
|
+
int iSavedDegBoung = degBound;
|
|
822
|
+
|
|
823
|
+
if( (b == e) && (flag == 0) ) // commutative ring!!!
|
|
824
|
+
{
|
|
825
|
+
if( fprot == 1)
|
|
826
|
+
{
|
|
827
|
+
print("Warning: (b==e) means that the resulting ring will be commutative!");
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
degBound=0;
|
|
831
|
+
Q = std(Q + (var(b)^2));
|
|
832
|
+
degBound = iSavedDegBoung;
|
|
833
|
+
|
|
834
|
+
qring @EA = Q; // and it will be internally commutative as well!!!
|
|
835
|
+
option(qringNF);
|
|
836
|
+
|
|
837
|
+
return(@EA);
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
/*
|
|
841
|
+
// Singular'(H.S.) politics: no ring copies!
|
|
842
|
+
// in future nc_algebra() should return a new ring!!!
|
|
843
|
+
list CurrRing = ringlist(basering);
|
|
844
|
+
def @R = ring(CurrRing);
|
|
845
|
+
setring @R; // @R;
|
|
846
|
+
*/
|
|
847
|
+
int i, j;
|
|
848
|
+
|
|
849
|
+
if( (char(basering)==2) && (flag == 0) )// commutative ring!!!
|
|
850
|
+
{
|
|
851
|
+
if( fprot == 1)
|
|
852
|
+
{
|
|
853
|
+
print("Warning: (char == 2) means that the resulting ring will be commutative!");
|
|
854
|
+
}
|
|
855
|
+
|
|
856
|
+
ideal I;
|
|
857
|
+
|
|
858
|
+
for (i = e - b + 1; i > 0; i--)
|
|
859
|
+
{
|
|
860
|
+
I[i] = var(i + b - 1)^2;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
degBound=0;
|
|
864
|
+
Q = std(I + Q);
|
|
865
|
+
degBound = iSavedDegBoung;
|
|
866
|
+
|
|
867
|
+
qring @EA = Q; // and it will be internally commutative as well!!!
|
|
868
|
+
option(qringNF);
|
|
869
|
+
return(@EA);
|
|
870
|
+
}
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|
|
874
|
+
if( (b == 1) && (e == N) ) // just an exterior algebra?
|
|
875
|
+
{
|
|
876
|
+
def S = nc_algebra(-1, 0); // define ground G-algebra!
|
|
877
|
+
setring S;
|
|
878
|
+
} else
|
|
879
|
+
{
|
|
880
|
+
matrix @E = UpOneMatrix(N);
|
|
881
|
+
|
|
882
|
+
for ( i = b; i < e; i++ )
|
|
883
|
+
{
|
|
884
|
+
for ( j = i+1; j <= e; j++ )
|
|
885
|
+
{
|
|
886
|
+
@E[i, j] = -1;
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
def S = nc_algebra(@E, 0); // define ground G-algebra!
|
|
890
|
+
setring S;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
ideal @I;
|
|
894
|
+
|
|
895
|
+
for (i = e - b + 1; i > 0; i--)
|
|
896
|
+
{
|
|
897
|
+
@I[i] = var(i + b - 1)^2;
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
|
|
901
|
+
degBound=0;
|
|
902
|
+
@I = twostd(@I); // must be computed within the ground G-algebra => problems with local orderings!
|
|
903
|
+
degBound = iSavedDegBoung;
|
|
904
|
+
|
|
905
|
+
qring @EA = @I;
|
|
906
|
+
|
|
907
|
+
ideal @Q = twostd(fetch(saveRing, Q));
|
|
908
|
+
|
|
909
|
+
if( size(@Q) > 0 )
|
|
910
|
+
{
|
|
911
|
+
qring @EA2 = @Q;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
attrib(basering, "isSCA", 1==1);
|
|
915
|
+
attrib(basering, "iAltVarStart", b);
|
|
916
|
+
attrib(basering, "iAltVarEnd", e);
|
|
917
|
+
|
|
918
|
+
//"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
919
|
+
return(basering);
|
|
920
|
+
}
|
|
921
|
+
example
|
|
922
|
+
{
|
|
923
|
+
"EXAMPLE:";echo=2;
|
|
924
|
+
ring R = 0,(x(1..4)),dp; // global!
|
|
925
|
+
def ER = superCommutative(); // the same as Exterior (b = 1, e = N)
|
|
926
|
+
setring ER; ER;
|
|
927
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
928
|
+
kill R; kill ER;
|
|
929
|
+
ring R = 0,(x(1..4)),(lp(1), dp(3)); // global!
|
|
930
|
+
def ER = superCommutative(2); // b = 2, e = N
|
|
931
|
+
setring ER; ER;
|
|
932
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
933
|
+
kill R; kill ER;
|
|
934
|
+
ring R = 0,(x, y, z),(ds(1), dp(2)); // mixed!
|
|
935
|
+
def ER = superCommutative(2,3); // b = 2, e = 3
|
|
936
|
+
setring ER; ER;
|
|
937
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
938
|
+
x + 1 + z + y; // ordering on variables: y > z > 1 > x
|
|
939
|
+
std(x - x*x*x);
|
|
940
|
+
std(ideal(x - x*x*x, x*x*z + y, z + y*x*x));
|
|
941
|
+
kill R; kill ER;
|
|
942
|
+
ring R = 0,(x, y, z),(ds(1), dp(2)); // mixed!
|
|
943
|
+
def ER = superCommutative(2, 3, ideal(x - x*x, x*x*z + y, z + y*x*x )); // b = 2, e = 3
|
|
944
|
+
setring ER; ER;
|
|
945
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
// Please, don't throw this away!!! Needed for backward compatibility.
|
|
949
|
+
proc SuperCommutative(list #)
|
|
950
|
+
"USAGE: please use @code{superCommutative} instead
|
|
951
|
+
"
|
|
952
|
+
{
|
|
953
|
+
"// This procedure is deprecated. Please use superCommutative instead";
|
|
954
|
+
return( superCommutative(#) );
|
|
955
|
+
}
|
|
956
|
+
example
|
|
957
|
+
{
|
|
958
|
+
"EXAMPLE:";
|
|
959
|
+
"Procedure is deprecated. Please use superCommutative instead";
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
static proc ParseSCA()
|
|
963
|
+
"
|
|
964
|
+
RETURN: list {AltVarStart, AltVarEnd} is currRing is SCA, returns undef otherwise.
|
|
965
|
+
NOTE: rings with only one non-commutative variable are commutative rings which are super-sommutative itself!
|
|
966
|
+
"
|
|
967
|
+
{
|
|
968
|
+
if(typeof(attrib(basering, "isSCA"))=="int") // workaround, if(defined()) doesn't work!!!!
|
|
969
|
+
{
|
|
970
|
+
if(typeof(attrib(basering, "iAltVarStart"))=="int")
|
|
971
|
+
{
|
|
972
|
+
if(typeof(attrib(basering, "iAltVarEnd"))=="int")
|
|
973
|
+
{
|
|
974
|
+
if(attrib(basering, "isSCA"))
|
|
975
|
+
{
|
|
976
|
+
return(list(
|
|
977
|
+
attrib(basering, "iAltVarStart"),
|
|
978
|
+
attrib(basering, "iAltVarEnd")
|
|
979
|
+
));
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
|
|
985
|
+
def saveRing = basering;
|
|
986
|
+
|
|
987
|
+
int i, j;
|
|
988
|
+
int N = nvars(saveRing);
|
|
989
|
+
|
|
990
|
+
int b = N+1;
|
|
991
|
+
int e = -1;
|
|
992
|
+
|
|
993
|
+
int fprot = 0; // (find(option(),"prot") != 0);
|
|
994
|
+
|
|
995
|
+
|
|
996
|
+
if( size(ideal(saveRing)) == 0 )
|
|
997
|
+
{
|
|
998
|
+
return("SCA rings are factors by (at least) squares!"); // no squares in the factor ideal!
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
list L = ringlist(saveRing);
|
|
1002
|
+
|
|
1003
|
+
if( size(L)!=6 )
|
|
1004
|
+
{
|
|
1005
|
+
if(fprot)
|
|
1006
|
+
{
|
|
1007
|
+
print("// Warning: The current ring is internally commutative!");
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
for( i = N; i > 0; i-- )
|
|
1011
|
+
{
|
|
1012
|
+
if( NF(var(i)^2, std(0)) == 0 )
|
|
1013
|
+
{
|
|
1014
|
+
if( (fprot == 1) and (i > 1) )
|
|
1015
|
+
{
|
|
1016
|
+
print("// Warning: the SCA representation of the current commutative factor ring may be ambiguous!");
|
|
1017
|
+
}
|
|
1018
|
+
|
|
1019
|
+
return( list(i, i) ); // this is not unique in this case! there may be other squares in the factor ideal!
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
return("The current commutative ring is not SCA! (Wrong quotient ideal)"); // no squares in the factor ideal!
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
module D = simplify(L[6], 2 + 4);
|
|
1027
|
+
|
|
1028
|
+
if( size(D)>0 )
|
|
1029
|
+
{
|
|
1030
|
+
return("The current ring is not SCA! (D!=0)");
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
matrix C = L[5];
|
|
1034
|
+
poly c;
|
|
1035
|
+
|
|
1036
|
+
for( i = 1; i < N; i++ )
|
|
1037
|
+
{
|
|
1038
|
+
for( j = i+1; j <= N; j++ )
|
|
1039
|
+
{
|
|
1040
|
+
c = C[i, j];
|
|
1041
|
+
|
|
1042
|
+
if( c == -1 )
|
|
1043
|
+
{
|
|
1044
|
+
if(i < b)
|
|
1045
|
+
{
|
|
1046
|
+
b = i;
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
if(j > e)
|
|
1050
|
+
{
|
|
1051
|
+
e = j;
|
|
1052
|
+
}
|
|
1053
|
+
} else
|
|
1054
|
+
{ // should commute
|
|
1055
|
+
if( c!=1 )
|
|
1056
|
+
{
|
|
1057
|
+
return("The current ring is not SCA! (C["+ string(i)+"," + string(j)+"]!=1)");
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
if( (b > N) || (e < 1))
|
|
1064
|
+
{
|
|
1065
|
+
if(fprot)
|
|
1066
|
+
{
|
|
1067
|
+
print("Warning: The current ring is a commutative GR-algebra!");
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
for( i = N; i > 0; i-- )
|
|
1071
|
+
{
|
|
1072
|
+
if( NF(var(i)^2, std(0)) == 0 )
|
|
1073
|
+
{
|
|
1074
|
+
if( (fprot == 1) and (i > 1) )
|
|
1075
|
+
{
|
|
1076
|
+
print("Warning: the SCA representation of the current factor ring may be ambiguous!");
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
return( list(i, i) ); // this is not unique in this case! there may be other squares in the factor ideal!
|
|
1080
|
+
}
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
return("The current commutative GR-algebra is not SCA! (Wrong quotient ideal)"); // no squares in the factor ideal!
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
for( i = 1; i < N; i++ )
|
|
1087
|
+
{
|
|
1088
|
+
for( j = i+1; j <= N; j++ )
|
|
1089
|
+
{
|
|
1090
|
+
c = C[i, j];
|
|
1091
|
+
|
|
1092
|
+
if( (b <= i) && (j <= e) ) // S <= i < j <= E
|
|
1093
|
+
{ // anticommutative part
|
|
1094
|
+
if( c!= -1 )
|
|
1095
|
+
{
|
|
1096
|
+
return("The current ring is not SCA! (C["+ string(i)+"," + string(j)+"]!=-1)");
|
|
1097
|
+
}
|
|
1098
|
+
} else
|
|
1099
|
+
{ // should commute
|
|
1100
|
+
if( c!=1 )
|
|
1101
|
+
{
|
|
1102
|
+
return("The current ring is not SCA! (C["+ string(i)+"," + string(j)+"]!=1)");
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
for( i = b; i <= e; i++ )
|
|
1109
|
+
{
|
|
1110
|
+
if( NF(var(i)^2, std(0)) != 0 )
|
|
1111
|
+
{
|
|
1112
|
+
return("The current ring is not SCA! (Wrong quotient ideal)");
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
////////////////////////////////////////////////////////////////////////
|
|
1117
|
+
// ok. this is a SCA!!!
|
|
1118
|
+
|
|
1119
|
+
return(list(b, e));
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1123
|
+
proc AltVarStart()
|
|
1124
|
+
"USAGE: AltVarStart();
|
|
1125
|
+
RETURN: int
|
|
1126
|
+
PURPOSE: returns the number of the first alternating variable of basering
|
|
1127
|
+
NOTE: basering should be a super-commutative algebra constructed by
|
|
1128
|
+
@* the procedure @code{superCommutative}, emits an error otherwise
|
|
1129
|
+
EXAMPLE: example AltVarStart; shows examples
|
|
1130
|
+
"
|
|
1131
|
+
{
|
|
1132
|
+
def l = ParseSCA();
|
|
1133
|
+
|
|
1134
|
+
if( typeof(l) != "string" )
|
|
1135
|
+
{
|
|
1136
|
+
return(l[1]);
|
|
1137
|
+
}
|
|
1138
|
+
ERROR(l);
|
|
1139
|
+
}
|
|
1140
|
+
example
|
|
1141
|
+
{
|
|
1142
|
+
"EXAMPLE:";echo=2;
|
|
1143
|
+
ring R = 0,(x(1..4)),dp; // global!
|
|
1144
|
+
def ER = superCommutative(2); // (b = 2, e = N)
|
|
1145
|
+
setring ER; ER;
|
|
1146
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
1147
|
+
setring R;
|
|
1148
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
1149
|
+
kill R, ER;
|
|
1150
|
+
//////////////////////////////////////////////////////////////////
|
|
1151
|
+
ring R = 2,(x(1..4)),dp; // the same in char. = 2!
|
|
1152
|
+
def ER = superCommutative(2); // (b = 2, e = N)
|
|
1153
|
+
setring ER; ER;
|
|
1154
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
1155
|
+
setring R;
|
|
1156
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1160
|
+
proc AltVarEnd()
|
|
1161
|
+
"USAGE: AltVarStart();
|
|
1162
|
+
RETURN: int
|
|
1163
|
+
PURPOSE: returns the number of the last alternating variable of basering
|
|
1164
|
+
NOTE: basering should be a super-commutative algebra constructed by
|
|
1165
|
+
@* the procedure @code{superCommutative}, emits an error otherwise
|
|
1166
|
+
EXAMPLE: example AltVarEnd; shows examples
|
|
1167
|
+
"
|
|
1168
|
+
{
|
|
1169
|
+
def l = ParseSCA();
|
|
1170
|
+
|
|
1171
|
+
if( typeof(l) != "string" )
|
|
1172
|
+
{
|
|
1173
|
+
return(l[2]);
|
|
1174
|
+
}
|
|
1175
|
+
ERROR(l);
|
|
1176
|
+
}
|
|
1177
|
+
example
|
|
1178
|
+
{
|
|
1179
|
+
"EXAMPLE:";echo=2;
|
|
1180
|
+
ring R = 0,(x(1..4)),dp; // global!
|
|
1181
|
+
def ER = superCommutative(2); // (b = 2, e = N)
|
|
1182
|
+
setring ER; ER;
|
|
1183
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
1184
|
+
setring R;
|
|
1185
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
1186
|
+
kill R, ER;
|
|
1187
|
+
//////////////////////////////////////////////////////////////////
|
|
1188
|
+
ring R = 2,(x(1..4)),dp; // the same in char. = 2!
|
|
1189
|
+
def ER = superCommutative(2); // (b = 2, e = N)
|
|
1190
|
+
setring ER; ER;
|
|
1191
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
1192
|
+
setring R;
|
|
1193
|
+
"Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "].";
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1197
|
+
proc IsSCA()
|
|
1198
|
+
"USAGE: IsSCA();
|
|
1199
|
+
RETURN: int
|
|
1200
|
+
PURPOSE: returns 1 if basering is a super-commutative algebra and 0 otherwise
|
|
1201
|
+
EXAMPLE: example IsSCA; shows examples
|
|
1202
|
+
"
|
|
1203
|
+
{
|
|
1204
|
+
def l = ParseSCA();
|
|
1205
|
+
|
|
1206
|
+
if( typeof(l) != "string" )
|
|
1207
|
+
{
|
|
1208
|
+
return(1);
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
if( find(option(),"prot") != 0 )
|
|
1212
|
+
{
|
|
1213
|
+
print(l);
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
return(0);
|
|
1217
|
+
}
|
|
1218
|
+
example
|
|
1219
|
+
{
|
|
1220
|
+
"EXAMPLE:";echo=2;
|
|
1221
|
+
/////////////////////////////////////////////////////////////////////
|
|
1222
|
+
ring R = 0,(x(1..4)),dp; // commutative
|
|
1223
|
+
if(IsSCA())
|
|
1224
|
+
{ "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; }
|
|
1225
|
+
else
|
|
1226
|
+
{ "Not a super-commutative algebra!!!"; }
|
|
1227
|
+
kill R;
|
|
1228
|
+
/////////////////////////////////////////////////////////////////////
|
|
1229
|
+
ring R = 0,(x(1..4)),dp;
|
|
1230
|
+
def S = nc_algebra(1, 0); setring S; S; // still commutative!
|
|
1231
|
+
if(IsSCA())
|
|
1232
|
+
{ "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; }
|
|
1233
|
+
else
|
|
1234
|
+
{ "Not a super-commutative algebra!!!"; }
|
|
1235
|
+
kill R, S;
|
|
1236
|
+
/////////////////////////////////////////////////////////////////////
|
|
1237
|
+
ring R = 0,(x(1..4)),dp;
|
|
1238
|
+
list CurrRing = ringlist(R);
|
|
1239
|
+
def ER = ring(CurrRing);
|
|
1240
|
+
setring ER; // R;
|
|
1241
|
+
|
|
1242
|
+
matrix E = UpOneMatrix(nvars(R));
|
|
1243
|
+
|
|
1244
|
+
int i, j; int b = 2; int e = 3;
|
|
1245
|
+
|
|
1246
|
+
for ( i = b; i < e; i++ )
|
|
1247
|
+
{
|
|
1248
|
+
for ( j = i+1; j <= e; j++ )
|
|
1249
|
+
{
|
|
1250
|
+
E[i, j] = -1;
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
def S = nc_algebra(E,0); setring S; S;
|
|
1255
|
+
|
|
1256
|
+
if(IsSCA())
|
|
1257
|
+
{ "Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; }
|
|
1258
|
+
else
|
|
1259
|
+
{ "Not a super-commutative algebra!!!"; }
|
|
1260
|
+
kill R, ER, S;
|
|
1261
|
+
/////////////////////////////////////////////////////////////////////
|
|
1262
|
+
ring R = 0,(x(1..4)),dp;
|
|
1263
|
+
def ER = superCommutative(2); // (b = 2, e = N)
|
|
1264
|
+
setring ER; ER;
|
|
1265
|
+
if(IsSCA())
|
|
1266
|
+
{ "This is a SCA! Alternating variables: [", AltVarStart(), ",", AltVarEnd(), "]."; }
|
|
1267
|
+
else
|
|
1268
|
+
{ "Not a super-commutative algebra!!!"; }
|
|
1269
|
+
kill R, ER;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
|
|
1274
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1275
|
+
proc Exterior(list #)
|
|
1276
|
+
"USAGE: Exterior();
|
|
1277
|
+
RETURN: qring
|
|
1278
|
+
PURPOSE: create the exterior algebra of a basering
|
|
1279
|
+
NOTE: activate this qring with the \"setring\" command
|
|
1280
|
+
THEORY: given a basering, this procedure introduces the anticommutative relations x(j)x(i)=-x(i)x(j) for all j>i,
|
|
1281
|
+
@* moreover, creates a factor algebra modulo the two-sided ideal, generated by x(i)^2 for all i
|
|
1282
|
+
EXAMPLE: example Exterior; shows examples
|
|
1283
|
+
"
|
|
1284
|
+
{
|
|
1285
|
+
string rname=nameof(basering);
|
|
1286
|
+
if ( rname == "basering") // i.e. no ring has been set yet
|
|
1287
|
+
{
|
|
1288
|
+
"You have to call the procedure from the ring";
|
|
1289
|
+
return();
|
|
1290
|
+
}
|
|
1291
|
+
int N = nvars(basering);
|
|
1292
|
+
ring @R = create_ring(ring_list(basering)[1], ringlist(basering)[2], "("+ordstr(basering)+")", "no_minpoly");
|
|
1293
|
+
matrix @E = UpOneMatrix(N);
|
|
1294
|
+
@E = -1*(@E);
|
|
1295
|
+
def @@RR = nc_algebra(@E,0); setring @@RR;
|
|
1296
|
+
int i;
|
|
1297
|
+
ideal Q;
|
|
1298
|
+
for ( i=1; i<=N; i++ )
|
|
1299
|
+
{
|
|
1300
|
+
Q[i] = var(i)^2;
|
|
1301
|
+
}
|
|
1302
|
+
Q = twostd(Q);
|
|
1303
|
+
qring @EA = Q;
|
|
1304
|
+
return(@EA);
|
|
1305
|
+
}
|
|
1306
|
+
example
|
|
1307
|
+
{
|
|
1308
|
+
"EXAMPLE:";echo=2;
|
|
1309
|
+
ring R = 0,(x(1..3)),dp;
|
|
1310
|
+
def ER = Exterior();
|
|
1311
|
+
setring ER;
|
|
1312
|
+
ER;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1316
|
+
proc makeWeyl(int n, list #)
|
|
1317
|
+
"USAGE: makeWeyl(n,[p]); n an integer, n>0; p an optional integer (field characteristic)
|
|
1318
|
+
RETURN: ring
|
|
1319
|
+
PURPOSE: create the n-th Weyl algebra over the rationals Q or F_p
|
|
1320
|
+
NOTE: activate this ring with the \"setring\" command.
|
|
1321
|
+
@* The presentation of an n-th Weyl algebra is classical: D(i)x(i)=x(i)D(i)+1,
|
|
1322
|
+
@* where x(i) correspond to coordinates and D(i) to partial differentiations, i=1,...,n.
|
|
1323
|
+
@* If p is not prime, the next larger prime number will be used.
|
|
1324
|
+
SEE ALSO: Weyl
|
|
1325
|
+
EXAMPLE: example makeWeyl; shows examples
|
|
1326
|
+
"{
|
|
1327
|
+
if (n<1)
|
|
1328
|
+
{
|
|
1329
|
+
print("Incorrect input");
|
|
1330
|
+
return();
|
|
1331
|
+
}
|
|
1332
|
+
int @p = 0;
|
|
1333
|
+
if ( size(#) > 0 )
|
|
1334
|
+
{
|
|
1335
|
+
if ( typeof( #[1] ) == "int" )
|
|
1336
|
+
{
|
|
1337
|
+
@p = #[1];
|
|
1338
|
+
}
|
|
1339
|
+
}
|
|
1340
|
+
if (n ==1)
|
|
1341
|
+
{
|
|
1342
|
+
ring @rr = @p,(x,D),dp;
|
|
1343
|
+
}
|
|
1344
|
+
else
|
|
1345
|
+
{
|
|
1346
|
+
ring @rr = @p,(x(1..n),D(1..n)),dp;
|
|
1347
|
+
}
|
|
1348
|
+
setring @rr;
|
|
1349
|
+
def @rrr = Weyl();
|
|
1350
|
+
return(@rrr);
|
|
1351
|
+
}
|
|
1352
|
+
example
|
|
1353
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1354
|
+
def a = makeWeyl(3);
|
|
1355
|
+
setring a;
|
|
1356
|
+
a;
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
//////////////////////////////////////////////////////////////////////
|
|
1360
|
+
proc isNC()
|
|
1361
|
+
"USAGE: isNC();
|
|
1362
|
+
PURPOSE: check whether a basering is commutative or not
|
|
1363
|
+
RETURN: int, 1 if basering is noncommutative and 0 otherwise
|
|
1364
|
+
EXAMPLE: example isNC; shows examples
|
|
1365
|
+
"{
|
|
1366
|
+
string rname=nameof(basering);
|
|
1367
|
+
if ( rname == "basering") // i.e. no ring has been set yet
|
|
1368
|
+
{
|
|
1369
|
+
"You have to call the procedure from the ring";
|
|
1370
|
+
return();
|
|
1371
|
+
}
|
|
1372
|
+
int n = nvars(basering);
|
|
1373
|
+
int i,j;
|
|
1374
|
+
poly p;
|
|
1375
|
+
for (i=1; i<n; i++)
|
|
1376
|
+
{
|
|
1377
|
+
for (j=i+1; j<=n; j++)
|
|
1378
|
+
{
|
|
1379
|
+
p = var(j)*var(i) - var(i)*var(j);
|
|
1380
|
+
if (p!=0) { return(1);}
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
return(0);
|
|
1384
|
+
}
|
|
1385
|
+
example
|
|
1386
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1387
|
+
def a = makeWeyl(2);
|
|
1388
|
+
setring a;
|
|
1389
|
+
isNC();
|
|
1390
|
+
kill a;
|
|
1391
|
+
ring r = 17,(x(1..7)),dp;
|
|
1392
|
+
isNC();
|
|
1393
|
+
kill r;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1397
|
+
proc rightStd(def I)// just an alias for compatibility
|
|
1398
|
+
"USAGE: rightStd(I); I an ideal/ module
|
|
1399
|
+
PURPOSE: compute a right Groebner basis of I
|
|
1400
|
+
RETURN: the same type as input
|
|
1401
|
+
EXAMPLE: example rightStd; shows examples
|
|
1402
|
+
"
|
|
1403
|
+
{
|
|
1404
|
+
return(rightstd(I));
|
|
1405
|
+
}
|
|
1406
|
+
example
|
|
1407
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1408
|
+
LIB "ncalg.lib";
|
|
1409
|
+
def A = makeUsl(2);
|
|
1410
|
+
setring A;
|
|
1411
|
+
ideal I = e2,f;
|
|
1412
|
+
option(redSB);
|
|
1413
|
+
option(redTail);
|
|
1414
|
+
ideal LI = std(I);
|
|
1415
|
+
LI;
|
|
1416
|
+
ideal RI = rightStd(I);
|
|
1417
|
+
RI;
|
|
1418
|
+
}
|
|
1419
|
+
|
|
1420
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1421
|
+
proc rightSyz(def I)
|
|
1422
|
+
"USAGE: rightSyz(I); I an ideal/ module
|
|
1423
|
+
PURPOSE: compute a right syzygy module of I
|
|
1424
|
+
RETURN: the same type as input
|
|
1425
|
+
EXAMPLE: example rightSyz; shows examples
|
|
1426
|
+
"
|
|
1427
|
+
{
|
|
1428
|
+
def A = basering;
|
|
1429
|
+
def Aopp = opposite(A);
|
|
1430
|
+
setring Aopp;
|
|
1431
|
+
def Iopp = oppose(A,I);
|
|
1432
|
+
def Jopp = syz(Iopp);
|
|
1433
|
+
setring A;
|
|
1434
|
+
def J = oppose(Aopp,Jopp);
|
|
1435
|
+
return(J);
|
|
1436
|
+
}
|
|
1437
|
+
example
|
|
1438
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1439
|
+
ring r = 0,(x,d),dp;
|
|
1440
|
+
def S = nc_algebra(1,1); setring S; // the first Weyl algebra
|
|
1441
|
+
ideal I = x,d;
|
|
1442
|
+
module LS = syz(I);
|
|
1443
|
+
print(LS);
|
|
1444
|
+
module RS = rightSyz(I);
|
|
1445
|
+
print(RS);
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1449
|
+
proc rightNF(def v, def M)
|
|
1450
|
+
"USAGE: rightNF(I); v a poly/vector, M an ideal/module
|
|
1451
|
+
PURPOSE: compute a right normal form of v w.r.t. M
|
|
1452
|
+
RETURN: poly/vector (as of the 1st argument)
|
|
1453
|
+
EXAMPLE: example rightNF; shows examples
|
|
1454
|
+
"
|
|
1455
|
+
{
|
|
1456
|
+
def A = basering;
|
|
1457
|
+
def Aopp = opposite(A);
|
|
1458
|
+
setring Aopp;
|
|
1459
|
+
def vopp = oppose(A,v);
|
|
1460
|
+
def Mopp = oppose(A,M);
|
|
1461
|
+
Mopp = std(Mopp);
|
|
1462
|
+
def wopp = NF(vopp,Mopp);
|
|
1463
|
+
setring A;
|
|
1464
|
+
def w = oppose(Aopp,wopp);
|
|
1465
|
+
w = simplify(w,2); // skip zeros in ideal/module
|
|
1466
|
+
return(w);
|
|
1467
|
+
}
|
|
1468
|
+
example
|
|
1469
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1470
|
+
LIB "ncalg.lib";
|
|
1471
|
+
ring r = 0,(x,d),dp;
|
|
1472
|
+
def S = nc_algebra(1,1); setring S; // Weyl algebra
|
|
1473
|
+
ideal I = x; I = std(I);
|
|
1474
|
+
poly p = x*d+1;
|
|
1475
|
+
NF(p,I); // left normal form
|
|
1476
|
+
rightNF(p,I); // right normal form
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
// **********************************
|
|
1480
|
+
// * NF: Example for vector/module: *
|
|
1481
|
+
// **********************************
|
|
1482
|
+
// module M = [x,0],[0,d]; M = std(M);
|
|
1483
|
+
// vector v = (x*d+1)*[1,1];
|
|
1484
|
+
// print(NF(v,M));
|
|
1485
|
+
// print(rightNF(v,M));
|
|
1486
|
+
|
|
1487
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
1488
|
+
proc rightModulo(def M, def N)
|
|
1489
|
+
"USAGE: rightModulo(M,N); M,N are ideals/modules
|
|
1490
|
+
PURPOSE: compute a right representation of the module (M+N)/N
|
|
1491
|
+
RETURN: module
|
|
1492
|
+
ASSUME: M,N are presentation matrices for right modules
|
|
1493
|
+
EXAMPLE: example rightModulo; shows examples
|
|
1494
|
+
"
|
|
1495
|
+
{
|
|
1496
|
+
def A = basering;
|
|
1497
|
+
def Aopp = opposite(A);
|
|
1498
|
+
setring Aopp;
|
|
1499
|
+
def Mopp = oppose(A,M);
|
|
1500
|
+
def Nopp = oppose(A,N);
|
|
1501
|
+
def Kopp = modulo(Mopp,Nopp);
|
|
1502
|
+
setring A;
|
|
1503
|
+
def K = oppose(Aopp,Kopp);
|
|
1504
|
+
return(K);
|
|
1505
|
+
}
|
|
1506
|
+
example
|
|
1507
|
+
{ "EXAMPLE:"; echo = 2;
|
|
1508
|
+
LIB "ncalg.lib";
|
|
1509
|
+
def A = makeUsl(2);
|
|
1510
|
+
setring A;
|
|
1511
|
+
option(redSB);
|
|
1512
|
+
option(redTail);
|
|
1513
|
+
ideal I = e2,f2,h2-1;
|
|
1514
|
+
I = twostd(I);
|
|
1515
|
+
print(matrix(I));
|
|
1516
|
+
ideal E = std(e);
|
|
1517
|
+
ideal TL = e,h-1; // the result of left modulo
|
|
1518
|
+
TL;
|
|
1519
|
+
ideal T = rightModulo(E,I);
|
|
1520
|
+
T = rightStd(T+I);
|
|
1521
|
+
T = rightStd(rightNF(T,I)); // make the output canonic
|
|
1522
|
+
T;
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
//////////////////////////////////////////////////////////////////////
|
|
1526
|
+
|
|
1527
|
+
proc isCommutative ()
|
|
1528
|
+
"USAGE: isCommutative();
|
|
1529
|
+
RETURN: int, 1 if basering is commutative, or 0 otherwise
|
|
1530
|
+
PURPOSE: check whether basering is commutative
|
|
1531
|
+
EXAMPLE: example isCommutative; shows an example
|
|
1532
|
+
"
|
|
1533
|
+
{
|
|
1534
|
+
int iscom = 1;
|
|
1535
|
+
list L = ringlist(basering);
|
|
1536
|
+
if (size(L) > 4) // basering is nc_algebra
|
|
1537
|
+
{
|
|
1538
|
+
matrix C = L[5];
|
|
1539
|
+
matrix D = L[6];
|
|
1540
|
+
if (size(module(D)) <> 0) { iscom = 0; }
|
|
1541
|
+
else
|
|
1542
|
+
{
|
|
1543
|
+
matrix U = UpOneMatrix(nvars(basering));
|
|
1544
|
+
if (size(module(C-U)) <> 0) { iscom = 0; }
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
return(iscom);
|
|
1548
|
+
}
|
|
1549
|
+
example
|
|
1550
|
+
{
|
|
1551
|
+
"EXAMPLE:"; echo = 2;
|
|
1552
|
+
ring r = 0,(x,y),dp;
|
|
1553
|
+
isCommutative();
|
|
1554
|
+
def D = Weyl(); setring D;
|
|
1555
|
+
isCommutative();
|
|
1556
|
+
setring r;
|
|
1557
|
+
def R = nc_algebra(1,0); setring R;
|
|
1558
|
+
isCommutative();
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
//////////////////////////////////////////////////////////////////////
|
|
1562
|
+
|
|
1563
|
+
proc isWeyl ()
|
|
1564
|
+
"USAGE: isWeyl();
|
|
1565
|
+
RETURN: int, 1 if basering is a Weyl algebra, or 0 otherwise
|
|
1566
|
+
PURPOSE: check whether basering is a Weyl algebra
|
|
1567
|
+
EXAMPLE: example isWeyl; shows an example
|
|
1568
|
+
"
|
|
1569
|
+
{
|
|
1570
|
+
int i,j;
|
|
1571
|
+
int notW = 0;
|
|
1572
|
+
int N = nvars(basering);
|
|
1573
|
+
if (N mod 2 <> 0) { return(notW); } // odd number of generators
|
|
1574
|
+
int n = N div 2;
|
|
1575
|
+
list L = ringlist(basering);
|
|
1576
|
+
if (size(L) < 6) { return(notW); } // basering is commutative
|
|
1577
|
+
matrix C = L[5];
|
|
1578
|
+
matrix D = L[6];
|
|
1579
|
+
matrix U = UpOneMatrix(N);
|
|
1580
|
+
if (size(ideal(C-U)) <> 0) { return(notW); } // lt(xy)<>lt(yx)
|
|
1581
|
+
ideal I = ideal(D);
|
|
1582
|
+
if (size(I) <> n) { return(notW); } // not n entries<>0
|
|
1583
|
+
I = simplify(I,4+2);
|
|
1584
|
+
int sI = size(I);
|
|
1585
|
+
if (sI > 2) { return(notW); } // more than 2 distinct entries
|
|
1586
|
+
for (i=1; i<=sI; i++)
|
|
1587
|
+
{
|
|
1588
|
+
if (I[i]<>1 && I[i]<>-1) { return (notW); } // other values apart from 1,-1
|
|
1589
|
+
}
|
|
1590
|
+
ideal Ro,Co;
|
|
1591
|
+
for (i=1; i<=N; i++)
|
|
1592
|
+
{
|
|
1593
|
+
Ro = D[1..N,i];
|
|
1594
|
+
Co = D[i,1..N];
|
|
1595
|
+
if (size(Ro)>1 || size(Co)>1)
|
|
1596
|
+
{
|
|
1597
|
+
return(int(0)); // var(i) doesn't commute with more than 1 other vars
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
return(int(1)); // all tests passed: basering is Weyl algebra
|
|
1601
|
+
}
|
|
1602
|
+
example
|
|
1603
|
+
{
|
|
1604
|
+
"EXAMPLE:"; echo = 2;
|
|
1605
|
+
ring r = 0,(a,b,c,d),dp;
|
|
1606
|
+
isWeyl();
|
|
1607
|
+
def D = Weyl(1); setring D; //make from r a Weyl algebra
|
|
1608
|
+
b*a;
|
|
1609
|
+
isWeyl();
|
|
1610
|
+
ring t = 0,(Dx,x,y,Dy),dp;
|
|
1611
|
+
matrix M[4][4]; M[1,2]=-1; M[3,4]=1;
|
|
1612
|
+
def T = nc_algebra(1,M); setring T;
|
|
1613
|
+
isWeyl();
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
//////////////////////////////////////////////////////////////////////
|
|
1617
|
+
|
|
1618
|
+
proc embedMat(matrix A, int m, int n)
|
|
1619
|
+
"USAGE: embedMat(A,m,n); A,B matrix/module
|
|
1620
|
+
RETURN: matrix
|
|
1621
|
+
PURPOSE: embed A in the left upper corner of mxn matrix
|
|
1622
|
+
EXAMPLE: example embedMat; shows an example
|
|
1623
|
+
"
|
|
1624
|
+
{
|
|
1625
|
+
// returns A embedded in the left upper corner of mxn matrix
|
|
1626
|
+
int rA = nrows(A);
|
|
1627
|
+
int cA = ncols(A);
|
|
1628
|
+
if ((rA >m) || (cA>n))
|
|
1629
|
+
{
|
|
1630
|
+
ERROR("wrong dimensions of the new matrix");
|
|
1631
|
+
}
|
|
1632
|
+
matrix @M[m][n];
|
|
1633
|
+
int i,j;
|
|
1634
|
+
for(i=1;i<=rA; i++)
|
|
1635
|
+
{
|
|
1636
|
+
for(j=1;j<=cA; j++)
|
|
1637
|
+
{
|
|
1638
|
+
@M[i,j]=A[i,j];
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1641
|
+
return(@M);
|
|
1642
|
+
}
|
|
1643
|
+
example
|
|
1644
|
+
{
|
|
1645
|
+
"EXAMPLE:"; echo = 2;
|
|
1646
|
+
ring r = 0,(a,b,c,d),dp;
|
|
1647
|
+
matrix M[2][3]; M[1,1]=a; M[1,2]=b;M[2,2]=d;M[1,3]=c;
|
|
1648
|
+
print(M);
|
|
1649
|
+
print(embedMat(M,3,4));
|
|
1650
|
+
matrix N = M; N[2,2]=0;
|
|
1651
|
+
print(embedMat(N,3,4));
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
//proc moduloSlim (matrix A, matrix B)
|
|
1655
|
+
proc moduloSlim (module A, module B)
|
|
1656
|
+
"USAGE: moduloSlim(A,B); A,B module/matrix/ideal
|
|
1657
|
+
RETURN: module
|
|
1658
|
+
PURPOSE: compute @code{modulo} with slimgb as engine
|
|
1659
|
+
EXAMPLE: example moduloSlim; shows an example
|
|
1660
|
+
"
|
|
1661
|
+
{
|
|
1662
|
+
def save = basering;
|
|
1663
|
+
int rA = nrows(A); int rB = nrows(B);
|
|
1664
|
+
int cA = ncols(A); int cB = ncols(B);
|
|
1665
|
+
int j;
|
|
1666
|
+
int dab; // difference a,b
|
|
1667
|
+
dab = rA - rB;
|
|
1668
|
+
if (dab <0)
|
|
1669
|
+
{
|
|
1670
|
+
// rA<rB: add zero rows to A
|
|
1671
|
+
dab = -dab;
|
|
1672
|
+
A = embedMat(A,rB,cA);
|
|
1673
|
+
}
|
|
1674
|
+
else
|
|
1675
|
+
{
|
|
1676
|
+
// rA>rB: add zero rows to B
|
|
1677
|
+
B = embedMat(B,rA,cB);
|
|
1678
|
+
}
|
|
1679
|
+
def mering = makeModElimRing(save);
|
|
1680
|
+
setring mering;
|
|
1681
|
+
module A = imap(save, A);
|
|
1682
|
+
module B = imap(save, B);
|
|
1683
|
+
// create matrix C
|
|
1684
|
+
// matrix C[2*rA][cA+cB];
|
|
1685
|
+
module C;
|
|
1686
|
+
int i;
|
|
1687
|
+
for(i=1; i<= cA; i++)
|
|
1688
|
+
{
|
|
1689
|
+
C = C, A[i] + gen(rA + i);
|
|
1690
|
+
}
|
|
1691
|
+
C = C,B;
|
|
1692
|
+
// for(i=1; i<=cB; i++)
|
|
1693
|
+
// {
|
|
1694
|
+
// C = C, B[i];
|
|
1695
|
+
// }
|
|
1696
|
+
C = C[2..ncols(C)];
|
|
1697
|
+
// print(C);
|
|
1698
|
+
matrix D = slimgb(C);
|
|
1699
|
+
module E; int k;
|
|
1700
|
+
// TODO: why only first row? need smth like rA rows...
|
|
1701
|
+
for(i=1; i<= ncols(D); i++)
|
|
1702
|
+
{
|
|
1703
|
+
k=1;
|
|
1704
|
+
// determine first zero in the column
|
|
1705
|
+
while ( (D[k,i]==0) && (k<= cA+rA) )
|
|
1706
|
+
{
|
|
1707
|
+
k++;
|
|
1708
|
+
}
|
|
1709
|
+
// what can that be: k = cA+rA+1=> zero column
|
|
1710
|
+
// k<=rA => column not in ker
|
|
1711
|
+
// rA+1 <= k <= rA+cA => column in ker
|
|
1712
|
+
if ( ( k>=rA+1) && (k<=rA+cA) )
|
|
1713
|
+
{
|
|
1714
|
+
E = E,D[i];
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
// for(i=1; i<= ncols(D); i++)
|
|
1718
|
+
// {
|
|
1719
|
+
// if (D[1,i]==0)
|
|
1720
|
+
// {
|
|
1721
|
+
// E = E,D[i];
|
|
1722
|
+
// }
|
|
1723
|
+
// }
|
|
1724
|
+
// // this E has 1st column and 1st row zero
|
|
1725
|
+
// use submat@matrix.lib
|
|
1726
|
+
// E = submat(E,intvec(2..nrows(E)),intvec(2..ncols(E)));
|
|
1727
|
+
E = submat(E,intvec(rA+1..nrows(E)),intvec(2..ncols(E)));
|
|
1728
|
+
setring save;
|
|
1729
|
+
module E = imap(mering,E);
|
|
1730
|
+
kill mering;
|
|
1731
|
+
// TODO: clean components!
|
|
1732
|
+
return(E);
|
|
1733
|
+
}
|
|
1734
|
+
example
|
|
1735
|
+
{
|
|
1736
|
+
"EXAMPLE:"; echo = 2;
|
|
1737
|
+
LIB "ncalg.lib";
|
|
1738
|
+
ring r; // first classical example for modulo
|
|
1739
|
+
ideal h1=x,y,z; ideal h2=x;
|
|
1740
|
+
module m=moduloSlim(h1,h2);
|
|
1741
|
+
print(m);
|
|
1742
|
+
// now, a noncommutative example
|
|
1743
|
+
def A = makeUsl2(); setring A; // this algebra is U(sl_2)
|
|
1744
|
+
ideal H2 = e2,f2,h2-1; H2 = twostd(H2);
|
|
1745
|
+
print(matrix(H2)); // print H2 in a compact form
|
|
1746
|
+
ideal H1 = std(e);
|
|
1747
|
+
ideal T = moduloSlim(H1,H2);
|
|
1748
|
+
T = std( NF(std(H2+T),H2) );
|
|
1749
|
+
T;
|
|
1750
|
+
// now, a matrix example:
|
|
1751
|
+
ring r2 = 0,(x,d), (dp);
|
|
1752
|
+
def R = nc_algebra(1,1); setring R;
|
|
1753
|
+
matrix M[2][2] = d, 0, 0, d*(x*d);
|
|
1754
|
+
matrix P[2][1] = (8x+7)*d+9x, (x2+1)*d + 5*x;
|
|
1755
|
+
module X = moduloSlim(P,M);
|
|
1756
|
+
print(X);
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
//////////////////////////////////////////////////////////////////////
|
|
1760
|
+
|
|
1761
|
+
proc makeModElimRing(list #)
|
|
1762
|
+
"USAGE: makeModElimRing(L); L a list
|
|
1763
|
+
RETURN: ring
|
|
1764
|
+
PURPOSE: create a copy of a given ring equipped with the
|
|
1765
|
+
elimination ordering for module components @code{(c,<)}
|
|
1766
|
+
NOTE: usually the list argument contains a ring to work with
|
|
1767
|
+
EXAMPLE: example makeModElimRing; shows an example
|
|
1768
|
+
"
|
|
1769
|
+
{
|
|
1770
|
+
// supports qring;
|
|
1771
|
+
// can be extended to handle C instead of c
|
|
1772
|
+
/* input/basering business */
|
|
1773
|
+
def save; int Noinput = 0;
|
|
1774
|
+
if ( size(#)>0 )
|
|
1775
|
+
{
|
|
1776
|
+
if (typeof(#[1]) == "ring" )
|
|
1777
|
+
{
|
|
1778
|
+
save = #[1];
|
|
1779
|
+
}
|
|
1780
|
+
else
|
|
1781
|
+
{
|
|
1782
|
+
print("unsupported input type, proceeding with basering");
|
|
1783
|
+
Noinput = 1;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
if (Noinput)
|
|
1787
|
+
{
|
|
1788
|
+
if (nameof(basering)=="basering")
|
|
1789
|
+
{
|
|
1790
|
+
ERROR("no rings are given");
|
|
1791
|
+
}
|
|
1792
|
+
else
|
|
1793
|
+
{
|
|
1794
|
+
save = basering;
|
|
1795
|
+
}
|
|
1796
|
+
}
|
|
1797
|
+
/* END input/basering business */
|
|
1798
|
+
list L = ringlist(save);
|
|
1799
|
+
list Ord = L[3];
|
|
1800
|
+
int s = size(Ord); int done;
|
|
1801
|
+
// detect where module ordering is located: either 1st or last entry
|
|
1802
|
+
int i,j;
|
|
1803
|
+
for(i=1; i<=s; i++)
|
|
1804
|
+
{
|
|
1805
|
+
if ( (Ord[i][1] == "C") || (Ord[i][1] == "c") )
|
|
1806
|
+
{
|
|
1807
|
+
Ord[i][1] = "c";
|
|
1808
|
+
j = i; i=s;
|
|
1809
|
+
}
|
|
1810
|
+
}
|
|
1811
|
+
if (j==0) { ERROR("no component entry found in the ringlist"); }
|
|
1812
|
+
list N;
|
|
1813
|
+
N[1] = Ord[j];
|
|
1814
|
+
for(i=2; i<=j; i++)
|
|
1815
|
+
{
|
|
1816
|
+
N[i] = Ord[i-1];
|
|
1817
|
+
}
|
|
1818
|
+
for(i=j+1; i<=s; i++)
|
|
1819
|
+
{
|
|
1820
|
+
N[i] = Ord[i];
|
|
1821
|
+
}
|
|
1822
|
+
L[3] = N; def NR = ring(L);
|
|
1823
|
+
return(NR);
|
|
1824
|
+
}
|
|
1825
|
+
example
|
|
1826
|
+
{
|
|
1827
|
+
"EXAMPLE:"; echo = 2;
|
|
1828
|
+
ring r1 = 0,(x,y,z),(C,Dp);
|
|
1829
|
+
def r2 = makeModElimRing(r1); setring r2; r2; kill r2;
|
|
1830
|
+
ring r3 = 0,(z,t),(wp(2,3),c);
|
|
1831
|
+
def r2 = makeModElimRing(r3); setring r2; r2; kill r2;
|
|
1832
|
+
ring r4 = 0,(z,t,u,w),(a(1,2),C,wp(2,3,4,5));
|
|
1833
|
+
def r2 = makeModElimRing(r4); setring r2; r2;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
proc isLieType()
|
|
1837
|
+
"USAGE: isLieType();
|
|
1838
|
+
RETURN: int, 1 if basering is a G-algebra of Lie type, 0 otherwise
|
|
1839
|
+
PURPOSE: G-algebra of Lie type has relations of the kind Y*X=X*Y+D
|
|
1840
|
+
EXAMPLE: example isLieType; shows an example
|
|
1841
|
+
"
|
|
1842
|
+
{
|
|
1843
|
+
def @B = basering; //save the name of basering
|
|
1844
|
+
int NVars = nvars(@B); //number of variables in basering
|
|
1845
|
+
int i, j;
|
|
1846
|
+
|
|
1847
|
+
int answer = 1;
|
|
1848
|
+
|
|
1849
|
+
// check basering is of Lie type:
|
|
1850
|
+
matrix @@CC[NVars][NVars];
|
|
1851
|
+
for(i=1; i<NVars; i++)
|
|
1852
|
+
{
|
|
1853
|
+
for(j=i+1; j<=NVars; j++)
|
|
1854
|
+
{
|
|
1855
|
+
@@CC[i,j]=leadcoef(var(j)*var(i));
|
|
1856
|
+
}
|
|
1857
|
+
}
|
|
1858
|
+
ideal @C@ = simplify(ideal(@@CC),2+4);// skip zeroes and repeated entries
|
|
1859
|
+
if ( (size(@C@) >1 ) || ( (size(@C@)==1) && (@C@[1]!=1) ) )
|
|
1860
|
+
{
|
|
1861
|
+
answer = 0;
|
|
1862
|
+
}
|
|
1863
|
+
return(answer);
|
|
1864
|
+
}
|
|
1865
|
+
example
|
|
1866
|
+
{
|
|
1867
|
+
"EXAMPLE:"; echo = 2;
|
|
1868
|
+
ring r = 0,(x,y),dp;
|
|
1869
|
+
y*x;
|
|
1870
|
+
isLieType(); //yes
|
|
1871
|
+
def D = Weyl(); setring D;
|
|
1872
|
+
y*x;
|
|
1873
|
+
isLieType(); //yes
|
|
1874
|
+
setring r;
|
|
1875
|
+
def R = nc_algebra(-3,0); setring R;
|
|
1876
|
+
y*x;
|
|
1877
|
+
isLieType(); // no
|
|
1878
|
+
kill R; kill r;
|
|
1879
|
+
ring s = (0,q),(x,y),dp;
|
|
1880
|
+
def S = nc_algebra(q,0); setring S;
|
|
1881
|
+
y*x;
|
|
1882
|
+
isLieType(); //no
|
|
1883
|
+
kill S; setring s;
|
|
1884
|
+
def S = nc_algebra(q,y^2); setring S;
|
|
1885
|
+
y*x;
|
|
1886
|
+
isLieType(); //no
|
|
1887
|
+
}
|