passagemath-singular 10.6.31rc3__cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

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

Potentially problematic release.


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

Files changed (491) hide show
  1. PySingular.cpython-314-x86_64-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 +491 -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-20aec911.4.1.so +0 -0
  7. passagemath_singular.libs/libcddgmp-21acf0c6.so.0.1.3 +0 -0
  8. passagemath_singular.libs/libfactory-4-fcee31da.4.1.so +0 -0
  9. passagemath_singular.libs/libflint-66e12231.so.21.0.0 +0 -0
  10. passagemath_singular.libs/libgf2x-a4cdec90.so.3.0.0 +0 -0
  11. passagemath_singular.libs/libgfortran-83c28eba.so.5.0.0 +0 -0
  12. passagemath_singular.libs/libgmp-6e109695.so.10.5.0 +0 -0
  13. passagemath_singular.libs/libgsl-cda90e79.so.28.0.0 +0 -0
  14. passagemath_singular.libs/libmpfr-82690d50.so.6.2.1 +0 -0
  15. passagemath_singular.libs/libntl-e6f0d543.so.44.0.1 +0 -0
  16. passagemath_singular.libs/libomalloc-0-5c9e866e.9.6.so +0 -0
  17. passagemath_singular.libs/libopenblasp-r0-6dcb67f9.3.29.so +0 -0
  18. passagemath_singular.libs/libpolys-4-5c0a87e0.4.1.so +0 -0
  19. passagemath_singular.libs/libquadmath-2284e583.so.0.0.0 +0 -0
  20. passagemath_singular.libs/libreadline-ea270e21.so.8.2 +0 -0
  21. passagemath_singular.libs/libsingular_resources-4-a1aafc6d.4.1.so +0 -0
  22. passagemath_singular.libs/libtinfo-ceb117d9.so.6.3 +0 -0
  23. sage/algebras/all__sagemath_singular.py +3 -0
  24. sage/algebras/fusion_rings/all.py +19 -0
  25. sage/algebras/fusion_rings/f_matrix.py +2448 -0
  26. sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-314-x86_64-linux-gnu.so +0 -0
  27. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +5 -0
  28. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +538 -0
  29. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-314-x86_64-linux-gnu.so +0 -0
  30. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +3 -0
  31. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +331 -0
  32. sage/algebras/fusion_rings/fusion_double.py +899 -0
  33. sage/algebras/fusion_rings/fusion_ring.py +1580 -0
  34. sage/algebras/fusion_rings/poly_tup_engine.cpython-314-x86_64-linux-gnu.so +0 -0
  35. sage/algebras/fusion_rings/poly_tup_engine.pxd +24 -0
  36. sage/algebras/fusion_rings/poly_tup_engine.pyx +579 -0
  37. sage/algebras/fusion_rings/shm_managers.cpython-314-x86_64-linux-gnu.so +0 -0
  38. sage/algebras/fusion_rings/shm_managers.pxd +24 -0
  39. sage/algebras/fusion_rings/shm_managers.pyx +780 -0
  40. sage/algebras/letterplace/all.py +1 -0
  41. sage/algebras/letterplace/free_algebra_element_letterplace.cpython-314-x86_64-linux-gnu.so +0 -0
  42. sage/algebras/letterplace/free_algebra_element_letterplace.pxd +18 -0
  43. sage/algebras/letterplace/free_algebra_element_letterplace.pyx +755 -0
  44. sage/algebras/letterplace/free_algebra_letterplace.cpython-314-x86_64-linux-gnu.so +0 -0
  45. sage/algebras/letterplace/free_algebra_letterplace.pxd +35 -0
  46. sage/algebras/letterplace/free_algebra_letterplace.pyx +914 -0
  47. sage/algebras/letterplace/letterplace_ideal.cpython-314-x86_64-linux-gnu.so +0 -0
  48. sage/algebras/letterplace/letterplace_ideal.pyx +408 -0
  49. sage/algebras/quatalg/all.py +2 -0
  50. sage/algebras/quatalg/quaternion_algebra.py +4778 -0
  51. sage/algebras/quatalg/quaternion_algebra_cython.cpython-314-x86_64-linux-gnu.so +0 -0
  52. sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
  53. sage/algebras/quatalg/quaternion_algebra_element.cpython-314-x86_64-linux-gnu.so +0 -0
  54. sage/algebras/quatalg/quaternion_algebra_element.pxd +29 -0
  55. sage/algebras/quatalg/quaternion_algebra_element.pyx +2176 -0
  56. sage/all__sagemath_singular.py +11 -0
  57. sage/ext_data/all__sagemath_singular.py +1 -0
  58. sage/ext_data/singular/function_field/core.lib +98 -0
  59. sage/interfaces/all__sagemath_singular.py +1 -0
  60. sage/interfaces/singular.py +2835 -0
  61. sage/libs/all__sagemath_singular.py +1 -0
  62. sage/libs/singular/__init__.py +1 -0
  63. sage/libs/singular/decl.pxd +1168 -0
  64. sage/libs/singular/function.cpython-314-x86_64-linux-gnu.so +0 -0
  65. sage/libs/singular/function.pxd +87 -0
  66. sage/libs/singular/function.pyx +1901 -0
  67. sage/libs/singular/function_factory.py +61 -0
  68. sage/libs/singular/groebner_strategy.cpython-314-x86_64-linux-gnu.so +0 -0
  69. sage/libs/singular/groebner_strategy.pxd +22 -0
  70. sage/libs/singular/groebner_strategy.pyx +582 -0
  71. sage/libs/singular/option.cpython-314-x86_64-linux-gnu.so +0 -0
  72. sage/libs/singular/option.pyx +671 -0
  73. sage/libs/singular/polynomial.cpython-314-x86_64-linux-gnu.so +0 -0
  74. sage/libs/singular/polynomial.pxd +39 -0
  75. sage/libs/singular/polynomial.pyx +661 -0
  76. sage/libs/singular/ring.cpython-314-x86_64-linux-gnu.so +0 -0
  77. sage/libs/singular/ring.pxd +58 -0
  78. sage/libs/singular/ring.pyx +893 -0
  79. sage/libs/singular/singular.cpython-314-x86_64-linux-gnu.so +0 -0
  80. sage/libs/singular/singular.pxd +72 -0
  81. sage/libs/singular/singular.pyx +1944 -0
  82. sage/libs/singular/standard_options.py +145 -0
  83. sage/matrix/all__sagemath_singular.py +1 -0
  84. sage/matrix/matrix_mpolynomial_dense.cpython-314-x86_64-linux-gnu.so +0 -0
  85. sage/matrix/matrix_mpolynomial_dense.pxd +7 -0
  86. sage/matrix/matrix_mpolynomial_dense.pyx +615 -0
  87. sage/rings/all__sagemath_singular.py +1 -0
  88. sage/rings/function_field/all__sagemath_singular.py +1 -0
  89. sage/rings/function_field/derivations_polymod.py +911 -0
  90. sage/rings/function_field/element_polymod.cpython-314-x86_64-linux-gnu.so +0 -0
  91. sage/rings/function_field/element_polymod.pyx +406 -0
  92. sage/rings/function_field/function_field_polymod.py +2611 -0
  93. sage/rings/function_field/ideal_polymod.py +1775 -0
  94. sage/rings/function_field/order_polymod.py +1475 -0
  95. sage/rings/function_field/place_polymod.py +681 -0
  96. sage/rings/polynomial/all__sagemath_singular.py +1 -0
  97. sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-314-x86_64-linux-gnu.so +0 -0
  98. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +5 -0
  99. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +339 -0
  100. sage/rings/polynomial/multi_polynomial_libsingular.cpython-314-x86_64-linux-gnu.so +0 -0
  101. sage/rings/polynomial/multi_polynomial_libsingular.pxd +30 -0
  102. sage/rings/polynomial/multi_polynomial_libsingular.pyx +6277 -0
  103. sage/rings/polynomial/plural.cpython-314-x86_64-linux-gnu.so +0 -0
  104. sage/rings/polynomial/plural.pxd +48 -0
  105. sage/rings/polynomial/plural.pyx +3171 -0
  106. sage/symbolic/all__sagemath_singular.py +1 -0
  107. sage/symbolic/comparison_impl.pxi +428 -0
  108. sage/symbolic/constants_c_impl.pxi +178 -0
  109. sage/symbolic/expression.cpython-314-x86_64-linux-gnu.so +0 -0
  110. sage/symbolic/expression.pxd +7 -0
  111. sage/symbolic/expression.pyx +14200 -0
  112. sage/symbolic/getitem_impl.pxi +202 -0
  113. sage/symbolic/pynac.pxi +572 -0
  114. sage/symbolic/pynac_constant_impl.pxi +133 -0
  115. sage/symbolic/pynac_function_impl.pxi +206 -0
  116. sage/symbolic/pynac_impl.pxi +2576 -0
  117. sage/symbolic/pynac_wrap.h +124 -0
  118. sage/symbolic/series_impl.pxi +272 -0
  119. sage/symbolic/substitution_map_impl.pxi +94 -0
  120. sage_wheels/bin/ESingular +0 -0
  121. sage_wheels/bin/Singular +0 -0
  122. sage_wheels/bin/TSingular +0 -0
  123. sage_wheels/lib/singular/MOD/cohomo.la +41 -0
  124. sage_wheels/lib/singular/MOD/cohomo.so +0 -0
  125. sage_wheels/lib/singular/MOD/customstd.la +41 -0
  126. sage_wheels/lib/singular/MOD/customstd.so +0 -0
  127. sage_wheels/lib/singular/MOD/freealgebra.la +41 -0
  128. sage_wheels/lib/singular/MOD/freealgebra.so +0 -0
  129. sage_wheels/lib/singular/MOD/gfanlib.la +41 -0
  130. sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
  131. sage_wheels/lib/singular/MOD/gitfan.la +41 -0
  132. sage_wheels/lib/singular/MOD/gitfan.so +0 -0
  133. sage_wheels/lib/singular/MOD/interval.la +41 -0
  134. sage_wheels/lib/singular/MOD/interval.so +0 -0
  135. sage_wheels/lib/singular/MOD/loctriv.la +41 -0
  136. sage_wheels/lib/singular/MOD/loctriv.so +0 -0
  137. sage_wheels/lib/singular/MOD/machinelearning.la +41 -0
  138. sage_wheels/lib/singular/MOD/machinelearning.so +0 -0
  139. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.la +41 -0
  140. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.so +0 -0
  141. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.la +41 -0
  142. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.so +0 -0
  143. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.la +41 -0
  144. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.so +0 -0
  145. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.la +41 -0
  146. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.so +0 -0
  147. sage_wheels/lib/singular/MOD/partialgb.la +41 -0
  148. sage_wheels/lib/singular/MOD/partialgb.so +0 -0
  149. sage_wheels/lib/singular/MOD/pyobject.la +41 -0
  150. sage_wheels/lib/singular/MOD/pyobject.so +0 -0
  151. sage_wheels/lib/singular/MOD/singmathic.la +41 -0
  152. sage_wheels/lib/singular/MOD/singmathic.so +0 -0
  153. sage_wheels/lib/singular/MOD/sispasm.la +41 -0
  154. sage_wheels/lib/singular/MOD/sispasm.so +0 -0
  155. sage_wheels/lib/singular/MOD/subsets.la +41 -0
  156. sage_wheels/lib/singular/MOD/subsets.so +0 -0
  157. sage_wheels/lib/singular/MOD/systhreads.la +41 -0
  158. sage_wheels/lib/singular/MOD/systhreads.so +0 -0
  159. sage_wheels/lib/singular/MOD/syzextra.la +41 -0
  160. sage_wheels/lib/singular/MOD/syzextra.so +0 -0
  161. sage_wheels/libexec/singular/MOD/change_cost +0 -0
  162. sage_wheels/libexec/singular/MOD/singularsurf +11 -0
  163. sage_wheels/libexec/singular/MOD/singularsurf_jupyter +9 -0
  164. sage_wheels/libexec/singular/MOD/singularsurf_win +10 -0
  165. sage_wheels/libexec/singular/MOD/solve_IP +0 -0
  166. sage_wheels/libexec/singular/MOD/surfex +16 -0
  167. sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
  168. sage_wheels/share/factory/gftables/10201 +342 -0
  169. sage_wheels/share/factory/gftables/1024 +37 -0
  170. sage_wheels/share/factory/gftables/10609 +356 -0
  171. sage_wheels/share/factory/gftables/11449 +384 -0
  172. sage_wheels/share/factory/gftables/11881 +398 -0
  173. sage_wheels/share/factory/gftables/121 +6 -0
  174. sage_wheels/share/factory/gftables/12167 +408 -0
  175. sage_wheels/share/factory/gftables/125 +7 -0
  176. sage_wheels/share/factory/gftables/12769 +428 -0
  177. sage_wheels/share/factory/gftables/128 +7 -0
  178. sage_wheels/share/factory/gftables/1331 +47 -0
  179. sage_wheels/share/factory/gftables/1369 +48 -0
  180. sage_wheels/share/factory/gftables/14641 +490 -0
  181. sage_wheels/share/factory/gftables/15625 +523 -0
  182. sage_wheels/share/factory/gftables/16 +3 -0
  183. sage_wheels/share/factory/gftables/16129 +540 -0
  184. sage_wheels/share/factory/gftables/16384 +549 -0
  185. sage_wheels/share/factory/gftables/16807 +563 -0
  186. sage_wheels/share/factory/gftables/1681 +58 -0
  187. sage_wheels/share/factory/gftables/169 +8 -0
  188. sage_wheels/share/factory/gftables/17161 +574 -0
  189. sage_wheels/share/factory/gftables/1849 +64 -0
  190. sage_wheels/share/factory/gftables/18769 +628 -0
  191. sage_wheels/share/factory/gftables/19321 +646 -0
  192. sage_wheels/share/factory/gftables/19683 +659 -0
  193. sage_wheels/share/factory/gftables/2048 +71 -0
  194. sage_wheels/share/factory/gftables/2187 +75 -0
  195. sage_wheels/share/factory/gftables/2197 +76 -0
  196. sage_wheels/share/factory/gftables/2209 +76 -0
  197. sage_wheels/share/factory/gftables/22201 +742 -0
  198. sage_wheels/share/factory/gftables/22801 +762 -0
  199. sage_wheels/share/factory/gftables/2401 +82 -0
  200. sage_wheels/share/factory/gftables/243 +11 -0
  201. sage_wheels/share/factory/gftables/24389 +815 -0
  202. sage_wheels/share/factory/gftables/24649 +824 -0
  203. sage_wheels/share/factory/gftables/25 +3 -0
  204. sage_wheels/share/factory/gftables/256 +11 -0
  205. sage_wheels/share/factory/gftables/26569 +888 -0
  206. sage_wheels/share/factory/gftables/27 +3 -0
  207. sage_wheels/share/factory/gftables/27889 +932 -0
  208. sage_wheels/share/factory/gftables/2809 +96 -0
  209. sage_wheels/share/factory/gftables/28561 +954 -0
  210. sage_wheels/share/factory/gftables/289 +12 -0
  211. sage_wheels/share/factory/gftables/29791 +995 -0
  212. sage_wheels/share/factory/gftables/29929 +1000 -0
  213. sage_wheels/share/factory/gftables/3125 +107 -0
  214. sage_wheels/share/factory/gftables/32 +4 -0
  215. sage_wheels/share/factory/gftables/32041 +1070 -0
  216. sage_wheels/share/factory/gftables/32761 +1094 -0
  217. sage_wheels/share/factory/gftables/32768 +1095 -0
  218. sage_wheels/share/factory/gftables/343 +14 -0
  219. sage_wheels/share/factory/gftables/3481 +118 -0
  220. sage_wheels/share/factory/gftables/361 +14 -0
  221. sage_wheels/share/factory/gftables/36481 +1218 -0
  222. sage_wheels/share/factory/gftables/3721 +126 -0
  223. sage_wheels/share/factory/gftables/37249 +1244 -0
  224. sage_wheels/share/factory/gftables/38809 +1296 -0
  225. sage_wheels/share/factory/gftables/39601 +1322 -0
  226. sage_wheels/share/factory/gftables/4 +3 -0
  227. sage_wheels/share/factory/gftables/4096 +139 -0
  228. sage_wheels/share/factory/gftables/44521 +1486 -0
  229. sage_wheels/share/factory/gftables/4489 +152 -0
  230. sage_wheels/share/factory/gftables/49 +4 -0
  231. sage_wheels/share/factory/gftables/4913 +166 -0
  232. sage_wheels/share/factory/gftables/49729 +1660 -0
  233. sage_wheels/share/factory/gftables/5041 +170 -0
  234. sage_wheels/share/factory/gftables/50653 +1691 -0
  235. sage_wheels/share/factory/gftables/512 +20 -0
  236. sage_wheels/share/factory/gftables/51529 +1720 -0
  237. sage_wheels/share/factory/gftables/52441 +1750 -0
  238. sage_wheels/share/factory/gftables/529 +20 -0
  239. sage_wheels/share/factory/gftables/5329 +180 -0
  240. sage_wheels/share/factory/gftables/54289 +1812 -0
  241. sage_wheels/share/factory/gftables/57121 +1906 -0
  242. sage_wheels/share/factory/gftables/58081 +1938 -0
  243. sage_wheels/share/factory/gftables/59049 +1971 -0
  244. sage_wheels/share/factory/gftables/6241 +210 -0
  245. sage_wheels/share/factory/gftables/625 +23 -0
  246. sage_wheels/share/factory/gftables/63001 +2102 -0
  247. sage_wheels/share/factory/gftables/64 +5 -0
  248. sage_wheels/share/factory/gftables/6561 +221 -0
  249. sage_wheels/share/factory/gftables/6859 +231 -0
  250. sage_wheels/share/factory/gftables/6889 +232 -0
  251. sage_wheels/share/factory/gftables/729 +27 -0
  252. sage_wheels/share/factory/gftables/7921 +266 -0
  253. sage_wheels/share/factory/gftables/8 +3 -0
  254. sage_wheels/share/factory/gftables/81 +5 -0
  255. sage_wheels/share/factory/gftables/8192 +276 -0
  256. sage_wheels/share/factory/gftables/841 +30 -0
  257. sage_wheels/share/factory/gftables/9 +3 -0
  258. sage_wheels/share/factory/gftables/9409 +316 -0
  259. sage_wheels/share/factory/gftables/961 +34 -0
  260. sage_wheels/share/info/singular.info +191898 -0
  261. sage_wheels/share/singular/LIB/GND.lib +1359 -0
  262. sage_wheels/share/singular/LIB/JMBTest.lib +976 -0
  263. sage_wheels/share/singular/LIB/JMSConst.lib +1363 -0
  264. sage_wheels/share/singular/LIB/KVequiv.lib +699 -0
  265. sage_wheels/share/singular/LIB/SingularityDBM.lib +491 -0
  266. sage_wheels/share/singular/LIB/VecField.lib +1542 -0
  267. sage_wheels/share/singular/LIB/absfact.lib +959 -0
  268. sage_wheels/share/singular/LIB/ainvar.lib +730 -0
  269. sage_wheels/share/singular/LIB/aksaka.lib +419 -0
  270. sage_wheels/share/singular/LIB/alexpoly.lib +2542 -0
  271. sage_wheels/share/singular/LIB/algebra.lib +1193 -0
  272. sage_wheels/share/singular/LIB/all.lib +136 -0
  273. sage_wheels/share/singular/LIB/arcpoint.lib +514 -0
  274. sage_wheels/share/singular/LIB/arnold.lib +4553 -0
  275. sage_wheels/share/singular/LIB/arnoldclassify.lib +2058 -0
  276. sage_wheels/share/singular/LIB/arr.lib +3486 -0
  277. sage_wheels/share/singular/LIB/assprimeszerodim.lib +755 -0
  278. sage_wheels/share/singular/LIB/autgradalg.lib +3361 -0
  279. sage_wheels/share/singular/LIB/bfun.lib +1964 -0
  280. sage_wheels/share/singular/LIB/bimodules.lib +774 -0
  281. sage_wheels/share/singular/LIB/brillnoether.lib +226 -0
  282. sage_wheels/share/singular/LIB/brnoeth.lib +5017 -0
  283. sage_wheels/share/singular/LIB/central.lib +2169 -0
  284. sage_wheels/share/singular/LIB/chern.lib +4162 -0
  285. sage_wheels/share/singular/LIB/cimonom.lib +571 -0
  286. sage_wheels/share/singular/LIB/cisimplicial.lib +1835 -0
  287. sage_wheels/share/singular/LIB/classify.lib +3239 -0
  288. sage_wheels/share/singular/LIB/classify2.lib +1462 -0
  289. sage_wheels/share/singular/LIB/classifyMapGerms.lib +1515 -0
  290. sage_wheels/share/singular/LIB/classify_aeq.lib +3253 -0
  291. sage_wheels/share/singular/LIB/classifyceq.lib +2092 -0
  292. sage_wheels/share/singular/LIB/classifyci.lib +1133 -0
  293. sage_wheels/share/singular/LIB/combinat.lib +91 -0
  294. sage_wheels/share/singular/LIB/compregb.lib +276 -0
  295. sage_wheels/share/singular/LIB/control.lib +1636 -0
  296. sage_wheels/share/singular/LIB/crypto.lib +3795 -0
  297. sage_wheels/share/singular/LIB/curveInv.lib +667 -0
  298. sage_wheels/share/singular/LIB/curvepar.lib +1817 -0
  299. sage_wheels/share/singular/LIB/customstd.lib +100 -0
  300. sage_wheels/share/singular/LIB/deRham.lib +5979 -0
  301. sage_wheels/share/singular/LIB/decodegb.lib +2134 -0
  302. sage_wheels/share/singular/LIB/decomp.lib +1655 -0
  303. sage_wheels/share/singular/LIB/deflation.lib +872 -0
  304. sage_wheels/share/singular/LIB/deform.lib +925 -0
  305. sage_wheels/share/singular/LIB/difform.lib +3055 -0
  306. sage_wheels/share/singular/LIB/divisors.lib +750 -0
  307. sage_wheels/share/singular/LIB/dmod.lib +5817 -0
  308. sage_wheels/share/singular/LIB/dmodapp.lib +3269 -0
  309. sage_wheels/share/singular/LIB/dmodideal.lib +1211 -0
  310. sage_wheels/share/singular/LIB/dmodloc.lib +2645 -0
  311. sage_wheels/share/singular/LIB/dmodvar.lib +818 -0
  312. sage_wheels/share/singular/LIB/dummy.lib +17 -0
  313. sage_wheels/share/singular/LIB/elim.lib +1009 -0
  314. sage_wheels/share/singular/LIB/ellipticcovers.lib +548 -0
  315. sage_wheels/share/singular/LIB/enumpoints.lib +146 -0
  316. sage_wheels/share/singular/LIB/equising.lib +2127 -0
  317. sage_wheels/share/singular/LIB/ffmodstd.lib +2384 -0
  318. sage_wheels/share/singular/LIB/ffsolve.lib +1289 -0
  319. sage_wheels/share/singular/LIB/findifs.lib +778 -0
  320. sage_wheels/share/singular/LIB/finitediff.lib +1768 -0
  321. sage_wheels/share/singular/LIB/finvar.lib +7989 -0
  322. sage_wheels/share/singular/LIB/fpadim.lib +2429 -0
  323. sage_wheels/share/singular/LIB/fpalgebras.lib +1666 -0
  324. sage_wheels/share/singular/LIB/fpaprops.lib +1462 -0
  325. sage_wheels/share/singular/LIB/freegb.lib +3853 -0
  326. sage_wheels/share/singular/LIB/general.lib +1350 -0
  327. sage_wheels/share/singular/LIB/gfan.lib +1768 -0
  328. sage_wheels/share/singular/LIB/gitfan.lib +3130 -0
  329. sage_wheels/share/singular/LIB/gkdim.lib +99 -0
  330. sage_wheels/share/singular/LIB/gmspoly.lib +589 -0
  331. sage_wheels/share/singular/LIB/gmssing.lib +1739 -0
  332. sage_wheels/share/singular/LIB/goettsche.lib +909 -0
  333. sage_wheels/share/singular/LIB/graal.lib +1366 -0
  334. sage_wheels/share/singular/LIB/gradedModules.lib +2541 -0
  335. sage_wheels/share/singular/LIB/graphics.lib +360 -0
  336. sage_wheels/share/singular/LIB/grobcov.lib +7706 -0
  337. sage_wheels/share/singular/LIB/groups.lib +1123 -0
  338. sage_wheels/share/singular/LIB/grwalk.lib +507 -0
  339. sage_wheels/share/singular/LIB/hdepth.lib +194 -0
  340. sage_wheels/share/singular/LIB/help.cnf +57 -0
  341. sage_wheels/share/singular/LIB/hess.lib +1946 -0
  342. sage_wheels/share/singular/LIB/hnoether.lib +4292 -0
  343. sage_wheels/share/singular/LIB/hodge.lib +400 -0
  344. sage_wheels/share/singular/LIB/homolog.lib +1965 -0
  345. sage_wheels/share/singular/LIB/hyperel.lib +975 -0
  346. sage_wheels/share/singular/LIB/inout.lib +679 -0
  347. sage_wheels/share/singular/LIB/integralbasis.lib +6224 -0
  348. sage_wheels/share/singular/LIB/interval.lib +1418 -0
  349. sage_wheels/share/singular/LIB/intprog.lib +778 -0
  350. sage_wheels/share/singular/LIB/invar.lib +443 -0
  351. sage_wheels/share/singular/LIB/involut.lib +980 -0
  352. sage_wheels/share/singular/LIB/jacobson.lib +1215 -0
  353. sage_wheels/share/singular/LIB/kskernel.lib +534 -0
  354. sage_wheels/share/singular/LIB/latex.lib +3146 -0
  355. sage_wheels/share/singular/LIB/lejeune.lib +651 -0
  356. sage_wheels/share/singular/LIB/linalg.lib +2040 -0
  357. sage_wheels/share/singular/LIB/locnormal.lib +212 -0
  358. sage_wheels/share/singular/LIB/lrcalc.lib +526 -0
  359. sage_wheels/share/singular/LIB/makedbm.lib +294 -0
  360. sage_wheels/share/singular/LIB/mathml.lib +813 -0
  361. sage_wheels/share/singular/LIB/matrix.lib +1372 -0
  362. sage_wheels/share/singular/LIB/maxlike.lib +1132 -0
  363. sage_wheels/share/singular/LIB/methods.lib +212 -0
  364. sage_wheels/share/singular/LIB/moddiq.lib +322 -0
  365. sage_wheels/share/singular/LIB/modfinduni.lib +181 -0
  366. sage_wheels/share/singular/LIB/modnormal.lib +218 -0
  367. sage_wheels/share/singular/LIB/modprimdec.lib +1278 -0
  368. sage_wheels/share/singular/LIB/modquotient.lib +269 -0
  369. sage_wheels/share/singular/LIB/modstd.lib +1024 -0
  370. sage_wheels/share/singular/LIB/modular.lib +545 -0
  371. sage_wheels/share/singular/LIB/modules.lib +2561 -0
  372. sage_wheels/share/singular/LIB/modwalk.lib +609 -0
  373. sage_wheels/share/singular/LIB/mondromy.lib +1016 -0
  374. sage_wheels/share/singular/LIB/monomialideal.lib +3851 -0
  375. sage_wheels/share/singular/LIB/mprimdec.lib +2353 -0
  376. sage_wheels/share/singular/LIB/mregular.lib +1863 -0
  377. sage_wheels/share/singular/LIB/multigrading.lib +5629 -0
  378. sage_wheels/share/singular/LIB/ncHilb.lib +777 -0
  379. sage_wheels/share/singular/LIB/ncModslimgb.lib +791 -0
  380. sage_wheels/share/singular/LIB/ncalg.lib +16311 -0
  381. sage_wheels/share/singular/LIB/ncall.lib +31 -0
  382. sage_wheels/share/singular/LIB/ncdecomp.lib +468 -0
  383. sage_wheels/share/singular/LIB/ncfactor.lib +13371 -0
  384. sage_wheels/share/singular/LIB/ncfrac.lib +1023 -0
  385. sage_wheels/share/singular/LIB/nchilbert.lib +448 -0
  386. sage_wheels/share/singular/LIB/nchomolog.lib +759 -0
  387. sage_wheels/share/singular/LIB/ncloc.lib +361 -0
  388. sage_wheels/share/singular/LIB/ncpreim.lib +795 -0
  389. sage_wheels/share/singular/LIB/ncrat.lib +2849 -0
  390. sage_wheels/share/singular/LIB/nctools.lib +1887 -0
  391. sage_wheels/share/singular/LIB/nets.lib +1456 -0
  392. sage_wheels/share/singular/LIB/nfmodstd.lib +1000 -0
  393. sage_wheels/share/singular/LIB/nfmodsyz.lib +732 -0
  394. sage_wheels/share/singular/LIB/noether.lib +1106 -0
  395. sage_wheels/share/singular/LIB/normal.lib +8700 -0
  396. sage_wheels/share/singular/LIB/normaliz.lib +2226 -0
  397. sage_wheels/share/singular/LIB/ntsolve.lib +362 -0
  398. sage_wheels/share/singular/LIB/numerAlg.lib +560 -0
  399. sage_wheels/share/singular/LIB/numerDecom.lib +2261 -0
  400. sage_wheels/share/singular/LIB/olga.lib +1933 -0
  401. sage_wheels/share/singular/LIB/orbitparam.lib +351 -0
  402. sage_wheels/share/singular/LIB/parallel.lib +319 -0
  403. sage_wheels/share/singular/LIB/paraplanecurves.lib +3110 -0
  404. sage_wheels/share/singular/LIB/perron.lib +202 -0
  405. sage_wheels/share/singular/LIB/pfd.lib +2223 -0
  406. sage_wheels/share/singular/LIB/phindex.lib +642 -0
  407. sage_wheels/share/singular/LIB/pointid.lib +673 -0
  408. sage_wheels/share/singular/LIB/polybori.lib +1430 -0
  409. sage_wheels/share/singular/LIB/polyclass.lib +525 -0
  410. sage_wheels/share/singular/LIB/polylib.lib +1174 -0
  411. sage_wheels/share/singular/LIB/polymake.lib +1902 -0
  412. sage_wheels/share/singular/LIB/presolve.lib +1533 -0
  413. sage_wheels/share/singular/LIB/primdec.lib +9576 -0
  414. sage_wheels/share/singular/LIB/primdecint.lib +1782 -0
  415. sage_wheels/share/singular/LIB/primitiv.lib +401 -0
  416. sage_wheels/share/singular/LIB/puiseuxexpansions.lib +1631 -0
  417. sage_wheels/share/singular/LIB/purityfiltration.lib +960 -0
  418. sage_wheels/share/singular/LIB/qhmoduli.lib +1561 -0
  419. sage_wheels/share/singular/LIB/qmatrix.lib +293 -0
  420. sage_wheels/share/singular/LIB/random.lib +455 -0
  421. sage_wheels/share/singular/LIB/ratgb.lib +489 -0
  422. sage_wheels/share/singular/LIB/realclassify.lib +5759 -0
  423. sage_wheels/share/singular/LIB/realizationMatroids.lib +772 -0
  424. sage_wheels/share/singular/LIB/realrad.lib +1197 -0
  425. sage_wheels/share/singular/LIB/recover.lib +2628 -0
  426. sage_wheels/share/singular/LIB/redcgs.lib +3984 -0
  427. sage_wheels/share/singular/LIB/reesclos.lib +465 -0
  428. sage_wheels/share/singular/LIB/resbinomial.lib +2802 -0
  429. sage_wheels/share/singular/LIB/resgraph.lib +789 -0
  430. sage_wheels/share/singular/LIB/resjung.lib +820 -0
  431. sage_wheels/share/singular/LIB/resolve.lib +5110 -0
  432. sage_wheels/share/singular/LIB/resources.lib +170 -0
  433. sage_wheels/share/singular/LIB/reszeta.lib +5473 -0
  434. sage_wheels/share/singular/LIB/ring.lib +1328 -0
  435. sage_wheels/share/singular/LIB/ringgb.lib +343 -0
  436. sage_wheels/share/singular/LIB/rinvar.lib +1153 -0
  437. sage_wheels/share/singular/LIB/rootisolation.lib +1481 -0
  438. sage_wheels/share/singular/LIB/rootsmr.lib +709 -0
  439. sage_wheels/share/singular/LIB/rootsur.lib +886 -0
  440. sage_wheels/share/singular/LIB/rstandard.lib +607 -0
  441. sage_wheels/share/singular/LIB/rwalk.lib +336 -0
  442. sage_wheels/share/singular/LIB/sagbi.lib +1353 -0
  443. sage_wheels/share/singular/LIB/sagbiNormaliz.lib +1622 -0
  444. sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
  445. sage_wheels/share/singular/LIB/sagbigrob.lib +449 -0
  446. sage_wheels/share/singular/LIB/schreyer.lib +321 -0
  447. sage_wheels/share/singular/LIB/schubert.lib +2551 -0
  448. sage_wheels/share/singular/LIB/sets.lib +524 -0
  449. sage_wheels/share/singular/LIB/sheafcoh.lib +1663 -0
  450. sage_wheels/share/singular/LIB/signcond.lib +437 -0
  451. sage_wheels/share/singular/LIB/sing.lib +1094 -0
  452. sage_wheels/share/singular/LIB/sing4ti2.lib +419 -0
  453. sage_wheels/share/singular/LIB/solve.lib +2243 -0
  454. sage_wheels/share/singular/LIB/spcurve.lib +1077 -0
  455. sage_wheels/share/singular/LIB/spectrum.lib +62 -0
  456. sage_wheels/share/singular/LIB/sresext.lib +757 -0
  457. sage_wheels/share/singular/LIB/ssi.lib +143 -0
  458. sage_wheels/share/singular/LIB/standard.lib +2769 -0
  459. sage_wheels/share/singular/LIB/stanleyreisner.lib +473 -0
  460. sage_wheels/share/singular/LIB/stdmodule.lib +547 -0
  461. sage_wheels/share/singular/LIB/stratify.lib +1070 -0
  462. sage_wheels/share/singular/LIB/surf.lib +506 -0
  463. sage_wheels/share/singular/LIB/surf_jupyter.lib +223 -0
  464. sage_wheels/share/singular/LIB/surfacesignature.lib +522 -0
  465. sage_wheels/share/singular/LIB/surfex.lib +1462 -0
  466. sage_wheels/share/singular/LIB/swalk.lib +877 -0
  467. sage_wheels/share/singular/LIB/symodstd.lib +1570 -0
  468. sage_wheels/share/singular/LIB/systhreads.lib +74 -0
  469. sage_wheels/share/singular/LIB/tasks.lib +1324 -0
  470. sage_wheels/share/singular/LIB/tateProdCplxNegGrad.lib +2412 -0
  471. sage_wheels/share/singular/LIB/teachstd.lib +858 -0
  472. sage_wheels/share/singular/LIB/template.lib +116 -0
  473. sage_wheels/share/singular/LIB/toric.lib +1119 -0
  474. sage_wheels/share/singular/LIB/transformation.lib +116 -0
  475. sage_wheels/share/singular/LIB/triang.lib +1197 -0
  476. sage_wheels/share/singular/LIB/tropical.lib +8741 -0
  477. sage_wheels/share/singular/LIB/tropicalEllipticCovers.lib +2922 -0
  478. sage_wheels/share/singular/LIB/tropicalNewton.lib +1128 -0
  479. sage_wheels/share/singular/LIB/tst.lib +1108 -0
  480. sage_wheels/share/singular/LIB/weierstr.lib +241 -0
  481. sage_wheels/share/singular/LIB/zeroset.lib +1478 -0
  482. sage_wheels/share/singular/emacs/.emacs-general +184 -0
  483. sage_wheels/share/singular/emacs/.emacs-singular +234 -0
  484. sage_wheels/share/singular/emacs/COPYING +44 -0
  485. sage_wheels/share/singular/emacs/cmd-cmpl.el +241 -0
  486. sage_wheels/share/singular/emacs/ex-cmpl.el +1681 -0
  487. sage_wheels/share/singular/emacs/hlp-cmpl.el +4318 -0
  488. sage_wheels/share/singular/emacs/lib-cmpl.el +179 -0
  489. sage_wheels/share/singular/emacs/singular.el +4273 -0
  490. sage_wheels/share/singular/emacs/singular.xpm +39 -0
  491. sage_wheels/share/singular/singular.idx +5002 -0
