passagemath-singular 10.6.31rc3__cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of passagemath-singular might be problematic. Click here for more details.
- PySingular.cpython-314-x86_64-linux-gnu.so +0 -0
- passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
- passagemath_singular-10.6.31rc3.dist-info/RECORD +491 -0
- passagemath_singular-10.6.31rc3.dist-info/WHEEL +6 -0
- passagemath_singular-10.6.31rc3.dist-info/top_level.txt +3 -0
- passagemath_singular.libs/libSingular-4-20aec911.4.1.so +0 -0
- passagemath_singular.libs/libcddgmp-21acf0c6.so.0.1.3 +0 -0
- passagemath_singular.libs/libfactory-4-fcee31da.4.1.so +0 -0
- passagemath_singular.libs/libflint-66e12231.so.21.0.0 +0 -0
- passagemath_singular.libs/libgf2x-a4cdec90.so.3.0.0 +0 -0
- passagemath_singular.libs/libgfortran-83c28eba.so.5.0.0 +0 -0
- passagemath_singular.libs/libgmp-6e109695.so.10.5.0 +0 -0
- passagemath_singular.libs/libgsl-cda90e79.so.28.0.0 +0 -0
- passagemath_singular.libs/libmpfr-82690d50.so.6.2.1 +0 -0
- passagemath_singular.libs/libntl-e6f0d543.so.44.0.1 +0 -0
- passagemath_singular.libs/libomalloc-0-5c9e866e.9.6.so +0 -0
- passagemath_singular.libs/libopenblasp-r0-6dcb67f9.3.29.so +0 -0
- passagemath_singular.libs/libpolys-4-5c0a87e0.4.1.so +0 -0
- passagemath_singular.libs/libquadmath-2284e583.so.0.0.0 +0 -0
- passagemath_singular.libs/libreadline-ea270e21.so.8.2 +0 -0
- passagemath_singular.libs/libsingular_resources-4-a1aafc6d.4.1.so +0 -0
- passagemath_singular.libs/libtinfo-ceb117d9.so.6.3 +0 -0
- sage/algebras/all__sagemath_singular.py +3 -0
- sage/algebras/fusion_rings/all.py +19 -0
- sage/algebras/fusion_rings/f_matrix.py +2448 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +5 -0
- sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +538 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +3 -0
- sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +331 -0
- sage/algebras/fusion_rings/fusion_double.py +899 -0
- sage/algebras/fusion_rings/fusion_ring.py +1580 -0
- sage/algebras/fusion_rings/poly_tup_engine.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/fusion_rings/poly_tup_engine.pxd +24 -0
- sage/algebras/fusion_rings/poly_tup_engine.pyx +579 -0
- sage/algebras/fusion_rings/shm_managers.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/fusion_rings/shm_managers.pxd +24 -0
- sage/algebras/fusion_rings/shm_managers.pyx +780 -0
- sage/algebras/letterplace/all.py +1 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.pxd +18 -0
- sage/algebras/letterplace/free_algebra_element_letterplace.pyx +755 -0
- sage/algebras/letterplace/free_algebra_letterplace.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/letterplace/free_algebra_letterplace.pxd +35 -0
- sage/algebras/letterplace/free_algebra_letterplace.pyx +914 -0
- sage/algebras/letterplace/letterplace_ideal.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/letterplace/letterplace_ideal.pyx +408 -0
- sage/algebras/quatalg/all.py +2 -0
- sage/algebras/quatalg/quaternion_algebra.py +4778 -0
- sage/algebras/quatalg/quaternion_algebra_cython.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
- sage/algebras/quatalg/quaternion_algebra_element.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/algebras/quatalg/quaternion_algebra_element.pxd +29 -0
- sage/algebras/quatalg/quaternion_algebra_element.pyx +2176 -0
- sage/all__sagemath_singular.py +11 -0
- sage/ext_data/all__sagemath_singular.py +1 -0
- sage/ext_data/singular/function_field/core.lib +98 -0
- sage/interfaces/all__sagemath_singular.py +1 -0
- sage/interfaces/singular.py +2835 -0
- sage/libs/all__sagemath_singular.py +1 -0
- sage/libs/singular/__init__.py +1 -0
- sage/libs/singular/decl.pxd +1168 -0
- sage/libs/singular/function.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/libs/singular/function.pxd +87 -0
- sage/libs/singular/function.pyx +1901 -0
- sage/libs/singular/function_factory.py +61 -0
- sage/libs/singular/groebner_strategy.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/libs/singular/groebner_strategy.pxd +22 -0
- sage/libs/singular/groebner_strategy.pyx +582 -0
- sage/libs/singular/option.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/libs/singular/option.pyx +671 -0
- sage/libs/singular/polynomial.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/libs/singular/polynomial.pxd +39 -0
- sage/libs/singular/polynomial.pyx +661 -0
- sage/libs/singular/ring.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/libs/singular/ring.pxd +58 -0
- sage/libs/singular/ring.pyx +893 -0
- sage/libs/singular/singular.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/libs/singular/singular.pxd +72 -0
- sage/libs/singular/singular.pyx +1944 -0
- sage/libs/singular/standard_options.py +145 -0
- sage/matrix/all__sagemath_singular.py +1 -0
- sage/matrix/matrix_mpolynomial_dense.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/matrix/matrix_mpolynomial_dense.pxd +7 -0
- sage/matrix/matrix_mpolynomial_dense.pyx +615 -0
- sage/rings/all__sagemath_singular.py +1 -0
- sage/rings/function_field/all__sagemath_singular.py +1 -0
- sage/rings/function_field/derivations_polymod.py +911 -0
- sage/rings/function_field/element_polymod.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/function_field/element_polymod.pyx +406 -0
- sage/rings/function_field/function_field_polymod.py +2611 -0
- sage/rings/function_field/ideal_polymod.py +1775 -0
- sage/rings/function_field/order_polymod.py +1475 -0
- sage/rings/function_field/place_polymod.py +681 -0
- sage/rings/polynomial/all__sagemath_singular.py +1 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +5 -0
- sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +339 -0
- sage/rings/polynomial/multi_polynomial_libsingular.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/multi_polynomial_libsingular.pxd +30 -0
- sage/rings/polynomial/multi_polynomial_libsingular.pyx +6277 -0
- sage/rings/polynomial/plural.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/rings/polynomial/plural.pxd +48 -0
- sage/rings/polynomial/plural.pyx +3171 -0
- sage/symbolic/all__sagemath_singular.py +1 -0
- sage/symbolic/comparison_impl.pxi +428 -0
- sage/symbolic/constants_c_impl.pxi +178 -0
- sage/symbolic/expression.cpython-314-x86_64-linux-gnu.so +0 -0
- sage/symbolic/expression.pxd +7 -0
- sage/symbolic/expression.pyx +14200 -0
- sage/symbolic/getitem_impl.pxi +202 -0
- sage/symbolic/pynac.pxi +572 -0
- sage/symbolic/pynac_constant_impl.pxi +133 -0
- sage/symbolic/pynac_function_impl.pxi +206 -0
- sage/symbolic/pynac_impl.pxi +2576 -0
- sage/symbolic/pynac_wrap.h +124 -0
- sage/symbolic/series_impl.pxi +272 -0
- sage/symbolic/substitution_map_impl.pxi +94 -0
- sage_wheels/bin/ESingular +0 -0
- sage_wheels/bin/Singular +0 -0
- sage_wheels/bin/TSingular +0 -0
- sage_wheels/lib/singular/MOD/cohomo.la +41 -0
- sage_wheels/lib/singular/MOD/cohomo.so +0 -0
- sage_wheels/lib/singular/MOD/customstd.la +41 -0
- sage_wheels/lib/singular/MOD/customstd.so +0 -0
- sage_wheels/lib/singular/MOD/freealgebra.la +41 -0
- sage_wheels/lib/singular/MOD/freealgebra.so +0 -0
- sage_wheels/lib/singular/MOD/gfanlib.la +41 -0
- sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
- sage_wheels/lib/singular/MOD/gitfan.la +41 -0
- sage_wheels/lib/singular/MOD/gitfan.so +0 -0
- sage_wheels/lib/singular/MOD/interval.la +41 -0
- sage_wheels/lib/singular/MOD/interval.so +0 -0
- sage_wheels/lib/singular/MOD/loctriv.la +41 -0
- sage_wheels/lib/singular/MOD/loctriv.so +0 -0
- sage_wheels/lib/singular/MOD/machinelearning.la +41 -0
- sage_wheels/lib/singular/MOD/machinelearning.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldQ.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldQ.so +0 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldZp.la +41 -0
- sage_wheels/lib/singular/MOD/p_Procs_FieldZp.so +0 -0
- sage_wheels/lib/singular/MOD/partialgb.la +41 -0
- sage_wheels/lib/singular/MOD/partialgb.so +0 -0
- sage_wheels/lib/singular/MOD/pyobject.la +41 -0
- sage_wheels/lib/singular/MOD/pyobject.so +0 -0
- sage_wheels/lib/singular/MOD/singmathic.la +41 -0
- sage_wheels/lib/singular/MOD/singmathic.so +0 -0
- sage_wheels/lib/singular/MOD/sispasm.la +41 -0
- sage_wheels/lib/singular/MOD/sispasm.so +0 -0
- sage_wheels/lib/singular/MOD/subsets.la +41 -0
- sage_wheels/lib/singular/MOD/subsets.so +0 -0
- sage_wheels/lib/singular/MOD/systhreads.la +41 -0
- sage_wheels/lib/singular/MOD/systhreads.so +0 -0
- sage_wheels/lib/singular/MOD/syzextra.la +41 -0
- sage_wheels/lib/singular/MOD/syzextra.so +0 -0
- sage_wheels/libexec/singular/MOD/change_cost +0 -0
- sage_wheels/libexec/singular/MOD/singularsurf +11 -0
- sage_wheels/libexec/singular/MOD/singularsurf_jupyter +9 -0
- sage_wheels/libexec/singular/MOD/singularsurf_win +10 -0
- sage_wheels/libexec/singular/MOD/solve_IP +0 -0
- sage_wheels/libexec/singular/MOD/surfex +16 -0
- sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
- sage_wheels/share/factory/gftables/10201 +342 -0
- sage_wheels/share/factory/gftables/1024 +37 -0
- sage_wheels/share/factory/gftables/10609 +356 -0
- sage_wheels/share/factory/gftables/11449 +384 -0
- sage_wheels/share/factory/gftables/11881 +398 -0
- sage_wheels/share/factory/gftables/121 +6 -0
- sage_wheels/share/factory/gftables/12167 +408 -0
- sage_wheels/share/factory/gftables/125 +7 -0
- sage_wheels/share/factory/gftables/12769 +428 -0
- sage_wheels/share/factory/gftables/128 +7 -0
- sage_wheels/share/factory/gftables/1331 +47 -0
- sage_wheels/share/factory/gftables/1369 +48 -0
- sage_wheels/share/factory/gftables/14641 +490 -0
- sage_wheels/share/factory/gftables/15625 +523 -0
- sage_wheels/share/factory/gftables/16 +3 -0
- sage_wheels/share/factory/gftables/16129 +540 -0
- sage_wheels/share/factory/gftables/16384 +549 -0
- sage_wheels/share/factory/gftables/16807 +563 -0
- sage_wheels/share/factory/gftables/1681 +58 -0
- sage_wheels/share/factory/gftables/169 +8 -0
- sage_wheels/share/factory/gftables/17161 +574 -0
- sage_wheels/share/factory/gftables/1849 +64 -0
- sage_wheels/share/factory/gftables/18769 +628 -0
- sage_wheels/share/factory/gftables/19321 +646 -0
- sage_wheels/share/factory/gftables/19683 +659 -0
- sage_wheels/share/factory/gftables/2048 +71 -0
- sage_wheels/share/factory/gftables/2187 +75 -0
- sage_wheels/share/factory/gftables/2197 +76 -0
- sage_wheels/share/factory/gftables/2209 +76 -0
- sage_wheels/share/factory/gftables/22201 +742 -0
- sage_wheels/share/factory/gftables/22801 +762 -0
- sage_wheels/share/factory/gftables/2401 +82 -0
- sage_wheels/share/factory/gftables/243 +11 -0
- sage_wheels/share/factory/gftables/24389 +815 -0
- sage_wheels/share/factory/gftables/24649 +824 -0
- sage_wheels/share/factory/gftables/25 +3 -0
- sage_wheels/share/factory/gftables/256 +11 -0
- sage_wheels/share/factory/gftables/26569 +888 -0
- sage_wheels/share/factory/gftables/27 +3 -0
- sage_wheels/share/factory/gftables/27889 +932 -0
- sage_wheels/share/factory/gftables/2809 +96 -0
- sage_wheels/share/factory/gftables/28561 +954 -0
- sage_wheels/share/factory/gftables/289 +12 -0
- sage_wheels/share/factory/gftables/29791 +995 -0
- sage_wheels/share/factory/gftables/29929 +1000 -0
- sage_wheels/share/factory/gftables/3125 +107 -0
- sage_wheels/share/factory/gftables/32 +4 -0
- sage_wheels/share/factory/gftables/32041 +1070 -0
- sage_wheels/share/factory/gftables/32761 +1094 -0
- sage_wheels/share/factory/gftables/32768 +1095 -0
- sage_wheels/share/factory/gftables/343 +14 -0
- sage_wheels/share/factory/gftables/3481 +118 -0
- sage_wheels/share/factory/gftables/361 +14 -0
- sage_wheels/share/factory/gftables/36481 +1218 -0
- sage_wheels/share/factory/gftables/3721 +126 -0
- sage_wheels/share/factory/gftables/37249 +1244 -0
- sage_wheels/share/factory/gftables/38809 +1296 -0
- sage_wheels/share/factory/gftables/39601 +1322 -0
- sage_wheels/share/factory/gftables/4 +3 -0
- sage_wheels/share/factory/gftables/4096 +139 -0
- sage_wheels/share/factory/gftables/44521 +1486 -0
- sage_wheels/share/factory/gftables/4489 +152 -0
- sage_wheels/share/factory/gftables/49 +4 -0
- sage_wheels/share/factory/gftables/4913 +166 -0
- sage_wheels/share/factory/gftables/49729 +1660 -0
- sage_wheels/share/factory/gftables/5041 +170 -0
- sage_wheels/share/factory/gftables/50653 +1691 -0
- sage_wheels/share/factory/gftables/512 +20 -0
- sage_wheels/share/factory/gftables/51529 +1720 -0
- sage_wheels/share/factory/gftables/52441 +1750 -0
- sage_wheels/share/factory/gftables/529 +20 -0
- sage_wheels/share/factory/gftables/5329 +180 -0
- sage_wheels/share/factory/gftables/54289 +1812 -0
- sage_wheels/share/factory/gftables/57121 +1906 -0
- sage_wheels/share/factory/gftables/58081 +1938 -0
- sage_wheels/share/factory/gftables/59049 +1971 -0
- sage_wheels/share/factory/gftables/6241 +210 -0
- sage_wheels/share/factory/gftables/625 +23 -0
- sage_wheels/share/factory/gftables/63001 +2102 -0
- sage_wheels/share/factory/gftables/64 +5 -0
- sage_wheels/share/factory/gftables/6561 +221 -0
- sage_wheels/share/factory/gftables/6859 +231 -0
- sage_wheels/share/factory/gftables/6889 +232 -0
- sage_wheels/share/factory/gftables/729 +27 -0
- sage_wheels/share/factory/gftables/7921 +266 -0
- sage_wheels/share/factory/gftables/8 +3 -0
- sage_wheels/share/factory/gftables/81 +5 -0
- sage_wheels/share/factory/gftables/8192 +276 -0
- sage_wheels/share/factory/gftables/841 +30 -0
- sage_wheels/share/factory/gftables/9 +3 -0
- sage_wheels/share/factory/gftables/9409 +316 -0
- sage_wheels/share/factory/gftables/961 +34 -0
- sage_wheels/share/info/singular.info +191898 -0
- sage_wheels/share/singular/LIB/GND.lib +1359 -0
- sage_wheels/share/singular/LIB/JMBTest.lib +976 -0
- sage_wheels/share/singular/LIB/JMSConst.lib +1363 -0
- sage_wheels/share/singular/LIB/KVequiv.lib +699 -0
- sage_wheels/share/singular/LIB/SingularityDBM.lib +491 -0
- sage_wheels/share/singular/LIB/VecField.lib +1542 -0
- sage_wheels/share/singular/LIB/absfact.lib +959 -0
- sage_wheels/share/singular/LIB/ainvar.lib +730 -0
- sage_wheels/share/singular/LIB/aksaka.lib +419 -0
- sage_wheels/share/singular/LIB/alexpoly.lib +2542 -0
- sage_wheels/share/singular/LIB/algebra.lib +1193 -0
- sage_wheels/share/singular/LIB/all.lib +136 -0
- sage_wheels/share/singular/LIB/arcpoint.lib +514 -0
- sage_wheels/share/singular/LIB/arnold.lib +4553 -0
- sage_wheels/share/singular/LIB/arnoldclassify.lib +2058 -0
- sage_wheels/share/singular/LIB/arr.lib +3486 -0
- sage_wheels/share/singular/LIB/assprimeszerodim.lib +755 -0
- sage_wheels/share/singular/LIB/autgradalg.lib +3361 -0
- sage_wheels/share/singular/LIB/bfun.lib +1964 -0
- sage_wheels/share/singular/LIB/bimodules.lib +774 -0
- sage_wheels/share/singular/LIB/brillnoether.lib +226 -0
- sage_wheels/share/singular/LIB/brnoeth.lib +5017 -0
- sage_wheels/share/singular/LIB/central.lib +2169 -0
- sage_wheels/share/singular/LIB/chern.lib +4162 -0
- sage_wheels/share/singular/LIB/cimonom.lib +571 -0
- sage_wheels/share/singular/LIB/cisimplicial.lib +1835 -0
- sage_wheels/share/singular/LIB/classify.lib +3239 -0
- sage_wheels/share/singular/LIB/classify2.lib +1462 -0
- sage_wheels/share/singular/LIB/classifyMapGerms.lib +1515 -0
- sage_wheels/share/singular/LIB/classify_aeq.lib +3253 -0
- sage_wheels/share/singular/LIB/classifyceq.lib +2092 -0
- sage_wheels/share/singular/LIB/classifyci.lib +1133 -0
- sage_wheels/share/singular/LIB/combinat.lib +91 -0
- sage_wheels/share/singular/LIB/compregb.lib +276 -0
- sage_wheels/share/singular/LIB/control.lib +1636 -0
- sage_wheels/share/singular/LIB/crypto.lib +3795 -0
- sage_wheels/share/singular/LIB/curveInv.lib +667 -0
- sage_wheels/share/singular/LIB/curvepar.lib +1817 -0
- sage_wheels/share/singular/LIB/customstd.lib +100 -0
- sage_wheels/share/singular/LIB/deRham.lib +5979 -0
- sage_wheels/share/singular/LIB/decodegb.lib +2134 -0
- sage_wheels/share/singular/LIB/decomp.lib +1655 -0
- sage_wheels/share/singular/LIB/deflation.lib +872 -0
- sage_wheels/share/singular/LIB/deform.lib +925 -0
- sage_wheels/share/singular/LIB/difform.lib +3055 -0
- sage_wheels/share/singular/LIB/divisors.lib +750 -0
- sage_wheels/share/singular/LIB/dmod.lib +5817 -0
- sage_wheels/share/singular/LIB/dmodapp.lib +3269 -0
- sage_wheels/share/singular/LIB/dmodideal.lib +1211 -0
- sage_wheels/share/singular/LIB/dmodloc.lib +2645 -0
- sage_wheels/share/singular/LIB/dmodvar.lib +818 -0
- sage_wheels/share/singular/LIB/dummy.lib +17 -0
- sage_wheels/share/singular/LIB/elim.lib +1009 -0
- sage_wheels/share/singular/LIB/ellipticcovers.lib +548 -0
- sage_wheels/share/singular/LIB/enumpoints.lib +146 -0
- sage_wheels/share/singular/LIB/equising.lib +2127 -0
- sage_wheels/share/singular/LIB/ffmodstd.lib +2384 -0
- sage_wheels/share/singular/LIB/ffsolve.lib +1289 -0
- sage_wheels/share/singular/LIB/findifs.lib +778 -0
- sage_wheels/share/singular/LIB/finitediff.lib +1768 -0
- sage_wheels/share/singular/LIB/finvar.lib +7989 -0
- sage_wheels/share/singular/LIB/fpadim.lib +2429 -0
- sage_wheels/share/singular/LIB/fpalgebras.lib +1666 -0
- sage_wheels/share/singular/LIB/fpaprops.lib +1462 -0
- sage_wheels/share/singular/LIB/freegb.lib +3853 -0
- sage_wheels/share/singular/LIB/general.lib +1350 -0
- sage_wheels/share/singular/LIB/gfan.lib +1768 -0
- sage_wheels/share/singular/LIB/gitfan.lib +3130 -0
- sage_wheels/share/singular/LIB/gkdim.lib +99 -0
- sage_wheels/share/singular/LIB/gmspoly.lib +589 -0
- sage_wheels/share/singular/LIB/gmssing.lib +1739 -0
- sage_wheels/share/singular/LIB/goettsche.lib +909 -0
- sage_wheels/share/singular/LIB/graal.lib +1366 -0
- sage_wheels/share/singular/LIB/gradedModules.lib +2541 -0
- sage_wheels/share/singular/LIB/graphics.lib +360 -0
- sage_wheels/share/singular/LIB/grobcov.lib +7706 -0
- sage_wheels/share/singular/LIB/groups.lib +1123 -0
- sage_wheels/share/singular/LIB/grwalk.lib +507 -0
- sage_wheels/share/singular/LIB/hdepth.lib +194 -0
- sage_wheels/share/singular/LIB/help.cnf +57 -0
- sage_wheels/share/singular/LIB/hess.lib +1946 -0
- sage_wheels/share/singular/LIB/hnoether.lib +4292 -0
- sage_wheels/share/singular/LIB/hodge.lib +400 -0
- sage_wheels/share/singular/LIB/homolog.lib +1965 -0
- sage_wheels/share/singular/LIB/hyperel.lib +975 -0
- sage_wheels/share/singular/LIB/inout.lib +679 -0
- sage_wheels/share/singular/LIB/integralbasis.lib +6224 -0
- sage_wheels/share/singular/LIB/interval.lib +1418 -0
- sage_wheels/share/singular/LIB/intprog.lib +778 -0
- sage_wheels/share/singular/LIB/invar.lib +443 -0
- sage_wheels/share/singular/LIB/involut.lib +980 -0
- sage_wheels/share/singular/LIB/jacobson.lib +1215 -0
- sage_wheels/share/singular/LIB/kskernel.lib +534 -0
- sage_wheels/share/singular/LIB/latex.lib +3146 -0
- sage_wheels/share/singular/LIB/lejeune.lib +651 -0
- sage_wheels/share/singular/LIB/linalg.lib +2040 -0
- sage_wheels/share/singular/LIB/locnormal.lib +212 -0
- sage_wheels/share/singular/LIB/lrcalc.lib +526 -0
- sage_wheels/share/singular/LIB/makedbm.lib +294 -0
- sage_wheels/share/singular/LIB/mathml.lib +813 -0
- sage_wheels/share/singular/LIB/matrix.lib +1372 -0
- sage_wheels/share/singular/LIB/maxlike.lib +1132 -0
- sage_wheels/share/singular/LIB/methods.lib +212 -0
- sage_wheels/share/singular/LIB/moddiq.lib +322 -0
- sage_wheels/share/singular/LIB/modfinduni.lib +181 -0
- sage_wheels/share/singular/LIB/modnormal.lib +218 -0
- sage_wheels/share/singular/LIB/modprimdec.lib +1278 -0
- sage_wheels/share/singular/LIB/modquotient.lib +269 -0
- sage_wheels/share/singular/LIB/modstd.lib +1024 -0
- sage_wheels/share/singular/LIB/modular.lib +545 -0
- sage_wheels/share/singular/LIB/modules.lib +2561 -0
- sage_wheels/share/singular/LIB/modwalk.lib +609 -0
- sage_wheels/share/singular/LIB/mondromy.lib +1016 -0
- sage_wheels/share/singular/LIB/monomialideal.lib +3851 -0
- sage_wheels/share/singular/LIB/mprimdec.lib +2353 -0
- sage_wheels/share/singular/LIB/mregular.lib +1863 -0
- sage_wheels/share/singular/LIB/multigrading.lib +5629 -0
- sage_wheels/share/singular/LIB/ncHilb.lib +777 -0
- sage_wheels/share/singular/LIB/ncModslimgb.lib +791 -0
- sage_wheels/share/singular/LIB/ncalg.lib +16311 -0
- sage_wheels/share/singular/LIB/ncall.lib +31 -0
- sage_wheels/share/singular/LIB/ncdecomp.lib +468 -0
- sage_wheels/share/singular/LIB/ncfactor.lib +13371 -0
- sage_wheels/share/singular/LIB/ncfrac.lib +1023 -0
- sage_wheels/share/singular/LIB/nchilbert.lib +448 -0
- sage_wheels/share/singular/LIB/nchomolog.lib +759 -0
- sage_wheels/share/singular/LIB/ncloc.lib +361 -0
- sage_wheels/share/singular/LIB/ncpreim.lib +795 -0
- sage_wheels/share/singular/LIB/ncrat.lib +2849 -0
- sage_wheels/share/singular/LIB/nctools.lib +1887 -0
- sage_wheels/share/singular/LIB/nets.lib +1456 -0
- sage_wheels/share/singular/LIB/nfmodstd.lib +1000 -0
- sage_wheels/share/singular/LIB/nfmodsyz.lib +732 -0
- sage_wheels/share/singular/LIB/noether.lib +1106 -0
- sage_wheels/share/singular/LIB/normal.lib +8700 -0
- sage_wheels/share/singular/LIB/normaliz.lib +2226 -0
- sage_wheels/share/singular/LIB/ntsolve.lib +362 -0
- sage_wheels/share/singular/LIB/numerAlg.lib +560 -0
- sage_wheels/share/singular/LIB/numerDecom.lib +2261 -0
- sage_wheels/share/singular/LIB/olga.lib +1933 -0
- sage_wheels/share/singular/LIB/orbitparam.lib +351 -0
- sage_wheels/share/singular/LIB/parallel.lib +319 -0
- sage_wheels/share/singular/LIB/paraplanecurves.lib +3110 -0
- sage_wheels/share/singular/LIB/perron.lib +202 -0
- sage_wheels/share/singular/LIB/pfd.lib +2223 -0
- sage_wheels/share/singular/LIB/phindex.lib +642 -0
- sage_wheels/share/singular/LIB/pointid.lib +673 -0
- sage_wheels/share/singular/LIB/polybori.lib +1430 -0
- sage_wheels/share/singular/LIB/polyclass.lib +525 -0
- sage_wheels/share/singular/LIB/polylib.lib +1174 -0
- sage_wheels/share/singular/LIB/polymake.lib +1902 -0
- sage_wheels/share/singular/LIB/presolve.lib +1533 -0
- sage_wheels/share/singular/LIB/primdec.lib +9576 -0
- sage_wheels/share/singular/LIB/primdecint.lib +1782 -0
- sage_wheels/share/singular/LIB/primitiv.lib +401 -0
- sage_wheels/share/singular/LIB/puiseuxexpansions.lib +1631 -0
- sage_wheels/share/singular/LIB/purityfiltration.lib +960 -0
- sage_wheels/share/singular/LIB/qhmoduli.lib +1561 -0
- sage_wheels/share/singular/LIB/qmatrix.lib +293 -0
- sage_wheels/share/singular/LIB/random.lib +455 -0
- sage_wheels/share/singular/LIB/ratgb.lib +489 -0
- sage_wheels/share/singular/LIB/realclassify.lib +5759 -0
- sage_wheels/share/singular/LIB/realizationMatroids.lib +772 -0
- sage_wheels/share/singular/LIB/realrad.lib +1197 -0
- sage_wheels/share/singular/LIB/recover.lib +2628 -0
- sage_wheels/share/singular/LIB/redcgs.lib +3984 -0
- sage_wheels/share/singular/LIB/reesclos.lib +465 -0
- sage_wheels/share/singular/LIB/resbinomial.lib +2802 -0
- sage_wheels/share/singular/LIB/resgraph.lib +789 -0
- sage_wheels/share/singular/LIB/resjung.lib +820 -0
- sage_wheels/share/singular/LIB/resolve.lib +5110 -0
- sage_wheels/share/singular/LIB/resources.lib +170 -0
- sage_wheels/share/singular/LIB/reszeta.lib +5473 -0
- sage_wheels/share/singular/LIB/ring.lib +1328 -0
- sage_wheels/share/singular/LIB/ringgb.lib +343 -0
- sage_wheels/share/singular/LIB/rinvar.lib +1153 -0
- sage_wheels/share/singular/LIB/rootisolation.lib +1481 -0
- sage_wheels/share/singular/LIB/rootsmr.lib +709 -0
- sage_wheels/share/singular/LIB/rootsur.lib +886 -0
- sage_wheels/share/singular/LIB/rstandard.lib +607 -0
- sage_wheels/share/singular/LIB/rwalk.lib +336 -0
- sage_wheels/share/singular/LIB/sagbi.lib +1353 -0
- sage_wheels/share/singular/LIB/sagbiNormaliz.lib +1622 -0
- sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
- sage_wheels/share/singular/LIB/sagbigrob.lib +449 -0
- sage_wheels/share/singular/LIB/schreyer.lib +321 -0
- sage_wheels/share/singular/LIB/schubert.lib +2551 -0
- sage_wheels/share/singular/LIB/sets.lib +524 -0
- sage_wheels/share/singular/LIB/sheafcoh.lib +1663 -0
- sage_wheels/share/singular/LIB/signcond.lib +437 -0
- sage_wheels/share/singular/LIB/sing.lib +1094 -0
- sage_wheels/share/singular/LIB/sing4ti2.lib +419 -0
- sage_wheels/share/singular/LIB/solve.lib +2243 -0
- sage_wheels/share/singular/LIB/spcurve.lib +1077 -0
- sage_wheels/share/singular/LIB/spectrum.lib +62 -0
- sage_wheels/share/singular/LIB/sresext.lib +757 -0
- sage_wheels/share/singular/LIB/ssi.lib +143 -0
- sage_wheels/share/singular/LIB/standard.lib +2769 -0
- sage_wheels/share/singular/LIB/stanleyreisner.lib +473 -0
- sage_wheels/share/singular/LIB/stdmodule.lib +547 -0
- sage_wheels/share/singular/LIB/stratify.lib +1070 -0
- sage_wheels/share/singular/LIB/surf.lib +506 -0
- sage_wheels/share/singular/LIB/surf_jupyter.lib +223 -0
- sage_wheels/share/singular/LIB/surfacesignature.lib +522 -0
- sage_wheels/share/singular/LIB/surfex.lib +1462 -0
- sage_wheels/share/singular/LIB/swalk.lib +877 -0
- sage_wheels/share/singular/LIB/symodstd.lib +1570 -0
- sage_wheels/share/singular/LIB/systhreads.lib +74 -0
- sage_wheels/share/singular/LIB/tasks.lib +1324 -0
- sage_wheels/share/singular/LIB/tateProdCplxNegGrad.lib +2412 -0
- sage_wheels/share/singular/LIB/teachstd.lib +858 -0
- sage_wheels/share/singular/LIB/template.lib +116 -0
- sage_wheels/share/singular/LIB/toric.lib +1119 -0
- sage_wheels/share/singular/LIB/transformation.lib +116 -0
- sage_wheels/share/singular/LIB/triang.lib +1197 -0
- sage_wheels/share/singular/LIB/tropical.lib +8741 -0
- sage_wheels/share/singular/LIB/tropicalEllipticCovers.lib +2922 -0
- sage_wheels/share/singular/LIB/tropicalNewton.lib +1128 -0
- sage_wheels/share/singular/LIB/tst.lib +1108 -0
- sage_wheels/share/singular/LIB/weierstr.lib +241 -0
- sage_wheels/share/singular/LIB/zeroset.lib +1478 -0
- sage_wheels/share/singular/emacs/.emacs-general +184 -0
- sage_wheels/share/singular/emacs/.emacs-singular +234 -0
- sage_wheels/share/singular/emacs/COPYING +44 -0
- sage_wheels/share/singular/emacs/cmd-cmpl.el +241 -0
- sage_wheels/share/singular/emacs/ex-cmpl.el +1681 -0
- sage_wheels/share/singular/emacs/hlp-cmpl.el +4318 -0
- sage_wheels/share/singular/emacs/lib-cmpl.el +179 -0
- sage_wheels/share/singular/emacs/singular.el +4273 -0
- sage_wheels/share/singular/emacs/singular.xpm +39 -0
- sage_wheels/share/singular/singular.idx +5002 -0
|
@@ -0,0 +1,813 @@
|
|
|
1
|
+
///////////////////////////////////////////////////////////////////////////////
|
|
2
|
+
version="version mathml.lib 4.1.2.0 Feb_2019 "; // $Id: d2fdb3fee2d66d8fa1ecb81ab85218579d0962f2 $
|
|
3
|
+
category="Miscellaneous";
|
|
4
|
+
info="
|
|
5
|
+
LIBRARY: mathml.lib printing mathml code
|
|
6
|
+
|
|
7
|
+
AUTHORS: J. Boehm, boehm @ mathematik.uni-kl.de
|
|
8
|
+
M. Mueller, mkmuelle @ mathematik.uni-kl.de
|
|
9
|
+
H. Rombach, HRombach @ gmx.de
|
|
10
|
+
M. Stein, maxstein77 @ web.de
|
|
11
|
+
|
|
12
|
+
OVERVIEW:
|
|
13
|
+
|
|
14
|
+
mathml conversion
|
|
15
|
+
|
|
16
|
+
KEYWORDS:
|
|
17
|
+
mathml
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
PROCEDURES:
|
|
22
|
+
mathml(def) general procedure to generate a mathml code from a Singular object
|
|
23
|
+
viewMathml(string) view mathml code
|
|
24
|
+
";
|
|
25
|
+
|
|
26
|
+
LIB "matrix.lib";
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
/*********************************************************
|
|
31
|
+
** **
|
|
32
|
+
** TOOLs **
|
|
33
|
+
** **
|
|
34
|
+
*********************************************************/
|
|
35
|
+
|
|
36
|
+
static proc mathmlStringReplace(string s,string dummy,string origin)"USAGE: texStringReplace(s); where s is a string
|
|
37
|
+
ASSUME: s is a string
|
|
38
|
+
RETURN: s including origin instead of dummy
|
|
39
|
+
THEORY: if s contains dummy, these parts will be replaced by origin
|
|
40
|
+
"{
|
|
41
|
+
int k,L;
|
|
42
|
+
string S;
|
|
43
|
+
S = s;
|
|
44
|
+
while(find(S,dummy)>0){
|
|
45
|
+
k = find(S,dummy);
|
|
46
|
+
L = size(dummy);
|
|
47
|
+
if(k+L<=size(S)){
|
|
48
|
+
S = S[1,k-1] + origin + S[k+L..size(S)];
|
|
49
|
+
}
|
|
50
|
+
else{S = S[1,k-1] + origin;}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return(S);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
proc mathmlRingType(){
|
|
58
|
+
string S = charstr(basering);
|
|
59
|
+
int i = find(S,",");
|
|
60
|
+
int n;
|
|
61
|
+
if(i>0){S = S[1,i-1];}
|
|
62
|
+
if(S=="real" || S =="complex"){return(0)}
|
|
63
|
+
else{ if (npars(basering)>0) {
|
|
64
|
+
n=ringlist(basering)[1][1];
|
|
65
|
+
if (n!=0 && prime(n)!=n) {return(2);}
|
|
66
|
+
else {return(1);}}
|
|
67
|
+
else {return(1);}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/*********************************************************
|
|
73
|
+
** **
|
|
74
|
+
** POLY **
|
|
75
|
+
** **
|
|
76
|
+
*********************************************************/
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
proc mathmlLeadCoef(string s) {
|
|
80
|
+
string t;
|
|
81
|
+
int i=1;
|
|
82
|
+
int u=0;
|
|
83
|
+
if (s=="1"){return(t);}
|
|
84
|
+
if (s=="-1"){return("<mo>-</mo>");}
|
|
85
|
+
while (i<size(s)) {
|
|
86
|
+
if (s[i]=="/") {u=1;
|
|
87
|
+
i=size(s);}
|
|
88
|
+
i=i+1;
|
|
89
|
+
}
|
|
90
|
+
i=1;
|
|
91
|
+
if (u==1) {
|
|
92
|
+
if (s[1]=="-") {
|
|
93
|
+
t="<mo>-</mo>";
|
|
94
|
+
i=2;}
|
|
95
|
+
t=t+"<mfrac> <mn>";
|
|
96
|
+
while (i<=size(s)) {
|
|
97
|
+
if (s[i]=="/") {t=t+"</mn> <mn>";}
|
|
98
|
+
else {t=t+s[i];}
|
|
99
|
+
i=i+1;
|
|
100
|
+
}
|
|
101
|
+
t=t+"</mn> </mfrac>";
|
|
102
|
+
}
|
|
103
|
+
if (u==0) {
|
|
104
|
+
if (s[1]=="-") {t=t+"<mo>-</mo>";s=s[2,size(s)-1];}
|
|
105
|
+
t=t+"<mn>"+s+"</mn>";}
|
|
106
|
+
return(t);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
proc mathmlVariablesEncoding(string s) {
|
|
110
|
+
string S;
|
|
111
|
+
int p;
|
|
112
|
+
if(s[size(s)]==")"){
|
|
113
|
+
p = find(s,"(");
|
|
114
|
+
S = S + "<msub><mi>"+s[1,p-1] + "</mi><mn>" + s[p+1,size(s)-p-1]+ "</mn></msub>";
|
|
115
|
+
}
|
|
116
|
+
else{
|
|
117
|
+
if (size(s)>1) {
|
|
118
|
+
S = S + "<msub><mi>"+s[1] + "</mi><mn>" + s[2,size(s)-1]+ "</mn></msub>";}
|
|
119
|
+
else {S="<mi>"+s+"</mi>";}
|
|
120
|
+
}
|
|
121
|
+
return(S);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
proc mathmlMonomial(poly a) {
|
|
125
|
+
string g;
|
|
126
|
+
intvec d=leadexp(a);
|
|
127
|
+
list e;
|
|
128
|
+
for(int q=1;q<=size(variables(a));q++) {
|
|
129
|
+
e[q]=variables(a)[q];
|
|
130
|
+
}
|
|
131
|
+
int k=1;
|
|
132
|
+
for(int i=1;i<=size(d);i++) {
|
|
133
|
+
if (d[i]>0) {
|
|
134
|
+
g=g+"<msup><mrow>"+mathmlVariablesEncoding(string(e[k]))+"</mrow><mn>";
|
|
135
|
+
if (d[i]>1) {g=g+string(d[i]);}
|
|
136
|
+
g=g+"</mn></msup>";
|
|
137
|
+
k=k+1;}
|
|
138
|
+
}
|
|
139
|
+
return(g);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
proc mathmlHilf1(poly a,def r) {
|
|
143
|
+
poly d=a;
|
|
144
|
+
list l1=ringlist(r);
|
|
145
|
+
list l12=ringlist(r);
|
|
146
|
+
for(int i=1;i<=size(l12[1][2]);i++) {
|
|
147
|
+
l12[2][i]=l12[1][2][i]+"1";
|
|
148
|
+
l12[1][2][i]=l12[1][2][i]+"0";
|
|
149
|
+
}
|
|
150
|
+
def w=ring(l12);
|
|
151
|
+
setring(w);
|
|
152
|
+
poly f=fetch(r,d);
|
|
153
|
+
list l12=ringlist(basering);
|
|
154
|
+
for (i=1;i<=size(l12[1][2]);i++) {
|
|
155
|
+
f=subst(f,par(i),var(i));
|
|
156
|
+
}
|
|
157
|
+
while (size(l12[2])>size(l12[1][2])) {
|
|
158
|
+
l12[2]=delete(l12[2],size(l12[1][2])+1);
|
|
159
|
+
}
|
|
160
|
+
for (i=1;i<=size(l12[2]);i++) {
|
|
161
|
+
l12[2][i]=l12[2][i][1,size(l12[2][i])-1];
|
|
162
|
+
}
|
|
163
|
+
l12[1]=l12[1][1];
|
|
164
|
+
def w2=ring(l12);
|
|
165
|
+
setring(w2);
|
|
166
|
+
keepring(w2);
|
|
167
|
+
poly f=fetch(w,f);
|
|
168
|
+
return(f);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
proc mathmlHilf(poly a,def r) {
|
|
172
|
+
string g;
|
|
173
|
+
def f=mathmlHilf1(a,r);
|
|
174
|
+
g=g+mathmlPoly(f,basering);
|
|
175
|
+
return(g);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
proc SignumLeadcoef(poly a) {
|
|
179
|
+
int n=0;
|
|
180
|
+
def f=mathmlHilf1(a,basering);
|
|
181
|
+
if (string(leadcoef(f))[1,1]=="-") {
|
|
182
|
+
n=1;
|
|
183
|
+
}
|
|
184
|
+
return(n);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
proc mathmlPolyGAL(poly p){
|
|
188
|
+
string S;
|
|
189
|
+
for(int i = 1;i<size(p);i++){
|
|
190
|
+
S = S + mathmlTermGAL(p[i]);
|
|
191
|
+
if (string(leadcoef(p[i+1]))!="-1") {S=S+"<mo>+</mo>";}
|
|
192
|
+
}
|
|
193
|
+
S = S+ mathmlTermGAL(p[i]);
|
|
194
|
+
return(S);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
proc mathmlTermGAL(poly p){
|
|
198
|
+
int b = 0;
|
|
199
|
+
int B = 0;
|
|
200
|
+
string S,S1,C,Pname;
|
|
201
|
+
Pname = ringlist(basering)[1][2][1];
|
|
202
|
+
C = string(leadcoef(p));
|
|
203
|
+
|
|
204
|
+
C = mathmlStringReplace(C,Pname,"");
|
|
205
|
+
C = mathmlStringReplace(C,"^","");
|
|
206
|
+
if (p==-1 || p==1 || p==0) {return("<mn>"+string(p)+"</mn>");}
|
|
207
|
+
else {
|
|
208
|
+
if (C=="-1") {S=S+"<mo>-</mo>";}
|
|
209
|
+
else {
|
|
210
|
+
if (C!="1") {S =S+ "<msup><mi>"+Pname+"</mi><mn>"+C +"</mi></msup>";}
|
|
211
|
+
}
|
|
212
|
+
S=S+mathmlMonomial(leadmonom(p));
|
|
213
|
+
return(S);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
proc mathmlPolyR(poly a) {
|
|
221
|
+
string S;
|
|
222
|
+
|
|
223
|
+
def origin = basering;
|
|
224
|
+
|
|
225
|
+
if(npars(origin) == 0){
|
|
226
|
+
list l = ringlist(basering);
|
|
227
|
+
l[1][3] = "parTMP";
|
|
228
|
+
def ringCOMPLEX = ring(l);
|
|
229
|
+
setring ringCOMPLEX;
|
|
230
|
+
poly a = fetch(origin,a);
|
|
231
|
+
}
|
|
232
|
+
string S1;
|
|
233
|
+
string S2;
|
|
234
|
+
poly d;
|
|
235
|
+
string s;
|
|
236
|
+
|
|
237
|
+
for (int i=1;i<=size(a);i++) {
|
|
238
|
+
S2="";
|
|
239
|
+
d=a[i];
|
|
240
|
+
s=string(leadcoef(d));
|
|
241
|
+
if (s[1]=="-" || s[2]=="-") {S=S+"<mo>-</mo>";d=-1*d;}
|
|
242
|
+
else {S=S+"<mo>+</mo>";}
|
|
243
|
+
S1=mathmlMonomial(leadmonom(d));
|
|
244
|
+
if (leadcoef(d)==1) {
|
|
245
|
+
if (S1=="") {S=S+"<mn>1</mn>";}
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
s=string(leadcoef(d));
|
|
249
|
+
S2=mathmlStringReplace(s,"*1)",")");
|
|
250
|
+
S2=mathmlStringReplace(S2,"*","");
|
|
251
|
+
if (npars(basering)==1) {
|
|
252
|
+
if (find(S2,string(par(1)))>0) {
|
|
253
|
+
S2=mathmlStringReplace(S2,string(par(1)),"");
|
|
254
|
+
if (size(S2)>0) {S2=S2[1,size(S2)-1]+string(par(1))+")";}
|
|
255
|
+
else {S2=string(par(1));}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
S=S+S2+S1;
|
|
260
|
+
}
|
|
261
|
+
if (S[1,10]=="<mo>+</mo>") {S=S[11..size(S)];}
|
|
262
|
+
return(S);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
proc mathmlPolyN(poly a,def r){
|
|
266
|
+
string g;
|
|
267
|
+
number d=leadcoef(a);
|
|
268
|
+
list l12=ringlist(r);
|
|
269
|
+
int n=npars(basering);
|
|
270
|
+
|
|
271
|
+
if (n>0) {
|
|
272
|
+
if (SignumLeadcoef(numerator(d))) {
|
|
273
|
+
g=g+"<mo>-</mo>";
|
|
274
|
+
d=-d;
|
|
275
|
+
}
|
|
276
|
+
if (d!=1) {
|
|
277
|
+
if (denominator(d)==1) {
|
|
278
|
+
def f=mathmlHilf1(d,r);
|
|
279
|
+
if (leadexp(f)==0) {setring r;
|
|
280
|
+
g=g+mathmlHilf(d,r);}
|
|
281
|
+
else {setring r;
|
|
282
|
+
g=g+"<mi>(</mi>"+mathmlHilf(d,r)+"<mi>)</mi>";}
|
|
283
|
+
}
|
|
284
|
+
else {g=g+"<mfrac><mrow>"+mathmlHilf(numerator(d),r)+"</mrow><mrow>"+mathmlHilf(denominator(d),r)+"</mrow></mfrac>";}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
else {
|
|
288
|
+
g=g+mathmlLeadCoef(string(leadcoef(a)));
|
|
289
|
+
}
|
|
290
|
+
setring(r);
|
|
291
|
+
if (a==1 || a==-1) {g=g+"<mn>1</mn>";}
|
|
292
|
+
|
|
293
|
+
g=g+mathmlMonomial(leadmonom(a));
|
|
294
|
+
a=a-lead(a);
|
|
295
|
+
if (a!=0) {
|
|
296
|
+
if (n==0) {if (poly(leadcoef(a))>0) {g=g+"<mo>+</mo>";}}
|
|
297
|
+
else {if (SignumLeadcoef(numerator(leadcoef(a)))==0) {g=g+"<mo>+</mo>";}}
|
|
298
|
+
g=g+mathmlPolyN(a,r);
|
|
299
|
+
}
|
|
300
|
+
return(g);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
proc mathmlPoly(poly d) {
|
|
304
|
+
string g="<math xmlns=http://www.w3.org/1998/Math/MathML>";
|
|
305
|
+
if (mathmlRingType()==0) {g=g+mathmlPolyR(d);}
|
|
306
|
+
if (mathmlRingType()==2) {g=g+mathmlPolyGAL(d);}
|
|
307
|
+
if (mathmlRingType()==1) {g=g+mathmlPolyN(d,basering);}
|
|
308
|
+
g=g+"</math>";
|
|
309
|
+
return(g);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
example
|
|
317
|
+
{ "EXAMPLE:"; echo=2;
|
|
318
|
+
string h;
|
|
319
|
+
ring r = (0,a),(x1,x2),dp;
|
|
320
|
+
h=h+mathmlPoly(x1+a2)+"<br>";
|
|
321
|
+
h=h+mathmlPoly(x1*x2^3)+"<br>";
|
|
322
|
+
ring r=(0,a,b),(x(1..2)),lp;
|
|
323
|
+
poly z=(3*a^2-12*b)*x(1)^2*x(2)+(3*a^3-1)*x(2)+x(1)^2-3/5*x(1)+1;
|
|
324
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
325
|
+
ring r=(0,a),(x,y),lp;
|
|
326
|
+
poly z=(15*a^3+11*a-2)/(7*a^2+2)*x^2*y^3+13/7*x;
|
|
327
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
328
|
+
ring r=(13,s(1..2)),(y(1..2)),lp;
|
|
329
|
+
poly z=(2*s(1)^4)*y(1)^3*y(2)-s(1)*s(2)*y(2)^4+(11*s(1)^3-2*s(2)^2+11*s(1)*s(2))*y(1)^2-s(2)*y(2)-3*y(2)+4;
|
|
330
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
331
|
+
ring r=(11,y(1..2)),(x(1..3)),lp;
|
|
332
|
+
poly z=2*x(1)^3*x(3)-(2/(y(1)^2*y(2)^2+3))*x(2)^2;
|
|
333
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
334
|
+
ring r=integer,(v,x,y),lp;
|
|
335
|
+
poly z=15*v^2*x^2*y^2-11*x*y;
|
|
336
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
337
|
+
ring r=(3^4,a),x,lp;
|
|
338
|
+
poly z=a59*x2+a41;
|
|
339
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
340
|
+
ring r=real,(x,y),lp;
|
|
341
|
+
poly z=3.334*x^2*y^3-4*y^2;
|
|
342
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
343
|
+
ring r=(real,15,a),(x(1..4)),lp;
|
|
344
|
+
poly z=(5.2+11.11*a)*x(1)*x(4)^4-(2.333+1.344*a)*x(2);
|
|
345
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
346
|
+
ring r=complex,x,dp;
|
|
347
|
+
poly z=(3.4-3.5*i)*x^5+(11.4*i)*x^4-3.552*x^3+1;
|
|
348
|
+
h=h+mathmlPoly(z)+"<br>";
|
|
349
|
+
ring r=(complex,a),(ba,bb,bc),dp;
|
|
350
|
+
poly z=(3.4-11*a)*ba^2*bb^2+4.555*ba^3;
|
|
351
|
+
h=h+mathmlPoly(z);
|
|
352
|
+
viewMathml(h);
|
|
353
|
+
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
/*********************************************************
|
|
358
|
+
** **
|
|
359
|
+
** ring **
|
|
360
|
+
** **
|
|
361
|
+
*********************************************************/
|
|
362
|
+
|
|
363
|
+
proc mathmlRing(def r)
|
|
364
|
+
"USAGE: texRing(r); where r is a ring
|
|
365
|
+
ASSUME: r is a ring
|
|
366
|
+
RETURN: lateX-code for the ring r
|
|
367
|
+
THEORY:
|
|
368
|
+
KEYWORDS: ring, lateX, teX, tex, latex
|
|
369
|
+
EXAMPLE: example texRing; shows an example
|
|
370
|
+
"
|
|
371
|
+
{ setring r;
|
|
372
|
+
list l,l1,l2;
|
|
373
|
+
l = ringlist(r);
|
|
374
|
+
l2 = ringlist(r)[2];
|
|
375
|
+
|
|
376
|
+
string c,p,P,V,C,S,h;
|
|
377
|
+
|
|
378
|
+
int i,b;
|
|
379
|
+
int bchar;
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
list l3=l;
|
|
383
|
+
l3[4]=ideal(0);
|
|
384
|
+
def w=ring(l3);
|
|
385
|
+
setring w;
|
|
386
|
+
list l=fetch(r,l);
|
|
387
|
+
setring r;
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
//characteristic
|
|
391
|
+
c = charstr(r);
|
|
392
|
+
bchar = 0;
|
|
393
|
+
if(find(c,",") != 0){
|
|
394
|
+
c = c[1,find(c,",")-1];
|
|
395
|
+
b = 0;
|
|
396
|
+
if(typeof(l[1][2][1]) != "string" && b==0&& c =="integer"){bchar= 1;b = 1;}
|
|
397
|
+
if(typeof(l[1][2][1]) != "string" && b==0){bchar = 2;b=1;}
|
|
398
|
+
if(b==0){ if (mathmlRingType()==2) {bchar = 4;}
|
|
399
|
+
else {bchar=3;}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
//minimalpolynom
|
|
404
|
+
p = string(minpoly);
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
//parameters
|
|
410
|
+
if(bchar==3){
|
|
411
|
+
if(p != "0"){P=P+"[";}
|
|
412
|
+
else{P=P+"(";}
|
|
413
|
+
for(i=1;i<size(l[1][2]);i++){
|
|
414
|
+
P = P + mathmlVariablesEncoding(string(l[1][2][i])) +",";
|
|
415
|
+
}
|
|
416
|
+
P=P+mathmlVariablesEncoding(string(l[1][2][size(l[1][2])]));
|
|
417
|
+
if(p != "0"){
|
|
418
|
+
l3[1][4]=ideal(0);
|
|
419
|
+
w=ring(l3);
|
|
420
|
+
setring(w);
|
|
421
|
+
list l=fetch(r,l);
|
|
422
|
+
poly h1=l[1][4][1];
|
|
423
|
+
if (SignumLeadcoef(h1)==1) {h1=-h1;}
|
|
424
|
+
h=mathmlPoly(h1);
|
|
425
|
+
h=h[48..size(h)-7];
|
|
426
|
+
if (h[1,10]=="<mi>(</mi>") {h=h[11..size(h)-10];}
|
|
427
|
+
P=P + "]/{"+h+"}";
|
|
428
|
+
setring(r);
|
|
429
|
+
}
|
|
430
|
+
else{P=P+")";}
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
//variables
|
|
435
|
+
V = V + "[";
|
|
436
|
+
for(i = 1;i<size(l2);i++){
|
|
437
|
+
V = V + mathmlVariablesEncoding((string(l2[i]))) + ",";
|
|
438
|
+
}
|
|
439
|
+
V = V + mathmlVariablesEncoding((string(l2[size(l2)])));
|
|
440
|
+
V = V + "]";
|
|
441
|
+
|
|
442
|
+
b = 0;
|
|
443
|
+
if(c == "integer" && b == 0){
|
|
444
|
+
if(bchar==1){ //Z/(p^k)
|
|
445
|
+
if(string(l[1][2][2])!="1"){
|
|
446
|
+
C=C+"<msub><mrow><mn>ℤ</mn></mrow><mrow><msup><mrow>"+string(l[1][2][1])+"</mrow><mrow>"+string(l[1][2][2])+"<mrow></msup></mrow></msub>";
|
|
447
|
+
}
|
|
448
|
+
else{C=C+"<msub><mn>ℤ</mn>"+"<mn>"+string(l[1][2][1])+"</mn></msub>";}
|
|
449
|
+
b = 1;
|
|
450
|
+
}
|
|
451
|
+
else{C = C + "<mn>ℤ</mn>";b=1;} //Z
|
|
452
|
+
}
|
|
453
|
+
if(c == "0" && b == 0){C = C + "<mn>ℚ</mn>";b=1;} //Q
|
|
454
|
+
if(c == "real" && b == 0){C = C + "<mn>ℝ</mn>";b=1;} //R
|
|
455
|
+
if(c == "complex" && b == 0){
|
|
456
|
+
b=1;
|
|
457
|
+
if(typeof(l[1][3]) != "none"){
|
|
458
|
+
if(l[1][3]!="i"){C = C + "<mn>ℝ</mn>("+l[1][3]+")";} //R(j)
|
|
459
|
+
else{C = C + "<mn>ℂ</mn>";}
|
|
460
|
+
}
|
|
461
|
+
else{C = C + "<mn>ℂ</mn";} //C
|
|
462
|
+
}
|
|
463
|
+
if(b == 0){ if (bchar==4) {C = C + "<msub><mn>F</mn>"+c+"</msub>";} //F/p
|
|
464
|
+
else {C = C + "<msub><mn>ℤ</mn>"+c+"</msub>";b=1;} //Z/p
|
|
465
|
+
|
|
466
|
+
}
|
|
467
|
+
//epic conclusion
|
|
468
|
+
if(size(P)!=0){S = S + C+P+V;}
|
|
469
|
+
else{S=S+C+V;}
|
|
470
|
+
|
|
471
|
+
if (l[4]!=0) {
|
|
472
|
+
setring w;
|
|
473
|
+
|
|
474
|
+
S=S+"<mo>/</mo><mo>(</mo>";
|
|
475
|
+
for(int k=1;k<=size(l[4]);k++) {
|
|
476
|
+
h=mathmlPoly(l[4][k]);
|
|
477
|
+
h=h[48..size(h)-7];
|
|
478
|
+
S=S+h+"<mo>,</mo>";
|
|
479
|
+
}
|
|
480
|
+
S=S[1,size(S)-10]+"<mo>)</mo>";
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
S = "<math xmlns=http://www.w3.org/1998/Math/MathML>" + S + "</math>";
|
|
484
|
+
return(S);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
example
|
|
489
|
+
{ "EXAMPLE:"; echo=2;
|
|
490
|
+
string h;
|
|
491
|
+
ring r = 32003,(x,y,z),dp;
|
|
492
|
+
h=h+mathmlRing(r)+"<br>";
|
|
493
|
+
ring r = 32003,(x(1..10)),dp;
|
|
494
|
+
h=h+mathmlRing(r)+"<br>";
|
|
495
|
+
ring r = 0,(a,b,c,d),lp;
|
|
496
|
+
h=h+mathmlRing(r)+"<br>";
|
|
497
|
+
ring r =7,(x,y,z),ds;
|
|
498
|
+
h=h+mathmlRing(r)+"<br>";
|
|
499
|
+
ring r = 7,(x(1..6)),(lp(3),dp);
|
|
500
|
+
h=h+mathmlRing(r)+"<br>";
|
|
501
|
+
ring r =0,(x,y,z),(c,wp(2,1,3));
|
|
502
|
+
h=h+mathmlRing(r)+"<br>";
|
|
503
|
+
ring r =(7,a,b,c),(x,y,z),Dp;
|
|
504
|
+
h=h+mathmlRing(r)+"<br>";
|
|
505
|
+
ring r =(7,a),(x,y,z),dp; minpoly = a^2+a+3;
|
|
506
|
+
h=h+mathmlRing(r)+"<br>";
|
|
507
|
+
ring r =real,(x,y,z),dp;
|
|
508
|
+
h=h+mathmlRing(r)+"<br>";
|
|
509
|
+
ring r =(real,50),(x,y,z),dp;
|
|
510
|
+
h=h+mathmlRing(r)+"<br>";
|
|
511
|
+
ring r =(real,10,50),(x,y,z),dp;
|
|
512
|
+
h=h+mathmlRing(r)+"<br>";
|
|
513
|
+
ring r = (complex,30,j),(x,y,z),dp;
|
|
514
|
+
h=h+mathmlRing(r)+"<br>";
|
|
515
|
+
ring r =complex,(x,y,z),dp;
|
|
516
|
+
h=h+mathmlRing(r)+"<br>";
|
|
517
|
+
ring r =7,(x,y,z), dp;
|
|
518
|
+
h=h+mathmlRing(r)+"<br>";
|
|
519
|
+
ring r =integer,(x,y,z), dp;
|
|
520
|
+
h=h+mathmlRing(r)+"<br>";
|
|
521
|
+
ring r =(integer, 6, 3),(x,y,z), dp;
|
|
522
|
+
h=h+mathmlRing(r)+"<br>";
|
|
523
|
+
ring r =(integer, 100),(x,y,z), dp;
|
|
524
|
+
h=h+mathmlRing(r)+"<br>";
|
|
525
|
+
ring r=(121,a),x,lp;
|
|
526
|
+
h=h+mathmlRing(r);
|
|
527
|
+
viewMathml(h);
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
|
|
532
|
+
/*********************************************************
|
|
533
|
+
** **
|
|
534
|
+
** map **
|
|
535
|
+
** **
|
|
536
|
+
*********************************************************/
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
proc mathmlMap(map f, list #)"USAGE: texMap(f, #); #[1] source XOR texMap(f),if source == target
|
|
540
|
+
ASSUME: f is a map, #[1] ring or empty
|
|
541
|
+
RETURN: lateX-code for the map f
|
|
542
|
+
THEORY:
|
|
543
|
+
KEYWORDS: map, lateX, teX, tex, latex
|
|
544
|
+
EXAMPLE: example texMap; shows an example
|
|
545
|
+
"
|
|
546
|
+
{
|
|
547
|
+
|
|
548
|
+
// f: s--->r (rings) || f:s1--->s2 (string)
|
|
549
|
+
string s1,s2;
|
|
550
|
+
string h1,h2;
|
|
551
|
+
string T,S; //variables, output string
|
|
552
|
+
s2 = mathmlRing(basering);
|
|
553
|
+
s2 = s2[48,size(s2)-54];
|
|
554
|
+
int B = 0;
|
|
555
|
+
int b = 0;
|
|
556
|
+
if(nameof(basering)==nameof(preimage(f))){b=1;}
|
|
557
|
+
|
|
558
|
+
def r = basering;
|
|
559
|
+
if(size(#)!=0){
|
|
560
|
+
if(typeof(#[1]) != "ring"){return("ERROR - wrong input. check texMap documentation." );}
|
|
561
|
+
def s;
|
|
562
|
+
s = #[1];
|
|
563
|
+
setring s;
|
|
564
|
+
s1 = mathmlRing(s);
|
|
565
|
+
s1 = s1[48,size(s1)-54];
|
|
566
|
+
list l1;
|
|
567
|
+
for(int k=1;k<=nvars(s);k++){
|
|
568
|
+
l1[k] = mathmlVariablesEncoding(string(var(k)));
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
setring r;
|
|
572
|
+
for(int i = 1;i<=nvars(s);i++){
|
|
573
|
+
h1=mathmlPoly(f[i]);
|
|
574
|
+
h2=h1[48,size(h1)-54];
|
|
575
|
+
T =T+ "<mtr><mtd>"+l1[i]+"</mtd><mtd>"+"<mo>↦</mo>"+"</mtd><mtd>"+h2+"</mtd></mtr>";
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
else{
|
|
579
|
+
if(b==1){
|
|
580
|
+
mathmlMap(f,basering);
|
|
581
|
+
return();
|
|
582
|
+
}
|
|
583
|
+
else{
|
|
584
|
+
s1 = "'"+nameof(preimage(f))+"'";
|
|
585
|
+
print("For detailed information we need the source");
|
|
586
|
+
B = 1;
|
|
587
|
+
}
|
|
588
|
+
|
|
589
|
+
}
|
|
590
|
+
S = "<mtr><mtd>"+s1+"</mtd><mtd>" + "<mo>→</mo>" +"</mtd><mtd>"+ s2+"</mtd></mtr>"+T;
|
|
591
|
+
S = "<math xmlns=http://www.w3.org/1998/Math/MathML><mtable>" + S + "</mtable></math>";
|
|
592
|
+
|
|
593
|
+
return(S);
|
|
594
|
+
}
|
|
595
|
+
example
|
|
596
|
+
{ "EXAMPLE:"; echo=2;
|
|
597
|
+
string h;
|
|
598
|
+
ring U = 0,(x,y,z),lp;
|
|
599
|
+
ring M2 = real,(z(1..3)),lp;
|
|
600
|
+
setring M2;
|
|
601
|
+
map f = U,z(1)*z(2)^3,z(1),-z(2);
|
|
602
|
+
h=h+mathmlMap(f)+"<br>";
|
|
603
|
+
//2nd
|
|
604
|
+
h=h+mathmlMap(f,U)+"<br>";
|
|
605
|
+
//3rd
|
|
606
|
+
ring R = real,(x,y,z),lp;
|
|
607
|
+
map f2 = R,x2,y2,z-x;
|
|
608
|
+
h=h+string(mathmlMap(f2));
|
|
609
|
+
viewMathml(h);}
|
|
610
|
+
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
|
|
618
|
+
/*********************************************************
|
|
619
|
+
** **
|
|
620
|
+
** IDEAL **
|
|
621
|
+
** **
|
|
622
|
+
*********************************************************/
|
|
623
|
+
proc mathmlIdeal(ideal I)"USAGE: texIdeal(I), where I is an ideal
|
|
624
|
+
ASSUME: I is an ideal
|
|
625
|
+
RETURN: lateX-code for the ideal I
|
|
626
|
+
THEORY:
|
|
627
|
+
KEYWORDS: ideal, lateX, teX, tex, latex
|
|
628
|
+
EXAMPLE: example texIdeal; shows an example
|
|
629
|
+
"{
|
|
630
|
+
string S = "";
|
|
631
|
+
for(int i = 1;i<size(I);i++){
|
|
632
|
+
S = S + mathmlPoly(I[i],"no$") + ",";
|
|
633
|
+
}
|
|
634
|
+
S = S + mathmlPoly(I[size(I)],"no$");
|
|
635
|
+
S = "<math xmlns=http://www.w3.org/1998/Math/MathML><mo>⟨</mo>" + S + "<mo>⟩</mo></math>";
|
|
636
|
+
return(S);
|
|
637
|
+
}
|
|
638
|
+
example
|
|
639
|
+
{"EXAMPLE: "; echo=2;
|
|
640
|
+
ring r = 0,(x,y,z),dp;
|
|
641
|
+
ideal I = x2,y3,z;
|
|
642
|
+
viewMathml(mathmlIdeal(I));
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
/*********************************************************
|
|
648
|
+
** **
|
|
649
|
+
** LIST **
|
|
650
|
+
** **
|
|
651
|
+
*********************************************************/
|
|
652
|
+
proc mathmlList(list l)"USAGE: texList(l), where l is a list
|
|
653
|
+
ASSUME: l is a list
|
|
654
|
+
RETURN: lateX-code for the list l
|
|
655
|
+
THEORY:
|
|
656
|
+
KEYWORDS: list, lateX, teX, tex, latex
|
|
657
|
+
EXAMPLE: example texList; shows an example
|
|
658
|
+
"{
|
|
659
|
+
string tmp;
|
|
660
|
+
string S = "";
|
|
661
|
+
for(int i=1;i<size(l);i++){
|
|
662
|
+
tmp = mathml(l[i]);
|
|
663
|
+
tmp = tmp[48,size(tmp)-54];
|
|
664
|
+
//S = S + tex(l[i]) + ";";
|
|
665
|
+
S = S + tmp + ";";
|
|
666
|
+
}
|
|
667
|
+
//tmp = tex(l[size(l)]);
|
|
668
|
+
tmp = mathml(l[size(l)]);
|
|
669
|
+
tmp = tmp[48,size(tmp)-54];
|
|
670
|
+
//S = S + tex(l[size(l)]);
|
|
671
|
+
S = S + tmp;
|
|
672
|
+
S = "<math xmlns=http://www.w3.org/1998/Math/MathML><mo>{</mo>" + S + "<mo>}</mo></math>";;
|
|
673
|
+
return(S);
|
|
674
|
+
}
|
|
675
|
+
example
|
|
676
|
+
{"EXAMPLE:"; echo=2;
|
|
677
|
+
string h;
|
|
678
|
+
//int
|
|
679
|
+
ring r = integer,(x,y,z),dp;
|
|
680
|
+
list l = 1,2,3;
|
|
681
|
+
h=h+mathmlList(l)+"<br>";
|
|
682
|
+
//ring
|
|
683
|
+
ring r2 = real,(a,b,c),dp;
|
|
684
|
+
ring r3 = complex,(x(1..3)),dp;
|
|
685
|
+
list l2 = r,r2,r3;
|
|
686
|
+
h=h+mathmlList(l2)+"<br>";
|
|
687
|
+
//matrix
|
|
688
|
+
setring r;
|
|
689
|
+
matrix m1[2][2]=x2y,-xz3,0,17x3z2;
|
|
690
|
+
matrix m2[2][2]=1,2,3,4;
|
|
691
|
+
list l3 = m1,m2;
|
|
692
|
+
h=h+mathmlList(l3);
|
|
693
|
+
//poly
|
|
694
|
+
poly p = x2-1;
|
|
695
|
+
poly p2 = x3-y+z;
|
|
696
|
+
poly p3 = y3-z7;
|
|
697
|
+
list l4 = p,p2,p3;
|
|
698
|
+
//mathmlList(l4);
|
|
699
|
+
viewMathml(h);
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
/*********************************************************
|
|
705
|
+
** **
|
|
706
|
+
** BIGINT,INT **
|
|
707
|
+
** **
|
|
708
|
+
*********************************************************/
|
|
709
|
+
proc mathmlBigInt (bigint I){
|
|
710
|
+
return("<math xmlns=http://www.w3.org/1998/Math/MathML>"+string(I)+"</math>");
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
proc mathmlInt(int I){
|
|
714
|
+
return(mathmlBigInt(I));
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
/*********************************************************
|
|
719
|
+
** **
|
|
720
|
+
** STRING **
|
|
721
|
+
** **
|
|
722
|
+
*********************************************************/
|
|
723
|
+
proc mathmlString(string m){
|
|
724
|
+
return(m);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
/*********************************************************
|
|
729
|
+
** **
|
|
730
|
+
** NUMBER **
|
|
731
|
+
** **
|
|
732
|
+
**requires: mathmlPoly - since there might be a parameter **
|
|
733
|
+
*********************************************************/
|
|
734
|
+
|
|
735
|
+
proc mathmlNumber(number n){
|
|
736
|
+
string S;
|
|
737
|
+
S = mathmlPoly(n);
|
|
738
|
+
return(S);
|
|
739
|
+
}
|
|
740
|
+
|
|
741
|
+
/*********************************************************
|
|
742
|
+
** **
|
|
743
|
+
** VECTOR, INTVEC **
|
|
744
|
+
** INTMAT, BIGINTMAT, MATRIX **
|
|
745
|
+
** **
|
|
746
|
+
*********************************************************/
|
|
747
|
+
|
|
748
|
+
proc mathmlVector(vector v){
|
|
749
|
+
int L = size(v);
|
|
750
|
+
matrix m[L][1] = v;
|
|
751
|
+
string S = mathmlMatrix(m);
|
|
752
|
+
return(S);
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
proc mathmlIntvec(intvec v){
|
|
756
|
+
matrix m = v;
|
|
757
|
+
string S = mathmlMatrix(m);
|
|
758
|
+
return(S);
|
|
759
|
+
}
|
|
760
|
+
proc mathmlIntmat(intmat M){
|
|
761
|
+
matrix m = M;
|
|
762
|
+
string S = mathmlMatrix(m);
|
|
763
|
+
return(S);
|
|
764
|
+
}
|
|
765
|
+
proc mathmlBigintmat(bigintmat M){
|
|
766
|
+
matrix m = M;
|
|
767
|
+
string S = mathmlMatrix(m);
|
|
768
|
+
return(S);
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
|
|
772
|
+
proc mathmlMatrix(matrix m){
|
|
773
|
+
string s,h;
|
|
774
|
+
int i=1;
|
|
775
|
+
int j=1;
|
|
776
|
+
s=s+"<math xmlns=http://www.w3.org/1998/Math/MathML><mrow><mo>(</mo><mtable>";
|
|
777
|
+
while (i<=nrows(m)) {
|
|
778
|
+
j=1;
|
|
779
|
+
s=s+"<mtr>";
|
|
780
|
+
while (j<=ncols(m)) {
|
|
781
|
+
h=mathmlPoly(m[i,j]);
|
|
782
|
+
s=s+"<mtd>"+h[48,size(h)-54]+"</mtd>";
|
|
783
|
+
j=j+1;
|
|
784
|
+
}
|
|
785
|
+
s=s+"</mtr>";
|
|
786
|
+
i=i+1;
|
|
787
|
+
}
|
|
788
|
+
s=s+"</mtable><mo>)</mo></mrow></math>";
|
|
789
|
+
return(s);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
/*********************************************************
|
|
794
|
+
** **
|
|
795
|
+
** View **
|
|
796
|
+
** **
|
|
797
|
+
*********************************************************/
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
proc viewMathml(string s){
|
|
802
|
+
string p = "firefox";
|
|
803
|
+
string Sstart = "<!doctype html><html><head><meta charset=UTF-8><title>MathML Examples</title></head><body>";
|
|
804
|
+
string Send = "</body></html> ";
|
|
805
|
+
string S = Sstart + s + Send;
|
|
806
|
+
write(":w singular_mathml.html", S);
|
|
807
|
+
|
|
808
|
+
system("sh",p+" singular_mathml.html");
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
|