passagemath-singular 10.6.31rc3__cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl

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

Potentially problematic release.


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

Files changed (490) hide show
  1. PySingular.cpython-314-aarch64-linux-gnu.so +0 -0
  2. passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
  3. passagemath_singular-10.6.31rc3.dist-info/RECORD +490 -0
  4. passagemath_singular-10.6.31rc3.dist-info/WHEEL +6 -0
  5. passagemath_singular-10.6.31rc3.dist-info/top_level.txt +3 -0
  6. passagemath_singular.libs/libSingular-4-6a2a8666.4.1.so +0 -0
  7. passagemath_singular.libs/libcddgmp-ac579979.so.0.1.3 +0 -0
  8. passagemath_singular.libs/libfactory-4-66e33516.4.1.so +0 -0
  9. passagemath_singular.libs/libflint-81de1160.so.21.0.0 +0 -0
  10. passagemath_singular.libs/libgf2x-fbd36f80.so.3.0.0 +0 -0
  11. passagemath_singular.libs/libgfortran-e1b7dfc8.so.5.0.0 +0 -0
  12. passagemath_singular.libs/libgmp-93ebf16a.so.10.5.0 +0 -0
  13. passagemath_singular.libs/libgsl-e3525837.so.28.0.0 +0 -0
  14. passagemath_singular.libs/libmpfr-e0f11cf3.so.6.2.1 +0 -0
  15. passagemath_singular.libs/libntl-0043a3a2.so.44.0.1 +0 -0
  16. passagemath_singular.libs/libomalloc-0-06512335.9.6.so +0 -0
  17. passagemath_singular.libs/libopenblasp-r0-4c5b64b1.3.29.so +0 -0
  18. passagemath_singular.libs/libpolys-4-cb7246b5.4.1.so +0 -0
  19. passagemath_singular.libs/libreadline-28330744.so.8.2 +0 -0
  20. passagemath_singular.libs/libsingular_resources-4-8c425241.4.1.so +0 -0
  21. passagemath_singular.libs/libtinfo-f81c2d16.so.6.3 +0 -0
  22. sage/algebras/all__sagemath_singular.py +3 -0
  23. sage/algebras/fusion_rings/all.py +19 -0
  24. sage/algebras/fusion_rings/f_matrix.py +2448 -0
  25. sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-314-aarch64-linux-gnu.so +0 -0
  26. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +5 -0
  27. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +538 -0
  28. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-314-aarch64-linux-gnu.so +0 -0
  29. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +3 -0
  30. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +331 -0
  31. sage/algebras/fusion_rings/fusion_double.py +899 -0
  32. sage/algebras/fusion_rings/fusion_ring.py +1580 -0
  33. sage/algebras/fusion_rings/poly_tup_engine.cpython-314-aarch64-linux-gnu.so +0 -0
  34. sage/algebras/fusion_rings/poly_tup_engine.pxd +24 -0
  35. sage/algebras/fusion_rings/poly_tup_engine.pyx +579 -0
  36. sage/algebras/fusion_rings/shm_managers.cpython-314-aarch64-linux-gnu.so +0 -0
  37. sage/algebras/fusion_rings/shm_managers.pxd +24 -0
  38. sage/algebras/fusion_rings/shm_managers.pyx +780 -0
  39. sage/algebras/letterplace/all.py +1 -0
  40. sage/algebras/letterplace/free_algebra_element_letterplace.cpython-314-aarch64-linux-gnu.so +0 -0
  41. sage/algebras/letterplace/free_algebra_element_letterplace.pxd +18 -0
  42. sage/algebras/letterplace/free_algebra_element_letterplace.pyx +755 -0
  43. sage/algebras/letterplace/free_algebra_letterplace.cpython-314-aarch64-linux-gnu.so +0 -0
  44. sage/algebras/letterplace/free_algebra_letterplace.pxd +35 -0
  45. sage/algebras/letterplace/free_algebra_letterplace.pyx +914 -0
  46. sage/algebras/letterplace/letterplace_ideal.cpython-314-aarch64-linux-gnu.so +0 -0
  47. sage/algebras/letterplace/letterplace_ideal.pyx +408 -0
  48. sage/algebras/quatalg/all.py +2 -0
  49. sage/algebras/quatalg/quaternion_algebra.py +4778 -0
  50. sage/algebras/quatalg/quaternion_algebra_cython.cpython-314-aarch64-linux-gnu.so +0 -0
  51. sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
  52. sage/algebras/quatalg/quaternion_algebra_element.cpython-314-aarch64-linux-gnu.so +0 -0
  53. sage/algebras/quatalg/quaternion_algebra_element.pxd +29 -0
  54. sage/algebras/quatalg/quaternion_algebra_element.pyx +2176 -0
  55. sage/all__sagemath_singular.py +11 -0
  56. sage/ext_data/all__sagemath_singular.py +1 -0
  57. sage/ext_data/singular/function_field/core.lib +98 -0
  58. sage/interfaces/all__sagemath_singular.py +1 -0
  59. sage/interfaces/singular.py +2835 -0
  60. sage/libs/all__sagemath_singular.py +1 -0
  61. sage/libs/singular/__init__.py +1 -0
  62. sage/libs/singular/decl.pxd +1168 -0
  63. sage/libs/singular/function.cpython-314-aarch64-linux-gnu.so +0 -0
  64. sage/libs/singular/function.pxd +87 -0
  65. sage/libs/singular/function.pyx +1901 -0
  66. sage/libs/singular/function_factory.py +61 -0
  67. sage/libs/singular/groebner_strategy.cpython-314-aarch64-linux-gnu.so +0 -0
  68. sage/libs/singular/groebner_strategy.pxd +22 -0
  69. sage/libs/singular/groebner_strategy.pyx +582 -0
  70. sage/libs/singular/option.cpython-314-aarch64-linux-gnu.so +0 -0
  71. sage/libs/singular/option.pyx +671 -0
  72. sage/libs/singular/polynomial.cpython-314-aarch64-linux-gnu.so +0 -0
  73. sage/libs/singular/polynomial.pxd +39 -0
  74. sage/libs/singular/polynomial.pyx +661 -0
  75. sage/libs/singular/ring.cpython-314-aarch64-linux-gnu.so +0 -0
  76. sage/libs/singular/ring.pxd +58 -0
  77. sage/libs/singular/ring.pyx +893 -0
  78. sage/libs/singular/singular.cpython-314-aarch64-linux-gnu.so +0 -0
  79. sage/libs/singular/singular.pxd +72 -0
  80. sage/libs/singular/singular.pyx +1944 -0
  81. sage/libs/singular/standard_options.py +145 -0
  82. sage/matrix/all__sagemath_singular.py +1 -0
  83. sage/matrix/matrix_mpolynomial_dense.cpython-314-aarch64-linux-gnu.so +0 -0
  84. sage/matrix/matrix_mpolynomial_dense.pxd +7 -0
  85. sage/matrix/matrix_mpolynomial_dense.pyx +615 -0
  86. sage/rings/all__sagemath_singular.py +1 -0
  87. sage/rings/function_field/all__sagemath_singular.py +1 -0
  88. sage/rings/function_field/derivations_polymod.py +911 -0
  89. sage/rings/function_field/element_polymod.cpython-314-aarch64-linux-gnu.so +0 -0
  90. sage/rings/function_field/element_polymod.pyx +406 -0
  91. sage/rings/function_field/function_field_polymod.py +2611 -0
  92. sage/rings/function_field/ideal_polymod.py +1775 -0
  93. sage/rings/function_field/order_polymod.py +1475 -0
  94. sage/rings/function_field/place_polymod.py +681 -0
  95. sage/rings/polynomial/all__sagemath_singular.py +1 -0
  96. sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-314-aarch64-linux-gnu.so +0 -0
  97. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +5 -0
  98. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +339 -0
  99. sage/rings/polynomial/multi_polynomial_libsingular.cpython-314-aarch64-linux-gnu.so +0 -0
  100. sage/rings/polynomial/multi_polynomial_libsingular.pxd +30 -0
  101. sage/rings/polynomial/multi_polynomial_libsingular.pyx +6277 -0
  102. sage/rings/polynomial/plural.cpython-314-aarch64-linux-gnu.so +0 -0
  103. sage/rings/polynomial/plural.pxd +48 -0
  104. sage/rings/polynomial/plural.pyx +3171 -0
  105. sage/symbolic/all__sagemath_singular.py +1 -0
  106. sage/symbolic/comparison_impl.pxi +428 -0
  107. sage/symbolic/constants_c_impl.pxi +178 -0
  108. sage/symbolic/expression.cpython-314-aarch64-linux-gnu.so +0 -0
  109. sage/symbolic/expression.pxd +7 -0
  110. sage/symbolic/expression.pyx +14200 -0
  111. sage/symbolic/getitem_impl.pxi +202 -0
  112. sage/symbolic/pynac.pxi +572 -0
  113. sage/symbolic/pynac_constant_impl.pxi +133 -0
  114. sage/symbolic/pynac_function_impl.pxi +206 -0
  115. sage/symbolic/pynac_impl.pxi +2576 -0
  116. sage/symbolic/pynac_wrap.h +124 -0
  117. sage/symbolic/series_impl.pxi +272 -0
  118. sage/symbolic/substitution_map_impl.pxi +94 -0
  119. sage_wheels/bin/ESingular +0 -0
  120. sage_wheels/bin/Singular +0 -0
  121. sage_wheels/bin/TSingular +0 -0
  122. sage_wheels/lib/singular/MOD/cohomo.la +41 -0
  123. sage_wheels/lib/singular/MOD/cohomo.so +0 -0
  124. sage_wheels/lib/singular/MOD/customstd.la +41 -0
  125. sage_wheels/lib/singular/MOD/customstd.so +0 -0
  126. sage_wheels/lib/singular/MOD/freealgebra.la +41 -0
  127. sage_wheels/lib/singular/MOD/freealgebra.so +0 -0
  128. sage_wheels/lib/singular/MOD/gfanlib.la +41 -0
  129. sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
  130. sage_wheels/lib/singular/MOD/gitfan.la +41 -0
  131. sage_wheels/lib/singular/MOD/gitfan.so +0 -0
  132. sage_wheels/lib/singular/MOD/interval.la +41 -0
  133. sage_wheels/lib/singular/MOD/interval.so +0 -0
  134. sage_wheels/lib/singular/MOD/loctriv.la +41 -0
  135. sage_wheels/lib/singular/MOD/loctriv.so +0 -0
  136. sage_wheels/lib/singular/MOD/machinelearning.la +41 -0
  137. sage_wheels/lib/singular/MOD/machinelearning.so +0 -0
  138. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.la +41 -0
  139. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.so +0 -0
  140. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.la +41 -0
  141. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.so +0 -0
  142. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.la +41 -0
  143. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.so +0 -0
  144. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.la +41 -0
  145. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.so +0 -0
  146. sage_wheels/lib/singular/MOD/partialgb.la +41 -0
  147. sage_wheels/lib/singular/MOD/partialgb.so +0 -0
  148. sage_wheels/lib/singular/MOD/pyobject.la +41 -0
  149. sage_wheels/lib/singular/MOD/pyobject.so +0 -0
  150. sage_wheels/lib/singular/MOD/singmathic.la +41 -0
  151. sage_wheels/lib/singular/MOD/singmathic.so +0 -0
  152. sage_wheels/lib/singular/MOD/sispasm.la +41 -0
  153. sage_wheels/lib/singular/MOD/sispasm.so +0 -0
  154. sage_wheels/lib/singular/MOD/subsets.la +41 -0
  155. sage_wheels/lib/singular/MOD/subsets.so +0 -0
  156. sage_wheels/lib/singular/MOD/systhreads.la +41 -0
  157. sage_wheels/lib/singular/MOD/systhreads.so +0 -0
  158. sage_wheels/lib/singular/MOD/syzextra.la +41 -0
  159. sage_wheels/lib/singular/MOD/syzextra.so +0 -0
  160. sage_wheels/libexec/singular/MOD/change_cost +0 -0
  161. sage_wheels/libexec/singular/MOD/singularsurf +11 -0
  162. sage_wheels/libexec/singular/MOD/singularsurf_jupyter +9 -0
  163. sage_wheels/libexec/singular/MOD/singularsurf_win +10 -0
  164. sage_wheels/libexec/singular/MOD/solve_IP +0 -0
  165. sage_wheels/libexec/singular/MOD/surfex +16 -0
  166. sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
  167. sage_wheels/share/factory/gftables/10201 +342 -0
  168. sage_wheels/share/factory/gftables/1024 +37 -0
  169. sage_wheels/share/factory/gftables/10609 +356 -0
  170. sage_wheels/share/factory/gftables/11449 +384 -0
  171. sage_wheels/share/factory/gftables/11881 +398 -0
  172. sage_wheels/share/factory/gftables/121 +6 -0
  173. sage_wheels/share/factory/gftables/12167 +408 -0
  174. sage_wheels/share/factory/gftables/125 +7 -0
  175. sage_wheels/share/factory/gftables/12769 +428 -0
  176. sage_wheels/share/factory/gftables/128 +7 -0
  177. sage_wheels/share/factory/gftables/1331 +47 -0
  178. sage_wheels/share/factory/gftables/1369 +48 -0
  179. sage_wheels/share/factory/gftables/14641 +490 -0
  180. sage_wheels/share/factory/gftables/15625 +523 -0
  181. sage_wheels/share/factory/gftables/16 +3 -0
  182. sage_wheels/share/factory/gftables/16129 +540 -0
  183. sage_wheels/share/factory/gftables/16384 +549 -0
  184. sage_wheels/share/factory/gftables/16807 +563 -0
  185. sage_wheels/share/factory/gftables/1681 +58 -0
  186. sage_wheels/share/factory/gftables/169 +8 -0
  187. sage_wheels/share/factory/gftables/17161 +574 -0
  188. sage_wheels/share/factory/gftables/1849 +64 -0
  189. sage_wheels/share/factory/gftables/18769 +628 -0
  190. sage_wheels/share/factory/gftables/19321 +646 -0
  191. sage_wheels/share/factory/gftables/19683 +659 -0
  192. sage_wheels/share/factory/gftables/2048 +71 -0
  193. sage_wheels/share/factory/gftables/2187 +75 -0
  194. sage_wheels/share/factory/gftables/2197 +76 -0
  195. sage_wheels/share/factory/gftables/2209 +76 -0
  196. sage_wheels/share/factory/gftables/22201 +742 -0
  197. sage_wheels/share/factory/gftables/22801 +762 -0
  198. sage_wheels/share/factory/gftables/2401 +82 -0
  199. sage_wheels/share/factory/gftables/243 +11 -0
  200. sage_wheels/share/factory/gftables/24389 +815 -0
  201. sage_wheels/share/factory/gftables/24649 +824 -0
  202. sage_wheels/share/factory/gftables/25 +3 -0
  203. sage_wheels/share/factory/gftables/256 +11 -0
  204. sage_wheels/share/factory/gftables/26569 +888 -0
  205. sage_wheels/share/factory/gftables/27 +3 -0
  206. sage_wheels/share/factory/gftables/27889 +932 -0
  207. sage_wheels/share/factory/gftables/2809 +96 -0
  208. sage_wheels/share/factory/gftables/28561 +954 -0
  209. sage_wheels/share/factory/gftables/289 +12 -0
  210. sage_wheels/share/factory/gftables/29791 +995 -0
  211. sage_wheels/share/factory/gftables/29929 +1000 -0
  212. sage_wheels/share/factory/gftables/3125 +107 -0
  213. sage_wheels/share/factory/gftables/32 +4 -0
  214. sage_wheels/share/factory/gftables/32041 +1070 -0
  215. sage_wheels/share/factory/gftables/32761 +1094 -0
  216. sage_wheels/share/factory/gftables/32768 +1095 -0
  217. sage_wheels/share/factory/gftables/343 +14 -0
  218. sage_wheels/share/factory/gftables/3481 +118 -0
  219. sage_wheels/share/factory/gftables/361 +14 -0
  220. sage_wheels/share/factory/gftables/36481 +1218 -0
  221. sage_wheels/share/factory/gftables/3721 +126 -0
  222. sage_wheels/share/factory/gftables/37249 +1244 -0
  223. sage_wheels/share/factory/gftables/38809 +1296 -0
  224. sage_wheels/share/factory/gftables/39601 +1322 -0
  225. sage_wheels/share/factory/gftables/4 +3 -0
  226. sage_wheels/share/factory/gftables/4096 +139 -0
  227. sage_wheels/share/factory/gftables/44521 +1486 -0
  228. sage_wheels/share/factory/gftables/4489 +152 -0
  229. sage_wheels/share/factory/gftables/49 +4 -0
  230. sage_wheels/share/factory/gftables/4913 +166 -0
  231. sage_wheels/share/factory/gftables/49729 +1660 -0
  232. sage_wheels/share/factory/gftables/5041 +170 -0
  233. sage_wheels/share/factory/gftables/50653 +1691 -0
  234. sage_wheels/share/factory/gftables/512 +20 -0
  235. sage_wheels/share/factory/gftables/51529 +1720 -0
  236. sage_wheels/share/factory/gftables/52441 +1750 -0
  237. sage_wheels/share/factory/gftables/529 +20 -0
  238. sage_wheels/share/factory/gftables/5329 +180 -0
  239. sage_wheels/share/factory/gftables/54289 +1812 -0
  240. sage_wheels/share/factory/gftables/57121 +1906 -0
  241. sage_wheels/share/factory/gftables/58081 +1938 -0
  242. sage_wheels/share/factory/gftables/59049 +1971 -0
  243. sage_wheels/share/factory/gftables/6241 +210 -0
  244. sage_wheels/share/factory/gftables/625 +23 -0
  245. sage_wheels/share/factory/gftables/63001 +2102 -0
  246. sage_wheels/share/factory/gftables/64 +5 -0
  247. sage_wheels/share/factory/gftables/6561 +221 -0
  248. sage_wheels/share/factory/gftables/6859 +231 -0
  249. sage_wheels/share/factory/gftables/6889 +232 -0
  250. sage_wheels/share/factory/gftables/729 +27 -0
  251. sage_wheels/share/factory/gftables/7921 +266 -0
  252. sage_wheels/share/factory/gftables/8 +3 -0
  253. sage_wheels/share/factory/gftables/81 +5 -0
  254. sage_wheels/share/factory/gftables/8192 +276 -0
  255. sage_wheels/share/factory/gftables/841 +30 -0
  256. sage_wheels/share/factory/gftables/9 +3 -0
  257. sage_wheels/share/factory/gftables/9409 +316 -0
  258. sage_wheels/share/factory/gftables/961 +34 -0
  259. sage_wheels/share/info/singular.info +191898 -0
  260. sage_wheels/share/singular/LIB/GND.lib +1359 -0
  261. sage_wheels/share/singular/LIB/JMBTest.lib +976 -0
  262. sage_wheels/share/singular/LIB/JMSConst.lib +1363 -0
  263. sage_wheels/share/singular/LIB/KVequiv.lib +699 -0
  264. sage_wheels/share/singular/LIB/SingularityDBM.lib +491 -0
  265. sage_wheels/share/singular/LIB/VecField.lib +1542 -0
  266. sage_wheels/share/singular/LIB/absfact.lib +959 -0
  267. sage_wheels/share/singular/LIB/ainvar.lib +730 -0
  268. sage_wheels/share/singular/LIB/aksaka.lib +419 -0
  269. sage_wheels/share/singular/LIB/alexpoly.lib +2542 -0
  270. sage_wheels/share/singular/LIB/algebra.lib +1193 -0
  271. sage_wheels/share/singular/LIB/all.lib +136 -0
  272. sage_wheels/share/singular/LIB/arcpoint.lib +514 -0
  273. sage_wheels/share/singular/LIB/arnold.lib +4553 -0
  274. sage_wheels/share/singular/LIB/arnoldclassify.lib +2058 -0
  275. sage_wheels/share/singular/LIB/arr.lib +3486 -0
  276. sage_wheels/share/singular/LIB/assprimeszerodim.lib +755 -0
  277. sage_wheels/share/singular/LIB/autgradalg.lib +3361 -0
  278. sage_wheels/share/singular/LIB/bfun.lib +1964 -0
  279. sage_wheels/share/singular/LIB/bimodules.lib +774 -0
  280. sage_wheels/share/singular/LIB/brillnoether.lib +226 -0
  281. sage_wheels/share/singular/LIB/brnoeth.lib +5017 -0
  282. sage_wheels/share/singular/LIB/central.lib +2169 -0
  283. sage_wheels/share/singular/LIB/chern.lib +4162 -0
  284. sage_wheels/share/singular/LIB/cimonom.lib +571 -0
  285. sage_wheels/share/singular/LIB/cisimplicial.lib +1835 -0
  286. sage_wheels/share/singular/LIB/classify.lib +3239 -0
  287. sage_wheels/share/singular/LIB/classify2.lib +1462 -0
  288. sage_wheels/share/singular/LIB/classifyMapGerms.lib +1515 -0
  289. sage_wheels/share/singular/LIB/classify_aeq.lib +3253 -0
  290. sage_wheels/share/singular/LIB/classifyceq.lib +2092 -0
  291. sage_wheels/share/singular/LIB/classifyci.lib +1133 -0
  292. sage_wheels/share/singular/LIB/combinat.lib +91 -0
  293. sage_wheels/share/singular/LIB/compregb.lib +276 -0
  294. sage_wheels/share/singular/LIB/control.lib +1636 -0
  295. sage_wheels/share/singular/LIB/crypto.lib +3795 -0
  296. sage_wheels/share/singular/LIB/curveInv.lib +667 -0
  297. sage_wheels/share/singular/LIB/curvepar.lib +1817 -0
  298. sage_wheels/share/singular/LIB/customstd.lib +100 -0
  299. sage_wheels/share/singular/LIB/deRham.lib +5979 -0
  300. sage_wheels/share/singular/LIB/decodegb.lib +2134 -0
  301. sage_wheels/share/singular/LIB/decomp.lib +1655 -0
  302. sage_wheels/share/singular/LIB/deflation.lib +872 -0
  303. sage_wheels/share/singular/LIB/deform.lib +925 -0
  304. sage_wheels/share/singular/LIB/difform.lib +3055 -0
  305. sage_wheels/share/singular/LIB/divisors.lib +750 -0
  306. sage_wheels/share/singular/LIB/dmod.lib +5817 -0
  307. sage_wheels/share/singular/LIB/dmodapp.lib +3269 -0
  308. sage_wheels/share/singular/LIB/dmodideal.lib +1211 -0
  309. sage_wheels/share/singular/LIB/dmodloc.lib +2645 -0
  310. sage_wheels/share/singular/LIB/dmodvar.lib +818 -0
  311. sage_wheels/share/singular/LIB/dummy.lib +17 -0
  312. sage_wheels/share/singular/LIB/elim.lib +1009 -0
  313. sage_wheels/share/singular/LIB/ellipticcovers.lib +548 -0
  314. sage_wheels/share/singular/LIB/enumpoints.lib +146 -0
  315. sage_wheels/share/singular/LIB/equising.lib +2127 -0
  316. sage_wheels/share/singular/LIB/ffmodstd.lib +2384 -0
  317. sage_wheels/share/singular/LIB/ffsolve.lib +1289 -0
  318. sage_wheels/share/singular/LIB/findifs.lib +778 -0
  319. sage_wheels/share/singular/LIB/finitediff.lib +1768 -0
  320. sage_wheels/share/singular/LIB/finvar.lib +7989 -0
  321. sage_wheels/share/singular/LIB/fpadim.lib +2429 -0
  322. sage_wheels/share/singular/LIB/fpalgebras.lib +1666 -0
  323. sage_wheels/share/singular/LIB/fpaprops.lib +1462 -0
  324. sage_wheels/share/singular/LIB/freegb.lib +3853 -0
  325. sage_wheels/share/singular/LIB/general.lib +1350 -0
  326. sage_wheels/share/singular/LIB/gfan.lib +1768 -0
  327. sage_wheels/share/singular/LIB/gitfan.lib +3130 -0
  328. sage_wheels/share/singular/LIB/gkdim.lib +99 -0
  329. sage_wheels/share/singular/LIB/gmspoly.lib +589 -0
  330. sage_wheels/share/singular/LIB/gmssing.lib +1739 -0
  331. sage_wheels/share/singular/LIB/goettsche.lib +909 -0
  332. sage_wheels/share/singular/LIB/graal.lib +1366 -0
  333. sage_wheels/share/singular/LIB/gradedModules.lib +2541 -0
  334. sage_wheels/share/singular/LIB/graphics.lib +360 -0
  335. sage_wheels/share/singular/LIB/grobcov.lib +7706 -0
  336. sage_wheels/share/singular/LIB/groups.lib +1123 -0
  337. sage_wheels/share/singular/LIB/grwalk.lib +507 -0
  338. sage_wheels/share/singular/LIB/hdepth.lib +194 -0
  339. sage_wheels/share/singular/LIB/help.cnf +57 -0
  340. sage_wheels/share/singular/LIB/hess.lib +1946 -0
  341. sage_wheels/share/singular/LIB/hnoether.lib +4292 -0
  342. sage_wheels/share/singular/LIB/hodge.lib +400 -0
  343. sage_wheels/share/singular/LIB/homolog.lib +1965 -0
  344. sage_wheels/share/singular/LIB/hyperel.lib +975 -0
  345. sage_wheels/share/singular/LIB/inout.lib +679 -0
  346. sage_wheels/share/singular/LIB/integralbasis.lib +6224 -0
  347. sage_wheels/share/singular/LIB/interval.lib +1418 -0
  348. sage_wheels/share/singular/LIB/intprog.lib +778 -0
  349. sage_wheels/share/singular/LIB/invar.lib +443 -0
  350. sage_wheels/share/singular/LIB/involut.lib +980 -0
  351. sage_wheels/share/singular/LIB/jacobson.lib +1215 -0
  352. sage_wheels/share/singular/LIB/kskernel.lib +534 -0
  353. sage_wheels/share/singular/LIB/latex.lib +3146 -0
  354. sage_wheels/share/singular/LIB/lejeune.lib +651 -0
  355. sage_wheels/share/singular/LIB/linalg.lib +2040 -0
  356. sage_wheels/share/singular/LIB/locnormal.lib +212 -0
  357. sage_wheels/share/singular/LIB/lrcalc.lib +526 -0
  358. sage_wheels/share/singular/LIB/makedbm.lib +294 -0
  359. sage_wheels/share/singular/LIB/mathml.lib +813 -0
  360. sage_wheels/share/singular/LIB/matrix.lib +1372 -0
  361. sage_wheels/share/singular/LIB/maxlike.lib +1132 -0
  362. sage_wheels/share/singular/LIB/methods.lib +212 -0
  363. sage_wheels/share/singular/LIB/moddiq.lib +322 -0
  364. sage_wheels/share/singular/LIB/modfinduni.lib +181 -0
  365. sage_wheels/share/singular/LIB/modnormal.lib +218 -0
  366. sage_wheels/share/singular/LIB/modprimdec.lib +1278 -0
  367. sage_wheels/share/singular/LIB/modquotient.lib +269 -0
  368. sage_wheels/share/singular/LIB/modstd.lib +1024 -0
  369. sage_wheels/share/singular/LIB/modular.lib +545 -0
  370. sage_wheels/share/singular/LIB/modules.lib +2561 -0
  371. sage_wheels/share/singular/LIB/modwalk.lib +609 -0
  372. sage_wheels/share/singular/LIB/mondromy.lib +1016 -0
  373. sage_wheels/share/singular/LIB/monomialideal.lib +3851 -0
  374. sage_wheels/share/singular/LIB/mprimdec.lib +2353 -0
  375. sage_wheels/share/singular/LIB/mregular.lib +1863 -0
  376. sage_wheels/share/singular/LIB/multigrading.lib +5629 -0
  377. sage_wheels/share/singular/LIB/ncHilb.lib +777 -0
  378. sage_wheels/share/singular/LIB/ncModslimgb.lib +791 -0
  379. sage_wheels/share/singular/LIB/ncalg.lib +16311 -0
  380. sage_wheels/share/singular/LIB/ncall.lib +31 -0
  381. sage_wheels/share/singular/LIB/ncdecomp.lib +468 -0
  382. sage_wheels/share/singular/LIB/ncfactor.lib +13371 -0
  383. sage_wheels/share/singular/LIB/ncfrac.lib +1023 -0
  384. sage_wheels/share/singular/LIB/nchilbert.lib +448 -0
  385. sage_wheels/share/singular/LIB/nchomolog.lib +759 -0
  386. sage_wheels/share/singular/LIB/ncloc.lib +361 -0
  387. sage_wheels/share/singular/LIB/ncpreim.lib +795 -0
  388. sage_wheels/share/singular/LIB/ncrat.lib +2849 -0
  389. sage_wheels/share/singular/LIB/nctools.lib +1887 -0
  390. sage_wheels/share/singular/LIB/nets.lib +1456 -0
  391. sage_wheels/share/singular/LIB/nfmodstd.lib +1000 -0
  392. sage_wheels/share/singular/LIB/nfmodsyz.lib +732 -0
  393. sage_wheels/share/singular/LIB/noether.lib +1106 -0
  394. sage_wheels/share/singular/LIB/normal.lib +8700 -0
  395. sage_wheels/share/singular/LIB/normaliz.lib +2226 -0
  396. sage_wheels/share/singular/LIB/ntsolve.lib +362 -0
  397. sage_wheels/share/singular/LIB/numerAlg.lib +560 -0
  398. sage_wheels/share/singular/LIB/numerDecom.lib +2261 -0
  399. sage_wheels/share/singular/LIB/olga.lib +1933 -0
  400. sage_wheels/share/singular/LIB/orbitparam.lib +351 -0
  401. sage_wheels/share/singular/LIB/parallel.lib +319 -0
  402. sage_wheels/share/singular/LIB/paraplanecurves.lib +3110 -0
  403. sage_wheels/share/singular/LIB/perron.lib +202 -0
  404. sage_wheels/share/singular/LIB/pfd.lib +2223 -0
  405. sage_wheels/share/singular/LIB/phindex.lib +642 -0
  406. sage_wheels/share/singular/LIB/pointid.lib +673 -0
  407. sage_wheels/share/singular/LIB/polybori.lib +1430 -0
  408. sage_wheels/share/singular/LIB/polyclass.lib +525 -0
  409. sage_wheels/share/singular/LIB/polylib.lib +1174 -0
  410. sage_wheels/share/singular/LIB/polymake.lib +1902 -0
  411. sage_wheels/share/singular/LIB/presolve.lib +1533 -0
  412. sage_wheels/share/singular/LIB/primdec.lib +9576 -0
  413. sage_wheels/share/singular/LIB/primdecint.lib +1782 -0
  414. sage_wheels/share/singular/LIB/primitiv.lib +401 -0
  415. sage_wheels/share/singular/LIB/puiseuxexpansions.lib +1631 -0
  416. sage_wheels/share/singular/LIB/purityfiltration.lib +960 -0
  417. sage_wheels/share/singular/LIB/qhmoduli.lib +1561 -0
  418. sage_wheels/share/singular/LIB/qmatrix.lib +293 -0
  419. sage_wheels/share/singular/LIB/random.lib +455 -0
  420. sage_wheels/share/singular/LIB/ratgb.lib +489 -0
  421. sage_wheels/share/singular/LIB/realclassify.lib +5759 -0
  422. sage_wheels/share/singular/LIB/realizationMatroids.lib +772 -0
  423. sage_wheels/share/singular/LIB/realrad.lib +1197 -0
  424. sage_wheels/share/singular/LIB/recover.lib +2628 -0
  425. sage_wheels/share/singular/LIB/redcgs.lib +3984 -0
  426. sage_wheels/share/singular/LIB/reesclos.lib +465 -0
  427. sage_wheels/share/singular/LIB/resbinomial.lib +2802 -0
  428. sage_wheels/share/singular/LIB/resgraph.lib +789 -0
  429. sage_wheels/share/singular/LIB/resjung.lib +820 -0
  430. sage_wheels/share/singular/LIB/resolve.lib +5110 -0
  431. sage_wheels/share/singular/LIB/resources.lib +170 -0
  432. sage_wheels/share/singular/LIB/reszeta.lib +5473 -0
  433. sage_wheels/share/singular/LIB/ring.lib +1328 -0
  434. sage_wheels/share/singular/LIB/ringgb.lib +343 -0
  435. sage_wheels/share/singular/LIB/rinvar.lib +1153 -0
  436. sage_wheels/share/singular/LIB/rootisolation.lib +1481 -0
  437. sage_wheels/share/singular/LIB/rootsmr.lib +709 -0
  438. sage_wheels/share/singular/LIB/rootsur.lib +886 -0
  439. sage_wheels/share/singular/LIB/rstandard.lib +607 -0
  440. sage_wheels/share/singular/LIB/rwalk.lib +336 -0
  441. sage_wheels/share/singular/LIB/sagbi.lib +1353 -0
  442. sage_wheels/share/singular/LIB/sagbiNormaliz.lib +1622 -0
  443. sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
  444. sage_wheels/share/singular/LIB/sagbigrob.lib +449 -0
  445. sage_wheels/share/singular/LIB/schreyer.lib +321 -0
  446. sage_wheels/share/singular/LIB/schubert.lib +2551 -0
  447. sage_wheels/share/singular/LIB/sets.lib +524 -0
  448. sage_wheels/share/singular/LIB/sheafcoh.lib +1663 -0
  449. sage_wheels/share/singular/LIB/signcond.lib +437 -0
  450. sage_wheels/share/singular/LIB/sing.lib +1094 -0
  451. sage_wheels/share/singular/LIB/sing4ti2.lib +419 -0
  452. sage_wheels/share/singular/LIB/solve.lib +2243 -0
  453. sage_wheels/share/singular/LIB/spcurve.lib +1077 -0
  454. sage_wheels/share/singular/LIB/spectrum.lib +62 -0
  455. sage_wheels/share/singular/LIB/sresext.lib +757 -0
  456. sage_wheels/share/singular/LIB/ssi.lib +143 -0
  457. sage_wheels/share/singular/LIB/standard.lib +2769 -0
  458. sage_wheels/share/singular/LIB/stanleyreisner.lib +473 -0
  459. sage_wheels/share/singular/LIB/stdmodule.lib +547 -0
  460. sage_wheels/share/singular/LIB/stratify.lib +1070 -0
  461. sage_wheels/share/singular/LIB/surf.lib +506 -0
  462. sage_wheels/share/singular/LIB/surf_jupyter.lib +223 -0
  463. sage_wheels/share/singular/LIB/surfacesignature.lib +522 -0
  464. sage_wheels/share/singular/LIB/surfex.lib +1462 -0
  465. sage_wheels/share/singular/LIB/swalk.lib +877 -0
  466. sage_wheels/share/singular/LIB/symodstd.lib +1570 -0
  467. sage_wheels/share/singular/LIB/systhreads.lib +74 -0
  468. sage_wheels/share/singular/LIB/tasks.lib +1324 -0
  469. sage_wheels/share/singular/LIB/tateProdCplxNegGrad.lib +2412 -0
  470. sage_wheels/share/singular/LIB/teachstd.lib +858 -0
  471. sage_wheels/share/singular/LIB/template.lib +116 -0
  472. sage_wheels/share/singular/LIB/toric.lib +1119 -0
  473. sage_wheels/share/singular/LIB/transformation.lib +116 -0
  474. sage_wheels/share/singular/LIB/triang.lib +1197 -0
  475. sage_wheels/share/singular/LIB/tropical.lib +8741 -0
  476. sage_wheels/share/singular/LIB/tropicalEllipticCovers.lib +2922 -0
  477. sage_wheels/share/singular/LIB/tropicalNewton.lib +1128 -0
  478. sage_wheels/share/singular/LIB/tst.lib +1108 -0
  479. sage_wheels/share/singular/LIB/weierstr.lib +241 -0
  480. sage_wheels/share/singular/LIB/zeroset.lib +1478 -0
  481. sage_wheels/share/singular/emacs/.emacs-general +184 -0
  482. sage_wheels/share/singular/emacs/.emacs-singular +234 -0
  483. sage_wheels/share/singular/emacs/COPYING +44 -0
  484. sage_wheels/share/singular/emacs/cmd-cmpl.el +241 -0
  485. sage_wheels/share/singular/emacs/ex-cmpl.el +1681 -0
  486. sage_wheels/share/singular/emacs/hlp-cmpl.el +4318 -0
  487. sage_wheels/share/singular/emacs/lib-cmpl.el +179 -0
  488. sage_wheels/share/singular/emacs/singular.el +4273 -0
  489. sage_wheels/share/singular/emacs/singular.xpm +39 -0
  490. sage_wheels/share/singular/singular.idx +5002 -0