@@ -0,0 +1,1193 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ version="version algebra.lib 4.3.1.3 Feb_2023 "; // $Id: 7ea79005ce2b10155686c0b297f38322736dac1e $
3
+ category="Commutative Algebra";
4
+ info="
5
+ LIBRARY: algebra.lib Compute with Algbras and Algebra Maps
6
+ AUTHORS: Gert-Martin Greuel, greuel@mathematik.uni-kl.de,
7
+ @* Agnes Eileen Heydtmann, agnes@math.uni-sb.de,
8
+ @* Gerhard Pfister, pfister@mathematik.uni-kl.de
9
+
10
+ PROCEDURES:
11
+ algebra_containment(); query of algebra containment
12
+ module_containment(); query of module containment over a subalgebra
13
+ inSubring(p,I); test whether polynomial p is in subring generated by I
14
+ algDependent(I); computes algebraic relations between generators of I
15
+ alg_kernel(phi); computes the kernel of the ringmap phi
16
+ is_injective(phi); test for injectivity of ringmap phi
17
+ is_surjective(phi); test for surjectivity of ringmap phi
18
+ is_bijective(phi); test for bijectivity of ring map phi
19
+ noetherNormal(id); noether normalization of ideal id
20
+ mapIsFinite(R,phi,I); query for finiteness of map phi:R --> basering/I
21
+
22
+ finitenessTest(i,z); find variables which occur as pure power in lead(i)
23
+ nonZeroEntry(id); list describing non-zero entries of an identifier
24
+ ";
25
+
26
+ LIB "inout.lib";
27
+ LIB "elim.lib";
28
+ LIB "ring.lib";
29
+ LIB "matrix.lib";
30
+
31
+ ///////////////////////////////////////////////////////////////////////////////
32
+
33
+ proc algebra_containment (poly p, ideal A, list #)
34
+ "USAGE: algebra_containment(p,A[,k]); p poly, A ideal, k integer.
35
+ @* A = A[1],...,A[m] generators of subalgebra of the basering
36
+ RETURN:
37
+ @format
38
+ - k=0 (or if k is not given) an integer:
39
+ 1 : if p is contained in the subalgebra K[A[1],...,A[m]]
40
+ 0 : if p is not contained in K[A[1],...,A[m]]
41
+ - k=1 : a list, say l, of size 2, l[1] integer, l[2] ring, satisfying
42
+ l[1]=1 if p is in the subalgebra K[A[1],...,A[m]] and then the ring
43
+ l[2]: ring, contains poly check = h(y(1),...,y(m)) if p=h(A[1],...,A[m])
44
+ l[1]=0 if p is not in the subalgebra K[A[1],...,A[m]] and then
45
+ l[2] contains the poly check = h(x,y(1),...,y(m)) if p satisfies
46
+ the nonlinear relation p = h(x,A[1],...,A[m]) where
47
+ x = x(1),...,x(n) denote the variables of the basering
48
+ @end format
49
+ DISPLAY: if k=0 and printlevel >= voice+1 (default) display the polynomial check
50
+ NOTE: The proc inSubring uses a different algorithm which is sometimes
51
+ faster.
52
+ THEORY: The ideal of algebraic relations of the algebra generators A[1],...,
53
+ A[m] is computed introducing new variables y(i) and the product
54
+ order with x(i) >> y(i).
55
+ p reduces to a polynomial only in the y(i) <=> p is contained in the
56
+ subring generated by the polynomials A[1],...,A[m].
57
+ EXAMPLE: example algebra_containment; shows an example
58
+ "
59
+ { int DEGB = degBound;
60
+ degBound = 0;
61
+ if (size(#)==0)
62
+ { #[1] = 0;
63
+ }
64
+ def br=basering;
65
+ int n = nvars(br);
66
+ int m = ncols(A);
67
+ int i;
68
+ //-----------------
69
+ // neu CL 10/05:
70
+ int is_qring;
71
+ if (size(ideal(br))>0)
72
+ {
73
+ is_qring=1;
74
+ ideal IdQ = ideal(br);
75
+ }
76
+ //-----------------
77
+ // ---------- create new ring with extra variables --------------------
78
+ list l3;
79
+ for (int zz = 1; zz <= n; zz++)
80
+ {
81
+ l3[size(l3)+1] = "x("+string(zz)+")";
82
+ }
83
+ for (int yy = 1; yy <= m; yy++)
84
+ {
85
+ l3[size(l3)+1] = "y("+string(yy)+")";
86
+ }
87
+ list RL=ringlist(br);
88
+ RL[2]=l3; //vars
89
+ RL[3]=list(list("dp",1:n),list("dp",1:m)); //ord
90
+ RL[4]=ideal(0); // reset qring
91
+ ring R=ring(RL);
92
+ ideal A=fetch(br,A);
93
+ poly check=fetch(br,p);
94
+ for (i=1;i<=m;i=i+1)
95
+ {
96
+ A[i]=A[i]-y(i);
97
+ }
98
+ //-----------------
99
+ // neu CL 10/05:
100
+ if (is_qring) { A = A,fetch(br,IdQ); }
101
+ //-----------------
102
+ A=std(A);
103
+ check=reduce(check,A);
104
+ /*alternatively we could use reduce(check,A,1) which is a little faster
105
+ but result is bigger since it is not tail-reduced
106
+ */
107
+ //--- checking whether all variables from old ring have disappeared ------
108
+ // if so, then the sum of the first n leading exponents is 0, hence i=1
109
+ // use i also to control the display
110
+ i = (sum(leadexp(check),1..n)==0);
111
+ degBound = DEGB;
112
+ if( #[1] == 0 )
113
+ { dbprint(printlevel-voice+3,"// "+string(check));
114
+ return(i);
115
+ }
116
+ else
117
+ { list l = i,R;
118
+ kill A;
119
+ export check;
120
+ dbprint(printlevel-voice+3,"
121
+ // 'algebra_containment' created a ring as 2nd element of the list.
122
+ // The ring contains the polynomial check which defines the algebraic relation.
123
+ // To access to the ring and see check you must give the ring a name,
124
+ // e.g.:
125
+ def S = l[2]; setring S; check;
126
+ ");
127
+ setring br;
128
+ return(l);
129
+ }
130
+ }
131
+ example
132
+ { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2;
133
+ int p = printlevel; printlevel = 1;
134
+ ring R = 0,(x,y,z),dp;
135
+ ideal A=x2+y2,z2,x4+y4,1,x2z-1y2z,xyz,x3y-1xy3;
136
+ poly p1=z;
137
+ poly p2=
138
+ x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4;
139
+ algebra_containment(p1,A);
140
+ algebra_containment(p2,A);
141
+ list L = algebra_containment(p2,A,1);
142
+ L[1];
143
+ def S = L[2]; setring S;
144
+ check;
145
+ printlevel = p;
146
+ }
147
+ ///////////////////////////////////////////////////////////////////////////////
148
+
149
+ proc module_containment(poly p, ideal P, ideal S, list #)
150
+ "USAGE: module_containment(p,P,M[,k]); p poly, P ideal, M ideal, k int
151
+ @* P = P[1],...,P[n] generators of a subalgebra of the basering,
152
+ @* M = M[1],...,M[m] generators of a module over the subalgebra K[P]
153
+ ASSUME: ncols(P) = nvars(basering), the P[i] are algebraically independent
154
+ RETURN:
155
+ @format
156
+ - k=0 (or if k is not given), an integer:
157
+ 1 : if p is contained in the module <M[1],...,M[m]> over K[P]
158
+ 0 : if p is not contained in <M[1],...,M[m]>
159
+ - k=1, a list, say l, of size 2, l[1] integer, l[2] ring:
160
+ l[1]=1 : if p is in <M[1],...,M[m]> and then the ring l[2] contains
161
+ the polynomial check = h(y(1),...,y(m),z(1),...,z(n)) if
162
+ p = h(M[1],...,M[m],P[1],...,P[n])
163
+ l[1]=0 : if p is in not in <M[1],...,M[m]>, then l[2] contains the
164
+ poly check = h(x,y(1),...,y(m),z(1),...,z(n)) if p satisfies
165
+ the nonlinear relation p = h(x,M[1],...,M[m],P[1],...,P[n]) where
166
+ x = x(1),...,x(n) denote the variables of the basering
167
+ @end format
168
+ DISPLAY: the polynomial h(y(1),...,y(m),z(1),...,z(n)) if k=0, resp.
169
+ a comment how to access the relation check if k=1, provided
170
+ printlevel >= voice+1 (default).
171
+ THEORY: The ideal of algebraic relations of all the generators p1,...,pn,
172
+ s1,...,st given by P and S is computed introducing new variables y(j),
173
+ z(i) and the product order: x^a*y^b*z^c > x^d*y^e*z^f if x^a > x^d
174
+ with respect to the lp ordering or else if z^c > z^f with respect to
175
+ the dp ordering or else if y^b > y^e with respect to the lp ordering
176
+ again. p reduces to a polynomial only in the y(j) and z(i), linear in
177
+ the z(i) <=> p is contained in the module.
178
+ EXAMPLE: example module_containment; shows an example
179
+ "
180
+ { def br=basering;
181
+ int DEGB = degBound;
182
+ degBound=0;
183
+ if (size(#)==0)
184
+ { #[1] = 0;
185
+ }
186
+ int n=nvars(br);
187
+ if ( ncols(P)==n )
188
+ { int m=ncols(S);
189
+ // ---------- create new ring with extra variables --------------------
190
+ list l4;
191
+ for (int xx = 1; xx <= n; xx++)
192
+ {
193
+ l4[size(l4)+1] = "x("+string(xx)+")";
194
+ }
195
+ for (int yy = 1; yy <= m; yy++)
196
+ {
197
+ l4[size(l4)+1] = "y("+string(yy)+")";
198
+ }
199
+ for (int zz = 1; zz <= n; zz++)
200
+ {
201
+ l4[size(l4)+1] = "z("+string(zz)+")";
202
+ }
203
+ ring R = create_ring(ring_list(br)[1], l4, "(lp("+string(n)+"),dp("+string(m)+"),lp("+string(n)+"))");
204
+ ideal vars = x(1..n);
205
+ map emb = br,vars;
206
+ ideal P = emb(P);
207
+ ideal S = emb(S);
208
+ poly check = emb(p);
209
+ ideal I;
210
+ for (int i=1;i<=m;i=i+1)
211
+ { I[i]=S[i]-y(i);
212
+ }
213
+ for (i=1;i<=n;i=i+1)
214
+ { I[m+i]=P[i]-z(i);
215
+ }
216
+ I=std(I);
217
+ check = reduce(check,I);
218
+ //--- checking whether all variables from old ring have disappeared ------
219
+ // if so, then the sum of the first n leading exponents is 0
220
+ i = (sum(leadexp(check),1..n)==0);
221
+ if( #[1] == 0 )
222
+ { dbprint(i*(printlevel-voice+3),"// "+string(check));
223
+ setring br;
224
+ return(i);
225
+ }
226
+ else
227
+ { list l = i,R;
228
+ kill I,vars,emb,P,S;
229
+ export check;
230
+ dbprint(printlevel-voice+3,"
231
+ // 'module_containment' created a ring as 2nd element of the list. The
232
+ // ring contains the polynomial check which defines the algebraic relation
233
+ // for p. To access to the ring and see check you must give the ring
234
+ // a name, e.g.:
235
+ def S = l[2]; setring S; check;
236
+ ");
237
+ setring br;
238
+ return(l);
239
+ }
240
+ }
241
+ else
242
+ {
243
+ setring br;
244
+ "ERROR: the first ideal must have nvars(basering) entries";
245
+ return();
246
+ }
247
+ }
248
+ example
249
+ { "EXAMPLE: Sturmfels: Algorithms in Invariant Theory 2.3.7:"; echo=2;
250
+ int p = printlevel; printlevel = 1;
251
+ ring R=0,(x,y,z),dp;
252
+ ideal P = x2+y2,z2,x4+y4; //algebra generators
253
+ ideal M = 1,x2z-1y2z,xyz,x3y-1xy3; //module generators
254
+ poly p1=
255
+ x10z3-x8y2z3+2x6y4z3-2x4y6z3+x2y8z3-y10z3+x6z4+3x4y2z4+3x2y4z4+y6z4;
256
+ module_containment(p1,P,M);
257
+ poly p2=z;
258
+ list l = module_containment(p2,P,M,1);
259
+ l[1];
260
+ def S = l[2]; setring S; check;
261
+ printlevel=p;
262
+ }
263
+ ///////////////////////////////////////////////////////////////////////////////
264
+
265
+ proc inSubring(poly p, ideal I)
266
+ "USAGE: inSubring(p,i); p poly, i ideal
267
+ RETURN:
268
+ @format
269
+ a list l of size 2, l[1] integer, l[2] string
270
+ l[1]=1 if and only if p is in the subring generated by i=i[1],...,i[k],
271
+ and then l[2] = y(0)-h(y(1),...,y(k)) if p = h(i[1],...,i[k])
272
+ l[1]=0 if and only if p is in not the subring generated by i,
273
+ and then l[2] = h(y(0),y(1),...,y(k)) where p satisfies the
274
+ nonlinear relation h(p,i[1],...,i[k])=0.
275
+ @end format
276
+ NOTE: the proc algebra_containment tests the same using a different
277
+ algorithm, which is often faster
278
+ if l[1] == 0 then l[2] may contain more than one relation h(y(0),y(1),...,y(k)),
279
+ separated by comma
280
+ EXAMPLE: example inSubring; shows an example
281
+ "
282
+ {int z=ncols(I);
283
+ int i;
284
+ def gnir=basering;
285
+ int n = nvars(gnir);
286
+ list l;
287
+ // neu CL 10/05:
288
+ int is_qring;
289
+ if (size(ideal(gnir))>0)
290
+ {
291
+ is_qring=1;
292
+ ideal IdQ = ideal(gnir);
293
+ }
294
+ // ---------- create new ring with extra variables --------------------
295
+ //the intersection of ideal nett=(p-y(0),I[1]-y(1),...)
296
+ //with the ring k[y(0),...,y(n)] is computed, the result is ker
297
+ list l5;
298
+ for (int xx = 1; xx <= n; xx++)
299
+ {
300
+ l5[size(l5)+1] = "x("+string(xx)+")";
301
+ }
302
+ for (int yy = 0; yy <= z; yy++)
303
+ {
304
+ l5[size(l5)+1] = "y("+string(yy)+")";
305
+ }
306
+ ring r1 = create_ring(ring_list(basering)[1], l5, "lp");
307
+ ideal va = x(1..n);
308
+ map emb = gnir,va;
309
+ ideal nett = emb(I);
310
+ for (i=1;i<=z;i++)
311
+ { nett[i]=nett[i]-y(i);
312
+ }
313
+ nett=emb(p)-y(0),nett;
314
+ // neu CL 10/05:
315
+ if (is_qring) { nett = nett,emb(IdQ); }
316
+ //-----------------
317
+ ideal ker=eliminate(nett,product(va));
318
+ ker=std(ker);
319
+ //---------- test whether y(0)-h(y(1),...,y(z)) is in ker --------------
320
+ l[1]=0;
321
+ l[2]="";
322
+ for (i=1;i<=size(ker);i++)
323
+ { if (deg(ker[i]/y(0))==0)
324
+ { string str=string(ker[i]);
325
+ setring gnir;
326
+ l[1]=1;
327
+ l[2]=str;
328
+ return(l);
329
+ }
330
+ if (deg(ker[i]/y(0))>0)
331
+ { if( l[2] != "" ){ l[2] = l[2] + ","; }
332
+ l[2] = l[2] + string(ker[i]);
333
+ }
334
+ }
335
+ setring gnir;
336
+ return(l);
337
+ }
338
+ example
339
+ { "EXAMPLE:"; echo = 2;
340
+ ring q=0,(x,y,z,u,v,w),dp;
341
+ poly p=xyzu2w-1yzu2w2+u4w2-1xu2vw+u2vw2+xyz-1yzw+2u2w-1xv+vw+2;
342
+ ideal I =x-w,u2w+1,yz-v;
343
+ inSubring(p,I);
344
+ }
345
+ //////////////////////////////////////////////////////////////////////////////
346
+
347
+ proc algDependent( ideal A, list # )
348
+ "USAGE: algDependent(f[,c]); f ideal (say, f = f1,...,fm), c integer
349
+ RETURN:
350
+ @format
351
+ a list l of size 2, l[1] integer, l[2] ring:
352
+ - l[1] = 1 if f1,...,fm are algebraic dependent, 0 if not
353
+ - l[2] is a ring with variables x(1),...,x(n),y(1),...,y(m) if the
354
+ basering has n variables. It contains the ideal 'ker', depending
355
+ only on the y(i) and generating the algebraic relations between the
356
+ f[i], i.e. substituting y(i) by fi yields 0. Of course, ker is
357
+ nothing but the kernel of the ring map
358
+ K[y(1),...,y(m)] ---> basering, y(i) --> fi.
359
+ @end format
360
+ NOTE: Three different algorithms are used depending on c = 1,2,3.
361
+ If c is not given or c=0, a heuristically best method is chosen.
362
+ The basering may be a quotient ring.
363
+ To access to the ring l[2] and see ker you must give the ring a name,
364
+ e.g. def S=l[2]; setring S; ker;
365
+ DISPLAY: The above comment is displayed if printlevel >= 0 (default).
366
+ EXAMPLE: example algDependent; shows an example
367
+ "
368
+ {
369
+ int bestoption = 3;
370
+ // bestoption is the default algorithm, it may be set to 1,2 or 3;
371
+ // it should be changed, if another algorithm turns out to be faster
372
+ // in general. Is perhaps dependent on the input (# vars, size ...)
373
+ int tt;
374
+ if( size(#) > 0 )
375
+ { if( typeof(#[1]) == "int" )
376
+ { tt = #[1];
377
+ }
378
+ }
379
+ if( size(#) == 0 or tt == 0 )
380
+ { tt = bestoption;
381
+ }
382
+ def br=basering;
383
+ int n = nvars(br);
384
+ ideal B = ideal(br);
385
+ int m = ncols(A);
386
+ int s = size(B);
387
+ int i,@xx,@yy;
388
+ // --------------------- 1st variant of algorithm ----------------------
389
+ // use internal preimage command (should be equivalent to 2nd variant)
390
+ if ( tt == 1 )
391
+ {
392
+ list l6;
393
+ for (@xx = 1; @xx <= m; @xx++)
394
+ {
395
+ l6[size(l6)+1] = "y("+string(@xx)+")";
396
+ }
397
+ ring R1 = create_ring(ring_list(br)[1], l6, "dp");
398
+ setring br;
399
+ map phi = R1,A;
400
+ setring R1;
401
+ ideal ker = preimage(br,phi,B);
402
+ }
403
+ // ---------- create new ring with extra variables --------------------
404
+ list l7;
405
+ for (@xx = n; @xx >= 1; @xx--)
406
+ {
407
+ l7[@xx] = "x("+string(@xx)+")";
408
+ }
409
+ for (@yy = m; @yy >= 1; @yy--)
410
+ {
411
+ l7[n+@yy] = "y("+string(@yy)+")";
412
+ }
413
+ ring R2 = create_ring(ring_list(br)[1], l7, "dp");
414
+ if( tt == 1 )
415
+ {
416
+ ideal ker = imap(R1,ker);
417
+ }
418
+ else
419
+ {
420
+ ideal vars = x(1..n);
421
+ map emb = br,vars;
422
+ ideal A = emb(A);
423
+ for (i=1; i<=m; i=i+1)
424
+ { A[i] = A[i]-y(i);
425
+ }
426
+ // --------------------- 2nd variant of algorithm ----------------------
427
+ // use internal eliminate for eliminating m variables x(i) from
428
+ // ideal A[i] - y(i) (uses extra eliminating 'first row', a-order)
429
+ if ( s == 0 and tt == 2 )
430
+ { ideal ker = eliminate(A,product(vars));
431
+ }
432
+ else
433
+ // eliminate does not work in qrings
434
+ // --------------------- 3rd variant of algorithm ----------------------
435
+ // eliminate m variables x(i) from ideal A[i] - y(i) by choosing product
436
+ // order
437
+ {
438
+ list l8;
439
+ for (@xx = n; @xx >=1; @xx--)
440
+ {
441
+ l8[@xx] = "x("+string(@xx)+")";
442
+ }
443
+ for (@yy = m; @yy >= 1; @yy--)
444
+ {
445
+ l8[n+@yy] = "y("+string(@yy)+")";
446
+ }
447
+ setring(br);
448
+ ring R3 = create_ring(ring_list(br)[1], l8, "(dp("+string(n)+"),dp("+string(m)+"))");
449
+ if ( s != 0 )
450
+ { ideal vars = x(1..n);
451
+ map emb = br,vars;
452
+ ideal B = emb(B);
453
+ attrib(B,"isSB",1);
454
+ qring Q = B;
455
+ }
456
+ ideal A = imap(R2,A);
457
+ A = std(A);
458
+ ideal ker = nselect(A,1..n);
459
+ setring R2;
460
+ if ( defined(Q)==voice )
461
+ { ideal ker = imap(Q,ker);
462
+ }
463
+ else
464
+ { ideal ker = imap(R3,ker);
465
+ }
466
+ kill A,emb,vars;
467
+ }
468
+ }
469
+ // --------------------------- return ----------------------------------
470
+ s = size(ker);
471
+ list L = (s!=0), R2;
472
+ export(ker);
473
+ dbprint(printlevel-voice+3,"
474
+ // The 2nd element of the list l is a ring with variables x(1),...,x(n),
475
+ // and y(1),...,y(m) if the basering has n variables and if the ideal
476
+ // is f[1],...,f[m]. The ring contains the ideal ker which depends only
477
+ // on the y(i) and generates the relations between the f[i].
478
+ // I.e. substituting y(i) by f[i] yields 0.
479
+ // To access to the ring and see ker you must give the ring a name,
480
+ // e.g.:
481
+ def S = l[2]; setring S; ker;
482
+ ");
483
+ setring br;
484
+ return (L);
485
+ }
486
+ example
487
+ { "EXAMPLE:"; echo = 2;
488
+ int p = printlevel; printlevel = 1;
489
+ ring R = 0,(x,y,z,u,v,w),dp;
490
+ ideal I = xyzu2w-1yzu2w2+u4w2-1xu2vw+u2vw2+xyz-1yzw+2u2w-1xv+vw+2,
491
+ x-w, u2w+1, yz-v;
492
+ list l = algDependent(I);
493
+ l[1];
494
+ def S = l[2]; setring S;
495
+ ker;
496
+ printlevel = p;
497
+ }
498
+ //////////////////////////////////////////////////////////////////////////////
499
+ proc alg_kernel( map phi, def pr, list #)
500
+ "USAGE: alg_kernel(phi,pr[,s,c]); phi map to basering, pr preimage ring,
501
+ s string (name of kernel in pr), c integer.
502
+ RETURN: a string, the kernel of phi as string.
503
+ If, moreover, a string s is given, the algorithm creates, in the
504
+ preimage ring pr the kernel of phi with name s.
505
+ Three different algorithms are used depending on c = 1,2,3.
506
+ If c is not given or c=0, a heuristically best method is chosen.
507
+ (algorithm 1 uses the preimage command)
508
+ NOTE: Since the kernel of phi lives in pr, it cannot be returned to the
509
+ basering. If s is given, the user has access to it in pr via s.
510
+ The basering may be a quotient ring.
511
+ EXAMPLE: example alg_kernel; shows an example
512
+ "
513
+ { int tt;
514
+ def BAS = basering;
515
+ if( size(#) >0 )
516
+ { if( typeof(#[1]) == "int")
517
+ { tt = #[1];
518
+ }
519
+ if( typeof(#[1]) == "string")
520
+ { string nker=#[1];
521
+ }
522
+ if( size(#)>1 )
523
+ { if( typeof(#[2]) == "string")
524
+ { string nker=#[2];
525
+ }
526
+ if( typeof(#[2]) == "int")
527
+ { tt = #[2];
528
+ }
529
+ }
530
+ }
531
+ int n = nvars(basering);
532
+ ideal A = ideal(phi);
533
+ //def pr = preimage(phi);
534
+ //folgendes Auffuellen oder Stutzen ist ev nicht mehr noetig
535
+ //falls map das richtig macht
536
+ int m = nvars(pr);
537
+ ideal j;
538
+ j[m]=0;
539
+ A=A,j;
540
+ A=A[1..m];
541
+ list L = algDependent(A,tt);
542
+ // algDependent is called with "bestoption" if tt = 0
543
+ def S = L[2];
544
+ list l9;
545
+ for (int xx = 1; xx <= n; xx++)
546
+ {
547
+ l9[size(l9)+1] = "@("+string(xx)+")";
548
+ }
549
+ ring R = create_ring(ring_list(basering)[1], "("+string(l9)+","+varstr(pr)+")", "dp");
550
+ ideal ker = fetch(S,ker); //in order to have variable names correct
551
+ string sker = string(ker);
552
+ if (defined(nker) == voice)
553
+ { setring pr;
554
+ execute("ideal "+nker+"="+sker+";");
555
+ execute("export("+nker+");");
556
+ }
557
+ setring BAS;
558
+ return(sker);
559
+ }
560
+ example
561
+ { "EXAMPLE:"; echo = 2;
562
+ ring r = 0,(a,b,c),ds;
563
+ ring s = 0,(x,y,z,u,v,w),dp;
564
+ ideal I = x-w,u2w+1,yz-v;
565
+ map phi = r,I; // a map from r to s:
566
+ alg_kernel(phi,r); // a,b,c ---> x-w,u2w+1,yz-v
567
+
568
+ ring S = 0,(a,b,c),ds;
569
+ ring R = 0,(x,y,z),dp;
570
+ qring Q = std(x-y);
571
+ ideal i = x, y, x2-y3;
572
+ map phi = S,i; // a map to a quotient ring
573
+ alg_kernel(phi,S,"ker",3); // uses algorithm 3
574
+ setring S; // you have access to kernel in preimage
575
+ ker;
576
+ }
577
+ //////////////////////////////////////////////////////////////////////////////
578
+
579
+ proc is_injective( map phi,def pr,list #)
580
+ "USAGE: is_injective(phi,pr[,c,s]); phi map, pr preimage ring, c int, s string
581
+ RETURN:
582
+ @format
583
+ - 1 (type int) if phi is injective, 0 if not (if s is not given).
584
+ - If s is given, return a list l of size 2, l[1] int, l[2] ring:
585
+ l[1] is 1 if phi is injective, 0 if not
586
+ l[2] is a ring with variables x(1),...,x(n),y(1),...,y(m) if the
587
+ basering has n variables and the map m components, it contains the
588
+ ideal 'ker', depending only on the y(i), the kernel of the given map
589
+ @end format
590
+ NOTE: Three different algorithms are used depending on c = 1,2,3.
591
+ If c is not given or c=0, a heuristically best method is chosen.
592
+ The basering may be a quotient ring. However, if the preimage ring is
593
+ a quotient ring, say pr = P/I, consider phi as a map from P and then
594
+ the algorithm returns 1 if the kernel of phi is 0 mod I.
595
+ To access to the ring l[2] and see ker you must give the ring a name,
596
+ e.g. def S=l[2]; setring S; ker;
597
+ DISPLAY: The above comment is displayed if printlevel >= 0 (default).
598
+ EXAMPLE: example is_injective; shows an example
599
+ "
600
+ { def bsr = basering;
601
+ int tt;
602
+ if( size(#) >0 )
603
+ { if( typeof(#[1]) == "int")
604
+ { tt = #[1];
605
+ }
606
+ if( typeof(#[1]) == "string")
607
+ { string pau=#[1];
608
+ }
609
+ if( size(#)>1 )
610
+ { if( typeof(#[2]) == "string")
611
+ { string pau=#[2];
612
+ }
613
+ if( typeof(#[2]) == "int")
614
+ { tt = #[2];
615
+ }
616
+ }
617
+ }
618
+ int n = nvars(basering);
619
+ ideal A = ideal(phi);
620
+ //def pr = preimage(phi);
621
+ //folgendes Auffuellen oder Stutzen ist ev nicht mehr noetig
622
+ //falls map das richtig macht
623
+ int m = nvars(pr);
624
+ ideal j;
625
+ j[m]=0;
626
+ A=A,j;
627
+ A=A[1..m];
628
+ list L = algDependent(A,tt);
629
+ L[1] = L[1]==0;
630
+ // the preimage ring may be a quotient ring, we still have to check whether
631
+ // the kernel is 0 mod ideal of the quotient ring
632
+ setring pr;
633
+ if ( size(ideal(pr)) != 0 )
634
+ { def S = L[2];
635
+ ideal proj;
636
+ proj [n+1..n+m] = maxideal(1);
637
+ map psi = S,proj;
638
+ L[1] = size(NF(psi(ker),std(0))) == 0;
639
+ }
640
+ setring bsr;
641
+ if ( defined(pau) != voice )
642
+ { return (L[1]);
643
+ }
644
+ else
645
+ {
646
+ dbprint(printlevel-voice+3,"
647
+ // The 2nd element of the list is a ring with variables x(1),...,x(n),
648
+ // y(1),...,y(m) if the basering has n variables and the map is
649
+ // F[1],...,F[m].
650
+ // It contains the ideal ker, the kernel of the given map y(i) --> F[i].
651
+ // To access to the ring and see ker you must give the ring a name,
652
+ // e.g.:
653
+ def S = l[2]; setring S; ker;
654
+ ");
655
+ return(L);
656
+ }
657
+ }
658
+ example
659
+ { "EXAMPLE:"; echo = 2;
660
+ int p = printlevel;
661
+ ring r = 0,(a,b,c),ds;
662
+ ring s = 0,(x,y,z,u,v,w),dp;
663
+ ideal I = x-w,u2w+1,yz-v;
664
+ map phi = r,I; // a map from r to s:
665
+ is_injective(phi,r); // a,b,c ---> x-w,u2w+1,yz-v
666
+ ring R = 0,(x,y,z),dp;
667
+ ideal i = x, y, x2-y3;
668
+ map phi = R,i; // a map from R to itself, z --> x2-y3
669
+ list l = is_injective(phi,R,"");
670
+ l[1];
671
+ def S = l[2]; setring S;
672
+ ker;
673
+ }
674
+ ///////////////////////////////////////////////////////////////////////////////
675
+
676
+ proc is_surjective( map phi )
677
+ "USAGE: is_surjective(phi); phi map to basering, or ideal defining it
678
+ RETURN: an integer, 1 if phi is surjective, 0 if not
679
+ NOTE: The algorithm returns 1 if and only if all the variables of the basering are
680
+ contained in the polynomial subalgebra generated by the polynomials
681
+ defining phi. Hence, it tests surjectivity in the case of a global ordering.
682
+ If the basering has local or mixed ordering or if the preimage ring is a
683
+ quotient ring (in which case the map may not be well defined) then the return
684
+ value 1 needs to be interpreted with care.
685
+ EXAMPLE: example is_surjective; shows an example
686
+ "
687
+ {
688
+ def br=basering;
689
+ ideal B = ideal(br);
690
+ int s = size(B);
691
+ int n = nvars(br);
692
+ ideal A = ideal(phi);
693
+ int m = ncols(A);
694
+ int ii,t=1,1;
695
+ // ------------ create new ring with extra variables ---------------------
696
+ list l10;
697
+ for (int yy = 1; yy <= n; yy++)
698
+ {
699
+ l10[size(l10)+1] = "x("+string(yy)+")";
700
+ }
701
+ for (int zz = 1; zz <= m; zz++)
702
+ {
703
+ l10[size(l10)+1] = "y("+string(zz)+")";
704
+ }
705
+ ring R = create_ring(ring_list(br)[1], l10, "(dp("+string(n)+"),dp("+string(m)+"))");
706
+
707
+ ideal vars = x(1..n);
708
+ map emb = br,vars;
709
+ if ( s != 0 )
710
+ { ideal B = emb(B);
711
+ attrib(B,"isSB",1);
712
+ qring Q = B;
713
+ ideal vars = x(1..n);
714
+ map emb = br,vars;
715
+ }
716
+ ideal A = emb(A);
717
+ for ( ii=1; ii<=m; ii++ )
718
+ { A[ii] = A [ii]-y(ii);
719
+ }
720
+ A=std(A);
721
+ // ------------- check whether the x(i) are in the image -----------------
722
+ poly check;
723
+ for (ii=1; ii<=n; ii++ )
724
+ { check=reduce(x(ii),A,1);
725
+ // --- checking whether all variables from old ring have disappeared -----
726
+ // if so, then the sum of the first n leading exponents is 0
727
+ if( sum(leadexp(check),1..n)!=0 )
728
+ { t=0;
729
+ break;
730
+ }
731
+ }
732
+ setring br;
733
+ return(t);
734
+ }
735
+ example
736
+ { "EXAMPLE:"; echo = 2;
737
+ ring R = 0,(x,y,z),dp;
738
+ ideal i = x, y, x2-y3;
739
+ map phi = R,i; // a map from R to itself, z->x2-y3
740
+ is_surjective(phi);
741
+ qring Q = std(ideal(z-x37));
742
+ map psi = R, x,y,x2-y3; // the same map to the quotient ring
743
+ is_surjective(psi);
744
+
745
+ ring S = 0,(a,b,c),dp;
746
+ map psi = R,ideal(a,a+b,c-a2+b3); // a map from R to S,
747
+ is_surjective(psi); // x->a, y->a+b, z->c-a2+b3
748
+ }
749
+
750
+ ///////////////////////////////////////////////////////////////////////////////
751
+
752
+ proc is_bijective ( map phi,def pr )
753
+ "USAGE: is_bijective(phi,pr); phi map to basering, pr preimage ring
754
+ RETURN: an integer, 1 if phi is bijective, 0 if not
755
+ NOTE: The algorithm checks first injectivity and then surjectivity.
756
+ To interpret this for local/mixed orderings, or for quotient rings
757
+ type help is_surjective; and help is_injective;
758
+ DISPLAY: A comment if printlevel >= voice-1 (default)
759
+ EXAMPLE: example is_bijective; shows an example
760
+ "
761
+ {
762
+ def br = basering;
763
+ int n = nvars(br);
764
+ ideal B = ideal(br);
765
+ int s = size(B);
766
+ ideal A = ideal(phi);
767
+ //folgendes Auffuellen oder Stutzen ist ev nicht mehr noetig
768
+ //falls map das richtig macht
769
+ int m = nvars(pr);
770
+ ideal j;
771
+ j[m]=0;
772
+ A=A,j;
773
+ A=A[1..m];
774
+ int ii,t = 1,1;
775
+ // ------------ create new ring with extra variables ---------------------
776
+ list l11;
777
+ for (int yy = 1; yy <= n; yy++)
778
+ {
779
+ l11[size(l11)+1] = "x("+string(yy)+")";
780
+ }
781
+ for (int zz = 1; zz <= m; zz++)
782
+ {
783
+ l11[size(l11)+1] = "y("+string(zz)+")";
784
+ }
785
+ ring R = create_ring(ring_list(br)[1], l11, "(dp("+string(n)+"),dp("+string(m)+"))");
786
+ ideal vars = x(1..n);
787
+ map emb = br,vars;
788
+ if ( s != 0 )
789
+ { ideal B = emb(B);
790
+ attrib(B,"isSB",1);
791
+ qring Q = B;
792
+ ideal vars = x(1..n);
793
+ map emb = br,vars;
794
+ }
795
+ ideal A = emb(A);
796
+ for ( ii=1; ii<=m; ii++ )
797
+ { A[ii] = A[ii]-y(ii);
798
+ }
799
+ A=std(A);
800
+ def bsr = basering;
801
+ // ------- checking whether phi is injective by computing the kernel -------
802
+ ideal ker = nselect(A,1..n);
803
+ t = size(ker);
804
+ setring pr;
805
+ if ( size(ideal(pr)) != 0 )
806
+ {
807
+ ideal proj;
808
+ proj[n+1..n+m] = maxideal(1);
809
+ map psi = bsr,proj;
810
+ t = size(NF(psi(ker),std(0)));
811
+ }
812
+ if ( t != 0 )
813
+ { dbprint(printlevel-voice+3,"// map not injective" );
814
+ setring br;
815
+ return(0);
816
+ }
817
+ else
818
+ // -------------- checking whether phi is surjective ----------------------
819
+ { t = 1;
820
+ setring bsr;
821
+ poly check;
822
+ for (ii=1; ii<=n; ii++ )
823
+ { check=reduce(x(ii),A,1);
824
+ // --- checking whether all variables from old ring have disappeared -----
825
+ // if so, then the sum of the first n leading exponents is 0
826
+ if( sum(leadexp(check),1..n)!=0 )
827
+ { t=0;
828
+ break;
829
+ }
830
+ }
831
+ if ( t == 0 )
832
+ { dbprint(printlevel-voice+3,"// map injective, but not surjective" );
833
+ }
834
+ setring br;
835
+ return(t);
836
+ }
837
+ }
838
+ example
839
+ { "EXAMPLE:"; echo = 2;
840
+ int p = printlevel; printlevel = 1;
841
+ ring R = 0,(x,y,z),dp;
842
+ ideal i = x, y, x2-y3;
843
+ map phi = R,i; // a map from R to itself, z->x2-y3
844
+ is_bijective(phi,R);
845
+ qring Q = std(z-x2+y3);
846
+ is_bijective(ideal(x,y,x2-y3),Q);
847
+
848
+ ring S = 0,(a,b,c,d),dp;
849
+ map psi = R,ideal(a,a+b,c-a2+b3,0); // a map from R to S,
850
+ is_bijective(psi,R); // x->a, y->a+b, z->c-a2+b3
851
+ qring T = std(d,c-a2+b3);
852
+ map chi = Q,a,b,a2-b3; // amap between two quotient rings
853
+ is_bijective(chi,Q);
854
+
855
+ printlevel = p;
856
+ }
857
+ ///////////////////////////////////////////////////////////////////////////////
858
+
859
+ proc noetherNormal(ideal i, list #)
860
+ "USAGE: noetherNormal(id[,p]); id ideal, p integer
861
+ RETURN:
862
+ @format
863
+ a list l of two ideals, say I,J:
864
+ - I defines a map (coordinate change in the basering), such that:
865
+ - J is generated by a subset of the variables with size(J) = dim(id)
866
+ if we define map phi=basering,I;
867
+ then k[var(1),...,var(n)]/phi(id) is finite over k[J].
868
+ If p is given, 0<=p<=100, a sparse coordinate change with p percent
869
+ of the matrix entries being 0 (default: p=0 i.e. dense)
870
+ @end format
871
+ NOTE: Designed for characteristic 0.It works also in char k > 0 if it
872
+ terminates,but may result in an infinite loop in small characteristic.
873
+ EXAMPLE: example noetherNormal; shows an example
874
+ "
875
+ {
876
+ i=simplify(i,2);
877
+ if (size(i)== 0)
878
+ {
879
+ list l = maxideal(1),maxideal(1);
880
+ return( l );
881
+ }
882
+ int p;
883
+ if( size(#) != 0 )
884
+ {
885
+ p = #[1];
886
+ }
887
+ def r = basering;
888
+ int n = nvars(r);
889
+ list good;
890
+ // ------------------------ change of ordering ---------------------------
891
+ //a procedure from ring.lib changing the order to dp creating a new
892
+ //basering @R in order to compute the dimension d of i
893
+ def @R=changeord(list(list("dp",1:nvars(basering))));
894
+ setring @R;
895
+ ideal i = imap(r,i);
896
+ list j = mstd(i);
897
+ i = j[2];
898
+ int d = dim(j[1]);
899
+ if ( d <= 0)
900
+ {
901
+ setring r;
902
+ list l = maxideal(1),ideal(0);
903
+ return( l );
904
+ }
905
+ // ------------------------ change of ordering ---------------------------
906
+ //Now change the order to (dp(n-d),lp) creating a new basering @S
907
+ def @S=changeord(list(list("dp",1:(n-d)),list("lp",1:d)));
908
+ setring @S;
909
+ ideal m;
910
+
911
+ // ----------------- sparse-random coordinate change --------------------
912
+ //creating lower triangular random generators for the maximal ideal
913
+ //a procedure from random.lib, as sparse as possible
914
+ if( char(@S) > 0 )
915
+ {
916
+ m=ideal(sparsetriag(n,n,p,char(@S)+1)*transpose(maxideal(1)));
917
+ }
918
+ if( char(@S) == 0 )
919
+ {
920
+ if ( voice <= 6 )
921
+ {
922
+ m=ideal(sparsetriag(n,n,p,10)*transpose(maxideal(1)));
923
+ }
924
+ if( voice > 6 and voice <= 11)
925
+ {
926
+ m=ideal(sparsetriag(n,n,p,100)*transpose(maxideal(1)));
927
+ }
928
+ if ( voice > 11 )
929
+ {
930
+ m=ideal(sparsetriag(n,n,p,30000)*transpose(maxideal(1)));
931
+ }
932
+ }
933
+
934
+ map phi=r,m;
935
+ //map phi=@R,m;
936
+ ideal i=std(phi(i));
937
+
938
+ // ----------------------- test for finiteness ---------------------------
939
+ //We need a test whether the coordinate change was random enough, if yes
940
+ //we are ready, else call noetherNormal again
941
+ list l=finitenessTest(i);
942
+
943
+ setring r;
944
+ list l=imap(@S,l);
945
+
946
+ if(size(l[3]) == d) //the generic case
947
+ {
948
+ good = fetch(@S,m),l[3];
949
+ kill @S,@R;
950
+ return(good);
951
+ }
952
+ else //the bad case
953
+ { kill @S,@R;
954
+ if ( voice >= 21 )
955
+ {
956
+ "// WARNING: In case of a finite ground field";
957
+ "// the characteristic may be too small.";
958
+ "// This could result in an infinite loop.";
959
+ "// Loop in noetherNormal, voice:";, voice;"";
960
+ }
961
+ if ( voice >= 16 )
962
+ {
963
+ "// Switch to dense coordinate change";"";
964
+ return(noetherNormal(i));
965
+ }
966
+ return(noetherNormal(i,p));
967
+ }
968
+ }
969
+ example
970
+ { "EXAMPLE:"; echo = 2;
971
+ ring r=0,(x,y,z),dp;
972
+ ideal i= xy,xz;
973
+ noetherNormal(i);
974
+ }
975
+ ///////////////////////////////////////////////////////////////////////////////
976
+
977
+ proc finitenessTest(ideal i, list #)
978
+ "USAGE: finitenessTest(J[,v]); J ideal, v intvec (say v1,...,vr with vi>0)
979
+ RETURN:
980
+ @format
981
+ a list l with l[1] integer, l[2], l[3], l[4] ideals
982
+ - l[1] = 1 if var(v1),...,var(vr) are in l[2] and 0 else
983
+ - l[2] (resp. l[3]) contains those variables which occur,
984
+ (resp. do not occur) as pure power in the leading term of one of the
985
+ generators of J,
986
+ - l[4] contains those J[i] for which the leading term is a pure power
987
+ of a variable (which is then in l[2])
988
+ (default: v = [1,2,..,nvars(basering)])
989
+ @end format
990
+ THEORY: If J is a standard basis of an ideal generated by x_1 - f_1(y),...,
991
+ x_n - f_n with y_j ordered lexicographically and y_j >> x_i, then,
992
+ if y_i appears as pure power in the leading term of J[k], J[k] defines
993
+ an integral relation for y_i over the y_(i+1),... and the f's.
994
+ Moreover, in this situation, if l[2] = y_1,...,y_r, then K[y_1,...y_r]
995
+ is finite over K[f_1..f_n]. If J contains furthermore polynomials
996
+ h_j(y), then K[y_1,...y_z]/<h_j> is finite over K[f_1..f_n].
997
+ For a proof cf. Prop. 3.1.5, p. 214. in [G.-M. Greuel, G. Pfister:
998
+ A SINGULAR Introduction to Commutative Algebra, 2nd Edition,
999
+ Springer Verlag (2007)]
1000
+ EXAMPLE: example finitenessTest; shows an example
1001
+ "
1002
+ { int n = nvars(basering);
1003
+ intvec v,w;
1004
+ int j,z,ii;
1005
+ v[n]=0; //v should have size n
1006
+ intvec V = 1..n;
1007
+ list nze; //the non-zero entries of a leadexp
1008
+ if (size(#) != 0 )
1009
+ {
1010
+ V = #[1];
1011
+ }
1012
+ intmat W[1][n]; //create intmat with 1 row, having 1 at
1013
+ //position V[j], i = 1..size(V), 0 else
1014
+ for( j=1; j<=size(V); j++ )
1015
+ {
1016
+ W[1,V[j]] = 1;
1017
+ }
1018
+ ideal relation,zero,nonzero;
1019
+ // ---------------------- check leading exponents -------------------------
1020
+
1021
+ for(j=1;j<=ncols(i);j++)
1022
+ {
1023
+ w = leadexp(i[j]);
1024
+ nze = nonZeroEntry(w);
1025
+ if( nze[1] == 1 ) //the leading term of i[j] is a
1026
+ { //pure power of some variable
1027
+ if( W*w != 0 ) //case: variable has index appearing in V
1028
+ {
1029
+ relation[size(relation)+1] = i[j];
1030
+ v=v+w;
1031
+ }
1032
+ }
1033
+ }
1034
+ // ----------------- pick the corresponding variables ---------------------
1035
+ //the nonzero entries of v correspond to variables which occur as
1036
+ //pure power in the leading term of some polynomial in i
1037
+
1038
+ for(j=1; j<=size(v); j++)
1039
+ {
1040
+ if(v[j]==0)
1041
+ {
1042
+ zero[size(zero)+1]=var(j);
1043
+ }
1044
+ else
1045
+ {
1046
+ nonzero[size(nonzero)+1]=var(j);
1047
+ }
1048
+ }
1049
+ // ---------------- do we have all pure powers we want? -------------------
1050
+ // test this by dividing the product of corresponding variables
1051
+ ideal max = maxideal(1);
1052
+ max = max[V];
1053
+ z = (product(nonzero)/product(max) != 0);
1054
+ return(list(z,nonzero,zero,relation));
1055
+ }
1056
+ example
1057
+ { "EXAMPLE:"; echo = 2;
1058
+ ring s = 0,(x,y,z,a,b,c),(lp(3),dp);
1059
+ ideal i= a -(xy)^3+x2-z, b -y2-1, c -z3;
1060
+ ideal j = a -(xy)^3+x2-z, b -y2-1, c -z3, xy;
1061
+ finitenessTest(std(i),1..3);
1062
+ finitenessTest(std(j),1..3);
1063
+ }
1064
+ ///////////////////////////////////////////////////////////////////////////////
1065
+
1066
+ proc mapIsFinite(map phi,def R, list #)
1067
+ "USAGE: mapIsFinite(phi,R[,J]); R the preimage ring of the map
1068
+ phi: R ---> basering
1069
+ J an ideal in the basering, J = 0 if not given
1070
+ RETURN: 1 if R ---> basering/J is finite and 0 else
1071
+ NOTE: R may be a quotient ring (this will be ignored since a map R/I-->S/J
1072
+ is finite if and only if the induced map R-->S/J is finite).
1073
+ SEE ALSO: finitenessTest
1074
+ EXAMPLE: example mapIsFinite; shows an example
1075
+ "
1076
+ {
1077
+ def bsr = basering;
1078
+ ideal J;
1079
+ if( size(#) != 0 )
1080
+ {
1081
+ J = #[1];
1082
+ }
1083
+ string os = ordstr(bsr);
1084
+ int m = nvars(bsr);
1085
+ int n = nvars(R);
1086
+ ideal PHI = ideal(phi);
1087
+ if ( ncols(PHI) < n )
1088
+ { PHI[n]=0;
1089
+ }
1090
+ // --------------------- change of variable names -------------------------
1091
+ list l2;
1092
+ for (int ii = 1; ii <= m; ii++)
1093
+ {
1094
+ l2[ii] = "y("+string(ii)+")";
1095
+ }
1096
+ ring @bsr = create_ring(ring_list(bsr)[1], l2, "("+os+")", "no_minpoly");
1097
+ ideal J = fetch(bsr,J);
1098
+ ideal PHI = fetch(bsr,PHI);
1099
+
1100
+ // --------------------------- enlarging ring -----------------------------
1101
+ list l12;
1102
+ for (int yy = 1; yy <= m; yy++)
1103
+ {
1104
+ l12[size(l12)+1] = "y("+string(yy)+")";
1105
+ }
1106
+ for (int zz = 1; zz <= n; zz++)
1107
+ {
1108
+ l12[size(l12)+1] = "x("+string(zz)+")";
1109
+ }
1110
+ ring @rr = create_ring(ring_list(bsr)[1], l12, "(lp("+string(m)+"),dp)", "no_minpoly");
1111
+ ideal J = imap(@bsr,J);
1112
+ ideal PHI = imap(@bsr,PHI);
1113
+ ideal M;
1114
+ int i;
1115
+
1116
+ for(i=1;i<=n;i++)
1117
+ {
1118
+ M[i]=x(i)-PHI[i];
1119
+ }
1120
+ M = std(M+J);
1121
+ // ----------------------- test for finiteness ---------------------------
1122
+ list l = finitenessTest(M,1..m);
1123
+ int result = l[1];
1124
+ setring bsr;
1125
+ return( result );
1126
+ }
1127
+ example
1128
+ { "EXAMPLE:"; echo = 2;
1129
+ ring r = 0,(a,b,c),dp;
1130
+ ring s = 0,(x,y,z),dp;
1131
+ ideal i= xy;
1132
+ map phi= r,(xy)^3+x2+z,y2-1,z3;
1133
+ mapIsFinite(phi,r,i);
1134
+ }
1135
+ //////////////////////////////////////////////////////////////////////////////
1136
+
1137
+ proc nonZeroEntry(def id)
1138
+ "USAGE: nonZeroEntry(id); id=object for which the test 'id[i]!=0', i=1,..,N,
1139
+ N=size(id) (resp. ncols(id) for id of type ideal or module)
1140
+ is defined (e.g. ideal, vector, list of polynomials, intvec,...)
1141
+ RETURN: @format
1142
+ a list, say l, with l[1] an integer, l[2], l[3] integer vectors:
1143
+ - l[1] number of non-zero entries of id
1144
+ - l[2] intvec of size l[1] with l[2][i]=i if id[i] != 0
1145
+ in case l[1]!=0 (and l[2]=0 if l[1]=0)
1146
+ - l[3] intvec with l[3][i]=1 if id[i]!=0 and l[3][i]=0 else
1147
+ @end format
1148
+ NOTE:
1149
+ EXAMPLE: example nonZeroEntry; shows an example
1150
+ "
1151
+ {
1152
+ int ii,jj,N,n;
1153
+ intvec v,V;
1154
+
1155
+ if ( typeof(id) == "ideal" || typeof(id) == "module" )
1156
+ {
1157
+ N = ncols(id);
1158
+ }
1159
+ else
1160
+ {
1161
+ N = size(id);
1162
+ }
1163
+ for ( ii=1; ii<=N; ii++ )
1164
+ {
1165
+ V[ii] = 0;
1166
+ if ( id[ii] != 0 )
1167
+ {
1168
+ n++;
1169
+ v=v,ii; //the first entry of v is always 0
1170
+ V[ii] = 1;
1171
+ }
1172
+ }
1173
+ if ( size(v) > 1 ) //if id[ii] != 0 for at least one ii delete the first 0
1174
+ {
1175
+ v = v[2..size(v)];
1176
+ }
1177
+
1178
+ list l = n,v,V;
1179
+ return(l);
1180
+ }
1181
+ example
1182
+ { "EXAMPLE:"; echo = 2;
1183
+ ring r = 0,(a,b,c),dp;
1184
+ poly f = a3c+b3+c2+a;
1185
+ intvec v = leadexp(f);
1186
+ nonZeroEntry(v);
1187
+
1188
+ intvec w;
1189
+ list L = 37,0,f,v,w;
1190
+ nonZeroEntry(L);
1191
+ }
1192
+ //////////////////////////////////////////////////////////////////////////////
1193
+