passagemath-singular 10.6.31rc3__cp314-cp314-musllinux_1_2_x86_64.whl

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

Potentially problematic release.


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

Files changed (493) hide show
  1. PySingular.cpython-314-x86_64-linux-musl.so +0 -0
  2. passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
  3. passagemath_singular-10.6.31rc3.dist-info/RECORD +493 -0
  4. passagemath_singular-10.6.31rc3.dist-info/WHEEL +5 -0
  5. passagemath_singular-10.6.31rc3.dist-info/top_level.txt +3 -0
  6. passagemath_singular.libs/libSingular-4-67059f19.4.1.so +0 -0
  7. passagemath_singular.libs/libcddgmp-30166d29.so.0.1.3 +0 -0
  8. passagemath_singular.libs/libfactory-4-9d37bcf4.4.1.so +0 -0
  9. passagemath_singular.libs/libflint-fd6f12fc.so.21.0.0 +0 -0
  10. passagemath_singular.libs/libgcc_s-0cd532bd.so.1 +0 -0
  11. passagemath_singular.libs/libgf2x-9e30c3e3.so.3.0.0 +0 -0
  12. passagemath_singular.libs/libgfortran-2c33b284.so.5.0.0 +0 -0
  13. passagemath_singular.libs/libgmp-0e7fc84e.so.10.5.0 +0 -0
  14. passagemath_singular.libs/libgsl-42cda06f.so.28.0.0 +0 -0
  15. passagemath_singular.libs/libmpfr-aaecbfc0.so.6.2.1 +0 -0
  16. passagemath_singular.libs/libncursesw-9c9e32c3.so.6.5 +0 -0
  17. passagemath_singular.libs/libntl-26885ca2.so.44.0.1 +0 -0
  18. passagemath_singular.libs/libomalloc-0-e9ff96db.9.6.so +0 -0
  19. passagemath_singular.libs/libopenblasp-r0-905cb27d.3.29.so +0 -0
  20. passagemath_singular.libs/libpolys-4-8bcf8e7d.4.1.so +0 -0
  21. passagemath_singular.libs/libquadmath-bb76a5fc.so.0.0.0 +0 -0
  22. passagemath_singular.libs/libreadline-06542304.so.8.2 +0 -0
  23. passagemath_singular.libs/libsingular_resources-4-73bf7623.4.1.so +0 -0
  24. passagemath_singular.libs/libstdc++-5d72f927.so.6.0.33 +0 -0
  25. sage/algebras/all__sagemath_singular.py +3 -0
  26. sage/algebras/fusion_rings/all.py +19 -0
  27. sage/algebras/fusion_rings/f_matrix.py +2448 -0
  28. sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-314-x86_64-linux-musl.so +0 -0
  29. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +5 -0
  30. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +538 -0
  31. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-314-x86_64-linux-musl.so +0 -0
  32. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +3 -0
  33. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +331 -0
  34. sage/algebras/fusion_rings/fusion_double.py +899 -0
  35. sage/algebras/fusion_rings/fusion_ring.py +1580 -0
  36. sage/algebras/fusion_rings/poly_tup_engine.cpython-314-x86_64-linux-musl.so +0 -0
  37. sage/algebras/fusion_rings/poly_tup_engine.pxd +24 -0
  38. sage/algebras/fusion_rings/poly_tup_engine.pyx +579 -0
  39. sage/algebras/fusion_rings/shm_managers.cpython-314-x86_64-linux-musl.so +0 -0
  40. sage/algebras/fusion_rings/shm_managers.pxd +24 -0
  41. sage/algebras/fusion_rings/shm_managers.pyx +780 -0
  42. sage/algebras/letterplace/all.py +1 -0
  43. sage/algebras/letterplace/free_algebra_element_letterplace.cpython-314-x86_64-linux-musl.so +0 -0
  44. sage/algebras/letterplace/free_algebra_element_letterplace.pxd +18 -0
  45. sage/algebras/letterplace/free_algebra_element_letterplace.pyx +755 -0
  46. sage/algebras/letterplace/free_algebra_letterplace.cpython-314-x86_64-linux-musl.so +0 -0
  47. sage/algebras/letterplace/free_algebra_letterplace.pxd +35 -0
  48. sage/algebras/letterplace/free_algebra_letterplace.pyx +914 -0
  49. sage/algebras/letterplace/letterplace_ideal.cpython-314-x86_64-linux-musl.so +0 -0
  50. sage/algebras/letterplace/letterplace_ideal.pyx +408 -0
  51. sage/algebras/quatalg/all.py +2 -0
  52. sage/algebras/quatalg/quaternion_algebra.py +4778 -0
  53. sage/algebras/quatalg/quaternion_algebra_cython.cpython-314-x86_64-linux-musl.so +0 -0
  54. sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
  55. sage/algebras/quatalg/quaternion_algebra_element.cpython-314-x86_64-linux-musl.so +0 -0
  56. sage/algebras/quatalg/quaternion_algebra_element.pxd +29 -0
  57. sage/algebras/quatalg/quaternion_algebra_element.pyx +2176 -0
  58. sage/all__sagemath_singular.py +11 -0
  59. sage/ext_data/all__sagemath_singular.py +1 -0
  60. sage/ext_data/singular/function_field/core.lib +98 -0
  61. sage/interfaces/all__sagemath_singular.py +1 -0
  62. sage/interfaces/singular.py +2835 -0
  63. sage/libs/all__sagemath_singular.py +1 -0
  64. sage/libs/singular/__init__.py +1 -0
  65. sage/libs/singular/decl.pxd +1168 -0
  66. sage/libs/singular/function.cpython-314-x86_64-linux-musl.so +0 -0
  67. sage/libs/singular/function.pxd +87 -0
  68. sage/libs/singular/function.pyx +1901 -0
  69. sage/libs/singular/function_factory.py +61 -0
  70. sage/libs/singular/groebner_strategy.cpython-314-x86_64-linux-musl.so +0 -0
  71. sage/libs/singular/groebner_strategy.pxd +22 -0
  72. sage/libs/singular/groebner_strategy.pyx +582 -0
  73. sage/libs/singular/option.cpython-314-x86_64-linux-musl.so +0 -0
  74. sage/libs/singular/option.pyx +671 -0
  75. sage/libs/singular/polynomial.cpython-314-x86_64-linux-musl.so +0 -0
  76. sage/libs/singular/polynomial.pxd +39 -0
  77. sage/libs/singular/polynomial.pyx +661 -0
  78. sage/libs/singular/ring.cpython-314-x86_64-linux-musl.so +0 -0
  79. sage/libs/singular/ring.pxd +58 -0
  80. sage/libs/singular/ring.pyx +893 -0
  81. sage/libs/singular/singular.cpython-314-x86_64-linux-musl.so +0 -0
  82. sage/libs/singular/singular.pxd +72 -0
  83. sage/libs/singular/singular.pyx +1944 -0
  84. sage/libs/singular/standard_options.py +145 -0
  85. sage/matrix/all__sagemath_singular.py +1 -0
  86. sage/matrix/matrix_mpolynomial_dense.cpython-314-x86_64-linux-musl.so +0 -0
  87. sage/matrix/matrix_mpolynomial_dense.pxd +7 -0
  88. sage/matrix/matrix_mpolynomial_dense.pyx +615 -0
  89. sage/rings/all__sagemath_singular.py +1 -0
  90. sage/rings/function_field/all__sagemath_singular.py +1 -0
  91. sage/rings/function_field/derivations_polymod.py +911 -0
  92. sage/rings/function_field/element_polymod.cpython-314-x86_64-linux-musl.so +0 -0
  93. sage/rings/function_field/element_polymod.pyx +406 -0
  94. sage/rings/function_field/function_field_polymod.py +2611 -0
  95. sage/rings/function_field/ideal_polymod.py +1775 -0
  96. sage/rings/function_field/order_polymod.py +1475 -0
  97. sage/rings/function_field/place_polymod.py +681 -0
  98. sage/rings/polynomial/all__sagemath_singular.py +1 -0
  99. sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-314-x86_64-linux-musl.so +0 -0
  100. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +5 -0
  101. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +339 -0
  102. sage/rings/polynomial/multi_polynomial_libsingular.cpython-314-x86_64-linux-musl.so +0 -0
  103. sage/rings/polynomial/multi_polynomial_libsingular.pxd +30 -0
  104. sage/rings/polynomial/multi_polynomial_libsingular.pyx +6277 -0
  105. sage/rings/polynomial/plural.cpython-314-x86_64-linux-musl.so +0 -0
  106. sage/rings/polynomial/plural.pxd +48 -0
  107. sage/rings/polynomial/plural.pyx +3171 -0
  108. sage/symbolic/all__sagemath_singular.py +1 -0
  109. sage/symbolic/comparison_impl.pxi +428 -0
  110. sage/symbolic/constants_c_impl.pxi +178 -0
  111. sage/symbolic/expression.cpython-314-x86_64-linux-musl.so +0 -0
  112. sage/symbolic/expression.pxd +7 -0
  113. sage/symbolic/expression.pyx +14200 -0
  114. sage/symbolic/getitem_impl.pxi +202 -0
  115. sage/symbolic/pynac.pxi +572 -0
  116. sage/symbolic/pynac_constant_impl.pxi +133 -0
  117. sage/symbolic/pynac_function_impl.pxi +206 -0
  118. sage/symbolic/pynac_impl.pxi +2576 -0
  119. sage/symbolic/pynac_wrap.h +124 -0
  120. sage/symbolic/series_impl.pxi +272 -0
  121. sage/symbolic/substitution_map_impl.pxi +94 -0
  122. sage_wheels/bin/ESingular +0 -0
  123. sage_wheels/bin/Singular +0 -0
  124. sage_wheels/bin/TSingular +0 -0
  125. sage_wheels/lib/singular/MOD/cohomo.la +41 -0
  126. sage_wheels/lib/singular/MOD/cohomo.so +0 -0
  127. sage_wheels/lib/singular/MOD/customstd.la +41 -0
  128. sage_wheels/lib/singular/MOD/customstd.so +0 -0
  129. sage_wheels/lib/singular/MOD/freealgebra.la +41 -0
  130. sage_wheels/lib/singular/MOD/freealgebra.so +0 -0
  131. sage_wheels/lib/singular/MOD/gfanlib.la +41 -0
  132. sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
  133. sage_wheels/lib/singular/MOD/gitfan.la +41 -0
  134. sage_wheels/lib/singular/MOD/gitfan.so +0 -0
  135. sage_wheels/lib/singular/MOD/interval.la +41 -0
  136. sage_wheels/lib/singular/MOD/interval.so +0 -0
  137. sage_wheels/lib/singular/MOD/loctriv.la +41 -0
  138. sage_wheels/lib/singular/MOD/loctriv.so +0 -0
  139. sage_wheels/lib/singular/MOD/machinelearning.la +41 -0
  140. sage_wheels/lib/singular/MOD/machinelearning.so +0 -0
  141. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.la +41 -0
  142. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.so +0 -0
  143. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.la +41 -0
  144. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.so +0 -0
  145. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.la +41 -0
  146. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.so +0 -0
  147. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.la +41 -0
  148. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.so +0 -0
  149. sage_wheels/lib/singular/MOD/partialgb.la +41 -0
  150. sage_wheels/lib/singular/MOD/partialgb.so +0 -0
  151. sage_wheels/lib/singular/MOD/pyobject.la +41 -0
  152. sage_wheels/lib/singular/MOD/pyobject.so +0 -0
  153. sage_wheels/lib/singular/MOD/singmathic.la +41 -0
  154. sage_wheels/lib/singular/MOD/singmathic.so +0 -0
  155. sage_wheels/lib/singular/MOD/sispasm.la +41 -0
  156. sage_wheels/lib/singular/MOD/sispasm.so +0 -0
  157. sage_wheels/lib/singular/MOD/subsets.la +41 -0
  158. sage_wheels/lib/singular/MOD/subsets.so +0 -0
  159. sage_wheels/lib/singular/MOD/systhreads.la +41 -0
  160. sage_wheels/lib/singular/MOD/systhreads.so +0 -0
  161. sage_wheels/lib/singular/MOD/syzextra.la +41 -0
  162. sage_wheels/lib/singular/MOD/syzextra.so +0 -0
  163. sage_wheels/libexec/singular/MOD/change_cost +0 -0
  164. sage_wheels/libexec/singular/MOD/singularsurf +11 -0
  165. sage_wheels/libexec/singular/MOD/singularsurf_jupyter +9 -0
  166. sage_wheels/libexec/singular/MOD/singularsurf_win +10 -0
  167. sage_wheels/libexec/singular/MOD/solve_IP +0 -0
  168. sage_wheels/libexec/singular/MOD/surfex +16 -0
  169. sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
  170. sage_wheels/share/factory/gftables/10201 +342 -0
  171. sage_wheels/share/factory/gftables/1024 +37 -0
  172. sage_wheels/share/factory/gftables/10609 +356 -0
  173. sage_wheels/share/factory/gftables/11449 +384 -0
  174. sage_wheels/share/factory/gftables/11881 +398 -0
  175. sage_wheels/share/factory/gftables/121 +6 -0
  176. sage_wheels/share/factory/gftables/12167 +408 -0
  177. sage_wheels/share/factory/gftables/125 +7 -0
  178. sage_wheels/share/factory/gftables/12769 +428 -0
  179. sage_wheels/share/factory/gftables/128 +7 -0
  180. sage_wheels/share/factory/gftables/1331 +47 -0
  181. sage_wheels/share/factory/gftables/1369 +48 -0
  182. sage_wheels/share/factory/gftables/14641 +490 -0
  183. sage_wheels/share/factory/gftables/15625 +523 -0
  184. sage_wheels/share/factory/gftables/16 +3 -0
  185. sage_wheels/share/factory/gftables/16129 +540 -0
  186. sage_wheels/share/factory/gftables/16384 +549 -0
  187. sage_wheels/share/factory/gftables/16807 +563 -0
  188. sage_wheels/share/factory/gftables/1681 +58 -0
  189. sage_wheels/share/factory/gftables/169 +8 -0
  190. sage_wheels/share/factory/gftables/17161 +574 -0
  191. sage_wheels/share/factory/gftables/1849 +64 -0
  192. sage_wheels/share/factory/gftables/18769 +628 -0
  193. sage_wheels/share/factory/gftables/19321 +646 -0
  194. sage_wheels/share/factory/gftables/19683 +659 -0
  195. sage_wheels/share/factory/gftables/2048 +71 -0
  196. sage_wheels/share/factory/gftables/2187 +75 -0
  197. sage_wheels/share/factory/gftables/2197 +76 -0
  198. sage_wheels/share/factory/gftables/2209 +76 -0
  199. sage_wheels/share/factory/gftables/22201 +742 -0
  200. sage_wheels/share/factory/gftables/22801 +762 -0
  201. sage_wheels/share/factory/gftables/2401 +82 -0
  202. sage_wheels/share/factory/gftables/243 +11 -0
  203. sage_wheels/share/factory/gftables/24389 +815 -0
  204. sage_wheels/share/factory/gftables/24649 +824 -0
  205. sage_wheels/share/factory/gftables/25 +3 -0
  206. sage_wheels/share/factory/gftables/256 +11 -0
  207. sage_wheels/share/factory/gftables/26569 +888 -0
  208. sage_wheels/share/factory/gftables/27 +3 -0
  209. sage_wheels/share/factory/gftables/27889 +932 -0
  210. sage_wheels/share/factory/gftables/2809 +96 -0
  211. sage_wheels/share/factory/gftables/28561 +954 -0
  212. sage_wheels/share/factory/gftables/289 +12 -0
  213. sage_wheels/share/factory/gftables/29791 +995 -0
  214. sage_wheels/share/factory/gftables/29929 +1000 -0
  215. sage_wheels/share/factory/gftables/3125 +107 -0
  216. sage_wheels/share/factory/gftables/32 +4 -0
  217. sage_wheels/share/factory/gftables/32041 +1070 -0
  218. sage_wheels/share/factory/gftables/32761 +1094 -0
  219. sage_wheels/share/factory/gftables/32768 +1095 -0
  220. sage_wheels/share/factory/gftables/343 +14 -0
  221. sage_wheels/share/factory/gftables/3481 +118 -0
  222. sage_wheels/share/factory/gftables/361 +14 -0
  223. sage_wheels/share/factory/gftables/36481 +1218 -0
  224. sage_wheels/share/factory/gftables/3721 +126 -0
  225. sage_wheels/share/factory/gftables/37249 +1244 -0
  226. sage_wheels/share/factory/gftables/38809 +1296 -0
  227. sage_wheels/share/factory/gftables/39601 +1322 -0
  228. sage_wheels/share/factory/gftables/4 +3 -0
  229. sage_wheels/share/factory/gftables/4096 +139 -0
  230. sage_wheels/share/factory/gftables/44521 +1486 -0
  231. sage_wheels/share/factory/gftables/4489 +152 -0
  232. sage_wheels/share/factory/gftables/49 +4 -0
  233. sage_wheels/share/factory/gftables/4913 +166 -0
  234. sage_wheels/share/factory/gftables/49729 +1660 -0
  235. sage_wheels/share/factory/gftables/5041 +170 -0
  236. sage_wheels/share/factory/gftables/50653 +1691 -0
  237. sage_wheels/share/factory/gftables/512 +20 -0
  238. sage_wheels/share/factory/gftables/51529 +1720 -0
  239. sage_wheels/share/factory/gftables/52441 +1750 -0
  240. sage_wheels/share/factory/gftables/529 +20 -0
  241. sage_wheels/share/factory/gftables/5329 +180 -0
  242. sage_wheels/share/factory/gftables/54289 +1812 -0
  243. sage_wheels/share/factory/gftables/57121 +1906 -0
  244. sage_wheels/share/factory/gftables/58081 +1938 -0
  245. sage_wheels/share/factory/gftables/59049 +1971 -0
  246. sage_wheels/share/factory/gftables/6241 +210 -0
  247. sage_wheels/share/factory/gftables/625 +23 -0
  248. sage_wheels/share/factory/gftables/63001 +2102 -0
  249. sage_wheels/share/factory/gftables/64 +5 -0
  250. sage_wheels/share/factory/gftables/6561 +221 -0
  251. sage_wheels/share/factory/gftables/6859 +231 -0
  252. sage_wheels/share/factory/gftables/6889 +232 -0
  253. sage_wheels/share/factory/gftables/729 +27 -0
  254. sage_wheels/share/factory/gftables/7921 +266 -0
  255. sage_wheels/share/factory/gftables/8 +3 -0
  256. sage_wheels/share/factory/gftables/81 +5 -0
  257. sage_wheels/share/factory/gftables/8192 +276 -0
  258. sage_wheels/share/factory/gftables/841 +30 -0
  259. sage_wheels/share/factory/gftables/9 +3 -0
  260. sage_wheels/share/factory/gftables/9409 +316 -0
  261. sage_wheels/share/factory/gftables/961 +34 -0
  262. sage_wheels/share/info/singular.info +191898 -0
  263. sage_wheels/share/singular/LIB/GND.lib +1359 -0
  264. sage_wheels/share/singular/LIB/JMBTest.lib +976 -0
  265. sage_wheels/share/singular/LIB/JMSConst.lib +1363 -0
  266. sage_wheels/share/singular/LIB/KVequiv.lib +699 -0
  267. sage_wheels/share/singular/LIB/SingularityDBM.lib +491 -0
  268. sage_wheels/share/singular/LIB/VecField.lib +1542 -0
  269. sage_wheels/share/singular/LIB/absfact.lib +959 -0
  270. sage_wheels/share/singular/LIB/ainvar.lib +730 -0
  271. sage_wheels/share/singular/LIB/aksaka.lib +419 -0
  272. sage_wheels/share/singular/LIB/alexpoly.lib +2542 -0
  273. sage_wheels/share/singular/LIB/algebra.lib +1193 -0
  274. sage_wheels/share/singular/LIB/all.lib +136 -0
  275. sage_wheels/share/singular/LIB/arcpoint.lib +514 -0
  276. sage_wheels/share/singular/LIB/arnold.lib +4553 -0
  277. sage_wheels/share/singular/LIB/arnoldclassify.lib +2058 -0
  278. sage_wheels/share/singular/LIB/arr.lib +3486 -0
  279. sage_wheels/share/singular/LIB/assprimeszerodim.lib +755 -0
  280. sage_wheels/share/singular/LIB/autgradalg.lib +3361 -0
  281. sage_wheels/share/singular/LIB/bfun.lib +1964 -0
  282. sage_wheels/share/singular/LIB/bimodules.lib +774 -0
  283. sage_wheels/share/singular/LIB/brillnoether.lib +226 -0
  284. sage_wheels/share/singular/LIB/brnoeth.lib +5017 -0
  285. sage_wheels/share/singular/LIB/central.lib +2169 -0
  286. sage_wheels/share/singular/LIB/chern.lib +4162 -0
  287. sage_wheels/share/singular/LIB/cimonom.lib +571 -0
  288. sage_wheels/share/singular/LIB/cisimplicial.lib +1835 -0
  289. sage_wheels/share/singular/LIB/classify.lib +3239 -0
  290. sage_wheels/share/singular/LIB/classify2.lib +1462 -0
  291. sage_wheels/share/singular/LIB/classifyMapGerms.lib +1515 -0
  292. sage_wheels/share/singular/LIB/classify_aeq.lib +3253 -0
  293. sage_wheels/share/singular/LIB/classifyceq.lib +2092 -0
  294. sage_wheels/share/singular/LIB/classifyci.lib +1133 -0
  295. sage_wheels/share/singular/LIB/combinat.lib +91 -0
  296. sage_wheels/share/singular/LIB/compregb.lib +276 -0
  297. sage_wheels/share/singular/LIB/control.lib +1636 -0
  298. sage_wheels/share/singular/LIB/crypto.lib +3795 -0
  299. sage_wheels/share/singular/LIB/curveInv.lib +667 -0
  300. sage_wheels/share/singular/LIB/curvepar.lib +1817 -0
  301. sage_wheels/share/singular/LIB/customstd.lib +100 -0
  302. sage_wheels/share/singular/LIB/deRham.lib +5979 -0
  303. sage_wheels/share/singular/LIB/decodegb.lib +2134 -0
  304. sage_wheels/share/singular/LIB/decomp.lib +1655 -0
  305. sage_wheels/share/singular/LIB/deflation.lib +872 -0
  306. sage_wheels/share/singular/LIB/deform.lib +925 -0
  307. sage_wheels/share/singular/LIB/difform.lib +3055 -0
  308. sage_wheels/share/singular/LIB/divisors.lib +750 -0
  309. sage_wheels/share/singular/LIB/dmod.lib +5817 -0
  310. sage_wheels/share/singular/LIB/dmodapp.lib +3269 -0
  311. sage_wheels/share/singular/LIB/dmodideal.lib +1211 -0
  312. sage_wheels/share/singular/LIB/dmodloc.lib +2645 -0
  313. sage_wheels/share/singular/LIB/dmodvar.lib +818 -0
  314. sage_wheels/share/singular/LIB/dummy.lib +17 -0
  315. sage_wheels/share/singular/LIB/elim.lib +1009 -0
  316. sage_wheels/share/singular/LIB/ellipticcovers.lib +548 -0
  317. sage_wheels/share/singular/LIB/enumpoints.lib +146 -0
  318. sage_wheels/share/singular/LIB/equising.lib +2127 -0
  319. sage_wheels/share/singular/LIB/ffmodstd.lib +2384 -0
  320. sage_wheels/share/singular/LIB/ffsolve.lib +1289 -0
  321. sage_wheels/share/singular/LIB/findifs.lib +778 -0
  322. sage_wheels/share/singular/LIB/finitediff.lib +1768 -0
  323. sage_wheels/share/singular/LIB/finvar.lib +7989 -0
  324. sage_wheels/share/singular/LIB/fpadim.lib +2429 -0
  325. sage_wheels/share/singular/LIB/fpalgebras.lib +1666 -0
  326. sage_wheels/share/singular/LIB/fpaprops.lib +1462 -0
  327. sage_wheels/share/singular/LIB/freegb.lib +3853 -0
  328. sage_wheels/share/singular/LIB/general.lib +1350 -0
  329. sage_wheels/share/singular/LIB/gfan.lib +1768 -0
  330. sage_wheels/share/singular/LIB/gitfan.lib +3130 -0
  331. sage_wheels/share/singular/LIB/gkdim.lib +99 -0
  332. sage_wheels/share/singular/LIB/gmspoly.lib +589 -0
  333. sage_wheels/share/singular/LIB/gmssing.lib +1739 -0
  334. sage_wheels/share/singular/LIB/goettsche.lib +909 -0
  335. sage_wheels/share/singular/LIB/graal.lib +1366 -0
  336. sage_wheels/share/singular/LIB/gradedModules.lib +2541 -0
  337. sage_wheels/share/singular/LIB/graphics.lib +360 -0
  338. sage_wheels/share/singular/LIB/grobcov.lib +7706 -0
  339. sage_wheels/share/singular/LIB/groups.lib +1123 -0
  340. sage_wheels/share/singular/LIB/grwalk.lib +507 -0
  341. sage_wheels/share/singular/LIB/hdepth.lib +194 -0
  342. sage_wheels/share/singular/LIB/help.cnf +57 -0
  343. sage_wheels/share/singular/LIB/hess.lib +1946 -0
  344. sage_wheels/share/singular/LIB/hnoether.lib +4292 -0
  345. sage_wheels/share/singular/LIB/hodge.lib +400 -0
  346. sage_wheels/share/singular/LIB/homolog.lib +1965 -0
  347. sage_wheels/share/singular/LIB/hyperel.lib +975 -0
  348. sage_wheels/share/singular/LIB/inout.lib +679 -0
  349. sage_wheels/share/singular/LIB/integralbasis.lib +6224 -0
  350. sage_wheels/share/singular/LIB/interval.lib +1418 -0
  351. sage_wheels/share/singular/LIB/intprog.lib +778 -0
  352. sage_wheels/share/singular/LIB/invar.lib +443 -0
  353. sage_wheels/share/singular/LIB/involut.lib +980 -0
  354. sage_wheels/share/singular/LIB/jacobson.lib +1215 -0
  355. sage_wheels/share/singular/LIB/kskernel.lib +534 -0
  356. sage_wheels/share/singular/LIB/latex.lib +3146 -0
  357. sage_wheels/share/singular/LIB/lejeune.lib +651 -0
  358. sage_wheels/share/singular/LIB/linalg.lib +2040 -0
  359. sage_wheels/share/singular/LIB/locnormal.lib +212 -0
  360. sage_wheels/share/singular/LIB/lrcalc.lib +526 -0
  361. sage_wheels/share/singular/LIB/makedbm.lib +294 -0
  362. sage_wheels/share/singular/LIB/mathml.lib +813 -0
  363. sage_wheels/share/singular/LIB/matrix.lib +1372 -0
  364. sage_wheels/share/singular/LIB/maxlike.lib +1132 -0
  365. sage_wheels/share/singular/LIB/methods.lib +212 -0
  366. sage_wheels/share/singular/LIB/moddiq.lib +322 -0
  367. sage_wheels/share/singular/LIB/modfinduni.lib +181 -0
  368. sage_wheels/share/singular/LIB/modnormal.lib +218 -0
  369. sage_wheels/share/singular/LIB/modprimdec.lib +1278 -0
  370. sage_wheels/share/singular/LIB/modquotient.lib +269 -0
  371. sage_wheels/share/singular/LIB/modstd.lib +1024 -0
  372. sage_wheels/share/singular/LIB/modular.lib +545 -0
  373. sage_wheels/share/singular/LIB/modules.lib +2561 -0
  374. sage_wheels/share/singular/LIB/modwalk.lib +609 -0
  375. sage_wheels/share/singular/LIB/mondromy.lib +1016 -0
  376. sage_wheels/share/singular/LIB/monomialideal.lib +3851 -0
  377. sage_wheels/share/singular/LIB/mprimdec.lib +2353 -0
  378. sage_wheels/share/singular/LIB/mregular.lib +1863 -0
  379. sage_wheels/share/singular/LIB/multigrading.lib +5629 -0
  380. sage_wheels/share/singular/LIB/ncHilb.lib +777 -0
  381. sage_wheels/share/singular/LIB/ncModslimgb.lib +791 -0
  382. sage_wheels/share/singular/LIB/ncalg.lib +16311 -0
  383. sage_wheels/share/singular/LIB/ncall.lib +31 -0
  384. sage_wheels/share/singular/LIB/ncdecomp.lib +468 -0
  385. sage_wheels/share/singular/LIB/ncfactor.lib +13371 -0
  386. sage_wheels/share/singular/LIB/ncfrac.lib +1023 -0
  387. sage_wheels/share/singular/LIB/nchilbert.lib +448 -0
  388. sage_wheels/share/singular/LIB/nchomolog.lib +759 -0
  389. sage_wheels/share/singular/LIB/ncloc.lib +361 -0
  390. sage_wheels/share/singular/LIB/ncpreim.lib +795 -0
  391. sage_wheels/share/singular/LIB/ncrat.lib +2849 -0
  392. sage_wheels/share/singular/LIB/nctools.lib +1887 -0
  393. sage_wheels/share/singular/LIB/nets.lib +1456 -0
  394. sage_wheels/share/singular/LIB/nfmodstd.lib +1000 -0
  395. sage_wheels/share/singular/LIB/nfmodsyz.lib +732 -0
  396. sage_wheels/share/singular/LIB/noether.lib +1106 -0
  397. sage_wheels/share/singular/LIB/normal.lib +8700 -0
  398. sage_wheels/share/singular/LIB/normaliz.lib +2226 -0
  399. sage_wheels/share/singular/LIB/ntsolve.lib +362 -0
  400. sage_wheels/share/singular/LIB/numerAlg.lib +560 -0
  401. sage_wheels/share/singular/LIB/numerDecom.lib +2261 -0
  402. sage_wheels/share/singular/LIB/olga.lib +1933 -0
  403. sage_wheels/share/singular/LIB/orbitparam.lib +351 -0
  404. sage_wheels/share/singular/LIB/parallel.lib +319 -0
  405. sage_wheels/share/singular/LIB/paraplanecurves.lib +3110 -0
  406. sage_wheels/share/singular/LIB/perron.lib +202 -0
  407. sage_wheels/share/singular/LIB/pfd.lib +2223 -0
  408. sage_wheels/share/singular/LIB/phindex.lib +642 -0
  409. sage_wheels/share/singular/LIB/pointid.lib +673 -0
  410. sage_wheels/share/singular/LIB/polybori.lib +1430 -0
  411. sage_wheels/share/singular/LIB/polyclass.lib +525 -0
  412. sage_wheels/share/singular/LIB/polylib.lib +1174 -0
  413. sage_wheels/share/singular/LIB/polymake.lib +1902 -0
  414. sage_wheels/share/singular/LIB/presolve.lib +1533 -0
  415. sage_wheels/share/singular/LIB/primdec.lib +9576 -0
  416. sage_wheels/share/singular/LIB/primdecint.lib +1782 -0
  417. sage_wheels/share/singular/LIB/primitiv.lib +401 -0
  418. sage_wheels/share/singular/LIB/puiseuxexpansions.lib +1631 -0
  419. sage_wheels/share/singular/LIB/purityfiltration.lib +960 -0
  420. sage_wheels/share/singular/LIB/qhmoduli.lib +1561 -0
  421. sage_wheels/share/singular/LIB/qmatrix.lib +293 -0
  422. sage_wheels/share/singular/LIB/random.lib +455 -0
  423. sage_wheels/share/singular/LIB/ratgb.lib +489 -0
  424. sage_wheels/share/singular/LIB/realclassify.lib +5759 -0
  425. sage_wheels/share/singular/LIB/realizationMatroids.lib +772 -0
  426. sage_wheels/share/singular/LIB/realrad.lib +1197 -0
  427. sage_wheels/share/singular/LIB/recover.lib +2628 -0
  428. sage_wheels/share/singular/LIB/redcgs.lib +3984 -0
  429. sage_wheels/share/singular/LIB/reesclos.lib +465 -0
  430. sage_wheels/share/singular/LIB/resbinomial.lib +2802 -0
  431. sage_wheels/share/singular/LIB/resgraph.lib +789 -0
  432. sage_wheels/share/singular/LIB/resjung.lib +820 -0
  433. sage_wheels/share/singular/LIB/resolve.lib +5110 -0
  434. sage_wheels/share/singular/LIB/resources.lib +170 -0
  435. sage_wheels/share/singular/LIB/reszeta.lib +5473 -0
  436. sage_wheels/share/singular/LIB/ring.lib +1328 -0
  437. sage_wheels/share/singular/LIB/ringgb.lib +343 -0
  438. sage_wheels/share/singular/LIB/rinvar.lib +1153 -0
  439. sage_wheels/share/singular/LIB/rootisolation.lib +1481 -0
  440. sage_wheels/share/singular/LIB/rootsmr.lib +709 -0
  441. sage_wheels/share/singular/LIB/rootsur.lib +886 -0
  442. sage_wheels/share/singular/LIB/rstandard.lib +607 -0
  443. sage_wheels/share/singular/LIB/rwalk.lib +336 -0
  444. sage_wheels/share/singular/LIB/sagbi.lib +1353 -0
  445. sage_wheels/share/singular/LIB/sagbiNormaliz.lib +1622 -0
  446. sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
  447. sage_wheels/share/singular/LIB/sagbigrob.lib +449 -0
  448. sage_wheels/share/singular/LIB/schreyer.lib +321 -0
  449. sage_wheels/share/singular/LIB/schubert.lib +2551 -0
  450. sage_wheels/share/singular/LIB/sets.lib +524 -0
  451. sage_wheels/share/singular/LIB/sheafcoh.lib +1663 -0
  452. sage_wheels/share/singular/LIB/signcond.lib +437 -0
  453. sage_wheels/share/singular/LIB/sing.lib +1094 -0
  454. sage_wheels/share/singular/LIB/sing4ti2.lib +419 -0
  455. sage_wheels/share/singular/LIB/solve.lib +2243 -0
  456. sage_wheels/share/singular/LIB/spcurve.lib +1077 -0
  457. sage_wheels/share/singular/LIB/spectrum.lib +62 -0
  458. sage_wheels/share/singular/LIB/sresext.lib +757 -0
  459. sage_wheels/share/singular/LIB/ssi.lib +143 -0
  460. sage_wheels/share/singular/LIB/standard.lib +2769 -0
  461. sage_wheels/share/singular/LIB/stanleyreisner.lib +473 -0
  462. sage_wheels/share/singular/LIB/stdmodule.lib +547 -0
  463. sage_wheels/share/singular/LIB/stratify.lib +1070 -0
  464. sage_wheels/share/singular/LIB/surf.lib +506 -0
  465. sage_wheels/share/singular/LIB/surf_jupyter.lib +223 -0
  466. sage_wheels/share/singular/LIB/surfacesignature.lib +522 -0
  467. sage_wheels/share/singular/LIB/surfex.lib +1462 -0
  468. sage_wheels/share/singular/LIB/swalk.lib +877 -0
  469. sage_wheels/share/singular/LIB/symodstd.lib +1570 -0
  470. sage_wheels/share/singular/LIB/systhreads.lib +74 -0
  471. sage_wheels/share/singular/LIB/tasks.lib +1324 -0
  472. sage_wheels/share/singular/LIB/tateProdCplxNegGrad.lib +2412 -0
  473. sage_wheels/share/singular/LIB/teachstd.lib +858 -0
  474. sage_wheels/share/singular/LIB/template.lib +116 -0
  475. sage_wheels/share/singular/LIB/toric.lib +1119 -0
  476. sage_wheels/share/singular/LIB/transformation.lib +116 -0
  477. sage_wheels/share/singular/LIB/triang.lib +1197 -0
  478. sage_wheels/share/singular/LIB/tropical.lib +8741 -0
  479. sage_wheels/share/singular/LIB/tropicalEllipticCovers.lib +2922 -0
  480. sage_wheels/share/singular/LIB/tropicalNewton.lib +1128 -0
  481. sage_wheels/share/singular/LIB/tst.lib +1108 -0
  482. sage_wheels/share/singular/LIB/weierstr.lib +241 -0
  483. sage_wheels/share/singular/LIB/zeroset.lib +1478 -0
  484. sage_wheels/share/singular/emacs/.emacs-general +184 -0
  485. sage_wheels/share/singular/emacs/.emacs-singular +234 -0
  486. sage_wheels/share/singular/emacs/COPYING +44 -0
  487. sage_wheels/share/singular/emacs/cmd-cmpl.el +241 -0
  488. sage_wheels/share/singular/emacs/ex-cmpl.el +1681 -0
  489. sage_wheels/share/singular/emacs/hlp-cmpl.el +4318 -0
  490. sage_wheels/share/singular/emacs/lib-cmpl.el +179 -0
  491. sage_wheels/share/singular/emacs/singular.el +4273 -0
  492. sage_wheels/share/singular/emacs/singular.xpm +39 -0
  493. sage_wheels/share/singular/singular.idx +5002 -0
