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

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

Potentially problematic release.


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

Files changed (491) hide show
  1. PySingular.cpython-314-x86_64-linux-gnu.so +0 -0
  2. passagemath_singular-10.6.31rc3.dist-info/METADATA +183 -0
  3. passagemath_singular-10.6.31rc3.dist-info/RECORD +491 -0
  4. passagemath_singular-10.6.31rc3.dist-info/WHEEL +6 -0
  5. passagemath_singular-10.6.31rc3.dist-info/top_level.txt +3 -0
  6. passagemath_singular.libs/libSingular-4-20aec911.4.1.so +0 -0
  7. passagemath_singular.libs/libcddgmp-21acf0c6.so.0.1.3 +0 -0
  8. passagemath_singular.libs/libfactory-4-fcee31da.4.1.so +0 -0
  9. passagemath_singular.libs/libflint-66e12231.so.21.0.0 +0 -0
  10. passagemath_singular.libs/libgf2x-a4cdec90.so.3.0.0 +0 -0
  11. passagemath_singular.libs/libgfortran-83c28eba.so.5.0.0 +0 -0
  12. passagemath_singular.libs/libgmp-6e109695.so.10.5.0 +0 -0
  13. passagemath_singular.libs/libgsl-cda90e79.so.28.0.0 +0 -0
  14. passagemath_singular.libs/libmpfr-82690d50.so.6.2.1 +0 -0
  15. passagemath_singular.libs/libntl-e6f0d543.so.44.0.1 +0 -0
  16. passagemath_singular.libs/libomalloc-0-5c9e866e.9.6.so +0 -0
  17. passagemath_singular.libs/libopenblasp-r0-6dcb67f9.3.29.so +0 -0
  18. passagemath_singular.libs/libpolys-4-5c0a87e0.4.1.so +0 -0
  19. passagemath_singular.libs/libquadmath-2284e583.so.0.0.0 +0 -0
  20. passagemath_singular.libs/libreadline-ea270e21.so.8.2 +0 -0
  21. passagemath_singular.libs/libsingular_resources-4-a1aafc6d.4.1.so +0 -0
  22. passagemath_singular.libs/libtinfo-ceb117d9.so.6.3 +0 -0
  23. sage/algebras/all__sagemath_singular.py +3 -0
  24. sage/algebras/fusion_rings/all.py +19 -0
  25. sage/algebras/fusion_rings/f_matrix.py +2448 -0
  26. sage/algebras/fusion_rings/fast_parallel_fmats_methods.cpython-314-x86_64-linux-gnu.so +0 -0
  27. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pxd +5 -0
  28. sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +538 -0
  29. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.cpython-314-x86_64-linux-gnu.so +0 -0
  30. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pxd +3 -0
  31. sage/algebras/fusion_rings/fast_parallel_fusion_ring_braid_repn.pyx +331 -0
  32. sage/algebras/fusion_rings/fusion_double.py +899 -0
  33. sage/algebras/fusion_rings/fusion_ring.py +1580 -0
  34. sage/algebras/fusion_rings/poly_tup_engine.cpython-314-x86_64-linux-gnu.so +0 -0
  35. sage/algebras/fusion_rings/poly_tup_engine.pxd +24 -0
  36. sage/algebras/fusion_rings/poly_tup_engine.pyx +579 -0
  37. sage/algebras/fusion_rings/shm_managers.cpython-314-x86_64-linux-gnu.so +0 -0
  38. sage/algebras/fusion_rings/shm_managers.pxd +24 -0
  39. sage/algebras/fusion_rings/shm_managers.pyx +780 -0
  40. sage/algebras/letterplace/all.py +1 -0
  41. sage/algebras/letterplace/free_algebra_element_letterplace.cpython-314-x86_64-linux-gnu.so +0 -0
  42. sage/algebras/letterplace/free_algebra_element_letterplace.pxd +18 -0
  43. sage/algebras/letterplace/free_algebra_element_letterplace.pyx +755 -0
  44. sage/algebras/letterplace/free_algebra_letterplace.cpython-314-x86_64-linux-gnu.so +0 -0
  45. sage/algebras/letterplace/free_algebra_letterplace.pxd +35 -0
  46. sage/algebras/letterplace/free_algebra_letterplace.pyx +914 -0
  47. sage/algebras/letterplace/letterplace_ideal.cpython-314-x86_64-linux-gnu.so +0 -0
  48. sage/algebras/letterplace/letterplace_ideal.pyx +408 -0
  49. sage/algebras/quatalg/all.py +2 -0
  50. sage/algebras/quatalg/quaternion_algebra.py +4778 -0
  51. sage/algebras/quatalg/quaternion_algebra_cython.cpython-314-x86_64-linux-gnu.so +0 -0
  52. sage/algebras/quatalg/quaternion_algebra_cython.pyx +261 -0
  53. sage/algebras/quatalg/quaternion_algebra_element.cpython-314-x86_64-linux-gnu.so +0 -0
  54. sage/algebras/quatalg/quaternion_algebra_element.pxd +29 -0
  55. sage/algebras/quatalg/quaternion_algebra_element.pyx +2176 -0
  56. sage/all__sagemath_singular.py +11 -0
  57. sage/ext_data/all__sagemath_singular.py +1 -0
  58. sage/ext_data/singular/function_field/core.lib +98 -0
  59. sage/interfaces/all__sagemath_singular.py +1 -0
  60. sage/interfaces/singular.py +2835 -0
  61. sage/libs/all__sagemath_singular.py +1 -0
  62. sage/libs/singular/__init__.py +1 -0
  63. sage/libs/singular/decl.pxd +1168 -0
  64. sage/libs/singular/function.cpython-314-x86_64-linux-gnu.so +0 -0
  65. sage/libs/singular/function.pxd +87 -0
  66. sage/libs/singular/function.pyx +1901 -0
  67. sage/libs/singular/function_factory.py +61 -0
  68. sage/libs/singular/groebner_strategy.cpython-314-x86_64-linux-gnu.so +0 -0
  69. sage/libs/singular/groebner_strategy.pxd +22 -0
  70. sage/libs/singular/groebner_strategy.pyx +582 -0
  71. sage/libs/singular/option.cpython-314-x86_64-linux-gnu.so +0 -0
  72. sage/libs/singular/option.pyx +671 -0
  73. sage/libs/singular/polynomial.cpython-314-x86_64-linux-gnu.so +0 -0
  74. sage/libs/singular/polynomial.pxd +39 -0
  75. sage/libs/singular/polynomial.pyx +661 -0
  76. sage/libs/singular/ring.cpython-314-x86_64-linux-gnu.so +0 -0
  77. sage/libs/singular/ring.pxd +58 -0
  78. sage/libs/singular/ring.pyx +893 -0
  79. sage/libs/singular/singular.cpython-314-x86_64-linux-gnu.so +0 -0
  80. sage/libs/singular/singular.pxd +72 -0
  81. sage/libs/singular/singular.pyx +1944 -0
  82. sage/libs/singular/standard_options.py +145 -0
  83. sage/matrix/all__sagemath_singular.py +1 -0
  84. sage/matrix/matrix_mpolynomial_dense.cpython-314-x86_64-linux-gnu.so +0 -0
  85. sage/matrix/matrix_mpolynomial_dense.pxd +7 -0
  86. sage/matrix/matrix_mpolynomial_dense.pyx +615 -0
  87. sage/rings/all__sagemath_singular.py +1 -0
  88. sage/rings/function_field/all__sagemath_singular.py +1 -0
  89. sage/rings/function_field/derivations_polymod.py +911 -0
  90. sage/rings/function_field/element_polymod.cpython-314-x86_64-linux-gnu.so +0 -0
  91. sage/rings/function_field/element_polymod.pyx +406 -0
  92. sage/rings/function_field/function_field_polymod.py +2611 -0
  93. sage/rings/function_field/ideal_polymod.py +1775 -0
  94. sage/rings/function_field/order_polymod.py +1475 -0
  95. sage/rings/function_field/place_polymod.py +681 -0
  96. sage/rings/polynomial/all__sagemath_singular.py +1 -0
  97. sage/rings/polynomial/multi_polynomial_ideal_libsingular.cpython-314-x86_64-linux-gnu.so +0 -0
  98. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pxd +5 -0
  99. sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx +339 -0
  100. sage/rings/polynomial/multi_polynomial_libsingular.cpython-314-x86_64-linux-gnu.so +0 -0
  101. sage/rings/polynomial/multi_polynomial_libsingular.pxd +30 -0
  102. sage/rings/polynomial/multi_polynomial_libsingular.pyx +6277 -0
  103. sage/rings/polynomial/plural.cpython-314-x86_64-linux-gnu.so +0 -0
  104. sage/rings/polynomial/plural.pxd +48 -0
  105. sage/rings/polynomial/plural.pyx +3171 -0
  106. sage/symbolic/all__sagemath_singular.py +1 -0
  107. sage/symbolic/comparison_impl.pxi +428 -0
  108. sage/symbolic/constants_c_impl.pxi +178 -0
  109. sage/symbolic/expression.cpython-314-x86_64-linux-gnu.so +0 -0
  110. sage/symbolic/expression.pxd +7 -0
  111. sage/symbolic/expression.pyx +14200 -0
  112. sage/symbolic/getitem_impl.pxi +202 -0
  113. sage/symbolic/pynac.pxi +572 -0
  114. sage/symbolic/pynac_constant_impl.pxi +133 -0
  115. sage/symbolic/pynac_function_impl.pxi +206 -0
  116. sage/symbolic/pynac_impl.pxi +2576 -0
  117. sage/symbolic/pynac_wrap.h +124 -0
  118. sage/symbolic/series_impl.pxi +272 -0
  119. sage/symbolic/substitution_map_impl.pxi +94 -0
  120. sage_wheels/bin/ESingular +0 -0
  121. sage_wheels/bin/Singular +0 -0
  122. sage_wheels/bin/TSingular +0 -0
  123. sage_wheels/lib/singular/MOD/cohomo.la +41 -0
  124. sage_wheels/lib/singular/MOD/cohomo.so +0 -0
  125. sage_wheels/lib/singular/MOD/customstd.la +41 -0
  126. sage_wheels/lib/singular/MOD/customstd.so +0 -0
  127. sage_wheels/lib/singular/MOD/freealgebra.la +41 -0
  128. sage_wheels/lib/singular/MOD/freealgebra.so +0 -0
  129. sage_wheels/lib/singular/MOD/gfanlib.la +41 -0
  130. sage_wheels/lib/singular/MOD/gfanlib.so +0 -0
  131. sage_wheels/lib/singular/MOD/gitfan.la +41 -0
  132. sage_wheels/lib/singular/MOD/gitfan.so +0 -0
  133. sage_wheels/lib/singular/MOD/interval.la +41 -0
  134. sage_wheels/lib/singular/MOD/interval.so +0 -0
  135. sage_wheels/lib/singular/MOD/loctriv.la +41 -0
  136. sage_wheels/lib/singular/MOD/loctriv.so +0 -0
  137. sage_wheels/lib/singular/MOD/machinelearning.la +41 -0
  138. sage_wheels/lib/singular/MOD/machinelearning.so +0 -0
  139. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.la +41 -0
  140. sage_wheels/lib/singular/MOD/p_Procs_FieldGeneral.so +0 -0
  141. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.la +41 -0
  142. sage_wheels/lib/singular/MOD/p_Procs_FieldIndep.so +0 -0
  143. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.la +41 -0
  144. sage_wheels/lib/singular/MOD/p_Procs_FieldQ.so +0 -0
  145. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.la +41 -0
  146. sage_wheels/lib/singular/MOD/p_Procs_FieldZp.so +0 -0
  147. sage_wheels/lib/singular/MOD/partialgb.la +41 -0
  148. sage_wheels/lib/singular/MOD/partialgb.so +0 -0
  149. sage_wheels/lib/singular/MOD/pyobject.la +41 -0
  150. sage_wheels/lib/singular/MOD/pyobject.so +0 -0
  151. sage_wheels/lib/singular/MOD/singmathic.la +41 -0
  152. sage_wheels/lib/singular/MOD/singmathic.so +0 -0
  153. sage_wheels/lib/singular/MOD/sispasm.la +41 -0
  154. sage_wheels/lib/singular/MOD/sispasm.so +0 -0
  155. sage_wheels/lib/singular/MOD/subsets.la +41 -0
  156. sage_wheels/lib/singular/MOD/subsets.so +0 -0
  157. sage_wheels/lib/singular/MOD/systhreads.la +41 -0
  158. sage_wheels/lib/singular/MOD/systhreads.so +0 -0
  159. sage_wheels/lib/singular/MOD/syzextra.la +41 -0
  160. sage_wheels/lib/singular/MOD/syzextra.so +0 -0
  161. sage_wheels/libexec/singular/MOD/change_cost +0 -0
  162. sage_wheels/libexec/singular/MOD/singularsurf +11 -0
  163. sage_wheels/libexec/singular/MOD/singularsurf_jupyter +9 -0
  164. sage_wheels/libexec/singular/MOD/singularsurf_win +10 -0
  165. sage_wheels/libexec/singular/MOD/solve_IP +0 -0
  166. sage_wheels/libexec/singular/MOD/surfex +16 -0
  167. sage_wheels/libexec/singular/MOD/toric_ideal +0 -0
  168. sage_wheels/share/factory/gftables/10201 +342 -0
  169. sage_wheels/share/factory/gftables/1024 +37 -0
  170. sage_wheels/share/factory/gftables/10609 +356 -0
  171. sage_wheels/share/factory/gftables/11449 +384 -0
  172. sage_wheels/share/factory/gftables/11881 +398 -0
  173. sage_wheels/share/factory/gftables/121 +6 -0
  174. sage_wheels/share/factory/gftables/12167 +408 -0
  175. sage_wheels/share/factory/gftables/125 +7 -0
  176. sage_wheels/share/factory/gftables/12769 +428 -0
  177. sage_wheels/share/factory/gftables/128 +7 -0
  178. sage_wheels/share/factory/gftables/1331 +47 -0
  179. sage_wheels/share/factory/gftables/1369 +48 -0
  180. sage_wheels/share/factory/gftables/14641 +490 -0
  181. sage_wheels/share/factory/gftables/15625 +523 -0
  182. sage_wheels/share/factory/gftables/16 +3 -0
  183. sage_wheels/share/factory/gftables/16129 +540 -0
  184. sage_wheels/share/factory/gftables/16384 +549 -0
  185. sage_wheels/share/factory/gftables/16807 +563 -0
  186. sage_wheels/share/factory/gftables/1681 +58 -0
  187. sage_wheels/share/factory/gftables/169 +8 -0
  188. sage_wheels/share/factory/gftables/17161 +574 -0
  189. sage_wheels/share/factory/gftables/1849 +64 -0
  190. sage_wheels/share/factory/gftables/18769 +628 -0
  191. sage_wheels/share/factory/gftables/19321 +646 -0
  192. sage_wheels/share/factory/gftables/19683 +659 -0
  193. sage_wheels/share/factory/gftables/2048 +71 -0
  194. sage_wheels/share/factory/gftables/2187 +75 -0
  195. sage_wheels/share/factory/gftables/2197 +76 -0
  196. sage_wheels/share/factory/gftables/2209 +76 -0
  197. sage_wheels/share/factory/gftables/22201 +742 -0
  198. sage_wheels/share/factory/gftables/22801 +762 -0
  199. sage_wheels/share/factory/gftables/2401 +82 -0
  200. sage_wheels/share/factory/gftables/243 +11 -0
  201. sage_wheels/share/factory/gftables/24389 +815 -0
  202. sage_wheels/share/factory/gftables/24649 +824 -0
  203. sage_wheels/share/factory/gftables/25 +3 -0
  204. sage_wheels/share/factory/gftables/256 +11 -0
  205. sage_wheels/share/factory/gftables/26569 +888 -0
  206. sage_wheels/share/factory/gftables/27 +3 -0
  207. sage_wheels/share/factory/gftables/27889 +932 -0
  208. sage_wheels/share/factory/gftables/2809 +96 -0
  209. sage_wheels/share/factory/gftables/28561 +954 -0
  210. sage_wheels/share/factory/gftables/289 +12 -0
  211. sage_wheels/share/factory/gftables/29791 +995 -0
  212. sage_wheels/share/factory/gftables/29929 +1000 -0
  213. sage_wheels/share/factory/gftables/3125 +107 -0
  214. sage_wheels/share/factory/gftables/32 +4 -0
  215. sage_wheels/share/factory/gftables/32041 +1070 -0
  216. sage_wheels/share/factory/gftables/32761 +1094 -0
  217. sage_wheels/share/factory/gftables/32768 +1095 -0
  218. sage_wheels/share/factory/gftables/343 +14 -0
  219. sage_wheels/share/factory/gftables/3481 +118 -0
  220. sage_wheels/share/factory/gftables/361 +14 -0
  221. sage_wheels/share/factory/gftables/36481 +1218 -0
  222. sage_wheels/share/factory/gftables/3721 +126 -0
  223. sage_wheels/share/factory/gftables/37249 +1244 -0
  224. sage_wheels/share/factory/gftables/38809 +1296 -0
  225. sage_wheels/share/factory/gftables/39601 +1322 -0
  226. sage_wheels/share/factory/gftables/4 +3 -0
  227. sage_wheels/share/factory/gftables/4096 +139 -0
  228. sage_wheels/share/factory/gftables/44521 +1486 -0
  229. sage_wheels/share/factory/gftables/4489 +152 -0
  230. sage_wheels/share/factory/gftables/49 +4 -0
  231. sage_wheels/share/factory/gftables/4913 +166 -0
  232. sage_wheels/share/factory/gftables/49729 +1660 -0
  233. sage_wheels/share/factory/gftables/5041 +170 -0
  234. sage_wheels/share/factory/gftables/50653 +1691 -0
  235. sage_wheels/share/factory/gftables/512 +20 -0
  236. sage_wheels/share/factory/gftables/51529 +1720 -0
  237. sage_wheels/share/factory/gftables/52441 +1750 -0
  238. sage_wheels/share/factory/gftables/529 +20 -0
  239. sage_wheels/share/factory/gftables/5329 +180 -0
  240. sage_wheels/share/factory/gftables/54289 +1812 -0
  241. sage_wheels/share/factory/gftables/57121 +1906 -0
  242. sage_wheels/share/factory/gftables/58081 +1938 -0
  243. sage_wheels/share/factory/gftables/59049 +1971 -0
  244. sage_wheels/share/factory/gftables/6241 +210 -0
  245. sage_wheels/share/factory/gftables/625 +23 -0
  246. sage_wheels/share/factory/gftables/63001 +2102 -0
  247. sage_wheels/share/factory/gftables/64 +5 -0
  248. sage_wheels/share/factory/gftables/6561 +221 -0
  249. sage_wheels/share/factory/gftables/6859 +231 -0
  250. sage_wheels/share/factory/gftables/6889 +232 -0
  251. sage_wheels/share/factory/gftables/729 +27 -0
  252. sage_wheels/share/factory/gftables/7921 +266 -0
  253. sage_wheels/share/factory/gftables/8 +3 -0
  254. sage_wheels/share/factory/gftables/81 +5 -0
  255. sage_wheels/share/factory/gftables/8192 +276 -0
  256. sage_wheels/share/factory/gftables/841 +30 -0
  257. sage_wheels/share/factory/gftables/9 +3 -0
  258. sage_wheels/share/factory/gftables/9409 +316 -0
  259. sage_wheels/share/factory/gftables/961 +34 -0
  260. sage_wheels/share/info/singular.info +191898 -0
  261. sage_wheels/share/singular/LIB/GND.lib +1359 -0
  262. sage_wheels/share/singular/LIB/JMBTest.lib +976 -0
  263. sage_wheels/share/singular/LIB/JMSConst.lib +1363 -0
  264. sage_wheels/share/singular/LIB/KVequiv.lib +699 -0
  265. sage_wheels/share/singular/LIB/SingularityDBM.lib +491 -0
  266. sage_wheels/share/singular/LIB/VecField.lib +1542 -0
  267. sage_wheels/share/singular/LIB/absfact.lib +959 -0
  268. sage_wheels/share/singular/LIB/ainvar.lib +730 -0
  269. sage_wheels/share/singular/LIB/aksaka.lib +419 -0
  270. sage_wheels/share/singular/LIB/alexpoly.lib +2542 -0
  271. sage_wheels/share/singular/LIB/algebra.lib +1193 -0
  272. sage_wheels/share/singular/LIB/all.lib +136 -0
  273. sage_wheels/share/singular/LIB/arcpoint.lib +514 -0
  274. sage_wheels/share/singular/LIB/arnold.lib +4553 -0
  275. sage_wheels/share/singular/LIB/arnoldclassify.lib +2058 -0
  276. sage_wheels/share/singular/LIB/arr.lib +3486 -0
  277. sage_wheels/share/singular/LIB/assprimeszerodim.lib +755 -0
  278. sage_wheels/share/singular/LIB/autgradalg.lib +3361 -0
  279. sage_wheels/share/singular/LIB/bfun.lib +1964 -0
  280. sage_wheels/share/singular/LIB/bimodules.lib +774 -0
  281. sage_wheels/share/singular/LIB/brillnoether.lib +226 -0
  282. sage_wheels/share/singular/LIB/brnoeth.lib +5017 -0
  283. sage_wheels/share/singular/LIB/central.lib +2169 -0
  284. sage_wheels/share/singular/LIB/chern.lib +4162 -0
  285. sage_wheels/share/singular/LIB/cimonom.lib +571 -0
  286. sage_wheels/share/singular/LIB/cisimplicial.lib +1835 -0
  287. sage_wheels/share/singular/LIB/classify.lib +3239 -0
  288. sage_wheels/share/singular/LIB/classify2.lib +1462 -0
  289. sage_wheels/share/singular/LIB/classifyMapGerms.lib +1515 -0
  290. sage_wheels/share/singular/LIB/classify_aeq.lib +3253 -0
  291. sage_wheels/share/singular/LIB/classifyceq.lib +2092 -0
  292. sage_wheels/share/singular/LIB/classifyci.lib +1133 -0
  293. sage_wheels/share/singular/LIB/combinat.lib +91 -0
  294. sage_wheels/share/singular/LIB/compregb.lib +276 -0
  295. sage_wheels/share/singular/LIB/control.lib +1636 -0
  296. sage_wheels/share/singular/LIB/crypto.lib +3795 -0
  297. sage_wheels/share/singular/LIB/curveInv.lib +667 -0
  298. sage_wheels/share/singular/LIB/curvepar.lib +1817 -0
  299. sage_wheels/share/singular/LIB/customstd.lib +100 -0
  300. sage_wheels/share/singular/LIB/deRham.lib +5979 -0
  301. sage_wheels/share/singular/LIB/decodegb.lib +2134 -0
  302. sage_wheels/share/singular/LIB/decomp.lib +1655 -0
  303. sage_wheels/share/singular/LIB/deflation.lib +872 -0
  304. sage_wheels/share/singular/LIB/deform.lib +925 -0
  305. sage_wheels/share/singular/LIB/difform.lib +3055 -0
  306. sage_wheels/share/singular/LIB/divisors.lib +750 -0
  307. sage_wheels/share/singular/LIB/dmod.lib +5817 -0
  308. sage_wheels/share/singular/LIB/dmodapp.lib +3269 -0
  309. sage_wheels/share/singular/LIB/dmodideal.lib +1211 -0
  310. sage_wheels/share/singular/LIB/dmodloc.lib +2645 -0
  311. sage_wheels/share/singular/LIB/dmodvar.lib +818 -0
  312. sage_wheels/share/singular/LIB/dummy.lib +17 -0
  313. sage_wheels/share/singular/LIB/elim.lib +1009 -0
  314. sage_wheels/share/singular/LIB/ellipticcovers.lib +548 -0
  315. sage_wheels/share/singular/LIB/enumpoints.lib +146 -0
  316. sage_wheels/share/singular/LIB/equising.lib +2127 -0
  317. sage_wheels/share/singular/LIB/ffmodstd.lib +2384 -0
  318. sage_wheels/share/singular/LIB/ffsolve.lib +1289 -0
  319. sage_wheels/share/singular/LIB/findifs.lib +778 -0
  320. sage_wheels/share/singular/LIB/finitediff.lib +1768 -0
  321. sage_wheels/share/singular/LIB/finvar.lib +7989 -0
  322. sage_wheels/share/singular/LIB/fpadim.lib +2429 -0
  323. sage_wheels/share/singular/LIB/fpalgebras.lib +1666 -0
  324. sage_wheels/share/singular/LIB/fpaprops.lib +1462 -0
  325. sage_wheels/share/singular/LIB/freegb.lib +3853 -0
  326. sage_wheels/share/singular/LIB/general.lib +1350 -0
  327. sage_wheels/share/singular/LIB/gfan.lib +1768 -0
  328. sage_wheels/share/singular/LIB/gitfan.lib +3130 -0
  329. sage_wheels/share/singular/LIB/gkdim.lib +99 -0
  330. sage_wheels/share/singular/LIB/gmspoly.lib +589 -0
  331. sage_wheels/share/singular/LIB/gmssing.lib +1739 -0
  332. sage_wheels/share/singular/LIB/goettsche.lib +909 -0
  333. sage_wheels/share/singular/LIB/graal.lib +1366 -0
  334. sage_wheels/share/singular/LIB/gradedModules.lib +2541 -0
  335. sage_wheels/share/singular/LIB/graphics.lib +360 -0
  336. sage_wheels/share/singular/LIB/grobcov.lib +7706 -0
  337. sage_wheels/share/singular/LIB/groups.lib +1123 -0
  338. sage_wheels/share/singular/LIB/grwalk.lib +507 -0
  339. sage_wheels/share/singular/LIB/hdepth.lib +194 -0
  340. sage_wheels/share/singular/LIB/help.cnf +57 -0
  341. sage_wheels/share/singular/LIB/hess.lib +1946 -0
  342. sage_wheels/share/singular/LIB/hnoether.lib +4292 -0
  343. sage_wheels/share/singular/LIB/hodge.lib +400 -0
  344. sage_wheels/share/singular/LIB/homolog.lib +1965 -0
  345. sage_wheels/share/singular/LIB/hyperel.lib +975 -0
  346. sage_wheels/share/singular/LIB/inout.lib +679 -0
  347. sage_wheels/share/singular/LIB/integralbasis.lib +6224 -0
  348. sage_wheels/share/singular/LIB/interval.lib +1418 -0
  349. sage_wheels/share/singular/LIB/intprog.lib +778 -0
  350. sage_wheels/share/singular/LIB/invar.lib +443 -0
  351. sage_wheels/share/singular/LIB/involut.lib +980 -0
  352. sage_wheels/share/singular/LIB/jacobson.lib +1215 -0
  353. sage_wheels/share/singular/LIB/kskernel.lib +534 -0
  354. sage_wheels/share/singular/LIB/latex.lib +3146 -0
  355. sage_wheels/share/singular/LIB/lejeune.lib +651 -0
  356. sage_wheels/share/singular/LIB/linalg.lib +2040 -0
  357. sage_wheels/share/singular/LIB/locnormal.lib +212 -0
  358. sage_wheels/share/singular/LIB/lrcalc.lib +526 -0
  359. sage_wheels/share/singular/LIB/makedbm.lib +294 -0
  360. sage_wheels/share/singular/LIB/mathml.lib +813 -0
  361. sage_wheels/share/singular/LIB/matrix.lib +1372 -0
  362. sage_wheels/share/singular/LIB/maxlike.lib +1132 -0
  363. sage_wheels/share/singular/LIB/methods.lib +212 -0
  364. sage_wheels/share/singular/LIB/moddiq.lib +322 -0
  365. sage_wheels/share/singular/LIB/modfinduni.lib +181 -0
  366. sage_wheels/share/singular/LIB/modnormal.lib +218 -0
  367. sage_wheels/share/singular/LIB/modprimdec.lib +1278 -0
  368. sage_wheels/share/singular/LIB/modquotient.lib +269 -0
  369. sage_wheels/share/singular/LIB/modstd.lib +1024 -0
  370. sage_wheels/share/singular/LIB/modular.lib +545 -0
  371. sage_wheels/share/singular/LIB/modules.lib +2561 -0
  372. sage_wheels/share/singular/LIB/modwalk.lib +609 -0
  373. sage_wheels/share/singular/LIB/mondromy.lib +1016 -0
  374. sage_wheels/share/singular/LIB/monomialideal.lib +3851 -0
  375. sage_wheels/share/singular/LIB/mprimdec.lib +2353 -0
  376. sage_wheels/share/singular/LIB/mregular.lib +1863 -0
  377. sage_wheels/share/singular/LIB/multigrading.lib +5629 -0
  378. sage_wheels/share/singular/LIB/ncHilb.lib +777 -0
  379. sage_wheels/share/singular/LIB/ncModslimgb.lib +791 -0
  380. sage_wheels/share/singular/LIB/ncalg.lib +16311 -0
  381. sage_wheels/share/singular/LIB/ncall.lib +31 -0
  382. sage_wheels/share/singular/LIB/ncdecomp.lib +468 -0
  383. sage_wheels/share/singular/LIB/ncfactor.lib +13371 -0
  384. sage_wheels/share/singular/LIB/ncfrac.lib +1023 -0
  385. sage_wheels/share/singular/LIB/nchilbert.lib +448 -0
  386. sage_wheels/share/singular/LIB/nchomolog.lib +759 -0
  387. sage_wheels/share/singular/LIB/ncloc.lib +361 -0
  388. sage_wheels/share/singular/LIB/ncpreim.lib +795 -0
  389. sage_wheels/share/singular/LIB/ncrat.lib +2849 -0
  390. sage_wheels/share/singular/LIB/nctools.lib +1887 -0
  391. sage_wheels/share/singular/LIB/nets.lib +1456 -0
  392. sage_wheels/share/singular/LIB/nfmodstd.lib +1000 -0
  393. sage_wheels/share/singular/LIB/nfmodsyz.lib +732 -0
  394. sage_wheels/share/singular/LIB/noether.lib +1106 -0
  395. sage_wheels/share/singular/LIB/normal.lib +8700 -0
  396. sage_wheels/share/singular/LIB/normaliz.lib +2226 -0
  397. sage_wheels/share/singular/LIB/ntsolve.lib +362 -0
  398. sage_wheels/share/singular/LIB/numerAlg.lib +560 -0
  399. sage_wheels/share/singular/LIB/numerDecom.lib +2261 -0
  400. sage_wheels/share/singular/LIB/olga.lib +1933 -0
  401. sage_wheels/share/singular/LIB/orbitparam.lib +351 -0
  402. sage_wheels/share/singular/LIB/parallel.lib +319 -0
  403. sage_wheels/share/singular/LIB/paraplanecurves.lib +3110 -0
  404. sage_wheels/share/singular/LIB/perron.lib +202 -0
  405. sage_wheels/share/singular/LIB/pfd.lib +2223 -0
  406. sage_wheels/share/singular/LIB/phindex.lib +642 -0
  407. sage_wheels/share/singular/LIB/pointid.lib +673 -0
  408. sage_wheels/share/singular/LIB/polybori.lib +1430 -0
  409. sage_wheels/share/singular/LIB/polyclass.lib +525 -0
  410. sage_wheels/share/singular/LIB/polylib.lib +1174 -0
  411. sage_wheels/share/singular/LIB/polymake.lib +1902 -0
  412. sage_wheels/share/singular/LIB/presolve.lib +1533 -0
  413. sage_wheels/share/singular/LIB/primdec.lib +9576 -0
  414. sage_wheels/share/singular/LIB/primdecint.lib +1782 -0
  415. sage_wheels/share/singular/LIB/primitiv.lib +401 -0
  416. sage_wheels/share/singular/LIB/puiseuxexpansions.lib +1631 -0
  417. sage_wheels/share/singular/LIB/purityfiltration.lib +960 -0
  418. sage_wheels/share/singular/LIB/qhmoduli.lib +1561 -0
  419. sage_wheels/share/singular/LIB/qmatrix.lib +293 -0
  420. sage_wheels/share/singular/LIB/random.lib +455 -0
  421. sage_wheels/share/singular/LIB/ratgb.lib +489 -0
  422. sage_wheels/share/singular/LIB/realclassify.lib +5759 -0
  423. sage_wheels/share/singular/LIB/realizationMatroids.lib +772 -0
  424. sage_wheels/share/singular/LIB/realrad.lib +1197 -0
  425. sage_wheels/share/singular/LIB/recover.lib +2628 -0
  426. sage_wheels/share/singular/LIB/redcgs.lib +3984 -0
  427. sage_wheels/share/singular/LIB/reesclos.lib +465 -0
  428. sage_wheels/share/singular/LIB/resbinomial.lib +2802 -0
  429. sage_wheels/share/singular/LIB/resgraph.lib +789 -0
  430. sage_wheels/share/singular/LIB/resjung.lib +820 -0
  431. sage_wheels/share/singular/LIB/resolve.lib +5110 -0
  432. sage_wheels/share/singular/LIB/resources.lib +170 -0
  433. sage_wheels/share/singular/LIB/reszeta.lib +5473 -0
  434. sage_wheels/share/singular/LIB/ring.lib +1328 -0
  435. sage_wheels/share/singular/LIB/ringgb.lib +343 -0
  436. sage_wheels/share/singular/LIB/rinvar.lib +1153 -0
  437. sage_wheels/share/singular/LIB/rootisolation.lib +1481 -0
  438. sage_wheels/share/singular/LIB/rootsmr.lib +709 -0
  439. sage_wheels/share/singular/LIB/rootsur.lib +886 -0
  440. sage_wheels/share/singular/LIB/rstandard.lib +607 -0
  441. sage_wheels/share/singular/LIB/rwalk.lib +336 -0
  442. sage_wheels/share/singular/LIB/sagbi.lib +1353 -0
  443. sage_wheels/share/singular/LIB/sagbiNormaliz.lib +1622 -0
  444. sage_wheels/share/singular/LIB/sagbiNormaliz0.lib +1498 -0
  445. sage_wheels/share/singular/LIB/sagbigrob.lib +449 -0
  446. sage_wheels/share/singular/LIB/schreyer.lib +321 -0
  447. sage_wheels/share/singular/LIB/schubert.lib +2551 -0
  448. sage_wheels/share/singular/LIB/sets.lib +524 -0
  449. sage_wheels/share/singular/LIB/sheafcoh.lib +1663 -0
  450. sage_wheels/share/singular/LIB/signcond.lib +437 -0
  451. sage_wheels/share/singular/LIB/sing.lib +1094 -0
  452. sage_wheels/share/singular/LIB/sing4ti2.lib +419 -0
  453. sage_wheels/share/singular/LIB/solve.lib +2243 -0
  454. sage_wheels/share/singular/LIB/spcurve.lib +1077 -0
  455. sage_wheels/share/singular/LIB/spectrum.lib +62 -0
  456. sage_wheels/share/singular/LIB/sresext.lib +757 -0
  457. sage_wheels/share/singular/LIB/ssi.lib +143 -0
  458. sage_wheels/share/singular/LIB/standard.lib +2769 -0
  459. sage_wheels/share/singular/LIB/stanleyreisner.lib +473 -0
  460. sage_wheels/share/singular/LIB/stdmodule.lib +547 -0
  461. sage_wheels/share/singular/LIB/stratify.lib +1070 -0
  462. sage_wheels/share/singular/LIB/surf.lib +506 -0
  463. sage_wheels/share/singular/LIB/surf_jupyter.lib +223 -0
  464. sage_wheels/share/singular/LIB/surfacesignature.lib +522 -0
  465. sage_wheels/share/singular/LIB/surfex.lib +1462 -0
  466. sage_wheels/share/singular/LIB/swalk.lib +877 -0
  467. sage_wheels/share/singular/LIB/symodstd.lib +1570 -0
  468. sage_wheels/share/singular/LIB/systhreads.lib +74 -0
  469. sage_wheels/share/singular/LIB/tasks.lib +1324 -0
  470. sage_wheels/share/singular/LIB/tateProdCplxNegGrad.lib +2412 -0
  471. sage_wheels/share/singular/LIB/teachstd.lib +858 -0
  472. sage_wheels/share/singular/LIB/template.lib +116 -0
  473. sage_wheels/share/singular/LIB/toric.lib +1119 -0
  474. sage_wheels/share/singular/LIB/transformation.lib +116 -0
  475. sage_wheels/share/singular/LIB/triang.lib +1197 -0
  476. sage_wheels/share/singular/LIB/tropical.lib +8741 -0
  477. sage_wheels/share/singular/LIB/tropicalEllipticCovers.lib +2922 -0
  478. sage_wheels/share/singular/LIB/tropicalNewton.lib +1128 -0
  479. sage_wheels/share/singular/LIB/tst.lib +1108 -0
  480. sage_wheels/share/singular/LIB/weierstr.lib +241 -0
  481. sage_wheels/share/singular/LIB/zeroset.lib +1478 -0
  482. sage_wheels/share/singular/emacs/.emacs-general +184 -0
  483. sage_wheels/share/singular/emacs/.emacs-singular +234 -0
  484. sage_wheels/share/singular/emacs/COPYING +44 -0
  485. sage_wheels/share/singular/emacs/cmd-cmpl.el +241 -0
  486. sage_wheels/share/singular/emacs/ex-cmpl.el +1681 -0
  487. sage_wheels/share/singular/emacs/hlp-cmpl.el +4318 -0
  488. sage_wheels/share/singular/emacs/lib-cmpl.el +179 -0
  489. sage_wheels/share/singular/emacs/singular.el +4273 -0
  490. sage_wheels/share/singular/emacs/singular.xpm +39 -0
  491. sage_wheels/share/singular/singular.idx +5002 -0