@@ -0,0 +1,1636 @@
1
+ /////////////////////////////////////////////////////////////////////////
2
+ version="version control.lib 4.1.2.0 Feb_2019 "; // $Id: 03a46153c195eaefccbcf512bd59b43732f2db1b $
3
+ category="System and Control Theory";
4
+ info="
5
+ LIBRARY: control.lib Algebraic analysis tools for System and Control Theory
6
+
7
+ AUTHORS: Oleksandr Iena, yena@mathematik.uni-kl.de
8
+ @* Markus Becker, mbecker@mathematik.uni-kl.de
9
+ @* Viktor Levandovskyy, levandov@mathematik.uni-kl.de
10
+
11
+ SUPPORT: Forschungsschwerpunkt 'Mathematik und Praxis' (Project of Dr. E. Zerz
12
+ and V. Levandovskyy), University of Kaiserslautern
13
+
14
+ PROCEDURES:
15
+ control(R); analysis of controllability-related properties of R (using Ext modules)
16
+ controlDim(R); analysis of controllability-related properties of R (using dimension)
17
+ autonom(R); analysis of autonomy-related properties of R (using Ext modules)
18
+ autonomDim(R); analysis of autonomy-related properties of R (using dimension)
19
+
20
+ leftKernel(R); a left kernel of R
21
+ rightKernel(R); a right kernel of R
22
+ leftInverse(R); a left inverse of R
23
+ rightInverse(R); a right inverse of R
24
+ colrank(M); a column rank of M as of matrix
25
+ genericity(M); analysis of the genericity of parameters
26
+ canonize(L); Groebnerification for modules in the output of control or autonomy procs
27
+ iostruct(R); computes an IO-structure of behavior given by a module R
28
+ findTorsion(R, I); generators of the submodule of a module R, annihilated by the ideal I
29
+
30
+ controlExample(s); set up an example from the mini database inside of the library
31
+ view(); well-formatted output of lists, modules and matrices
32
+ ";
33
+
34
+ LIB "homolog.lib";
35
+ LIB "polylib.lib";
36
+ LIB "primdec.lib";
37
+ LIB "matrix.lib";
38
+
39
+ //---------------------------------------------------------------
40
+ static proc Opt_Our()
41
+ "USAGE: Opt_Our();
42
+ RETURN: intvec, where previous options are stored
43
+ PURPOSE: save previous options and set customized options
44
+ "
45
+ {
46
+ intvec v;
47
+ v=option(get);
48
+ option(redSB);
49
+ option(redTail);
50
+ return (v);
51
+ }
52
+
53
+ //-------------------------------------------------------------------------
54
+
55
+ static proc space(int n)
56
+ "USAGE:spase(n); n is an integer (number of needed spaces)
57
+ RETURN: string consisting of n spaces
58
+ NOTE: the procedure is used in the procedure 'view' to have a better formatted output
59
+ "{
60
+ int i;
61
+ string s="";
62
+ for(i=1;i<=n;i++)
63
+ {
64
+ s=s+" ";
65
+ }
66
+ return(s);
67
+ }
68
+ //-----------------------------------------------------------------------------
69
+ proc view(def M)
70
+ "USAGE: view(M); M is of any type
71
+ RETURN: no return value
72
+ PURPOSE: procedure for (well-) formatted output of modules, matrices, lists of modules, matrices; shows everything even if entries are long
73
+ NOTE: in case of other types( not 'module', 'matrix', 'list') works just as standard 'print' procedure
74
+ EXAMPLE: example view; shows an example
75
+ "
76
+ {
77
+ // to be replaced with something more feasible
78
+ if ( (typeof(M)=="module")||(typeof(M)=="matrix") )
79
+ {
80
+ int @R=nrows(M);
81
+ int @C=ncols(M);
82
+ int i;
83
+ int j;
84
+ list MaxLength=list();
85
+ int Size=0;
86
+ int max;
87
+ string s;
88
+
89
+ for(i=1;i<=@C;i++)
90
+ {
91
+ max=0;
92
+ for(j=1;j<=@R;j++)
93
+ {
94
+ Size=size( string( M[j,i] ) );
95
+ if( Size>max )
96
+ {
97
+ max=Size;
98
+ }
99
+ }
100
+ MaxLength[i] = max;
101
+ }
102
+ for(i=1;i<=@R;i++)
103
+ {
104
+ s="";
105
+ for(j=1;j<@C;j++)
106
+ {
107
+ s=s+string(M[i,j])+space( MaxLength[j]-size( string( M[i,j] ) ) ) +",";
108
+ }
109
+ s=s+string(M[i,j])+space( MaxLength[j]-size( string( M[i,j] ) ) );
110
+ if (i!=@R)
111
+ {
112
+ s=s+",";
113
+ }
114
+ print(s);
115
+ }
116
+ return();
117
+ }
118
+ if(typeof(M)=="list")
119
+ {
120
+ int sz=size(M);
121
+ int i;
122
+ for(i=1;i<=sz;i++)
123
+ {
124
+ view(M[i]);
125
+ print("");
126
+ }
127
+ return();
128
+ }
129
+ print(M);
130
+ return();
131
+ }
132
+ example
133
+ {"EXAMPLE:";echo = 2;
134
+ ring r;
135
+ list L;
136
+ matrix M[1][3] = x2+x,y3-y,z5-4z+7;
137
+ L[1] = "a matrix:";
138
+ L[2] = M;
139
+ L[3] = "an ideal:";
140
+ L[4] = ideal(M);
141
+ view(L);
142
+ }
143
+ //--------------------------------------------------------------------------
144
+ proc rightKernel(matrix M)
145
+ "USAGE: rightKernel(M); M a matrix
146
+ RETURN: module
147
+ PURPOSE: computes the right kernel of matrix M (a module of all elements v such that Mv=0)
148
+ EXAMPLE: example rightKernel; shows an example
149
+ "{
150
+ return(modulo(M,std(0)));
151
+ }
152
+ example
153
+ {"EXAMPLE:";echo = 2;
154
+ ring r = 0,(x,y,z),dp;
155
+ matrix M[1][3] = x,y,z;
156
+ print(M);
157
+ matrix R = rightKernel(M);
158
+ print(R);
159
+ // check:
160
+ print(M*R);
161
+ }
162
+ //-------------------------------------------------------------------------
163
+ proc leftKernel(matrix M)
164
+ "USAGE: leftKernel(M); M a matrix
165
+ RETURN: module
166
+ PURPOSE: computes left kernel of matrix M (a module of all elements v such that vM=0)
167
+ EXAMPLE: example leftKernel; shows an example
168
+ "
169
+ {
170
+ return( transpose( modulo( transpose(M),std(0) ) ) );
171
+ }
172
+ example
173
+ {"EXAMPLE:";echo = 2;
174
+ ring r= 0,(x,y,z),dp;
175
+ matrix M[3][1] = x,y,z;
176
+ print(M);
177
+ matrix L = leftKernel(M);
178
+ print(L);
179
+ // check:
180
+ print(L*M);
181
+ }
182
+ //------------------------------------------------------------------------
183
+ proc leftInverse(module M)
184
+ "USAGE: leftInverse(M); M a module
185
+ RETURN: module
186
+ PURPOSE: computes such a matrix L, that LM = Id;
187
+ EXAMPLE: example leftInverse; shows an example
188
+ NOTE: exists only in the case when M is free submodule
189
+ "
190
+ {
191
+ // it works also for the NC case;
192
+ int NCols = ncols(M);
193
+ module Id = freemodule(NCols);
194
+ module N = transpose(M);
195
+ intvec old_opt=Opt_Our();
196
+ Id = std(Id);
197
+ matrix T;
198
+ // check the correctness (Id \subseteq M)
199
+ // via dimension: dim (M) = -1!
200
+ int d = dim_Our(N);
201
+ if (d != -1)
202
+ {
203
+ // No left inverse exists
204
+ return(matrix(0));
205
+ }
206
+ matrix T2 = lift(N, Id);
207
+ T2 = transpose(T2);
208
+ option(set,old_opt); // set the options back
209
+ return(T2);
210
+ }
211
+ example
212
+ {
213
+ "EXAMPLE:";echo =2;
214
+ // a trivial example:
215
+ ring r = 0,(x,z),dp;
216
+ matrix M[2][1] = 1,x2z;
217
+ print(M);
218
+ print( leftInverse(M) );
219
+ kill r;
220
+ // derived from the example TwoPendula:
221
+ ring r=(0,m1,m2,M,g,L1,L2),Dt,dp;
222
+ matrix U[3][1];
223
+ U[1,1]=(-L2)*Dt^4+(g)*Dt^2;
224
+ U[2,1]=(-L1)*Dt^4+(g)*Dt^2;
225
+ U[3,1]=(L1*L2)*Dt^4+(-g*L1-g*L2)*Dt^2+(g^2);
226
+ module M = module(U);
227
+ module L = leftInverse(M);
228
+ print(L);
229
+ // check
230
+ print(matrix(L)*matrix(M));
231
+ }
232
+ //-----------------------------------------------------------------------
233
+ proc rightInverse(module R)
234
+ "USAGE: rightInverse(M); M a module
235
+ RETURN: module
236
+ PURPOSE: computes such a matrix L, that ML = Id
237
+ EXAMPLE: example rightInverse; shows an example
238
+ NOTE: exists only in the case when M is free submodule
239
+ "
240
+ {
241
+ // for comm case it suffices
242
+ if (isCommutative())
243
+ {
244
+ return(transpose(leftInverse(transpose(R))));
245
+ }
246
+ // for noncomm
247
+ def save = basering; def sop = opposite(save);
248
+ setring sop; module Mop = oppose(save,R);
249
+ Mop = transpose(Mop);
250
+ module L = leftInverse(Mop);
251
+ setring save; module L = oppose(sop,L);
252
+ L = transpose(L);
253
+ return(matrix(L));
254
+ }
255
+ example
256
+ { "EXAMPLE:";echo =2;
257
+ // a trivial example:
258
+ ring r = 0,(x,z),dp;
259
+ matrix M[1][2] = 1,x2+z;
260
+ print(M);
261
+ print( rightInverse(M) );
262
+ kill r;
263
+ // derived from the TwoPendula example:
264
+ ring r=(0,m1,m2,M,g,L1,L2),Dt,dp;
265
+ matrix U[1][3];
266
+ U[1,1]=(-L2)*Dt^4+(g)*Dt^2;
267
+ U[1,2]=(-L1)*Dt^4+(g)*Dt^2;
268
+ U[1,3]=(L1*L2)*Dt^4+(-g*L1-g*L2)*Dt^2+(g^2);
269
+ module M = module(U);
270
+ module L = rightInverse(M);
271
+ print(L);
272
+ // check
273
+ print(matrix(M)*matrix(L));
274
+ }
275
+ //-----------------------------------------------------------------------
276
+ static proc dim_Our(module R)
277
+ {
278
+ int d;
279
+ if (attrib(R,"isSB")<>1)
280
+ {
281
+ R = std(R);
282
+ }
283
+ d = dim(R);
284
+ return(d);
285
+ }
286
+ //-----------------------------------------------------------------------
287
+ static proc Ann_Our(module R)
288
+ {
289
+ return(Ann(R));
290
+ }
291
+ //-----------------------------------------------------------------------
292
+ static proc Ext_Our(int i, module R, list #)
293
+ {
294
+ // mimicking 'Ext_R' from homolog.lib
295
+ int ExtraArg = ( size(#)>0 );
296
+ if (ExtraArg)
297
+ {
298
+ return( Ext_R(i,R,#[1]) );
299
+ }
300
+ else
301
+ {
302
+ return( Ext_R(i,R) );
303
+ }
304
+ }
305
+ //------------------------------------------------------------------------
306
+ static proc is_zero_Our
307
+ {
308
+ //just a copy of 'is_zero' from "polylib.lib" patched with GKdim
309
+ int d = dim_Our(std(#[1]));
310
+ int a = ( d==-1 );
311
+ if( size(#) >1 ) { list L=a,d; return(L); }
312
+ return(a);
313
+ // return( is_zero(R) ) ;
314
+ }
315
+ //------------------------------------------------------------------------
316
+ static proc control_output(int i, int NVars, module R, module Ext_1, list Gen)
317
+ "USAGE: control_output(i, NVars, R, Ext_1),
318
+ PURPOSE: where
319
+ @* i is integer (number of first nonzero Ext or a number of variables in a basering + 1 in case that all the Exts are zero),
320
+ @* NVars: integer, number of variables in a base ring,
321
+ @* R: module R (cokernel representation),
322
+ @* Ext_1: module, the first Ext(its cokernel representation)
323
+ RETURN: list with all the contollability properties of the system which is to be returned in 'control' procedure
324
+ NOTE: this procedure is used in 'control' procedure
325
+ "{
326
+ // TODO: NVars to be replaced with the global hom. dimension of basering!!!
327
+ // Is not clear what to do with gl.dim of qrings
328
+ string DofS = "dimension of the system:";
329
+ string Fn = "number of first nonzero Ext:";
330
+ string Gen_mes = "Parameter constellations which might lead to a non-controllable system:";
331
+
332
+ module RK = rightKernel(R);
333
+ int d=dim_Our(std(transpose(R)));
334
+
335
+ if (i==1)
336
+ {
337
+ return(
338
+ list ( Fn,
339
+ i,
340
+ "not controllable , image representation for controllable part:",
341
+ RK,
342
+ "kernel representation for controllable part:",
343
+ leftKernel( RK ),
344
+ "obstruction to controllability",
345
+ Ext_1,
346
+ "annihilator of torsion module (of obstruction to controllability)",
347
+ Ann_Our(Ext_1),
348
+ DofS,
349
+ d
350
+ )
351
+ );
352
+ }
353
+
354
+ if(i>NVars)
355
+ {
356
+ return( list( Fn,
357
+ -1,
358
+ "strongly controllable(flat), image representation:",
359
+ RK,
360
+ "left inverse to image representation:",
361
+ leftInverse(RK),
362
+ DofS,
363
+ d,
364
+ Gen_mes,
365
+ Gen)
366
+ );
367
+ }
368
+
369
+ //
370
+ //now i<=NVars
371
+ //
372
+
373
+ if( (i==2) )
374
+ {
375
+ return( list( Fn,
376
+ i,
377
+ "controllable, not reflexive, image representation:",
378
+ RK,
379
+ DofS,
380
+ d,
381
+ Gen_mes,
382
+ Gen)
383
+ );
384
+ }
385
+
386
+ if( (i>=3) )
387
+ {
388
+ return( list ( Fn,
389
+ i,
390
+ "reflexive, not strongly controllable, image representation:",
391
+ RK,
392
+ DofS,
393
+ d,
394
+ Gen_mes,
395
+ Gen)
396
+ );
397
+ }
398
+ }
399
+ //-------------------------------------------------------------------------
400
+
401
+ proc control(module R)
402
+ "USAGE: control(R); R a module (R is the matrix of the system of equations to be investigated)
403
+ RETURN: list
404
+ PURPOSE: compute the list of all the properties concerning controllability of the system (behavior), represented by the matrix R
405
+ NOTE: the properties and corresponding data like controllability, flatness, dimension of the system, degree of controllability, kernel and image representations, genericity of parameters, obstructions to controllability, annihilator of torsion submodule and left inverse are investigated
406
+ EXAMPLE: example control; shows an example
407
+ "
408
+ {
409
+ int i;
410
+ int NVars=nvars(basering);
411
+ // TODO: NVars to be replaced with the global hom. dimension of basering!!!
412
+ int ExtIsZero;
413
+ intvec v=Opt_Our();
414
+ module R_std=std(R);
415
+ module Ext_1 = std(Ext_Our(1,R_std));
416
+
417
+ ExtIsZero=is_zero_Our(Ext_1);
418
+ i=1;
419
+ while( (ExtIsZero) && (i<=NVars) )
420
+ {
421
+ i++;
422
+ ExtIsZero = is_zero_Our( Ext_Our(i,R_std) );
423
+ }
424
+ matrix T=lift(R,R_std);
425
+ list l=genericity(T);
426
+ option(set,v);
427
+
428
+ return( control_output( i, NVars, R, Ext_1, l ) );
429
+ }
430
+ example
431
+ {"EXAMPLE:";echo = 2;
432
+ // a WindTunnel example
433
+ ring A = (0,a, omega, zeta, k),(D1, delta),dp;
434
+ module R;
435
+ R = [D1+a, -k*a*delta, 0, 0],
436
+ [0, D1, -1, 0],
437
+ [0, omega^2, D1+2*zeta*omega, -omega^2];
438
+ R=transpose(R);
439
+ view(R);
440
+ view(control(R));
441
+ }
442
+ //--------------------------------------------------------------------------
443
+ proc controlDim(module R)
444
+ "USAGE: controlDim(R); R a module (R is the matrix of the system of equations to be investigated)
445
+ RETURN: list
446
+ PURPOSE: computes list of all the properties concerning controllability of the system (behavior), represented by the matrix R
447
+ EXAMPLE: example controlDim; shows an example
448
+ NOTE: the properties and corresponding data like controllability, flatness, dimension of the system, degree of controllability, kernel and image representations, genericity of parameters, obstructions to controllability, annihilator of torsion submodule and left inverse are investigated.
449
+ @* This procedure is analogous to 'control' but uses dimension calculations.
450
+ @* The implemented approach works for full row rank matrices only (the check is done automatically).
451
+ "
452
+ {
453
+ if( nrows(R) != colrank(transpose(R)) )
454
+ {
455
+ return ("controlDim cannot be applied, since R does not have full row rank");
456
+ }
457
+ intvec v = Opt_Our();
458
+ module R_std = std(R);
459
+ int d = dim_Our(R_std);
460
+ int NVars = nvars(basering);
461
+ int i = NVars-d;
462
+ module Ext_1 = std(Ext_Our(1,R_std));
463
+ matrix T = lift(R,R_std);
464
+ list l = genericity(T);
465
+ option(set, v);
466
+ return( control_output( i, NVars, R, Ext_1, l));
467
+ }
468
+ example
469
+ {"EXAMPLE:";echo = 2;
470
+ //a WindTunnel example
471
+ ring A = (0,a, omega, zeta, k),(D1, delta),dp;
472
+ module R;
473
+ R = [D1+a, -k*a*delta, 0, 0],
474
+ [0, D1, -1, 0],
475
+ [0, omega^2, D1+2*zeta*omega, -omega^2];
476
+ R=transpose(R);
477
+ view(R);
478
+ view(controlDim(R));
479
+ }
480
+ //------------------------------------------------------------------------
481
+ proc colrank(module M)
482
+ "USAGE: colrank(M); M a matrix/module
483
+ RETURN: int
484
+ PURPOSE: compute the column rank of M as of matrix
485
+ NOTE: this procedure uses Bareiss algorithm
486
+ "{
487
+ // NOte continued:
488
+ // which might not terminate in some cases
489
+ module M_red = bareiss(M)[1];
490
+ int NCols_red = ncols(M_red);
491
+ return (NCols_red);
492
+ }
493
+ example
494
+ {"EXAMPLE: ";echo = 2;
495
+ // de Rham complex
496
+ ring r=0,(D(1..3)),dp;
497
+ module R;
498
+ R=[0,-D(3),D(2)],
499
+ [D(3),0,-D(1)],
500
+ [-D(2),D(1),0];
501
+ R=transpose(R);
502
+ colrank(R);
503
+ }
504
+
505
+ //------------------------------------------------------------------------
506
+ static proc autonom_output( int i, int NVars, module RC, int R_rank )
507
+ "USAGE: proc autonom_output(i, NVars, RC, R_rank)
508
+ i: integer, number of first nonzero Ext or
509
+ just number of variables in a base ring + 1 in case that all the Exts are zero
510
+ NVars: integer, number of variables in a base ring
511
+ RC: module, kernel-representation of controllable part of the system
512
+ R_rank: integer, column rank of the representation matrix
513
+ PURPOSE: compute all the autonomy properties of the system which is to be returned in 'autonom' procedure
514
+ RETURN: list
515
+ NOTE: this procedure is used in 'autonom' procedure
516
+ "
517
+ {
518
+ int d=NVars-i;//that is the dimension of the system
519
+ string DofS="dimension of the system:";
520
+ string Fn = "number of first nonzero Ext:";
521
+ if(i==0)
522
+ {
523
+ return( list( Fn,
524
+ i,
525
+ "not autonomous",
526
+ "kernel representation for controllable part",
527
+ RC,
528
+ "column rank of the matrix",
529
+ R_rank,
530
+ DofS,
531
+ d )
532
+ );
533
+ }
534
+
535
+ if( i>NVars )
536
+ {
537
+ return( list( Fn,
538
+ -1,
539
+ "trivial",
540
+ DofS,
541
+ d )
542
+ );
543
+ }
544
+
545
+ //
546
+ //now i<=NVars
547
+ //
548
+
549
+
550
+ if( i==1 )
551
+ // in case that NVars==1 there is no sense to consider the notion
552
+ // of strongly autonomous behavior, because it does not imply
553
+ // that system is overdetermined in this case
554
+ {
555
+ return( list ( Fn,
556
+ i,
557
+ "autonomous, not overdetermined",
558
+ DofS,
559
+ d )
560
+ );
561
+ }
562
+
563
+ if( i==NVars )
564
+ {
565
+ return( list( Fn,
566
+ i,
567
+ "strongly autonomous(fin. dimensional),in particular overdetermined",
568
+ DofS,
569
+ d)
570
+ );
571
+ }
572
+
573
+ if( i<NVars )
574
+ {
575
+ return( list ( Fn,
576
+ i,
577
+ "overdetermined, not strongly autonomous",
578
+ DofS,
579
+ d)
580
+ );
581
+ }
582
+ }
583
+ //--------------------------------------------------------------------------
584
+ proc autonomDim(module R)
585
+ "USAGE: autonomDim(R); R a module (R is a matrix of the system of equations which is to be investigated)
586
+ RETURN: list
587
+ PURPOSE: computes the list of all the properties concerning autonomy of the system (behavior), represented by the matrix R
588
+ NOTE: the properties and corresponding data like autonomy resp. strong autonomy, dimension of the system, autonomy degree, kernel representation and (over)determinacy are investigated.
589
+ @* This procedure is analogous to 'autonom' but uses dimension calculations
590
+ EXAMPLE: example autonomDim; shows an example
591
+ "
592
+ {
593
+ int d;
594
+ int NVars = nvars(basering);
595
+ module RT = transpose(R);
596
+ module RC; //for computation of controllable part if if exists
597
+ int R_rank = ncols(R);
598
+ d = dim_Our( std(RT) ); //this is the dimension of the system
599
+ int i = NVars-d; //First non-zero Ext
600
+ if( d==0 )
601
+ {
602
+ RC = leftKernel(rightKernel(R));
603
+ R_rank=colrank(R);
604
+ }
605
+ return( autonom_output(i,NVars,RC,R_rank) );
606
+ }
607
+ example
608
+ {"EXAMPLE:"; echo = 2;
609
+ // Cauchy1 example
610
+ ring r=0,(s1,s2,s3,s4),dp;
611
+ module R= [s1,-s2],
612
+ [s2, s1],
613
+ [s3,-s4],
614
+ [s4, s3];
615
+ R=transpose(R);
616
+ view( R );
617
+ view( autonomDim(R) );
618
+ }
619
+ //----------------------------------------------------------
620
+ proc autonom(module R)
621
+ "USAGE: autonom(R); R a module (R is a matrix of the system of equations which is to be investigated)
622
+ RETURN: list
623
+ PURPOSE: find all the properties concerning autonomy of the system (behavior) represented by the matrix R
624
+ NOTE: the properties and corresponding data like autonomy resp. strong autonomy, dimension of the system, autonomy degree, kernel representation and (over)determinacy are investigated
625
+ EXAMPLE: example autonom; shows an example
626
+ "
627
+ {
628
+ int NVars=nvars(basering);
629
+ int ExtIsZero;
630
+ module RT=transpose(R);
631
+ module RC;
632
+ int R_rank=ncols(R);
633
+ ExtIsZero=is_zero_Our(Ext_Our(0,RT));
634
+ int i=0;
635
+ while( (ExtIsZero)&&(i<=NVars) )
636
+ {
637
+ i++;
638
+ ExtIsZero = is_zero_Our(Ext_Our(i,RT));
639
+ }
640
+ if (i==0)
641
+ {
642
+ RC = leftKernel(rightKernel(R));
643
+ R_rank=colrank(R);
644
+ }
645
+ return(autonom_output(i,NVars,RC,R_rank));
646
+ }
647
+ example
648
+ {"EXAMPLE:"; echo = 2;
649
+ // Cauchy
650
+ ring r=0,(s1,s2,s3,s4),dp;
651
+ module R= [s1,-s2],
652
+ [s2, s1],
653
+ [s3,-s4],
654
+ [s4, s3];
655
+ R=transpose(R);
656
+ view( R );
657
+ view( autonom(R) );
658
+ }
659
+
660
+
661
+ //----------------------------------------------------------
662
+ proc genericity(matrix M)
663
+ "USAGE: genericity(M); M is a matrix/module
664
+ RETURN: list (of strings)
665
+ PURPOSE: determine parametric expressions which have been assumed to be non-zero in the process of computing the Groebner basis
666
+ NOTE: the output list consists of strings. The first string contains the variables only, whereas each further string contains
667
+ a single polynomial in parameters.
668
+ @* We strongly recommend to switch on the redSB and redTail options.
669
+ @* The procedure is effective with the lift procedure for modules with parameters
670
+ EXAMPLE: example genericity; shows an example
671
+ "
672
+ {
673
+ // returns "-", if there are no parameters!
674
+ if (npars(basering)==0)
675
+ {
676
+ return("-");
677
+ }
678
+ list RT = evas_genericity(M); // list of strings
679
+ if ((size(RT)==1) && (RT[1] == ""))
680
+ {
681
+ return("-");
682
+ }
683
+ return(RT);
684
+ }
685
+ example
686
+ { // TwoPendula
687
+ "EXAMPLE:"; echo = 2;
688
+ ring r=(0,m1,m2,M,g,L1,L2),Dt,dp;
689
+ module RR =
690
+ [m1*L1*Dt^2, m2*L2*Dt^2, -1, (M+m1+m2)*Dt^2],
691
+ [m1*L1^2*Dt^2-m1*L1*g, 0, 0, m1*L1*Dt^2],
692
+ [0, m2*L2^2*Dt^2-m2*L2*g, 0, m2*L2*Dt^2];
693
+ module R = transpose(RR);
694
+ module SR = std(R);
695
+ matrix T = lift(R,SR);
696
+ genericity(T);
697
+ //-- The result might be different when computing reduced bases:
698
+ matrix T2;
699
+ option(redSB);
700
+ option(redTail);
701
+ module SR2 = std(R);
702
+ T2 = lift(R,SR2);
703
+ genericity(T2);
704
+ }
705
+ //---------------------------------------------------------------
706
+ static proc victors_genericity(matrix M)
707
+ {
708
+ // returns "-", if there are no parameters!
709
+ if (npars(basering)==0)
710
+ {
711
+ return("-");
712
+ }
713
+ int plevel = printlevel-voice+2;
714
+ // M is a matrix over a ring with params and vars;
715
+ ideal I = ideal(M); // a list of entries
716
+ I = simplify(I,2); // delete 0's
717
+ // decompose every coeff in every poly
718
+ int i;
719
+ int s = size(I);
720
+ ideal NM;
721
+ poly p;
722
+ number num;
723
+ int cl=1;
724
+ intvec ZeroVec; ZeroVec[nvars(basering)] = 0;
725
+ intvec W;
726
+ ideal Numero, Denomiro;
727
+ int cNu=0; int cDe=0;
728
+ for (i=1; i<=s; i++)
729
+ {
730
+ // remove contents and add them as polys
731
+ p = I[i];
732
+ W = leadexp(p);
733
+ if (W == ZeroVec) // i.e. just a coef
734
+ {
735
+ num = denominator(leadcoef(p)); // from poly.lib
736
+ NM[cl] = numerator(leadcoef(p));
737
+ dbprint(p,"numerator:");
738
+ dbprint(p, string(NM[cl]));
739
+ cNu++; Numero[cNu]= NM[cl];
740
+ cl++;
741
+ NM[cl] = num; // denominator
742
+ dbprint(p,"denominator:");
743
+ dbprint(p, string(NM[cl]));
744
+ cDe++; Denomiro[cDe]= NM[cl];
745
+ cl++;
746
+ p = p - lead(p); // for the next cycle
747
+ }
748
+ if ( p!= 0)
749
+ {
750
+ num = content(p);
751
+ p = p/num;
752
+ NM[cl] = denominator(num);
753
+ dbprint(p,"content denominator:");
754
+ dbprint(p, string(NM[cl]));
755
+ cNu++; Numero[cNu]= NM[cl];
756
+ cl++;
757
+ NM[cl] = numerator(num);
758
+ dbprint(p,"content numerator:");
759
+ dbprint(p, string(NM[cl]));
760
+ cDe++; Denomiro[cDe]= NM[cl];
761
+ cl++;
762
+ }
763
+ // it seems that the next elements will not have real influence
764
+ while( p != 0)
765
+ {
766
+ NM[cl] = leadcoef(p); // should be all integer, i.e. non-rational
767
+ dbprint(p,"coef:");
768
+ dbprint(p, string(NM[cl]));
769
+ cl++;
770
+ p = p - lead(p);
771
+ }
772
+ }
773
+ NM = simplify(NM,4); // delete identical
774
+ string newvars = parstr(basering);
775
+ def save = basering;
776
+ ring @NR = create_ring("string(char(basering))", "("+newvars+")", "Dp");
777
+ // get params as variables
778
+ // create a list of non-monomials
779
+ ideal @L;
780
+ ideal F;
781
+ ideal NM = imap(save,NM);
782
+ NM = simplify(NM,8); //delete multiples
783
+ poly p,q;
784
+ cl = 1;
785
+ int j, cf;
786
+ for(i=1; i<=size(NM);i++)
787
+ {
788
+ p = NM[i] - lead(NM[i]);
789
+ if (p!=0)
790
+ {
791
+ // L[cl] = p;
792
+ F = factorize(NM[i],1); //non-constant factors only
793
+ cf = 1;
794
+ // factorize every polynomial
795
+ // throw away every monomial from factorization (also constants from above ring)
796
+ for (j=1; j<=size(F);j++)
797
+ {
798
+ q = F[j]-lead(F[j]);
799
+ if (q!=0)
800
+ {
801
+ @L[cl] = F[j];
802
+ cl++;
803
+ }
804
+ }
805
+ }
806
+ }
807
+ // return the result [in string-format]
808
+ @L = simplify(@L,2+4+8); // skip zeroes, doubled and entries, diff. by a constant
809
+ list SL;
810
+ for (j=1; j<=size(@L);j++)
811
+ {
812
+ SL[j] = string(@L[j]);
813
+ }
814
+ setring save;
815
+ return(SL);
816
+ }
817
+ //---------------------------------------------------------------
818
+ static proc evas_genericity(matrix M)
819
+ {
820
+ // called from the main genericity proc
821
+ ideal I = ideal(M);
822
+ I = simplify(I,2+4);
823
+ int s = ncols(I);
824
+ ideal Den;
825
+ poly p;
826
+ int i;
827
+ for (i=1; i<=s; i++)
828
+ {
829
+ p = I[i];
830
+ while (p !=0)
831
+ {
832
+ Den = Den, denominator(leadcoef(p));
833
+ p = p-lead(p);
834
+ }
835
+ }
836
+ Den = simplify(Den,2+4);
837
+ string newvars = parstr(basering);
838
+ def save = basering;
839
+ ring @NR = create_ring("("+string(char(basering))+")", "("+newvars+")", "Dp");
840
+ ideal F;
841
+ ideal Den = imap(save,Den);
842
+ Den = simplify(Den,2);
843
+ int s1 = ncols(Den);
844
+ for (i=1; i<=s1; i++)
845
+ {
846
+ Den[i] = normalize(Den[i]);
847
+ if ( Den[i] !=1)
848
+ {
849
+ F= F, factorize(Den[i],1);
850
+ }
851
+ }
852
+ F = simplify(F, 2+4+8);
853
+ ideal @L = F;
854
+ @L = simplify(@L,2);
855
+ list SL;
856
+ int c,j;
857
+ string Mono;
858
+ c = 1;
859
+ for (j=1; j<= ncols(@L);j++)
860
+ {
861
+ if (leadcoef(@L[j]) <0)
862
+ {
863
+ @L[j] = -1*@L[j];
864
+ }
865
+ if (((@L[j] - lead(@L[j]))==0 ) && (@L[j]!=0) ) //@L[j] is a monomial
866
+ {
867
+ Mono = Mono + string(@L[j])+ ","; // concatenation
868
+ }
869
+ else
870
+ {
871
+ c++;
872
+ SL[c] = string(@L[j]);
873
+ }
874
+ }
875
+ if (Mono!="")
876
+ {
877
+ Mono = Mono[1..size(Mono)-1]; // delete the last colon
878
+ }
879
+ SL[1] = Mono;
880
+ setring save;
881
+ return(SL);
882
+ }
883
+
884
+ //---------------------------------------------------------------
885
+ proc canonize(list L)
886
+ "USAGE: canonize(L); L a list
887
+ RETURN: list
888
+ PURPOSE: modules in the list are canonized by computing their reduced minimal (= unique up to constant factor w.r.t. the given ordering) Groebner bases
889
+ ASSUME: L is the output of control/autonomy procedures
890
+ EXAMPLE: example canonize; shows an example
891
+ "
892
+ {
893
+ list M = L;
894
+ intvec v=Opt_Our();
895
+ int s = size(L);
896
+ int i;
897
+ for (i=2; i<=s; i=i+2)
898
+ {
899
+ if (typeof(M[i])=="module")
900
+ {
901
+ M[i] = std(M[i]);
902
+ // M[i] = prune(M[i]); // minimal embedding: no need yet
903
+ // M[i] = std(M[i]);
904
+ }
905
+ }
906
+ option(set, v); //set old values back
907
+ return(M);
908
+ }
909
+ example
910
+ { // TwoPendula with L1=L2=L
911
+ "EXAMPLE:"; echo = 2;
912
+ ring r=(0,m1,m2,M,g,L),Dt,dp;
913
+ module RR =
914
+ [m1*L*Dt^2, m2*L*Dt^2, -1, (M+m1+m2)*Dt^2],
915
+ [m1*L^2*Dt^2-m1*L*g, 0, 0, m1*L*Dt^2],
916
+ [0, m2*L^2*Dt^2-m2*L*g, 0, m2*L*Dt^2];
917
+ module R = transpose(RR);
918
+ list C = control(R);
919
+ list CC = canonize(C);
920
+ view(CC);
921
+ }
922
+
923
+ //----------------------------------------------------------------
924
+
925
+ static proc elementof (int i, intvec v)
926
+ {
927
+ int b=0;
928
+ for(int j=1;j<=nrows(v);j++)
929
+ {
930
+ if(v[j]==i)
931
+ {
932
+ b=1;
933
+ return (b);
934
+ }
935
+ }
936
+ return (b);
937
+ }
938
+ //-----------------------------------------------------------------
939
+ proc iostruct(module R)
940
+ "USAGE: iostruct( R ); R a module
941
+ RETURN: list L with entries: string s, intvec v, module P and module Q
942
+ PURPOSE: if R is the kernel-representation-matrix of some system, then we output a input-ouput representation Py=Qu of the system, the components that have been chosen as outputs(intvec v) and a comment s
943
+ NOTE: the procedure uses Bareiss algorithm
944
+ EXAMPLE: example iostruct; shows an example
945
+ "
946
+ {
947
+ // NOTE cont'd
948
+ //which might not terminate in some cases
949
+ list L = bareiss(R);
950
+ int R_rank = ncols(L[1]);
951
+ int NCols=ncols(R);
952
+ intvec v=L[2];
953
+ int temp;
954
+ int NRows=nrows(v);
955
+ int i,j;
956
+ int b=1;
957
+ module P;
958
+ module Q;
959
+ int n=0;
960
+
961
+ while(b==1) //sort v through bubblesort
962
+ {
963
+ b=0;
964
+ for(i=1;i<NRows;i++)
965
+ {
966
+ if(v[i]>v[i+1])
967
+ {
968
+ temp=v[i];
969
+ v[i]=v[i+1];
970
+ v[i+1]=temp;
971
+ b=1;
972
+ }
973
+ }
974
+ }
975
+ P=R[v]; //generate P
976
+ for(i=1;i<=NCols;i++) //generate Q
977
+ {
978
+ if(elementof(i,v)==1)
979
+ {
980
+ i++;
981
+ continue;
982
+ }
983
+ Q=Q,R[i];
984
+ }
985
+ Q=simplify(Q,2);
986
+ string s="The following components have been chosen as outputs: ";
987
+ return (list(s,v,P,Q));
988
+ }
989
+ example
990
+ {"EXAMPLE:";echo = 2;
991
+ //Example Antenna
992
+ ring r = (0, K1, K2, Te, Kp, Kc),(Dt, delta), (c,dp);
993
+ module RR;
994
+ RR =
995
+ [Dt, -K1, 0, 0, 0, 0, 0, 0, 0],
996
+ [0, Dt+K2/Te, 0, 0, 0, 0, -Kp/Te*delta, -Kc/Te*delta, -Kc/Te*delta],
997
+ [0, 0, Dt, -K1, 0, 0, 0, 0, 0],
998
+ [0, 0, 0, Dt+K2/Te, 0, 0, -Kc/Te*delta, -Kp/Te*delta, -Kc/Te*delta],
999
+ [0, 0, 0, 0, Dt, -K1, 0, 0, 0],
1000
+ [0, 0, 0, 0, 0, Dt+K2/Te, -Kc/Te*delta, -Kc/Te*delta, -Kp/Te*delta];
1001
+ module R = transpose(RR);
1002
+ view(iostruct(R));
1003
+ }
1004
+
1005
+ //---------------------------------------------------------------
1006
+ static proc smdeg(matrix N)
1007
+ "USAGE: smdeg( N ); N a matrix
1008
+ RETURN: intvec
1009
+ PURPOSE: returns an intvec of length 2 with the index of an element of N with smallest degree
1010
+ "
1011
+ {
1012
+ int n = nrows(N);
1013
+ int m = ncols(N);
1014
+ int d,d_temp;
1015
+ intvec v;
1016
+ int i,j; // counter
1017
+
1018
+ if (N==0)
1019
+ {
1020
+ v = 1,1;
1021
+ return(v);
1022
+ }
1023
+
1024
+ for (i=1; i<=n; i++)
1025
+ // hier wird ein Element ausgewaehlt(!=0) und mit dessen Grad gestartet
1026
+ {
1027
+ for (j=1; j<=m; j++)
1028
+ {
1029
+ if( deg(N[i,j])!=-1 )
1030
+ {
1031
+ d=deg(N[i,j]);
1032
+ break;
1033
+ }
1034
+ }
1035
+ if (d != -1)
1036
+ {
1037
+ break;
1038
+ }
1039
+ }
1040
+ for(i=1; i<=n; i++)
1041
+ {
1042
+ for(j=1; j<=m; j++)
1043
+ {
1044
+ d_temp = deg(N[i,j]);
1045
+ if ( (d_temp < d) && (N[i,j]!=0) )
1046
+ {
1047
+ d=d_temp;
1048
+ }
1049
+ }
1050
+ }
1051
+ for (i=1; i<=n; i++)
1052
+ {
1053
+ for (j=1; j<=m;j++)
1054
+ {
1055
+ if ( (deg(N[i,j]) == d) && (N[i,j]!=0) )
1056
+ {
1057
+ v = i,j;
1058
+ return(v);
1059
+ }
1060
+ }
1061
+ }
1062
+ }
1063
+ //---------------------------------------------------------------
1064
+ static proc NoNon0Pol(vector v)
1065
+ "USAGE: NoNon0Pol(v), v a vector
1066
+ RETURN: int
1067
+ PURPOSE: returns 1, if there is only one non-zero element in v and 0 else
1068
+ "{
1069
+ int i,j;
1070
+ int n = nrows(v);
1071
+ for( j=1; j<=n; j++)
1072
+ {
1073
+ if (v[j] != 0)
1074
+ {
1075
+ i++;
1076
+ }
1077
+ }
1078
+ if ( i!=1 )
1079
+ {
1080
+ i=0;
1081
+ }
1082
+ return(i);
1083
+ }
1084
+ //---------------------------------------------------------------
1085
+ static proc extgcd_Our(poly p, poly q)
1086
+ {
1087
+ ideal J; //for extgcd-computations
1088
+ matrix T; //----------"------------
1089
+ list L;
1090
+ // the extgcd-command has a bug in versions before 2-0-7
1091
+ if ( system("version")<=2006 )
1092
+ {
1093
+ J = p,q; // J = N[k-1,k-1],N[k,k]; //J is of type ideal
1094
+ L[1] = liftstd(J,T); //T is of type matrix
1095
+ if(J[1]==p) //this is just for the case the SINGULAR swaps the
1096
+ // two elements due to ordering
1097
+ {
1098
+ L[2] = T[1,1];
1099
+ L[3] = T[2,1];
1100
+ }
1101
+ else
1102
+ {
1103
+ L[2] = T[2,1];
1104
+ L[3] = T[1,1];
1105
+ }
1106
+ }
1107
+ else
1108
+ {
1109
+ L=extgcd(p,q);
1110
+ // L=extgcd(N[k-1,k-1],N[k,k]);
1111
+ //one can use this line if extgcd-bug is fixed
1112
+ }
1113
+ return(L);
1114
+ }
1115
+ static proc normalize_Our(matrix N, matrix Q)
1116
+ "USAGE: normalize_Our(N,Q), N, Q are two matrices
1117
+ PURPOSE: normalizes N and divides the columns of Q through the leading coefficients of the columns of N
1118
+ RETURN: normalized matrix N and altered Q(according to the scheme mentioned in purpose). If number of columns of N and Q do not coincide, N and Q are returned unchanged
1119
+ NOTE: number of columns of N and Q must coincide.
1120
+ "
1121
+ {
1122
+ if(ncols(N) != ncols(Q))
1123
+ {
1124
+ return (N,Q);
1125
+ }
1126
+ module M = module(N);
1127
+ module S = module(Q);
1128
+ int NCols = ncols(N);
1129
+ number n;
1130
+ for(int i=1;i<=NCols;i++)
1131
+ {
1132
+ n = leadcoef(M[i]);
1133
+ if( n != 0 )
1134
+ {
1135
+ M[i]=M[i]/n;
1136
+ S[i]=S[i]/n;
1137
+ }
1138
+ }
1139
+ N = matrix(M);
1140
+ Q = matrix(S);
1141
+ return (N,Q);
1142
+ }
1143
+
1144
+ //---------------------------------------------------------------
1145
+ proc oldsmith( module M )
1146
+ "USAGE: oldsmith(M); M a module/matrix
1147
+ PURPOSE: computes the Smith normal form of a matrix
1148
+ RETURN: a list of length 4 with the following entries:
1149
+ @* [1]: the Smith normal form S of M,
1150
+ @* [2]: the rank of M,
1151
+ @* [3]: a unimodular matrix U,
1152
+ @* [4]: a unimodular matrix V,
1153
+ such that U*M*V=S. An warning is returned when no Smith form exists.
1154
+ NOTE: Older experimental implementation. The Smith form only exists over PIDs (principal ideal domains). Use global ordering for computations!
1155
+ "
1156
+ {
1157
+ if (nvars(basering)>1) //if more than one variable, return empty list
1158
+ {
1159
+ string s="The Smith-Form only exists for principal ideal domains";
1160
+ return (s);
1161
+ }
1162
+ matrix N = matrix(M); //Typecasting
1163
+ int n = nrows(N);
1164
+ int m = ncols(N);
1165
+ matrix P = unitmat(n); //left transformation matrix
1166
+ matrix Q = unitmat(m); //right transformation matrix
1167
+ int k, i, j, deg_temp;
1168
+ poly tmp;
1169
+ vector v;
1170
+ list L; //for extgcd-computation
1171
+ intmat f[1][n]; //to save degrees
1172
+ matrix lambda[1][n]; //to save leadcoefficients
1173
+ intmat g[1][m]; //to save degrees
1174
+ matrix mu[1][m]; //to save leadcoefficients
1175
+ int ii; //counter
1176
+
1177
+ while ((k!=n) && (k!=m) )
1178
+ {
1179
+ k++;
1180
+ while ((k<=n) && (k<=m)) //outer while-loop for column-operations
1181
+ {
1182
+ while(k<=m ) //inner while-loop for row-operations
1183
+ {
1184
+ if( (n>m) && (k < n) && (k<m))
1185
+ {
1186
+ if( simplify((ideal(submat(N,k+1..n,k+1..m))),2)== 0)
1187
+ {
1188
+ return(N,k-1,P,Q);
1189
+ }
1190
+ }
1191
+ i,j = smdeg(submat(N,k..n,k..m)); //choose smallest degree in the remaining submatrix
1192
+ i=i+(k-1); //indices adjusted to the whole matrix
1193
+ j=j+(k-1);
1194
+ if(i!=k) //take the element with smallest degree in the first position
1195
+ {
1196
+ N=permrow(N,i,k);
1197
+ P=permrow(P,i,k);
1198
+ }
1199
+ if(j!=k)
1200
+ {
1201
+ N=permcol(N,j,k);
1202
+ Q=permcol(Q,j,k);
1203
+ }
1204
+ if(NoNon0Pol(N[k])==1)
1205
+ {
1206
+ break;
1207
+ }
1208
+ tmp=leadcoef(N[k,k]);
1209
+ deg_temp=ord(N[k,k]); //ord outputs the leading degree of N[k,k]
1210
+ for(ii=k+1;ii<=n;ii++)
1211
+ {
1212
+ lambda[1,ii]=leadcoef(N[ii,k])/tmp;
1213
+ f[1,ii]=deg(N[ii,k])-deg_temp;
1214
+ }
1215
+ for(ii=k+1;ii<=n;ii++)
1216
+ {
1217
+ N = addrow(N,k,-lambda[1,ii]*var(1)^f[1,ii],ii);
1218
+ P = addrow(P,k,-lambda[1,ii]*var(1)^f[1,ii],ii);
1219
+ N,Q=normalize_Our(N,Q);
1220
+ }
1221
+ }
1222
+ if (k>n)
1223
+ {
1224
+ break;
1225
+ }
1226
+ if(NoNon0Pol(transpose(N)[k])==1)
1227
+ {
1228
+ break;
1229
+ }
1230
+ tmp=leadcoef(N[k,k]);
1231
+ deg_temp=ord(N[k,k]); //ord outputs the leading degree of N[k][k]
1232
+
1233
+ for(ii=k+1;ii<=m;ii++)
1234
+ {
1235
+ mu[1,ii]=leadcoef(N[k,ii])/tmp;
1236
+ g[1,ii]=deg(N[k,ii])-deg_temp;
1237
+ }
1238
+ for(ii=k+1;ii<=m;ii++)
1239
+ {
1240
+ N=addcol(N,k,-mu[1,ii]*var(1)^g[1,ii],ii);
1241
+ Q=addcol(Q,k,-mu[1,ii]*var(1)^g[1,ii],ii);
1242
+ N,Q=normalize_Our(N,Q);
1243
+ }
1244
+ }
1245
+ if( (k!=1) && (k<n) && (k<m) )
1246
+ {
1247
+ L = extgcd_Our(N[k-1,k-1],N[k,k]);
1248
+ if ( N[k-1,k-1]!=L[1] ) //means that N[k-1,k-1] is not a divisor of N[k,k]
1249
+ {
1250
+ N=addrow(N,k-1,L[2],k);
1251
+ P=addrow(P,k-1,L[2],k);
1252
+ N,Q=normalize_Our(N,Q);
1253
+
1254
+ N=addcol(N,k,-L[3],k-1);
1255
+ Q=addcol(Q,k,-L[3],k-1);
1256
+ N,Q=normalize_Our(N,Q);
1257
+ k=k-2;
1258
+ }
1259
+ }
1260
+ }
1261
+ if( (k<=n) && (k<=m) )
1262
+ {
1263
+ if( N[k,k]==0)
1264
+ {
1265
+ return(N,k-1,P,Q);
1266
+ }
1267
+ }
1268
+ return(N,k,P,Q);
1269
+ }
1270
+ example
1271
+ {
1272
+ "EXAMPLE:";echo = 2;
1273
+ option(redSB);
1274
+ option(redTail);
1275
+ ring r = 0,x,dp;
1276
+ module M = [x2,x,3x3-4], [2x2-1,4x,5x2], [2x5,3x,4x];
1277
+ print(M);
1278
+ list P = oldsmith(M);
1279
+ print(P[1]);
1280
+ matrix N = matrix(M);
1281
+ matrix B = P[3]*N*P[4];
1282
+ print(B);
1283
+ }
1284
+ // see what happens when the matrix is already in Smith-Form
1285
+ // module M = [x,0,0],[0,x2,0],[0,0,x3];
1286
+ // list L = oldsmith(M);
1287
+ // print(L[1]);
1288
+ //matrix N=matrix(M);
1289
+ //matrix B=L[3]*N*L[4];
1290
+ //print(B);
1291
+ //---------------------------------------------------------------
1292
+ static proc list_tex(L, string name,link l,int nr_loop)
1293
+ "USAGE: list_tex(L,name,l), where L is a list, name a string, l a link
1294
+ writes the content of list L in a tex-file 'name'
1295
+ RETURN: nothing
1296
+ "
1297
+ {
1298
+ if(typeof(L)!="list") //in case L is not a list
1299
+ {
1300
+ texobj(name,L);
1301
+ }
1302
+ if(size(L)==0)
1303
+ {
1304
+ }
1305
+ else
1306
+ {
1307
+ string t;
1308
+ for (int i=1;i<=size(L);i++)
1309
+ {
1310
+ while(1)
1311
+ {
1312
+ if(typeof(L[i])=="string") //Fehler hier fuer normalen output->nur wenn string in liste dann verbatim
1313
+ {
1314
+ t=L[i];
1315
+ if(nr_loop==1)
1316
+ {
1317
+ write(l,"\\begin\{center\}");
1318
+ write(l,"\\begin\{verbatim\}");
1319
+ }
1320
+ write(l,t);
1321
+ if(nr_loop==0)
1322
+ {
1323
+ write(l,"\\par");
1324
+ }
1325
+ if(nr_loop==1)
1326
+ {
1327
+ write(l,"\\end\{verbatim\}");
1328
+ write(l,"\\end\{center\}");
1329
+ }
1330
+ break;
1331
+ }
1332
+ if(typeof(L[i])=="module")
1333
+ {
1334
+ texobj(name,matrix(L[i]));
1335
+ break;
1336
+ }
1337
+ if(typeof(L[i])=="list")
1338
+ {
1339
+ list_tex(L[i],name,l,1);
1340
+ break;
1341
+ }
1342
+ write(l,"\\begin\{center\}");
1343
+ texobj(name,L[i]);
1344
+ write(l,"\\end\{center\}");
1345
+ write(l,"\\par");
1346
+ break;
1347
+ }
1348
+ }
1349
+ }
1350
+ }
1351
+ example
1352
+ {
1353
+ "EXAMPLE:";echo = 2;
1354
+ }
1355
+ //---------------------------------------------------------------
1356
+ proc verbatim_tex(string s, link l)
1357
+ "USAGE: verbatim_tex(s,l), where s is a string and l a link
1358
+ PURPOSE: writes the content of s in verbatim-environment in the file
1359
+ specified by link
1360
+ RETURN: nothing
1361
+ "
1362
+ {
1363
+ write(l,"\\begin{verbatim}");
1364
+ write(l,s);
1365
+ write(l,"\\end{verbatim}");
1366
+ write(l,"\\par");
1367
+ }
1368
+ example
1369
+ {
1370
+ "EXAMPLE:";echo = 2;
1371
+ }
1372
+ //---------------------------------------------------------------
1373
+ proc findTorsion(module R, ideal TAnn)
1374
+ "USAGE: findTorsion(R, I); R an ideal/matrix/module, I an ideal
1375
+ RETURN: module
1376
+ PURPOSE: computes the Groebner basis of the submodule of R, annihilated by I
1377
+ NOTE: especially helpful, when I is the annihilator of the t(R) - the torsion submodule of R. In this case, the result is the explicit presentation of t(R) as
1378
+ the submodule of R
1379
+ EXAMPLE: example findTorsion; shows an example
1380
+ "
1381
+ {
1382
+ // motivation: let R be a module,
1383
+ // TAnn is the annihilator of t(R)\subset R
1384
+ // compute the generators of t(R) explicitly
1385
+ ideal AS = TAnn;
1386
+ module S = R;
1387
+ if (attrib(S,"isSB")<>1)
1388
+ {
1389
+ S = std(S);
1390
+ }
1391
+ if (attrib(AS,"isSB")<>1)
1392
+ {
1393
+ AS = std(AS);
1394
+ }
1395
+ int nc = ncols(S);
1396
+ module To = quotient(S,AS);
1397
+ To = std(NF(To,S));
1398
+ return(To);
1399
+ }
1400
+ example
1401
+ {
1402
+ "EXAMPLE:";echo = 2;
1403
+ // Flexible Rod
1404
+ ring A = 0,(D1, D2), (c,dp);
1405
+ module R= [D1, -D1*D2, -1], [2*D1*D2, -D1-D1*D2^2, 0];
1406
+ module RR = transpose(R);
1407
+ list L = control(RR);
1408
+ // here, we have the annihilator:
1409
+ ideal LAnn = D1; // = L[10]
1410
+ module Tr = findTorsion(RR,LAnn);
1411
+ print(RR); // the module itself
1412
+ print(Tr); // generators of the torsion submodule
1413
+ }
1414
+
1415
+
1416
+ proc controlExample(string s)
1417
+ "USAGE: controlExample(s); s a string
1418
+ RETURN: ring
1419
+ PURPOSE: set up an example from the mini database by initializing a ring and a module in a ring
1420
+ NOTE: in order to see the list of available examples, execute @code{controlExample(\"show\");}
1421
+ @* To use an example, one has to do the following. Suppose one calls the ring, where the example will be activated, A. Then, by executing
1422
+ @* @code{def A = controlExample(\"Antenna\");} and @code{setring A;},
1423
+ @* A will become a basering from the example \"Antenna\" with
1424
+ the predefined system module R (transposed).
1425
+ After that one can just execute @code{control(R);} respectively
1426
+ @code{autonom(R);} to perform the control resp. autonomy analysis of R.
1427
+ EXAMPLE: example controlExample; shows an example
1428
+ "{
1429
+ list E, S, D; // E=official name, S=synonym, D=description
1430
+ E[1] = "Cauchy1"; S[1] = "cauchy1"; D[1] = "1-dimensional Cauchy equation";
1431
+ E[2] = "Cauchy2"; S[2] = "cauchy2"; D[2] = "2-dimensional Cauchy equation";
1432
+ E[3] = "Control1"; S[3] = "control1"; D[3] = "example of a simple noncontrollable system";
1433
+ E[4] = "Control2"; S[4] = "control2"; D[4] = "example of a simple controllable system";
1434
+ E[5] = "Antenna"; S[5] = "antenna"; D[5] = "antenna";
1435
+ E[6] = "Einstein"; S[6] = "einstein"; D[6] = "Einstein equations in vacuum";
1436
+ E[7] = "FlexibleRod"; S[7] = "flexible rod"; D[7] = "flexible rod";
1437
+ E[8] = "TwoPendula"; S[8] = "two pendula"; D[8] = "two pendula mounted on a cart";
1438
+ E[9] = "WindTunnel"; S[9] = "wind tunnel";D[9] = "wind tunnel";
1439
+ E[10] = "Zerz1"; S[10] = "zerz1"; D[10] = "example from the lecture of Eva Zerz";
1440
+ // all the examples so far
1441
+ int i;
1442
+ if ( (s=="show") || (s=="Show") )
1443
+ {
1444
+ print("The list of examples:");
1445
+ for (i=1; i<=size(E); i++)
1446
+ {
1447
+ printf("name: %s, desc: %s", E[i],D[i]);
1448
+ }
1449
+ return();
1450
+ }
1451
+ string t;
1452
+ for (i=1; i<=size(E); i++)
1453
+ {
1454
+ if ( (s==E[i]) || (s==S[i]) )
1455
+ {
1456
+ t = "def @A = ex"+E[i]+"();";
1457
+ execute(t);
1458
+ return(@A);
1459
+ }
1460
+ }
1461
+ "No example found";
1462
+ return();
1463
+ }
1464
+ example
1465
+ {
1466
+ "EXAMPLE:";echo = 2;
1467
+ controlExample("show"); // let us see all available examples:
1468
+ def B = controlExample("TwoPendula"); // let us set up a particular example
1469
+ setring B;
1470
+ print(R);
1471
+ }
1472
+
1473
+ //----------------------------------------------------------
1474
+ //
1475
+ //Some example rings with defined systems
1476
+ //----------------------------------------------------------
1477
+ //autonomy:
1478
+ //
1479
+ //----------------------------------------------------------
1480
+ static proc exCauchy1()
1481
+ {
1482
+ ring @r=0,(s1,s2),dp;
1483
+ module R= [s1,-s2],
1484
+ [s2, s1];
1485
+ R=transpose(R);
1486
+ export R;
1487
+ return(@r);
1488
+ }
1489
+ //----------------------------------------------------------
1490
+ static proc exCauchy2()
1491
+ {
1492
+ ring @r=0,(s1,s2,s3,s4),dp;
1493
+ module R= [s1,-s2],
1494
+ [s2, s1],
1495
+ [s3,-s4],
1496
+ [s4, s3];
1497
+ R=transpose(R);
1498
+ export R;
1499
+ return(@r);
1500
+ }
1501
+ //----------------------------------------------------------
1502
+ static proc exZerz1()
1503
+ {
1504
+ ring @r=0,(d1,d2),dp;
1505
+ module R=[d1^2-d2],
1506
+ [d2^2-1];
1507
+ R=transpose(R);
1508
+ export R;
1509
+ return(@r);
1510
+ }
1511
+ //----------------------------------------------------------
1512
+ //control
1513
+ //----------------------------------------------------------
1514
+ static proc exControl1()
1515
+ {
1516
+ ring @r=0,(s1,s2,s3),dp;
1517
+ module R=[0,-s3,s2],
1518
+ [s3,0,-s1];
1519
+ R=transpose(R);
1520
+ export R;
1521
+ return(@r);
1522
+ }
1523
+ //----------------------------------------------------------
1524
+ static proc exControl2()
1525
+ {
1526
+ ring @r=0,(s1,s2,s3),dp;
1527
+ module R=[0,-s3,s2],
1528
+ [s3,0,-s1],
1529
+ [-s2,s1,0];
1530
+ R=transpose(R);
1531
+ export R;
1532
+ return(@r);
1533
+ }
1534
+ //----------------------------------------------------------
1535
+ static proc exAntenna()
1536
+ {
1537
+ ring @r = (0, K1, K2, Te, Kp, Kc),(Dt, delta), dp;
1538
+ module R;
1539
+ R = [Dt, -K1, 0, 0, 0, 0, 0, 0, 0],
1540
+ [0, Dt+K2/Te, 0, 0, 0, 0, -Kp/Te*delta, -Kc/Te*delta, -Kc/Te*delta],
1541
+ [0, 0, Dt, -K1, 0, 0, 0, 0, 0],
1542
+ [0, 0, 0, Dt+K2/Te, 0, 0, -Kc/Te*delta, -Kp/Te*delta, -Kc/Te*delta],
1543
+ [0, 0, 0, 0, Dt, -K1, 0, 0, 0],
1544
+ [0, 0, 0, 0, 0, Dt+K2/Te, -Kc/Te*delta, -Kc/Te*delta, -Kp/Te*delta];
1545
+
1546
+ R=transpose(R);
1547
+ export R;
1548
+ return(@r);
1549
+ }
1550
+
1551
+ //----------------------------------------------------------
1552
+
1553
+ static proc exEinstein()
1554
+ {
1555
+ ring @r = 0,(D(1..4)),dp;
1556
+ module R =
1557
+ [D(2)^2+D(3)^2-D(4)^2, D(1)^2, D(1)^2, -D(1)^2, -2*D(1)*D(2), 0, 0, -2*D(1)*D(3), 0, 2*D(1)*D(4)],
1558
+ [D(2)^2, D(1)^2+D(3)^2-D(4)^2, D(2)^2, -D(2)^2, -2*D(1)*D(2), -2*D(2)*D(3), 0, 0, 2*D(2)*D(4), 0],
1559
+ [D(3)^2, D(3)^2, D(1)^2+D(2)^2-D(4)^2, -D(3)^2, 0, -2*D(2)*D(3), 2*D(3)*D(4), -2*D(1)*D(3), 0, 0],
1560
+ [D(4)^2, D(4)^2, D(4)^2, D(1)^2+D(2)^2+D(3)^2, 0, 0, -2*D(3)*D(4), 0, -2*D(2)*D(4), -2*D(1)*D(4)],
1561
+ [0, 0, D(1)*D(2), -D(1)*D(2), D(3)^2-D(4)^2, -D(1)*D(3), 0, -D(2)*D(3), D(1)*D(4), D(2)*D(4)],
1562
+ [D(2)*D(3), 0, 0, -D(2)*D(3),-D(1)*D(3), D(1)^2-D(4)^2, D(2)*D(4), -D(1)*D(2), D(3)*D(4), 0],
1563
+ [D(3)*D(4), D(3)*D(4), 0, 0, 0, -D(2)*D(4), D(1)^2+D(2)^2, -D(1)*D(4), -D(2)*D(3), -D(1)*D(3)],
1564
+ [0, D(1)*D(3), 0, -D(1)*D(3), -D(2)*D(3), -D(1)*D(2), D(1)*D(4), D(2)^2-D(4)^2, 0, D(3)*D(4)],
1565
+ [D(2)*D(4), 0, D(2)*D(4), 0, -D(1)*D(4), -D(3)*D(4), -D(2)*D(3), 0, D(1)^2+D(3)^2, -D(1)*D(2)],
1566
+ [0, D(1)*D(4), D(1)*D(4), 0, -D(2)*D(4), 0, -D(1)*D(3), -D(3)*D(4), -D(1)*D(2), D(2)^2+D(3)^2];
1567
+
1568
+ R=transpose(R);
1569
+ export R;
1570
+ return(@r);
1571
+ }
1572
+
1573
+ //----------------------------------------------------------
1574
+ static proc exFlexibleRod()
1575
+ {
1576
+ ring @r = 0,(D1, delta), dp;
1577
+ module R;
1578
+ R = [D1, -D1*delta, -1], [2*D1*delta, -D1-D1*delta^2, 0];
1579
+
1580
+ R=transpose(R);
1581
+ export R;
1582
+ return(@r);
1583
+ }
1584
+
1585
+ //----------------------------------------------------------
1586
+ static proc exTwoPendula()
1587
+ {
1588
+ ring @r=(0,m1,m2,M,g,L1,L2),Dt,dp;
1589
+ module R = [m1*L1*Dt^2, m2*L2*Dt^2, -1, (M+m1+m2)*Dt^2],
1590
+ [m1*L1^2*Dt^2-m1*L1*g, 0, 0, m1*L1*Dt^2],
1591
+ [0, m2*L2^2*Dt^2-m2*L2*g, 0, m2*L2*Dt^2];
1592
+
1593
+ R=transpose(R);
1594
+ export R;
1595
+ return(@r);
1596
+ }
1597
+ //----------------------------------------------------------
1598
+ static proc exWindTunnel()
1599
+ {
1600
+ ring @r = (0,a, omega, zeta, k),(D1, delta),dp;
1601
+ module R = [D1+a, -k*a*delta, 0, 0],
1602
+ [0, D1, -1, 0],
1603
+ [0, omega^2, D1+2*zeta*omega, -omega^2];
1604
+
1605
+ R=transpose(R);
1606
+ export R;
1607
+ return(@r);
1608
+ }
1609
+
1610
+ /* noncomm examples for leftInverse/rightInverse:
1611
+
1612
+ LIB "jacobson.lib";
1613
+ ring w = 0,(x,d),Dp;
1614
+ def W=nc_algebra(1,1);
1615
+ setring W;
1616
+ matrix m[3][3]=[d2,d+1,0],[d+1,0,d3-x2*d],[2d+1, d3+d2, d2];
1617
+ list J=jacobson(m,0);
1618
+
1619
+ leftInverse(J[3]); // exist
1620
+ rightInverse(J[3]);
1621
+
1622
+ leftInverse(J[1]); // zero
1623
+ rightInverse(J[1]);
1624
+
1625
+ list JJ = jacobson(J[1],0);
1626
+
1627
+ leftInverse(JJ[3]); // exist
1628
+ rightInverse(JJ[3]);
1629
+
1630
+ leftInverse(JJ[1]); // exist
1631
+ rightInverse(JJ[1]);
1632
+
1633
+ leftInverse(JJ[2]); // zero
1634
+ rightInverse(JJ[2]);
1635
+
1636
+ */