@@ -0,0 +1,3253 @@
1
+ ///////////////////////////////////////////////////////////////////////////////
2
+ version="version classify_aeq.lib 4.2.0.0 Dec_2020 "; // $Id: 6828f92522398155358ce9d17b3ca3002798baa3 $
3
+ category="Singularities";
4
+ info="
5
+ LIBRARY: classifyAeq.lib Simple Space Curve singularities in characteristic 0
6
+
7
+ AUTHORS: Faira Kanwal Janjua fairakanwaljanjua@gmail.com
8
+ Gerhard Pfister pfister@mathematik.uni-kl.de
9
+ Khawar Mehmood khawar1073@gmail.com
10
+
11
+ OVERVIEW: A library for classifying the simple singularities
12
+ with respect to A equivalence in characteristic 0.
13
+ Simple Surface singularities in characteristic O have been classified by Bruce and Gaffney [4] resp.
14
+ Gibson and Hobbs [1] with respect to A equivalence. If the input is one of the simple singularities in
15
+ [1] it returns a normal form otherwise a zero ideal(i.e not simple).
16
+
17
+ REFERENCES:
18
+ [1] Gibson,C.G; Hobbs,C.A.:Simple SIngularities of Space Curves.
19
+ Math.Proc. Comb.Phil.Soc.(1993),113,297.
20
+ [2] Hefez,A;Hernandes,M.E.:Standard bases for local rings of branches and their modules of differentials.
21
+ Journal of Symbolic Computation 42(2007) 178-191.
22
+ [3] Hefez,A;Hernandes,M.E.:The Analytic Classification Of Plane Branches. Bull.Lond Math Soc.43.(2011) 2,289-298.
23
+ [4] Bruce, J.W.,Gaffney, T.J.: Simple singularities of mappings (C, 0) ->(C2,0).
24
+ J. London Math. Soc. (2) 26 (1982), 465-474.
25
+ [5] Ishikawa,G; Janeczko,S.: The Complex Symplectic Moduli Spaces of Unimodal Parametric Plane Curve Singularities. Institute of Mathematics of the Polish Academy of Sciences,Preprint 664(2006)
26
+
27
+ PROCEDURES:
28
+ sagbiAlg(G); Compute the Sagbi-basis of the Algebra.
29
+ sagbiMod(I,A); Compute the Sagbi- basis of the Module.
30
+ semiGroup(G); Compute the Semi-Group of the Algebra provided the input is Sagbi Bases of the Algebra.
31
+ semiMod(I,A); Compute the Semi-Module provided that the input are the Sagbi Bases of the Algebra resp.Module.
32
+ planeCur(I); Compute the type of the Simple Plane Curve singularity.
33
+ spaceCur(I); Compute the type of the simple Space Curve singularity.
34
+ HHnormalForm(I); computes for the parametrization defined by I
35
+ normal form, semi group, semi module of differentials,
36
+ Zariski number and moduli
37
+ modSagbiAlg(G); modular variant of sagbiAlg
38
+ classSpaceCurve(I); normal form of I if I is simple
39
+ ";
40
+ LIB "algebra.lib";
41
+ LIB "curvepar.lib";
42
+ LIB "modstd.lib";
43
+ ///////////////////////////////////////////////////////////////////////////////
44
+ proc planeCur(ideal I)
45
+ "USAGE": planeCur(I); I ideal
46
+ RETURN: An ideal.Ideal is one of the singularity in the list of Bruce and Gaffney [4]
47
+ EXAMPLE: example planeCur; shows an example
48
+ "
49
+ {
50
+ def R=basering;
51
+ I=sortMOD(I);
52
+ list M;
53
+ list K;
54
+ if(I==0)
55
+ {return(I);}
56
+ ideal G=sagbiAlg(I);
57
+ list L=semiGroup(G);
58
+ ideal J=diff(G,var(1));
59
+ J=sagbiMod(J,G);
60
+ M=semiMod(J,G);
61
+ int C=L[2];
62
+ ideal Z=0,0;
63
+ if(L[1][1]>4)
64
+ {
65
+ return(Z);
66
+ }
67
+ if(L[1][1]==1)
68
+ {
69
+ ideal A=var(1);
70
+ K=Guess(A);
71
+ if(CompareList(M,K,6)!=0)
72
+ {
73
+ return(A);
74
+ }
75
+ else
76
+ {
77
+ return(Z);
78
+ }
79
+ }
80
+ if(L[1][1]==2)
81
+ {
82
+ ideal A=var(1)^2,var(1)^(L[2]+1);
83
+ K=Guess(A);
84
+ if(CompareList(M,K,6)!=0)
85
+ {
86
+ return(A);
87
+ }
88
+ else
89
+ {
90
+ return(Z);
91
+ }
92
+ }
93
+ if(L[1][1]==4)
94
+ {
95
+ if(L[1][2]==5)
96
+ {
97
+ intvec q=4,5;
98
+ if((L[1]==q)&&(L[2]==12)&&(size(L[3])==7))
99
+ {
100
+ intvec q1=3,4; intvec q2=3,4,10;
101
+ if((M[4]==q1)&&(M[5]==11)&&(size(M[6])==6))
102
+ {
103
+ ideal A=var(1)^4,var(1)^5;
104
+ K=Guess(A);
105
+ if(CompareList(M,K,6)!=0)
106
+ {
107
+ return(A);
108
+ }
109
+ }
110
+ if((M[4]==q2)&&(M[5]==7)&&(size(M[6])==3))
111
+ {
112
+ ideal A=var(1)^4,var(1)^5+var(1)^7;
113
+ K=Guess(A);
114
+ if(CompareList(M,K,6)!=0)
115
+ {
116
+ return(A);
117
+ }
118
+ }
119
+ else
120
+ {
121
+ return(Z);
122
+ }
123
+ }
124
+ else
125
+ {
126
+ return(Z);
127
+ }
128
+ }
129
+ if(L[1][2]==6)
130
+ {
131
+ ideal A=var(1)^4,var(1)^6+var(1)^(L[1][3]-6);
132
+ K=Guess(A);
133
+ if(L[1][3] mod 2 !=0)
134
+ {
135
+ ideal S=t4,t6+t^(M[2]-9);
136
+ if(CompareList(M,K,6)!=0)
137
+ {
138
+ return(S);
139
+ }
140
+ if(CompareList(M,K,6)==0)
141
+ {
142
+ int m=size(K[4])+1;
143
+ if(size(M[4])==m)
144
+ {
145
+ return(S);
146
+ }
147
+ else{return(Z);}
148
+ }
149
+ }
150
+ else
151
+ {
152
+ return(Z);
153
+ }
154
+ }
155
+ if(L[1][2]==7)
156
+ {
157
+ intvec q=4,7;list K;
158
+ ideal A=var(1)^4,var(1)^7;
159
+ ideal B=var(1)^4,var(1)^7+var(1)^9;
160
+ ideal T=var(1)^4,var(1)^7+var(1)^10;
161
+ list Q=A,B,T;
162
+ for(int i=1;i<=3;i++)
163
+ { K=Guess(Q[i]);
164
+ if(CompareList(M,K,6)!=0)
165
+ {
166
+ if(i==1)
167
+ {
168
+ return(A);
169
+ break;
170
+ }
171
+ if(i==2)
172
+ {
173
+ return(B);
174
+ break;
175
+ }
176
+ if(i==3)
177
+ {
178
+ return(T);
179
+ break;
180
+ }
181
+ }
182
+ }
183
+ else
184
+ {
185
+ return(Z);
186
+ }
187
+ }
188
+ else
189
+ {
190
+ return(Z);
191
+ }
192
+ }
193
+ if(L[1][1]==3)
194
+ {
195
+ int k=L[1][2]-1;
196
+ int p=L[1][2]-2;
197
+ if(k mod 3 ==0)
198
+ {
199
+ if(size(M[4])==2)
200
+ {
201
+ ideal A=var(1)^3,var(1)^L[1][2];
202
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5];
203
+ list Q=A,B;
204
+ for(int i=1;i<=2;i++)
205
+ { K=Guess(Q[i]);
206
+ if(CompareList(M,K,6)!=0)
207
+ {
208
+ return(Q[i]);
209
+ }
210
+ }
211
+ }
212
+ if(size(M[4])==3)
213
+ {
214
+ ideal A=var(1)^3,var(1)^L[1][2];
215
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5];
216
+ list Q=A,B;
217
+ for(int i=1;i<=2;i++)
218
+ { K=Guess(Q[i]);
219
+ if(CompareList(M,K,6)!=0)
220
+ {
221
+ return(Q[i]);
222
+ }
223
+ }
224
+ }
225
+ else
226
+ {
227
+ return(Z);
228
+ }
229
+ }
230
+ if(p mod 3 ==0)
231
+ {
232
+ if(size(M[4])==2)
233
+ {
234
+ ideal A=var(1)^3,var(1)^L[1][2];
235
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5];
236
+ list Q=A,B;
237
+ for(int i=1;i<=2;i++)
238
+ { K=Guess(Q[i]);
239
+ if(CompareList(M,K,6)!=0)
240
+ {
241
+ return(Q[i]);
242
+ }
243
+ }
244
+ }
245
+ if(size(M[4])==3)
246
+ {
247
+ ideal A=var(1)^3,var(1)^L[1][2];
248
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5];
249
+ list Q=A,B;
250
+ for(int i=1;i<=2;i++)
251
+ { K=Guess(Q[i]);
252
+ if(CompareList(M,K,6)!=0)
253
+ {
254
+ return(Q[i]);
255
+ }
256
+ }
257
+ }
258
+ else
259
+ {
260
+ return(Z);
261
+ }
262
+ }
263
+ else
264
+ {
265
+ return(Z)
266
+ }
267
+ }
268
+ }
269
+ example
270
+ {
271
+ "EXAMPLE:"; echo=2;
272
+ ring R=0,t,Ds;
273
+ ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t7+7t8+22t9+51t10+113t11+219t12+366t13+589t14+876t15+1170t16+1514t17
274
+ +1828t18+2011t19+2165t20+2163t21+1982t22+1806t23+1491t24+1141t25+889t26+588t27+379t28+252t29+120t30+72t31+36t32+9t33+9t34+t36;
275
+ planeCur(I);
276
+ }
277
+
278
+ ////////////////////////////////////////////////////////////////////////////////
279
+ proc spaceCur(ideal I)
280
+ "USAGE": spaceCur(I); I ideal
281
+ RETURN: an ideal. Ideal is one of the singularity in the list of C.G.Gibson and C.A.Hobbs.
282
+ EXAMPLE: example spaceCur; shows an example
283
+ "
284
+ {
285
+ def R=basering;
286
+ I=sortMOD(I);
287
+ list M;
288
+ list K;
289
+ if(I==0)
290
+ {return(I);}
291
+ ideal G=sagbiAlg(I);
292
+ if(size(G)<=2){return(planeCur(G));}
293
+ list L=semiGroup(G);
294
+ ideal J=diff(G,var(1));
295
+ J=sagbiMod(J,G);
296
+ M=semiMod(J,G);
297
+ int C=L[2];
298
+ ideal Z=0,0,0;
299
+ if(L[1][1]>5)
300
+ {
301
+ return(Z);
302
+ }
303
+ if(L[1][1]==3)
304
+ {
305
+ int k=L[1][2]-1;
306
+ int p=L[1][2]-2;
307
+ if(k mod 3 ==0)
308
+ {
309
+ poly q=var(1)*(J[2])-G[2];
310
+ if(leadexp(q)!=leadexp(J[3]))
311
+ {
312
+ if(size(M[4])!=3)
313
+ {
314
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
315
+ return(B);
316
+ }
317
+ if(size(M[4])==3)
318
+ {
319
+ ideal I1=G[1],G[2];
320
+ I1=sortMOD(I1);
321
+ ideal T=sagbiAlg(I1);
322
+ ideal J1=diff(T,var(1));
323
+ J1=sagbiMod(J1,T);
324
+ K=semiMod(J1,T);
325
+ if(size(K[4])!=2)
326
+ {
327
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
328
+ return(B);
329
+ }
330
+ if(size(K[4])==2)
331
+ {
332
+ ideal A=var(1)^3,var(1)^L[1][2],var(1)^L[1][3];
333
+ return(A);
334
+ }
335
+ }
336
+ }
337
+ if(leadexp(q)==leadexp(J[3]))
338
+ {
339
+ if(size(M[4])!=3)
340
+ {
341
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
342
+ return(B);
343
+ }
344
+ if(size(M[4])==3)
345
+ {
346
+ ideal I1=G[1],G[2];
347
+ I1=sortMOD(I1);
348
+ ideal T=sagbiAlg(I1);
349
+ ideal J1=diff(T,var(1));
350
+ J1=sagbiMod(J1,T);
351
+ K=semiMod(J1,T);
352
+ if(size(K[4])!=2)
353
+ {
354
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
355
+ return(B);
356
+ }
357
+ if(size(K[4])==2)
358
+ {
359
+ ideal A=var(1)^3,var(1)^L[1][2],var(1)^L[1][3];
360
+ return(A);
361
+ }
362
+ }
363
+ }
364
+ }
365
+ if(p mod 3 ==0)
366
+ {
367
+ poly q=var(1)^3*(J[2])-var(1)^2*(G[2]);
368
+ if(leadexp(q)!=leadexp(J[3]))
369
+ {
370
+ if(size(M[4])!=3)
371
+ {
372
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
373
+ return(B);
374
+ }
375
+ if(size(M[4])==3)
376
+ {
377
+ ideal I1=G[1],G[2];
378
+ I1=sortMOD(I1);
379
+ ideal T=sagbiAlg(I1);
380
+ ideal J1=diff(T,var(1));
381
+ J1=sagbiMod(J1,T);
382
+ K=semiMod(J1,T);
383
+ if(size(K[4])!=2)
384
+ {
385
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
386
+ return(B);
387
+ }
388
+ if(size(K[4])==2)
389
+ {
390
+ ideal A=var(1)^3,var(1)^L[1][2],var(1)^L[1][3];
391
+ return(A);
392
+ }
393
+ }
394
+ }
395
+ if(leadexp(q)==leadexp(J[3]))
396
+ {
397
+ if(size(M[4])!=3)
398
+ {
399
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
400
+ return(B);
401
+ }
402
+ if(size(M[4])==3)
403
+ {
404
+ ideal I1=G[1],G[2];
405
+ ideal T=sagbiAlg(I1);
406
+ ideal J1=diff(T,var(1));
407
+ J1=sagbiMod(J1,T);
408
+ K=semiMod(J1,T);
409
+ if(size(K[4])!=2)
410
+ {
411
+ ideal B=var(1)^3,var(1)^L[1][2]+var(1)^M[5],var(1)^L[1][3];
412
+ return(B);
413
+ }
414
+ if(size(K[4])==2)
415
+ {
416
+ ideal A=var(1)^3,var(1)^L[1][2],var(1)^L[1][3];
417
+ return(A);
418
+ }
419
+ }
420
+ }
421
+ }
422
+ else
423
+ {
424
+ return(Z);
425
+ }
426
+ }
427
+ if(L[1][1]==4)
428
+ {
429
+ if(L[1][2]==5)
430
+ {
431
+ if(L[1][3]==11)
432
+ {
433
+ ideal A=var(1)^4,var(1)^5,var(1)^11;
434
+ ideal B=var(1)^4,var(1)^5+var(1)^7,var(1)^11;
435
+ list Q=A,B;
436
+ ideal Ij=jet(I,10);
437
+ Ij=simplify(Ij,2);
438
+ ideal Gj=sagbiAlg(Ij);
439
+ list Lj=semiGroup(Gj);
440
+ ideal Jj=diff(Gj,var(1));
441
+ Jj=sagbiMod(Jj,Gj);
442
+ list Mj=semiMod(Jj,Gj);
443
+ if(size(Mj[4])==2)
444
+ {
445
+ K=Guess(Q[1]);
446
+ if(CompareList(M,K,6)!=0)
447
+ {
448
+ return(Q[1]);
449
+ }
450
+ }
451
+ if(size(Mj[4])==3)
452
+ {
453
+ K=Guess(Q[2]);
454
+ if(CompareList(M,K,6)!=0)
455
+ {
456
+ return(Q[2]);
457
+ }
458
+ }
459
+ }
460
+ if(L[1][3]!=11)
461
+ {
462
+ ideal A=var(1)^4,var(1)^5,var(1)^6;
463
+ ideal B=var(1)^4,var(1)^5,var(1)^7;
464
+ list Q=A,B;
465
+ for(int i=1;i<=2;i++)
466
+ {
467
+ K=Guess(Q[i]);
468
+ if(CompareList(M,K,6)!=0)
469
+ {
470
+ return(Q[i]);
471
+ break;
472
+ }
473
+ }
474
+ }
475
+ else
476
+ {return(Z);
477
+ }
478
+ }
479
+ if(L[1][2]==6)
480
+ {
481
+ if(size(L[1])==3)
482
+ {
483
+ if(size(M[4])==3)
484
+ {
485
+ ideal A=var(1)^4,var(1)^6,var(1)^L[1][3];
486
+ K=Guess(A);
487
+ if(CompareList(M,K,6)!=0)
488
+ {
489
+ return(A);
490
+ }
491
+ else
492
+ {
493
+ return(Z);
494
+ }
495
+ }
496
+ if(size(M[4])==4)
497
+ {
498
+ ideal A=var(1)^4,var(1)^6+var(1)^(L[1][3]-2),var(1)^L[1][3];
499
+ K=Guess(A);
500
+ if(CompareList(M,K,6)!=0)
501
+ {
502
+ return(A);
503
+ }
504
+ else
505
+ {
506
+ return(Z);
507
+ }
508
+ }
509
+ }
510
+ if(size(L[1])==4)
511
+ {
512
+ if(size(M[4])==4)
513
+ {
514
+ ideal A=var(1)^4,var(1)^6+var(1)^(L[1][3]-4),var(1)^L[1][3];
515
+ K=Guess(A);
516
+ if(CompareList(M,K,6)!=0)
517
+ {
518
+ return(A);
519
+ }
520
+ else
521
+ {
522
+ return(Z);
523
+ }
524
+ }
525
+ if(size(M[4])==5)
526
+ {
527
+ ideal A=var(1)^4,var(1)^6+var(1)^(L[1][4]-8),var(1)^L[1][4];
528
+ K=Guess(A);
529
+ if(CompareList(M,K,6)!=0)
530
+ {
531
+ return(A);
532
+ }
533
+ else
534
+ {
535
+ return(Z);
536
+ }
537
+ }
538
+ }
539
+ else
540
+ {
541
+ return(Z);
542
+ }
543
+ }
544
+ if(L[1][2]==7)
545
+ {
546
+ if(L[1][3]==9)
547
+ {
548
+ ideal A=var(1)^4,var(1)^7,var(1)^9+var(1)^10;
549
+ ideal B=var(1)^4,var(1)^7,var(1)^9;
550
+ list Q=A,B;
551
+ for(int i=1;i<=2;i++)
552
+ {
553
+ K=Guess(Q[i]);
554
+ if(CompareList(M,K,6)!=0)
555
+ {
556
+ return(Q[i]);
557
+ break;
558
+ }
559
+ }
560
+ }
561
+ if(L[1][3]==10)
562
+ {
563
+ ideal A=var(1)^4,var(1)^7,var(1)^10;
564
+ ideal B=var(1)^4,var(1)^7+var(1)^9,var(1)^10;
565
+ list Q=A,B;
566
+ for(int i=1;i<=2;i++)
567
+ {
568
+ K=Guess(Q[i]);
569
+ if(CompareList(M,K,6)!=0)
570
+ {
571
+ return(Q[i]);
572
+ break;
573
+ }
574
+ }
575
+ }
576
+ if(L[1][3]==13)
577
+ {
578
+ ideal A=var(1)^4,var(1)^7,var(1)^13;
579
+ ideal B=var(1)^4,var(1)^7+var(1)^9,var(1)^13;
580
+ list Q=A,B;
581
+ ideal Ij=jet(I,12);
582
+ Ij=simplify(Ij,2);
583
+ ideal Gj=sagbiAlg(Ij);
584
+ list Lj=semiGroup(Gj);
585
+ ideal Jj=diff(Gj,var(1));
586
+ Jj=sagbiMod(Jj,Gj);
587
+ Jj=jet(Jj,12);
588
+ Jj=simplify(Jj,2);
589
+ list Mj=semiMod(Jj,Gj);
590
+ if(size(Jj)==2)
591
+ {
592
+ K=Guess(Q[1]);
593
+ if(CompareList(M,K,6)!=0)
594
+ {
595
+ return(A);
596
+ break;
597
+ }
598
+ }
599
+ if(size(Jj)==3)
600
+ {
601
+ K=Guess(Q[2]);
602
+ if(CompareList(M,K,6)!=0)
603
+ {
604
+ return(B);
605
+ break;
606
+ }
607
+ }
608
+ }
609
+ if(L[1][3]==17)
610
+ {
611
+ ideal A=var(1)^4,var(1)^7,var(1)^17;
612
+ ideal B=var(1)^4,var(1)^7+var(1)^9,var(1)^17;
613
+ ideal T=var(1)^4,var(1)^7+var(1)^10,var(1)^17;
614
+ list Q=A,B,T;
615
+ for(int i=1;i<=3;i++)
616
+ {
617
+ K=Guess(Q[i]);
618
+ if(CompareList(M,K,6)!=0)
619
+ {
620
+ if(i==2)
621
+ {
622
+ return(Q[i]);
623
+ break;
624
+ }
625
+ else
626
+ {
627
+ ideal Ij=jet(I,16);
628
+ Ij=simplify(Ij,2);
629
+ ideal Gj=sagbiAlg(Ij);
630
+ list Lj=semiGroup(Gj);
631
+ ideal Jj=diff(Gj,var(1));
632
+ Jj=sagbiMod(Jj,Gj);
633
+ Jj=jet(Jj,16);
634
+ Jj=simplify(Jj,2);
635
+ list Mj=semiMod(Jj,Gj);
636
+ if(size(Jj)==2)
637
+ {
638
+ if(CompareList(M,K,6)!=0)
639
+ {
640
+ return(A);
641
+ break;
642
+ }
643
+ }
644
+ if(size(Jj)==3)
645
+ {
646
+ if(CompareList(M,K,6)!=0)
647
+ {
648
+ return(T);
649
+ break;
650
+ }
651
+ }
652
+ }
653
+ }
654
+ }
655
+ }
656
+ else
657
+ {
658
+ return(Z);
659
+ }
660
+ }
661
+ }
662
+ }
663
+ example
664
+ {
665
+ "EXAMPLE:"; echo=2;
666
+ ring R=0,t,Ds;
667
+ ideal I=t3+3t4+3t5+t6,t13+14t14+92t15+377t16+1079t17+2288t18+3718t19+4719t20+4719t21+3718t22+2288t23+1079t24+377t25+92t26+14t27+t28,t17+17t18+136t19+680t20+2380t21+6188t22+12376t23+19448t24+24310t25+24310t26+19448t27+12376t28+6188t29+2380t30+680t31+136t32+17t33+t34;
668
+ spaceCur(I);
669
+ }
670
+
671
+ ////////////////////////////////////////////////////////////////////////////////
672
+ proc sagbiAlg(ideal I,list #) //AENDERUNG
673
+ "USAGE": sagbiAlg(I); I ideal
674
+ RETURN: An ideal.The sagbi bases of I.
675
+ EXAMPLE: example sagbiAlg; shows an example
676
+ {
677
+ def R=basering;
678
+ def O=changeord(list(list("Ds",nvars(R))));
679
+ setring O;
680
+ ideal I=imap(R,I);
681
+ ideal L;
682
+ poly h;
683
+ int z,n;
684
+
685
+ if(size(I)==0){return(I);}
686
+ if(size(#)==0)
687
+ {
688
+ int b=ConductorBound(I);
689
+ // int b=200;
690
+ // b=correctBound(I,b);
691
+ }
692
+ else
693
+ {
694
+ int b=#[1];
695
+ }
696
+ ideal S=interReduceSagbi(I,b) ;
697
+ // b=correctBound(S,b);
698
+ while(size(S)!=n)
699
+ {
700
+ n=size(S);
701
+ L=sagbiSP(S);
702
+ for (z=1;z<=size(L);z++)
703
+ {
704
+ h=sagbiNF(L[z],S,b);
705
+ if(h!=0)
706
+ {
707
+ S=insertOne(h,S,b);
708
+ }
709
+ }
710
+ }
711
+ b=semiGroup(S)[2]+1;
712
+ // S=jet(S,b);
713
+ setring R;
714
+ ideal S=imap(O,S);
715
+ return(S);
716
+ }
717
+ example
718
+ {
719
+ "EXAMPLE:"; echo=2;
720
+ ring R=0,t,ds;
721
+ ideal I=t8,t10+t13,t12+t15;
722
+ sagbiAlg(I);
723
+ I=t8,t10+t13,t12+2t15;
724
+ sagbiAlg(I);
725
+ }
726
+ ////////////////////////////////////////////////////////////////////////////////
727
+ static proc reducedSagbiAlg(ideal I,list #)
728
+ {
729
+ I=sagbiAlg(I,#);
730
+ intvec L=semiGroup(I)[3];
731
+ if(size(#)==0)
732
+ {
733
+ int b=findConductor(L);
734
+ }
735
+ else
736
+ {
737
+ int b=#[1];
738
+ }
739
+ int i;
740
+ poly q;
741
+ for(i=1;i<=size(I);i++)
742
+ {
743
+ q=I[i]-lead(I[i]);
744
+ q=sagbiNF(q,I,b);
745
+ I[i]=lead(I[i])+q;
746
+ }
747
+ return(I);
748
+ }
749
+ example
750
+ {
751
+ "EXAMPLE:"; echo=2;
752
+ ring R=0,t,ds;
753
+ ideal I=t4+2t9,t9+t10+19/18t11-3t12+t13-t14;
754
+ reducedSagbiAlg(I);
755
+ }
756
+ ////////////////////////////////////////////////////////////////////////////////
757
+ static proc classifyAEQunimodal(ideal I)
758
+ "USAGE": classifyAEQunimodal(I); I ideal generated by 2 polynomials
759
+ RETURN: An ideal.Ideal is one of the singularity in the list of Ishikawa and Jenczko [5]
760
+ EXAMPLE: example classifyAEQunimodal; shows an example
761
+ "
762
+ {
763
+ def R=basering;
764
+ ring @S=0,t,ds;
765
+ ideal I=fetch(R,I);
766
+ ideal J;
767
+ poly g;
768
+ if(size(I)>=3){ERROR("not a plane curve");}
769
+ I=simplify(I,2); //deletes zero's i I
770
+ I=simplify(I,1); //creates monic generators in I
771
+ if(ord(I[1])>ord(I[2])){poly q=I[2];I[2]=I[1];I[1]=q;}
772
+ if((ord(I[1])>=6)||(ord(I[1])<=3)){return("not in the unimodal list");}
773
+ //compute estimate of the term with the modulus
774
+ int c=ord(sagbiNF(I[2],ideal(I[1]),10));
775
+ if(c==10)
776
+ {
777
+ if(ord(I[1])!=4){return("not in the unimodal list");}
778
+ c=ord(I[2][2])+2;
779
+ }
780
+ else
781
+ {
782
+ c=0;
783
+ intvec v=ord(I[1]),ord(I[2]);
784
+ if(v==intvec(5,6)){c=14;}
785
+ if(v==intvec(5,7)){c=18;}
786
+ if(v==intvec(5,8)){c=22;}
787
+ if(v==intvec(4,9)){c=19;}
788
+ if(v==intvec(4,11)){c=25;}
789
+ if(c==0){return("not in the unimodal list");}
790
+ }
791
+ while(size(I[1])>1)
792
+ {
793
+ I=jet(subst(I,t,t-number(1)/number(ord(I[1]))*leadcoef(I[1][2])*t^(ord(I[1][2])-ord(I[1])+1)),c);
794
+ }
795
+ ideal G=I;
796
+ G[2]=sagbiNF(G[2],ideal(G[1]),c);
797
+ ideal M=sagbiMod(diff(G,t),G);
798
+ list K=semiMod(M,G);
799
+
800
+ if(K[1]==intvec(4,9))
801
+ {
802
+ if(K[4]==intvec(3,8)){J=t4,t9;}
803
+ if(K[4]==intvec(3,8,22)){J=t4,t9+t19;}
804
+ if(K[4]==intvec(3,8,18)){J=t4,t9+t15;}
805
+ if(K[4]==intvec(3,8,14)){J=t4,t9+t11;}
806
+ if(K[4]==intvec(3,8,13))
807
+ {
808
+ G=reducedSagbiAlg(G,15);
809
+ if(ord(G[2][4])==14)
810
+ {
811
+ //kill the term t14 by some transformation
812
+ G=subst(G,t,t-leadcoef(G[2][4])/9*t^6);
813
+ G=jet(G,15);
814
+ G[1]=sagbiNF(G[1],ideal(G[2]),15);
815
+ //arrange the first element to be t4
816
+ while(size(G[1])>1)
817
+ {
818
+ G=subst(G,t,t-1/4*(G[1]-lead(G[1]))/t^3);
819
+ G=jet(G,15);
820
+ }
821
+ }
822
+ G[2]=sagbiNF(G[2],ideal(G[1]),15);
823
+ //arrange the coefficient of t10 to become 1
824
+ number m=leadcoef(G[2]-lead(G[2]));
825
+ G[2]=m^9*subst(G[2],t,1/m*t);
826
+ J=G;
827
+ }
828
+ if(K[4]==intvec(3,8,13,18))
829
+ {
830
+ G=reducedSagbiAlg(G,11);
831
+ number m=leadcoef(G[2]-lead(G[2]));
832
+ G[2]=m^9*subst(G[2],t,1/m*t);
833
+ J=G;
834
+ }
835
+ }
836
+ if(K[1]==intvec(4,11))
837
+ {
838
+ if(K[4]==intvec(3,10)){J=t4,t11;}
839
+ if(K[4]==intvec(3,10,28)){J=t4,t11+t25;}
840
+ if(K[4]==intvec(3,10,24)){J=t4,t11+t21;}
841
+ if(K[4]==intvec(3,10,20)){J=t4,t11+t17;}
842
+ if(K[4]==intvec(3,10,16))
843
+ {
844
+ G=reducedSagbiAlg(G,14);
845
+ number m=leadcoef(G[2]-lead(G[2]));
846
+ number l=leadcoef(G[2][3]);
847
+ //lambda^2=l^2/m^3
848
+ J=G;
849
+ }
850
+ if(K[4]==intvec(3,10,17))
851
+ {
852
+ G=reducedSagbiAlg(G,21);
853
+ if(ord(G[2][4])==18)
854
+ {
855
+ //kill the term t18 by some transformation
856
+ G=subst(G,t,t-leadcoef(G[2][4])/11*t^8);
857
+ G=jet(G,21);
858
+ G[1]=sagbiNF(G[1],ideal(G[2]),21);
859
+ //arrange the first element to be t4
860
+ while(size(G[1])>1)
861
+ {
862
+ G=subst(G,t,t-1/4*(G[1]-lead(G[1]))/t^3);
863
+ G=jet(G,21);
864
+ }
865
+ }
866
+ G[2]=sagbiNF(G[2],ideal(G[1]),21);
867
+ //arrange the coefficient of t14 to become 1
868
+ number m=leadcoef(G[2]-lead(G[2]));
869
+ number l=leadcoef(G[2][4]);
870
+ //lambda^2=l^3/m^10
871
+ J=G;
872
+ }
873
+ if(K[4]==intvec(3,10,17,24))
874
+ {
875
+ G=reducedSagbiAlg(G,18);
876
+ //arrange the coefficient of t14 to become 1
877
+ number m=leadcoef(G[2]-lead(G[2]));
878
+ G[2]=t11+t14+leadcoef(G[2][3])/m^2*t17;
879
+ J=G;
880
+ }
881
+ }
882
+ if((size(K[1])==3)&&(K[1][1]==4)&&(K[1][2]==10))
883
+ {
884
+ int l=(K[1][3]-19) div 2;
885
+ G=reducedSagbiAlg(G,2*l+12);
886
+ number m=leadcoef(G[2]-lead(G[2]));
887
+ number s=leadcoef(G[2][3]);
888
+ //lambda^(2l-1)=s^(2l-1)/m^(2l+1)
889
+ J=G;
890
+ }
891
+ if(K[1]==intvec(5,6))
892
+ {
893
+ if(K[4]==intvec(4,5)){J=t5,t6;}
894
+ if(K[4]==intvec(4,5,18)){J=t5,t6+t14;}
895
+ if(K[4]==intvec(4,5,13)){J=t5,t6+t9;}
896
+ if(K[4]==intvec(4,5,12))
897
+ {
898
+ G=reducedSagbiAlg(G,9);
899
+ if(ord(G[2][2])==7)
900
+ {
901
+ //kill the term t7 by some transformation
902
+ G=subst(G,t,t-leadcoef(G[2][2])/6*t^2);
903
+ G=jet(G,10);
904
+ G[1]=sagbiNF(G[1],ideal(G[2]),9);
905
+ //arrange the first element to be t4
906
+ while(size(G[1])>1)
907
+ {
908
+ G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
909
+ G=jet(G,9);
910
+ }
911
+ }
912
+ G[2]=sagbiNF(G[2],ideal(G[1]),9);
913
+ //arrange the coefficient of t8 to become 1
914
+ number m=leadcoef(G[2]-lead(G[2]));
915
+ number l=leadcoef(G[2][3]);
916
+ //lambda^2=l^2/m^3
917
+ J=G;
918
+
919
+ }
920
+ }
921
+ if(K[1]==intvec(5,7))
922
+ {
923
+ if(K[4]==intvec(4,6)){J=t5,t7;}
924
+ if(K[4]==intvec(4,6,22)){J=t5,t7+t18;}
925
+ if(K[4]==intvec(4,6,17)){J=t5,t7+t13;}
926
+ if(K[4]==intvec(4,6,12))
927
+ {
928
+ G=reducedSagbiAlg(G,11);
929
+ if(ord(G[2][3])==9)
930
+ {
931
+ //kill the term t9 by some transformation
932
+ G=subst(G,t,t-leadcoef(G[2][3])/7*t^3);
933
+ G=jet(G,11);
934
+ G[1]=sagbiNF(G[1],ideal(G[2]),11);
935
+ //arrange the first element to be t4
936
+ while(size(G[1])>1)
937
+ {
938
+ G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
939
+ G=jet(G,11);
940
+ }
941
+ }
942
+ G[2]=sagbiNF(G[2],ideal(G[1]),11);
943
+ //arrange the coefficient of t8 to become 1
944
+ number m=leadcoef(G[2]-lead(G[2]));
945
+ G[2]=m^7*subst(G[2],t,1/m*t);
946
+ J=G;
947
+ }
948
+ if(K[4]==intvec(4,6,15))
949
+ {
950
+ G=reducedSagbiAlg(G,14);
951
+ if(ord(G[2][2])==9)
952
+ {
953
+ //kill the term t9 by some transformation
954
+ G=subst(G,t,t-leadcoef(G[2][2])/7*t^3);
955
+ G=jet(G,14);
956
+ G[1]=sagbiNF(G[1],ideal(G[2]),14);
957
+ //arrange the first element to be t4
958
+ while(size(G[1])>1)
959
+ {
960
+ G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
961
+ G=jet(G,14);
962
+ }
963
+ }
964
+ G[2]=sagbiNF(G[2],ideal(G[1]),14);
965
+ //arrange the coefficient of t11 to become 1
966
+ number m=leadcoef(G[2]-lead(G[2]));
967
+ number l=leadcoef(G[2][3]);
968
+ //lambda^2=l^2/m^3
969
+ J=G;
970
+ }
971
+
972
+ }
973
+ if(K[1]==intvec(5,8))
974
+ {
975
+ if(K[4]==intvec(4,7)){J=t5,t8;}
976
+ if(K[4]==intvec(4,7,26)){J=t5,t8+t22;}
977
+ if(K[4]==intvec(4,7,21)){J=t5,t8+t17;}
978
+ if(K[4]==intvec(4,7,13))
979
+ {
980
+ G=reducedSagbiAlg(G,12);
981
+ if(ord(G[2][3])==11)
982
+ {
983
+ //kill the term t11 by some transformation
984
+ G=subst(G,t,t-leadcoef(G[2][3])/8*t^4);
985
+ G=jet(G,12);
986
+ G[1]=sagbiNF(G[1],ideal(G[2]),12);
987
+ //arrange the first element to be t4
988
+ while(size(G[1])>1)
989
+ {
990
+ G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
991
+ G=jet(G,12);
992
+ }
993
+ }
994
+ G[2]=sagbiNF(G[2],ideal(G[1]),12);
995
+ //arrange the coefficient of t9 to become 1
996
+ number m=leadcoef(G[2]-lead(G[2]));
997
+ G[2]=m^8*subst(G[2],t,1/m*t);
998
+ J=G;
999
+ }
1000
+
1001
+ if(K[4]==intvec(4,7,16))
1002
+ {
1003
+ G=reducedSagbiAlg(G,14);
1004
+ if(ord(G[2][2])==11)
1005
+ {
1006
+ //kill the term t11 by some transformation
1007
+ G=subst(G,t,t-leadcoef(G[2][2])/8*t^4);
1008
+ G=jet(G,14);
1009
+ G[1]=sagbiNF(G[1],ideal(G[2]),14);
1010
+ //arrange the first element to be t4
1011
+ while(size(G[1])>1)
1012
+ {
1013
+ G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
1014
+ G=jet(G,14);
1015
+ }
1016
+ }
1017
+ G[2]=sagbiNF(G[2],ideal(G[1]),14);
1018
+ //arrange the coefficient of t12 to become 1
1019
+ number m=leadcoef(G[2]-lead(G[2]));
1020
+ number l=leadcoef(G[2][3]);
1021
+ //lambda^2=l^2/m^3
1022
+ J=G;
1023
+
1024
+ }
1025
+ if(K[4]==intvec(4,7,18))
1026
+ {
1027
+ G=reducedSagbiAlg(G,17);
1028
+ if(ord(G[2][2])==11)
1029
+ {
1030
+ //kill the term t11 by some transformation
1031
+ G=subst(G,t,t-leadcoef(G[2][2])/8*t^4);
1032
+ G=jet(G,17);
1033
+ G[1]=sagbiNF(G[1],ideal(G[2]),17);
1034
+ //arrange the first element to be t4
1035
+ while(size(G[1])>1)
1036
+ {
1037
+ G=subst(G,t,t-1/5*(G[1]-lead(G[1]))/t^4);
1038
+ G=jet(G,17);
1039
+ }
1040
+ }
1041
+ G[2]=sagbiNF(G[2],ideal(G[1]),17);
1042
+ //arrange the coefficient of t12 to become 1
1043
+ number m=leadcoef(G[2]-lead(G[2]));
1044
+ number l=leadcoef(G[2][3]);
1045
+ //lambda^2=l^2/m^3
1046
+ J=G;
1047
+ }
1048
+ }
1049
+ setring R;
1050
+ ideal J=fetch(@S,J);
1051
+ if(size(J)==0)
1052
+ {
1053
+ return("not in the unimodal list");
1054
+ }
1055
+ return(J);
1056
+ }
1057
+ example
1058
+ {
1059
+ "EXAMPLE:"; echo=2;
1060
+ ring R=0,t,ds;
1061
+ ideal I=t4,9t9+18t10+38t11-216t12+144t13-288t14;
1062
+ classifyAEQunimodal(I);
1063
+ I=t4,9t9+18t10+40t11-216t12+144t13-288t14;
1064
+ classifyAEQunimodal(I);
1065
+ I=t4,t11+t12+3t14+2t15+7t16+7t17;
1066
+ classifyAEQunimodal(I);
1067
+ I=t4,t11+t14+25/22t17+3t18+4t21;
1068
+ classifyAEQunimodal(I);
1069
+ I=t5,t6+2t7+t8+3t9;
1070
+ classifyAEQunimodal(I);
1071
+ I=t5,t7+3t8+3t9+5t10;
1072
+ classifyAEQunimodal(I);
1073
+ I=t5,t7+3t11+3t12+5t13;
1074
+ classifyAEQunimodal(I);
1075
+ I=t5,t8+3t9+5t10+2t11+3t12+5t13;
1076
+ classifyAEQunimodal(I);
1077
+ I=t5,t8+5t11+3t12+7t13+5t14;
1078
+ classifyAEQunimodal(I);
1079
+ I=t5,t8+5t11+7t13+5t14+7t15+2t16+8t17;
1080
+ classifyAEQunimodal(I);
1081
+ I=subst(I,t,t+t2);
1082
+ classifyAEQunimodal(I);
1083
+ I=t4+2t5+3t6+5t7+t8,9t9+18t10+40t11-216t12+144t13-288t14;
1084
+ classifyAEQunimodal(I);
1085
+ }
1086
+ ////////////////////////////////////////////////////////////////////////////////
1087
+ static proc computeModulus(poly p)
1088
+ "USAGE": computeModulus(p); p monic poly with 3 or 4 monomials
1089
+ RETURN: A polynomial with first and second coefficient 1
1090
+ EXAMPLE: computeModulus; shows an example
1091
+ ASSUME: the basering has one vearable and one parameter
1092
+ "
1093
+ {
1094
+ def R=basering;
1095
+ int a1=ord(p);
1096
+ int a2=ord(p-lead(p));
1097
+ number m=leadcoef(p-lead(p));
1098
+
1099
+ poly q=par(1)^(a2-a1)-1/m;
1100
+ ring S=(0,a),t,ds;
1101
+ number m=fetch(R,m);
1102
+ minpoly=par(1)^(a2-a1)-1/m;
1103
+ poly p=fetch(R,p);
1104
+ p=1/par(1)^a1*subst(p,var(1),par(1)*var(1));
1105
+ setring R;
1106
+ p=imap(S,p);
1107
+ return(list(p,q));
1108
+ }
1109
+ example
1110
+ {
1111
+ "EXAMPLE:"; echo=2;
1112
+ ring R=(0,a),t,ds;
1113
+ poly p=t8-395/16t14+4931/32t17;
1114
+ computeModulus(p);
1115
+ p=t8+3t12-395/16t14;
1116
+ computeModulus(p);
1117
+ p=t8-395/16t14+4931/32t17;
1118
+ computeModulus(p);
1119
+
1120
+ }
1121
+
1122
+ ////////////////////////////////////////////////////////////////////////////////
1123
+ static proc n_thRoot(poly p,int n, int b)
1124
+ {
1125
+ //computes the n-th root of 1+p up to order b
1126
+ //assumes that p(0)=0
1127
+ poly s=1;
1128
+ poly q=jet(p,b);
1129
+ if(q==0){return(s);}
1130
+ int i;
1131
+ for(i=1;i<=b;i++)
1132
+ {
1133
+ s=s+bino(n,i)*q;
1134
+ q=jet(q*p,b);
1135
+ }
1136
+ return(jet(s,b));
1137
+ }
1138
+ ////////////////////////////////////////////////////////////////////////////////
1139
+ static proc bino(number n, int i)
1140
+ {
1141
+ //computes the i-th binomial coefficient of 1/n
1142
+ if(i==0){return(1);}
1143
+ return(bino(n,i-1)*(1/n-i+1)/i);
1144
+ }
1145
+ ////////////////////////////////////////////////////////////////////////////////
1146
+ proc sagbiMod(ideal I,ideal G)
1147
+ "USAGE": sagbiMod(I,G); I an ideal module and ideal G being the sagbi bases of the Algebra
1148
+ RETURN: An ideal. the sagbi bases for the differential module.
1149
+ EXAMPLE: example sagbiMod; shows an example
1150
+ {
1151
+ def R=basering;//up till now the ordering of the base ring is ds
1152
+ def O=changeord(list(list("Ds",nvars(R))));
1153
+ setring O;
1154
+ ideal I=imap(R,I);
1155
+ ideal G=imap(R,G);
1156
+ int n=ncols(G);poly h;
1157
+ if(I==0)
1158
+ { return(I);}
1159
+ ideal S,J,M;
1160
+ I=sortMOD(I);
1161
+ if(deg(lead(I[1]))<=1)
1162
+ { setring R;
1163
+ return(imap(O,I));}
1164
+ int b=semiGroup(lead(G))[2]+deg(lead(I[1])); //AENDERUNG11.16
1165
+ list P;int i;
1166
+ P=createP(I);
1167
+ while(size(P)!=0)
1168
+ {
1169
+ //size(P);
1170
+ J=P[1][1],P[1][2];
1171
+ P=delete(P,1);
1172
+ S=SpolyMOD(J,G);
1173
+ for(i=1;i<=size(S);i++)
1174
+ {
1175
+ h=sagbiNFMOD(S[i],G,I,b);
1176
+ if(h!=0)
1177
+ {
1178
+ h=simplify(h,1);
1179
+ P=enlargeP(h,P,I);
1180
+ I[size(I)+1]=h;
1181
+ }
1182
+ }
1183
+ //I=sortMOD(I);
1184
+ //b=semiMod(I,G)[5]+1;
1185
+ //"clean";
1186
+ // I=cleanI(I,G,b);
1187
+ //lead(I);
1188
+ }
1189
+ I=sortMOD(I);
1190
+ setring R;
1191
+ ideal K=imap(O,I);
1192
+ return(K);
1193
+ }
1194
+ example
1195
+ {
1196
+ "EXAMPLE:"; echo=2;
1197
+ ring r=0,t,Ds;
1198
+ ideal G=t8,t10+t13,t12+t15,t23-t29,t27;
1199
+ ideal I=diff(G,t);
1200
+ sagbiMod(I,G);
1201
+ }
1202
+
1203
+ static proc cleanI(ideal I, ideal G, int b)
1204
+ {
1205
+ int i;
1206
+ ideal J;
1207
+ I=jet(I,b);
1208
+ I=simplify(I,2);
1209
+ int n=size(I);
1210
+ for(i=n;i>1;i--)
1211
+ {
1212
+ J=I[1..i-1];
1213
+ I[i]=sagbiNFMOD(I[i],G,J,b);
1214
+ }
1215
+ I=simplify(I,2);
1216
+ return(I);
1217
+ }
1218
+ ////////////////////////////////////////////////////////////////////////////////
1219
+ proc semiGroup(ideal I)
1220
+ "USAGE": semiGroup(I); I ideal the sagbi bases of Algebra.
1221
+ RETURN: list L; list with three entries associated to the algebra generated by
1222
+ the sagbi basis:
1223
+ generators of the semigroup
1224
+ the conductor
1225
+ the semigroup
1226
+ EXAMPLE: example planeCur; shows an example
1227
+ {
1228
+ list M;
1229
+ if(deg(I[1])<=1)
1230
+ {
1231
+ M[1]=intvec(1);
1232
+ M[2]=1;
1233
+ M[3]=intvec(0,1);
1234
+ }
1235
+ else
1236
+ {
1237
+ ideal J=lead(I);
1238
+ int b=ConductorBound(J);
1239
+ int i;
1240
+ list L=J[1];
1241
+ for(i=2;i<=size(J);i++)
1242
+ {
1243
+ L[i]=J[i];
1244
+ }
1245
+ M=WSemigroup(L,b);
1246
+ intvec v=0,M[3];
1247
+ M[3]=cutAfterConductor(v);
1248
+ M[2]=findConductor(M[3]);
1249
+ }
1250
+ return(M);
1251
+ }
1252
+
1253
+ example
1254
+ {
1255
+ "EXAMPLE:"; echo=2;
1256
+ ring R=0,t,ds;
1257
+ ideal I=t8,t10+t13,t12+t15,t23-t29,t27;
1258
+ semiGroup(I);
1259
+ I=t8,t10+t13,t12+2t15,t27-3t33,t29;
1260
+ semiGroup(I);
1261
+ }
1262
+
1263
+ ////////////////////////////////////////////////////////////////////////////////
1264
+ proc semiMod(ideal I,ideal G)
1265
+ "USAGE": semiMod(I,G); I ideal,G ideal;I and G are the sagbi bases of the differential module resp.Algebra.
1266
+ RETURN: list K;
1267
+ K[1]min generators of the semialgebra.
1268
+ K[2]conductor of the algebra.
1269
+ K[3]genrators for the semialgebra.
1270
+ K[4]min generators of the module.
1271
+ K[5]conductor of the module.
1272
+ K[6]semigroup of the module.
1273
+ EXAMPLE: example semiMod; shows an example
1274
+ {
1275
+ list L=semiGroup(G);
1276
+ intvec M;
1277
+ list C;intvec S;
1278
+ int j; int k; int b;
1279
+ for(int i=1;i<=size(I);i++)
1280
+ {
1281
+ M[size(M)+1]=ord(I[i]);
1282
+ }
1283
+ M=M[2..size(M)];
1284
+ for(i=1;i<=size(M);i++)
1285
+ {
1286
+ C[size(C)+1]=M[i]+L[3];
1287
+ }
1288
+ int a=M[1]+L[2];
1289
+ for(j=1;j<=size(M);j++)
1290
+ {
1291
+ for(i=0;i<=a;i++)
1292
+ {
1293
+ for(k=1;k<=size(L[3]);k++)
1294
+ {
1295
+ if(i==C[j][k])
1296
+ {
1297
+ S[size(S)+1]=i;
1298
+ }
1299
+ }
1300
+ }
1301
+ }
1302
+ S=S[2..size(S)];
1303
+ list K;
1304
+ K[1]=L[1];//generators of the semialgebra.
1305
+ K[2]=L[2];//conductor of the algebra.
1306
+ K[3]=L[3];//semi group of the algebra.
1307
+ K[4]=M;// generators of the semimodule.
1308
+ K[5]=findConductor(sortIntvec(S)); //conductor of the module.
1309
+ K[6]=cutAfterConductor(sortIntvec(S));//semigroup of the module.
1310
+ return(K);
1311
+ }
1312
+ example
1313
+ {
1314
+ "EXAMPLE:"; echo=2;
1315
+ ring r=0,t,Ds;
1316
+ ideal G=t4,t7+t10;
1317
+ ideal I=diff(G,t);
1318
+ ideal k=sagbiMod(I,G);
1319
+ semiMod(k,G);
1320
+ }
1321
+ ////////////////////////////////////////////////////////////////////////////////
1322
+ static proc sagbiNF(poly f,ideal I,int b)
1323
+ {
1324
+ //computes the Sagbi normal form
1325
+ list L=1;
1326
+ poly re;
1327
+ map psi;
1328
+ f=jet(f,b);
1329
+ if(f==0){return(f);}
1330
+ while(f!=0)
1331
+ {
1332
+ L= algebra_containment(lead(f),lead(I),1);
1333
+ if (L[1]==1)
1334
+ {
1335
+ def S= L[2];
1336
+ psi= S,maxideal(1),I;
1337
+ f=jet(f-psi(check),b);
1338
+ kill S;
1339
+ }
1340
+ else
1341
+ {
1342
+ re=re+lead(f);
1343
+ f=f-lead(f);
1344
+ }
1345
+ }
1346
+ return (re);
1347
+ }
1348
+
1349
+ /*
1350
+ ring R=0,t,ds;
1351
+
1352
+ ideal I=t5+t7,t4;
1353
+
1354
+ sagbiNF(t7+2t9+3t11+t14+t13+6t15+t17,I,20);
1355
+
1356
+ */
1357
+ ////////////////////////////////////////////////////////////////////////////////
1358
+ static proc sagbiSP(ideal I)
1359
+ {
1360
+ //computes the set of Sagbi-s-polys
1361
+ if(I==0){ return(I); }
1362
+ list L=algDependent(lead(I));
1363
+
1364
+ def S= L[2];
1365
+ map phi= S,maxideal(1),I;
1366
+ return(simplify(phi(ker),2));
1367
+ }
1368
+
1369
+ /*
1370
+
1371
+ ring R=0,t,ds;
1372
+
1373
+ ideal I=t4+t5,t7+t11,t9+t20;
1374
+
1375
+ sagbiSP(I);
1376
+
1377
+ */
1378
+
1379
+ ////////////////////////////////////////////////////////////////////////////////
1380
+ static proc sortSagbi(ideal I)
1381
+ {
1382
+ //sorts, makes input monic and removes zeros
1383
+ I=simplify(I,2+1);
1384
+ int i;
1385
+ int n=1;
1386
+ poly p;
1387
+ while(n)
1388
+ {
1389
+ n=0;
1390
+ for(i=1;i<size(I);i++)
1391
+ {
1392
+ if(deg(lead(I[i]))>deg(lead(I[i+1])))
1393
+ {
1394
+ n=1;
1395
+ p=I[i];
1396
+ I[i]=I[i+1];
1397
+ I[i+1]=p;
1398
+ break;
1399
+ }
1400
+ }
1401
+ }
1402
+ return(I);
1403
+ }
1404
+
1405
+ /*
1406
+
1407
+ ring R=0,t,ds;
1408
+
1409
+ ideal I=3t5,7t2+t7,6t3+t8,3t+t7;
1410
+
1411
+ sortSagbi(I);
1412
+
1413
+ */
1414
+
1415
+ ////////////////////////////////////////////////////////////////////////////////
1416
+ static proc insertOne(poly p, ideal I, int b)
1417
+ {
1418
+ //assume I is sorted, inserts p at the correct place
1419
+ int i,j;
1420
+ poly q;
1421
+ for(i=1;i<=size(I);i++)
1422
+ {
1423
+ if(deg(lead(p))<deg(lead(I[i])))
1424
+ {
1425
+ break;
1426
+ }
1427
+ }
1428
+ if(i==size(I)+1)
1429
+ {
1430
+ I=I,simplify(p,1);
1431
+ }
1432
+ else
1433
+ {
1434
+ for(j=size(I)+1;j>i;j--)
1435
+ {
1436
+ I[j]=I[j-1];
1437
+ }
1438
+ I[i]=simplify(p,1);
1439
+ }
1440
+ if(i<size(I))
1441
+ {
1442
+ I=interReduceSagbi(I,b);
1443
+ }
1444
+ return(I);
1445
+ }
1446
+
1447
+ /*
1448
+
1449
+ ring R=0,t,ds;
1450
+
1451
+ ideal I=t8,t10+t13,t12+t15;
1452
+
1453
+ insertOne(t17,I,20);
1454
+
1455
+ I=t8,t10+t13,t12+t15,t23-t29;
1456
+
1457
+ insertOne(-2t27,I,40);
1458
+
1459
+ */
1460
+
1461
+ ////////////////////////////////////////////////////////////////////////////////
1462
+ static proc interReduceSagbi(ideal I, int b)
1463
+ {
1464
+ // reduces the elements of the dial against each other
1465
+ I=sortSagbi(I);
1466
+ ideal J;
1467
+ int n=1;
1468
+ int i;
1469
+ poly h;
1470
+ while(n)
1471
+ {
1472
+ n=0;
1473
+ i=1;
1474
+ while(i<size(I))
1475
+ {
1476
+ i++;
1477
+ J=I[1..i-1];
1478
+ h=sagbiNF(I[i],J,b);
1479
+ h=simplify(h,1);
1480
+ if(h!=I[i])
1481
+ {
1482
+ n=1;
1483
+ I[i]=h;
1484
+ I=sortSagbi(I);
1485
+ break;
1486
+ }
1487
+ }
1488
+ }
1489
+ return(I);
1490
+ }
1491
+
1492
+ /*
1493
+
1494
+ ring R=0,t,ds;
1495
+
1496
+ ideal I=t8,t8+t10+t13,t8+t12+t15;
1497
+
1498
+ interReduceSagbi(I,20);
1499
+
1500
+ */
1501
+ ////////////////////////////////////////////////////////////////////////////////
1502
+
1503
+ static proc correctBound(ideal I, int b)
1504
+ {
1505
+ //computes the conductor c of the semigroup associated to K[I]
1506
+ //if b>=c
1507
+ list L;
1508
+ int i;
1509
+ for(i=1;i<=size(I);i++)
1510
+ {
1511
+ L[i]=I[i];
1512
+ }
1513
+ list M=WSemigroup(L,b);
1514
+ if(b>M[2])
1515
+ {b=M[2]+1;}
1516
+ return(b);
1517
+ }
1518
+
1519
+ /*
1520
+
1521
+ ring R=0,t,ds;
1522
+
1523
+ ideal I=t8,t10+t13,t12+t15;
1524
+
1525
+ correctBound(I,40);
1526
+
1527
+ I=t8,t10+t13,t12+2t15;
1528
+
1529
+ correctBound(I,40);
1530
+
1531
+ */
1532
+ ////////////////////////////////////////////////////////////////////////////////
1533
+ static proc sortMinord(ideal I)
1534
+ {
1535
+ //input an ideal
1536
+ //output a list L[1]=minimal order,
1537
+ // L[2]=poly having the minimal order,
1538
+ // L[3]=the k suchthat I[k] has the minimal order,
1539
+ // L[4]=ideal I sorted in a way that minimal degree polynomial
1540
+
1541
+ //appears as the last polynomial of the ideal.ie I[size(I)]=I[k].
1542
+ int i;
1543
+ int n=1;
1544
+ list L;
1545
+ poly p;
1546
+ while(n)
1547
+ {
1548
+ n=0;
1549
+ for(i=1;i<size(I);i++)
1550
+ {
1551
+ if(ord(I[i])<ord(I[i+1]))
1552
+ {
1553
+ n=1;
1554
+ p=I[i];
1555
+ I[i]=I[i+1];
1556
+ I[i+1]=p;
1557
+ break;
1558
+ }
1559
+ }
1560
+ }
1561
+ L[1]=ord(I[size(I)]);
1562
+ L[2]=I[size(I)];
1563
+ L[3]=size(I);
1564
+ L[4]=I;
1565
+ return(L);
1566
+ }
1567
+ /*
1568
+ ring r=0,t,Ds;
1569
+ ideal I=t3,t6,t8,t4,t5,t9,t11,t3;
1570
+ sortMinord(I);
1571
+ */
1572
+
1573
+ ////////////////////////////////////////////////////////////////////////////////
1574
+ static proc inversP(poly p,int b)
1575
+ {
1576
+ //computes the inverse of p upto the bound b
1577
+ if(size(p)==1)
1578
+ {
1579
+ return(p);
1580
+ }
1581
+ number c=leadcoef(p);
1582
+ p=p/c;
1583
+ poly q=1;
1584
+ poly s=1;
1585
+ while(deg(lead(q))<b)
1586
+ {
1587
+ q=q*(1-p);
1588
+ s=s+q;
1589
+ }
1590
+ s=1/c*jet(s,b);
1591
+ return(s);
1592
+ }
1593
+
1594
+ ////////////////////////////////////////////////////////////////////////////////
1595
+ static proc ConductorBound(ideal I)
1596
+ {
1597
+ //input an ideal
1598
+ // output an integer which gives the bound of the semigroup conductor
1599
+ list M,L;
1600
+ int c,i,b;
1601
+ ideal J;
1602
+ poly p;
1603
+ if(size(I)<=1)
1604
+ {return(2);}
1605
+ while(1)
1606
+ {
1607
+ b=b+5;
1608
+ J=I;
1609
+ L=sortMinord(J);
1610
+ M[size(M)+1]=L[1];
1611
+ while((M[size(M)]!=1)&&(size(L[4])>1))
1612
+ {
1613
+ p=L[2]/var(1)^L[1];
1614
+ J=L[4];
1615
+ for(i=1;i<=L[3]-1;i++)
1616
+ {
1617
+ J[i]=J[i]/var(1)^L[1]*inversP(p,b);
1618
+ if(deg(lead(J[i]))==0){J[i]=J[i]-lead(J[i]);}
1619
+ }
1620
+ J=simplify(J,2);
1621
+ L=sortMinord(J);
1622
+ M[size(M)+1]=L[1];
1623
+ }
1624
+ if(M[size(M)]==1){break;}
1625
+ }
1626
+ for(i=1;i<=size(M)-1;i++)
1627
+ {
1628
+ c=c+M[i]*(M[i]-1);
1629
+ }
1630
+ return(c+1);
1631
+ }
1632
+ /*
1633
+ ring r=0,t,Ds;
1634
+ ideal I=t3+3t7,t8+5t9;
1635
+ ConductorBound(I);
1636
+ */
1637
+ ////////////////////////////////////////////////////////////////////////////////
1638
+ static proc sortMOD(ideal I)
1639
+ {
1640
+ //sorts, makes input monic and removes zeros
1641
+ I=simplify(I,2);
1642
+ I=simplify(I,1);
1643
+ int i;
1644
+ int n=1;
1645
+ poly p;
1646
+ while(n)
1647
+ {
1648
+ n=0;
1649
+ for(i=1;i<size(I);i++)
1650
+ {
1651
+ if(deg(lead(I[i]))>deg(lead(I[i+1])))
1652
+ {
1653
+ n=1;
1654
+ p=I[i];
1655
+ I[i]=I[i+1];
1656
+ I[i+1]=p;
1657
+ break;
1658
+ }
1659
+ }
1660
+ }
1661
+ return(I);
1662
+ }
1663
+ ////////////////////////////////////////////////////////////////////////////////
1664
+ static proc SpolyMOD(ideal S,ideal P)
1665
+ {
1666
+ //Assume that the basering is a ring in one variable.
1667
+ //input two ideals ideal S=<s_1,s_2> generators of the module and ideal P=<p_1,p_2,..,p_n> the sagbi basis of the algebra
1668
+ //output is an ideal generated by Q[p_1,p_2,...p_n]s_1-R[p_1,p_2,...p_n]s_2 for generators of
1669
+ //Q[lead(p_1),lead(p_2),.,lead(p_n)]lead(s_1)-R[lead(p_1),lead(p_2),.,lead(p_n)]lead(s_2)=0 .
1670
+ def br=basering;
1671
+ int n=ncols(P);
1672
+ ideal P1=lead(P);
1673
+ ideal S1=lead(S);
1674
+ execute
1675
+ ("ring T=("+charstr(br)+",x(1),z(1..n)),(y(1..2)),dp;");
1676
+ poly q;
1677
+ execute
1678
+ ("ring R=("+charstr(br)+"),(x(1),y(1..2),z(1..n)),(lp(3),dp(n));");
1679
+ map phi=br,x(1);
1680
+ ideal G=phi(P1);
1681
+ ideal I=phi(S1);
1682
+ ideal K,J;
1683
+ int d,o,s,j;
1684
+ poly q=I[1];
1685
+ if(deg(I[1])>deg(I[2]))
1686
+ {
1687
+ o=1;
1688
+ q=I[2];
1689
+ }
1690
+ I=I/q;
1691
+ for(int i=1;i<=2;i++)
1692
+ {
1693
+ K[i]=I[i]-y(i);
1694
+ }
1695
+ for(i=1;i<=n;i++)
1696
+ {
1697
+ K[2+i]=G[i]-z(i);
1698
+ }
1699
+ option(redSB);
1700
+ K=std(K);
1701
+ for(i=1;i<=size(K);i++)
1702
+ {
1703
+ if((K[i]/x(1)==0)&&((diff(K[i],y(1))!=0)||(diff(K[i],y(2))!=0)))
1704
+ {
1705
+ q=K[i];
1706
+ for(j=1;j<=2;j++)
1707
+ {
1708
+ q=subst(q,y(j),0);
1709
+ }
1710
+ K[i]=K[i]-q+q*y(o+1);
1711
+ q=K[i];
1712
+ setring T;
1713
+ q=imap(R,q);
1714
+ s=deg(q);
1715
+ setring R;
1716
+ if(s==1){J[size(J)+1]=simplify(q,1);}
1717
+ }
1718
+ }
1719
+ setring br;
1720
+ map phi=R,maxideal(1),S,P;
1721
+ return(phi(J));
1722
+ }
1723
+ /*
1724
+ ring r=0,t,dp;
1725
+ ideal I=4t3,7t6+10t9;
1726
+ ideal J=t4,t7+t10;
1727
+ sortSagbi(SpolyMOD(I,J));
1728
+ */
1729
+
1730
+
1731
+ ////////////////////////////////////////////////////////////////////////////////
1732
+ static proc sagbiNFMODO(poly p, ideal G, ideal I,int b)
1733
+ {
1734
+ //input a poly ideal G ideal I int b is a bound
1735
+ //output an ideal K such that in each K[i] generators of I appear in linear.
1736
+ def br=basering;
1737
+ p=jet(p,b);
1738
+ if(p==0){return(p);}
1739
+ int i;
1740
+ for(i=1;i<=size(I);i++)
1741
+ {
1742
+ if(leadmonom(p)==leadmonom(I[i]))
1743
+ {
1744
+ return(p-leadcoef(p)/leadcoef(I[i])*I[i]);
1745
+ }
1746
+ }
1747
+ int n=ncols(G);
1748
+ int m=ncols(I);
1749
+ ideal G1=lead(G);
1750
+ ideal I1=lead(I);
1751
+ poly p1=lead(p);
1752
+ //create new ring with extra variables -
1753
+ execute
1754
+ ("ring T=("+charstr(br)+",x(1),z(1..n)),(x(2),y(1..m)),dp;");
1755
+ execute
1756
+ ("ring R=("+charstr(br)+"),(x(1..2),y(1..m),z(1..n)),(lp(2),dp(m),dp(n));"); //AENDERUNG
1757
+
1758
+ map phi = br,x(1);
1759
+ ideal G = phi(G);
1760
+ ideal I = phi(I);
1761
+ ideal P = phi(G1);
1762
+ ideal S = phi(I1);
1763
+ poly p=phi(p);
1764
+ ideal J=var(1),p,I,G;
1765
+ poly check = phi(p1);
1766
+ poly keep=S[1];
1767
+ S=S/keep;
1768
+
1769
+ check=check/keep;
1770
+ ideal M;
1771
+ poly q;
1772
+ for ( i=1;i<=m;i=i+1)
1773
+ {
1774
+ M[i]=S[i]-y(i);
1775
+ }
1776
+ for (i=1;i<=n;i=i+1)
1777
+ {
1778
+ M[m+i]=P[i]-z(i);
1779
+ }
1780
+ M[size(M)+1]=check-x(2);
1781
+ check=check*keep;
1782
+ option(redSB);
1783
+ M=std(M);
1784
+ int j,s;
1785
+ for(i=1;i<=size(M);i++)
1786
+ {
1787
+ if((deg(M[i]/x(2))==0)&&(M[i]/x(1)==0))
1788
+ {
1789
+ q=subst(M[i],x(2),0);
1790
+ for(j=1;j<=m;j++)
1791
+ {
1792
+ q=subst(q,y(j),0);
1793
+ }
1794
+ M[i]=M[i]-q+q*y(1);
1795
+ q=M[i];
1796
+ setring T;
1797
+ poly q=imap(R,q);
1798
+ s=deg(q);
1799
+ setring R;
1800
+ if(s==1){check=simplify(q,1);break;}
1801
+ }
1802
+ }
1803
+ poly check1=specialSubst(check,J,b);
1804
+ setring br;
1805
+ // map psi=R,maxideal(1),p,I,G;
1806
+ map psi1=R,var(1);
1807
+ return(psi1(check1));
1808
+ }
1809
+ ////////////////////////////////////////////////////////////////////////////////
1810
+ static proc specialSubst(poly check,ideal J,int b)
1811
+ {
1812
+ poly resu,mon,r;
1813
+ int i,j,k;
1814
+ intvec v;
1815
+ for(i=1;i<=size(check);i++)
1816
+ {
1817
+ mon=check[i];
1818
+ v=leadexp(mon);
1819
+ r=1;
1820
+ for(j=1;j<=nvars(basering);j++)
1821
+ {
1822
+ for(k=1;k<=v[j];k++)
1823
+ {
1824
+ r=jet(r*J[j],b);
1825
+ }
1826
+ }
1827
+ resu=resu+r*leadcoef(mon);
1828
+ }
1829
+ return(jet(resu,b));
1830
+ }
1831
+ ////////////////////////////////////////////////////////////////////////////////
1832
+ static proc sagbiNFMOD(poly p, ideal G, ideal I, int b)
1833
+ {
1834
+ poly f=jet(p,b);
1835
+ if(f==0){return(f);}
1836
+ poly h;
1837
+ while(leadmonom(f)!=leadmonom(h))
1838
+ {
1839
+ h=f;
1840
+ f=sagbiNFMODO(f,G,I,b);
1841
+ }
1842
+ return(lead(h)+sagbiNFMOD(h-lead(h),G,I,b)); //AENDERUNG
1843
+ }
1844
+ ////////////////////////////////////////////////////////////////////////////////
1845
+ static proc createP(ideal I)
1846
+ {
1847
+ list P;
1848
+ int i=1;
1849
+ int j;
1850
+ while(i<=size(I)-1)
1851
+ {
1852
+ j=i+1;
1853
+ while(j<=size(I))
1854
+ {
1855
+ P[size(P)+1]=list(I[i],I[j]);
1856
+ j++;
1857
+ }
1858
+ i++;
1859
+ }
1860
+ return(P);
1861
+ }
1862
+ ////////////////////////////////////////////////////////////////////////////////
1863
+ static proc enlargeP(poly h,list P,ideal I)
1864
+ {
1865
+ int i;
1866
+ for(i=1;i<=size(I);i++)
1867
+ {
1868
+ P[size(P)+1]=list(I[i],h);
1869
+ }
1870
+ return(P);
1871
+ }
1872
+ /*
1873
+ ring r=0,t,Ds;
1874
+ ideal I=4t3,7t6+10t9;
1875
+ ideal G=t4,t7+t10;
1876
+ sagbiMod(I,G,18);
1877
+ */
1878
+ ////////////////////////////////////////////////////////////////////////////////
1879
+ static proc sortIntvec(intvec L)
1880
+ {
1881
+ //input: intvec L.
1882
+ //output: L sorted, multiple elements canceled.
1883
+ int i;
1884
+ int j;
1885
+ int n=1;
1886
+ intvec M;
1887
+ while(n)
1888
+ {
1889
+ for(i=1;i<=size(L);i++)
1890
+ {
1891
+ for(j=i+1;j<=size(L);j++)
1892
+ {
1893
+ if(L[i]==L[j])
1894
+ {
1895
+ L[j]=0;
1896
+ }
1897
+ }
1898
+ }
1899
+ n=0;
1900
+ }
1901
+ for(i=1;i<=size(L);i++)
1902
+ {
1903
+ if((L[i]!=0)||(i==1))
1904
+ {
1905
+ M[size(M)+1]=L[i];
1906
+ }
1907
+ }
1908
+ int m=1;int p;
1909
+ while(m)
1910
+ {
1911
+ m=0;
1912
+ for(i=1;i<size(M);i++)
1913
+ {
1914
+ if(M[i]>M[i+1])
1915
+ {
1916
+ m=1;
1917
+ p=M[i];
1918
+ M[i]=M[i+1];
1919
+ M[i+1]=p;
1920
+ break;
1921
+ }
1922
+ }
1923
+ }
1924
+ M=M[2..size(M)];
1925
+ return(M);
1926
+ }
1927
+ ////////////////////////////////////////////////////////////////////////////////
1928
+ static proc findConductor(intvec L)
1929
+ {
1930
+ //input a intvec L
1931
+ //output is an integer which came before the gap from right to left.
1932
+ int i;int j; list K;
1933
+ int c;
1934
+ for(i=size(L);i>=2;i--)
1935
+ {
1936
+ if(L[i]!=L[i-1]+1)
1937
+ {
1938
+ c=L[i];
1939
+ break;
1940
+ }
1941
+ }
1942
+ if(c==0){c=1;}
1943
+ return(c);
1944
+ }
1945
+ ////////////////////////////////////////////////////////////////////////////////
1946
+ static proc cutAfterConductor(intvec L)
1947
+ {
1948
+ //input an integer vector
1949
+ //output cut all the integers in the intvec which came after the conductor
1950
+ int i;int j; intvec K;
1951
+ int c=findConductor(L);
1952
+ for(i=1;i<=size(L);i++)
1953
+ {
1954
+ if(L[i]==c)
1955
+ {
1956
+ K[1..i]=L[1..i];
1957
+ }
1958
+ }
1959
+ return(K);
1960
+ }
1961
+ ////////////////////////////////////////////////////////////////////////////////
1962
+ static proc CompareList(list L,list M,int n)
1963
+ {
1964
+ //input two list L,M with the same size n
1965
+ //out put 0 if not equal 1 if equal.
1966
+ for(int i=1;i<=n;i++)
1967
+ {
1968
+ if(L[i]!=M[i])
1969
+ {
1970
+ i=0;
1971
+ break;
1972
+ }
1973
+ }
1974
+ return(i);
1975
+ }
1976
+ ////////////////////////////////////////////////////////////////////////////////
1977
+ static proc Guess(ideal I)
1978
+ {
1979
+ // comput the sagbi basis of the module
1980
+ //which we guess .
1981
+ I=sagbiAlg(I);
1982
+ ideal H=diff(I,var(1));
1983
+ H=sagbiMod(H,I);
1984
+ list K=semiMod(H,I);
1985
+ return(K);
1986
+ }
1987
+ ////////////////////////////////////////////////////////////////////////////////
1988
+
1989
+ static proc inVar(ideal I)
1990
+ {
1991
+ // I=<x(t),y(t)>, ord(x(t))=n<ord(y(t))=m, n does not divide m
1992
+ // returns a list L with 5 entries
1993
+ // L[1] the semi group Gamma
1994
+ // L[2] the semi module Lambda
1995
+ // L[3] 0 if Lambda=Gamma or lambda=min(Lambda-Gamma) -n
1996
+ // L[4] the integers i, i>lambda, i+n not in Lambda, 0 if this set is empty
1997
+ // L[5] 0 or the smallest integer i, i not in Gamma, i+m-n not in Gamma
1998
+ // i-lambda not in Gamma but i+n in Lambda
1999
+
2000
+ ideal G=sagbiAlg(I);
2001
+ ideal M=diff(I,t);
2002
+ ideal K=sagbiMod(M,G);
2003
+ list L=semiMod(K,G);
2004
+ intvec v=L[3]; //semi group Gamma
2005
+ intvec w=L[6]+1;
2006
+ w=0,w; //semi module Lambda
2007
+ intvec mo;
2008
+ int i,l,k;
2009
+ l=-1;
2010
+ int n=ord(G[1]);
2011
+ int m=ord(G[2]);
2012
+ for(i=1;i<=size(w);i++)
2013
+ {
2014
+ if(v[i]!=w[i])
2015
+ {
2016
+ l=w[i]-v[2]; //lambda
2017
+ break;
2018
+ }
2019
+ }
2020
+ if(i==size(w)+1)
2021
+ {
2022
+ for(k=i;k<=size(v);k++)
2023
+ {
2024
+ if(v[k]!=w[i-1]+k-i+1)
2025
+ {
2026
+ l=w[i-1]+k-i+1-v[2]; //lambda
2027
+ break;
2028
+ }
2029
+ }
2030
+ }
2031
+
2032
+ if(l==-1){return(-1);}
2033
+ for(i=l+1;i<=w[size(w)]-n;i++)
2034
+ {
2035
+ if(!ivec(i+n,w))
2036
+ {
2037
+ mo=mo,i; //i+n not in Lambda
2038
+ }
2039
+ }
2040
+ if(size(mo)>1){mo=mo[2..size(mo)];}
2041
+ for(i=l+1;i<=v[size(v)]-1;i++)
2042
+ {
2043
+ if(!ivec(i,v)&&!ivec(i+n-m,v)&&ivec(i+n,w)&&(i<mo[size(mo)]))
2044
+ {
2045
+ return(list(v,w,l,mo,i));
2046
+ }
2047
+ }
2048
+ return(list(v,w,l,mo,0));
2049
+ }
2050
+ ////////////////////////////////////////////////////////////////////////////////
2051
+ static proc ivec(int a, intvec v)
2052
+ {
2053
+ int i;
2054
+ if(a>=v[size(v)]){return(a);}
2055
+ for(i=1;i<=size(v);i++)
2056
+ {
2057
+ if(a==v[i]){return(i);}
2058
+ }
2059
+ return(0);
2060
+ }
2061
+ ////////////////////////////////////////////////////////////////////////////////
2062
+ static proc normalMap(ideal I, int bound)
2063
+ {
2064
+ // returns (t^n,h) A-equivalent to I modulo <t>^bound+1
2065
+
2066
+ I=jet(I,bound);
2067
+ def R=basering;
2068
+ map phi;
2069
+ poly p;
2070
+ if(ord(I[1])>ord(I[2])){p=I[1];I[1]=I[2];I[2]=p;}
2071
+ I[1]=simplify(I[1],1);
2072
+ int n=ord(I[1]);
2073
+ phi=R,var(1)-1/number(n)*I[1][2]/var(1)^(n-1);
2074
+ I=phi(I);
2075
+ I=jet(I,bound);
2076
+ while(size(I[1])>1)
2077
+ {
2078
+ phi=R,var(1)-1/number(n)*I[1][2]/var(1)^(n-1);
2079
+ I=phi(I);
2080
+ I=jet(I,bound);
2081
+ }
2082
+ I[2]=simplify(I[2],1);
2083
+ p=lead(I[2])+reduc(I[2]-lead(I[2]),I,bound);
2084
+ I[2]=p;
2085
+ return(I);
2086
+ }
2087
+ ////////////////////////////////////////////////////////////////////////////////
2088
+ static proc reduc(poly f,ideal I, int b)
2089
+ {
2090
+ // computes the normal form of f with respect to the algebra generated by I
2091
+ list L=1;
2092
+ map psi;
2093
+ f=jet(f,b);
2094
+ if(f==0){return(f);}
2095
+ while((f!=0) && (L[1]!=0))
2096
+ {
2097
+ L= algebra_containment(lead(f),lead(I),1);
2098
+ if (L[1]==1)
2099
+ {
2100
+ def S= L[2];
2101
+ psi= S,maxideal(1),I;
2102
+ f=jet(f-psi(check),b);
2103
+ kill S;
2104
+ }
2105
+ }
2106
+ return (lead(f)+reduc(f-lead(f),I,b));
2107
+ }
2108
+ ////////////////////////////////////////////////////////////////////////////////
2109
+ proc HHnormalForm(ideal I, list #)
2110
+ "USAGE: HHnormalForm(I), I=<x(t),y(t)> an ideal, # optional, a bound for the
2111
+ conductor
2112
+ COMPUTE: computes the Hefez-Hernandez normal form of the ideal I=<x(t),y(t)>
2113
+ RETURN: a list L with 5 entries
2114
+ L[1] the Hefei-Hernandez normal form of the ideal I=<x(t),y(t)>
2115
+ L[2] the semi group Gamma
2116
+ L[3] the semi module Lambda
2117
+ L[4] 0 if Lambda=Gamma or lambda=min(Lambda-Gamma) -n, the Zariski number
2118
+ L[5] the integers i, i>lambda, i+n not in Lambda, 0 if this set is empty
2119
+ EXAMPLE: example HHnormalForm; shows an example
2120
+ KEYWORDS: normalform
2121
+ "
2122
+ {
2123
+ //computes the Hefez-Hernandez normal form of the ideal I=<x(t),y(t)>
2124
+ //returns a list with the normal form, the semi group Gamma, the semi module
2125
+ //Lambda, the Zariski number lambda, the moduli
2126
+ //(the integers i, i>lambda, i+n not in Lambda, 0 if this set is empty)
2127
+
2128
+ int b,i,l,k;
2129
+ poly p;
2130
+ map phi;
2131
+ def R=basering;
2132
+ if(size(#)>0)
2133
+ {
2134
+ b=#[1];
2135
+ ideal G=sagbiAlg(I,b);
2136
+ }
2137
+ else
2138
+ {
2139
+ ideal G=sagbiAlg(I);
2140
+ }
2141
+ ideal M=diff(I,t);
2142
+ ideal K=sagbiMod(M,G);
2143
+ list L=semiMod(K,G);
2144
+ intvec v=L[3]; //semi group Gamma
2145
+ intvec w=L[6]+1;
2146
+ w=0,w; //semi module Lambda
2147
+ b=v[size(v)]+1;
2148
+ I=normalMap(I,b);
2149
+ int n=ord(I[1]);
2150
+ int m=ord(I[2]);
2151
+ poly g;
2152
+ if(v==w){return(list(ideal(var(1)^n,var(1)^m),v,w,0,0));}
2153
+ for(i=1;i<=size(w);i++)
2154
+ {
2155
+ if(v[i]!=w[i])
2156
+ {
2157
+ l=w[i]-v[2]; //lambda
2158
+ break;
2159
+ }
2160
+ }
2161
+ if(i==size(w)+1)
2162
+ {
2163
+ for(k=i;k<=size(v);k++)
2164
+ {
2165
+ if(v[k]!=w[i-1]+k-i+1)
2166
+ {
2167
+ l=w[i-1]+k-i+1-v[2]; //lambda
2168
+ break;
2169
+ }
2170
+ }
2171
+ }
2172
+ intvec moduli;
2173
+ for(i=l+1;i<=w[size(w)]-n;i++)
2174
+ {
2175
+ if(!ivec(i+n,w))
2176
+ {
2177
+ moduli=moduli,i; //i+n not in Lambda
2178
+ }
2179
+ }
2180
+ if(size(moduli)>1){moduli=moduli[2..size(moduli)];}
2181
+ int momax=moduli[size(moduli)];
2182
+ if(momax==0){momax=l;}
2183
+ b=momax;
2184
+ i=1;
2185
+ while(i<b)
2186
+ {
2187
+ i++;
2188
+ k=ord(I[2][i]);
2189
+ if(k==-1){break;}
2190
+ if(k==l){i++;k=ord(I[2][i]);}
2191
+ if(k>b){return(list(jet(I,b),v,w,l,moduli));}
2192
+ if(ivec(k,v)) //k is in Gamma
2193
+ {
2194
+ I[2]=lead(I[2])+reduc(I[2]-lead(I[2]),G,b);
2195
+ i--;
2196
+ }
2197
+ else
2198
+ {
2199
+ if(ivec(k+n-m,v)) //k+n-m is in Gamma
2200
+ {
2201
+ phi=R,var(1)-1/number(m)*I[2][i]/var(1)^(m-1);
2202
+ I=phi(I);
2203
+ G=sagbiAlg(I); //Aenderung
2204
+ I[1]=lead(I[1])+reduc(I[1]-lead(I[1]),G,b);
2205
+ I=normalMap(I,b);
2206
+ i--;
2207
+ }
2208
+ else
2209
+ {
2210
+ if(ivec(k+n,w)) //k+n is in Lambda
2211
+ {
2212
+ g=findTrafo(I,i);
2213
+ g=jet(g,b-m+1);
2214
+ phi=R,g;
2215
+ I=phi(I);
2216
+ G=sagbiAlg(I); //AENDERUNG
2217
+ I[1]=lead(I[1])+reduc(I[1]-lead(I[1]),G,b);
2218
+ I[2]=lead(I[2])+reduc(I[2]-lead(I[2]),G,b);
2219
+ I=normalMap(I,b);
2220
+ i--;
2221
+ }
2222
+ }
2223
+ }
2224
+ }
2225
+ return(list(I,v,w,l,moduli));
2226
+ }
2227
+ example
2228
+ {
2229
+ "EXAMPLE"; echo=2;
2230
+ ring r=0,t,Ds;
2231
+ ideal I=t6+3t7,t8+t13+t19;
2232
+ HHnormalForm(I);
2233
+ }
2234
+ ////////////////////////////////////////////////////////////////////////////////
2235
+ static proc findTrafo(ideal I, int i)
2236
+ {
2237
+ //I[2][i]=a*t^k, I[1]=x{t}=t^n, I[2]=y(t)=t^m+c*t^lambda+...+a*t^k+...
2238
+ //find the map to kill the term a*t^k of y(t) for k+n in Lambda
2239
+ //find g,h such that a*t^k*x'(t)=h(x(t),y(t))*x'(t)-g(x(t),y(t))*y'(t) mod t^(k+n)
2240
+ //return the map t---> t+g(x(t),y(t))/x'(t) mod t^(k+1)
2241
+ def R0=basering;
2242
+ int p=char(R0);
2243
+ int k=ord(I[2][i]);
2244
+ int n=ord(I[1]);
2245
+ int m=ord(I[2]);
2246
+ poly f=I[2][i]*diff(I[1],var(1));
2247
+ ring R=p,var(1),dp;
2248
+ ideal I=imap(R0,I);
2249
+ poly f=imap(R0,f);
2250
+ ideal Q=std(ideal(var(1)*f));
2251
+ qring T=Q;
2252
+ ideal I=imap(R,I);
2253
+ poly f=imap(R,f);
2254
+ ring S=p,(@z,@u,@v,@x,@y),(dp(1),dp(2),dp(2));
2255
+ setring T;
2256
+ map psi=S,f,diff(I[1],var(1)),diff(I[2],var(1)),I[1],I[2];
2257
+ setring S;
2258
+ ideal J=kernel(T,psi);
2259
+ option(redSB);
2260
+ J=std(J);
2261
+ //we look for an element @z-@u*h(@x,@y)-@v*g(@x,@y) in J
2262
+ for(i=1;i<=ncols(J);i++)
2263
+ {
2264
+ if((@z*diff(J[i],@z)+@u*diff(J[i],@u)+@v*diff(J[i],@v)==J[i])&&(deg(diff(J[i],@z))==0))
2265
+ {
2266
+ poly f=J[i]/(-diff(J[i],@z)); //the element is in the standard basis
2267
+ break;
2268
+ }
2269
+ }
2270
+ poly g;
2271
+ if(i==ncols(J)+1)
2272
+ {
2273
+ //the last element in the standard basis is of type @z-@u*h(@x,@y)-@v*g(@x,@y)+k(@x,@y)
2274
+ //we have to kill k(@x,@y) using the other standard basis elements
2275
+ poly f=J[i-1];
2276
+ ideal K;
2277
+ for(i=1;i<ncols(J);i++)
2278
+ {
2279
+ g=lead(J[i]);
2280
+ if(((g==diff(g,@u)*@u)&&(diff(g,@v)==0))||((g==diff(g,@v)*@v)&&(diff(g,@u)==0))||
2281
+ (g==subst(g,@u,0,@v,0)))
2282
+ {
2283
+ K[size(K)+1]=J[i];
2284
+ }
2285
+ }
2286
+ ring S1=p,(@z,@u,@v,@x,@y),(a(-1,-1,-1,0,0),dp(1),dp(2),dp(2));
2287
+ ideal K=imap(S,K);
2288
+ K=specialInterred(K);
2289
+ poly f=imap(S,f);
2290
+ f=specialReduce(f,K);
2291
+ setring S;
2292
+ f=imap(S1,f);
2293
+ f=f/(-diff(f,@z)); //f=@z-@u*h(@x,@y)-@v*g(@x,@y)
2294
+ }
2295
+ matrix M=coef(f,@v);
2296
+ g=M[2,1];
2297
+ setring T;
2298
+ poly g=psi(g);
2299
+ setring R0;
2300
+ poly g=imap(T,g);
2301
+ g=g/diff(I[1],var(1));
2302
+ return(var(1)-g);
2303
+ }
2304
+ ////////////////////////////////////////////////////////////////////////////////
2305
+ static proc specialInterred(ideal K)
2306
+ {
2307
+ int i,j;
2308
+ int d=1;
2309
+ poly p;
2310
+ while(d)
2311
+ {
2312
+ d=0;
2313
+ K=simplify(K,3);
2314
+ K=sort(K)[1];
2315
+ for(i=ncols(K);i>1;i--)
2316
+ {
2317
+ for(j=1;j<i;j++)
2318
+ {
2319
+ p=lead(K[i])/lead(K[j]);
2320
+ if((p!=0)&&(p==subst(p,var(1),0,var(2),0)))
2321
+ {
2322
+ K[i]=K[i]-p*K[j];
2323
+ d=1;
2324
+ break;
2325
+ }
2326
+ }
2327
+ if(d==1){break;}
2328
+ }
2329
+ }
2330
+ return(K);
2331
+ }
2332
+ ////////////////////////////////////////////////////////////////////////////////
2333
+ static proc specialReduce(poly f, ideal K)
2334
+ {
2335
+ int i;
2336
+ int d=1;
2337
+ poly p;
2338
+ while(d)
2339
+ {
2340
+ d=0;
2341
+ for(i=1;i<=size(K);i++)
2342
+ {
2343
+ p=lead(f)/lead(K[i]);
2344
+ if((p!=0)&&(p==subst(p,var(1),0,var(2),0)))
2345
+ {
2346
+ f=f-p*K[i];
2347
+ d=1;
2348
+ break;
2349
+ }
2350
+ }
2351
+ }
2352
+ return(f);
2353
+ }
2354
+ ////////////////////////////////////////////////////////////////////////////////
2355
+ proc modSagbiAlg(ideal I, list #)
2356
+ "USAGE: modSagbiAlg(I,i); I is an ideal, i an integer (optional).
2357
+ RETURN: ideal, a sagbi basis for I using modular methods.
2358
+ PURPOSE: Computes a sagbi basis for the ideal given by the generators in I using modular techniques.
2359
+ @*
2360
+ If second argument is 0 then the result is not verified.
2361
+ KEYWORDS: sagbi basis
2362
+ EXAMPLE: example modSagbiAlg; shows an example"
2363
+
2364
+ {
2365
+ int exactness = 1;
2366
+ if (size(#) > 0) {
2367
+ exactness = #[1];
2368
+ }
2369
+ /* save options */
2370
+ intvec opt = option(get);
2371
+ option(redSB);
2372
+ /* choose the right command */
2373
+ string command = "sagbiAlg";
2374
+ /* call modular() */
2375
+ if (exactness) {
2376
+ I = modular(command, list(I), Modstd::primeTest_std,
2377
+ Modstd::deleteUnluckyPrimes_std, pTest_sagbi,finalTest_sagbi);
2378
+ }
2379
+ else {
2380
+ I = modular(command, list(I), Modstd::primeTest_std,
2381
+ Modstd::deleteUnluckyPrimes_std,pTest_sagbi);
2382
+ //Modstd::deleteUnluckyPrimes_std,pTest_sagbi,536870909);
2383
+ //only primes <=536870909 are used
2384
+ }
2385
+ /* return the result */
2386
+ option(set, opt);
2387
+ return(I);
2388
+ }
2389
+ example
2390
+ { "EXAMPLE:"; echo=2;
2391
+ ring R=0,t,ds;
2392
+ ideal I=t8,t10+t13,t12+t15;
2393
+ modSagbiAlg(I,0);
2394
+ modSagbiAlg(I);
2395
+ }
2396
+ ///////////////////////////////////////////////////////////////////////////////
2397
+ static proc pTest_sagbi(string command, alias list args, def result, int p)
2398
+ {
2399
+ def R0 = basering;
2400
+ list r = ringlist(R0);
2401
+ r[1] = p;
2402
+ def @R = ring(r);
2403
+ setring @R;
2404
+ list args = fetch(R0, args);
2405
+ ideal W = sagbiAlg(args[1]);
2406
+ def result = fetch(R0, result);
2407
+ int j;
2408
+ if(size(result)==size(W))
2409
+ {
2410
+ j=1;
2411
+ for(int i=1;i<=size(result);i++)
2412
+ {
2413
+ if(result[i]!=W[i])
2414
+ {
2415
+ j=0;break;
2416
+ }
2417
+ }
2418
+ }
2419
+ setring R0;
2420
+ return(j);
2421
+ }
2422
+ ///////////////////////////////////////////////////////////////////////////////
2423
+ static proc finalTest_sagbi(string command, alias list args, def result)
2424
+ {
2425
+ int b=semiGroup(result)[2]+1;
2426
+ int i,j;
2427
+ for(i=1;i<=size(args[1]);i++)
2428
+ {
2429
+ if(sagbiNF(args[1][i],result,b)!=0){return(0);}
2430
+ }
2431
+ ideal W=sagbiSP(result);
2432
+ for(i=1;i<=ncols(W);i++)
2433
+ {
2434
+ if(sagbiNF(W[i],result,b)!=0){return(0);}
2435
+ }
2436
+ return(1);
2437
+ }
2438
+
2439
+ proc classSpaceCurve(ideal I)
2440
+ "USAGE": classSpaceCurve(I); I ideal
2441
+ RETURN: the normal form of I if I is simple, -1 if I is not simple
2442
+ EXAMPLE: example classSpaceCurve; shows an example
2443
+ {
2444
+ //====== computes the normal form of parametrized space curves =====
2445
+ //====== in characteristic p =====
2446
+
2447
+ int p=char(basering);
2448
+ list L=weakNF(I);
2449
+ I=L[1];
2450
+ if(size(I)==2){I[3]=0;}
2451
+ ideal K=L[8];
2452
+ //===== the smooth case =====
2453
+
2454
+ if(ord(I[1])==1){return(ideal(var(1),0,0));}
2455
+
2456
+ //===== the case p=2 =====
2457
+
2458
+ if(p==2)
2459
+ {
2460
+ if(ord(I[1])>3){return(-1);}
2461
+ if((ord(I[1])==3)&&(ord(I[2])>10)){return(-1);}
2462
+ I=normal2(K,L[2][1]);
2463
+ return(I);
2464
+ }
2465
+
2466
+ //====== from now on p>2 =====
2467
+
2468
+ //====== the case of multiplicity >4 (not simple) =====
2469
+ if(ord(I[1])>4)
2470
+ {
2471
+ return(-1);
2472
+ }
2473
+
2474
+ //===== the case of multiplicity 4 =====
2475
+
2476
+ if(ord(I[1])==4)
2477
+ {
2478
+ if(ord(I[2])>7)
2479
+ {
2480
+ return(-1);//not simple
2481
+ }
2482
+ if(ord(I[2])==7)
2483
+ {
2484
+ if((p==3)||(p==7)) //not simple in this characteristic
2485
+ {
2486
+ return(-1);
2487
+ }
2488
+ if(((p==5)||(p==13))&&(ord(I[3])!=9))
2489
+ {
2490
+ return(-1);//not simple in this characteristic
2491
+ }
2492
+ I=normal47(K,L[2][1]);
2493
+ return(I);
2494
+ }
2495
+ if(ord(I[2])==5)
2496
+ {
2497
+ I=normal45(K,L[2][1]);
2498
+ return(I);
2499
+ }
2500
+ if(ord(I[2])==6)
2501
+ {
2502
+ int k=L[5];
2503
+ int r=L[6];
2504
+ if(k>0)
2505
+ {
2506
+ // if((p==3)||(p==13)) //not simple in this characteristic
2507
+ // {
2508
+ // return(-1);
2509
+ // }
2510
+ if((p==5)&&(k!=7))
2511
+ {
2512
+ return(-1); //not simple in this characteristic
2513
+ }
2514
+ if((p==7)&&(k>13))
2515
+ {
2516
+ return(-1); //not simple in this characteristic
2517
+ }
2518
+ if((p==11)&&(k>8))
2519
+ {
2520
+ return(-1); //not simple in this characteristic
2521
+ }
2522
+ if((p>=17)&&(k>p-8))
2523
+ {
2524
+ return(-1); //not simple in this characteristic
2525
+ }
2526
+ I=normal46(I,L[2][1],L[5],L[6]);
2527
+ return(I);
2528
+ }
2529
+ if((p==3)&&(r>7))
2530
+ {
2531
+ return(-1); //not simple in this characteristic
2532
+ }
2533
+ if((p==5)&&(r>11))
2534
+ {
2535
+ return(-1); //not simple in this characteristic
2536
+ }
2537
+ if((p==7)&&(r>15))
2538
+ {
2539
+ return(-1); //not simple in this characteristic
2540
+ }
2541
+ if((p==11)&&(r>29))
2542
+ {
2543
+ return(-1); //not simple in this characteristic
2544
+ }
2545
+ if((p==13)&&(r>9))
2546
+ {
2547
+ return(-1); //not simple in this characteristic
2548
+ }
2549
+ if((p>=17)&&(r>p+8))
2550
+ {
2551
+ return(-1); //not simple in this characteristic
2552
+ }
2553
+ I=normal46(I,L[2][1],L[5],L[6]);
2554
+ return(I);
2555
+ }
2556
+ }
2557
+ //====== the case of multiplicity 3 ======
2558
+
2559
+ if(ord(I[1])==3)
2560
+ {
2561
+ int k=L[5];
2562
+ int l=L[7];
2563
+ int r=L[6];
2564
+ if((p==3)&&(k>7))
2565
+ {
2566
+ return(-1); //not simple in this characteristic
2567
+ }
2568
+ if((p==3)&&(k==7)&&((r>8)||(r==0)))
2569
+ {
2570
+ return(-1); //not simple in this characteristic
2571
+ }
2572
+ if((k>=p+9)&&((l==0)||(l>=k+p))&&((r==0)||(r>=k+p)))
2573
+ {
2574
+ return(-1); //not simple in this characteristic
2575
+ }
2576
+ I=normal3(I,L[2][1],L[7]);
2577
+ return(I);
2578
+ }
2579
+
2580
+ //===== the case of multiplicity 2 ======
2581
+
2582
+ if(ord(I[1])==2)
2583
+ {
2584
+ I=var(1)^2,var(1)^{ord(I[2])};
2585
+ return(I);
2586
+ }
2587
+ return(-77); //test for error
2588
+ }
2589
+ example
2590
+ {
2591
+ "EXAMPLE:"; echo=2;
2592
+ ring R=31,t,ds;
2593
+ ideal I=t3+6t4+13t5-13t6+10t7+2t8-6t9-10t10-15t11-6t12+8t13-2t14+t15+8t16,
2594
+ t7+15t8+7t9-11t10-15t11-6t12+8t13-2t14+t15+8t16,
2595
+ t10-11t11-6t12-t13+12t14+4t15-14t16+15t17-12t18+5t19+t20;
2596
+ ideal J=classSpaceCurve(I);
2597
+ J;
2598
+ }
2599
+
2600
+ static proc weakNF(ideal I)
2601
+ {
2602
+ //computes a list with an ideal,the weak normal form
2603
+ //of a parametrized space curve, the semigroup,
2604
+ //an integer max(conductor,ord(the last element
2605
+ //in the ideal)),the reduced saga basis of I, and
2606
+ //k,r (in case of (t^4,t^6+t^k,t^r)) resp. k,r,l
2607
+ //(in case of (t^3,t^k+t^l,t^r)) and the ideal with
2608
+ //coefficients
2609
+ int k,r,l;
2610
+ int s=size(I);
2611
+ int p=char(basering);
2612
+ ideal Is=sagbiAlg(I);
2613
+ list L=semiGroup(Is);
2614
+ int c=L[2]; //the conductor
2615
+ if(size(Is)>2)
2616
+ {
2617
+ //(t^3,t^11,t^13) has as conductor 11, but we cannot cut t^13
2618
+ //we have to change 11 by 13
2619
+ int o=ord(Is[size(Is)]);
2620
+ if(o>c){c=o;}
2621
+ }
2622
+ int e=leadexp(Is[1])[1];
2623
+ if(e mod p!=0)
2624
+ {
2625
+ I=normalMap(Is,c+1);
2626
+ }
2627
+ Is=reducedSagbiAlg(I,c+1);
2628
+ Is=jet(Is,c+1);
2629
+ ideal K=Is;
2630
+ Is=normalizeC(Is);
2631
+ //the sagbi basis Is of I may contain more elements then I
2632
+ //the reduced saga basis of (t^4,t^6+t^8+t^9) is (t^4,t^6+t^9,t^15)
2633
+ //we obtain (t^4,t^6+t^9)
2634
+ I=Is;
2635
+
2636
+ //===== the special case (t^4,t^6+t^k,t^r) =====
2637
+ //===== we compute k and r in this case =====
2638
+
2639
+ if((ord(Is[1])==4)&&(ord(Is[2])==6))
2640
+ {
2641
+ if(size(Is)==4)
2642
+ {
2643
+ ideal J =Is[1..2];
2644
+ J=sagbiAlg(J);
2645
+ k=ord(J[size(J)]);
2646
+ if(k==ord(Is[size(Is)]))
2647
+ {
2648
+ //the case (t^4,t^6+t^k,t^r) k+6>r=k+4
2649
+ r=ord(Is[size(Is)-1]);
2650
+ I=Is[1..size(Is)-1];
2651
+ }
2652
+ else
2653
+ {
2654
+ //the case (t^4,t^6+t^k,t^r) k+6<r=k+8
2655
+ J=Is;
2656
+ k=ord(Is[size(Is)-1]);
2657
+ r=ord(Is[size(Is)]);
2658
+ J[size(Is)-1]=0;
2659
+ I=simplify(J,2);
2660
+ }
2661
+ }
2662
+ else
2663
+ {
2664
+ if(size(Is[2])>1)
2665
+ {
2666
+ //the case (t^4,t^6+t^k,t^r), r=k-2 or k+2 or infinity
2667
+ ideal J=Is[1..2];
2668
+ J=sagbiAlg(J);
2669
+ k=ord(J[size(J)]);
2670
+ if(ord(J[size(J)])==ord(Is[size(Is)]))
2671
+ {
2672
+ I=Is[1..2]; //r=infinity
2673
+ }
2674
+ else
2675
+ {
2676
+ r=ord(Is[size(Is)]);
2677
+ I=Is;
2678
+ }
2679
+ }
2680
+ else
2681
+ {
2682
+ //the case (t^4,t^6,t^r)
2683
+ r=ord(Is[3]);
2684
+ I=Is;
2685
+ }
2686
+ }
2687
+ }
2688
+ //===== the special case (t^3,t^k+t^l,t^r) =====
2689
+ //===== we compute k,r and l in this case =====
2690
+ if(ord(Is[1])==3)
2691
+ {
2692
+ k=ord(Is[2])+6;
2693
+ if(size(Is[2])>1)
2694
+ {
2695
+ l=ord(Is[2][2]);
2696
+ }
2697
+ if(size(Is)==3)
2698
+ {
2699
+ r=ord(Is[3]);
2700
+ }
2701
+ }
2702
+ list M=I,L,c,Is,k-6,r,l,K;
2703
+ return(M);
2704
+ }
2705
+
2706
+ static proc normalizeC(ideal I)
2707
+ {
2708
+ //makes all coefficients of the polynomials of I to 1
2709
+ int i,j;
2710
+ poly p,q;
2711
+ for(i=1;i<=size(I);i++)
2712
+ {
2713
+ p=I[i];
2714
+ q=0;
2715
+ for(j=1;j<=size(p);j++)
2716
+ {
2717
+ q=q+leadmonom(p[j]);
2718
+ }
2719
+ I[i]=q;
2720
+ }
2721
+ return(I);
2722
+ }
2723
+
2724
+ static proc normal47(ideal I, intvec semi)
2725
+ {
2726
+ //here we compute the normal forms with semigroup <4,7,...>
2727
+
2728
+ if(semi==intvec(4,7))
2729
+ {
2730
+ if(I[2][2]==var(1)^9){return(ideal(var(1)^4,var(1)^7+var(1)^9));}
2731
+ if(I[2][2]==0){return(ideal(var(1)^4,var(1)^7));}
2732
+ return(ideal(var(1)^4,var(1)^7+var(1)^13));
2733
+ }
2734
+ if(semi==intvec(4,7,9))
2735
+ {
2736
+ if(I[2][2]!=0){I[2]=var(1)^7;}
2737
+ return(I);
2738
+ }
2739
+ if(semi==intvec(4,7,10))
2740
+ {
2741
+ I[3]=var(1)^10;
2742
+ if(I[2][2]==var(1)^9)
2743
+ {
2744
+ I[2]=var(1)^7+var(1)^9;
2745
+ }
2746
+ else
2747
+ {
2748
+ I[2]=var(1)^7;
2749
+ }
2750
+ return(I);
2751
+ }
2752
+ if(semi==intvec(4,7,13))
2753
+ {
2754
+ I[3]=var(1)^13;
2755
+ if(I[2][2]==var(1)^9)
2756
+ {
2757
+ I[2]=var(1)^7+var(1)^9;
2758
+ }
2759
+ else
2760
+ {
2761
+ I[2]=var(1)^7;
2762
+ }
2763
+ return(I);
2764
+ }
2765
+ if(semi==intvec(4,7,17))
2766
+ {
2767
+ I[3]=var(1)^17;
2768
+ if(I[2][2]==var(1)^9)
2769
+ {
2770
+ I[2]=var(1)^7+var(1)^9;
2771
+ }
2772
+ if(ord(I[2][2])>9)
2773
+ {
2774
+ number a=leadcoef(I[2][2]);
2775
+ number b=leadcoef(I[2][3]);
2776
+ if(17*a^2==14*b)
2777
+ {
2778
+ I[2]=var(1)^7;
2779
+ }
2780
+ else
2781
+ {
2782
+ I[2]=var(1)^7+var(1)^13;
2783
+ }
2784
+ }
2785
+ return(I);
2786
+ }
2787
+ }
2788
+
2789
+ static proc normal45(ideal I, intvec semi)
2790
+ {
2791
+ //here we compute the normal forms with semigroup <4,5,...>
2792
+ int p=char(basering);
2793
+ number a=leadcoef(I[2][2]);
2794
+ number b=leadcoef(I[2][3]);
2795
+ if(semi==intvec(4,5))
2796
+ {
2797
+ if(10*b==11*a^2)
2798
+ {
2799
+ I=var(1)^4,var(1)^5;
2800
+ }
2801
+ else
2802
+ {
2803
+ I=var(1)^4,var(1)^5+var(1)^7;
2804
+ }
2805
+ if((p==5)&&(a!=0))
2806
+ {
2807
+ I=var(1)^4,var(1)^5+var(1)^6;
2808
+ }
2809
+ }
2810
+ if(semi==intvec(4,5,6))
2811
+ {
2812
+ if((p==3)&&(ord(I[3][2])==7))
2813
+ {
2814
+ I=var(1)^4,var(1)^5,var(1)^6+var(1)^7;
2815
+ }
2816
+ else
2817
+ {
2818
+ I=var(1)^4,var(1)^5,var(1)^6;
2819
+ }
2820
+ }
2821
+ if(semi==intvec(4,5,7))
2822
+ {
2823
+ if((p==5)&&(ord(I[2][2])==6))
2824
+ {
2825
+ I=var(1)^4,var(1)^5+var(1)^6,var(1)^7;
2826
+ }
2827
+ else
2828
+ {
2829
+ I=var(1)^4,var(1)^5,var(1)^7;
2830
+ }
2831
+ }
2832
+ if(semi==intvec(4,5,11))
2833
+ {
2834
+ if((p==5)&&(ord(I[2][2])==6))
2835
+ {
2836
+ I=var(1)^4,var(1)^5+var(1)^6,var(1)^11;
2837
+ }
2838
+ else
2839
+ {
2840
+ I=var(1)^4,var(1)^5,var(1)^11;
2841
+ if(11*a^2!=10*b)
2842
+ {
2843
+ I=var(1)^4,var(1)^5+var(1)^7,var(1)^11;
2844
+ }
2845
+ }
2846
+ }
2847
+ return(I);
2848
+ }
2849
+
2850
+ static proc normal46(ideal I, intvec semi, int k, int r)
2851
+ {
2852
+ //here we compute the normal forms with semigroup <4,6,...>
2853
+ if(char(basering)==3)
2854
+ {
2855
+ if(ord(I[2][2])==9)
2856
+ {
2857
+ I=var(1)^4,var(1)^6+var(1)^9,var(1)^7;
2858
+ }
2859
+ else
2860
+ {
2861
+ I=var(1)^4,var(1)^6,var(1)^7;
2862
+ }
2863
+ return(I);
2864
+ }
2865
+ if(char(basering)==13)
2866
+ {
2867
+ if(ord(I[3])==7)
2868
+ {
2869
+ I=var(1)^4,var(1)^6,var(1)^7;
2870
+ }
2871
+ if(ord(I[3])==9)
2872
+ {
2873
+ if(ord(I[2][2])==7)
2874
+ {
2875
+ I=var(1)^4,var(1)^6+var(1)^7,var(1)^9;
2876
+ }
2877
+ else
2878
+ {
2879
+ I=var(1)^4,var(1)^6,var(1)^9;
2880
+ }
2881
+ }
2882
+ return(I);
2883
+ }
2884
+ if(size(semi)==4)
2885
+ {
2886
+ I=var(1)^4,var(1)^6+var(1)^k,var(1)^r;
2887
+ }
2888
+ if(size(semi)==3)
2889
+ {
2890
+ if(k<0)
2891
+ {
2892
+ I=var(1)^4,var(1)^6,var(1)^r;
2893
+ }
2894
+ if(r==0)
2895
+ {
2896
+ I=var(1)^4,var(1)^6+var(1)^k;
2897
+ }
2898
+ if((r>0)&&(k>0))
2899
+ {
2900
+ I=var(1)^4,var(1)^6+var(1)^k,var(1)^r;
2901
+ }
2902
+ }
2903
+ return(I);
2904
+ }
2905
+
2906
+ static proc normal3(ideal I, intvec semi, int l)
2907
+ {
2908
+ //here we compute the normal forms with semigroup <3,...>
2909
+ if(char(basering)==3)
2910
+ {
2911
+ if(semi==intvec(3,5))
2912
+ {
2913
+ if(ord(I[1][2])==4)
2914
+ {
2915
+ I=var(1)^3+var(1)^4,var(1)^5;
2916
+ }
2917
+ else
2918
+ {
2919
+ I=var(1)^3,var(1)^5;
2920
+ }
2921
+ return(I);
2922
+ }
2923
+ if(semi==intvec(3,5,7))
2924
+ {
2925
+ if(ord(I[1][2])==4)
2926
+ {
2927
+ I=var(1)^3+var(1)^4,var(1)^5,var(1)^7;
2928
+ }
2929
+ else
2930
+ {
2931
+ I=var(1)^3,var(1)^5,var(1)^7;
2932
+ }
2933
+ return(I);
2934
+ }
2935
+ if(semi==intvec(3,7,8))
2936
+ {
2937
+ if(ord(I[1][2])==4)
2938
+ {
2939
+ I=var(1)^3+var(1)^4,var(1)^7,var(1)^8;
2940
+ return(I);
2941
+ }
2942
+ if(ord(I[1][2])==5)
2943
+ {
2944
+ I=var(1)^3+var(1)^5,var(1)^7,var(1)^8;
2945
+ }
2946
+ else
2947
+ {
2948
+ I=var(1)^3,var(1)^7,var(1)^8;
2949
+ }
2950
+ return(I);
2951
+
2952
+ }
2953
+ return(-1);
2954
+ }
2955
+ int k=semi[2];
2956
+ int r;
2957
+ if(size(semi)==3)
2958
+ {
2959
+ r=semi[3];
2960
+ }
2961
+ if(l==0)
2962
+ {
2963
+ if(r==0)
2964
+ {
2965
+ I=var(1)^3,var(1)^k;
2966
+ }
2967
+ else
2968
+ {
2969
+ I=var(1)^3,var(1)^k,var(1)^r;
2970
+ }
2971
+ }
2972
+ else
2973
+ {
2974
+ if(r==0)
2975
+ {
2976
+ I=var(1)^3,var(1)^k+var(1)^l;
2977
+ }
2978
+ else
2979
+ {
2980
+ I=var(1)^3,var(1)^k+var(1)^l,var(1)^r;
2981
+ }
2982
+ }
2983
+ return(I);
2984
+ }
2985
+
2986
+ static proc normal2(ideal I, intvec semi)
2987
+ {
2988
+ //here we compute the normal forms in characteristic 2
2989
+ if(ord(I[1])==2)
2990
+ {
2991
+ int k=ord(I[1][2]);
2992
+ if(k>0){I=var(1)^2+var(1)^k,I[2];}
2993
+ }
2994
+ if(semi==intvec(3,4))
2995
+ {
2996
+ if(ord(I[2][2])==5)
2997
+ {
2998
+ I=var(1)^3,var(1)^4+var(1)^5;
2999
+ }
3000
+ else
3001
+ {
3002
+ I=var(1)^3,var(1)^4;
3003
+ }
3004
+ }
3005
+ if(semi==intvec(3,4,5))
3006
+ {
3007
+ I=var(1)^3,var(1)^4,var(1)^5;
3008
+ }
3009
+ if(semi==intvec(3,5))
3010
+ {
3011
+ I=var(1)^3,var(1)^5;
3012
+ }
3013
+ if(semi==intvec(3,5,7))
3014
+ {
3015
+ I=var(1)^3,var(1)^5,var(1)^7;
3016
+ }
3017
+ if(semi==intvec(3,7))
3018
+ {
3019
+ if(ord(I[2][2])==8)
3020
+ {
3021
+ I=var(1)^3,var(1)^7+var(1)^8;
3022
+ }
3023
+ else
3024
+ {
3025
+ I=var(1)^3,var(1)^7;
3026
+ }
3027
+ }
3028
+ if(semi==intvec(3,7,8))
3029
+ {
3030
+ I=var(1)^3,var(1)^7,var(1)^8;
3031
+ }
3032
+ if(semi==intvec(3,7,11))
3033
+ {
3034
+ if(ord(I[2][2])==8)
3035
+ {
3036
+ I=var(1)^3,var(1)^7+var(1)^8,var(1)^11;
3037
+ }
3038
+ else
3039
+ {
3040
+ I=var(1)^3,var(1)^7,var(1)^11;
3041
+ }
3042
+ }
3043
+ if(semi==intvec(3,8,10))
3044
+ {
3045
+ I=var(1)^3,var(1)^8,var(1)^10;
3046
+ }
3047
+ if(semi==intvec(3,8,13))
3048
+ {
3049
+ if(ord(I[2][2])==10)
3050
+ {
3051
+ I=var(1)^3,var(1)^8+var(1)^10,var(1)^13;
3052
+ }
3053
+ else
3054
+ {
3055
+ I=var(1)^3,var(1)^8,var(1)^13;
3056
+ }
3057
+ }
3058
+ if(semi==intvec(3,10,11))
3059
+ {
3060
+ I=var(1)^3,var(1)^10,var(1)^11;
3061
+ }
3062
+ if(semi==intvec(3,10,14))
3063
+ {
3064
+ if(ord(I[2][2])==11)
3065
+ {
3066
+ I=var(1)^3,var(1)^10+var(1)^11,var(1)^14;
3067
+ }
3068
+ else
3069
+ {
3070
+ I=var(1)^3,var(1)^10,var(1)^14;
3071
+ }
3072
+
3073
+ }
3074
+ return(I);
3075
+ }
3076
+
3077
+ ////////////////////////////////////////////////////////////////////////////////
3078
+ //============================ Examples========================
3079
+ /*
3080
+ ring r=0,t,(c,ds);
3081
+ ideal I=t4+t7,t6+t7;
3082
+ HHnormalForm(I);
3083
+
3084
+ ring r=0,t,(c,ds);
3085
+ ideal I=t4+t7+t9,t6+t11;
3086
+ HHnormalForm(I);
3087
+
3088
+ ring r=0,t,(c,ds);
3089
+ ideal I=t4+t5,t9+t10;
3090
+ HHnormalForm(I);
3091
+
3092
+ ring r=0,t,Ds;
3093
+ ideal I=t6+3t7,t8+t13+t19;
3094
+ HHnormalForm(I);
3095
+
3096
+ ring r=32003,t,Ds;
3097
+ ideal I=t8,t12+3t15+7t19;
3098
+ HHnormalForm(I);
3099
+
3100
+ ring r=32003,t,Ds;
3101
+ ideal I=t16,t24+t28+t30+t31;
3102
+ HHnormalForm(I);
3103
+
3104
+ */
3105
+
3106
+ /*
3107
+ =============================== Examples==========================================
3108
+ ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t7+7t8+22t9+51t10+113t11+219t12+366t13+589t14+876t15+1170t16+1514t17+1828t1
3109
+ 8+2011t19+2165t20+2163t21+1982t22+1806t23+1491t24+1141t25+889t26+588t27+379t28+2
3110
+ 52t29+120t30+72t31+36t32+9t33+9t34+t36;
3111
+ planeCur(I);
3112
+ //=============================
3113
+ ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t7+7t8+21t9+42t10+77t11+126t12+168t13+211t14+252t15+252t16+245t17+231t18+17
3114
+ 5t19+140t20+105t21+56t22+42t23+21t24+7t25+7t26+t28
3115
+ planeCur(I);
3116
+ //===============================
3117
+ ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t5+5t6+11t7+22t8+46t9+73t10+107t11+161t12+198t13+231t14+272t15+262t16+250t1
3118
+ 7+236t18+175t19+141t20+105t21+56t22+42t23+21t24+7t25+7t26+t28
3119
+ planeCur(I);
3120
+ //===============================
3121
+ ideal I=t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16,t6+7t7+22t8+47t9+87t10+143t11+202t12+258t13+307t14+332t15+327t16+305t17+266
3122
+ t18+205t19+155t20+111t21+62t22+42t23+22t24+7t25+7t26+t28
3123
+ planeCur(I);
3124
+ //===============================
3125
+ ideal I=t2+2t3+t4+2t5+2t6+t8,t+t2+t4;
3126
+ planeCur(I);
3127
+ //===============================
3128
+ ideal I=t2+2t3+t4+2t5+2t6+t8,t3+3t4+3t5+4t6+6t7+3t8+3t9+3t10+t12;
3129
+ planeCur(I);
3130
+ //===============================
3131
+ ideal I=t2+2t3+t4+2t5+2t6+t8,t5+5t6+10t7+15t8+25t9+31t10+30t11+35t12+30t13+20t14+20t15+10t16+5t17+5t18+t
3132
+ 20;
3133
+ planeCur(I);
3134
+ //================================================================
3135
+ ideal I=t2+2t3+t4+2t5+2t6+t8,t11+11t12+55t13+176t14+440t15+957t16+1837t17+3135t18+4917t19+7150t20+9581t2
3136
+ 1+12046t22+14300t23+15851t24+16665t25+16687t26+15642t27+14025t28+12012t29+9570t3
3137
+ 0+7392t31+5412t32+3630t33+2442t34+1485t35+825t36+495t37+220t38+110t39+55t40+11t4
3138
+ 1+11t42+t44
3139
+ planeCur(I);
3140
+ //===============================
3141
+ ideal I=t2+2t3+t4+2t5+2t6+t8,t45+45t46+990t47+14235t48+150975t49+1264329t50+8742030t51+51530985t52+26531
3142
+ 7525t53+1216052255t54+5037384726t55+19091253735t56+66860434260t57+218159032410t5
3143
+ 8+667743178590t59+1928258130018t60+5278946615910t61+13758022145340t62+3425642198
3144
+ 1760t63+81743054778990t64+187438301870193t65+413998043743845t66+882643063827960t
3145
+ 67+1819834573178925t68+3634672399863945t69+7042671464388093t70+13256726980146210
3146
+ t71+24271349963247255t72+43270648586469315t73+75192560924341905t74+1274795590273
3147
+ 39134t75+211037186585880765t76+341404127193205395t77+540109313678250885t78+83615
3148
+ 2328502076770t79+1267494306126371433t80+1882391473790147350t81+27403488768330021
3149
+ 60t82+3912426884928977910t83+5480608823069934180t84+7535946071701345419t85+10175
3150
+ 247273088233765t86+13496177050168252770t87+17590776929351920305t88+2253760903474
3151
+ 9950330t89+28392934993342165732t90+35181553858703840610t91+42888103580926417860t
3152
+ 92+51449748796644626670t93+60751205041524651720t94+70622965899108523296t95+80843
3153
+ 398349265488310t96+91145062374529367655t97+101225220090613564275t98+110760068529
3154
+ 877638960t99+119421810187582522995t100+126897320456330125725t101+132906930278955
3155
+ 392505t102+137221752614812709130t103+139678059865381605315t104+14018746206071963
3156
+ 5683t105+138742016728357115865t106+135413875517988518550t107+1303495836626693311
3157
+ 25t108+123759636437037165840t109+115904304930914703126t110+107077029168089360280
3158
+ t111+97586814544772570280t112+87741050370279892245t113+77830012377996062865t114+
3159
+ 68114044171037561004t115+58814074232856531765t116+50105762317964865600t117+42117
3160
+ 223130580686220t118+34929979773602146200t119+28582581501297657240t120+2307618932
3161
+ 9698326690t121+18381388272325750530t122+14445518786710710480t123+111999120315284
3162
+ 53530t124+8566543884036576384t125+6463772035817658320t126+4810966835075093880t12
3163
+ 7+3531977599087147320t128+2557482632962404180t129+1826346112628778972t130+128615
3164
+ 1054039308160t131+893096793855988260t132+611445912380539110t133+4126879484894709
3165
+ 90t134+274559737461674588t135+180030436220988810t136+116328756134241090t137+7406
3166
+ 1684381355110t138+46450833440621940t139+28695217633493598t140+17456561066064945t
3167
+ 141+10455665532950385t142+6164429567615550t143+3576677924170795t144+204174682346
3168
+ 8917t145+1146414046643415t146+632953124099190t147+343522434444255t148+1832093883
3169
+ 47205t149+95981896978935t150+49375510221510t151+24930700142535t152+1234956944936
3170
+ 0t153+5998779092790t154+2855797655022t155+1331635383390t156+607860009900t157+271
3171
+ 401068250t158+118455934740t159+50498441136t160+20999419155t161+8518084355t162+33
3172
+ 61582620t163+1290701115t164+481780299t165+173664315t166+61087950t167+20511645t16
3173
+ 8+6704775t169+2115729t170+610170t171+191565t172+42570t173+15180t174+1980t175+990
3174
+ t176+45t177+45t178+t180
3175
+ planeCur(I);
3176
+ //===============================
3177
+ ideal I=t3+3t4+3t5+4t6+6t7+3t8+3t9+3t10+t12,t2+2t3+t4+2t5+2t6+t8
3178
+ planeCur(I);
3179
+ //===============================
3180
+ ideal I=t3+3t4+3t5+4t6+6t7+3t8+3t9+3t10+t12,t5+5t6+10t7+15t8+25t9+31t10+30t11+35t12+30t13+20t14+20t15+10t16+5t17+5t18+t20
3181
+ planeCur(I);
3182
+ //===============================
3183
+ ideal I=t3+3t4+3t5+4t6+6t7+3t8+3t9+3t10+t12,t4+4t5+6t6+8t7+13t8+12t9+10t10+12t11+6t12+4t13+4t14+t16
3184
+ planeCur(I);
3185
+ //==========================================================================
3186
+ ring r=0,t,Ds;
3187
+ ideal I=t3,t10+t14;
3188
+ planeCur(I);
3189
+ //===============================
3190
+ ideal I=t3+3t4+3t5+t6,t10+10t11+45t12+120t13+211t14+266t15+301t16+484t17+1046t18+2012t19+3004t20+
3191
+ 3432t21+3003t22+2002t23+1001t24+364t25+91t26+14t27+t28
3192
+ planeCur(I);
3193
+ //=======================================
3194
+ ideal I=t3+3t4+3t5+t6,t10+10t11+45t12+120t13+210t14+252t15+210t16+120t17+45t18+10t19+t20
3195
+ planeCur(I);
3196
+ //===============================
3197
+ ring r=0,t,Ds;
3198
+ ideal I=t3+3t4+3t5+t6,t13+14t14+92t15+377t16+1079t17+2288t18+3718t19+4719t20+4719t21+3718t22+2288
3199
+ t23+1079t24+377t25+92t26+14t27+t28,t20+20t21+190t22+1140t23+4845t24+15504t25+38760t26+77520t27+125970t28+16796
3200
+ 0t29+184756t30+167960t31+125970t32+77520t33+38760t34+15504t35+4845t36+1140t37+19
3201
+ 0t38+20t39+t40
3202
+ spaceCur(I);
3203
+ //=====================================================
3204
+ ideal I=t3+3t4+3t5+t6,t13+14t14+92t15+377t16+1079t17+2288t18+3718t19+4719t20+4719t21+3718t22+2288
3205
+ t23+1079t24+377t25+92t26+14t27+t28,t17+17t18+136t19+680t20+2380t21+6188t22+12376t23+19448t24+24310t25+24310t26
3206
+ +19448t27+12376t28+6188t29+2380t30+680t31+136t32+17t33+t34
3207
+ spaceCur(I);
3208
+ //========================================================
3209
+ ideal I=t3,t16,t14;
3210
+ spaceCur(I);
3211
+ //=============================================
3212
+ ideal I=t3,t19,t14;
3213
+ spaceCur(I);
3214
+ //==============================================
3215
+ ideal I=t3,t14+t16,t19;
3216
+ spaceCur(I);
3217
+ //===============================================
3218
+ ideal I=t3,t14+t16,t25;
3219
+ spaceCur(I);
3220
+ //=======================================
3221
+ ideal I=t3+3t4+3t5+t6,t14+14t15+91t16+364t17+1001t18+2002t19+3003t20+3432t21+3004t22+2024t23+1232
3222
+ t24+1904t25+7406t26+26348t27+74614t28+170544t29+319770t30+497420t31+646646t32+70
3223
+ 5432t33+646646t34+497420t35+319770t36+170544t37+74613t38+26334t39+7315t40+1540t4
3224
+ 1+231t42+22t43+t44,t25+25t26+300t27+2300t28+12650t29+53130t30+177100t31+480700t32+1081575t33+2
3225
+ 042975t34+3268760t35+4457400t36+5200300t37+5200300t38+4457400t39+3268760t40+2042
3226
+ 975t41+1081575t42+480700t43+177100t44+53130t45+12650t46+2300t47+300t48+25t49+t50
3227
+ spaceCur(I);
3228
+ //=========================================================
3229
+ ideal I=t3+3t4+3t5+t6,t14+14t15+91t16+364t17+1001t18+2003t19+3022t20+3603t21+3972t22+5878t23+1262
3230
+ 9t24+27496t25+50479t26+75596t27+92379t28+92378t29+75582t30+50388t31+27132t32+116
3231
+ 28t33+3876t34+969t35+171t36+19t37+t38,t25+25t26+300t27+2300t28+12650t29+53130t30+177100t31+480700t32+1081575t33+2
3232
+ 042975t34+3268760t35+4457400t36+5200300t37+5200300t38+4457400t39+3268760t40+2042
3233
+ 975t41+1081575t42+480700t43+177100t44+53130t45+12650t46+2300t47+300t48+25t49+t50
3234
+ spaceCur(I);
3235
+ //==============================================================
3236
+ ideal I=t3+3t4+3t5+t6,t14+14t15+92t16+380t17+1121t18+2562t19+4823t20+7800t21+11011t22+13442t23+13
3237
+ 871t24+11804t25+8099t26+4382t27+1821t28+560t29+120t30+16t31+t32,t19+19t20+171t21+969t22+3876t23+11628t24+27132t25+50388t26+75582t27+92378t2
3238
+ 8+92378t29+75582t30+50388t31+27132t32+11628t33+3876t34+969t35+171t36+19t37+t38
3239
+ spaceCur(I);
3240
+ //======================================================================
3241
+ ideal I=t3+3t4+3t5+t6,t14+14t15+92t16+380t17+1121t18+2562t19+4823t20+7800t21+11011t22+13442t23+13
3242
+ 871t24+11804t25+8099t26+4382t27+1821t28+560t29+120t30+16t31+t32,t25+25t26+300t27+2300t28+12650t29+53130t30+177100t31+480700t32+1081575t33+2
3243
+ 042975t34+3268760t35+4457400t36+5200300t37+5200300t38+4457400t39+3268760t40+2042
3244
+ 975t41+1081575t42+480700t43+177100t44+53130t45+12650t46+2300t47+300t48+25t49+t50
3245
+ spaceCur(I);
3246
+ //================================================================
3247
+ ideal I=t3+3t4+3t5+t6,t16+16t17+120t18+560t19+1820t20+4368t21+8008t22+11440t23+12870t24+11440t25+
3248
+ 8008t26+4368t27+1820t28+560t29+120t30+16t31+t32
3249
+ ,t14+14t15+91t16+364t17+1001t18+2002t19+3003t20+3432t21+3003t22+2002t23+1001
3250
+ t24+364t25+91t26+14t27+t28
3251
+ spaceCur(I);
3252
+ //===========================================================================================
3253
+ */