passagemath-singular 10.6.31rc3__cp314-cp314-musllinux_1_2_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of passagemath-singular might be problematic. Click here for more details.

Files changed (493) hide show
  1. PySingular.cpython-314-x86_64-linux-musl.so +0 -0
  2. passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
  3. passagemath_singular-10.6.31rc3.dist-info/RECORD +493 -0
  4. passagemath_singular-10.6.31rc3.dist-info/WHEEL +5 -0
  5. passagemath_singular-10.6.31rc3.dist-info/top_level.txt +3 -0
  6. passagemath_singular.libs/libSingular-4-67059f19.4.1.so +0 -0
  7. passagemath_singular.libs/libcddgmp-30166d29.so.0.1.3 +0 -0
  8. passagemath_singular.libs/libfactory-4-9d37bcf4.4.1.so +0 -0
  9. passagemath_singular.libs/libflint-fd6f12fc.so.21.0.0 +0 -0
  10. passagemath_singular.libs/libgcc_s-0cd532bd.so.1 +0 -0
  11. passagemath_singular.libs/libgf2x-9e30c3e3.so.3.0.0 +0 -0
  12. passagemath_singular.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
  13. passagemath_singular.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
  14. passagemath_singular.libs/libgsl-42cda06f.so.28.0.0 +0 -0
  15. passagemath_singular.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
  16. passagemath_singular.libs/libncursesw-9c9e32c3.so.6.5 +0 -0
  17. passagemath_singular.libs/libntl-26885ca2.so.44.0.1 +0 -0
  18. passagemath_singular.libs/libomalloc-0-e9ff96db.9.6.so +0 -0
  19. passagemath_singular.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
  20. passagemath_singular.libs/libpolys-4-8bcf8e7d.4.1.so +0 -0
  21. passagemath_singular.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
  22. passagemath_singular.libs/libreadline-06542304.so.8.2 +0 -0
  23. passagemath_singular.libs/libsingular_resources-4-73bf7623.4.1.so +0 -0
  24. passagemath_singular.libs/libstdc++-5d72f927.so.6.0.33 +0 -0
  25. sage/algebras/all__sagemath_singular.py +3 -0
  26. sage/algebras/fusion_rings/all.py +19 -0
  27. sage/algebras/fusion_rings/f_matrix.py +2448 -0
  28. sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-314-x86_64-linux-musl.so +0 -0
  29. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +5 -0
  30. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +538 -0
  31. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-314-x86_64-linux-musl.so +0 -0
  32. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +3 -0
  33. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +331 -0
  34. sage/algebras/fusion_rings/fusion_double.py +899 -0
  35. sage/algebras/fusion_rings/fusion_ring.py +1580 -0
  36. sage/algebras/fusion_rings/poly_tup_engine.cpython-314-x86_64-linux-musl.so +0 -0
  37. sage/algebras/fusion_rings/poly_tup_engine.pxd +24 -0
  38. sage/algebras/fusion_rings/poly_tup_engine.pyx +579 -0
  39. sage/algebras/fusion_rings/shm_managers.cpython-314-x86_64-linux-musl.so +0 -0
  40. sage/algebras/fusion_rings/shm_managers.pxd +24 -0
  41. sage/algebras/fusion_rings/shm_managers.pyx +780 -0
  42. sage/algebras/letterplace/all.py +1 -0
  43. sage/algebras/letterplace/free_algebra_element_letterplace.cpython-314-x86_64-linux-musl.so +0 -0
  44. sage/algebras/letterplace/free_algebra_element_letterplace.pxd +18 -0
  45. sage/algebras/letterplace/free_algebra_element_letterplace.pyx +755 -0
  46. sage/algebras/letterplace/free_algebra_letterplace.cpython-314-x86_64-linux-musl.so +0 -0
  47. sage/algebras/letterplace/free_algebra_letterplace.pxd +35 -0
  48. sage/algebras/letterplace/free_algebra_letterplace.pyx +914 -0
  49. sage/algebras/letterplace/letterplace_ideal.cpython-314-x86_64-linux-musl.so +0 -0
  50. sage/algebras/letterplace/letterplace_ideal.pyx +408 -0
  51. sage/algebras/quatalg/all.py +2 -0
  52. sage/algebras/quatalg/quaternion_algebra.py +4778 -0
  53. sage/algebras/quatalg/quaternion_algebra_cython.cpython-314-x86_64-linux-musl.so +0 -0
  54. sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
  55. sage/algebras/quatalg/quaternion_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  56. sage/algebras/quatalg/quaternion_algebra_element.pxd +29 -0
  57. sage/algebras/quatalg/quaternion_algebra_element.pyx +2176 -0
  58. sage/all__sagemath_singular.py +11 -0
  59. sage/ext_data/all__sagemath_singular.py +1 -0
  60. sage/ext_data/singular/function_field/core.lib +98 -0
  61. sage/interfaces/all__sagemath_singular.py +1 -0
  62. sage/interfaces/singular.py +2835 -0
  63. sage/libs/all__sagemath_singular.py +1 -0
  64. sage/libs/singular/__init__.py +1 -0
  65. sage/libs/singular/decl.pxd +1168 -0
  66. sage/libs/singular/function.cpython-314-x86_64-linux-musl.so +0 -0
  67. sage/libs/singular/function.pxd +87 -0
  68. sage/libs/singular/function.pyx +1901 -0
  69. sage/libs/singular/function_factory.py +61 -0
  70. sage/libs/singular/groebner_strategy.cpython-314-x86_64-linux-musl.so +0 -0
  71. sage/libs/singular/groebner_strategy.pxd +22 -0
  72. sage/libs/singular/groebner_strategy.pyx +582 -0
  73. sage/libs/singular/option.cpython-314-x86_64-linux-musl.so +0 -0
  74. sage/libs/singular/option.pyx +671 -0
  75. sage/libs/singular/polynomial.cpython-314-x86_64-linux-musl.so +0 -0
  76. sage/libs/singular/polynomial.pxd +39 -0
  77. sage/libs/singular/polynomial.pyx +661 -0
  78. sage/libs/singular/ring.cpython-314-x86_64-linux-musl.so +0 -0
  79. sage/libs/singular/ring.pxd +58 -0
  80. sage/libs/singular/ring.pyx +893 -0
  81. sage/libs/singular/singular.cpython-314-x86_64-linux-musl.so +0 -0
  82. sage/libs/singular/singular.pxd +72 -0
  83. sage/libs/singular/singular.pyx +1944 -0
  84. sage/libs/singular/standard_options.py +145 -0
  85. sage/matrix/all__sagemath_singular.py +1 -0
  86. sage/matrix/matrix_mpolynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
  87. sage/matrix/matrix_mpolynomial_dense.pxd +7 -0
  88. sage/matrix/matrix_mpolynomial_dense.pyx +615 -0
  89. sage/rings/all__sagemath_singular.py +1 -0
  90. sage/rings/function_field/all__sagemath_singular.py +1 -0
  91. sage/rings/function_field/derivations_polymod.py +911 -0
  92. sage/rings/function_field/element_polymod.cpython-314-x86_64-linux-musl.so +0 -0
  93. sage/rings/function_field/element_polymod.pyx +406 -0
  94. sage/rings/function_field/function_field_polymod.py +2611 -0
  95. sage/rings/function_field/ideal_polymod.py +1775 -0
  96. sage/rings/function_field/order_polymod.py +1475 -0
  97. sage/rings/function_field/place_polymod.py +681 -0
  98. sage/rings/polynomial/all__sagemath_singular.py +1 -0
  99. sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-314-x86_64-linux-musl.so +0 -0
  100. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +5 -0
  101. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +339 -0
  102. sage/rings/polynomial/multi_polynomial_libsingular.cpython-314-x86_64-linux-musl.so +0 -0
  103. sage/rings/polynomial/multi_polynomial_libsingular.pxd +30 -0
  104. sage/rings/polynomial/multi_polynomial_libsingular.pyx +6277 -0
  105. sage/rings/polynomial/plural.cpython-314-x86_64-linux-musl.so +0 -0
  106. sage/rings/polynomial/plural.pxd +48 -0
  107. sage/rings/polynomial/plural.pyx +3171 -0
  108. sage/symbolic/all__sagemath_singular.py +1 -0
  109. sage/symbolic/comparison_impl.pxi +428 -0
  110. sage/symbolic/constants_c_impl.pxi +178 -0
  111. sage/symbolic/expression.cpython-314-x86_64-linux-musl.so +0 -0
  112. sage/symbolic/expression.pxd +7 -0
  113. sage/symbolic/expression.pyx +14200 -0
  114. sage/symbolic/getitem_impl.pxi +202 -0
  115. sage/symbolic/pynac.pxi +572 -0
  116. sage/symbolic/pynac_constant_impl.pxi +133 -0
  117. sage/symbolic/pynac_function_impl.pxi +206 -0
  118. sage/symbolic/pynac_impl.pxi +2576 -0
  119. sage/symbolic/pynac_wrap.h +124 -0
  120. sage/symbolic/series_impl.pxi +272 -0
  121. sage/symbolic/substitution_map_impl.pxi +94 -0
  122. sage_wheels/bin/ESingular +0 -0
  123. sage_wheels/bin/Singular +0 -0
  124. sage_wheels/bin/TSingular +0 -0
  125. sage_wheels/lib/singular/MOD/cohomo.la +41 -0
  126. sage_wheels/lib/singular/MOD/cohomo.so +0 -0
  127. sage_wheels/lib/singular/MOD/customstd.la +41 -0
  128. sage_wheels/lib/singular/MOD/customstd.so +0 -0
  129. sage_wheels/lib/singular/MOD/freealgebra.la +41 -0
  130. sage_wheels/lib/singular/MOD/freealgebra.so +0 -0
  131. sage_wheels/lib/singular/MOD/gfanlib.la +41 -0
  132. sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
  133. sage_wheels/lib/singular/MOD/gitfan.la +41 -0
  134. sage_wheels/lib/singular/MOD/gitfan.so +0 -0
  135. sage_wheels/lib/singular/MOD/interval.la +41 -0
  136. sage_wheels/lib/singular/MOD/interval.so +0 -0
  137. sage_wheels/lib/singular/MOD/loctriv.la +41 -0
  138. sage_wheels/lib/singular/MOD/loctriv.so +0 -0
  139. sage_wheels/lib/singular/MOD/machinelearning.la +41 -0
  140. sage_wheels/lib/singular/MOD/machinelearning.so +0 -0
  141. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.la +41 -0
  142. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.so +0 -0
  143. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.la +41 -0
  144. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.so +0 -0
  145. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.la +41 -0
  146. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.so +0 -0
  147. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.la +41 -0
  148. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.so +0 -0
  149. sage_wheels/lib/singular/MOD/partialgb.la +41 -0
  150. sage_wheels/lib/singular/MOD/partialgb.so +0 -0
  151. sage_wheels/lib/singular/MOD/pyobject.la +41 -0
  152. sage_wheels/lib/singular/MOD/pyobject.so +0 -0
  153. sage_wheels/lib/singular/MOD/singmathic.la +41 -0
  154. sage_wheels/lib/singular/MOD/singmathic.so +0 -0
  155. sage_wheels/lib/singular/MOD/sispasm.la +41 -0
  156. sage_wheels/lib/singular/MOD/sispasm.so +0 -0
  157. sage_wheels/lib/singular/MOD/subsets.la +41 -0
  158. sage_wheels/lib/singular/MOD/subsets.so +0 -0
  159. sage_wheels/lib/singular/MOD/systhreads.la +41 -0
  160. sage_wheels/lib/singular/MOD/systhreads.so +0 -0
  161. sage_wheels/lib/singular/MOD/syzextra.la +41 -0
  162. sage_wheels/lib/singular/MOD/syzextra.so +0 -0
  163. sage_wheels/libexec/singular/MOD/change_cost +0 -0
  164. sage_wheels/libexec/singular/MOD/singularsurf +11 -0
  165. sage_wheels/libexec/singular/MOD/singularsurf_jupyter +9 -0
  166. sage_wheels/libexec/singular/MOD/singularsurf_win +10 -0
  167. sage_wheels/libexec/singular/MOD/solve_IP +0 -0
  168. sage_wheels/libexec/singular/MOD/surfex +16 -0
  169. sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
  170. sage_wheels/share/factory/gftables/10201 +342 -0
  171. sage_wheels/share/factory/gftables/1024 +37 -0
  172. sage_wheels/share/factory/gftables/10609 +356 -0
  173. sage_wheels/share/factory/gftables/11449 +384 -0
  174. sage_wheels/share/factory/gftables/11881 +398 -0
  175. sage_wheels/share/factory/gftables/121 +6 -0
  176. sage_wheels/share/factory/gftables/12167 +408 -0
  177. sage_wheels/share/factory/gftables/125 +7 -0
  178. sage_wheels/share/factory/gftables/12769 +428 -0
  179. sage_wheels/share/factory/gftables/128 +7 -0
  180. sage_wheels/share/factory/gftables/1331 +47 -0
  181. sage_wheels/share/factory/gftables/1369 +48 -0
  182. sage_wheels/share/factory/gftables/14641 +490 -0
  183. sage_wheels/share/factory/gftables/15625 +523 -0
  184. sage_wheels/share/factory/gftables/16 +3 -0
  185. sage_wheels/share/factory/gftables/16129 +540 -0
  186. sage_wheels/share/factory/gftables/16384 +549 -0
  187. sage_wheels/share/factory/gftables/16807 +563 -0
  188. sage_wheels/share/factory/gftables/1681 +58 -0
  189. sage_wheels/share/factory/gftables/169 +8 -0
  190. sage_wheels/share/factory/gftables/17161 +574 -0
  191. sage_wheels/share/factory/gftables/1849 +64 -0
  192. sage_wheels/share/factory/gftables/18769 +628 -0
  193. sage_wheels/share/factory/gftables/19321 +646 -0
  194. sage_wheels/share/factory/gftables/19683 +659 -0
  195. sage_wheels/share/factory/gftables/2048 +71 -0
  196. sage_wheels/share/factory/gftables/2187 +75 -0
  197. sage_wheels/share/factory/gftables/2197 +76 -0
  198. sage_wheels/share/factory/gftables/2209 +76 -0
  199. sage_wheels/share/factory/gftables/22201 +742 -0
  200. sage_wheels/share/factory/gftables/22801 +762 -0
  201. sage_wheels/share/factory/gftables/2401 +82 -0
  202. sage_wheels/share/factory/gftables/243 +11 -0
  203. sage_wheels/share/factory/gftables/24389 +815 -0
  204. sage_wheels/share/factory/gftables/24649 +824 -0
  205. sage_wheels/share/factory/gftables/25 +3 -0
  206. sage_wheels/share/factory/gftables/256 +11 -0
  207. sage_wheels/share/factory/gftables/26569 +888 -0
  208. sage_wheels/share/factory/gftables/27 +3 -0
  209. sage_wheels/share/factory/gftables/27889 +932 -0
  210. sage_wheels/share/factory/gftables/2809 +96 -0
  211. sage_wheels/share/factory/gftables/28561 +954 -0
  212. sage_wheels/share/factory/gftables/289 +12 -0
  213. sage_wheels/share/factory/gftables/29791 +995 -0
  214. sage_wheels/share/factory/gftables/29929 +1000 -0
  215. sage_wheels/share/factory/gftables/3125 +107 -0
  216. sage_wheels/share/factory/gftables/32 +4 -0
  217. sage_wheels/share/factory/gftables/32041 +1070 -0
  218. sage_wheels/share/factory/gftables/32761 +1094 -0
  219. sage_wheels/share/factory/gftables/32768 +1095 -0
  220. sage_wheels/share/factory/gftables/343 +14 -0
  221. sage_wheels/share/factory/gftables/3481 +118 -0
  222. sage_wheels/share/factory/gftables/361 +14 -0
  223. sage_wheels/share/factory/gftables/36481 +1218 -0
  224. sage_wheels/share/factory/gftables/3721 +126 -0
  225. sage_wheels/share/factory/gftables/37249 +1244 -0
  226. sage_wheels/share/factory/gftables/38809 +1296 -0
  227. sage_wheels/share/factory/gftables/39601 +1322 -0
  228. sage_wheels/share/factory/gftables/4 +3 -0
  229. sage_wheels/share/factory/gftables/4096 +139 -0
  230. sage_wheels/share/factory/gftables/44521 +1486 -0
  231. sage_wheels/share/factory/gftables/4489 +152 -0
  232. sage_wheels/share/factory/gftables/49 +4 -0
  233. sage_wheels/share/factory/gftables/4913 +166 -0
  234. sage_wheels/share/factory/gftables/49729 +1660 -0
  235. sage_wheels/share/factory/gftables/5041 +170 -0
  236. sage_wheels/share/factory/gftables/50653 +1691 -0
  237. sage_wheels/share/factory/gftables/512 +20 -0
  238. sage_wheels/share/factory/gftables/51529 +1720 -0
  239. sage_wheels/share/factory/gftables/52441 +1750 -0
  240. sage_wheels/share/factory/gftables/529 +20 -0
  241. sage_wheels/share/factory/gftables/5329 +180 -0
  242. sage_wheels/share/factory/gftables/54289 +1812 -0
  243. sage_wheels/share/factory/gftables/57121 +1906 -0
  244. sage_wheels/share/factory/gftables/58081 +1938 -0
  245. sage_wheels/share/factory/gftables/59049 +1971 -0
  246. sage_wheels/share/factory/gftables/6241 +210 -0
  247. sage_wheels/share/factory/gftables/625 +23 -0
  248. sage_wheels/share/factory/gftables/63001 +2102 -0
  249. sage_wheels/share/factory/gftables/64 +5 -0
  250. sage_wheels/share/factory/gftables/6561 +221 -0
  251. sage_wheels/share/factory/gftables/6859 +231 -0
  252. sage_wheels/share/factory/gftables/6889 +232 -0
  253. sage_wheels/share/factory/gftables/729 +27 -0
  254. sage_wheels/share/factory/gftables/7921 +266 -0
  255. sage_wheels/share/factory/gftables/8 +3 -0
  256. sage_wheels/share/factory/gftables/81 +5 -0
  257. sage_wheels/share/factory/gftables/8192 +276 -0
  258. sage_wheels/share/factory/gftables/841 +30 -0
  259. sage_wheels/share/factory/gftables/9 +3 -0
  260. sage_wheels/share/factory/gftables/9409 +316 -0
  261. sage_wheels/share/factory/gftables/961 +34 -0
  262. sage_wheels/share/info/singular.info +191898 -0
  263. sage_wheels/share/singular/LIB/GND.lib +1359 -0
  264. sage_wheels/share/singular/LIB/JMBTest.lib +976 -0
  265. sage_wheels/share/singular/LIB/JMSConst.lib +1363 -0
  266. sage_wheels/share/singular/LIB/KVequiv.lib +699 -0
  267. sage_wheels/share/singular/LIB/SingularityDBM.lib +491 -0
  268. sage_wheels/share/singular/LIB/VecField.lib +1542 -0
  269. sage_wheels/share/singular/LIB/absfact.lib +959 -0
  270. sage_wheels/share/singular/LIB/ainvar.lib +730 -0
  271. sage_wheels/share/singular/LIB/aksaka.lib +419 -0
  272. sage_wheels/share/singular/LIB/alexpoly.lib +2542 -0
  273. sage_wheels/share/singular/LIB/algebra.lib +1193 -0
  274. sage_wheels/share/singular/LIB/all.lib +136 -0
  275. sage_wheels/share/singular/LIB/arcpoint.lib +514 -0
  276. sage_wheels/share/singular/LIB/arnold.lib +4553 -0
  277. sage_wheels/share/singular/LIB/arnoldclassify.lib +2058 -0
  278. sage_wheels/share/singular/LIB/arr.lib +3486 -0
  279. sage_wheels/share/singular/LIB/assprimeszerodim.lib +755 -0
  280. sage_wheels/share/singular/LIB/autgradalg.lib +3361 -0
  281. sage_wheels/share/singular/LIB/bfun.lib +1964 -0
  282. sage_wheels/share/singular/LIB/bimodules.lib +774 -0
  283. sage_wheels/share/singular/LIB/brillnoether.lib +226 -0
  284. sage_wheels/share/singular/LIB/brnoeth.lib +5017 -0
  285. sage_wheels/share/singular/LIB/central.lib +2169 -0
  286. sage_wheels/share/singular/LIB/chern.lib +4162 -0
  287. sage_wheels/share/singular/LIB/cimonom.lib +571 -0
  288. sage_wheels/share/singular/LIB/cisimplicial.lib +1835 -0
  289. sage_wheels/share/singular/LIB/classify.lib +3239 -0
  290. sage_wheels/share/singular/LIB/classify2.lib +1462 -0
  291. sage_wheels/share/singular/LIB/classifyMapGerms.lib +1515 -0
  292. sage_wheels/share/singular/LIB/classify_aeq.lib +3253 -0
  293. sage_wheels/share/singular/LIB/classifyceq.lib +2092 -0
  294. sage_wheels/share/singular/LIB/classifyci.lib +1133 -0
  295. sage_wheels/share/singular/LIB/combinat.lib +91 -0
  296. sage_wheels/share/singular/LIB/compregb.lib +276 -0
  297. sage_wheels/share/singular/LIB/control.lib +1636 -0
  298. sage_wheels/share/singular/LIB/crypto.lib +3795 -0
  299. sage_wheels/share/singular/LIB/curveInv.lib +667 -0
  300. sage_wheels/share/singular/LIB/curvepar.lib +1817 -0
  301. sage_wheels/share/singular/LIB/customstd.lib +100 -0
  302. sage_wheels/share/singular/LIB/deRham.lib +5979 -0
  303. sage_wheels/share/singular/LIB/decodegb.lib +2134 -0
  304. sage_wheels/share/singular/LIB/decomp.lib +1655 -0
  305. sage_wheels/share/singular/LIB/deflation.lib +872 -0
  306. sage_wheels/share/singular/LIB/deform.lib +925 -0
  307. sage_wheels/share/singular/LIB/difform.lib +3055 -0
  308. sage_wheels/share/singular/LIB/divisors.lib +750 -0
  309. sage_wheels/share/singular/LIB/dmod.lib +5817 -0
  310. sage_wheels/share/singular/LIB/dmodapp.lib +3269 -0
  311. sage_wheels/share/singular/LIB/dmodideal.lib +1211 -0
  312. sage_wheels/share/singular/LIB/dmodloc.lib +2645 -0
  313. sage_wheels/share/singular/LIB/dmodvar.lib +818 -0
  314. sage_wheels/share/singular/LIB/dummy.lib +17 -0
  315. sage_wheels/share/singular/LIB/elim.lib +1009 -0
  316. sage_wheels/share/singular/LIB/ellipticcovers.lib +548 -0
  317. sage_wheels/share/singular/LIB/enumpoints.lib +146 -0
  318. sage_wheels/share/singular/LIB/equising.lib +2127 -0
  319. sage_wheels/share/singular/LIB/ffmodstd.lib +2384 -0
  320. sage_wheels/share/singular/LIB/ffsolve.lib +1289 -0
  321. sage_wheels/share/singular/LIB/findifs.lib +778 -0
  322. sage_wheels/share/singular/LIB/finitediff.lib +1768 -0
  323. sage_wheels/share/singular/LIB/finvar.lib +7989 -0
  324. sage_wheels/share/singular/LIB/fpadim.lib +2429 -0
  325. sage_wheels/share/singular/LIB/fpalgebras.lib +1666 -0
  326. sage_wheels/share/singular/LIB/fpaprops.lib +1462 -0
  327. sage_wheels/share/singular/LIB/freegb.lib +3853 -0
  328. sage_wheels/share/singular/LIB/general.lib +1350 -0
  329. sage_wheels/share/singular/LIB/gfan.lib +1768 -0
  330. sage_wheels/share/singular/LIB/gitfan.lib +3130 -0
  331. sage_wheels/share/singular/LIB/gkdim.lib +99 -0
  332. sage_wheels/share/singular/LIB/gmspoly.lib +589 -0
  333. sage_wheels/share/singular/LIB/gmssing.lib +1739 -0
  334. sage_wheels/share/singular/LIB/goettsche.lib +909 -0
  335. sage_wheels/share/singular/LIB/graal.lib +1366 -0
  336. sage_wheels/share/singular/LIB/gradedModules.lib +2541 -0
  337. sage_wheels/share/singular/LIB/graphics.lib +360 -0
  338. sage_wheels/share/singular/LIB/grobcov.lib +7706 -0
  339. sage_wheels/share/singular/LIB/groups.lib +1123 -0
  340. sage_wheels/share/singular/LIB/grwalk.lib +507 -0
  341. sage_wheels/share/singular/LIB/hdepth.lib +194 -0
  342. sage_wheels/share/singular/LIB/help.cnf +57 -0
  343. sage_wheels/share/singular/LIB/hess.lib +1946 -0
  344. sage_wheels/share/singular/LIB/hnoether.lib +4292 -0
  345. sage_wheels/share/singular/LIB/hodge.lib +400 -0
  346. sage_wheels/share/singular/LIB/homolog.lib +1965 -0
  347. sage_wheels/share/singular/LIB/hyperel.lib +975 -0
  348. sage_wheels/share/singular/LIB/inout.lib +679 -0
  349. sage_wheels/share/singular/LIB/integralbasis.lib +6224 -0
  350. sage_wheels/share/singular/LIB/interval.lib +1418 -0
  351. sage_wheels/share/singular/LIB/intprog.lib +778 -0
  352. sage_wheels/share/singular/LIB/invar.lib +443 -0
  353. sage_wheels/share/singular/LIB/involut.lib +980 -0
  354. sage_wheels/share/singular/LIB/jacobson.lib +1215 -0
  355. sage_wheels/share/singular/LIB/kskernel.lib +534 -0
  356. sage_wheels/share/singular/LIB/latex.lib +3146 -0
  357. sage_wheels/share/singular/LIB/lejeune.lib +651 -0
  358. sage_wheels/share/singular/LIB/linalg.lib +2040 -0
  359. sage_wheels/share/singular/LIB/locnormal.lib +212 -0
  360. sage_wheels/share/singular/LIB/lrcalc.lib +526 -0
  361. sage_wheels/share/singular/LIB/makedbm.lib +294 -0
  362. sage_wheels/share/singular/LIB/mathml.lib +813 -0
  363. sage_wheels/share/singular/LIB/matrix.lib +1372 -0
  364. sage_wheels/share/singular/LIB/maxlike.lib +1132 -0
  365. sage_wheels/share/singular/LIB/methods.lib +212 -0
  366. sage_wheels/share/singular/LIB/moddiq.lib +322 -0
  367. sage_wheels/share/singular/LIB/modfinduni.lib +181 -0
  368. sage_wheels/share/singular/LIB/modnormal.lib +218 -0
  369. sage_wheels/share/singular/LIB/modprimdec.lib +1278 -0
  370. sage_wheels/share/singular/LIB/modquotient.lib +269 -0
  371. sage_wheels/share/singular/LIB/modstd.lib +1024 -0
  372. sage_wheels/share/singular/LIB/modular.lib +545 -0
  373. sage_wheels/share/singular/LIB/modules.lib +2561 -0
  374. sage_wheels/share/singular/LIB/modwalk.lib +609 -0
  375. sage_wheels/share/singular/LIB/mondromy.lib +1016 -0
  376. sage_wheels/share/singular/LIB/monomialideal.lib +3851 -0
  377. sage_wheels/share/singular/LIB/mprimdec.lib +2353 -0
  378. sage_wheels/share/singular/LIB/mregular.lib +1863 -0
  379. sage_wheels/share/singular/LIB/multigrading.lib +5629 -0
  380. sage_wheels/share/singular/LIB/ncHilb.lib +777 -0
  381. sage_wheels/share/singular/LIB/ncModslimgb.lib +791 -0
  382. sage_wheels/share/singular/LIB/ncalg.lib +16311 -0
  383. sage_wheels/share/singular/LIB/ncall.lib +31 -0
  384. sage_wheels/share/singular/LIB/ncdecomp.lib +468 -0
  385. sage_wheels/share/singular/LIB/ncfactor.lib +13371 -0
  386. sage_wheels/share/singular/LIB/ncfrac.lib +1023 -0
  387. sage_wheels/share/singular/LIB/nchilbert.lib +448 -0
  388. sage_wheels/share/singular/LIB/nchomolog.lib +759 -0
  389. sage_wheels/share/singular/LIB/ncloc.lib +361 -0
  390. sage_wheels/share/singular/LIB/ncpreim.lib +795 -0
  391. sage_wheels/share/singular/LIB/ncrat.lib +2849 -0
  392. sage_wheels/share/singular/LIB/nctools.lib +1887 -0
  393. sage_wheels/share/singular/LIB/nets.lib +1456 -0
  394. sage_wheels/share/singular/LIB/nfmodstd.lib +1000 -0
  395. sage_wheels/share/singular/LIB/nfmodsyz.lib +732 -0
  396. sage_wheels/share/singular/LIB/noether.lib +1106 -0
  397. sage_wheels/share/singular/LIB/normal.lib +8700 -0
  398. sage_wheels/share/singular/LIB/normaliz.lib +2226 -0
  399. sage_wheels/share/singular/LIB/ntsolve.lib +362 -0
  400. sage_wheels/share/singular/LIB/numerAlg.lib +560 -0
  401. sage_wheels/share/singular/LIB/numerDecom.lib +2261 -0
  402. sage_wheels/share/singular/LIB/olga.lib +1933 -0
  403. sage_wheels/share/singular/LIB/orbitparam.lib +351 -0
  404. sage_wheels/share/singular/LIB/parallel.lib +319 -0
  405. sage_wheels/share/singular/LIB/paraplanecurves.lib +3110 -0
  406. sage_wheels/share/singular/LIB/perron.lib +202 -0
  407. sage_wheels/share/singular/LIB/pfd.lib +2223 -0
  408. sage_wheels/share/singular/LIB/phindex.lib +642 -0
  409. sage_wheels/share/singular/LIB/pointid.lib +673 -0
  410. sage_wheels/share/singular/LIB/polybori.lib +1430 -0
  411. sage_wheels/share/singular/LIB/polyclass.lib +525 -0
  412. sage_wheels/share/singular/LIB/polylib.lib +1174 -0
  413. sage_wheels/share/singular/LIB/polymake.lib +1902 -0
  414. sage_wheels/share/singular/LIB/presolve.lib +1533 -0
  415. sage_wheels/share/singular/LIB/primdec.lib +9576 -0
  416. sage_wheels/share/singular/LIB/primdecint.lib +1782 -0
  417. sage_wheels/share/singular/LIB/primitiv.lib +401 -0
  418. sage_wheels/share/singular/LIB/puiseuxexpansions.lib +1631 -0
  419. sage_wheels/share/singular/LIB/purityfiltration.lib +960 -0
  420. sage_wheels/share/singular/LIB/qhmoduli.lib +1561 -0
  421. sage_wheels/share/singular/LIB/qmatrix.lib +293 -0
  422. sage_wheels/share/singular/LIB/random.lib +455 -0
  423. sage_wheels/share/singular/LIB/ratgb.lib +489 -0
  424. sage_wheels/share/singular/LIB/realclassify.lib +5759 -0
  425. sage_wheels/share/singular/LIB/realizationMatroids.lib +772 -0
  426. sage_wheels/share/singular/LIB/realrad.lib +1197 -0
  427. sage_wheels/share/singular/LIB/recover.lib +2628 -0
  428. sage_wheels/share/singular/LIB/redcgs.lib +3984 -0
  429. sage_wheels/share/singular/LIB/reesclos.lib +465 -0
  430. sage_wheels/share/singular/LIB/resbinomial.lib +2802 -0
  431. sage_wheels/share/singular/LIB/resgraph.lib +789 -0
  432. sage_wheels/share/singular/LIB/resjung.lib +820 -0
  433. sage_wheels/share/singular/LIB/resolve.lib +5110 -0
  434. sage_wheels/share/singular/LIB/resources.lib +170 -0
  435. sage_wheels/share/singular/LIB/reszeta.lib +5473 -0
  436. sage_wheels/share/singular/LIB/ring.lib +1328 -0
  437. sage_wheels/share/singular/LIB/ringgb.lib +343 -0
  438. sage_wheels/share/singular/LIB/rinvar.lib +1153 -0
  439. sage_wheels/share/singular/LIB/rootisolation.lib +1481 -0
  440. sage_wheels/share/singular/LIB/rootsmr.lib +709 -0
  441. sage_wheels/share/singular/LIB/rootsur.lib +886 -0
  442. sage_wheels/share/singular/LIB/rstandard.lib +607 -0
  443. sage_wheels/share/singular/LIB/rwalk.lib +336 -0
  444. sage_wheels/share/singular/LIB/sagbi.lib +1353 -0
  445. sage_wheels/share/singular/LIB/sagbiNormaliz.lib +1622 -0
  446. sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
  447. sage_wheels/share/singular/LIB/sagbigrob.lib +449 -0
  448. sage_wheels/share/singular/LIB/schreyer.lib +321 -0
  449. sage_wheels/share/singular/LIB/schubert.lib +2551 -0
  450. sage_wheels/share/singular/LIB/sets.lib +524 -0
  451. sage_wheels/share/singular/LIB/sheafcoh.lib +1663 -0
  452. sage_wheels/share/singular/LIB/signcond.lib +437 -0
  453. sage_wheels/share/singular/LIB/sing.lib +1094 -0
  454. sage_wheels/share/singular/LIB/sing4ti2.lib +419 -0
  455. sage_wheels/share/singular/LIB/solve.lib +2243 -0
  456. sage_wheels/share/singular/LIB/spcurve.lib +1077 -0
  457. sage_wheels/share/singular/LIB/spectrum.lib +62 -0
  458. sage_wheels/share/singular/LIB/sresext.lib +757 -0
  459. sage_wheels/share/singular/LIB/ssi.lib +143 -0
  460. sage_wheels/share/singular/LIB/standard.lib +2769 -0
  461. sage_wheels/share/singular/LIB/stanleyreisner.lib +473 -0
  462. sage_wheels/share/singular/LIB/stdmodule.lib +547 -0
  463. sage_wheels/share/singular/LIB/stratify.lib +1070 -0
  464. sage_wheels/share/singular/LIB/surf.lib +506 -0
  465. sage_wheels/share/singular/LIB/surf_jupyter.lib +223 -0
  466. sage_wheels/share/singular/LIB/surfacesignature.lib +522 -0
  467. sage_wheels/share/singular/LIB/surfex.lib +1462 -0
  468. sage_wheels/share/singular/LIB/swalk.lib +877 -0
  469. sage_wheels/share/singular/LIB/symodstd.lib +1570 -0
  470. sage_wheels/share/singular/LIB/systhreads.lib +74 -0
  471. sage_wheels/share/singular/LIB/tasks.lib +1324 -0
  472. sage_wheels/share/singular/LIB/tateProdCplxNegGrad.lib +2412 -0
  473. sage_wheels/share/singular/LIB/teachstd.lib +858 -0
  474. sage_wheels/share/singular/LIB/template.lib +116 -0
  475. sage_wheels/share/singular/LIB/toric.lib +1119 -0
  476. sage_wheels/share/singular/LIB/transformation.lib +116 -0
  477. sage_wheels/share/singular/LIB/triang.lib +1197 -0
  478. sage_wheels/share/singular/LIB/tropical.lib +8741 -0
  479. sage_wheels/share/singular/LIB/tropicalEllipticCovers.lib +2922 -0
  480. sage_wheels/share/singular/LIB/tropicalNewton.lib +1128 -0
  481. sage_wheels/share/singular/LIB/tst.lib +1108 -0
  482. sage_wheels/share/singular/LIB/weierstr.lib +241 -0
  483. sage_wheels/share/singular/LIB/zeroset.lib +1478 -0
  484. sage_wheels/share/singular/emacs/.emacs-general +184 -0
  485. sage_wheels/share/singular/emacs/.emacs-singular +234 -0
  486. sage_wheels/share/singular/emacs/COPYING +44 -0
  487. sage_wheels/share/singular/emacs/cmd-cmpl.el +241 -0
  488. sage_wheels/share/singular/emacs/ex-cmpl.el +1681 -0
  489. sage_wheels/share/singular/emacs/hlp-cmpl.el +4318 -0
  490. sage_wheels/share/singular/emacs/lib-cmpl.el +179 -0
  491. sage_wheels/share/singular/emacs/singular.el +4273 -0
  492. sage_wheels/share/singular/emacs/singular.xpm +39 -0
  493. sage_wheels/share/singular/singular.idx +5002 -0