@@ -0,0 +1,975 @@
1
+ //////////////////////////////////////////////////////////////////////////////
2
+ version="version hyperel.lib 4.1.2.0 Feb_2019 "; // $Id: 090bffa729be2546000ee1e1aa57ceef868c7e09 $
3
+ category="Teaching";
4
+ info="
5
+ LIBRARY: hyperel.lib
6
+ AUTHOR: Markus Hochstetter, markushochstetter@gmx.de
7
+
8
+ NOTE: The library provides procedures for computing with divisors in the
9
+ jacobian of hyperelliptic curves. In addition procedures are available
10
+ for computing the rational representation of divisors and vice versa.
11
+ The library is intended to be used for teaching and demonstrating
12
+ purposes but not for efficient computations.
13
+
14
+
15
+
16
+
17
+ PROCEDURES:
18
+ ishyper(h,f) test, if y^2+h(x)y=f(x) is hyperelliptic
19
+ isoncurve(P,h,f) test, if point P is on C: y^2+h(x)y=f(x)
20
+ chinrestp(b,moduli) compute polynom x, s.t. x=b[i] mod moduli[i]
21
+ norm(a,b,h,f) norm of a(x)-b(x)y in IF[C]
22
+ multi(a,b,c,d,h,f) (a(x)-b(x)y)*(c(x)-d(x)y) in IF[C]
23
+ ratrep (P,h,f) returns polynomials a,b, s.t. div(a,b)=P
24
+ divisor(a,b,h,f,[]) computes divisor of a(x)-b(x)y
25
+ gcddivisor(p,q) gcd of the divisors p and q
26
+ semidiv(D,h,f) semireduced divisor of the pair of polys D[1], D[2]
27
+ cantoradd(D,Q,h,f) adding divisors of the hyperell. curve y^2+h(x)y=f(x)
28
+ cantorred(D,h,f) returns reduced divisor which is equivalent to D
29
+ double(D,h,f) computes 2*D on y^2+h(x)y=f(x)
30
+ cantormult(m,D,h,f) computes m*D on y^2+h(x)y=f(x)
31
+
32
+ [parameters in square brackets are optional]
33
+ ";
34
+ ///////////////////////////////////////////////////////////////////////////////
35
+
36
+
37
+ //=============== Test, if a given curve is hyperelliptic =====================
38
+
39
+ proc ishyper(poly h, poly f)
40
+ "USAGE: ishyper(h,f); h,f=poly
41
+ RETURN: 1 if y^2+h(x)y=f(x) is hyperelliptic, 0 otherwise
42
+ NOTE: Tests, if y^2+h(x)y=f(x) is a hyperelliptic curve.
43
+ Curve is defined over basering. Additionally shows error-messages.
44
+ EXAMPLE: example ishyper; shows an example
45
+ "
46
+ {
47
+ // constructing a copy of the basering (only variable x),
48
+ // with variables x,y.
49
+ def R=basering;
50
+ list l= ringlist(R);
51
+ list ll=l[2];
52
+ ll="x","y";
53
+ l[2]=ll;
54
+ intvec v= l[3][1][2];
55
+ v=v,1;
56
+ l[3][1][2]=v;
57
+ def s=ring(l);
58
+ setring s;
59
+
60
+ // test, if y^2 + hy - f is hyperelliptic.
61
+ int i=1;
62
+ poly h=imap(R,h);
63
+ poly f=imap(R,f);
64
+ poly F=y2 + h*y - f;
65
+ ideal I=F, diff(F,x) , diff(F,y);
66
+ ideal J=std(I);
67
+ if ( J != 1 )
68
+ {
69
+ i=0;
70
+ "The curve is singular!";
71
+ }
72
+ if ( deg(f) mod 2 != 1 )
73
+ {
74
+ i=0;
75
+ "The polynomial ",f," has even degree!";
76
+ }
77
+ if ( leadcoef(f) != 1 )
78
+ {
79
+ i=0;
80
+ "The polynomial ",f," is not monic!";
81
+ }
82
+ if ( 2*deg(h) > deg(f)-1 )
83
+ {
84
+ i=0;
85
+ "The polynomial ",h," has degree ",deg(h),"!";
86
+ }
87
+ setring(R);
88
+ return(i);
89
+ }
90
+ example
91
+ { "EXAMPLE:"; echo = 2;
92
+ ring R=7,x,dp;
93
+ // hyperelliptic curve y^2 + h*y = f
94
+ poly h=x;
95
+ poly f=x5+5x4+6x2+x+3;
96
+ ishyper(h,f);
97
+ }
98
+
99
+
100
+ //================= Test, if a given point is on the curve ====================
101
+
102
+ proc isoncurve(list P, poly h, poly f)
103
+ "USAGE: isoncurve(P,h,f); h,f=poly; P=list
104
+ RETURN: 1 or 0 (if P is on curve or not)
105
+ NOTE: Tests, if P=(P[1],P[2]) is on the hyperelliptic curve y^2+h(x)y=f(x).
106
+ Curve is defined over basering.
107
+ EXAMPLE: example isoncurve; shows an example
108
+ "
109
+ {
110
+ if ( P[2]^2 + subst(h,var(1),P[1])*P[2] - subst(f,var(1),P[1]) == 0 )
111
+ {
112
+ return(1);
113
+ }
114
+ return(0);
115
+ }
116
+ example
117
+ { "EXAMPLE:"; echo = 2;
118
+ ring R=7,x,dp;
119
+ // hyperelliptic curve y^2 + h*y = f
120
+ poly h=x;
121
+ poly f=x5+5x4+6x2+x+3;
122
+ list P=2,3;
123
+ isoncurve(P,h,f);
124
+ }
125
+
126
+
127
+ //====================== Remainder of a polynomial division ===================
128
+
129
+ proc Divrem(poly f,poly g)
130
+ "USAGE: Divrem(f,g); f,g poly
131
+ RETURN: remainder of the division f/g
132
+ NOTE: Computes R, s.t. f=a*g + R, and deg(R) < deg(g)
133
+ EXAMPLE: example Divrem; shows an example
134
+ "
135
+ {
136
+ return(reduce(f,std(g)));
137
+ }
138
+ example
139
+ { "EXAMPLE:"; echo = 2;
140
+ ring R=0,x,dp;
141
+ Divrem(x2+1,x2);
142
+ }
143
+
144
+
145
+ //================ chinese remainder theorem for polynomials ==================
146
+
147
+ proc chinrestp(list b,list moduli)
148
+ "USAGE: chinrestp(b,moduli); moduli, b, moduli=list of polynomials
149
+ RETURN: poly x, s.t. x= b[i] mod moduli[i]
150
+ NOTE: chinese remainder theorem for polynomials
151
+ EXAMPLE: example chinrestp; shows an example
152
+ "
153
+ {
154
+ int i;
155
+ int n=size(moduli);
156
+ poly M=1;
157
+ for(i=1;i<=n;i++)
158
+ {
159
+ M=M*moduli[i];
160
+ }
161
+ list m;
162
+ for(i=1;i<=n;i++)
163
+ {
164
+ m[i]=M/moduli[i];
165
+ }
166
+ list y;
167
+ for(i=1;i<=n;i++)
168
+ {
169
+ y[i]= extgcd(moduli[i],m[i])[3];
170
+ }
171
+ poly B=0;
172
+ for(i=1;i<=n;i++)
173
+ {
174
+ B=B+y[i]*m[i]*b[i];
175
+ }
176
+ B=Divrem(B,M);
177
+ return(B);
178
+ }
179
+ example
180
+ { "EXAMPLE:"; echo = 2;
181
+ ring R=7,x,dp;
182
+ list b=3x-4, -3x2+1, 1, 4;
183
+ list moduli=(x-2)^2, (x-5)^3, x-1, x-6;
184
+ chinrestp(b,moduli);
185
+ }
186
+
187
+
188
+ //========================= norm of a polynomial ===============================
189
+
190
+ proc norm(poly a, poly b, poly h, poly f)
191
+ "USAGE: norm(a,b,h,f);
192
+ RETURN: norm of a(x)-b(x)y in IF[C]
193
+ NOTE: The norm is a polynomial in just one variable.
194
+ Curve C: y^2+h(x)y=f(x) is defined over basering.
195
+ EXAMPLE: example norm; shows an example
196
+ "
197
+ {
198
+ poly n=a^2+a*b*h-b^2*f;
199
+ return(n);
200
+ }
201
+ example
202
+ { "EXAMPLE:"; echo = 2;
203
+ ring R=7,x,dp;
204
+ // hyperelliptic curve y^2 + h*y = f
205
+ poly h=x;
206
+ poly f=x5+5x4+6x2+x+3;
207
+ poly a=x2+1;
208
+ poly b=x;
209
+ norm(a,b,h,f);
210
+ }
211
+
212
+
213
+ //========== multiplication of polynomials in the coordinate ring =============
214
+
215
+ proc multi(poly a, poly b, poly c, poly d, poly h, poly f)
216
+ "USAGE: multi(a,b,c,d,h,f);
217
+ RETURN: list L with L[1]-L[2]y=(a(x)-b(x)y)*(c(x)-d(x)y) in IF[C]
218
+ NOTE: Curve C: y^2+h(x)y=f(x) is defined over basering.
219
+ EXAMPLE: example multi; shows an example
220
+ "
221
+ {
222
+ poly A=a*c + b*d*f;
223
+ poly B=b*c +a*d + b*h*d;
224
+ return (list(A,B));
225
+ }
226
+ example
227
+ { "EXAMPLE:"; echo = 2;
228
+ ring R=7,x,dp;
229
+ poly h=x;
230
+ poly f=x5+5x4+6x2+x+3;
231
+ // hyperelliptic curve y^2 + h*y = f
232
+ poly a=x2+1;
233
+ poly b=x;
234
+ poly c=5;
235
+ poly d=-x;
236
+ multi(a,b,c,d,h,f);
237
+ }
238
+
239
+
240
+ //================== polynomial expansion around a point ========================
241
+
242
+ proc darst(list P,int k, poly h, poly f)
243
+ "USAGE: darst(P,k,h,f);
244
+ RETURN: list c of length k
245
+ NOTE: expansion around point P in IF[C], s.t.
246
+ y=c[1]+c[2]*(x-P[1]) +...+c[k]*(x-P[1])^k-1 + rest.
247
+ Curve C:y^2+h(x)y=f(x) is defined over basering.
248
+ EXAMPLE: example darst; shows an example
249
+ "
250
+ {
251
+
252
+ if ( P[2] == -P[2]- subst(h,var(1),P[1]))
253
+ {
254
+ ERROR("no special points allowed");
255
+ }
256
+ list c;
257
+ list r;
258
+ list n;
259
+ poly N;
260
+ c[1]=P[2];
261
+ r[1]=list(0,-1,1,0);
262
+ poly r1,r2,r3,r4;
263
+ // rational function are represented as (r1 - r2*y) / (r3 - r4*y)
264
+
265
+ for (int i=1; i<k ; i++)
266
+ {
267
+ r1=r[i][1]-c[i]*r[i][3];
268
+ r2=r[i][2]-c[i]*r[i][4];
269
+ r3=r[i][3];
270
+ r4=r[i][4];
271
+ n=multi(r3,r4,r1+r2*h,-r2,h,f);
272
+ N=r1*r1 + r1*r2*h-r2*r2*f;
273
+ r[i+1]=list(N/(var(1)-P[1]),0,n[1],n[2]);
274
+ while ((Divrem(r[i+1][1],var(1)-P[1]) ==0) and (Divrem(r[i+1][2],var(1)-P[1]) ==0) and (Divrem(r[i+1][3],var(1)-P[1]) ==0) and (Divrem(r[i+1][4],var(1)-P[1]) ==0))
275
+ {
276
+ // reducing the rationl function
277
+ //(r[i+1][1] - r[i+1][2]*y)/(r[i+1][3] - r[i+1][4]) , otherwise there
278
+ // could be a pole, s.t. conditions are not fulfilled.
279
+ r[i+1][1]=(r[i+1][1]) / (var(1)-P[1]);
280
+ r[i+1][2]=(r[i+1][2]) / (var(1)-P[1]);
281
+ r[i+1][3]=(r[i+1][3]) / (var(1)-P[1]);
282
+ r[i+1][4]=(r[i+1][4]) / (var(1)-P[1]);
283
+ }
284
+ c[i+1]=(subst(r[i+1][1],var(1),P[1]) - subst(r[i+1][2],var(1),P[1])*P[2]) / (subst(r[i+1][3],var(1),P[1]) - subst(r[i+1][4],var(1),P[1])*P[2]);
285
+ }
286
+ return(c);
287
+ }
288
+ example
289
+ { "EXAMPLE:"; echo = 2;
290
+ ring R=7,x,dp;
291
+ // hyperelliptic curve y^2 + h*y = f
292
+ poly h=x;
293
+ poly f=x5+5x4+6x2+x+3;
294
+ list P=5,3;
295
+ darst(P,3,h,f);
296
+ }
297
+
298
+
299
+ //================ rational representation of a divisor =======================
300
+
301
+ proc ratrep1 (list P, poly h, poly f)
302
+ "USAGE: ratrep1(P,k,h,f);
303
+ RETURN: list (a,b)
304
+ NOTE: Important: P has to be semireduced!
305
+ Computes rational representation of the divisor
306
+ P[1][3]*(P[1][1], P[1][2]) +...+ P[sizeof(P)][3]*
307
+ *(P[sizeof(P)][1], P[sizeof(P)][2]) - (*)infty=div(a,b)
308
+ Divisor P has to be semireduced.
309
+ Curve C:y^2+h(x)y=f(x) is defined over basering.
310
+ SEE AlSO: ratrep
311
+ EXAMPLE: example ratrep1; shows an example
312
+ "
313
+ {
314
+ poly a=1;
315
+ list b;
316
+ list m;
317
+ list koef;
318
+ int k;
319
+
320
+ // Determination of the polynomial b[i] for each point using procedure darst
321
+ for (int i=1 ; i<= size(P); i++)
322
+ {
323
+ a=a*(var(1)-P[i][1])^(P[i][3]); // computing polynomial a
324
+ m[i]=(var(1)-P[i][1])^(P[i][3]);
325
+ b[i]=P[i][2];
326
+ k=1;
327
+
328
+ while (Divrem(b[i]*b[i] + b[i] *h - f,(var(1)-P[i][1])^(P[i][3])) != 0)
329
+ {
330
+ k=k+1; // b[i]=P[i][2];
331
+ koef=darst(list (P[i][1],P[i][2]), k, h,f);
332
+ // could be improved, if one doesn't compute list coef completely new
333
+ // every time
334
+ b[i]=b[i]+ koef[k]*(var(1)-P[i][1])^(k-1);
335
+ }
336
+ }
337
+ // Return polynomial a and b. Polynomial b is solution of the congruencies
338
+ // b[i] mod m[i] .
339
+ return(list(a,chinrestp(b,m)));
340
+
341
+ }
342
+ example
343
+ { "EXAMPLE:"; echo = 2;
344
+ ring R=7,x,dp;
345
+ // hyperelliptic curve y^2 + h*y = f
346
+ poly h=x;
347
+ poly f=x5+5x4+6x2+x+3;
348
+ //divisor P
349
+ list P=list(-1,-3,1),list(1,1,1);
350
+ ratrep1(P,h,f);
351
+ }
352
+
353
+
354
+ //================ rational representation of a divisor =======================
355
+
356
+ proc ratrep (list P, poly h, poly f)
357
+ "USAGE: ratrep(P,k,h,f);
358
+ RETURN: list (a,b)
359
+ NOTE: Importatnt: P has to be semireduced!
360
+ Computes rational representation of the divisor
361
+ P[1][3]*(P[1][1], P[1][2]) +...+ P[sizeof(P)][3]*
362
+ *(P[sizeof(P)][1], P[sizeof(P)][2]) - (*)infty=div(a,b)
363
+ Divisor P has to be semireduced.
364
+ Curve C:y^2+h(x)y=f(x) is defined over basering.
365
+ Works faster than ratrep1.
366
+ SEE ALSO: ratrep1
367
+ EXAMPLE: example ratrep; shows an example
368
+ "
369
+ {
370
+ poly a=1;
371
+ list b;
372
+ list m;
373
+ list koef;
374
+ int k;
375
+
376
+ poly c;
377
+ list r;
378
+ list n;
379
+ poly Norm;
380
+ poly r1,r2,r3,r4;
381
+
382
+ // Determination of the polynomial b[i] for each point using procedure darst
383
+ for (int i=1 ; i<= size(P); i++)
384
+ {
385
+ a=a*(var(1)-P[i][1])^(P[i][3]); // computing polynomial a
386
+ m[i]=(var(1)-P[i][1])^(P[i][3]);
387
+ b[i]=P[i][2];
388
+ k=1;
389
+ c=P[i][2];
390
+ r=0,-1,1,0;
391
+ while (Divrem(b[i]*b[i] + b[i] *h - f,(var(1)-P[i][1])^(P[i][3])) != 0)
392
+ {
393
+ k=k+1;
394
+ // here, the procedure darst was integrateg. In every pass a new
395
+ // coefficient c[i] is determined.
396
+ r1=r[1]-c*r[3];
397
+ r2=r[2]-c*r[4];
398
+ r3=r[3];
399
+ r4=r[4];
400
+ n=multi(r3,r4,r1+r2*h,-r2,h,f);
401
+ Norm=r1*r1 + r1*r2*h-r2*r2*f;
402
+ r=list(Norm/(var(1)-P[i][1]),0,n[1],n[2]);
403
+ while ((Divrem(r[1],var(1)-P[i][1]) ==0) and (Divrem(r[2],var(1)-P[i][1]) ==0) and (Divrem(r[3],var(1)-P[i][1]) ==0) and (Divrem(r[4],var(1)-P[i][1]) ==0))
404
+ {
405
+
406
+ // reducing the rationl function
407
+ // (r[1]-r[2]y)/(r[3]-r[4]y) , otherwise there
408
+ // could be a pole, s.t. conditions are not fulfilled.
409
+ r[1]=(r[1]) / (var(1)-P[i][1]);
410
+ r[2]=(r[2]) / (var(1)-P[i][1]);
411
+ r[3]=(r[3]) / (var(1)-P[i][1]);
412
+ r[4]=(r[4]) / (var(1)-P[i][1]);
413
+ }
414
+ c=(subst(r[1],var(1),P[i][1]) - subst(r[2],var(1),P[i][1])*P[i][2]) / (subst(r[3],var(1),P[i][1]) - subst(r[4],var(1),P[i][1])*P[i][2]);
415
+ b[i]=b[i]+ c*(var(1)-P[i][1])^(k-1);
416
+ }
417
+ }
418
+ // return polynomial a and b. Polynomial b is solution of the congruencies
419
+ // b[i] mod m[i] .
420
+ return(list(a,chinrestp(b,m)));
421
+ }
422
+ example
423
+ { "EXAMPLE:"; echo = 2;
424
+ ring R=7,x,dp;
425
+ // hyperelliptic curve y^2 + h*y = f
426
+ poly h=x;
427
+ poly f=x5+5x4+6x2+x+3;
428
+ //Divisor P
429
+ list P=list(-1,-3,1),list(1,1,1);
430
+ ratrep(P,h,f);
431
+ }
432
+
433
+
434
+ //============== Order of a zero in a polynomial ==============================
435
+
436
+ proc ordnung(poly x0 , poly g)
437
+ "USAGE: ordnung(x0,g);
438
+ RETURN: int i
439
+ NOTE: i is maximal, s.t. (x-x0)^i divides g
440
+ EXAMPLE: example ordnung; shows an example
441
+ "
442
+ {
443
+ poly gg=g;
444
+ int i;
445
+ while ( Divrem(gg,var(1)-x0) ==0 )
446
+ {
447
+ i=i+1;
448
+ gg=gg/(var(1)-x0);
449
+ }
450
+ return(i);
451
+ }
452
+ example
453
+ { "EXAMPLE:"; echo = 2;
454
+ ring R=0,x,dp;
455
+ poly g=(x-5)^7*(x-3)^2;
456
+ number x0=5;
457
+ ordnung(x0,g);
458
+ }
459
+
460
+
461
+ //================== divisor of a polynomial function =========================
462
+
463
+ proc divisor(poly a, poly b, poly h, poly f, list #)
464
+ "USAGE: divisor(a,b,h,f); optional: divisor(a,b,h,f,s); s=0,1
465
+ RETURN: list P
466
+ NOTE: P[1][3]*(P[1][1], P[1][2]) +...+ P[size(P)][3]*
467
+ *(P[size(P)][1], P[size(P)][2]) - (*)infty=div(a(x)-b(x)y)
468
+ if there is an optional parameter s!=0, then divisor additionally
469
+ returns a parameter, which says, whether irreducible polynomials
470
+ occurred during computations or not. Otherwise only warnings are
471
+ displayed on the monitor. For s=0 nothing happens.
472
+ Curve C: y^2+h(x)y=f(x) is defined over basering.
473
+ EXAMPLE: example divisor; shows an example
474
+ "
475
+ {
476
+ list p;
477
+ int j;
478
+ poly x0;
479
+ list y;
480
+ list fa=factorize(gcd(a,b)); // wanted: common roots of a and b
481
+ poly Norm=norm(a,b,h,f);
482
+
483
+ int s;
484
+ int irred=0;
485
+ if (size(#)>0)
486
+ {
487
+ s=#[1];
488
+ }
489
+ else
490
+ {
491
+ s=0;
492
+ }
493
+
494
+ for (int i=2; i<=size(fa[1]) ; i++)
495
+ {
496
+ // searching roots by finding polynomials of degree 1
497
+ if ( deg(fa[1][i]) !=1 )
498
+ {
499
+ if (s==0)
500
+ {
501
+ "WARNING: ", fa[1][i], "is irreducible over this field !";
502
+ }
503
+ else
504
+ {
505
+ irred=1;
506
+ }
507
+ }
508
+ else
509
+ {
510
+ x0=var(1) - fa[1][i];
511
+ // finding the y-coordinates; max. 2
512
+ y= factorize(var(1)^2 + var(1)*subst(h,var(1),x0) - subst(f,var(1),x0));
513
+ if ( deg(y[1][2]) == 1)
514
+ // if root belongs to point on curve, then...
515
+ {
516
+ // compute order of a-b*y in the founded point
517
+ j=j+1;
518
+ p[j]=list(x0,var(1)-y[1][2],fa[2][i]);
519
+ if ( y[2][2]== 1) // ordinary point
520
+ {
521
+ j=j+1;
522
+ p[j]=list(x0 , var(1)-y[1][3] , fa[2][i] );
523
+ if (a/(var(1)-x0)^(fa[2][i]) - b/(var(1)-x0)^(fa[2][i]) * p[j][2] ==0 )
524
+ {
525
+ p[j][3]= p[j][3] + ordnung(x0,norm(a/(var(1)-x0)^(fa[2][i]) , b/(var(1)-x0)^(fa[2][i]),h,f));
526
+ }
527
+ if (a/(var(1)-x0)^(fa[2][i]) - b/(var(1)-x0)^(fa[2][i]) * p[j-1][2] ==0 )
528
+ {
529
+ p[j-1][3]=p[j-1][3] + ordnung(x0,norm(a/(var(1)-x0)^(fa[2][i]) , b/(var(1)-x0)^(fa[2][i]),h,f));
530
+ }
531
+ }
532
+ else // special point
533
+ {
534
+ p[j][3]=p[j][3] *2 ;
535
+ if (a/(var(1)-x0)^(fa[2][i]) - b/(var(1)-x0)^(fa[2][i]) * p[j][2] ==0 )
536
+ {
537
+ p[j][3]=p[j][3] + ordnung(x0,norm(a/(var(1)-x0)^(fa[2][i]) , b/(var(1)-x0)^(fa[2][i]),h,f));
538
+ }
539
+ }
540
+
541
+ }
542
+ // Norm of a-b*y is reduced by common root of a and b
543
+ // (is worked off)
544
+ Norm = Norm/((var(1)-x0)^(ordnung(x0,Norm)));
545
+ }
546
+ }
547
+
548
+ // some points are still missing; points for which a and b have no common
549
+ // roots, but norm(a-b*Y)=0 .
550
+ fa=factorize(Norm);
551
+ for ( i=2 ; i<=size(fa[1]) ; i++)
552
+ {
553
+ if ( deg(fa[1][i]) !=1)
554
+ {
555
+ if (s==0)
556
+ {
557
+ "WARNING: ", fa[1][i], "is irreducible over this field !";
558
+ }
559
+ else
560
+ {
561
+ irred=1;
562
+ }
563
+ }
564
+ else
565
+ {
566
+ x0=var(1) - fa[1][i];
567
+ y= factorize(var(1)^2 + var(1)*subst(h,var(1),x0) - subst(f,var(1),x0));
568
+ if ( deg(y[1][2]) == 1)
569
+ // if root belongs to point on curve, then...
570
+ {
571
+ if (subst(a,var(1),x0)- subst(b,var(1),x0)* (var(1)-y[1][2]) ==0)
572
+ {
573
+ p[size(p)+1]=list(x0,var(1)-y[1][2], ordnung(x0,Norm,h,f));
574
+ }
575
+ if ( y[2][2]== 1) // ordinary point
576
+ {
577
+ if (subst(a,var(1),x0)- subst(b,var(1),x0)* (var(1)-y[1][3]) ==0)
578
+ {
579
+ p[size(p)+1]=list(x0 , var(1)-y[1][3] , ordnung(x0,Norm,h,f));
580
+ }
581
+ }
582
+ }
583
+ }
584
+ }
585
+ if (s==0)
586
+ {
587
+ return(p);
588
+ }
589
+ return(p,irred);
590
+ }
591
+ example
592
+ { "EXAMPLE:"; echo = 2;
593
+ ring R=7,x,dp;
594
+ // hyperelliptic curve y^2 + h*y = f
595
+ poly h=x;
596
+ poly f=x5+5x4+6x2+x+3;
597
+ poly a=(x-1)^2*(x-6);
598
+ poly b=0;
599
+ divisor(a,b,h,f,1);
600
+ }
601
+
602
+
603
+ //===================== gcd of two divisors ===================================
604
+
605
+ proc gcddivisor(list p, list q)
606
+ "USAGE: gcddivisor(p,q);
607
+ RETURN: list P
608
+ NOTE: gcd of two divisors
609
+ EXAMPLE: example gcddivisor; shows an example
610
+ "
611
+ {
612
+ list e;
613
+ int i,j;
614
+ for (i=1 ; i<= size(p) ; i++)
615
+ {
616
+ for (j=1 ; j<= size(q) ; j++)
617
+ {
618
+ if ( p[i][1] == q[j][1] and p[i][2] == q[j][2])
619
+ {
620
+ if ( p[i][3] <= q[j][3] )
621
+ {
622
+ e[size(e)+1]= list (p[i][1] , p[i][2] , p[i][3]);
623
+ }
624
+ else
625
+ {
626
+ e[size(e)+1]= list (q[j][1] , q[j][2] , q[j][3]);
627
+ }
628
+ }
629
+ }
630
+ }
631
+ return(e);
632
+ }
633
+ example
634
+ { "EXAMPLE:"; echo = 2;
635
+ ring R=7,x,dp;
636
+ // hyperelliptic curve y^2 + h*y = f
637
+ poly h=x;
638
+ poly f=x5+5x4+6x2+x+3;
639
+ // two divisors
640
+ list p=list(-1,-3,1),list(1,1,2);
641
+ list q=list(1,1,1),list(2,2,1);
642
+ gcddivisor(p,q);
643
+ }
644
+
645
+
646
+ //========== semireduced divisor from rational representation=================
647
+
648
+ proc semidiv(list D,poly h, poly f)
649
+ "USAGE: semidiv(D,h,f);
650
+ RETURN: list P
651
+ NOTE: important: Divisor D has to be semireduced!
652
+ Computes semireduced divisor P[1][3]*(P[1][1], P[1][2]) +...+ P[size(P)][3]*
653
+ *(P[size(P)][1], P[size(P)][2]) - (*)infty=div(D[1],D[2])@*
654
+ Curve C:y^2+h(x)y=f(x) is defined over basering.
655
+ EXAMPLE: example semidiv; shows an example
656
+ "
657
+ {
658
+ if ( deg(D[2]) >= deg(D[1]) or Divrem(D[2]^2+D[2]*h-f,D[1]) != 0 )
659
+ {
660
+ ERROR("Pair of polynomials doesn't belong to semireduced divisor!");
661
+ }
662
+ list D1,D2;
663
+ int s1,s2;
664
+ D1,s1=divisor(D[1],0,h,f,1);
665
+ D2,s2=divisor(D[2],1,h,f,1);
666
+
667
+ // Only if irreducible polynomials occurred in D1 !and! D2 a warning
668
+ // is necessary.
669
+ if (s1==1 and s2==1)
670
+ {
671
+ "Attention:
672
+ Perhaps some points were not found over this field!";
673
+ }
674
+ return(gcddivisor(D1,D2));
675
+ }
676
+ example
677
+ { "EXAMPLE:"; echo = 2;
678
+ ring R=7,x,dp;
679
+ // hyperelliptic curve y^2 + h*y = f
680
+ poly h=x;
681
+ poly f=x5+5x4+6x2+x+3;
682
+ // Divisor
683
+ list D=x2-1,2x-1;
684
+ semidiv(D,h,f);
685
+ }
686
+
687
+
688
+ //=============== Cantor's algorithm - composition ============================
689
+
690
+ proc cantoradd(list D, list Q, poly h, poly f)
691
+ "USAGE: cantoradd(D,Q,h,f);
692
+ RETURN: list P
693
+ NOTE: Cantor's Algorithm - composition
694
+ important: D and Q have to be semireduced!
695
+ Computes semireduced divisor div(P[1],P[2])= div(D[1],D[2]) + div(Q[1],Q[2])
696
+ The divisors are defined over the basering.
697
+ Curve C: y^2+h(x)y=f(x) is defined over the basering.
698
+ EXAMPLE: example cantoradd; shows an example
699
+ "
700
+ {
701
+ poly a;
702
+ poly b;
703
+ list e=extgcd(D[1],Q[1]);
704
+ if ( e[1]==1 )
705
+ {
706
+ a=D[1]*Q[1];
707
+ b=Divrem( e[2]*D[1]*Q[2] + e[3]*Q[1]*D[2] ,a);
708
+ return(list(a,b));
709
+ }
710
+ list c=extgcd(e[1],D[2]+Q[2]+h);
711
+ poly s1=e[2]*c[2];
712
+ poly s2=c[2]*e[3];
713
+ poly s3=c[3];
714
+ a=D[1]*Q[1]/c[1]^2;
715
+ b=Divrem((s1*D[1]*Q[2] + s2*Q[1]*D[2] + s3*(D[2]*Q[2] + f))/c[1],a);
716
+ return(list(a,b));
717
+ }
718
+ example
719
+ { "EXAMPLE:"; echo = 2;
720
+ ring R=7,x,dp;
721
+ // hyperelliptic curve y^2 + h*y = f
722
+ poly h=x;
723
+ poly f=x5+5x4+6x2+x+3;
724
+ // two divisors in rational representation
725
+ list D=x2-1,2x-1;
726
+ list Q=x2-3x+2,-3x+1;
727
+ cantoradd(D,Q,h,f);
728
+ }
729
+
730
+
731
+ //==================== Cantor's algorithm - reduction =========================
732
+
733
+ proc cantorred(list D,poly h,poly f)
734
+ "USAGE: cantorred(D,h,f);
735
+ RETURN: list N
736
+ NOTE: Cantor's algorithm - reduction.
737
+ important: Divisor D has to be semireduced!
738
+ Computes reduced divisor div(N[1],N[2])= div(D[1],D[2]).@*
739
+ The divisors are defined over the basering.
740
+ Curve C: y^2+h(x)y=f(x) is defined over the basering.
741
+ EXAMPLE: example cantorred; shows an example
742
+ "
743
+ {
744
+ list N=D;
745
+ while ( 2*deg(N[1]) > deg(f)-1 )
746
+ {
747
+ N[1]=(f - N[2]*h - N[2]^2)/N[1];
748
+ N[2]=Divrem(-h-N[2],N[1]);
749
+ }
750
+ N[1]=N[1]/leadcoef(N[1]);
751
+ return(N);
752
+ }
753
+ example
754
+ { "EXAMPLE:"; echo = 2;
755
+ ring R=7,x,dp;
756
+ // hyperelliptic curve y^2 + h*y = f
757
+ poly h=x;
758
+ poly f=x5+5x4+6x2+x+3;
759
+ // semireduced divisor
760
+ list D=2x4+3x3-3x-2, -x3-2x2+3x+1;
761
+ cantorred(D,h,f);
762
+ }
763
+
764
+
765
+ //================= doubling a semireduced divisor ============================
766
+
767
+ proc double(list D, poly h, poly f)
768
+ "USAGE: double(D,h,f);
769
+ RETURN: list Q=2*D
770
+ NOTE: important: Divisor D has to be semireduced!
771
+ Special case of Cantor's algorithm.
772
+ Computes reduced divisor div(Q[1],Q[2])= 2*div(D[1],D[2]).@*
773
+ The divisors are defined over the basering.
774
+ Curve C:y^2+h(x)y=f(x) is defined over the basering.
775
+ EXAMPLE: example double; shows an example
776
+ "
777
+ {
778
+ list c=extgcd(D[1], 2*D[2] + h);
779
+ poly a=D[1]*D[1]/c[1]^2;
780
+ poly b=Divrem((c[2]*D[1]*D[2] + c[3]*(D[2]*D[2] + f))/c[1],a);
781
+ return(cantorred(list(a,b),h,f));
782
+ }
783
+ example
784
+ { "EXAMPLE:"; echo = 2;
785
+ ring R=7,x,dp;
786
+ // hyperelliptic curve y^2 + h*y = f
787
+ poly h=x;
788
+ poly f=x5+5x4+6x2+x+3;
789
+ // reduced divisor
790
+ list D=x2-1,2x-1;
791
+ double(D,h,f);
792
+ }
793
+
794
+
795
+ //================ multiples of a semireduced divisor =========================
796
+
797
+ proc cantormult(int m, list D, poly h, poly f)
798
+ "USAGE: cantormult(m,D,h,f);
799
+ RETURN: list res=m*D
800
+ NOTE: important: Divisor D has to be semireduced!
801
+ Uses repeated doublings for a faster computation
802
+ of the reduced divisor m*D.
803
+ Attention: Factor m=int, this means bounded.
804
+ For m<0 the inverse of m*D is returned.
805
+ The divisors are defined over the basering.
806
+ Curve C: y^2+h(x)y=f(x) is defined over the basering.
807
+ EXAMPLE: example cantormult; shows an example
808
+ "
809
+ {
810
+ list res=1,0;
811
+ list bas=D;
812
+ int exp=m;
813
+ if (exp==0) { return(list(1,0)); }
814
+ if (exp==1) { return(D); }
815
+ if (exp==-1) { return(list(D[1],-D[2]-h)) ; }
816
+ if ( exp < 0)
817
+ {
818
+ exp=-exp;
819
+ }
820
+ while ( exp > 0 )
821
+ {
822
+ if ( (exp mod 2) !=0 )
823
+ {
824
+ res = cantorred(cantoradd(res,bas,h,f),h,f);
825
+ exp=exp-1;
826
+ }
827
+ bas=double(bas,h,f);
828
+ exp=exp div 2;
829
+ }
830
+ if ( m < 0 )
831
+ {
832
+ res[2]=-res[2]-h;
833
+ }
834
+ return(res);
835
+ }
836
+ example
837
+ { "EXAMPLE:"; echo = 2;
838
+ ring R=7,x,dp;
839
+ // hyperelliptic curve y^2 + h*y = f
840
+ poly h=x;
841
+ poly f=x5+5x4+6x2+x+3;
842
+ // reduced divisor
843
+ list D=x2-1,2x-1;
844
+ cantormult(34,D,h,f);
845
+ }
846
+
847
+
848
+ /*
849
+ //=============================================================================
850
+ // In the following you find a large example, which demonstrates the use of
851
+ // the most important procedures.
852
+ //=============================================================================
853
+ //---- field with 2^5=32 elements ----
854
+ ring r=(2,a),x,dp;
855
+ minpoly=a5+a2+1;
856
+
857
+ //---- hyperelliptic curve y^2 + hy = f ----
858
+ poly h=x2+x;
859
+ poly f=x5+x3+1;
860
+
861
+ //---- two divisors ----
862
+ list l1=list(a30,0,1),list(0,1,1);
863
+ list l2=list(a30,a16,1),list(1,1,1);
864
+
865
+ //---- their rational representation ----
866
+ list D1=ratrep(l1,h,f); D1;
867
+ //[1]:
868
+ // x2+(a4+a)*x
869
+ //[2]:
870
+ // (a)*x+1
871
+
872
+ list D2=ratrep(l2,h,f); D2;
873
+ //[1]:
874
+ // x2+(a4+a+1)*x+(a4+a)
875
+ //[2]:
876
+ // (a3+a2+a+1)*x+(a3+a2+a)
877
+
878
+ //---- back to the point-based-representation ----
879
+ semidiv(D1,h,f);
880
+ //[1]:
881
+ // [1]:
882
+ // (a4+a)
883
+ // [2]:
884
+ // 0
885
+ // [3]:
886
+ // 1
887
+ //[2]:
888
+ // [1]:
889
+ // 0
890
+ // [2]:
891
+ // 1
892
+ // [3]:
893
+ // 1
894
+
895
+ semidiv(D2,h,f);
896
+ //[1]:
897
+ // [1]:
898
+ // (a4+a)
899
+ // [2]:
900
+ // (a4+a3+a+1)
901
+ // [3]:
902
+ // 1
903
+ //[2]:
904
+ // [1]:
905
+ // 1
906
+ // [2]:
907
+ // 1
908
+ // [3]:
909
+ // 1
910
+
911
+ //---- adding D1 and D2 ----
912
+ list D12=cantorred(cantoradd(D1,D2,h,f),h,f); D12;
913
+ //[1]:
914
+ // x2+x
915
+ //[2]:
916
+ // 1
917
+
918
+ //---- D1+D2 in point-based-representation ----
919
+ semidiv(D12,h,f);
920
+ //[1]:
921
+ // [1]:
922
+ // 1
923
+ // [2]:
924
+ // 1
925
+ // [3]:
926
+ // 1
927
+ //[2]:
928
+ // [1]:
929
+ // 0
930
+ // [2]:
931
+ // 1
932
+ // [3]:
933
+ // 1
934
+
935
+ //---- D1 + D1 (2 possible ways, same result) ----
936
+ cantorred(cantoradd(D1,D1,h,f),h,f);
937
+ double(D1,h,f);
938
+ //[1]:
939
+ // x2+(a3+1)
940
+ //[2]:
941
+ // (a4+a3+a+1)*x+(a4+a3+a2+a+1)
942
+
943
+ //---- order of D1 in the jacobian over the basering ----
944
+ int i=1;
945
+ list E=D1;
946
+ while (E[1] != 1 or E[2] != 0 )
947
+ {
948
+ E= cantorred(cantoradd(E,D1,h,f),h,f);
949
+ i=i+1;
950
+ }
951
+ i; // 482
952
+
953
+ //---- proof with multiplication validates the result ----
954
+ cantormult(i,D1,h,f);
955
+ //[1]:
956
+ // 1
957
+ //[2]:
958
+ // 0
959
+
960
+ //---- computing the inverse of D1 ----
961
+ list d1= cantormult(-1,D1,h,f); d1;
962
+ //[1]:
963
+ // x2+(a4+a)*x
964
+ //[2]:
965
+ // x2+(a+1)*x+1
966
+
967
+ //---- proof validates the result ----
968
+ cantoradd(d1,D1,h,f);
969
+ //[1]:
970
+ // 1
971
+ //[2]:
972
+ // 0
973
+
974
+
975
+ */