passagemath-singular 10.6.31rc3__cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.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-aarch64-linux-gnu.so +0 -0
- passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
- passagemath_singular-10.6.31rc3.dist-info/RECORD +490 -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-6a2a8666.4.1.so +0 -0
- passagemath_singular.libs/libcddgmp-ac579979.so.0.1.3 +0 -0
- passagemath_singular.libs/libfactory-4-66e33516.4.1.so +0 -0
- passagemath_singular.libs/libflint-81de1160.so.21.0.0 +0 -0
- passagemath_singular.libs/libgf2x-fbd36f80.so.3.0.0 +0 -0
- passagemath_singular.libs/libgfortran-e1b7dfc8.so.5.0.0 +0 -0
- passagemath_singular.libs/libgmp-93ebf16a.so.10.5.0 +0 -0
- passagemath_singular.libs/libgsl-e3525837.so.28.0.0 +0 -0
- passagemath_singular.libs/libmpfr-e0f11cf3.so.6.2.1 +0 -0
- passagemath_singular.libs/libntl-0043a3a2.so.44.0.1 +0 -0
- passagemath_singular.libs/libomalloc-0-06512335.9.6.so +0 -0
- passagemath_singular.libs/libopenblasp-r0-4c5b64b1.3.29.so +0 -0
- passagemath_singular.libs/libpolys-4-cb7246b5.4.1.so +0 -0
- passagemath_singular.libs/libreadline-28330744.so.8.2 +0 -0
- passagemath_singular.libs/libsingular_resources-4-8c425241.4.1.so +0 -0
- passagemath_singular.libs/libtinfo-f81c2d16.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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-gnu.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
- sage/algebras/quatalg/quaternion_algebra_element.cpython-314-aarch64-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-aarch64-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-aarch64-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-aarch64-linux-gnu.so +0 -0
- sage/libs/singular/option.pyx +671 -0
- sage/libs/singular/polynomial.cpython-314-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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-aarch64-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,3055 @@
|
|
|
1
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version difform.lib 4.1.2.0 Feb_2019 "; // $Id: 76743a092c443590b3f7157a2aeec656a2dd259c $
|
|
3
|
+
category="Noncommutative";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: difform.lib Procedures for differential forms
|
|
6
|
+
AUTHOR: Peter Chini, chini@rhrk.uni-kl.de
|
|
7
|
+
|
|
8
|
+
OVERVIEW:
|
|
9
|
+
A library for computing with elements of the differential algebra over a (quotient) ring.
|
|
10
|
+
To compute in this algebra, a non-commutative ring with additional variables
|
|
11
|
+
dx_1,...,dx_n and 'exterior' relations between this variables is used. In the case of a
|
|
12
|
+
quotient ring, the defining ideal and its image under the universal derivation are added as relations.
|
|
13
|
+
The differential forms themselves are defined via an additional type 'difform'. Objects
|
|
14
|
+
of this type carry as an attribute a polynomial in the differential algebra and make it
|
|
15
|
+
available over the basering.
|
|
16
|
+
Additionally, the universal derivation is available as a procedure and the differentials between the
|
|
17
|
+
graded parts of the differential algebra can be applied to differential forms.
|
|
18
|
+
The library also supports derivations: maps from the first graded part of the differential algebra
|
|
19
|
+
to the basering. These are defined via the type 'derivation' and there are procedures for basic arithmetic
|
|
20
|
+
operations, evaluation and Lie-derivative.
|
|
21
|
+
|
|
22
|
+
PROCEDURES:
|
|
23
|
+
diffAlgebra(); provides the differential algebra structure and the differential forms dx_1,...,dx_n
|
|
24
|
+
diffAlgebraStructure(); generates the structure of the differential algebra from the basering
|
|
25
|
+
diffAlgebraGens(); defines the differential forms dx_1,...,dx_n
|
|
26
|
+
diffAlgebraUnivDerIdeal(ideal); computes the image of an ideal under the universal derivation
|
|
27
|
+
diffAlgebraChangeOrd(list); returns a ring with the structure of the differential algebra but changed monomial ordering
|
|
28
|
+
diffAlgebraListGen(int); returns a list of the generators of the differential algebra or of a graded part of it
|
|
29
|
+
difformFromPoly(poly); constructs differential forms of degree 0 from polynomials
|
|
30
|
+
difformCoef(difform); computes the representation as an linear combination of the generators
|
|
31
|
+
difformGenToString(difform); casts a generator of the differential algebra to a string
|
|
32
|
+
difformHomogDecomp(df); list of differential forms: homogeneous decomposition
|
|
33
|
+
difformToString(difform); casts a differential form to a string
|
|
34
|
+
difformPrint(difform); prints differential forms
|
|
35
|
+
difformIsGen(difform); decides, whether a given differential form is a generator of the differential algebra
|
|
36
|
+
difformAdd(difform,difform); adds two differential forms
|
|
37
|
+
difformSub(difform,difform); subtracts one differential form from the other
|
|
38
|
+
difformNeg(difform); returns the negative of a differential form
|
|
39
|
+
difformMul(difform,difform); multiplies two differential forms
|
|
40
|
+
difformDiv(difform,difform); computes the quotient of two differential forms
|
|
41
|
+
difformEqu(difform,difform); compares two differential forms
|
|
42
|
+
difformNeq(difform,difform); returns the negation of comparing two differential forms
|
|
43
|
+
difformIsBigger(difform,difform); tests if a given differential form is greater than another one
|
|
44
|
+
difformIsSmaller(difform,difform); tests if a given differential form is smaller than another one
|
|
45
|
+
difformDeg(difform); returns the degree of a given differential form
|
|
46
|
+
difformIsHomog(difform); checks if the given differential form is homogeneous
|
|
47
|
+
difformIsHomogDeg(difform,int); checks if the given differential form is homogeneous of given degree
|
|
48
|
+
difformListCont(list,difform); checks if a given differential form is in a given list
|
|
49
|
+
difformListSort(list); sorts lists of differential forms and special lists of lists
|
|
50
|
+
difformUnivDer(difform); computes the image of an polynomial under the universal derivation
|
|
51
|
+
difformDiff(difform); computes the image of an differential form under the differential
|
|
52
|
+
derivationFromList(list); constructs a derivation from a given list
|
|
53
|
+
derivationCheckList(list); checks the form of a given structure list for a derivation
|
|
54
|
+
derivationFromPoly(poly); creates a derivation from a polynomial
|
|
55
|
+
derivationConstructor(def); constructs a derivation from arbitrary input
|
|
56
|
+
derivationToString(derivation); casts a derivation to a string
|
|
57
|
+
derivationPrint(derivation); prints a derivation
|
|
58
|
+
derivationAdd(derivation,derivation); computes the sum of two derivations
|
|
59
|
+
derivationSub(derivation,derivation); subtracts two derivations
|
|
60
|
+
derivationNeg(derivation); negates a given derivation
|
|
61
|
+
derivationMul(derivation,derivation); multiplies two derivations componentwise
|
|
62
|
+
derivationEqu(derivation,derivation); compares two derivations
|
|
63
|
+
derivationNeq(derivation,derivation); returns the negation of comparing two derivations
|
|
64
|
+
derivationEval(derivation,difform); evaluates a derivation at a given differential form of degree 1
|
|
65
|
+
derivationContractionGen(derivation,difform); computes the contraction and applies it to a generator
|
|
66
|
+
derivationContraction(derivation,difform); computes the contraction and applies it to a differential form
|
|
67
|
+
derivationLie(derivation,difform); returns the Lie-derivative applied to a differential form
|
|
68
|
+
|
|
69
|
+
KEYWORDS: differential forms;differentials;differential algebra
|
|
70
|
+
";
|
|
71
|
+
// Libraries needed
|
|
72
|
+
LIB "inout.lib";
|
|
73
|
+
|
|
74
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
75
|
+
// Initialization of library //
|
|
76
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
77
|
+
|
|
78
|
+
static proc mod_init()
|
|
79
|
+
{
|
|
80
|
+
// Type of differential forms:
|
|
81
|
+
// These are considered as elements (polynomials) in the differential algebra
|
|
82
|
+
// NOTE: the polynomials 'form' are not visible in the basering - only in the differential algebra
|
|
83
|
+
newstruct("difform","poly form");
|
|
84
|
+
|
|
85
|
+
// Type of derivations - these are maps: Omega_R^1 -> R
|
|
86
|
+
// The maps are uniquely determined by the images of the R-generators of Omega_R^1: dx_1,...,dx_n
|
|
87
|
+
// A derivation consists of a list of two lists: genIm[1][i] is a generator and genIm[2][i] the image of it
|
|
88
|
+
// The list of generators is always ordered by the ordering given on the differential algebra
|
|
89
|
+
newstruct("derivation","list genIm");
|
|
90
|
+
|
|
91
|
+
// Overloads for difform
|
|
92
|
+
system("install", "difform", "=", difformFromPoly, 1);
|
|
93
|
+
system("install", "difform", "print", difformPrint, 1);
|
|
94
|
+
|
|
95
|
+
system("install", "difform", "+", difformAdd, 2);
|
|
96
|
+
system("install", "difform", "-", difformSub, 2);
|
|
97
|
+
system("install", "difform", "-", difformNeg, 1);
|
|
98
|
+
system("install", "difform", "*", difformMul, 2);
|
|
99
|
+
system("install", "difform", "/", difformDiv, 2);
|
|
100
|
+
system("install", "difform", "==", difformEqu, 2);
|
|
101
|
+
system("install", "difform", "<>", difformNeq, 2);
|
|
102
|
+
system("install", "difform", ">", difformIsBigger,2);
|
|
103
|
+
system("install", "difform", "<", difformIsSmaller,2);
|
|
104
|
+
|
|
105
|
+
system("install", "difform", "deg", difformDeg, 1);
|
|
106
|
+
system("install", "difform", "homog", difformIsHomog, 1);
|
|
107
|
+
|
|
108
|
+
// Overloads for derivation
|
|
109
|
+
system("install", "derivation", "=", derivationConstructor, 1);
|
|
110
|
+
system("install", "derivation", "print", derivationPrint, 1);
|
|
111
|
+
|
|
112
|
+
system("install", "derivation", "+", derivationAdd, 2);
|
|
113
|
+
system("install", "derivation", "-", derivationSub, 2);
|
|
114
|
+
system("install", "derivation", "-", derivationNeg, 1);
|
|
115
|
+
system("install", "derivation", "*", derivationMul, 2);
|
|
116
|
+
system("install", "derivation", "==", derivationEqu, 2);
|
|
117
|
+
system("install", "derivation", "<>", derivationNeq, 2);
|
|
118
|
+
system("install", "derivation", "(", derivationEval, 2);
|
|
119
|
+
|
|
120
|
+
system("install", "derivation", "diff", derivationLie, 2);
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
126
|
+
// Construction of differential algebra //
|
|
127
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
// TODO: check if qringNF option is set - if yes: turn off and set afterwards on
|
|
131
|
+
proc diffAlgebra()
|
|
132
|
+
"USAGE: diffAlgebra();
|
|
133
|
+
SIDE EFFECTS: If R is the basering, the differential algebra is constructed with name Omega_R
|
|
134
|
+
and the differential forms dx_1,...,dx_n are available. The name of the differential
|
|
135
|
+
algebra is stored in the attribute attrib(R,"diffAlgebra").
|
|
136
|
+
NOTE: - computations with differential forms need the structure of the differential algebra,
|
|
137
|
+
so this procedure should be executed first.
|
|
138
|
+
- the variable names 'd' or 'D' should be avoided.
|
|
139
|
+
- the procedure also works for quotient rings
|
|
140
|
+
KEYWORDS: differential algebra; differential forms; differentials
|
|
141
|
+
SEE ALSO: diffAlgebraStructure; diffAlgebraGens; diffAlgebraUnivDerIdeal
|
|
142
|
+
EXAMPLE: example diffAlgebra; shows an example"
|
|
143
|
+
{
|
|
144
|
+
|
|
145
|
+
// Build the differential algebra and store its name as an attribute
|
|
146
|
+
ring Omega_R = diffAlgebraStructure();
|
|
147
|
+
attrib(basering,"diffAlgebra","Omega_R");
|
|
148
|
+
|
|
149
|
+
// Construct the differential forms dx_1,...,dx_n over the basering
|
|
150
|
+
diffAlgebraGens();
|
|
151
|
+
|
|
152
|
+
// Info for User
|
|
153
|
+
list vars_ = ringlist(basering)[2];
|
|
154
|
+
int n = size(vars_);
|
|
155
|
+
int i;
|
|
156
|
+
string basic_forms;
|
|
157
|
+
|
|
158
|
+
basic_forms = "d" + vars_[1];
|
|
159
|
+
for(i = 2; i <= n; i++){
|
|
160
|
+
basic_forms = basic_forms + ", d" + vars_[i];
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
string info_text = "// The differential algebra " + attrib(basering,"diffAlgebra") + " was constructed and the differential forms " + basic_forms + " are available.";
|
|
164
|
+
print(info_text);
|
|
165
|
+
}
|
|
166
|
+
example
|
|
167
|
+
{
|
|
168
|
+
"EXAMPLE:"; echo = 2;
|
|
169
|
+
///////////////////////////////////////////////////////////////
|
|
170
|
+
// Example for a differential algebra over a polynomial ring //
|
|
171
|
+
///////////////////////////////////////////////////////////////
|
|
172
|
+
|
|
173
|
+
ring R = 0,(a,b,c),ds;
|
|
174
|
+
diffAlgebra();
|
|
175
|
+
setring Omega_R;
|
|
176
|
+
|
|
177
|
+
// The differential algebra is given by:
|
|
178
|
+
basering;
|
|
179
|
+
|
|
180
|
+
kill R,Omega_R,da,db,dc;
|
|
181
|
+
|
|
182
|
+
/////////////////////////////////////////////////////////////
|
|
183
|
+
// Example for a differential algebra over a quotient ring //
|
|
184
|
+
/////////////////////////////////////////////////////////////
|
|
185
|
+
|
|
186
|
+
ring R = 0,(x,y,z),lp;
|
|
187
|
+
ideal I = x+y+z,xyz;
|
|
188
|
+
qring S = std(I);
|
|
189
|
+
diffAlgebra();
|
|
190
|
+
setring Omega_R;
|
|
191
|
+
|
|
192
|
+
// The differential algebra is given by:
|
|
193
|
+
basering;
|
|
194
|
+
|
|
195
|
+
kill Omega_R,dx,dy,dz;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
proc diffAlgebraStructure()
|
|
203
|
+
"USAGE: diffAlgebraStructure();
|
|
204
|
+
RETURN: the structure of the differential algebra
|
|
205
|
+
REMARKS: The differential algebra is constructed as non-commutative ring with
|
|
206
|
+
additional variables Dx_1,...,Dx_n and 'exterior' relations between them.
|
|
207
|
+
In the case, that the basering is a quotient ring, the defining ideal and its image
|
|
208
|
+
under the universal derivation are added as relations.
|
|
209
|
+
NOTE: the monomial ordering of the basering is preserved in the differential algebra
|
|
210
|
+
KEYWORDS: differential algebra
|
|
211
|
+
SEE ALSO: diffAlgebra, diffAlgebraGens, diffAlgebraUnivDerIdeal"
|
|
212
|
+
{
|
|
213
|
+
|
|
214
|
+
list base_list = ringlist(basering);
|
|
215
|
+
def R_old = basering;
|
|
216
|
+
ideal quot_ideal = base_list[4];
|
|
217
|
+
|
|
218
|
+
// Add Dx_1,...,Dx_n as first variables
|
|
219
|
+
list ext_var = base_list[2];
|
|
220
|
+
int n = size(ext_var);
|
|
221
|
+
int i;
|
|
222
|
+
|
|
223
|
+
for(i = 1; i <= n; i++)
|
|
224
|
+
{
|
|
225
|
+
ext_var[n+i] = ext_var[i];
|
|
226
|
+
ext_var[i] = "D" + ext_var[n+i];
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
base_list[2] = ext_var;
|
|
230
|
+
|
|
231
|
+
// Preserve the monomial order of the basering
|
|
232
|
+
// Add a new first block for the variables dx_i with dp ordering
|
|
233
|
+
intvec weight_vec = 1:n;
|
|
234
|
+
base_list[3] = list(list("dp",weight_vec)) + base_list[3];
|
|
235
|
+
|
|
236
|
+
// Add relations x_i*x_j = x_j*x_i and dx_i*dx_j = -dx_j*dx_i
|
|
237
|
+
int k = 2*n;
|
|
238
|
+
matrix C[k][k];
|
|
239
|
+
matrix D[k][k];
|
|
240
|
+
int j;
|
|
241
|
+
|
|
242
|
+
// Generate strictly upper triangular matrix describing the relations
|
|
243
|
+
for(i = 1; i <= k; i++)
|
|
244
|
+
{
|
|
245
|
+
for(j = i+1; j <= k ; j++)
|
|
246
|
+
{
|
|
247
|
+
if(j <= n)
|
|
248
|
+
{
|
|
249
|
+
C[i,j] = -1;
|
|
250
|
+
}
|
|
251
|
+
else
|
|
252
|
+
{
|
|
253
|
+
C[i,j] = 1;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
base_list[4] = ideal(0);
|
|
259
|
+
base_list[5] = C;
|
|
260
|
+
base_list[6] = D;
|
|
261
|
+
|
|
262
|
+
// Pass to non-commutative ring with extra variables and relations
|
|
263
|
+
ring R_intermediate = ring(base_list);
|
|
264
|
+
|
|
265
|
+
// Add relations Dx_i*Dx_i = 0 via generating a quotient ring
|
|
266
|
+
ideal REL;
|
|
267
|
+
for(i = 1; i <= n; i++)
|
|
268
|
+
{
|
|
269
|
+
REL[i] = var(i)*var(i);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// Build the differential algebra for the polynomial ring - the free module
|
|
273
|
+
qring diffAlg_poly = twostd(REL);
|
|
274
|
+
|
|
275
|
+
// Need the relations describing the differential algebra if R is a quotient ring
|
|
276
|
+
ideal quot_ideal = imap(R_old,quot_ideal);
|
|
277
|
+
|
|
278
|
+
if(size(quot_ideal) != 0)
|
|
279
|
+
{
|
|
280
|
+
// Compute the universal derivation of the generators of the ideal
|
|
281
|
+
quot_ideal = quot_ideal + diffAlgebraUnivDerIdeal(quot_ideal);
|
|
282
|
+
|
|
283
|
+
// Add the additional relations, generate the differential algebra with name Omega_R and export it
|
|
284
|
+
qring Omega_R = twostd(quot_ideal);
|
|
285
|
+
exportto(Top,Omega_R);
|
|
286
|
+
|
|
287
|
+
return(Omega_R);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Give the differential algebra the name Omega_basering and export it
|
|
291
|
+
ring Omega_R = diffAlg_poly;
|
|
292
|
+
exportto(Top,Omega_R);
|
|
293
|
+
|
|
294
|
+
return(Omega_R);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
proc diffAlgebraGens()
|
|
308
|
+
"USAGE: diffAlgebraGens();
|
|
309
|
+
SIDE EFFECTS: The differential forms dx_1,...,dx_n are constructed.
|
|
310
|
+
KEYWORDS: differential algebra; generator
|
|
311
|
+
SEE ALSO: diffAlgebra, diffAlgebraStructure, diffAlgebraUnivDerIdeal"
|
|
312
|
+
{
|
|
313
|
+
|
|
314
|
+
setring Omega_R;
|
|
315
|
+
|
|
316
|
+
list ext_var = ringlist(Omega_R)[2];
|
|
317
|
+
int n = size(ext_var) div 2;
|
|
318
|
+
int i;
|
|
319
|
+
string dif_cons;
|
|
320
|
+
|
|
321
|
+
for(i = 1; i <= n; i++){
|
|
322
|
+
dif_cons = "difform d" + ext_var[i+n] + ";";
|
|
323
|
+
dif_cons = dif_cons + "d" + ext_var[i+n] + ".form = " + ext_var[i] + ";";
|
|
324
|
+
dif_cons = dif_cons + " exportto(Top," + "d" + ext_var[i+n] + ")" + ";";
|
|
325
|
+
execute(dif_cons);
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
proc diffAlgebraUnivDerIdeal(ideal I)
|
|
334
|
+
"USAGE: diffAlgebraUnivDerIdeal(I); I ideal
|
|
335
|
+
ASSUME: current basering is the differential algebra of a polynomial ring
|
|
336
|
+
and I is lifted from the polynomial ring
|
|
337
|
+
RETURN: the image of I under the universal derivation
|
|
338
|
+
REMARK: The procedure computes the universal derivation of every generator of the ideal.
|
|
339
|
+
NOTE: for differential forms use the procedure difformUnivDer or difformDiff
|
|
340
|
+
KEYWORDS: differential algebra; universal derivation
|
|
341
|
+
SEE ALSO: diffAlgebra, diffAlgebraStructure, diffAlgebraGens"
|
|
342
|
+
{
|
|
343
|
+
|
|
344
|
+
int n = nvars(basering) div 2;
|
|
345
|
+
int k = size(I);
|
|
346
|
+
int i,j;
|
|
347
|
+
ideal d_I;
|
|
348
|
+
|
|
349
|
+
for(j = 1; j <= k; j++)
|
|
350
|
+
{
|
|
351
|
+
d_I[j] = 0;
|
|
352
|
+
for(i = 1; i <= n; i++)
|
|
353
|
+
{
|
|
354
|
+
d_I[j] = d_I[j] + diff(I[j],var(i+n))*var(i);
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
return(d_I);
|
|
358
|
+
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
proc diffAlgebraChangeOrd(list #)
|
|
366
|
+
"USAGE: diffAlgebraChangeOrd(#); # list
|
|
367
|
+
ASSUME: the current basering is the differential algebra
|
|
368
|
+
RETURN: the differential algebra with changed monomial ordering
|
|
369
|
+
NOTE: - an ordering is defined via the following pattern:
|
|
370
|
+
- #[i] = 'gen' defines the ordering on the generators dx_i
|
|
371
|
+
- #[i+1] must then be a valid monomial ordering as string
|
|
372
|
+
- #[i+2] an optional weight vector
|
|
373
|
+
- #[i] = 'ringvar' defines the ordering on the ringvariables
|
|
374
|
+
- #[i+1] must then be a valid monomial ordering as string
|
|
375
|
+
- #[i+2] an optional weight vector
|
|
376
|
+
- only use for interior computations
|
|
377
|
+
- differential forms are polynomials in the differential algebra - not in the returned ring
|
|
378
|
+
- do not define differential forms as polynomials in the returned ring since this is another data-ring
|
|
379
|
+
- an error occurs if: - no valid monomial ordering is given
|
|
380
|
+
- no weight vector is given but a weighted monomial ordering
|
|
381
|
+
- a given weight vector has wrong dimension
|
|
382
|
+
- weight vectors are ignored if the given ordering is not weighted
|
|
383
|
+
KEYWORDS: ordering
|
|
384
|
+
SEE ALSO: difformListSort, difformIsBigger, difformIsSmaller"
|
|
385
|
+
{
|
|
386
|
+
|
|
387
|
+
int n = size(#);
|
|
388
|
+
int k = nvars(basering) div 2;
|
|
389
|
+
int i;
|
|
390
|
+
string gen_ord = "";
|
|
391
|
+
string ringvar_ord = "";
|
|
392
|
+
|
|
393
|
+
// Get information from input
|
|
394
|
+
for(i = 1; i <= n; i++)
|
|
395
|
+
{
|
|
396
|
+
if(typeof(#[i]) == "string")
|
|
397
|
+
{
|
|
398
|
+
if(#[i] == "gen" && typeof(#[i+1]) == "string")
|
|
399
|
+
{
|
|
400
|
+
gen_ord = #[i+1];
|
|
401
|
+
if(typeof(#[i+2]) == "intvec")
|
|
402
|
+
{
|
|
403
|
+
intvec gen_weight = #[i+2];
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
if(#[i] == "ringvar" && typeof(#[i+1]) == "string")
|
|
407
|
+
{
|
|
408
|
+
ringvar_ord = #[i+1];
|
|
409
|
+
if(typeof(#[i+2]) == "intvec")
|
|
410
|
+
{
|
|
411
|
+
intvec ringvar_weight = #[i+2];
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
// Check input for consistency
|
|
418
|
+
// Generator ordering must be a valid monomial ordering
|
|
419
|
+
if(gen_ord != "" && gen_ord != "lp" && gen_ord != "rp" && gen_ord != "dp" && gen_ord != "Dp" && gen_ord != "wp" && gen_ord != "Wp")
|
|
420
|
+
{
|
|
421
|
+
if(gen_ord != "ls" && gen_ord != "ds" && gen_ord != "Ds" && gen_ord != "ws" && gen_ord != "Ws")
|
|
422
|
+
{
|
|
423
|
+
ERROR("Not a valid ordering!");
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
// Ringvariable ordering must be a valid monomial ordering
|
|
427
|
+
if(ringvar_ord != "" && ringvar_ord != "lp" && ringvar_ord != "rp" && ringvar_ord != "dp" && ringvar_ord != "Dp" && ringvar_ord != "wp" && ringvar_ord != "Wp")
|
|
428
|
+
{
|
|
429
|
+
if(ringvar_ord != "ls" && ringvar_ord != "ds" && ringvar_ord != "Ds" && ringvar_ord != "ws" && ringvar_ord != "Ws")
|
|
430
|
+
{
|
|
431
|
+
ERROR("Not a valid ordering!");
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
// If the generator ordering is a weighted monomial ordering, a weight-vector is needed
|
|
435
|
+
if(gen_ord == "wp" || gen_ord == "Wp" || gen_ord == "ws" || gen_ord == "Ws")
|
|
436
|
+
{
|
|
437
|
+
if(!defined(gen_weight))
|
|
438
|
+
{
|
|
439
|
+
ERROR("No weight vector given!");
|
|
440
|
+
}
|
|
441
|
+
if(size(gen_weight) != k)
|
|
442
|
+
{
|
|
443
|
+
ERROR("Weight vector has wrong size!");
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
else
|
|
447
|
+
{
|
|
448
|
+
// If a weight vector is given although the monomial ordering is not weighted
|
|
449
|
+
if(defined(gen_weight))
|
|
450
|
+
{
|
|
451
|
+
kill gen_weight;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
// If the ordering for the ring variables is a weighted monmial ordering, a weight-vector is needed
|
|
455
|
+
if(ringvar_ord == "wp" || ringvar_ord == "Wp" || ringvar_ord == "ws" || ringvar_ord == "Ws")
|
|
456
|
+
{
|
|
457
|
+
if(!defined(ringvar_weight))
|
|
458
|
+
{
|
|
459
|
+
ERROR("No weight vector given!");
|
|
460
|
+
}
|
|
461
|
+
if(size(ringvar_weight) != k)
|
|
462
|
+
{
|
|
463
|
+
ERROR("Weight vector has wrong size!");
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
else
|
|
467
|
+
{
|
|
468
|
+
// If a weight vector is given although the monomial ordering is not weighted
|
|
469
|
+
if(defined(ringvar_weight))
|
|
470
|
+
{
|
|
471
|
+
kill ringvar_weight;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
list L_diff_Alg = ringlist(basering);
|
|
475
|
+
n = size(L_diff_Alg[3]);
|
|
476
|
+
|
|
477
|
+
// Change ordering of generators
|
|
478
|
+
if(gen_ord != "")
|
|
479
|
+
{
|
|
480
|
+
L_diff_Alg[3][1][1] = gen_ord;
|
|
481
|
+
if(defined(gen_weight))
|
|
482
|
+
{
|
|
483
|
+
L_diff_Alg[3][1][2] = gen_weight;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// Change the ordering of the ringvariables
|
|
488
|
+
if(ringvar_ord != "")
|
|
489
|
+
{
|
|
490
|
+
list L;
|
|
491
|
+
L[1] = L_diff_Alg[3][1];
|
|
492
|
+
L[2] = list();
|
|
493
|
+
L[2][1] = ringvar_ord;
|
|
494
|
+
if(defined(ringvar_weight))
|
|
495
|
+
{
|
|
496
|
+
L[2][2] = ringvar_weight;
|
|
497
|
+
}
|
|
498
|
+
else
|
|
499
|
+
{
|
|
500
|
+
L[2][2] = 1:k;
|
|
501
|
+
}
|
|
502
|
+
L_diff_Alg[3] = L;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
def T = ring(L_diff_Alg);
|
|
506
|
+
return(T);
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
proc diffAlgebraListGen(list #)
|
|
514
|
+
"USAGE: diffAlgebraListGen(#); # list
|
|
515
|
+
RETURN: - a list of generators of the differential algebra as module over the basering
|
|
516
|
+
- a list of generators of a graded part of the differential algebra
|
|
517
|
+
REMARKS: In order to find all generators, they are counted 'binary': The generators are in
|
|
518
|
+
1:1 - correspondence to the dual number representations of 1 up to (2^n-1)
|
|
519
|
+
NOTE: - if all generators of the differential algebra are needed, apply the
|
|
520
|
+
procedure without input
|
|
521
|
+
- if the generator(s) of a graded part are needed, apply the procedure with
|
|
522
|
+
an integer which specifies the wanted degree
|
|
523
|
+
- the list of generators is sorted with respect to the monomial ordering on the
|
|
524
|
+
differential algebra
|
|
525
|
+
KEYWORDS: generators; graded
|
|
526
|
+
EXAMPLE: example diffAlgebraListGen; shows an example"
|
|
527
|
+
{
|
|
528
|
+
int n = nvars(basering);
|
|
529
|
+
int i,k,j;
|
|
530
|
+
int degr = -1;
|
|
531
|
+
list var_list;
|
|
532
|
+
list GEN_list;
|
|
533
|
+
difform current_var;
|
|
534
|
+
difform current_gen;
|
|
535
|
+
|
|
536
|
+
// Get optional degree
|
|
537
|
+
if(size(#) > 0)
|
|
538
|
+
{
|
|
539
|
+
if(typeof(#[1]) == "int")
|
|
540
|
+
{
|
|
541
|
+
degr = #[1];
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
// Build the list of all dx_i
|
|
546
|
+
def R_old = basering;
|
|
547
|
+
setring Omega_R;
|
|
548
|
+
|
|
549
|
+
for(i = 1; i <= n; i++)
|
|
550
|
+
{
|
|
551
|
+
current_var.form = var(i);
|
|
552
|
+
var_list[i] = current_var;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
setring R_old;
|
|
556
|
+
|
|
557
|
+
// Find all generators (of given degree)
|
|
558
|
+
list dual_i;
|
|
559
|
+
for(i = 1; i < 2^n; i++)
|
|
560
|
+
{
|
|
561
|
+
// Compute dual number representation
|
|
562
|
+
dual_i = diffAlgebraIntToDual(i);
|
|
563
|
+
k = size(dual_i);
|
|
564
|
+
current_gen = 1;
|
|
565
|
+
|
|
566
|
+
// Convert dual number to generator
|
|
567
|
+
for(j = 1; j <= k; j++)
|
|
568
|
+
{
|
|
569
|
+
if(dual_i[j] != 0)
|
|
570
|
+
{
|
|
571
|
+
current_gen = current_gen*var_list[j];
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
// Add generator if it has the given degree or degree was not chosen
|
|
576
|
+
if(degr == -1 || difformDeg(current_gen) == degr)
|
|
577
|
+
{
|
|
578
|
+
GEN_list = GEN_list + list(current_gen);
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
// Add generator 1
|
|
583
|
+
if(degr == 0 || degr == -1)
|
|
584
|
+
{
|
|
585
|
+
difform gen_one = 1;
|
|
586
|
+
GEN_list = list(gen_one) + GEN_list;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
return(difformListSort(GEN_list));
|
|
590
|
+
}
|
|
591
|
+
example
|
|
592
|
+
{
|
|
593
|
+
"EXAMPLE:"; echo = 2;
|
|
594
|
+
ring R = 11,(x,y,z),dp;
|
|
595
|
+
diffAlgebra();
|
|
596
|
+
|
|
597
|
+
////////////////////////////////////////////
|
|
598
|
+
// Generators of the differential algebra //
|
|
599
|
+
////////////////////////////////////////////
|
|
600
|
+
diffAlgebraListGen();
|
|
601
|
+
|
|
602
|
+
//////////////////////////////////////////
|
|
603
|
+
// Generators of the second graded part //
|
|
604
|
+
//////////////////////////////////////////
|
|
605
|
+
diffAlgebraListGen(2);
|
|
606
|
+
|
|
607
|
+
kill Omega_R,dx,dy,dz;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
static proc diffAlgebraIntToDual(int l)
|
|
615
|
+
"USAGE: diffAlgebraIntToDual(l); l int
|
|
616
|
+
RETURN: the dual number representation of l as a list
|
|
617
|
+
NOTE: the LSBF (least significant bit first) representation is computed
|
|
618
|
+
KEYWORDS: dual; int
|
|
619
|
+
SEE ALSO: diffAlgebraListGen"
|
|
620
|
+
{
|
|
621
|
+
list dual_number;
|
|
622
|
+
|
|
623
|
+
while(l div 2 != 0)
|
|
624
|
+
{
|
|
625
|
+
dual_number = dual_number + list(l mod 2);
|
|
626
|
+
l = l div 2;
|
|
627
|
+
}
|
|
628
|
+
dual_number = dual_number + list(l mod 2);
|
|
629
|
+
return(dual_number);
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
634
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
635
|
+
// Procedures for type difform //
|
|
636
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
637
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
641
|
+
//----------------------- Structural procedures ------------------------------//
|
|
642
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
proc difformFromPoly(poly f)
|
|
646
|
+
"USAGE: difform df = f; f poly
|
|
647
|
+
RETURN: the differential form of degree 0 defined by f
|
|
648
|
+
REMARK: The given polynomial gets lifted to the differential algebra
|
|
649
|
+
and the differential form is defined there.
|
|
650
|
+
KEYWORDS: constructor; differential
|
|
651
|
+
EXAMPLE: example difformFromPoly; shows an example"
|
|
652
|
+
{
|
|
653
|
+
|
|
654
|
+
def R_old = basering;
|
|
655
|
+
setring Omega_R;
|
|
656
|
+
|
|
657
|
+
poly g = imap(R_old,f);
|
|
658
|
+
difform df;
|
|
659
|
+
df.form = g;
|
|
660
|
+
|
|
661
|
+
return(df);
|
|
662
|
+
}
|
|
663
|
+
example
|
|
664
|
+
{
|
|
665
|
+
"EXAMPLE:"; echo = 2;
|
|
666
|
+
ring R = 0,(x,y,z),ds;
|
|
667
|
+
diffAlgebra();
|
|
668
|
+
|
|
669
|
+
////////////////////////////////////////
|
|
670
|
+
// Construction of differential forms //
|
|
671
|
+
////////////////////////////////////////
|
|
672
|
+
|
|
673
|
+
poly f = 3x3z*(y4-y5) + 2;
|
|
674
|
+
difform df = f;
|
|
675
|
+
df;
|
|
676
|
+
|
|
677
|
+
// For the construction of more general differential forms,
|
|
678
|
+
// the constructor difformFromPoly is used implicitly:
|
|
679
|
+
|
|
680
|
+
difform dg = 3*x*dx - y*dy + dx*dy*dz + 1;
|
|
681
|
+
dg;
|
|
682
|
+
|
|
683
|
+
kill Omega_R,df,dg,dx,dy,dz;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
proc difformCoef(difform df)
|
|
691
|
+
"USAGE: difformCoef(df); df difform
|
|
692
|
+
RETURN: list of lists of differential forms and polynomials:
|
|
693
|
+
- the first entry is a generator of the differential algebra which appears in df
|
|
694
|
+
- the second entry is the corresponding coefficient
|
|
695
|
+
REMARKS: Via the procedure coef, the coefficients are found - therefore the ring has to be changed to the
|
|
696
|
+
differential algebra. After that, the coefficients have to be mapped back to the original ring.
|
|
697
|
+
NOTE: the returned list can be sorted with the procedure difformListSort and the optional string 'Llist'
|
|
698
|
+
KEYWORDS: decomposition; generators; coefficients
|
|
699
|
+
EXAMPLE: example difformCoef; shows an example"
|
|
700
|
+
{
|
|
701
|
+
def R_old = basering;
|
|
702
|
+
setring Omega_R;
|
|
703
|
+
def diff_Alg = basering;
|
|
704
|
+
|
|
705
|
+
poly f = df.form;
|
|
706
|
+
int n = nvars(basering) div 2;
|
|
707
|
+
int i;
|
|
708
|
+
|
|
709
|
+
// Build the wedge product of all differential forms dx_i
|
|
710
|
+
poly wedge_mon = 1;
|
|
711
|
+
for(i = 1; i <= n; i++)
|
|
712
|
+
{
|
|
713
|
+
wedge_mon = wedge_mon*var(i);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
// Find the coefficients of the generators
|
|
717
|
+
matrix df_coefs = coef(f,wedge_mon);
|
|
718
|
+
int k = ncols(df_coefs);
|
|
719
|
+
|
|
720
|
+
// Store representation in a list
|
|
721
|
+
poly coeff_above;
|
|
722
|
+
setring R_old;
|
|
723
|
+
difform current_gen;
|
|
724
|
+
poly coeff;
|
|
725
|
+
list repr;
|
|
726
|
+
|
|
727
|
+
for(i = 1;i <= k;i++)
|
|
728
|
+
{
|
|
729
|
+
repr[i] = list();
|
|
730
|
+
setring diff_Alg;
|
|
731
|
+
|
|
732
|
+
// Generators as differential forms
|
|
733
|
+
current_gen.form = df_coefs[1,i];
|
|
734
|
+
|
|
735
|
+
// Coefficients are polynomials in the basering
|
|
736
|
+
coeff_above = df_coefs[2,i];
|
|
737
|
+
setring R_old;
|
|
738
|
+
coeff = imap(diff_Alg,coeff_above);
|
|
739
|
+
|
|
740
|
+
repr[i][1] = current_gen;
|
|
741
|
+
repr[i][2] = coeff;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
// Return representation
|
|
745
|
+
return(repr);
|
|
746
|
+
}
|
|
747
|
+
example
|
|
748
|
+
{
|
|
749
|
+
"EXAMPLE:"; echo = 2;
|
|
750
|
+
ring R = 0,(x,y,z),lp;
|
|
751
|
+
diffAlgebra();
|
|
752
|
+
|
|
753
|
+
difform df = 3*x25*dx - y*dx*dy + 12*dx*dy*dz - dz*dy + 3 + 12*x*dx + 24*(y4-y5) + dx*dy*x3*dz + dz - dy*dx + dz*x2 + z5*y*dy;
|
|
754
|
+
|
|
755
|
+
///////////////////////////////
|
|
756
|
+
// Unsorted Coefficient List //
|
|
757
|
+
///////////////////////////////
|
|
758
|
+
list L_1 = difformCoef(df);
|
|
759
|
+
L_1;
|
|
760
|
+
|
|
761
|
+
/////////////////////////////
|
|
762
|
+
// Sorted Coefficient List //
|
|
763
|
+
/////////////////////////////
|
|
764
|
+
L_1 = difformListSort(L_1,"Llist","gen","ds");
|
|
765
|
+
L_1;
|
|
766
|
+
|
|
767
|
+
kill Omega_R,df,dx,dy,dz,L_1;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
proc difformGenToString(difform df)
|
|
775
|
+
"USAGE: difformGenToString(df); df difform
|
|
776
|
+
RETURN: the differential form df as a string - but with unsorted coefficients
|
|
777
|
+
NOTE: - this is only used to print generators
|
|
778
|
+
- the procedure replaces the 'D' from the variables of the differential algebra
|
|
779
|
+
by an 'd'
|
|
780
|
+
KEYWORDS: string; print; generators
|
|
781
|
+
SEE ALSO: difformToString"
|
|
782
|
+
{
|
|
783
|
+
setring Omega_R;
|
|
784
|
+
string df_out_un = string(df.form);
|
|
785
|
+
list vars_ = ringlist(Omega_R)[2];
|
|
786
|
+
int n = size(vars_) div 2;
|
|
787
|
+
int i,j;
|
|
788
|
+
|
|
789
|
+
// Replace the Dx_i in the string with the dx_i
|
|
790
|
+
for(i = 1; i <= n; i++)
|
|
791
|
+
{
|
|
792
|
+
j = find(df_out_un,string(vars_[i]));
|
|
793
|
+
|
|
794
|
+
while(j!=0)
|
|
795
|
+
{
|
|
796
|
+
df_out_un[j] = "d";
|
|
797
|
+
j = find(df_out_un,vars_[i]);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
return(df_out_un);
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
804
|
+
|
|
805
|
+
// TODO: check optionIsSet("qringNF") - ADD ring.lib !!! and reduce by hand
|
|
806
|
+
proc difformToString(difform df, list #)
|
|
807
|
+
"USAGE: difformToString(df,#); df difform,# list
|
|
808
|
+
RETURN: df as a string, sorted by a given ordering on the generators (standard: the ordering chosen for the differential algebra)
|
|
809
|
+
REMARKS: The differential form is decomposed via difformCoef, the coefficient list is sorted
|
|
810
|
+
and then the string is built as concatenation of coefficients and generators
|
|
811
|
+
NOTE: to get a string, respecting a certain monomial ordering on the generators, use:
|
|
812
|
+
- #[1] = 'gen'
|
|
813
|
+
- #[2]: a monomial ordering as string
|
|
814
|
+
- #[3]: an optional weight vector
|
|
815
|
+
KEYWORDS: string; print
|
|
816
|
+
SEE ALSO: difformPrint, difformGenToString
|
|
817
|
+
EXAMPLE: example difformToString; shows an example"
|
|
818
|
+
{
|
|
819
|
+
// Get the coefficients
|
|
820
|
+
list repr = difformCoef(df);
|
|
821
|
+
|
|
822
|
+
// Get the optional ordering on the generators
|
|
823
|
+
string gen_ord = "";
|
|
824
|
+
int n = size(#);
|
|
825
|
+
int i;
|
|
826
|
+
|
|
827
|
+
for(i = 1; i <= n; i++)
|
|
828
|
+
{
|
|
829
|
+
if(typeof(#[i]) == "string")
|
|
830
|
+
{
|
|
831
|
+
if(#[i] == "gen" && typeof(#[i+1]) == "string")
|
|
832
|
+
{
|
|
833
|
+
gen_ord = #[i+1];
|
|
834
|
+
if(typeof(#[i+2]) == "intvec")
|
|
835
|
+
{
|
|
836
|
+
intvec gen_weight = #[i+2];
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
// Sort the generator/coefficients by the chosen ordering
|
|
843
|
+
if(gen_ord != "")
|
|
844
|
+
{
|
|
845
|
+
if(defined(gen_weight))
|
|
846
|
+
{
|
|
847
|
+
repr = difformListSort(repr,"Llist","gen",gen_ord,gen_weight);
|
|
848
|
+
}
|
|
849
|
+
else
|
|
850
|
+
{
|
|
851
|
+
repr = difformListSort(repr,"Llist","gen",gen_ord);
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
else
|
|
855
|
+
{
|
|
856
|
+
repr = difformListSort(repr,"Llist");
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
// Build the string
|
|
860
|
+
n = size(repr);
|
|
861
|
+
string df_out;
|
|
862
|
+
|
|
863
|
+
difform df_gen;
|
|
864
|
+
string df_gen_str;
|
|
865
|
+
poly df_coef;
|
|
866
|
+
string df_coef_str;
|
|
867
|
+
|
|
868
|
+
for(i = n; i >= 1; i--)
|
|
869
|
+
{
|
|
870
|
+
df_gen = repr[i][1];
|
|
871
|
+
df_gen_str = difformGenToString(df_gen);
|
|
872
|
+
df_coef = repr[i][2];
|
|
873
|
+
df_coef_str = string(df_coef);
|
|
874
|
+
|
|
875
|
+
// Check the coefficients and generators
|
|
876
|
+
while(1)
|
|
877
|
+
{
|
|
878
|
+
// Special cases without brackets:
|
|
879
|
+
|
|
880
|
+
// Generator one
|
|
881
|
+
if(df_gen_str == "1"){df_out = df_out + df_coef_str; break;}
|
|
882
|
+
|
|
883
|
+
// Generator not one - coefficient is one
|
|
884
|
+
if(df_gen_str != "1" && df_coef == 1){df_out = df_out + df_gen_str; break;}
|
|
885
|
+
|
|
886
|
+
// Generator not one - coefficient not one - coefficient has one term - term has no sign
|
|
887
|
+
if(df_gen_str != "1" && df_coef != 1 && size(df_coef) == 1 && df_coef_str[1] != "-"){df_out = df_out + df_coef_str + "*" + df_gen_str; break;}
|
|
888
|
+
|
|
889
|
+
// Case, where brackets are needed:
|
|
890
|
+
df_out = df_out + "(" + df_coef_str + ")*" + df_gen_str; break;
|
|
891
|
+
}
|
|
892
|
+
|
|
893
|
+
// Add a plus sign
|
|
894
|
+
if(i > 1)
|
|
895
|
+
{
|
|
896
|
+
df_out = df_out + "+";
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
return(df_out);
|
|
901
|
+
}
|
|
902
|
+
example
|
|
903
|
+
{
|
|
904
|
+
"EXAMPLE:"; echo = 2;
|
|
905
|
+
ring R = 0,(x,y,z,a,b),ds;
|
|
906
|
+
diffAlgebra();
|
|
907
|
+
|
|
908
|
+
difform df = 3*x*dx -2*db + 24*a*dy - y*dx*dy*db + 12*dx*dy*dz - dz*dy*da*db + 3 + 12*x*dx - 1/77*da*dx;
|
|
909
|
+
|
|
910
|
+
//////////////////////////////////////////////////////////////////////////////////
|
|
911
|
+
// String sorted with respect to the monomial order on the differential algebra //
|
|
912
|
+
//////////////////////////////////////////////////////////////////////////////////
|
|
913
|
+
string df_str = difformToString(df);
|
|
914
|
+
print(df_str);
|
|
915
|
+
|
|
916
|
+
/////////////////////////////////////////////////////////
|
|
917
|
+
// String sorted with respect to the weighted order wp //
|
|
918
|
+
/////////////////////////////////////////////////////////
|
|
919
|
+
df_str = difformToString(df,"gen","wp",intvec(-1,-1,-1,1,1));
|
|
920
|
+
print(df_str);
|
|
921
|
+
|
|
922
|
+
kill Omega_R,df,df_str,dx,dy,dz,da,db;
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
927
|
+
|
|
928
|
+
|
|
929
|
+
proc difformPrint(difform df)
|
|
930
|
+
"USAGE: df; df difform
|
|
931
|
+
SIDE EFFECTS: prints the differential form
|
|
932
|
+
REMARKS: Uses the procedure difformToString with a ds-ordering on the generators
|
|
933
|
+
KEYWORDS: print; string
|
|
934
|
+
SEE ALSO: difformToString, difformGenToString
|
|
935
|
+
EXAMPLE: example difformPrint; shows an example"
|
|
936
|
+
{
|
|
937
|
+
// Print in ds-order on the generators
|
|
938
|
+
print(difformToString(df,"gen","ds"));
|
|
939
|
+
}
|
|
940
|
+
example
|
|
941
|
+
{
|
|
942
|
+
"EXAMPLE:"; echo = 2;
|
|
943
|
+
ring R = 0,(x,y,z),ds;
|
|
944
|
+
diffAlgebra();
|
|
945
|
+
|
|
946
|
+
//////////////////////////
|
|
947
|
+
// Application of Print //
|
|
948
|
+
//////////////////////////
|
|
949
|
+
|
|
950
|
+
difform df = 3*x*dx - y*dx*dy + 12*dx*dy*dz - dz*dy + 3 + 12*x*dx;
|
|
951
|
+
df;
|
|
952
|
+
|
|
953
|
+
kill Omega_R,df,dx,dy,dz;
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
proc difformIsGen(difform df)
|
|
961
|
+
"USAGE: difformIsGen(df); df difform
|
|
962
|
+
RETURN: 1, if df is a generator of the differential algebra - 0, otherwise
|
|
963
|
+
REMARKS: Uses the procedure difformCoef and tests for a single coefficient which is one
|
|
964
|
+
KEYWORDS: generator
|
|
965
|
+
SEE ALSO: difformCoef
|
|
966
|
+
EXAMPLE: example difformIsGen; shows an example
|
|
967
|
+
"
|
|
968
|
+
{
|
|
969
|
+
list df_gen_repr = difformCoef(df);
|
|
970
|
+
int n = size(df_gen_repr);
|
|
971
|
+
|
|
972
|
+
if(n == 1 && df_gen_repr[1][2] == 1)
|
|
973
|
+
{
|
|
974
|
+
return(1);
|
|
975
|
+
}
|
|
976
|
+
return(0);
|
|
977
|
+
}
|
|
978
|
+
example
|
|
979
|
+
{
|
|
980
|
+
"EXAMPLE:"; echo = 2;
|
|
981
|
+
ring R = 0,(x,y,z,a,b,c),lp;
|
|
982
|
+
diffAlgebra();
|
|
983
|
+
|
|
984
|
+
////////////////
|
|
985
|
+
// Generators //
|
|
986
|
+
////////////////
|
|
987
|
+
difformIsGen(1);
|
|
988
|
+
difformIsGen(dx);
|
|
989
|
+
difformIsGen(da*dc);
|
|
990
|
+
difformIsGen(dy*da*db);
|
|
991
|
+
difformIsGen(-da*dz);
|
|
992
|
+
|
|
993
|
+
///////////////////
|
|
994
|
+
// No generators //
|
|
995
|
+
///////////////////
|
|
996
|
+
difformIsGen(-1);
|
|
997
|
+
difformIsGen(-dx);
|
|
998
|
+
difformIsGen(dc*da);
|
|
999
|
+
difformIsGen(dy*db*da);
|
|
1000
|
+
difformIsGen(dx*dz*dy);
|
|
1001
|
+
|
|
1002
|
+
kill Omega_R,dx,dy,dz,da,db,dc;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1007
|
+
//------------------------------ Basic computational procedures ------------------------------//
|
|
1008
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
// TODO: update example
|
|
1012
|
+
proc difformAdd(difform df, difform dg)
|
|
1013
|
+
"USAGE: df+dg; df,dg difform
|
|
1014
|
+
RETURN: the sum of the differential forms as differential form
|
|
1015
|
+
KEYWORDS: add; sum
|
|
1016
|
+
SEE ALSO: difformSub
|
|
1017
|
+
EXAMPLE: example difformAdd; shows an example"
|
|
1018
|
+
{
|
|
1019
|
+
setring Omega_R;
|
|
1020
|
+
|
|
1021
|
+
difform dsum;
|
|
1022
|
+
poly sum_form = df.form + dg.form;
|
|
1023
|
+
dsum.form = sum_form;
|
|
1024
|
+
|
|
1025
|
+
return(dsum);
|
|
1026
|
+
|
|
1027
|
+
}
|
|
1028
|
+
example
|
|
1029
|
+
{
|
|
1030
|
+
"EXAMPLE:"; echo = 2;
|
|
1031
|
+
ring R = 0,(x,y,z),ds;
|
|
1032
|
+
diffAlgebra();
|
|
1033
|
+
|
|
1034
|
+
////////////////////////////////////
|
|
1035
|
+
// Addition of differential forms //
|
|
1036
|
+
////////////////////////////////////
|
|
1037
|
+
|
|
1038
|
+
difform df = dx + 4*dy - dz*dx + 4 + 3*dx*dy + 4*dz;
|
|
1039
|
+
difform dg = dx + dy + 27*dz*dy;
|
|
1040
|
+
df+dg;
|
|
1041
|
+
|
|
1042
|
+
////////////////////////////////////////////////////
|
|
1043
|
+
// Addition of polynomials and differential forms //
|
|
1044
|
+
////////////////////////////////////////////////////
|
|
1045
|
+
|
|
1046
|
+
df + x2y2z2;
|
|
1047
|
+
12 + dg;
|
|
1048
|
+
|
|
1049
|
+
kill Omega_R,df,dg,dx,dy,dz;
|
|
1050
|
+
}
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1054
|
+
|
|
1055
|
+
|
|
1056
|
+
proc difformSub(difform df, difform dg)
|
|
1057
|
+
"USAGE: df-dg; df,dg difform
|
|
1058
|
+
RETURN: the difference of the differential forms as differential form
|
|
1059
|
+
KEYWORDS: minus; difference
|
|
1060
|
+
SEE ALSO: difformAdd, difformNeg
|
|
1061
|
+
EXAMPLE: example difformSub; shows an example"
|
|
1062
|
+
{
|
|
1063
|
+
setring Omega_R;
|
|
1064
|
+
|
|
1065
|
+
difform dsub;
|
|
1066
|
+
poly sub_form = df.form - dg.form;
|
|
1067
|
+
dsub.form = sub_form;
|
|
1068
|
+
|
|
1069
|
+
return(dsub);
|
|
1070
|
+
}
|
|
1071
|
+
example
|
|
1072
|
+
{
|
|
1073
|
+
"EXAMPLE:"; echo = 2;
|
|
1074
|
+
ring R = 0,(x,y,z),ds;
|
|
1075
|
+
diffAlgebra();
|
|
1076
|
+
|
|
1077
|
+
///////////////////////////////////////
|
|
1078
|
+
// Subtraction of differential forms //
|
|
1079
|
+
///////////////////////////////////////
|
|
1080
|
+
|
|
1081
|
+
difform df = 5*dx*x2 - 7*dy*z - 2x2*dz - 3;
|
|
1082
|
+
difform dg = dx - 8x*dz*dy;
|
|
1083
|
+
df-dg;
|
|
1084
|
+
|
|
1085
|
+
///////////////////////////////////////////////////////
|
|
1086
|
+
// Subtraction of polynomials and differential forms //
|
|
1087
|
+
///////////////////////////////////////////////////////
|
|
1088
|
+
|
|
1089
|
+
df - 2x3;
|
|
1090
|
+
1 - dg;
|
|
1091
|
+
|
|
1092
|
+
kill Omega_R,df,dg,dx,dy,dz;
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
proc difformNeg(difform df)
|
|
1100
|
+
"USAGE: -df; df difform
|
|
1101
|
+
RETURN: the negation of the differential form
|
|
1102
|
+
KEYWORDS: minus; negation
|
|
1103
|
+
SEE ALSO: difformSub
|
|
1104
|
+
EXAMPLE: example difformNeg; shows an example"
|
|
1105
|
+
{
|
|
1106
|
+
setring Omega_R;
|
|
1107
|
+
|
|
1108
|
+
difform dneg;
|
|
1109
|
+
poly neg_form = -df.form;
|
|
1110
|
+
dneg.form = neg_form;
|
|
1111
|
+
|
|
1112
|
+
return(dneg);
|
|
1113
|
+
}
|
|
1114
|
+
example
|
|
1115
|
+
{
|
|
1116
|
+
"EXAMPLE:"; echo = 2;
|
|
1117
|
+
ring R = 0,(x,y,z),ds;
|
|
1118
|
+
diffAlgebra();
|
|
1119
|
+
|
|
1120
|
+
/////////////////////////////////////
|
|
1121
|
+
// Negation of a differential form //
|
|
1122
|
+
/////////////////////////////////////
|
|
1123
|
+
|
|
1124
|
+
difform df = 13*dx*dy + 2*dy*dz - 6*dx*dy*dz - 3;
|
|
1125
|
+
-df;
|
|
1126
|
+
|
|
1127
|
+
kill Omega_R,df,dx,dy,dz;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1130
|
+
|
|
1131
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1132
|
+
|
|
1133
|
+
|
|
1134
|
+
proc difformMul(difform df, difform dg)
|
|
1135
|
+
"USAGE: df*dg; df,dg difform
|
|
1136
|
+
RETURN: the product of the differential forms as differential form
|
|
1137
|
+
KEYWORDS: multiplication; product
|
|
1138
|
+
SEE ALSO: difformDiv
|
|
1139
|
+
EXAMPLE: example difformMul; shows an example"
|
|
1140
|
+
{
|
|
1141
|
+
setring Omega_R;
|
|
1142
|
+
|
|
1143
|
+
difform dmul;
|
|
1144
|
+
poly mul_form = df.form*dg.form;
|
|
1145
|
+
dmul.form = mul_form;
|
|
1146
|
+
|
|
1147
|
+
return(dmul);
|
|
1148
|
+
}
|
|
1149
|
+
example
|
|
1150
|
+
{
|
|
1151
|
+
"EXAMPLE:"; echo = 2;
|
|
1152
|
+
ring R = 0,(x,y,z),ds;
|
|
1153
|
+
diffAlgebra();
|
|
1154
|
+
|
|
1155
|
+
//////////////////////////////////////////
|
|
1156
|
+
// Multiplication of differential forms //
|
|
1157
|
+
//////////////////////////////////////////
|
|
1158
|
+
|
|
1159
|
+
difform df = 13*dx*dy - 7*dy*dz - 6*dx*dy*dz;
|
|
1160
|
+
difform dg = dx - 8x;
|
|
1161
|
+
df*dg;
|
|
1162
|
+
|
|
1163
|
+
/////////////////////////////////////////////////////////
|
|
1164
|
+
// Multiplication of polynomials and differential forms //
|
|
1165
|
+
/////////////////////////////////////////////////////////
|
|
1166
|
+
|
|
1167
|
+
df*(y2-x);
|
|
1168
|
+
12*dg;
|
|
1169
|
+
|
|
1170
|
+
kill Omega_R,df,dg,dx,dy,dz;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
|
|
1174
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
proc difformDiv(difform df, difform dg)
|
|
1178
|
+
"USAGE: df/dg; df,dg difform
|
|
1179
|
+
RETURN: the quotient df/dg as differential form
|
|
1180
|
+
KEYWORDS: division
|
|
1181
|
+
SEE ALSO: difformMul
|
|
1182
|
+
EXAMPLE: example difformDiv; shows an example"
|
|
1183
|
+
{
|
|
1184
|
+
setring Omega_R;
|
|
1185
|
+
|
|
1186
|
+
difform ddiv;
|
|
1187
|
+
poly div_form = df.form / dg.form;
|
|
1188
|
+
ddiv.form = div_form;
|
|
1189
|
+
|
|
1190
|
+
return(ddiv);
|
|
1191
|
+
}
|
|
1192
|
+
example
|
|
1193
|
+
{
|
|
1194
|
+
"EXAMPLE:"; echo = 2;
|
|
1195
|
+
ring R = 0,(x,y,z),lp;
|
|
1196
|
+
diffAlgebra();
|
|
1197
|
+
|
|
1198
|
+
/////////////////////////////////
|
|
1199
|
+
// Divisions without remainder //
|
|
1200
|
+
/////////////////////////////////
|
|
1201
|
+
|
|
1202
|
+
dx / dx;
|
|
1203
|
+
dx*dy*dz / dz;
|
|
1204
|
+
(dx*x2 - yx2) / x2;
|
|
1205
|
+
|
|
1206
|
+
//////////////////////////////
|
|
1207
|
+
// Divisions with reaminder //
|
|
1208
|
+
//////////////////////////////
|
|
1209
|
+
|
|
1210
|
+
(dx + dx*dy + 1) / dx;
|
|
1211
|
+
(x2*dx - x*dy) / (dx-dy);
|
|
1212
|
+
|
|
1213
|
+
kill Omega_R,dx,dy,dz;
|
|
1214
|
+
}
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1218
|
+
|
|
1219
|
+
|
|
1220
|
+
proc difformEqu(difform df, difform dg)
|
|
1221
|
+
"USAGE: df == dg; df,dg difform
|
|
1222
|
+
RETURN: 1, if df and dg are euqal - 0, otherwise
|
|
1223
|
+
KEYWORDS: compare; equal
|
|
1224
|
+
SEE ALSO: difformNeq
|
|
1225
|
+
EXAMPLE: example difformEqu; shows an example"
|
|
1226
|
+
{
|
|
1227
|
+
setring Omega_R;
|
|
1228
|
+
return(df.form == dg.form);
|
|
1229
|
+
}
|
|
1230
|
+
example
|
|
1231
|
+
{
|
|
1232
|
+
"EXAMPLE:"; echo = 2;
|
|
1233
|
+
ring R = 0,(x,y,z),ds;
|
|
1234
|
+
diffAlgebra();
|
|
1235
|
+
|
|
1236
|
+
/////////////////////////////////////////
|
|
1237
|
+
// Applications of comparison operator //
|
|
1238
|
+
/////////////////////////////////////////
|
|
1239
|
+
|
|
1240
|
+
difform df = 3*dx - x8*dx*dy;
|
|
1241
|
+
difform dg = 3 + x8*dy;
|
|
1242
|
+
df == dg;
|
|
1243
|
+
|
|
1244
|
+
dg = dg*dx;
|
|
1245
|
+
df == dg;
|
|
1246
|
+
|
|
1247
|
+
kill Omega_R,df,dg,dx,dy,dz;
|
|
1248
|
+
}
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
proc difformNeq(difform df, difform dg)
|
|
1255
|
+
"USAGE: df != dg; df,dg difform
|
|
1256
|
+
RETURN: 0, if df and dg are euqal - 1, otherwise
|
|
1257
|
+
KEYWORDS: compare; equal; not equal
|
|
1258
|
+
SEE ALSO: difformEqu
|
|
1259
|
+
EXAMPLE: example difformNeq; shows an example"
|
|
1260
|
+
{
|
|
1261
|
+
return(!difformEqu(df,dg));
|
|
1262
|
+
}
|
|
1263
|
+
example
|
|
1264
|
+
{
|
|
1265
|
+
"EXAMPLE:"; echo = 2;
|
|
1266
|
+
ring R = 0,(x,y,z),ds;
|
|
1267
|
+
diffAlgebra();
|
|
1268
|
+
|
|
1269
|
+
/////////////////////////////////////////////////
|
|
1270
|
+
// Applications of negated comparison operator //
|
|
1271
|
+
/////////////////////////////////////////////////
|
|
1272
|
+
|
|
1273
|
+
difform df = 3*dx - x8*dx*dy;
|
|
1274
|
+
difform dg = 3 + x8*dy;
|
|
1275
|
+
df != dg;
|
|
1276
|
+
|
|
1277
|
+
dg = dg*dx;
|
|
1278
|
+
df != dg;
|
|
1279
|
+
|
|
1280
|
+
kill Omega_R,df,dg,dx,dy,dz;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
1285
|
+
|
|
1286
|
+
|
|
1287
|
+
proc difformIsBigger(difform df, difform dg, list #)
|
|
1288
|
+
"USAGE: df > dg OR difformIsBigger(df,dg,#); df,dg difform, # list
|
|
1289
|
+
RETURN: - 1, if df is bigger than dg with respect to the monomial ordering in the differential algebra - 0, otherwise
|
|
1290
|
+
- 1, if df is bigger than dg with respect to a given monomial ordering on the generators/ringvariables - 0, otherwise
|
|
1291
|
+
NOTE: the procedure uses diffAlgebraChangeOrd to change the order on the differential algebra, therefore
|
|
1292
|
+
an ordering is defined via the following pattern:
|
|
1293
|
+
- #[i] = 'gen' defines the ordering on the generators dx_i
|
|
1294
|
+
- #[i+1] must then be a valid monomial ordering as string
|
|
1295
|
+
- #[i+2] an optional weight vector
|
|
1296
|
+
- #[i] = 'ringvar' defines the ordering on the ringvariables
|
|
1297
|
+
- #[i+1] must then be a valid monomial ordering as string
|
|
1298
|
+
- #[i+2] an optional weight vector
|
|
1299
|
+
KEYWORDS: bigger; compare; ordering
|
|
1300
|
+
SEE ALSO: difformIsSmaller, diffAlgebraChangeOrd
|
|
1301
|
+
EXAMPLE: example difformIsBigger; shows an example"
|
|
1302
|
+
{
|
|
1303
|
+
setring Omega_R;
|
|
1304
|
+
|
|
1305
|
+
poly df_form = df.form;
|
|
1306
|
+
poly dg_form = dg.form;
|
|
1307
|
+
|
|
1308
|
+
if(size(#) > 0)
|
|
1309
|
+
{
|
|
1310
|
+
def diff_Alg = Omega_R;
|
|
1311
|
+
ring T = diffAlgebraChangeOrd(#);
|
|
1312
|
+
|
|
1313
|
+
poly df_form_T = imap(diff_Alg,df_form);
|
|
1314
|
+
poly dg_form_T = imap(diff_Alg,dg_form);
|
|
1315
|
+
return(df_form_T > dg_form_T);
|
|
1316
|
+
}
|
|
1317
|
+
|
|
1318
|
+
return(df_form > dg_form);
|
|
1319
|
+
}
|
|
1320
|
+
example
|
|
1321
|
+
{
|
|
1322
|
+
"EXAMPLE:"; echo = 2;
|
|
1323
|
+
ring R = 0,(x,y,z),dp;
|
|
1324
|
+
diffAlgebra();
|
|
1325
|
+
|
|
1326
|
+
////////////////////////////
|
|
1327
|
+
// With standard ordering //
|
|
1328
|
+
////////////////////////////
|
|
1329
|
+
dx > dy;
|
|
1330
|
+
x37*dy > dz;
|
|
1331
|
+
x*dz > y*x*dy;
|
|
1332
|
+
x3*dx - y*dx*dz > dx*dy*dz;
|
|
1333
|
+
|
|
1334
|
+
///////////////////////////
|
|
1335
|
+
// With changed ordering //
|
|
1336
|
+
///////////////////////////
|
|
1337
|
+
difformIsBigger(dx,dy,"gen","ls");
|
|
1338
|
+
difformIsBigger(x37*dy,dz,"gen","wp",intvec(1,-1,1));
|
|
1339
|
+
difformIsBigger(x*dz,y*x*dy,"gen","wp",intvec(1,-1,1),"ringvar","wp",intvec(1,-1,1));
|
|
1340
|
+
difformIsBigger(x3*dx - y*dx*dz,dx*dy*dz,"gen","wp",intvec(-1,-1,1));
|
|
1341
|
+
|
|
1342
|
+
kill Omega_R,dx,dy,dz;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
|
|
1346
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
proc difformIsSmaller(difform df, difform dg, list #)
|
|
1350
|
+
"USAGE: df < dg OR difformIsSmaller(df,dg,#); df,dg difform, # list
|
|
1351
|
+
RETURN: - 1, if df is smaller than dg with respect to the monomial ordering in the differential algebra - 0, otherwise
|
|
1352
|
+
- 1, if df is smaller than dg with respect to a given monomial ordering on the generators/ringvariables - 0, otherwise
|
|
1353
|
+
NOTE: the procedure uses diffAlgebraChangeOrd to change the order on the differential algebra, therefore
|
|
1354
|
+
an ordering is defined via the following pattern:
|
|
1355
|
+
- #[i] = 'gen' defines the ordering on the generators dx_i
|
|
1356
|
+
- #[i+1] must then be a valid monomial ordering as string
|
|
1357
|
+
- #[i+2] an optional weight vector
|
|
1358
|
+
- #[i] = 'ringvar' defines the ordering on the ringvariables
|
|
1359
|
+
- #[i+1] must then be a valid monomial ordering as string
|
|
1360
|
+
- #[i+2] an optional weight vector
|
|
1361
|
+
KEYWORDS: smaller; compare; ordering
|
|
1362
|
+
SEE ALSO: difformIsBigger, diffAlgebraChangeOrd
|
|
1363
|
+
EXAMPLE: example difformIsSmaller; shows an example"
|
|
1364
|
+
{
|
|
1365
|
+
setring Omega_R;
|
|
1366
|
+
|
|
1367
|
+
poly df_form = df.form;
|
|
1368
|
+
poly dg_form = dg.form;
|
|
1369
|
+
|
|
1370
|
+
if(size(#) > 0)
|
|
1371
|
+
{
|
|
1372
|
+
def diff_Alg = basering;
|
|
1373
|
+
ring T = diffAlgebraChangeOrd(#);
|
|
1374
|
+
|
|
1375
|
+
poly df_form_T = imap(diff_Alg,df_form);
|
|
1376
|
+
poly dg_form_T = imap(diff_Alg,dg_form);
|
|
1377
|
+
return(df_form_T < dg_form_T);
|
|
1378
|
+
}
|
|
1379
|
+
return(df.form < dg.form);
|
|
1380
|
+
}
|
|
1381
|
+
example
|
|
1382
|
+
{
|
|
1383
|
+
"EXAMPLE:"; echo = 2;
|
|
1384
|
+
ring R = 0,(x,y,z),lp;
|
|
1385
|
+
diffAlgebra();
|
|
1386
|
+
|
|
1387
|
+
////////////////////////////
|
|
1388
|
+
// With standard ordering //
|
|
1389
|
+
////////////////////////////
|
|
1390
|
+
dz < dy;
|
|
1391
|
+
x*dz < y*dz;
|
|
1392
|
+
y2*z2*dy < x;
|
|
1393
|
+
dx*dz < dy;
|
|
1394
|
+
|
|
1395
|
+
///////////////////////////
|
|
1396
|
+
// With changed ordering //
|
|
1397
|
+
///////////////////////////
|
|
1398
|
+
difformIsSmaller(dz,dy,"gen","ls");
|
|
1399
|
+
difformIsSmaller(x*dz,y*dz,"ringvar","ls");
|
|
1400
|
+
difformIsSmaller(y2*z2*dy,x,"gen","wp",intvec(1,-1,1));
|
|
1401
|
+
difformIsSmaller(dx*dz,dy,"gen","ws",intvec(1,-1,-1));
|
|
1402
|
+
|
|
1403
|
+
kill Omega_R,dx,dy,dz;
|
|
1404
|
+
}
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1408
|
+
//------------ Procedures for computing with the degree ----------------------//
|
|
1409
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
proc difformDeg(difform df)
|
|
1413
|
+
"USAGE: deg(df); df difform
|
|
1414
|
+
RETURN: degree of df - degree of the highest generator, -1 if df = 0
|
|
1415
|
+
NOTE: - the procedure does not check if df is homogeneous
|
|
1416
|
+
- be careful: difformDeg does not cast polynomials to differential
|
|
1417
|
+
forms. So before applying to a polynomial, a type cast should be done
|
|
1418
|
+
KEYWORDS: degree
|
|
1419
|
+
SEE ALSO: difformIsHomog, difformIsHomogDeg
|
|
1420
|
+
EXAMPLE: example difformDeg; shows an example"
|
|
1421
|
+
{
|
|
1422
|
+
setring Omega_R;
|
|
1423
|
+
|
|
1424
|
+
// Degree of a difform is the degree of the poly with weights 0 for the basering variables
|
|
1425
|
+
int n = nvars(Omega_R) div 2;
|
|
1426
|
+
int i;
|
|
1427
|
+
intvec var_weights;
|
|
1428
|
+
|
|
1429
|
+
for(i = 1; i <= n; i++)
|
|
1430
|
+
{
|
|
1431
|
+
var_weights[i] = 1;
|
|
1432
|
+
var_weights[i+n] = 0;
|
|
1433
|
+
}
|
|
1434
|
+
return(deg(df.form,var_weights));
|
|
1435
|
+
}
|
|
1436
|
+
example
|
|
1437
|
+
{
|
|
1438
|
+
"EXAMPLE:"; echo = 2;
|
|
1439
|
+
ring R = 0,(x,y,z),ds;
|
|
1440
|
+
diffAlgebra();
|
|
1441
|
+
|
|
1442
|
+
/////////////////////////
|
|
1443
|
+
// Degree computations //
|
|
1444
|
+
/////////////////////////
|
|
1445
|
+
|
|
1446
|
+
deg(3*dx - x8*dx*dy);
|
|
1447
|
+
deg(3 + x8*dy);
|
|
1448
|
+
|
|
1449
|
+
// When applying homog to a polynomial which is considered
|
|
1450
|
+
// as a differential form, a type cast has to be done first
|
|
1451
|
+
|
|
1452
|
+
deg(x2-y);
|
|
1453
|
+
difform df = x2-y;
|
|
1454
|
+
deg(df);
|
|
1455
|
+
|
|
1456
|
+
kill Omega_R,df,dx,dy,dz;
|
|
1457
|
+
}
|
|
1458
|
+
|
|
1459
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
proc difformIsHomog(difform df)
|
|
1463
|
+
"USAGE: homog(df); df difform
|
|
1464
|
+
RETURN: 1, if df is homogeneous - 0, otherwise
|
|
1465
|
+
NOTE: - the form 0 is homogeneous
|
|
1466
|
+
- be careful: difformIsHomog does not cast polynomials to differential
|
|
1467
|
+
forms. So before applying to a polynomial, a type cast should be done
|
|
1468
|
+
KEYWORDS: homogeneous; homog
|
|
1469
|
+
SEE ALSO: difformDeg, difformIsHomogDeg
|
|
1470
|
+
EXAMPLE: example difformIsHomog; shows an example"
|
|
1471
|
+
{
|
|
1472
|
+
setring Omega_R;
|
|
1473
|
+
|
|
1474
|
+
int n = nvars(Omega_R) div 2;
|
|
1475
|
+
int i;
|
|
1476
|
+
intvec var_weights;
|
|
1477
|
+
|
|
1478
|
+
for(i = 1; i <= n; i++)
|
|
1479
|
+
{
|
|
1480
|
+
var_weights[i] = 1;
|
|
1481
|
+
var_weights[i+n] = 0;
|
|
1482
|
+
}
|
|
1483
|
+
return(homog(df.form,var_weights));
|
|
1484
|
+
}
|
|
1485
|
+
example
|
|
1486
|
+
{
|
|
1487
|
+
"EXAMPLE:"; echo = 2;
|
|
1488
|
+
ring R = 0,(x,y,z),ds;
|
|
1489
|
+
diffAlgebra();
|
|
1490
|
+
|
|
1491
|
+
/////////////////
|
|
1492
|
+
// Homogeneous //
|
|
1493
|
+
/////////////////
|
|
1494
|
+
|
|
1495
|
+
homog(3*dx*dz - x8*dx*dy);
|
|
1496
|
+
homog(12x*dx + dy - (y4-y5)*dz);
|
|
1497
|
+
|
|
1498
|
+
/////////////////////
|
|
1499
|
+
// Not homogeneous //
|
|
1500
|
+
/////////////////////
|
|
1501
|
+
|
|
1502
|
+
homog(3 + x8*dy);
|
|
1503
|
+
homog(x*dx+dy*dx);
|
|
1504
|
+
|
|
1505
|
+
// When applying homog to a polynomial which is considered
|
|
1506
|
+
// as a differential form, a type cast has to be done first
|
|
1507
|
+
|
|
1508
|
+
homog(3x-y2);
|
|
1509
|
+
difform df = 3x-y2;
|
|
1510
|
+
homog(df);
|
|
1511
|
+
|
|
1512
|
+
kill Omega_R,dx,dy,dz,df;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
|
|
1516
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1517
|
+
|
|
1518
|
+
|
|
1519
|
+
proc difformIsHomogDeg(difform df, int p)
|
|
1520
|
+
"USAGE: difformIsHomogDeg(df,p); df difform, p int
|
|
1521
|
+
RETURN: 1, if df is homogeneous of degree p - 0, otherwise
|
|
1522
|
+
NOTE: - 0 is homogeneous of degree -1
|
|
1523
|
+
KEYWORDS: homogeneous; degree
|
|
1524
|
+
SEE ALSO: difformDeg, difformIsHomog
|
|
1525
|
+
EXAMPLE: example difformIsHomogDeg; shows an example"
|
|
1526
|
+
{
|
|
1527
|
+
int df_deg = difformDeg(df);
|
|
1528
|
+
int is_hom = difformIsHomog(df);
|
|
1529
|
+
return(df_deg == p && is_hom == 1);
|
|
1530
|
+
}
|
|
1531
|
+
example
|
|
1532
|
+
{
|
|
1533
|
+
"EXAMPLE:"; echo = 2;
|
|
1534
|
+
ring R = 0,(x,y,z),ds;
|
|
1535
|
+
diffAlgebra();
|
|
1536
|
+
|
|
1537
|
+
difform df = 3*dx*dz - x8*dx*dy;
|
|
1538
|
+
difform dg = 3 + x8*dy;
|
|
1539
|
+
difform dh = 2;
|
|
1540
|
+
difform dt = 0;
|
|
1541
|
+
|
|
1542
|
+
/////////////////////////////////
|
|
1543
|
+
// Homogeneous of given degree //
|
|
1544
|
+
/////////////////////////////////
|
|
1545
|
+
|
|
1546
|
+
difformIsHomogDeg(df,2);
|
|
1547
|
+
difformIsHomogDeg(dh,0);
|
|
1548
|
+
difformIsHomogDeg(dt,-1);
|
|
1549
|
+
|
|
1550
|
+
/////////////////////////////////////
|
|
1551
|
+
// Not homogeneous of given degree //
|
|
1552
|
+
/////////////////////////////////////
|
|
1553
|
+
|
|
1554
|
+
difformIsHomogDeg(df,1);
|
|
1555
|
+
difformIsHomogDeg(dg,1);
|
|
1556
|
+
difformIsHomogDeg(dh,1);
|
|
1557
|
+
|
|
1558
|
+
kill Omega_R,df,dg,dh,dt,dx,dy,dz;
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1561
|
+
|
|
1562
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1563
|
+
|
|
1564
|
+
|
|
1565
|
+
proc difformHomogDecomp(difform df)
|
|
1566
|
+
"USAGE: difformHomogDecomp(df); df difform
|
|
1567
|
+
RETURN: list of differential forms: homogeneous decomposition
|
|
1568
|
+
NOTE: the output list always has as length the maximal possible degree plus one and the
|
|
1569
|
+
degree-0 part is the last element in the list
|
|
1570
|
+
KEYWORDS: homogeneous; homogeneous decomposition
|
|
1571
|
+
SEE ALSO: difformCoef, difformDeg
|
|
1572
|
+
EXAMPLE: example difformHomogDecomp; shows an example"
|
|
1573
|
+
{
|
|
1574
|
+
// Highest degree is the nr. of variables in the basering
|
|
1575
|
+
int n = nvars(basering);
|
|
1576
|
+
int i,j,k;
|
|
1577
|
+
difform current_gen;
|
|
1578
|
+
poly current_coef;
|
|
1579
|
+
list homog_part;
|
|
1580
|
+
|
|
1581
|
+
// Generate a list full of 0s
|
|
1582
|
+
for(i = 1;i <= (n+1); i++)
|
|
1583
|
+
{
|
|
1584
|
+
homog_part[i] = 0;
|
|
1585
|
+
}
|
|
1586
|
+
|
|
1587
|
+
// Get the generator-representation
|
|
1588
|
+
list df_gen_repr = difformCoef(df);
|
|
1589
|
+
k = size(df_gen_repr);
|
|
1590
|
+
|
|
1591
|
+
// Sort in list
|
|
1592
|
+
for(i = 1; i <= k; i++)
|
|
1593
|
+
{
|
|
1594
|
+
current_gen = df_gen_repr[i][1];
|
|
1595
|
+
current_coef = df_gen_repr[i][2];
|
|
1596
|
+
j = difformDeg(current_gen);
|
|
1597
|
+
|
|
1598
|
+
if(j == 0)
|
|
1599
|
+
{
|
|
1600
|
+
homog_part[n+1] = homog_part[n+1] + current_coef*current_gen;
|
|
1601
|
+
}
|
|
1602
|
+
else
|
|
1603
|
+
{
|
|
1604
|
+
homog_part[j] = homog_part[j] + current_coef*current_gen;
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
return(homog_part);
|
|
1608
|
+
}
|
|
1609
|
+
example
|
|
1610
|
+
{
|
|
1611
|
+
"EXAMPLE:"; echo = 2;
|
|
1612
|
+
ring R = 0,(x,y,z),ds;
|
|
1613
|
+
diffAlgebra();
|
|
1614
|
+
|
|
1615
|
+
difform df = 3*dx*dz - x8*dx*dy + 12 + dy*dz + dz*dx - (y4-y5)*x12*dx*dy*dz - dx - dy + dz + x2*dx*dy;
|
|
1616
|
+
|
|
1617
|
+
///////////////////////////////
|
|
1618
|
+
// Homogeneous decomposition //
|
|
1619
|
+
///////////////////////////////
|
|
1620
|
+
|
|
1621
|
+
list L = difformHomogDecomp(df);
|
|
1622
|
+
L;
|
|
1623
|
+
|
|
1624
|
+
kill Omega_R,df,L,dx,dy,dz;
|
|
1625
|
+
}
|
|
1626
|
+
|
|
1627
|
+
|
|
1628
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1629
|
+
//--------------- Procedures for lists of differential forms -----------------//
|
|
1630
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1631
|
+
|
|
1632
|
+
|
|
1633
|
+
proc difformListCont(list L, difform df)
|
|
1634
|
+
"USAGE: difformListCont(L,df); L list, df difform
|
|
1635
|
+
RETURN: 1, if df is in the list L - 0, otherwise
|
|
1636
|
+
NOTE: lists with arbitrary input are allowed
|
|
1637
|
+
KEYWORDS: containment; list
|
|
1638
|
+
SEE ALSO: difformEqu
|
|
1639
|
+
EXAMPLE: example difformListCont; shows an example"
|
|
1640
|
+
{
|
|
1641
|
+
int n = size(L);
|
|
1642
|
+
int i;
|
|
1643
|
+
|
|
1644
|
+
for(i = 1; i <= n; i++)
|
|
1645
|
+
{
|
|
1646
|
+
if(typeof(L[i]) == "difform")
|
|
1647
|
+
{
|
|
1648
|
+
if(difformEqu(df,L[i]))
|
|
1649
|
+
{
|
|
1650
|
+
return(1);
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
return(0);
|
|
1655
|
+
}
|
|
1656
|
+
example
|
|
1657
|
+
{
|
|
1658
|
+
"EXAMPLE:"; echo = 2;
|
|
1659
|
+
ring R = 17,(a,b,c),lp;
|
|
1660
|
+
diffAlgebra();
|
|
1661
|
+
|
|
1662
|
+
list L = "",3,12*a,da-db,16 + dc, 23*da - 4*db*dc*da, db - 4, "entry", dc - db*da, a;
|
|
1663
|
+
|
|
1664
|
+
//////////////////////////
|
|
1665
|
+
// Elements in the list //
|
|
1666
|
+
//////////////////////////
|
|
1667
|
+
difformListCont(L,da - db);
|
|
1668
|
+
difformListCont(L,16 + dc);
|
|
1669
|
+
difformListCont(L,dc - db*da);
|
|
1670
|
+
|
|
1671
|
+
//////////////////////////////
|
|
1672
|
+
// Elements not in the list //
|
|
1673
|
+
//////////////////////////////
|
|
1674
|
+
difformListCont(L,22*da);
|
|
1675
|
+
difformListCont(L,1);
|
|
1676
|
+
difformListCont(L,a);
|
|
1677
|
+
|
|
1678
|
+
kill Omega_R,L,da,db,dc;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
|
|
1682
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1683
|
+
|
|
1684
|
+
|
|
1685
|
+
proc difformListSort(list L, list #)
|
|
1686
|
+
"USAGE: difformListSort(L,#); L,# list
|
|
1687
|
+
RETURN: the sorted list L in ascending order, depending on the optional monomial ordering given
|
|
1688
|
+
REMARKS: Classical insertion sort is used to sort the list
|
|
1689
|
+
NOTE: - the procedure uses difformIsBigger to compare list elements, therefore
|
|
1690
|
+
an optional ordering is defined via the pattern in difformIsBigger
|
|
1691
|
+
- the standard ordering is the ordering on the differential algebra
|
|
1692
|
+
- the procedure can also handle special lists of lists by using the optional input
|
|
1693
|
+
"Dlist" or "Llist":
|
|
1694
|
+
- "Dlist" is used for lists with structure:
|
|
1695
|
+
L[1] is a list of differential forms
|
|
1696
|
+
L[2] is a list of polynomials of same size,
|
|
1697
|
+
The list gets sorted by the elements in L[1]. This is mainly used for the
|
|
1698
|
+
structure of derivations.
|
|
1699
|
+
- "Llist" allows the structure: L[i] is a list with two entries:
|
|
1700
|
+
L[i][1] is a differential form
|
|
1701
|
+
L[i][2] is a polynomial
|
|
1702
|
+
The list gets sorted by the elements L[i][1]. This is used to sort
|
|
1703
|
+
coefficient lists.
|
|
1704
|
+
KEYWORDS: sort; list
|
|
1705
|
+
SEE ALSO: difformIsBigger, difformIsSmaller
|
|
1706
|
+
EXAMPLE: example difformListSort; shows an example"
|
|
1707
|
+
{
|
|
1708
|
+
list orderings = #;
|
|
1709
|
+
int n = size(orderings);
|
|
1710
|
+
int i,j;
|
|
1711
|
+
int Dlist_flag = 0;
|
|
1712
|
+
int Llist_flag = 0;
|
|
1713
|
+
|
|
1714
|
+
// Check for double list
|
|
1715
|
+
for(i = 1; i <= n; i++)
|
|
1716
|
+
{
|
|
1717
|
+
if(typeof(orderings[i]) == "string")
|
|
1718
|
+
{
|
|
1719
|
+
if(orderings[i] == "Dlist")
|
|
1720
|
+
{
|
|
1721
|
+
Dlist_flag = 1;
|
|
1722
|
+
orderings = delete(orderings,i);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
// Check for list of lists
|
|
1728
|
+
for(i = 1; i <= n; i++)
|
|
1729
|
+
{
|
|
1730
|
+
if(typeof(orderings[i]) == "string")
|
|
1731
|
+
{
|
|
1732
|
+
if(orderings[i] == "Llist")
|
|
1733
|
+
{
|
|
1734
|
+
Llist_flag = 1;
|
|
1735
|
+
orderings = delete(orderings,i);
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
// Not both list forms allowed
|
|
1741
|
+
if(Dlist_flag == 1 && Llist_flag == 1)
|
|
1742
|
+
{
|
|
1743
|
+
ERROR("Cannot sort double list of lists!");
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
// Double list detected
|
|
1747
|
+
if(Dlist_flag == 1)
|
|
1748
|
+
{
|
|
1749
|
+
poly temp_form_sec;
|
|
1750
|
+
list L_sec = L[2];
|
|
1751
|
+
L = L[1];
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
// List of lists detected
|
|
1755
|
+
if(Llist_flag == 1)
|
|
1756
|
+
{
|
|
1757
|
+
poly temp_form_sec;
|
|
1758
|
+
n = size(L);
|
|
1759
|
+
list L_temp;
|
|
1760
|
+
list L_sec;
|
|
1761
|
+
|
|
1762
|
+
// Transform list of lists to double list
|
|
1763
|
+
for(i = 1; i <= n; i++)
|
|
1764
|
+
{
|
|
1765
|
+
L_temp[i] = L[i][1];
|
|
1766
|
+
L_sec[i] = L[i][2];
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
L = L_temp;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
// Insertion sort
|
|
1773
|
+
difform temp_form;
|
|
1774
|
+
n = size(L);
|
|
1775
|
+
|
|
1776
|
+
for(i = 1; i <= n; i++)
|
|
1777
|
+
{
|
|
1778
|
+
temp_form = L[i];
|
|
1779
|
+
|
|
1780
|
+
if(Dlist_flag == 1 || Llist_flag == 1)
|
|
1781
|
+
{
|
|
1782
|
+
temp_form_sec = L_sec[i];
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
j = i;
|
|
1786
|
+
|
|
1787
|
+
while(j > 1)
|
|
1788
|
+
{
|
|
1789
|
+
if(difformIsBigger(L[j-1],temp_form,orderings))
|
|
1790
|
+
{
|
|
1791
|
+
L[j] = L[j-1];
|
|
1792
|
+
|
|
1793
|
+
if(Dlist_flag == 1 || Llist_flag == 1)
|
|
1794
|
+
{
|
|
1795
|
+
L_sec[j] = L_sec[j-1];
|
|
1796
|
+
}
|
|
1797
|
+
|
|
1798
|
+
j--;
|
|
1799
|
+
}
|
|
1800
|
+
else
|
|
1801
|
+
{
|
|
1802
|
+
break;
|
|
1803
|
+
}
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
L[j] = temp_form;
|
|
1807
|
+
|
|
1808
|
+
if(Dlist_flag == 1 || Llist_flag == 1)
|
|
1809
|
+
{
|
|
1810
|
+
L_sec[j] = temp_form_sec;
|
|
1811
|
+
}
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
// For double list - return a double list
|
|
1815
|
+
if(Dlist_flag == 1)
|
|
1816
|
+
{
|
|
1817
|
+
return(list(L,L_sec));
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
// For list of lists - return a list of lists
|
|
1821
|
+
if(Llist_flag == 1)
|
|
1822
|
+
{
|
|
1823
|
+
L_temp = list();
|
|
1824
|
+
for(i = 1; i <= n; i++)
|
|
1825
|
+
{
|
|
1826
|
+
L_temp[i] = list(L[i],L_sec[i]);
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
return(L_temp);
|
|
1830
|
+
}
|
|
1831
|
+
return(L);
|
|
1832
|
+
}
|
|
1833
|
+
example
|
|
1834
|
+
{
|
|
1835
|
+
"EXAMPLE:"; echo = 2;
|
|
1836
|
+
ring R = 0,(x,y,z,t),dp;
|
|
1837
|
+
diffAlgebra();
|
|
1838
|
+
|
|
1839
|
+
/////////////////////////
|
|
1840
|
+
// Sortation of a list //
|
|
1841
|
+
/////////////////////////
|
|
1842
|
+
|
|
1843
|
+
list L = dx*x, x2 - y*t, 12, dt*dy*dx*dz;
|
|
1844
|
+
|
|
1845
|
+
// Sort list with standard ordering
|
|
1846
|
+
difformListSort(L);
|
|
1847
|
+
// Sort list with changed ordering
|
|
1848
|
+
difformListSort(L,"gen","ls","ringvar","wp",intvec(-1,1,1,1));
|
|
1849
|
+
|
|
1850
|
+
/////////////////////////////////////////////
|
|
1851
|
+
// Sortation of list with structure "Dlist" //
|
|
1852
|
+
/////////////////////////////////////////////
|
|
1853
|
+
|
|
1854
|
+
list DL;
|
|
1855
|
+
DL[1] = list(dx,x,t,dt); DL[2] = list(y,t*z,4,x);
|
|
1856
|
+
|
|
1857
|
+
// This list has the structure described by "Dlist"
|
|
1858
|
+
difformListSort(DL,"Dlist","ringvar","ls");
|
|
1859
|
+
|
|
1860
|
+
/////////////////////////////////////////////
|
|
1861
|
+
// Sortation of list with structure "Llist" //
|
|
1862
|
+
/////////////////////////////////////////////
|
|
1863
|
+
|
|
1864
|
+
list LL;
|
|
1865
|
+
LL[1] = list(dx,x); LL[2] = list(t*dt,y); LL[3] = list(x,2);
|
|
1866
|
+
|
|
1867
|
+
// This list has the structure described by "Llist"
|
|
1868
|
+
difformListSort(LL,"Llist");
|
|
1869
|
+
|
|
1870
|
+
kill Omega_R,dx,dy,dz,dt,L,DL,LL;
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
|
|
1874
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1875
|
+
//---- Procedures for computing with universal derivation and differential ---//
|
|
1876
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1877
|
+
|
|
1878
|
+
|
|
1879
|
+
proc difformUnivDer(poly f)
|
|
1880
|
+
"USAGE: difformUnivDer(f); f poly
|
|
1881
|
+
RETURN: a differential form: the image of the universal derivation applied to f
|
|
1882
|
+
KEYWORDS: derivation; universal
|
|
1883
|
+
SEE ALSO: difformDiff
|
|
1884
|
+
EXAMPLE: example difformUnivDer; shows an example"
|
|
1885
|
+
{
|
|
1886
|
+
difform df = 0;
|
|
1887
|
+
difform d_var;
|
|
1888
|
+
int n = nvars(basering);
|
|
1889
|
+
int i;
|
|
1890
|
+
|
|
1891
|
+
// Build the image under the universal derivation
|
|
1892
|
+
for(i = 1; i <= n; i++)
|
|
1893
|
+
{
|
|
1894
|
+
execute("d_var = d" + string(var(i)));
|
|
1895
|
+
df = df + diff(f,var(i))*d_var;
|
|
1896
|
+
}
|
|
1897
|
+
return(df);
|
|
1898
|
+
}
|
|
1899
|
+
example
|
|
1900
|
+
{
|
|
1901
|
+
"EXAMPLE:"; echo = 2;
|
|
1902
|
+
ring R = 0,(x,y,z),lp;
|
|
1903
|
+
diffAlgebra();
|
|
1904
|
+
|
|
1905
|
+
/////////////////////////////////////////////////
|
|
1906
|
+
// Universal derivation applied to polynomials //
|
|
1907
|
+
/////////////////////////////////////////////////
|
|
1908
|
+
|
|
1909
|
+
difformUnivDer(3x);
|
|
1910
|
+
difformUnivDer(xyz+x2y2z2);
|
|
1911
|
+
difformUnivDer(x+y+z);
|
|
1912
|
+
|
|
1913
|
+
kill Omega_R,dx,dy,dz;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
|
|
1917
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1918
|
+
|
|
1919
|
+
|
|
1920
|
+
proc difformDiff(difform df)
|
|
1921
|
+
"USAGE: difformDiff(df); df difform
|
|
1922
|
+
RETURN: the image of df under the differential
|
|
1923
|
+
REMARK: To compute the image, the universal derivation is applied to each coefficient and multiplied with the
|
|
1924
|
+
corresponding generator
|
|
1925
|
+
NOTE: - the differential is a map Omega_R^(p) -> Omega_R^(p+1) and this procedure applies
|
|
1926
|
+
the differential to all homogeneous parts of df
|
|
1927
|
+
- this procedure can also be applied to polynomials - in this case it is just the universal derivation
|
|
1928
|
+
KEYWORDS: differential; universal; derivation
|
|
1929
|
+
SEE ALSO: difformUnivDer
|
|
1930
|
+
EXAMPLE: example difformDiff; shows an example"
|
|
1931
|
+
{
|
|
1932
|
+
difform d_df = 0;
|
|
1933
|
+
list df_gen_repr = difformCoef(df);
|
|
1934
|
+
int n = size(df_gen_repr);
|
|
1935
|
+
int i;
|
|
1936
|
+
|
|
1937
|
+
// Derivate each coefficient
|
|
1938
|
+
for(i = 1; i <= n; i++)
|
|
1939
|
+
{
|
|
1940
|
+
d_df = d_df + difformUnivDer(df_gen_repr[i][2])*df_gen_repr[i][1];
|
|
1941
|
+
}
|
|
1942
|
+
return(d_df);
|
|
1943
|
+
}
|
|
1944
|
+
example
|
|
1945
|
+
{
|
|
1946
|
+
"EXAMPLE:"; echo = 2;
|
|
1947
|
+
ring R = 0,(x,y,z,a,b,c),lp;
|
|
1948
|
+
diffAlgebra();
|
|
1949
|
+
|
|
1950
|
+
////////////////////////////////////////
|
|
1951
|
+
// Construction of differential forms //
|
|
1952
|
+
////////////////////////////////////////
|
|
1953
|
+
|
|
1954
|
+
difform df_1 = y*dx + z*dy + x*dz + a*db + b*dc + c*da;
|
|
1955
|
+
difform df_2 = -5*c4*dc*dz*dy + 3*dx*dz - 13*a4*da*db + 12*a4*da*db + x8*dx*dy + 12 + dy*da + dz*dx - (y4-y5)*x12*dx*db*dz - dx - dy + db + x2*db*dy;
|
|
1956
|
+
poly f = 3x2y2 - z3*c;
|
|
1957
|
+
|
|
1958
|
+
///////////////////////////////////////
|
|
1959
|
+
// Differential applied to the forms //
|
|
1960
|
+
///////////////////////////////////////
|
|
1961
|
+
|
|
1962
|
+
difformDiff(df_1);
|
|
1963
|
+
difformDiff(df_2);
|
|
1964
|
+
difformDiff(f);
|
|
1965
|
+
|
|
1966
|
+
// The composition of differentials is the zero-map:
|
|
1967
|
+
difformDiff(difformDiff(df_1));
|
|
1968
|
+
|
|
1969
|
+
kill Omega_R,df_1,df_2,f,dx,dy,dz,da,db,dc;
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
|
|
1973
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1974
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1975
|
+
// Procedures for type derivation //
|
|
1976
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1977
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1978
|
+
|
|
1979
|
+
|
|
1980
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1981
|
+
//-------------------------- Structural procedures ---------------------------//
|
|
1982
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
proc derivationFromList(list L)
|
|
1986
|
+
"USAGE: derivation phi = derivationFromList(L); L list
|
|
1987
|
+
RETURN: the derivation defined by the list L
|
|
1988
|
+
REMARKS: The structure of L is checked and L is sorted,
|
|
1989
|
+
then it is set as structure list of phi
|
|
1990
|
+
NOTE: the structure of L must follow the rules:
|
|
1991
|
+
- L[1] is a list of all degree-1 generators: all dx_i must occur once and no other
|
|
1992
|
+
differential forms are allowed. The order of the list is not important
|
|
1993
|
+
- L[2] is the list of images of the dx_i: these must be polynomials
|
|
1994
|
+
Since the map is linear, it is enough to store the images of the dx_i
|
|
1995
|
+
KEYWORDS: constructor; derivation
|
|
1996
|
+
SEE ALSO: derivationCheckList, derivationConstructor, derivationFromPoly
|
|
1997
|
+
EXAMPLE: example derivationFromList; shows an example"
|
|
1998
|
+
{
|
|
1999
|
+
// Check the structure of the given list
|
|
2000
|
+
derivationCheckList(L);
|
|
2001
|
+
|
|
2002
|
+
// Sort the generators by the monomial ordering given in the differential algebra
|
|
2003
|
+
L = difformListSort(L,"Dlist");
|
|
2004
|
+
|
|
2005
|
+
derivation phi;
|
|
2006
|
+
phi.genIm = L;
|
|
2007
|
+
return(phi);
|
|
2008
|
+
}
|
|
2009
|
+
example
|
|
2010
|
+
{
|
|
2011
|
+
"EXAMPLE:"; echo = 2;
|
|
2012
|
+
ring R = 11,(u,v,w,x),lp;
|
|
2013
|
+
diffAlgebra();
|
|
2014
|
+
|
|
2015
|
+
/////////////////////////////////////
|
|
2016
|
+
// Construction of structure lists //
|
|
2017
|
+
/////////////////////////////////////
|
|
2018
|
+
|
|
2019
|
+
list L_1;
|
|
2020
|
+
L_1[1] = list(du,dv,dw,dx);
|
|
2021
|
+
L_1[2] = list(u,v,w,x);
|
|
2022
|
+
|
|
2023
|
+
list L_2;
|
|
2024
|
+
L_2[1] = list(dx,dw,du,dv);
|
|
2025
|
+
L_2[2] = list(x2,w2,u2,v-wu);
|
|
2026
|
+
|
|
2027
|
+
/////////////////////////////////
|
|
2028
|
+
// Construction of derivations //
|
|
2029
|
+
/////////////////////////////////
|
|
2030
|
+
|
|
2031
|
+
derivation phi = derivationFromList(L_1); phi;
|
|
2032
|
+
derivation psi = derivationFromList(L_2); psi;
|
|
2033
|
+
|
|
2034
|
+
kill Omega_R,du,dv,dw,dx,phi,psi,L_1,L_2;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2039
|
+
|
|
2040
|
+
|
|
2041
|
+
proc derivationCheckList(list L)
|
|
2042
|
+
"USAGE: derivationCheckList(L); L list
|
|
2043
|
+
REMARKS: The procedure checks if a given list has the right form for a derivation
|
|
2044
|
+
and throws an error if this is not the case. In particular:
|
|
2045
|
+
- Only degree-1 generators are allowed in L[1] - this is checked via difformIsGen
|
|
2046
|
+
- Any degree-1 generator must occur once - this is checked via difformListCont
|
|
2047
|
+
NOTE: like in derivationFromList, the structure of L must follow the rules:
|
|
2048
|
+
- L[1] is a list of all degree-1 generators: all dx_i must occur once and no other
|
|
2049
|
+
differential forms are allowed. The order of the list is not important
|
|
2050
|
+
- L[2] is the list of images of the dx_i: these must be polynomials
|
|
2051
|
+
KEYWORDS: constructor; derivation; structure
|
|
2052
|
+
SEE ALSO: derivationFromList, difformIsGen, difformListCont"
|
|
2053
|
+
{
|
|
2054
|
+
if(size(L) != 2)
|
|
2055
|
+
{
|
|
2056
|
+
ERROR("Given list has wrong size!");
|
|
2057
|
+
}
|
|
2058
|
+
if(typeof(L[1]) != "list" || typeof(L[2]) != "list")
|
|
2059
|
+
{
|
|
2060
|
+
ERROR("Given list does not contain lists!");
|
|
2061
|
+
}
|
|
2062
|
+
if(size(L[1]) != size(L[2]))
|
|
2063
|
+
{
|
|
2064
|
+
ERROR("Given list does not have the right form!");
|
|
2065
|
+
}
|
|
2066
|
+
|
|
2067
|
+
int n = size(L[1]);
|
|
2068
|
+
int i;
|
|
2069
|
+
|
|
2070
|
+
// Need an image for any generator
|
|
2071
|
+
if(n != nvars(basering))
|
|
2072
|
+
{
|
|
2073
|
+
ERROR("Given list has wrong size!");
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
for(i = 1; i <= n; i++)
|
|
2077
|
+
{
|
|
2078
|
+
// Right type needed
|
|
2079
|
+
if(typeof(L[1][i]) != "difform" || (typeof(L[2][i]) != "poly" && typeof(L[2][i]) != "int" && typeof(L[2][i]) != "number"))
|
|
2080
|
+
{
|
|
2081
|
+
ERROR("Given list contains wrong type!");
|
|
2082
|
+
}
|
|
2083
|
+
|
|
2084
|
+
// Generator of Omega_R^1
|
|
2085
|
+
if(!(difformIsGen(L[1][i]) && deg(L[1][i]) == 1))
|
|
2086
|
+
{
|
|
2087
|
+
ERROR("Given list contains a non-generator or a generator not of degree 1!");
|
|
2088
|
+
}
|
|
2089
|
+
}
|
|
2090
|
+
|
|
2091
|
+
// Now check the list L[1] for duplicates of the generators
|
|
2092
|
+
list L_i;
|
|
2093
|
+
for(i = 1; i <= n; i++)
|
|
2094
|
+
{
|
|
2095
|
+
L_i = delete(L[1],i);
|
|
2096
|
+
if(difformListCont(L_i,L[1][i]))
|
|
2097
|
+
{
|
|
2098
|
+
ERROR("Given list contains duplicate of a generator!");
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
}
|
|
2102
|
+
|
|
2103
|
+
|
|
2104
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2105
|
+
|
|
2106
|
+
|
|
2107
|
+
proc derivationFromPoly(poly f)
|
|
2108
|
+
"USAGE: derivation phi = derivationFromPoly(f); f poly
|
|
2109
|
+
RETURN: a derivation which maps any degree-1 generator to f
|
|
2110
|
+
REMARKS: The degree-1 generators are returned by diffAlgebraListGen
|
|
2111
|
+
NOTE: the procedure allows to interpret polynomials as derivations
|
|
2112
|
+
KEYWORDS: constructor; derivation; polynomial
|
|
2113
|
+
SEE ALSO: derivationConstructor, derivationFromList
|
|
2114
|
+
EXAMPLE: example derivationFromPoly; shows an example"
|
|
2115
|
+
{
|
|
2116
|
+
list L;
|
|
2117
|
+
// First entry of list are the degree-1 generators
|
|
2118
|
+
L[1] = list();
|
|
2119
|
+
// These are ordered by ordering of differential algebra
|
|
2120
|
+
L[1] = diffAlgebraListGen(1);
|
|
2121
|
+
|
|
2122
|
+
L[2] = list();
|
|
2123
|
+
int n = size(L[1]);
|
|
2124
|
+
int i;
|
|
2125
|
+
for(i = 1; i <= n; i++)
|
|
2126
|
+
{
|
|
2127
|
+
L[2][i] = f;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
// Construct the derivation
|
|
2131
|
+
derivation phi;
|
|
2132
|
+
phi.genIm = L;
|
|
2133
|
+
return(phi);
|
|
2134
|
+
}
|
|
2135
|
+
example
|
|
2136
|
+
{
|
|
2137
|
+
"EXAMPLE:"; echo = 2;
|
|
2138
|
+
ring R = 0,(x,y,z),lp;
|
|
2139
|
+
diffAlgebra();
|
|
2140
|
+
|
|
2141
|
+
//////////////////////////////////////////////////
|
|
2142
|
+
// Construction of derivations from polynomials //
|
|
2143
|
+
//////////////////////////////////////////////////
|
|
2144
|
+
|
|
2145
|
+
derivation phi = derivationFromPoly(3x*y - 12*y4-z2); phi;
|
|
2146
|
+
derivation psi = derivationFromPoly(0); psi;
|
|
2147
|
+
|
|
2148
|
+
kill Omega_R,dx,dy,dz,phi,psi;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
|
|
2152
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2153
|
+
|
|
2154
|
+
|
|
2155
|
+
proc derivationConstructor(def inp)
|
|
2156
|
+
"USAGE: derivation phi = inp; inp of any type
|
|
2157
|
+
RETURN: the derivation defined by inp:
|
|
2158
|
+
REMARKS: the output depens on the type of inp:
|
|
2159
|
+
- if inp is of type list, the constructor derivationFromList is used
|
|
2160
|
+
- if inp is of type poly, number, int or bigint, derivationFromPoly is used
|
|
2161
|
+
NOTE: for other than the mentioned types, there is no output
|
|
2162
|
+
KEYWORDS: constructor; derivation
|
|
2163
|
+
SEE ALSO: derivationFromList, derivationFromPoly
|
|
2164
|
+
EXAMPLE: example derivationConstructor; shows an example"
|
|
2165
|
+
{
|
|
2166
|
+
if(typeof(inp) == "list")
|
|
2167
|
+
{
|
|
2168
|
+
derivation der_cons = derivationFromList(inp);
|
|
2169
|
+
return(der_cons);
|
|
2170
|
+
}
|
|
2171
|
+
if(typeof(inp) == "poly" || typeof(inp) == "number" || typeof(inp) == "int" || typeof(inp) == "bigint")
|
|
2172
|
+
{
|
|
2173
|
+
derivation der_cons = derivationFromPoly(inp);
|
|
2174
|
+
return(der_cons);
|
|
2175
|
+
}
|
|
2176
|
+
}
|
|
2177
|
+
example
|
|
2178
|
+
{
|
|
2179
|
+
"EXAMPLE:"; echo = 2;
|
|
2180
|
+
ring R = 31,(x,y,z),dp;
|
|
2181
|
+
diffAlgebra();
|
|
2182
|
+
|
|
2183
|
+
////////////////////////////////////////////////////////////
|
|
2184
|
+
// Construction of derivations from lists and polynomials //
|
|
2185
|
+
////////////////////////////////////////////////////////////
|
|
2186
|
+
|
|
2187
|
+
list L; L[1] = list(dx,dz,dy); L[2] = list(x2,y-x,z);
|
|
2188
|
+
derivation phi = L; phi;
|
|
2189
|
+
|
|
2190
|
+
derivation psi = 3x2-12z; psi;
|
|
2191
|
+
|
|
2192
|
+
kill Omega_R,dx,dy,dz,phi,psi;
|
|
2193
|
+
}
|
|
2194
|
+
|
|
2195
|
+
|
|
2196
|
+
////////////////////////////////////////////////////////////////////////////////////////////////
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
proc derivationToString(derivation phi, list #)
|
|
2200
|
+
"USAGE: derivationToString(phi,#); phi derivation, # list
|
|
2201
|
+
RETURN: the derivation as a string, describing the image of the degree-1 generators,
|
|
2202
|
+
optionally ordered by a given monomial ordering on the generators
|
|
2203
|
+
REMARKS: To sort the images of the generators in the output string, difformListSort is used.
|
|
2204
|
+
NOTE: to define an ordering for the generators, one can use:
|
|
2205
|
+
- #[1] = 'gen'
|
|
2206
|
+
- #[2]: a monomial ordering as string
|
|
2207
|
+
- #[3]: an optional weight vector
|
|
2208
|
+
the standard ordering is the ordering of the differential algebra
|
|
2209
|
+
KEYWORDS: string; print
|
|
2210
|
+
SEE ALSO: derivationPrint, difformListSort, difformGenToString
|
|
2211
|
+
EXAMPLE: example derivationToString; shows an example"
|
|
2212
|
+
{
|
|
2213
|
+
list temp_genIm = phi.genIm;
|
|
2214
|
+
|
|
2215
|
+
// Get the optional ordering on the generators
|
|
2216
|
+
string gen_ord = "";
|
|
2217
|
+
int n = size(#);
|
|
2218
|
+
int i;
|
|
2219
|
+
|
|
2220
|
+
for(i = 1; i <= n; i++)
|
|
2221
|
+
{
|
|
2222
|
+
if(typeof(#[i]) == "string")
|
|
2223
|
+
{
|
|
2224
|
+
if(#[i] == "gen" && typeof(#[i+1]) == "string")
|
|
2225
|
+
{
|
|
2226
|
+
gen_ord = #[i+1];
|
|
2227
|
+
if(typeof(#[i+2]) == "intvec")
|
|
2228
|
+
{
|
|
2229
|
+
intvec gen_weight = #[i+2];
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
}
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
// Sort the generator/coefficients by the chosen ordering
|
|
2236
|
+
if(gen_ord != "")
|
|
2237
|
+
{
|
|
2238
|
+
if(defined(gen_weight))
|
|
2239
|
+
{
|
|
2240
|
+
temp_genIm = difformListSort(temp_genIm,"Dlist","gen",gen_ord,gen_weight);
|
|
2241
|
+
}
|
|
2242
|
+
else
|
|
2243
|
+
{
|
|
2244
|
+
temp_genIm = difformListSort(temp_genIm,"Dlist","gen",gen_ord);
|
|
2245
|
+
}
|
|
2246
|
+
}
|
|
2247
|
+
|
|
2248
|
+
list gens = temp_genIm[1];
|
|
2249
|
+
list images = temp_genIm[2];
|
|
2250
|
+
n = size(gens);
|
|
2251
|
+
|
|
2252
|
+
// Transform to string
|
|
2253
|
+
string ring_name = nameof(basering);
|
|
2254
|
+
string phi_out = " Omega_" + ring_name + "^1 --> " + ring_name + newline;
|
|
2255
|
+
int ring_name_size = size(ring_name);
|
|
2256
|
+
|
|
2257
|
+
for(i = 1; i <= n; i++)
|
|
2258
|
+
{
|
|
2259
|
+
phi_out = phi_out + tab(6 + ring_name_size) + difformGenToString(gens[i]) + " |--> " + string(images[i]) + newline;
|
|
2260
|
+
}
|
|
2261
|
+
|
|
2262
|
+
return(phi_out);
|
|
2263
|
+
}
|
|
2264
|
+
example
|
|
2265
|
+
{
|
|
2266
|
+
"EXAMPLE:"; echo = 2;
|
|
2267
|
+
ring R = 0,(x,y,z),dp;
|
|
2268
|
+
diffAlgebra();
|
|
2269
|
+
|
|
2270
|
+
list L; L[1] = list(dx,dy,dz); L[2] = list(x2,y-23xz,xz4);
|
|
2271
|
+
derivation phi = L;
|
|
2272
|
+
|
|
2273
|
+
///////////////////////////////////
|
|
2274
|
+
// String with standard ordering //
|
|
2275
|
+
///////////////////////////////////
|
|
2276
|
+
|
|
2277
|
+
print(derivationToString(phi));
|
|
2278
|
+
|
|
2279
|
+
//////////////////////////////////
|
|
2280
|
+
// String with changed ordering //
|
|
2281
|
+
//////////////////////////////////
|
|
2282
|
+
|
|
2283
|
+
print(derivationToString(phi,"gen","wp",intvec(-1,-1,1)));
|
|
2284
|
+
|
|
2285
|
+
kill Omega_R,dx,dy,dz,L,phi;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
|
|
2289
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
proc derivationPrint(derivation phi)
|
|
2293
|
+
"USAGE: phi; phi derivation
|
|
2294
|
+
SIDE EFFECTS: prints the given derivation
|
|
2295
|
+
REMARKS: Prints the string returned by derivationToString with a ls-ordering on the generators
|
|
2296
|
+
KEYWORDS: print; string
|
|
2297
|
+
SEE ALSO: derivationToString
|
|
2298
|
+
EXAMPLE: example derivationPrint; shows an example"
|
|
2299
|
+
{
|
|
2300
|
+
// Orders the generators in ls-order
|
|
2301
|
+
print(derivationToString(phi,"gen","ls"));
|
|
2302
|
+
}
|
|
2303
|
+
example
|
|
2304
|
+
{
|
|
2305
|
+
"EXAMPLE:"; echo = 2;
|
|
2306
|
+
ring R = 0,(a,b,c,x,y,z),lp;
|
|
2307
|
+
diffAlgebra();
|
|
2308
|
+
|
|
2309
|
+
/////////////////
|
|
2310
|
+
// Derivations //
|
|
2311
|
+
/////////////////
|
|
2312
|
+
|
|
2313
|
+
list L; L[1] = list(dx,dy,dz,da,db,dc); L[2] = list(1,12x-y,z4aby, 2*b5x,0,xyz-abc);
|
|
2314
|
+
derivation phi = L;
|
|
2315
|
+
derivation phi_poly = 3ab - c2*x + z;
|
|
2316
|
+
|
|
2317
|
+
///////////////////////////
|
|
2318
|
+
// Applications of Print //
|
|
2319
|
+
///////////////////////////
|
|
2320
|
+
|
|
2321
|
+
phi;
|
|
2322
|
+
phi_poly;
|
|
2323
|
+
|
|
2324
|
+
kill Omega_R,da,db,dc,dx,dy,dz,L,phi,phi_poly;
|
|
2325
|
+
}
|
|
2326
|
+
|
|
2327
|
+
|
|
2328
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2329
|
+
//-------------------- Basic computational procedures ------------------------//
|
|
2330
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2331
|
+
|
|
2332
|
+
|
|
2333
|
+
proc derivationAdd(derivation phi, derivation psi)
|
|
2334
|
+
"USAGE: phi+psi; phi,psi derivation
|
|
2335
|
+
RETURN: the sum of the given derivations
|
|
2336
|
+
REMARK: The sum is computed componentwise - this works since the structure lists
|
|
2337
|
+
of derivations are sorted the same way.
|
|
2338
|
+
NOTE: once can also add polynomials and derivations
|
|
2339
|
+
KEYWORDS: add; sum
|
|
2340
|
+
SEE ALSO: derivationSub
|
|
2341
|
+
EXAMPLE: example derivationAdd; shows an example"
|
|
2342
|
+
{
|
|
2343
|
+
// Structure for derivation
|
|
2344
|
+
derivation add_der;
|
|
2345
|
+
list add_list;
|
|
2346
|
+
add_list[1] = list();
|
|
2347
|
+
add_list[2] = list();
|
|
2348
|
+
add_list[1] = phi.genIm[1];
|
|
2349
|
+
|
|
2350
|
+
int n = size(add_list[1]);
|
|
2351
|
+
int i;
|
|
2352
|
+
|
|
2353
|
+
for(i = 1; i <= n; i++)
|
|
2354
|
+
{
|
|
2355
|
+
// Lists are sorted the same way
|
|
2356
|
+
add_list[2][i] = phi.genIm[2][i] + psi.genIm[2][i];
|
|
2357
|
+
}
|
|
2358
|
+
|
|
2359
|
+
// The list is already sorted
|
|
2360
|
+
add_der.genIm = add_list;
|
|
2361
|
+
return(add_der);
|
|
2362
|
+
}
|
|
2363
|
+
example
|
|
2364
|
+
{
|
|
2365
|
+
"EXAMPLE:"; echo = 2;
|
|
2366
|
+
ring R = 0,(x,y,z),ds;
|
|
2367
|
+
diffAlgebra();
|
|
2368
|
+
|
|
2369
|
+
list L_1; L_1[1] = list(dx,dy,dz); L_1[2] = list(2x,2y,2z);
|
|
2370
|
+
list L_2; L_2[1] = list(dx,dy,dz); L_2[2] = list(y2-x,z4+x+y,y2);
|
|
2371
|
+
|
|
2372
|
+
/////////////////
|
|
2373
|
+
// Derivations //
|
|
2374
|
+
/////////////////
|
|
2375
|
+
|
|
2376
|
+
derivation phi_1 = L_1; phi_1;
|
|
2377
|
+
derivation phi_2 = L_2; phi_2;
|
|
2378
|
+
|
|
2379
|
+
////////////////////////
|
|
2380
|
+
// Sum of derivations //
|
|
2381
|
+
////////////////////////
|
|
2382
|
+
|
|
2383
|
+
phi_1 + phi_2;
|
|
2384
|
+
phi_1 + phi_2 + phi_2;
|
|
2385
|
+
phi_1 + phi_2 + 3x2;
|
|
2386
|
+
|
|
2387
|
+
kill Omega_R,dx,dy,dz,L_1,L_2,phi_1,phi_2;
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
|
|
2391
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2392
|
+
|
|
2393
|
+
|
|
2394
|
+
proc derivationSub(derivation phi, derivation psi)
|
|
2395
|
+
"USAGE: phi-psi; phi,psi derivation
|
|
2396
|
+
RETURN: the difference of the given derivations
|
|
2397
|
+
REMARKS: The difference is computed componentwise - this works since the
|
|
2398
|
+
structure lists of derivations are sorted the same way.
|
|
2399
|
+
NOTE: one can also subtract polynomials from derivations
|
|
2400
|
+
KEYWORDS: minus; difference
|
|
2401
|
+
SEE ALSO: derivationAdd, derivationNeg
|
|
2402
|
+
EXAMPLE: example derivationSub; shows an example"
|
|
2403
|
+
{
|
|
2404
|
+
// Structure for derivation
|
|
2405
|
+
derivation sub_der;
|
|
2406
|
+
list sub_list;
|
|
2407
|
+
sub_list[1] = list();
|
|
2408
|
+
sub_list[2] = list();
|
|
2409
|
+
sub_list[1] = phi.genIm[1];
|
|
2410
|
+
|
|
2411
|
+
int n = size(sub_list[1]);
|
|
2412
|
+
int i;
|
|
2413
|
+
|
|
2414
|
+
for(i = 1; i <= n; i++)
|
|
2415
|
+
{
|
|
2416
|
+
// Lists are sorted the same way
|
|
2417
|
+
sub_list[2][i] = phi.genIm[2][i] - psi.genIm[2][i];
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
// The list is already sorted
|
|
2421
|
+
sub_der.genIm = sub_list;
|
|
2422
|
+
return(sub_der);
|
|
2423
|
+
}
|
|
2424
|
+
example
|
|
2425
|
+
{
|
|
2426
|
+
"EXAMPLE:"; echo = 2;
|
|
2427
|
+
ring R = 0,(x,y),lp;
|
|
2428
|
+
diffAlgebra();
|
|
2429
|
+
|
|
2430
|
+
list L_1; L_1[1] = list(dx,dy); L_1[2] = list(x+y,1);
|
|
2431
|
+
list L_2; L_2[1] = list(dy,dx); L_2[2] = list(x,y2);
|
|
2432
|
+
|
|
2433
|
+
/////////////////
|
|
2434
|
+
// Derivations //
|
|
2435
|
+
/////////////////
|
|
2436
|
+
|
|
2437
|
+
derivation phi_1 = L_1; phi_1;
|
|
2438
|
+
derivation phi_2 = L_2; phi_2;
|
|
2439
|
+
|
|
2440
|
+
///////////////////////////////
|
|
2441
|
+
// Difference of derivations //
|
|
2442
|
+
///////////////////////////////
|
|
2443
|
+
|
|
2444
|
+
phi_1-phi_2;
|
|
2445
|
+
phi_1-phi_2-phi_1;
|
|
2446
|
+
phi_1 - (x+y);
|
|
2447
|
+
|
|
2448
|
+
kill Omega_R,dx,dy,L_1,L_2,phi_1,phi_2;
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
|
|
2452
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2453
|
+
|
|
2454
|
+
|
|
2455
|
+
proc derivationNeg(derivation phi)
|
|
2456
|
+
"USAGE: -phi; phi derivation
|
|
2457
|
+
RETURN: the negation of a given derivation
|
|
2458
|
+
KEYWORDS: minus; difference
|
|
2459
|
+
SEE ALSO: derivationSub
|
|
2460
|
+
EXAMPLE: example derivationNeg; shows an example"
|
|
2461
|
+
{
|
|
2462
|
+
// Structure for derivation
|
|
2463
|
+
derivation neg_der;
|
|
2464
|
+
list neg_list;
|
|
2465
|
+
neg_list[1] = list();
|
|
2466
|
+
neg_list[2] = list();
|
|
2467
|
+
neg_list[1] = phi.genIm[1];
|
|
2468
|
+
|
|
2469
|
+
int n = size(neg_list[1]);
|
|
2470
|
+
int i;
|
|
2471
|
+
|
|
2472
|
+
for(i = 1; i <= n; i++)
|
|
2473
|
+
{
|
|
2474
|
+
neg_list[2][i] = -phi.genIm[2][i];
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
// The list is already sorted
|
|
2478
|
+
neg_der.genIm = neg_list;
|
|
2479
|
+
return(neg_der);
|
|
2480
|
+
}
|
|
2481
|
+
example
|
|
2482
|
+
{
|
|
2483
|
+
"EXAMPLE:"; echo = 2;
|
|
2484
|
+
ring R = 0,(x,y,z,t),dp;
|
|
2485
|
+
diffAlgebra();
|
|
2486
|
+
|
|
2487
|
+
list L_1; L_1[1] = list(dy,dx,dt,dz); L_1[2] = list(x2-y,23y+t,tz4,z-y);
|
|
2488
|
+
|
|
2489
|
+
/////////////////
|
|
2490
|
+
// Derivations //
|
|
2491
|
+
/////////////////
|
|
2492
|
+
|
|
2493
|
+
derivation phi_1 = L_1; phi_1;
|
|
2494
|
+
derivation phi_poly = 3xyz; phi_poly;
|
|
2495
|
+
|
|
2496
|
+
/////////////////////////////
|
|
2497
|
+
// Negation of derivations //
|
|
2498
|
+
/////////////////////////////
|
|
2499
|
+
|
|
2500
|
+
-phi_1;
|
|
2501
|
+
-(-phi_1);
|
|
2502
|
+
-(phi_poly);
|
|
2503
|
+
|
|
2504
|
+
kill Omega_R,dx,dy,dz,dt,L_1,phi_1,phi_poly;
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
|
|
2508
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2509
|
+
|
|
2510
|
+
|
|
2511
|
+
proc derivationMul(derivation phi, derivation psi)
|
|
2512
|
+
"USAGE: phi*psi; phi,psi derivation
|
|
2513
|
+
RETURN: the componentwise product of phi and psi
|
|
2514
|
+
REMARKS: The product is computed componentwise - this works since the
|
|
2515
|
+
structure lists of derivations are sorted the same way.
|
|
2516
|
+
NOTE: one can also multiply polynomials and derivations
|
|
2517
|
+
KEYWORDS: multiplication; product
|
|
2518
|
+
EXAMPLE: derivationMul; shows an example"
|
|
2519
|
+
{
|
|
2520
|
+
// Structure for derivation
|
|
2521
|
+
derivation mul_der;
|
|
2522
|
+
list mul_list;
|
|
2523
|
+
mul_list[1] = list();
|
|
2524
|
+
mul_list[2] = list();
|
|
2525
|
+
mul_list[1] = phi.genIm[1];
|
|
2526
|
+
|
|
2527
|
+
int n = size(mul_list[1]);
|
|
2528
|
+
int i;
|
|
2529
|
+
|
|
2530
|
+
for(i = 1; i <= n; i++)
|
|
2531
|
+
{
|
|
2532
|
+
// Lists are sorted the same way
|
|
2533
|
+
mul_list[2][i] = phi.genIm[2][i]*psi.genIm[2][i];
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
// The list is already sorted
|
|
2537
|
+
mul_der.genIm = mul_list;
|
|
2538
|
+
return(mul_der);
|
|
2539
|
+
}
|
|
2540
|
+
example
|
|
2541
|
+
{
|
|
2542
|
+
"EXAMPLE:"; echo = 2;
|
|
2543
|
+
ring R = 0,(a,b,t),ls;
|
|
2544
|
+
diffAlgebra();
|
|
2545
|
+
|
|
2546
|
+
list L_1; L_1[1] = list(da,dt,db); L_1[2] = list(2a,2t-b,2t);
|
|
2547
|
+
list L_2; L_2[1] = list(dt,db,da); L_2[2] = list(-a,-b,-t);
|
|
2548
|
+
|
|
2549
|
+
/////////////////
|
|
2550
|
+
// Derivations //
|
|
2551
|
+
/////////////////
|
|
2552
|
+
|
|
2553
|
+
derivation phi_1 = L_1; phi_1;
|
|
2554
|
+
derivation phi_2 = L_2; phi_2;
|
|
2555
|
+
|
|
2556
|
+
///////////////////////////////////
|
|
2557
|
+
// Multiplication of derivations //
|
|
2558
|
+
///////////////////////////////////
|
|
2559
|
+
|
|
2560
|
+
phi_1*phi_2;
|
|
2561
|
+
phi_1*phi_2*phi_2;
|
|
2562
|
+
phi_2*(3a2-bt);
|
|
2563
|
+
|
|
2564
|
+
kill Omega_R,da,db,dt,L_1,L_2,phi_1,phi_2;
|
|
2565
|
+
}
|
|
2566
|
+
|
|
2567
|
+
|
|
2568
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2569
|
+
|
|
2570
|
+
|
|
2571
|
+
proc derivationEqu(derivation phi, derivation psi)
|
|
2572
|
+
"USAGE: phi == psi; phi,psi derivation
|
|
2573
|
+
RETURN: 1, if phi and psi are equal - 0, otherwise
|
|
2574
|
+
REMARKS: The images of the generators are compared compononentwise - this
|
|
2575
|
+
works since the structure lists of derivations are sorted the same way.
|
|
2576
|
+
NOTE: derivations can also be compared to polynomials
|
|
2577
|
+
KEYWORDS: compare; equal
|
|
2578
|
+
SEE ALSO: derivationNeq
|
|
2579
|
+
EXAMPLE: example derivationEqu; shows an example"
|
|
2580
|
+
{
|
|
2581
|
+
int n = size(phi.genIm[1]);
|
|
2582
|
+
int i;
|
|
2583
|
+
|
|
2584
|
+
for(i = 1; i <= n; i++)
|
|
2585
|
+
{
|
|
2586
|
+
// Lists are sorted the same way
|
|
2587
|
+
if(phi.genIm[2][i] != psi.genIm[2][i])
|
|
2588
|
+
{
|
|
2589
|
+
// Different images
|
|
2590
|
+
return(0);
|
|
2591
|
+
}
|
|
2592
|
+
}
|
|
2593
|
+
|
|
2594
|
+
// Images are the same
|
|
2595
|
+
return(1);
|
|
2596
|
+
}
|
|
2597
|
+
example
|
|
2598
|
+
{
|
|
2599
|
+
"EXAMPLE:"; echo = 2;
|
|
2600
|
+
ring R = 0,(u,v),lp;
|
|
2601
|
+
diffAlgebra();
|
|
2602
|
+
|
|
2603
|
+
list L_1; L_1[1] = list(dv,du); L_1[2] = list(u,-v);
|
|
2604
|
+
|
|
2605
|
+
/////////////////
|
|
2606
|
+
// Derivations //
|
|
2607
|
+
/////////////////
|
|
2608
|
+
|
|
2609
|
+
derivation phi_1 = L_1; phi_1;
|
|
2610
|
+
derivation phi_poly = u*v; phi_poly;
|
|
2611
|
+
|
|
2612
|
+
///////////////////////////////
|
|
2613
|
+
// Comparison of derivations //
|
|
2614
|
+
///////////////////////////////
|
|
2615
|
+
|
|
2616
|
+
phi_1 == phi_1;
|
|
2617
|
+
phi_1 == phi_poly;
|
|
2618
|
+
phi_poly == u*v;
|
|
2619
|
+
|
|
2620
|
+
kill Omega_R,du,dv,phi_1,phi_poly;
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
|
|
2624
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2625
|
+
|
|
2626
|
+
|
|
2627
|
+
proc derivationNeq(derivation phi, derivation psi)
|
|
2628
|
+
"USAGE: phi != psi; phi,psi derivation
|
|
2629
|
+
RETURN: 0, if phi and psi are equal - 1, otherwise
|
|
2630
|
+
REMARKS: The comparison is done by difformEqu
|
|
2631
|
+
NOTE: derivations can also be compared to polynomials
|
|
2632
|
+
KEYWORDS: compare; equal; not equal
|
|
2633
|
+
SEE ALSO: derivationEqu
|
|
2634
|
+
EXAMPLE: example derivationNeq; shows an example"
|
|
2635
|
+
{
|
|
2636
|
+
return(!derivationEqu(phi,psi));
|
|
2637
|
+
}
|
|
2638
|
+
example
|
|
2639
|
+
{
|
|
2640
|
+
"EXAMPLE:"; echo = 2;
|
|
2641
|
+
ring R = 0,(u,v),lp;
|
|
2642
|
+
diffAlgebra();
|
|
2643
|
+
|
|
2644
|
+
list L_1; L_1[1] = list(dv,du); L_1[2] = list(u,-v);
|
|
2645
|
+
|
|
2646
|
+
/////////////////
|
|
2647
|
+
// Derivations //
|
|
2648
|
+
/////////////////
|
|
2649
|
+
|
|
2650
|
+
derivation phi_1 = L_1; phi_1;
|
|
2651
|
+
derivation phi_poly = u*v; phi_poly;
|
|
2652
|
+
|
|
2653
|
+
///////////////////////////////
|
|
2654
|
+
// Comparison of derivations //
|
|
2655
|
+
///////////////////////////////
|
|
2656
|
+
|
|
2657
|
+
phi_1 != phi_1;
|
|
2658
|
+
phi_1 != phi_poly;
|
|
2659
|
+
phi_poly != u*v;
|
|
2660
|
+
|
|
2661
|
+
kill Omega_R,du,dv,phi_1,phi_poly;
|
|
2662
|
+
}
|
|
2663
|
+
|
|
2664
|
+
|
|
2665
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2666
|
+
|
|
2667
|
+
|
|
2668
|
+
proc derivationEval(derivation phi, difform df)
|
|
2669
|
+
"USAGE: phi(df); phi derivation, df difform
|
|
2670
|
+
RETURN: the polynomial phi(df), the derivation phi evaluated at df
|
|
2671
|
+
REMARKS: - By linearity it is enough to compute the sum of all differential forms:
|
|
2672
|
+
(coefficient of dx_i)*(image of dx_i)
|
|
2673
|
+
- The coefficient list of df is computed via difformCoef
|
|
2674
|
+
- To avoid searching generators in lists, the coefficient list of df and the
|
|
2675
|
+
structure list of phi are sorted the same way
|
|
2676
|
+
NOTE: - the differential form 0 is allowed as input
|
|
2677
|
+
- an error will occur if the given differential form is not of degree 1 or -1
|
|
2678
|
+
KEYWORDS: evaluation; derivation; application
|
|
2679
|
+
SEE ALSO: difformListSort, difformCoef
|
|
2680
|
+
EXAMPLE: example derivationEval; shows an example"
|
|
2681
|
+
{
|
|
2682
|
+
if(!homog(df))
|
|
2683
|
+
{
|
|
2684
|
+
ERROR("Cannot apply derivation to non-homogeneous element!");
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
if(deg(df) != 1 && deg(df) != -1)
|
|
2688
|
+
{
|
|
2689
|
+
ERROR("Cannot apply derivation to differential form not of degree 1!");
|
|
2690
|
+
}
|
|
2691
|
+
|
|
2692
|
+
poly df_eval = 0;
|
|
2693
|
+
list df_gen_repr = difformListSort(difformCoef(df),"Llist");
|
|
2694
|
+
int k = size(df_gen_repr);
|
|
2695
|
+
int n = size(phi.genIm[1]);
|
|
2696
|
+
int i;
|
|
2697
|
+
int j = 1;
|
|
2698
|
+
|
|
2699
|
+
for(i = 1; i <= n; i++)
|
|
2700
|
+
{
|
|
2701
|
+
// Both lists are sorted by the monomial ordering on the differential algebra
|
|
2702
|
+
// So the generators are sorted the same way in both lists
|
|
2703
|
+
// If given df does not involve all generators avoid gaps using j
|
|
2704
|
+
if(j <= k)
|
|
2705
|
+
{
|
|
2706
|
+
if(df_gen_repr[j][1] == phi.genIm[1][i])
|
|
2707
|
+
{
|
|
2708
|
+
df_eval = df_eval + df_gen_repr[j][2]*phi.genIm[2][i];
|
|
2709
|
+
j++;
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
return(df_eval);
|
|
2714
|
+
}
|
|
2715
|
+
example
|
|
2716
|
+
{
|
|
2717
|
+
"EXAMPLE:"; echo = 2;
|
|
2718
|
+
ring R = 13,(x,y,z,t),dp;
|
|
2719
|
+
diffAlgebra();
|
|
2720
|
+
|
|
2721
|
+
/////////////////////////////////
|
|
2722
|
+
// Construction of derivations //
|
|
2723
|
+
/////////////////////////////////
|
|
2724
|
+
|
|
2725
|
+
list L_1; L_1[1] = list(dx,dt,dz,dy); L_1[2] = list(x,y,z,t);
|
|
2726
|
+
derivation phi_1 = L_1; phi_1;
|
|
2727
|
+
|
|
2728
|
+
list L_2; L_2[1] = list(dx,dy,dz,dt); L_2[2] = list(y2x-zt,zt + y, t3-x, y4-y5);
|
|
2729
|
+
derivation phi_2 = L_2; phi_2;
|
|
2730
|
+
|
|
2731
|
+
list L_3; L_3[1] = list(dx,dy,dz,dt); L_3[2] = list(0,0,0,0);
|
|
2732
|
+
derivation phi_3 = L_3; phi_3;
|
|
2733
|
+
|
|
2734
|
+
///////////////////////////////
|
|
2735
|
+
// Evaluation of derivations //
|
|
2736
|
+
///////////////////////////////
|
|
2737
|
+
|
|
2738
|
+
phi_1(0);
|
|
2739
|
+
phi_1(dx+dy+dz+dt);
|
|
2740
|
+
phi_1(3*dx - dt);
|
|
2741
|
+
|
|
2742
|
+
phi_2(dt);
|
|
2743
|
+
phi_2(dx+dt);
|
|
2744
|
+
phi_2(dx - dy + (x3-y2)*dz + 12*dt);
|
|
2745
|
+
|
|
2746
|
+
phi_3(dx);
|
|
2747
|
+
phi_3(dy);
|
|
2748
|
+
phi_3(dx - 24*(dx + dz) - x4*dy);
|
|
2749
|
+
|
|
2750
|
+
kill Omega_R,dx,dy,dz,dt,L_1,L_2,L_3,phi_1,phi_2,phi_3;
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
|
|
2754
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2755
|
+
//------------ Procedures for computing the Lie-Derivative -------------------//
|
|
2756
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2757
|
+
|
|
2758
|
+
|
|
2759
|
+
proc derivationContractionGen(derivation phi, difform d_gen)
|
|
2760
|
+
"USAGE: derivationContractionGen(phi,d_gen); phi derivation, d_gen difform
|
|
2761
|
+
ASSUME: d_gen is a generator of the differential algebra
|
|
2762
|
+
RETURN: the image of d_gen under the contraction map i_phi
|
|
2763
|
+
REMARKS: The formula for the contraction map applied to a generator of degree l is given by:
|
|
2764
|
+
i_phi^(l)(dx_k*...*dx_j) = sum(i=1,..l)(-1)^(i+1) * phi(dx_i) * (dx_k*...*dx_j / dx_i)
|
|
2765
|
+
NOTE: this procedure should only be applied to generators
|
|
2766
|
+
KEYWORDS: contraction; generator
|
|
2767
|
+
SEE ALSO: derivationContraction"
|
|
2768
|
+
{
|
|
2769
|
+
// Sort the list, that dx_1 is the first form, dx_2 the second,...
|
|
2770
|
+
list gen_list = phi.genIm[1];
|
|
2771
|
+
gen_list = difformListSort(gen_list,"gen","ls");
|
|
2772
|
+
|
|
2773
|
+
int n = size(gen_list);
|
|
2774
|
+
int j = 1;
|
|
2775
|
+
int i;
|
|
2776
|
+
difform applic = 0;
|
|
2777
|
+
|
|
2778
|
+
// Go through all degree-1 generators and test if, dx_i occurs in d_gen
|
|
2779
|
+
for(i = 1; i <= n; i++)
|
|
2780
|
+
{
|
|
2781
|
+
if(d_gen / gen_list[i] != 0)
|
|
2782
|
+
{
|
|
2783
|
+
applic = applic + ((-1)^(j+1))*derivationEval(phi,gen_list[i])*(d_gen/gen_list[i]);
|
|
2784
|
+
j++;
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
return(applic);
|
|
2788
|
+
}
|
|
2789
|
+
|
|
2790
|
+
|
|
2791
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2792
|
+
|
|
2793
|
+
|
|
2794
|
+
proc derivationContraction(derivation phi, difform df)
|
|
2795
|
+
"USAGE: derivationContraction(phi,df); phi derivation, df difform
|
|
2796
|
+
RETURN: the image of the contraction map i_phi applied to df
|
|
2797
|
+
REMARKS: Since the contraction map is linear, it is only applied to the generators:
|
|
2798
|
+
So the image of df under i_phi is a sum, where the coefficients are multiplied
|
|
2799
|
+
by the image of the generators.
|
|
2800
|
+
NOTE: over the basering, the contraction map is the 0-map
|
|
2801
|
+
KEYWORDS: contraction
|
|
2802
|
+
SEE ALSO: derivationContraction, derivationLie
|
|
2803
|
+
EXAMPLE: example derivationContraction; shows an example"
|
|
2804
|
+
{
|
|
2805
|
+
list coef_list = difformCoef(df);
|
|
2806
|
+
int k = size(coef_list);
|
|
2807
|
+
int i;
|
|
2808
|
+
difform applic = 0;
|
|
2809
|
+
|
|
2810
|
+
// Apply the contraction map to the generators since it is linear
|
|
2811
|
+
for(i = 1; i <= k; i++)
|
|
2812
|
+
{
|
|
2813
|
+
applic = applic + coef_list[i][2]*derivationContractionGen(phi,coef_list[i][1]);
|
|
2814
|
+
}
|
|
2815
|
+
return(applic);
|
|
2816
|
+
}
|
|
2817
|
+
example
|
|
2818
|
+
{
|
|
2819
|
+
"EXAMPLE:"; echo = 2;
|
|
2820
|
+
ring R = 0,(x,y,z),lp;
|
|
2821
|
+
diffAlgebra();
|
|
2822
|
+
|
|
2823
|
+
/////////////////////////////////
|
|
2824
|
+
// Construction of derivations //
|
|
2825
|
+
/////////////////////////////////
|
|
2826
|
+
|
|
2827
|
+
list L_1; L_1[1] = list(dx,dy,dz); L_1[2] = list(x,y,z);
|
|
2828
|
+
derivation phi_1 = L_1; phi_1;
|
|
2829
|
+
|
|
2830
|
+
list L_2; L_2[1] = list(dx,dy,dz); L_2[2] = list(y-x,z-y,x-z);
|
|
2831
|
+
derivation phi_2 = L_2; phi_2;
|
|
2832
|
+
|
|
2833
|
+
|
|
2834
|
+
/////////////////////////////////
|
|
2835
|
+
// Contractions of derivations //
|
|
2836
|
+
/////////////////////////////////
|
|
2837
|
+
|
|
2838
|
+
derivationContraction(phi_1,dx+dy+dz);
|
|
2839
|
+
derivationContraction(phi_1,x2*y4-z);
|
|
2840
|
+
derivationContraction(phi_1,x2*dx*dy + dx*dy*dz);
|
|
2841
|
+
|
|
2842
|
+
derivationContraction(phi_2,dx+dy+dz);
|
|
2843
|
+
derivationContraction(phi_2,dx*dy*dz - dx*dy + dx*dz);
|
|
2844
|
+
|
|
2845
|
+
kill Omega_R,dx,dy,dz,L_1,L_2,phi_1,phi_2;
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
|
|
2849
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2850
|
+
|
|
2851
|
+
|
|
2852
|
+
proc derivationLie(derivation phi, difform df)
|
|
2853
|
+
"USAGE: diff(phi,df); phi derivation, df difform
|
|
2854
|
+
RETURN: the image of df under the Lie-derivative L_phi
|
|
2855
|
+
REMARKS: The map L_phi is the anticommutator of the contraction map i_phi
|
|
2856
|
+
and the differential d:
|
|
2857
|
+
(i_phi o d) + (d o i_phi)
|
|
2858
|
+
KEYWORDS: Lie; contraction
|
|
2859
|
+
SEE ALSO: derivationContraction, difformDiff
|
|
2860
|
+
EXAMPLE: example derivationLie; shows an example"
|
|
2861
|
+
{
|
|
2862
|
+
difform lie_form = derivationContraction(phi,difformDiff(df)) + difformDiff(derivationContraction(phi,df));
|
|
2863
|
+
return(lie_form);
|
|
2864
|
+
}
|
|
2865
|
+
example
|
|
2866
|
+
{
|
|
2867
|
+
"EXAMPLE:"; echo = 2;
|
|
2868
|
+
ring R = 0,(x,y,z),lp;
|
|
2869
|
+
diffAlgebra();
|
|
2870
|
+
|
|
2871
|
+
/////////////////////////////////
|
|
2872
|
+
// Construction of derivations //
|
|
2873
|
+
/////////////////////////////////
|
|
2874
|
+
|
|
2875
|
+
list L; L[1] = list(dx,dy,dz); L[2] = list(x2,y2,z2);
|
|
2876
|
+
derivation phi = L; phi;
|
|
2877
|
+
|
|
2878
|
+
derivation phi_poly = x-y;
|
|
2879
|
+
|
|
2880
|
+
///////////////////////////////////
|
|
2881
|
+
// Lie-derivative of derivations //
|
|
2882
|
+
///////////////////////////////////
|
|
2883
|
+
|
|
2884
|
+
diff(phi,dx);
|
|
2885
|
+
diff(phi,dx*dy);
|
|
2886
|
+
diff(phi,dx*dy*dz);
|
|
2887
|
+
diff(phi,dx*dy + dy*dx);
|
|
2888
|
+
diff(phi,dx*dy - dy*dx);
|
|
2889
|
+
|
|
2890
|
+
diff(phi_poly,dx);
|
|
2891
|
+
diff(phi_poly,dx-dy);
|
|
2892
|
+
diff(phi_poly,dx+dy);
|
|
2893
|
+
diff(phi_poly,dx*(x2-y4) + 1);
|
|
2894
|
+
|
|
2895
|
+
kill Omega_R,dx,dy,dz,L,phi,phi_poly;
|
|
2896
|
+
}
|
|
2897
|
+
|
|
2898
|
+
|
|
2899
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2900
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2901
|
+
|
|
2902
|
+
|
|
2903
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2904
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2905
|
+
// Test examples //
|
|
2906
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2907
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2908
|
+
|
|
2909
|
+
|
|
2910
|
+
// EXAMPLE: differential algebra over ring of characteristic 0
|
|
2911
|
+
proc diffAlgebra_example_1()
|
|
2912
|
+
{
|
|
2913
|
+
ring R = 0,(x,y,z),dp;
|
|
2914
|
+
diffAlgebra();
|
|
2915
|
+
exportto(Top,R);
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
|
|
2919
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2920
|
+
|
|
2921
|
+
|
|
2922
|
+
// EXAMPLE: differential algebra over big ring of characteristic 0 and block ordering
|
|
2923
|
+
proc diffAlgebra_example_2()
|
|
2924
|
+
{
|
|
2925
|
+
ring R = 0,(a,b,x,y,z,t,s,e,r,w,i),(ls(3),dp(4),lp);
|
|
2926
|
+
diffAlgebra();
|
|
2927
|
+
exportto(Top,R);
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2930
|
+
|
|
2931
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
// EXAMPLE: differential algebra over ring of positive characteristic
|
|
2935
|
+
proc diffAlgebra_example_3()
|
|
2936
|
+
{
|
|
2937
|
+
ring R = 31,(a,b,x),dp;
|
|
2938
|
+
diffAlgebra();
|
|
2939
|
+
exportto(Top,R);
|
|
2940
|
+
}
|
|
2941
|
+
|
|
2942
|
+
|
|
2943
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2944
|
+
|
|
2945
|
+
|
|
2946
|
+
// EXAMPLE: differential algebra over quotient ring
|
|
2947
|
+
proc diffAlgebra_example_4()
|
|
2948
|
+
{
|
|
2949
|
+
ring S = 0,(x,y,z),lp;
|
|
2950
|
+
ideal I = x2-y4,xyz;
|
|
2951
|
+
qring R = std(I);
|
|
2952
|
+
diffAlgebra();
|
|
2953
|
+
exportto(Top,R);
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
|
|
2957
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2958
|
+
|
|
2959
|
+
|
|
2960
|
+
// EXAMPLE: differential form over ring of characteristic 0
|
|
2961
|
+
proc difform_example_1()
|
|
2962
|
+
{
|
|
2963
|
+
ring R = 0,(x,y,z),ds;
|
|
2964
|
+
diffAlgebra();
|
|
2965
|
+
|
|
2966
|
+
difform df = 3*dx*x4 + (y4-y5)*dx*dy - dx*dy*dz + 1/7*dz - dx*x2*dz + 8*dy - dy*dz +12;
|
|
2967
|
+
|
|
2968
|
+
exportto(Top,R);
|
|
2969
|
+
exportto(Top,df);
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2974
|
+
|
|
2975
|
+
|
|
2976
|
+
// EXAMPLE: differential form over ring of positive characteristic
|
|
2977
|
+
proc difform_example_2()
|
|
2978
|
+
{
|
|
2979
|
+
ring R = 31,(x,y,z,a,b,c),lp;
|
|
2980
|
+
diffAlgebra();
|
|
2981
|
+
|
|
2982
|
+
difform df = -5*c4*dc*dz*dy + 3*dx*dz - 13*a4*da*db + 12*a4*da*db + x8*dx*dy + 12 + dy*da + dz*dx - (y4-y5)*x12*dx*db*dz - dx - dy + db + x2*db*dy;
|
|
2983
|
+
|
|
2984
|
+
exportto(Top,R);
|
|
2985
|
+
exportto(Top,df);
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
|
|
2989
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
2990
|
+
|
|
2991
|
+
|
|
2992
|
+
// EXAMPLE: derivation by list
|
|
2993
|
+
proc derivation_example_1()
|
|
2994
|
+
{
|
|
2995
|
+
ring R = 0,(x,y,z),lp;
|
|
2996
|
+
diffAlgebra();
|
|
2997
|
+
|
|
2998
|
+
list L;
|
|
2999
|
+
L[1] = list(dx,dy,dz);
|
|
3000
|
+
L[2] = list(x,y,z);
|
|
3001
|
+
|
|
3002
|
+
derivation phi = L;
|
|
3003
|
+
|
|
3004
|
+
exportto(Top,R);
|
|
3005
|
+
exportto(Top,phi);
|
|
3006
|
+
}
|
|
3007
|
+
|
|
3008
|
+
|
|
3009
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
3010
|
+
|
|
3011
|
+
|
|
3012
|
+
// EXAMPLE: derivation by list
|
|
3013
|
+
proc derivation_example_2()
|
|
3014
|
+
{
|
|
3015
|
+
ring R = 0,(a,b,c,x,y,z),lp;
|
|
3016
|
+
diffAlgebra();
|
|
3017
|
+
|
|
3018
|
+
list L;
|
|
3019
|
+
L[1] = list(dx,dy,dz,da,db,dc);
|
|
3020
|
+
L[2] = list(1,12x-y,z4aby, 2*b5x,0,xyz-abc);
|
|
3021
|
+
derivation phi = L;
|
|
3022
|
+
|
|
3023
|
+
exportto(Top,R);
|
|
3024
|
+
exportto(Top,phi);
|
|
3025
|
+
}
|
|
3026
|
+
|
|
3027
|
+
|
|
3028
|
+
////////////////////////////////////////////////////////////////////////////////
|
|
3029
|
+
|
|
3030
|
+
|
|
3031
|
+
// EXAMPLE: derivations by list
|
|
3032
|
+
proc derivation_example_3()
|
|
3033
|
+
{
|
|
3034
|
+
ring R = 0,(x,y,z),dp;
|
|
3035
|
+
diffAlgebra();
|
|
3036
|
+
|
|
3037
|
+
list L;
|
|
3038
|
+
L[1] = list(dx,dy,dz);
|
|
3039
|
+
L[2] = list(1,x2-y,z+x);
|
|
3040
|
+
derivation phi_1 = L;
|
|
3041
|
+
|
|
3042
|
+
L[1] = list(dx,dy,dz);
|
|
3043
|
+
L[2] = list(x2,x2,z);
|
|
3044
|
+
derivation phi_2 = L;
|
|
3045
|
+
|
|
3046
|
+
L[1] = list(dx,dy,dz);
|
|
3047
|
+
L[2] = list(0,3,xyz);
|
|
3048
|
+
derivation phi_3 = L;
|
|
3049
|
+
|
|
3050
|
+
exportto(Top,R);
|
|
3051
|
+
exportto(Top,phi_1);
|
|
3052
|
+
exportto(Top,phi_2);
|
|
3053
|
+
exportto(Top,phi_3);
|
|
3054
|
+
}
|
|
3055
|
+
|