@@ -0,0 +1,1215 @@
1
+ /////////////////////////////////////////////////////////////////////////////
2
+ version="version jacobson.lib 4.1.2.0 Feb_2019 "; // $Id: 2582510433a0b357b20e1693181c5cde4a00794c $
3
+ category="System and Control Theory";
4
+ info="
5
+ LIBRARY: jacobson.lib Algorithms for Smith and Jacobson Normal Form
6
+ AUTHOR: Kristina Schindelar, Kristina.Schindelar@math.rwth-aachen.de,
7
+ @* Viktor Levandovskyy, levandov@math.rwth-aachen.de
8
+
9
+ OVERVIEW:
10
+ We work over a ring R, that is an Euclidean principal ideal domain.
11
+ If R is commutative, we suppose R to be a polynomial ring in one variable.
12
+ If R is non-commutative, we suppose R to have two variables, say x and d.
13
+ We treat then the basering as the Ore localization of R
14
+ with respect to the mult. closed set S = K[x] without 0.
15
+ Thus, we treat basering as principal ideal ring with d a polynomial
16
+ variable and x an invertible one.
17
+ Note, that in computations no division by x will actually happen.
18
+
19
+ Given a rectangular matrix M over R, one can compute unimodular (that is
20
+ invertible) square matrices U and V, such that U*M*V=D is a diagonal matrix.
21
+ Depending on the ring, the diagonal entries of D have certain properties.
22
+
23
+ We call a square matrix D as before 'a weak Jacobson normal form of M'.
24
+ It is known, that over the first rational Weyl algebra K(x)<d>, D can be further
25
+ transformed into a diagonal matrix (1,1,...,1,f,0,..,0), where f is in K(x)<d>.
26
+ We call such a form of D the strong Jacobson normal form.
27
+ The existence of strong form in not guaranteed if one works with algebra,
28
+ which is not rational Weyl algebra.
29
+
30
+
31
+ REFERENCES:
32
+ @* [1] N. Jacobson, 'The theory of rings', AMS, 1943.
33
+ @* [2] Manuel Avelino Insua Hermo, 'Varias perspectives sobre las bases de Groebner :
34
+ @* Forma normal de Smith, Algorithme de Berlekamp y algebras de Leibniz'.
35
+ @* PhD thesis, Universidad de Santiago de Compostela, 2005.
36
+ @* [3] V. Levandovskyy, K. Schindelar 'Computing Jacobson normal form using Groebner bases',
37
+ @* to appear in Journal of Symbolic Computation, 2010.
38
+
39
+ PROCEDURES:
40
+ smith(M[,eng1,eng2]); compute the Smith Normal Form of M over commutative ring
41
+ jacobson(M[,eng]); compute a weak Jacobson Normal Form of M over non-commutative ring
42
+ divideUnits(L); create ones out of units in the output of smith or jacobson
43
+
44
+ SEE ALSO: control_lib
45
+
46
+ KEYWORDS: Jacobson form; Jacobson normal form; Smith form; Smith normal form; matrix diagonalization
47
+
48
+ ";
49
+
50
+ LIB "polylib.lib";
51
+ LIB "involut.lib"; // involution
52
+ LIB "dmodapp.lib"; // engine
53
+ LIB "qhmoduli.lib"; // Min
54
+ LIB "latex.lib"; // tex output for printlevel=4
55
+
56
+ proc tstjacobson()
57
+ {
58
+ /* tests all procs for consistency */
59
+ example divideUnits;
60
+ example smith;
61
+ example jacobson;
62
+ }
63
+
64
+ proc divideUnits(list L)
65
+ "USAGE: divideUnits(L); list L
66
+ RETURN: matrix or list of matrices
67
+ ASSUME: L is an output of @code{smith} or a @code{jacobson} procedures, that is
68
+ @* either L contains one rectangular matrix with elements only on the main diagonal
69
+ @* or L consists of three matrices, where L[1] and L[3] are square invertible matrices
70
+ @* while L[2] is a rectangular matrix with elements only on the main diagonal
71
+ PURPOSE: divide out units from the diagonal and reflect this in transformation matrices
72
+ EXAMPLE: example divideUnits; shows examples
73
+ "
74
+ {
75
+ // check assumptions
76
+ int s = size(L);
77
+ if ( (s!=1) && (s!=3) )
78
+ {
79
+ ERROR("The list has neither 1 nor 3 elements");
80
+ }
81
+ // check sizes of matrices
82
+
83
+ if (s==1)
84
+ {
85
+ list LL; LL[1] = L[1]; LL[2] = L[1];
86
+ L = LL;
87
+ }
88
+
89
+
90
+ // divide units out
91
+ matrix M = L[2];
92
+ int ncM = ncols(M); int nrM = nrows(M);
93
+ // matrix TM[nrM][nrM]; // m times m matrix
94
+ matrix TM = matrix(freemodule(nrM));
95
+ int i; int nsize = Min(intvec(nrM,ncM));
96
+ poly p; number n; intvec lexp;
97
+
98
+ for(i=1; i<=nsize; i++)
99
+ {
100
+ p = M[i,i];
101
+ lexp = leadexp(p);
102
+ // TM[i,i] = 1;
103
+ // check: is p a unit?
104
+ if (p!=0)
105
+ {
106
+ if ( lexp == 0)
107
+ {
108
+ // hence p = n*1
109
+ n = leadcoef(p);
110
+ TM[i,i] = 1/n;
111
+ }
112
+ }
113
+ }
114
+ int ppl = printlevel-voice+2;
115
+ dbprint(ppl,"divideUnits: extra transformation matrix is: ");
116
+ dbprint(ppl, TM);
117
+ L[2] = TM*L[2];
118
+ if (s==3)
119
+ {
120
+ L[1] = TM*L[1];
121
+ return(L);
122
+ }
123
+ else
124
+ {
125
+ return(L[2]);
126
+ }
127
+ }
128
+ example
129
+ { "EXAMPLE:"; echo = 2;
130
+ ring R=(0,m,M,L1,L2,m1,m2,g), D, lp; // two pendula example
131
+ matrix P[3][4]=m1*L1*D^2,m2*L2*D^2,(M+m1+m2)*D^2,-1,
132
+ m1*L1^2*D^2-m1*L1*g,0,m1*L1*D^2,0,0,
133
+ m2*L2^2*D^2-m2*L2*g,m2*L2*D^2,0;
134
+ list s=smith(P,1); // returns a list with 3 entries
135
+ print(s[2]); // a diagonal form, close to the Smith form
136
+ print(s[1]); // U, left transformation matrix
137
+ list t = divideUnits(s);
138
+ print(t[2]); // the Smith form of the matrix P
139
+ print(t[1]); // U', modified left transformation matrix
140
+ }
141
+
142
+ proc smith(matrix MA, list #)
143
+ "USAGE: smith(M[, eng1, eng2]); M matrix, eng1 and eng2 are optional integers
144
+ RETURN: matrix or list of matrices, depending on arguments
145
+ ASSUME: Basering is a commutative polynomial ring in one variable
146
+ PURPOSE: compute the Smith Normal Form of M with (optionally) transformation matrices
147
+ THEORY: Groebner bases are used for the Smith form like in [2] and [3].
148
+ NOTE: By default, just the Smith normal form of M is returned.
149
+ @* If the optional integer @code{eng1} is non-zero, the list {U,D,V} is returned
150
+ @* where U*M*V = D and the diagonal field entries of D are not normalized.
151
+ @* The normalization of the latter can be done with the 'divideUnits' procedure.
152
+ @* U and V above are square unimodular (invertible) matrices.
153
+ @* Note, that the procedure works for a rectangular matrix M.
154
+ @*
155
+ @* The optional integer @code{eng2} determines the Groebner basis engine:
156
+ @* 0 (default) ensures the use of 'slimgb' , otherwise 'std' is used.
157
+ DISPLAY: If @code{printlevel}=1, progress debug messages will be printed,
158
+ @* if @code{printlevel}>=2, all the debug messages will be printed.
159
+ EXAMPLE: example smith; shows examples
160
+ SEE ALSO: divideUnits, jacobson
161
+ "
162
+ {
163
+ def R = basering;
164
+ // check assume: R must be a polynomial ring in 1 variable
165
+ setring R;
166
+ if (nvars(R) >1 )
167
+ {
168
+ ERROR("Basering must have exactly one variable");
169
+ }
170
+
171
+ int eng = 0;
172
+ int BASIS;
173
+ if ( size(#)>0 )
174
+ {
175
+ eng=1;
176
+ if (typeof(#[1])=="int")
177
+ {
178
+ eng=int(#[1]); // zero can also happen
179
+ }
180
+ }
181
+ if (size(#)==2)
182
+ {
183
+ BASIS=#[2];
184
+ }
185
+ else{BASIS=0;}
186
+
187
+
188
+ int ROW=ncols(MA);
189
+ int COL=nrows(MA);
190
+
191
+ //generate a module consisting of the columns of MA
192
+ module m=MA[1];
193
+ int i;
194
+ for(i=2;i<=ROW;i++)
195
+ {
196
+ m=m,MA[i];
197
+ }
198
+
199
+ //if MA equals the zero matrix give back MA
200
+ if ( (size(module(m))==0) and (size(transpose(module(m)))==0) )
201
+ {
202
+ module L=freemodule(COL);
203
+ matrix LM=L;
204
+ L=freemodule(ROW);
205
+ matrix RM=L;
206
+ list RUECK=RM;
207
+ RUECK=insert(RUECK,MA);
208
+ RUECK=insert(RUECK,LM);
209
+ return(RUECK);
210
+ }
211
+
212
+ if(eng==1)
213
+ {
214
+ list rueckLI=diagonal_with_trafo(R,MA,BASIS);
215
+ list rueckLII=divisibility(rueckLI[2]);
216
+ matrix CON=divideByContent(rueckLII[2]);
217
+ list rueckL=CON*rueckLII[1]*rueckLI[1], CON*rueckLII[2], rueckLI[3]*rueckLII[3];
218
+ return(rueckL);
219
+ }
220
+ else
221
+ {
222
+ matrix rueckm=diagonal_without_trafo(R,MA,BASIS);
223
+ list rueckL=divisibility(rueckm);
224
+ matrix CON=divideByContent(rueckm);
225
+ rueckm=CON*rueckL[2];
226
+ return(rueckm);
227
+ }
228
+ }
229
+ example
230
+ { "EXAMPLE:"; echo = 2;
231
+ ring r = 0,x,Dp;
232
+ matrix m[3][2]=x, x^4+x^2+21, x^4+x^2+x, x^3+x, 4*x^2+x, x;
233
+ list s=smith(m,1);
234
+ print(s[2]); // non-normalized Smith form of m
235
+ print(s[1]*m*s[3] - s[2]); // check U*M*V = D
236
+ list t = divideUnits(s);
237
+ print(t[2]); // the Smith form of m
238
+ }
239
+
240
+ static proc diagonal_with_trafo(def R, matrix MA, int B)
241
+ {
242
+
243
+ int ppl = printlevel-voice+2;
244
+
245
+ int BASIS=B;
246
+ int ROW=ncols(MA);
247
+ int COL=nrows(MA);
248
+ module m=MA[1];
249
+ int i,j,k;
250
+ for(i=2;i<=ROW;i++)
251
+ {
252
+ m=m,MA[i];
253
+ }
254
+
255
+
256
+ //add zero rows or columns
257
+ //add zero rows or columns
258
+ int adrow=0;
259
+ for(i=1;i<=COL;i++)
260
+ {
261
+ k=0;
262
+ for(j=1;j<=ROW;j++)
263
+ {
264
+ if(MA[i,j]!=0){k=1;}
265
+ }
266
+ if(k==0){adrow++;}
267
+ }
268
+
269
+ m=transpose(m);
270
+ for(i=1;i<=adrow;i++){m=m,0;}
271
+ m=transpose(m);
272
+
273
+ list RINGLIST=ringlist(R);
274
+ list o="C",0;
275
+ list oo="lp",1;
276
+ list ORD=o,oo;
277
+ RINGLIST[3]=ORD;
278
+ def r=ring(RINGLIST);
279
+ setring r;
280
+ //fix the required ordering
281
+ map MAP=R,var(1);
282
+ module m=MAP(m);
283
+
284
+ int flag=1; ///////////////counts if the underlying ring is r (flag mod 2 == 1) or ro (flag mod 2 == 0)
285
+
286
+ module TrafoL=freemodule(COL);
287
+ module TrafoR=freemodule(ROW);
288
+ module EXL=freemodule(COL); //because we start with transpose(m)
289
+ module EXR=freemodule(ROW);
290
+
291
+ option(redSB);
292
+ option(redTail);
293
+ module STD_EX;
294
+ module Trafo;
295
+
296
+ int s,st,p,ff;
297
+
298
+ module LT,TSTD;
299
+ module STD=transpose(m);
300
+ int finish=0;
301
+ int fehlpos;
302
+ list pos;
303
+ matrix END;
304
+ matrix ENDSTD;
305
+ matrix STDFIN;
306
+ STDFIN=STD;
307
+ list COMPARE=STDFIN;
308
+
309
+ while(finish==0)
310
+ {
311
+ dbprint(ppl,"Going into the while cycle");
312
+
313
+ if(flag mod 2==1)
314
+ {
315
+ STD_EX=EXL,transpose(STD);
316
+ }
317
+ else
318
+ {
319
+ STD_EX=EXR,transpose(STD);
320
+ }
321
+ dbprint(ppl,"Computing Groebner basis: start");
322
+ dbprint(ppl-1,STD);
323
+ STD=engine(STD,BASIS);
324
+ dbprint(ppl,"Computing Groebner basis: finished");
325
+ dbprint(ppl-1,STD);
326
+
327
+ if(flag mod 2==1){s=ROW; st=COL;}else{s=COL; st=ROW;}
328
+ dbprint(ppl,"Computing Groebner basis for transformation matrix: start");
329
+ dbprint(ppl-1,STD_EX);
330
+ STD_EX=transpose(STD_EX);
331
+ STD_EX=engine(STD_EX,BASIS);
332
+ dbprint(ppl,"Computing Groebner basis for transformation matrix: finished");
333
+ dbprint(ppl-1,STD_EX);
334
+
335
+ //////// split STD_EX in STD and the transformation matrix
336
+ STD_EX=transpose(STD_EX);
337
+ STD=STD_EX[st+1];
338
+ LT=STD_EX[1];
339
+
340
+ ENDSTD=STD_EX;
341
+ for(i=2; i<=ncols(ENDSTD); i++)
342
+ {
343
+ if (i<=st)
344
+ {
345
+ LT=LT,STD_EX[i];
346
+ }
347
+ if (i>st+1)
348
+ {
349
+ STD=STD,STD_EX[i];
350
+ }
351
+ }
352
+
353
+ STD=transpose(STD);
354
+ LT=transpose(LT);
355
+
356
+ ////////////////////// compute the transformation matrices
357
+
358
+ if (flag mod 2 ==1)
359
+ {
360
+ TrafoL=transpose(matrix(LT))*matrix(TrafoL);
361
+ }
362
+ else
363
+ {
364
+ TrafoR=matrix(TrafoR)*matrix(LT);
365
+ }
366
+
367
+
368
+ STDFIN=STD;
369
+ /////////////////////////////////// check if the D-th row is finished ///////////////////////////////////
370
+ COMPARE=insert(COMPARE,STDFIN);
371
+ if(size(COMPARE)>=3)
372
+ {
373
+ if(STD==COMPARE[3]){finish=1;}
374
+ }
375
+ ////////////////////////////////// change to the opposite module
376
+ TSTD=transpose(STD);
377
+ STD=TSTD;
378
+ flag++;
379
+ dbprint(ppl,"Finished one while cycle");
380
+ }
381
+
382
+
383
+ if (flag mod 2!=0) { STD=transpose(STD); }
384
+
385
+
386
+ //zero columns to the end
387
+ matrix STDMM=STD;
388
+ pos=list();
389
+ fehlpos=0;
390
+ while( size(STD)+fehlpos-ncols(STDMM) < 0)
391
+ {
392
+ for(i=1; i<=ncols(STDMM); i++)
393
+ {
394
+ ff=0;
395
+ for(j=1; j<=nrows(STDMM); j++)
396
+ {
397
+ if (STD[j,i]==0) { ff++; }
398
+ }
399
+ if(ff==nrows(STDMM))
400
+ {
401
+ pos=insert(pos,i); fehlpos++;
402
+ }
403
+ }
404
+ }
405
+ int fehlposc=fehlpos;
406
+ module SORT;
407
+ for(i=1; i<=fehlpos; i++)
408
+ {
409
+ SORT=gen(2);
410
+ for (j=3;j<=ROW;j++)
411
+ {
412
+ SORT=SORT,gen(j);
413
+ }
414
+ SORT=SORT,gen(1);
415
+ STD=matrix(STD)*matrix(SORT);
416
+ TrafoR=matrix(TrafoR)*matrix(SORT);
417
+ }
418
+
419
+ //zero rows to the end
420
+ STDMM=transpose(STD);
421
+ pos=list();
422
+ fehlpos=0;
423
+ while( size(transpose(STD))+fehlpos-ncols(STDMM) < 0)
424
+ {
425
+ for(i=1; i<=ncols(STDMM); i++)
426
+ {
427
+ ff=0; for(j=1; j<=nrows(STDMM); j++)
428
+ {
429
+ if(transpose(STD)[j,i]==0){ ff++;}}
430
+ if(ff==nrows(STDMM)) { pos=insert(pos,i); fehlpos++; }
431
+ }
432
+ }
433
+ int fehlposr=fehlpos;
434
+
435
+ for(i=1; i<=fehlpos; i++)
436
+ {
437
+ SORT=gen(2);
438
+ for(j=3;j<=COL;j++){SORT=SORT,gen(j);}
439
+ SORT=SORT,gen(1);
440
+ SORT=transpose(SORT);
441
+ STD=matrix(SORT)*matrix(STD);
442
+ TrafoL=matrix(SORT)*matrix(TrafoL);
443
+ }
444
+
445
+ setring R;
446
+ map MAPinv=r,var(1);
447
+ module STD=MAPinv(STD);
448
+ module TrafoL=MAPinv(TrafoL);
449
+ matrix TrafoLM=TrafoL;
450
+ module TrafoR=MAPinv(TrafoR);
451
+ matrix TrafoRM=TrafoR;
452
+ matrix STDM=STD;
453
+
454
+ //Test
455
+ if(TrafoLM*m*TrafoRM!=STDM){ return(0); }
456
+
457
+ list RUECK=TrafoRM;
458
+ RUECK=insert(RUECK,STDM);
459
+ RUECK=insert(RUECK,TrafoLM);
460
+ return(RUECK);
461
+ }
462
+
463
+
464
+ static proc divisibility(matrix M)
465
+ {
466
+ matrix STDM=M;
467
+ int i,j;
468
+ int ROW=nrows(M);
469
+ int COL=ncols(M);
470
+ module TrafoR=freemodule(COL);
471
+ module TrafoL=freemodule(ROW);
472
+ module SORT;
473
+ matrix TrafoRM=TrafoR;
474
+ matrix TrafoLM=TrafoL;
475
+ list posdeg0;
476
+ int posdeg=0;
477
+ int act;
478
+ int Sort=ROW;
479
+ if(size(std(STDM))!=0)
480
+ { while( size(transpose(STDM)[Sort])==0 ){Sort--;}}
481
+
482
+ for(i=1;i<=Sort ;i++)
483
+ {
484
+ if(leadexp(STDM[i,i])==0){posdeg0=insert(posdeg0,i);posdeg++;}
485
+ }
486
+ //entries of degree 0 at the beginning
487
+ for(i=1; i<=posdeg; i++)
488
+ {
489
+ act=posdeg0[i];
490
+ SORT=gen(act);
491
+ for(j=1; j<=COL; j++){if(j!=act){SORT=SORT,gen(j);}}
492
+ STDM=STDM*SORT;
493
+ TrafoRM=TrafoRM*SORT;
494
+ SORT=gen(act);
495
+ for(j=1; j<=ROW; j++){if(j!=act){SORT=SORT,gen(j);}}
496
+ STDM=transpose(SORT)*STDM;
497
+ TrafoLM=transpose(SORT)*TrafoLM;
498
+ }
499
+
500
+ poly G;
501
+ module UNITL=freemodule(ROW);
502
+ matrix GCDL=UNITL;
503
+ module UNITR=freemodule(COL);
504
+ matrix GCDR=UNITR;
505
+ for(i=posdeg+1; i<=Sort; i++)
506
+ {
507
+ for(j=i+1; j<=Sort; j++)
508
+ {
509
+ GCDL=UNITL;
510
+ GCDR=UNITR;
511
+ G=gcd(STDM[i,i],STDM[j,j]);
512
+ ideal Z=STDM[i,i],STDM[j,j];
513
+ matrix T=lift(Z,G);
514
+ GCDL[i,i]=T[1,1];
515
+ GCDL[i,j]=T[2,1];
516
+ GCDL[j,i]=-STDM[j,j]/G;
517
+ GCDL[j,j]=STDM[i,i]/G;
518
+ GCDR[i,j]=T[2,1]*STDM[j,j]/G;
519
+ GCDR[j,j]=T[2,1]*STDM[j,j]/G-1;
520
+ GCDR[j,i]=1;
521
+ STDM=GCDL*STDM*GCDR;
522
+ TrafoLM=GCDL*TrafoLM;
523
+ TrafoRM=TrafoRM*GCDR;
524
+ }
525
+ }
526
+ list RUECK=TrafoRM;
527
+ RUECK=insert(RUECK,STDM);
528
+ RUECK=insert(RUECK,TrafoLM);
529
+ return(RUECK);
530
+ }
531
+
532
+ static proc diagonal_without_trafo( R, matrix MA, int B)
533
+ {
534
+ int ppl = printlevel-voice+2;
535
+
536
+ int BASIS=B;
537
+ int ROW=ncols(MA);
538
+ int COL=nrows(MA);
539
+ module m=MA[1];
540
+ int i;
541
+ for(i=2;i<=ROW;i++)
542
+ {m=m,MA[i];}
543
+
544
+
545
+ list RINGLIST=ringlist(R);
546
+ list o="C",0;
547
+ list oo="lp",1;
548
+ list ORD=o,oo;
549
+ RINGLIST[3]=ORD;
550
+ def r=ring(RINGLIST);
551
+ setring r;
552
+ //RICHTIGE ORDNUNG MACHEN
553
+ map MAP=R,var(1);
554
+ module m=MAP(m);
555
+
556
+ int flag=1; ///////////////counts if the underlying ring is r (flag mod 2 == 1) or ro (flag mod 2 == 0)
557
+
558
+
559
+ int act, j, ff;
560
+ option(redSB);
561
+ option(redTail);
562
+
563
+
564
+ module STD=transpose(m);
565
+ module TSTD;
566
+ int finish=0;
567
+ matrix STDFIN;
568
+ STDFIN=STD;
569
+ list COMPARE=STDFIN;
570
+
571
+ while(finish==0)
572
+ {
573
+ dbprint(ppl,"Going into the while cycle");
574
+ dbprint(ppl,"Computing Groebner basis: start");
575
+ dbprint(ppl-1,STD);
576
+ STD=engine(STD,BASIS);
577
+ dbprint(ppl,"Computing Groebner basis: finished");
578
+ dbprint(ppl-1,STD);
579
+ STDFIN=STD;
580
+ /////////////////////////////////// check if the D-th row is finished ///////////////////////////////////
581
+ COMPARE=insert(COMPARE,STDFIN);
582
+ if(size(COMPARE)>=3)
583
+ {
584
+ if(STD==COMPARE[3]){finish=1;}
585
+ }
586
+ ////////////////////////////////// change to the opposite module
587
+
588
+ TSTD=transpose(STD);
589
+ STD=TSTD;
590
+ flag++;
591
+ dbprint(ppl,"Finished one while cycle");
592
+ }
593
+
594
+ matrix STDMM=STD;
595
+ list pos=list();
596
+ int fehlpos=0;
597
+ while( size(STD)+fehlpos-ncols(STDMM) < 0)
598
+ {
599
+ for(i=1; i<=ncols(STDMM); i++)
600
+ {
601
+ ff=0;
602
+ for(j=1; j<=nrows(STDMM); j++)
603
+ {
604
+ if (STD[j,i]==0) { ff++; }
605
+ }
606
+ if(ff==nrows(STDMM))
607
+ {
608
+ pos=insert(pos,i); fehlpos++;
609
+ }
610
+ }
611
+ }
612
+ int fehlposc=fehlpos;
613
+ module SORT;
614
+ for(i=1; i<=fehlpos; i++)
615
+ {
616
+ SORT=gen(2);
617
+ for (j=3;j<=ROW;j++)
618
+ {
619
+ SORT=SORT,gen(j);
620
+ }
621
+ SORT=SORT,gen(1);
622
+ STD=STD*SORT;
623
+ }
624
+
625
+ //zero rows to the end
626
+ STDMM=transpose(STD);
627
+ pos=list();
628
+ fehlpos=0;
629
+ while( size(transpose(STD))+fehlpos-ncols(STDMM) < 0)
630
+ {
631
+ for(i=1; i<=ncols(STDMM); i++)
632
+ {
633
+ ff=0; for(j=1; j<=nrows(STDMM); j++)
634
+ {
635
+ if(transpose(STD)[j,i]==0){ ff++;}}
636
+ if(ff==nrows(STDMM)) { pos=insert(pos,i); fehlpos++; }
637
+ }
638
+ }
639
+ int fehlposr=fehlpos;
640
+
641
+ for(i=1; i<=fehlpos; i++)
642
+ {
643
+ SORT=gen(2);
644
+ for(j=3;j<=COL;j++){SORT=SORT,gen(j);}
645
+ SORT=SORT,gen(1);
646
+ SORT=transpose(SORT);
647
+ STD=SORT*STD;
648
+ }
649
+
650
+ //add zero rows or columns
651
+
652
+ int adrow=COL-size(transpose(STD));
653
+ int adcol=ROW-size(STD);
654
+
655
+ for(i=1;i<=adcol;i++){STD=STD,0;}
656
+ STD=transpose(STD);
657
+ for(i=1;i<=adrow;i++){STD=STD,0;}
658
+ STD=transpose(STD);
659
+
660
+ setring R;
661
+ map MAPinv=r,var(1);
662
+ module STD=MAPinv(STD);
663
+ matrix STDM=STD;
664
+ return(STDM);
665
+ }
666
+
667
+
668
+ // VL : engine replaced by the one from dmodapp.lib
669
+ // cases are changed
670
+
671
+ // static proc engine(module I, int i)
672
+ // {
673
+ // module J;
674
+ // if (i==0)
675
+ // {
676
+ // J = std(I);
677
+ // }
678
+ // if (i==1)
679
+ // {
680
+ // J = groebner(I);
681
+ // }
682
+ // if (i==2)
683
+ // {
684
+ // J = slimgb(I);
685
+ // }
686
+ // return(J);
687
+ // }
688
+
689
+ proc jacobson(matrix MA, list #)
690
+ "USAGE: jacobson(M, eng); M matrix, eng an optional int
691
+ RETURN: list
692
+ ASSUME: Basering is a (non-commutative) ring in two variables.
693
+ PURPOSE: compute a weak Jacobson normal form of M over the basering
694
+ THEORY: Groebner bases and involutions are used, following [3]
695
+ NOTE: A list L of matrices {U,D,V} is returned. That is L[1]*M*L[3]=L[2],
696
+ @* where L[2] is a diagonal matrix and
697
+ @* L[1], L[3] are square invertible polynomial (unimodular) matrices.
698
+ @* Note, that M can be rectangular.
699
+ @* The optional integer @code{eng2} determines the Groebner basis engine:
700
+ @* 0 (default) ensures the use of 'slimgb' , otherwise 'std' is used.
701
+ DISPLAY: If @code{printlevel}=1, progress debug messages will be printed,
702
+ @* if @code{printlevel}>=2, all the debug messages will be printed.
703
+ EXAMPLE: example jacobson; shows examples
704
+ SEE ALSO: divideUnits, smith
705
+ "
706
+ {
707
+ def R = basering;
708
+ // check assume: R must be a polynomial ring in 2 variables
709
+ setring R;
710
+ if ( (nvars(R) !=2 ) )
711
+ {
712
+ ERROR("Basering must have exactly two variables");
713
+ }
714
+
715
+ // check if MA is zero matrix and return corr. U,V
716
+ if ( (size(module(MA))==0) and (size(transpose(module(MA)))==0) )
717
+ {
718
+ int nr = nrows(MA);
719
+ int nc = ncols(MA);
720
+ matrix U = matrix(freemodule(nr));
721
+ matrix V = matrix(freemodule(nc));
722
+ list L; L[1]=U; L[2] = MA; L[3] = V;
723
+ return(L);
724
+ }
725
+
726
+ int B=0;
727
+ if ( size(#)>0 )
728
+ {
729
+ B=1;
730
+ if (typeof(#[1])=="int")
731
+ {
732
+ B=int(#[1]); // zero can also happen
733
+ }
734
+ }
735
+
736
+ //change ring
737
+ list RINGLIST=ringlist(R);
738
+ list o="C",0;
739
+ intvec v=0,1;
740
+ list oo="a",v;
741
+ v=1,1;
742
+ list ooo="lp",v;
743
+ list ORD=o,oo,ooo;
744
+ RINGLIST[3]=ORD;
745
+ def r=ring(RINGLIST);
746
+ setring r;
747
+
748
+ //fix the required ordering
749
+ map MAP=R,var(1),var(2);
750
+ matrix M=MAP(MA);
751
+
752
+ module TrafoL, TrafoR;
753
+ list TRIANGLE;
754
+ TRIANGLE=triangle(M,B);
755
+ TrafoL=TRIANGLE[1];
756
+ TrafoR=TRIANGLE[3];
757
+ module m=TRIANGLE[2];
758
+
759
+ //back to the ring
760
+ setring R;
761
+ map MAPR=r,var(1),var(2);
762
+ module ma=MAPR(m);
763
+ matrix MAA=ma;
764
+ module TL=MAPR(TrafoL);
765
+ module TR=MAPR(TrafoR);
766
+ matrix TRR=TR;
767
+ matrix CON=divideByContent(MAA);
768
+
769
+ list RUECK=CON*TL, CON*MAA, TRR;
770
+ return(RUECK);
771
+ }
772
+ example
773
+ {
774
+ "EXAMPLE:"; echo = 2;
775
+ ring r = 0,(x,d),Dp;
776
+ def R = nc_algebra(1,1); setring R; // the 1st Weyl algebra
777
+ matrix m[2][2] = d,x,0,d; print(m);
778
+ list J = jacobson(m); // returns a list with 3 entries
779
+ print(J[2]); // a Jacobson Form D for m
780
+ print(J[1]*m*J[3] - J[2]); // check that U*M*V = D
781
+ /* now, let us do the same for the shift algebra */
782
+ ring r2 = 0,(x,s),Dp;
783
+ def R2 = nc_algebra(1,s); setring R2; // the 1st shift algebra
784
+ matrix m[2][2] = s,x,0,s; print(m); // matrix of the same for as above
785
+ list J = jacobson(m);
786
+ print(J[2]); // a Jacobson Form D, quite different from above
787
+ print(J[1]*m*J[3] - J[2]); // check that U*M*V = D
788
+ }
789
+
790
+ //static
791
+ proc triangle(matrix MA, int B)
792
+ {
793
+ int ppl = printlevel-voice+2;
794
+
795
+ map inv=ncdetection();
796
+ int ROW=ncols(MA);
797
+ int COL=nrows(MA);
798
+
799
+ //generate a module consisting of the columns of MA
800
+ module m=MA[1];
801
+ int i,j,s,st,p,k,ff,ex, nz, ii,nextp;
802
+ for(i=2;i<=ROW;i++)
803
+ {
804
+ m=m,MA[i];
805
+ }
806
+ int BASIS=B;
807
+
808
+ //add zero rows or columns
809
+ int adrow=0;
810
+ for(i=1;i<=COL;i++)
811
+ {
812
+ k=0;
813
+ for(j=1;j<=ROW;j++)
814
+ {
815
+ if(MA[i,j]!=0){k=1;}
816
+ }
817
+ if(k==0){adrow++;}
818
+ }
819
+
820
+ m=transpose(m);
821
+ for(i=1;i<=adrow;i++){m=m,0;}
822
+ m=transpose(m);
823
+
824
+
825
+ int flag=1; ///////////////counts if the underlying ring is r (flag mod 2 == 1) or ro (flag mod 2 == 0)
826
+
827
+ module TrafoL=freemodule(COL);
828
+ module TrafoR=freemodule(ROW);
829
+ module EXL=freemodule(COL); //because we start with transpose(m)
830
+ module EXR=freemodule(ROW);
831
+
832
+ option(redSB);
833
+ option(redTail);
834
+ module STD_EX,LT,TSTD, L, Trafo;
835
+
836
+
837
+
838
+ module STD=transpose(m);
839
+ int finish=0;
840
+ list pos, COM, COM_EX;
841
+ matrix END, ENDSTD, STDFIN;
842
+ STDFIN=STD;
843
+ list COMPARE=STDFIN;
844
+ string @s;
845
+
846
+ while(finish==0)
847
+ {
848
+ dbprint(ppl,"Going into the while cycle");
849
+ if(flag mod 2==1){STD_EX=EXL,transpose(STD); ex=2*COL;} else {STD_EX=EXR,transpose(STD); ex=2*ROW;}
850
+
851
+ dbprint(ppl,"Computing Groebner basis: start");
852
+ dbprint(ppl-1,STD);
853
+ STD=engine(STD,BASIS);
854
+ dbprint(ppl,"Computing Groebner basis: finished");
855
+ dbprint(ppl-1,STD);
856
+ if(flag mod 2==1){s=ROW; st=COL;}else{s=COL; st=ROW;}
857
+
858
+ STD_EX=transpose(STD_EX);
859
+ dbprint(ppl,"Computing Groebner basis for transformation matrix: start");
860
+ dbprint(ppl-1,STD_EX);
861
+ STD_EX=engine(STD_EX,BASIS);
862
+ dbprint(ppl,"Computing Groebner basis for transformation matrix: finished");
863
+ dbprint(ppl-1,STD_EX);
864
+
865
+ COM=1;
866
+ COM_EX=1;
867
+ for(i=2; i<=size(STD); i++)
868
+ { COM=COM[1..size(COM)],i; COM_EX=COM_EX[1..size(COM_EX)],i; }
869
+ nz=size(STD_EX)-size(STD);
870
+
871
+ //zero rows in the beginning
872
+
873
+ if(size(STD)!=size(STD_EX) )
874
+ {
875
+ for(i=1; i<=size(STD_EX)-size(STD); i++)
876
+ {
877
+ COM_EX=0,COM_EX[1..size(COM_EX)];
878
+ }
879
+ }
880
+
881
+ for(i=nz+1; i<=size(STD_EX); i++ )
882
+ {if( leadcoef(STD[i-nz])!=leadcoef(STD_EX[i]) ) {STD[i-nz]=leadcoef(STD_EX[i])*STD[i-nz];}
883
+ }
884
+
885
+ //assign the zero rows in STD_EX
886
+
887
+ for (j=2; j<=nz; j++)
888
+ {
889
+ p=0;
890
+ i=1;
891
+ while(STD_EX[j-1][i]==0){i++;}
892
+ p=i-1;
893
+ nextp=1;
894
+ k=0;
895
+ i=1;
896
+ while(STD_EX[j][i]==0 and i<=p)
897
+ { k++; i++;}
898
+ if (k==p){ COM_EX[j]=-1; }
899
+ }
900
+
901
+ //assign the zero rows in STD
902
+ for (j=2; j<=size(STD); j++)
903
+ {
904
+ i=size(transpose(STD));
905
+ while(STD[j-1][i]==0){i--;}
906
+ p=i;
907
+ i=size(transpose(STD[j]));
908
+ while(STD[j][i]==0){i--;}
909
+ if (i==p){ COM[j]=-1; }
910
+ }
911
+
912
+ for(j=1; j<=size(COM); j++)
913
+ {
914
+ if(COM[j]<0){COM=delete(COM,j);}
915
+ }
916
+
917
+ for(i=1; i<=size(COM_EX); i++)
918
+ {ff=0;
919
+ if(COM_EX[i]==0){ff=1;}
920
+ else
921
+ { for(j=1; j<=size(COM); j++)
922
+ { if(COM_EX[i]==COM[j]){ff=1;} }
923
+ }
924
+ if(ff==0){COM_EX[i]=-1;}
925
+ }
926
+
927
+ L=STD_EX[1];
928
+ for(i=2; i<=size(COM_EX); i++)
929
+ {
930
+ if(COM_EX[i]!=-1){L=L,STD_EX[i];}
931
+ }
932
+
933
+ //////// split STD_EX in STD and the transformation matrix
934
+
935
+ L=transpose(L);
936
+ STD=L[st+1];
937
+ LT=L[1];
938
+
939
+
940
+ for(i=2; i<=s+st; i++)
941
+ {
942
+ if (i<=st)
943
+ {
944
+ LT=LT,L[i];
945
+ }
946
+ if (i>st+1)
947
+ {
948
+ STD=STD,L[i];
949
+ }
950
+ }
951
+
952
+ STD=transpose(STD);
953
+ STDFIN=matrix(STD);
954
+ COMPARE=insert(COMPARE,STDFIN);
955
+ LT=transpose(LT);
956
+
957
+ ////////////////////// compute the transformation matrices
958
+
959
+ if (flag mod 2 ==1)
960
+ {
961
+ TrafoL=transpose(matrix(LT))*matrix(TrafoL);
962
+ dbprint(ppl-1,"Left transformation matrix:");
963
+ dbprint(ppl-1,TrafoL);
964
+ @s = texobj("",matrix(TrafoL));
965
+ dbprint(ppl-2,"Left transformation matrix in TeX format:");
966
+ dbprint(ppl-2,@s);
967
+ }
968
+ else
969
+ {
970
+ TrafoR=matrix(TrafoR)*matrix(involution(LT,inv));
971
+ dbprint(ppl-1,"Right transformation matrix:");
972
+ dbprint(ppl-1,matrix(TrafoR));
973
+ @s = texobj("",TrafoR);
974
+ dbprint(ppl-2,"Right transformation matrix in TeX format:");
975
+ dbprint(ppl-2,@s);
976
+ }
977
+
978
+ ///////////////////////// check whether the alg terminated /////////////////
979
+ if(size(COMPARE)>=3)
980
+ {
981
+ if(STD==COMPARE[3]){finish=1;}
982
+ }
983
+ ////////////////////////////////// change to the opposite module
984
+ dbprint(ppl-1,"Matrix for the next step:");
985
+ dbprint(ppl-1,STD);
986
+ dbprint(ppl-2,"Matrix for the next step in TeX format:");
987
+ @s = texobj("",matrix(STD));
988
+ dbprint(ppl-2,@s);
989
+ TSTD=transpose(STD);
990
+ STD=involution(TSTD,inv);
991
+ flag++;
992
+ dbprint(ppl,"Finished one while cycle");
993
+ }
994
+
995
+ if (flag mod 2 ==0){ STD = involution(STD,inv);} else { STD = transpose(STD); }
996
+
997
+ list REVERSE=TrafoL,STD,TrafoR;
998
+ return(REVERSE);
999
+ }
1000
+
1001
+ static proc divideByContent(matrix M)
1002
+ {
1003
+ //find first entry not equal to zero
1004
+ int i,k;
1005
+ k=1;
1006
+ vector CON;
1007
+ for(i=1;i<=ncols(M);i++)
1008
+ {
1009
+ if(leadcoef(M[i])!=0){CON=CON+leadcoef(M[i])*gen(k); k++;}
1010
+ }
1011
+ poly con=content(CON);
1012
+ matrix TL=1/con*freemodule(nrows(M));
1013
+ return(TL);
1014
+ }
1015
+
1016
+
1017
+ /////interesting examples for smith////////////////
1018
+
1019
+ /*
1020
+
1021
+ //static proc Ex_One_wheeled_bicycle()
1022
+ {
1023
+ ring RA=(0,m), D, lp;
1024
+ matrix bicycle[2][3]=(1+m)*D^2, D^2, 1, D^2, D^2-1, 0;
1025
+ list s=smith(bicycle, 1,0);
1026
+ print(s[2]);
1027
+ print(s[1]*bicycle*s[3]-s[2]);
1028
+ }
1029
+
1030
+
1031
+ //static proc Ex_RLC-circuit()
1032
+ {
1033
+ ring RA=(0,m,R1,R2,L,C), D, lp;
1034
+ matrix circuit[2][3]=D+1/(R1*C), 0, -1/(R1*C), 0, D+R2/L, -1/L;
1035
+ list s=smith(circuit, 1,0);
1036
+ print(s[2]);
1037
+ print(s[1]*circuit*s[3]-s[2]);
1038
+ }
1039
+
1040
+
1041
+ //static proc Ex_two_pendula()
1042
+ {
1043
+ ring RA=(0,m,M,L1,L2,m1,m2,g), D, lp;
1044
+ matrix pendula[3][4]=m1*L1*D^2,m2*L2*D^2,(M+m1+m2)*D^2,-1,m1*L1^2*D^2-m1*L1*g,0,m1*L1*D^2,0,0,
1045
+ m2*L2^2*D^2-m2*L2*g,m2*L2*D^2,0;
1046
+ list s=smith(pendula, 1,0);
1047
+ print(s[2]);
1048
+ print(s[1]*pendula*s[3]-s[2]);
1049
+ }
1050
+
1051
+ //static proc Ex_linerized_satellite_in_a_circular_equatorial_orbit()
1052
+ {
1053
+ ring RA=(0,m,omega,r,a,b), D, lp;
1054
+ matrix satellite[4][6]=
1055
+ D,-1,0,0,0,0,
1056
+ -3*omega^2,D,0,-2*omega*r,-a/m,0,
1057
+ 0,0,D,-1,0,0,
1058
+ 0,2*omega/r,0,D,0,-b/(m*r);
1059
+ list s=smith(satellite, 1,0);
1060
+ print(s[2]);
1061
+ print(s[1]*satellite*s[3]-s[2]);
1062
+ }
1063
+
1064
+ //static proc Ex_flexible_one_link_robot()
1065
+ {
1066
+ ring RA=(0,M11,M12,M13,M21,M22,M31,M33,K1,K2), D, lp;
1067
+ matrix robot[3][4]=M11*D^2,M12*D^2,M13*D^2,-1,M21*D^2,M22*D^2+K1,0,0,M31*D^2,0,M33*D^2+K2,0;
1068
+ list s=smith(robot, 1,0);
1069
+ print(s[2]);
1070
+ print(s[1]*robot*s[3]-s[2]);
1071
+ }
1072
+
1073
+ */
1074
+
1075
+
1076
+ /////interesting examples for jacobson////////////////
1077
+
1078
+ /*
1079
+
1080
+ //static proc Ex_compare_output_with_maple_package_JanetOre()
1081
+ {
1082
+ ring w = 0,(x,d),Dp;
1083
+ def W=nc_algebra(1,1);
1084
+ setring W;
1085
+ matrix m[3][3]=[d2,d+1,0],[d+1,0,d3-x2*d],[2d+1, d3+d2, d2];
1086
+ list J=jacobson(m,0);
1087
+ print(J[1]*m*J[3]);
1088
+ print(J[2]);
1089
+ print(J[1]);
1090
+ print(J[3]);
1091
+ print(J[1]*m*J[3]-J[2]);
1092
+ }
1093
+
1094
+ // modification for shift algebra
1095
+ {
1096
+ ring w = 0,(x,s),Dp;
1097
+ def W=nc_algebra(1,s);
1098
+ setring W;
1099
+ matrix m[3][3]=[s^2,s+1,0],[s+1,0,s^3-x^2*s],[2*s+1, s^3+s^2, s^2];
1100
+ list J=jacobson(m,0);
1101
+ print(J[1]*m*J[3]);
1102
+ print(J[2]);
1103
+ print(J[1]);
1104
+ print(J[3]);
1105
+ print(J[1]*m*J[3]-J[2]);
1106
+ }
1107
+
1108
+ //static proc Ex_cyclic()
1109
+ {
1110
+ ring w = 0,(x,d),Dp;
1111
+ def W=nc_algebra(1,1);
1112
+ setring W;
1113
+ matrix m[3][3]=d,0,0,x*d+1,d,0,0,x*d,d;
1114
+ list J=jacobson(m,0);
1115
+ print(J[1]*m*J[3]);
1116
+ print(J[2]);
1117
+ print(J[1]);
1118
+ print(J[3]);
1119
+ print(J[1]*m*J[3]-J[2]);
1120
+ }
1121
+
1122
+ // modification for shift algebra: gives a module with ann = s^2
1123
+ {
1124
+ ring w = 0,(x,s),Dp;
1125
+ def W=nc_algebra(1,s);
1126
+ setring W;
1127
+ matrix m[3][3]=s,0,0,x*s+1,s,0,0,x*s,s;
1128
+ list J=jacobson(m,0);
1129
+ print(J[1]*m*J[3]);
1130
+ print(J[2]);
1131
+ print(J[1]);
1132
+ print(J[3]);
1133
+ print(J[1]*m*J[3]-J[2]);
1134
+ }
1135
+
1136
+ // yet another modification for shift algebra: gives a module with ann = s
1137
+ // xs+1 is replaced by x*s+s
1138
+ {
1139
+ ring w = 0,(x,s),Dp;
1140
+ def W=nc_algebra(1,s);
1141
+ setring W;
1142
+ matrix m[3][3]=s,0,0,x*s+s,s,0,0,x*s,s;
1143
+ list J=jacobson(m,0);
1144
+ print(J[1]*m*J[3]);
1145
+ print(J[2]);
1146
+ print(J[1]);
1147
+ print(J[3]);
1148
+ print(J[1]*m*J[3]-J[2]);
1149
+ }
1150
+
1151
+ // variations for above setup with shift algebra:
1152
+
1153
+ // easy but instructive one: see the difference to Weyl case!
1154
+ matrix m[2][2]=s,x,0,s; print(m);
1155
+
1156
+ // more interesting:
1157
+ matrix n[3][3]=s,x,0,0,s,x,s,0,x;
1158
+
1159
+ // things blow up
1160
+ matrix m[2][3] = s,x^2*s,x^3*s,s*x^2,s*x+1,(x+1)^3;
1161
+ matrix m[2][3] = s,x^2*s,x^3*s,s*x^2,s*x+1,(x+s)^2; // variation
1162
+ matrix m[2][4] = s,x^2*s,x^3*s,s*x^2,s*x+1,(x+1)^3, (x+s)^2, x*s; // bug (matrix sizes
1163
+ matrix m[3][4] = s,x^2*s,x^3*s,s*x^2,s*x+1,(x+1)^3, (x+s)^2, x*s; // here the last row contains zeros
1164
+
1165
+ // this one is quite nasty and time consumig
1166
+ matrix m[3][4] = s,x^2*s,x^3*s,s*x^2,s*x+1,(x+1)^3, (x+s)^2, x*s,x,x^2,x^3,s;
1167
+
1168
+ // example from the paper:
1169
+ ring w = 0,(x,d),Dp;
1170
+ def W=nc_algebra(1,1);
1171
+ setring W;
1172
+ matrix m[2][2]=d^2-1,d+1,d^2+1,d-x;
1173
+ list J=jacobson(m,0);
1174
+ print(J[1]*m*J[3]); print(J[2]); print(J[1]); print(J[3]);
1175
+ print(J[1]*m*J[3]-J[2]);
1176
+
1177
+ ring w2 = 0,(x,s),Dp;
1178
+ def W2=nc_algebra(1,s);
1179
+ setring W2;
1180
+ poly d = s;
1181
+ matrix m[2][2]=d^2-1,d+1,d^2+1,d-x;
1182
+ list J=jacobson(m,0);
1183
+ print(J[1]*m*J[3]); print(J[2]); print(J[1]); print(J[3]);
1184
+ print(J[1]*m*J[3]-J[2]);
1185
+ // here, both JNFs are cyclic
1186
+
1187
+ // another example from the paper:
1188
+ ring w = 0,(x,d),Dp;
1189
+ def W=nc_algebra(1,1);
1190
+ setring W;
1191
+ matrix m[2][2]=-x*d+1, x^2*d, -d, x*d+1;
1192
+ list J=jacobson(m,0);
1193
+ print(J[1]*m*J[3]); print(J[2]); print(J[1]); print(J[3]);
1194
+ print(J[1]*m*J[3]-J[2]);
1195
+
1196
+ ring w2 = 0,(x,s),Dp;
1197
+ def W2=nc_algebra(1,s);
1198
+ setring W2;
1199
+ poly d = s;
1200
+ matrix m[2][2]=-x*d+1, x^2*d, -d, x*d+1;
1201
+ list J=jacobson(m,0);
1202
+ print(J[1]*m*J[3]); print(J[2]); print(J[1]); print(J[3]);
1203
+ print(J[1]*m*J[3]-J[2]);
1204
+
1205
+ // yet another example from the paper, also Middeke
1206
+ ring w = (0,y),(x,d),Dp;
1207
+ def W=nc_algebra(1,1);
1208
+ setring W;
1209
+ matrix m[2][2]=y^2*d^2+d+1, 1, x*d, x^2*d^2+d+y;
1210
+ list J=jacobson(m,0);
1211
+ print(J[1]*m*J[3]); print(J[2]); print(J[1]); print(J[3]);
1212
+ print(J[1]*m*J[3]-J[2]);
1213
+
1214
+
1215
+ */