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,2922 @@
1
+ ////////////////////////////////////////////////////////////////
2
+ version="version tropicalEllipticCovers.lib 4.2.1 Jan_2020 ";
3
+ category="Algebraic geometry, Tropical geometry";
4
+ info="
5
+ LIBRARY: tropicalEllipticCovers.lib Gromov-Witten numbers of tropical elliptic curves and their covers
6
+
7
+ AUTHORS: J. Boehm, boehm @ mathematik.uni-kl.de
8
+ F. Dastur, dastur.firoozeh @ gmail.com
9
+
10
+ OVERVIEW:
11
+
12
+ We implement a formula for computing the number of covers of (abstract) elliptic curves
13
+ with and without tangency conditions, and for the surface ExP1.
14
+ For the first case, we have used methods discussed in [BGM1].
15
+ For the covers without tangency conditions, we obtain the covers of an elliptic curve
16
+ using tropical methods in [BBM], and for ExP1, we have used the concepts from [BGM2].
17
+ A Feynman graph G of genus g is a trivalent, connected graph (of genus g) with n number
18
+ of vertices and r number of edges (in case of abstract elliptic curve in [BBM] we have
19
+ 2g-2 vertices and 3g-3 edges, since we consider only trivalent graphs).
20
+ A pearl chain P of type (d_2, g) is a genus g, connected graph of degree d_1 such that
21
+ it has two different types of vertices, say vertices of type w and b (where w represent
22
+ the white vertices and b the black ones).
23
+ Every edge in P connect vertex of type w to vertex of type b such that the vertices
24
+ adjacent to each edge are not of the same type. There are precisely d_2 vertices of
25
+ type w and d_2+g-1 vertices of type b. The vertices of type b should be 2-valent and the
26
+ vertices of type w can have any valency.
27
+ For each case we compute the respective propagator function from which we later use terms
28
+ to compute the Gromov-Witten invariants N_(g,d), N_(g,d,Omega) and N_(P,d_1,d_2,g).
29
+
30
+
31
+ REFERENCES:
32
+
33
+ [BBM] J. Boehm, A. Buchholz, H. Markwig: Tropical mirror symmetry for elliptic curves,
34
+ arXiv:1309.5893 (2013).
35
+ [BGM1] J. Boehm, C. Goldner, H. Markwig: Tropical mirror symmetry in dimension one,
36
+ arXiv:1809.10659 (2018).
37
+ [BGM2] J. Boehm, C. Goldner, H. Markwig, Counts of (tropical) curves in ExP1 and Feynman
38
+ integrals, arXiv:1812.04936 (2018).
39
+
40
+
41
+ KEYWORDS:
42
+ tropical geometry; mirror symmetry; tropical mirror symmetry; Gromov-Witten invariants;
43
+ elliptic curves; propagator; Feynman graph; Feynman integral; tropical covers;
44
+ tropical stable maps
45
+
46
+ TYPES:
47
+ graph,number,list,poly,string
48
+
49
+ PROCEDURES:
50
+
51
+ cf_of(poly, poly) computes the coefficient of a given monomial g from a polynomial f.
52
+ preim(list, def) returns the entry number of an element x in a list O.
53
+ coverTuple(graph, list, list, int[, list]) depending on int, computes a list of tuples of the form (a_k, N_k, D_k)
54
+ for all k=1,...,r, where r is the number of edges, a_k is the k-th entry
55
+ of the partition aa of the degree of G, N_k and D_k are the corresponding
56
+ numerator and denominator (respectively) of the propagator function whose
57
+ product would return the coefficient of the Feynman integral. Every list
58
+ of tuples corresponds to a cover of the elliptic curve E.
59
+ CoverMult(graph, list, list, int[, list]) depending on int, computes a list of cover multiplicity corresponding to
60
+ each cover of an elliptic curve having source curve G.
61
+ Tropicalcover(graph, list, list, int[, list]) depending on int, computes a list of matrices such that each matrix in the
62
+ list represents a cover of an elliptic curve E.
63
+
64
+ sinh(poly, int) returns the power series expansion of the hyperbolic sine function given a
65
+ polynomial f up to first n terms.
66
+ Sfunction(poly, int) computes the S-function in the form of (1+X), where X is a taylor series
67
+ expansion of the sinh function upto n terms.
68
+ FloorDiagrams(graph,list,list,list,int) returns a Latex file illustrating floor diagrams, such that each floor
69
+ diagram corresponds to a tropical stable map to ExP1 for a given curled
70
+ pearl chain of elliptic curve E.
71
+
72
+ PropagatorFunction(graph,list,list,int[,list]) depending on int, computes the propagator for the edges of a Feynman graph G.
73
+ FeynmanIntegralo(graph,list,list,int,int[,list]) depending on the second int, computes the coefficient of the Feynman
74
+ integral for a given ordering of the vertices of the graph G.
75
+ FeynmanIntegralO(graph,list,list,int,int[,list]) depending on the second int, computes the coefficients of the sum of Feynman
76
+ integrals (over all orderings of the vertices of the graph G).
77
+ FeynmanIntegralA(graph,list,int,list,int,int[,list]) depending on the third int, computes the coefficients of the sum of Feynman
78
+ integrals for fixed ordering (sum goes over all partitions of the degree of G).
79
+ DrawCovers(graph,list,list,int,int[,list]) depending on int, returns a Latex file illustrating a cover of the elliptic curve E.
80
+
81
+ TropCovandMaps(graph,list,list,list,int) returns a Latex file that draws all the (cut open) curled pearl chains and its
82
+ corresponding stable maps (as a floor diagram) given a pearl chain and other
83
+ information regarding the leaks and white pearls of the pearl chain.
84
+ ";
85
+
86
+ LIB "ellipticcovers.lib";
87
+ LIB "combinat.lib";
88
+ LIB "ring.lib";
89
+ LIB "presolve.lib";
90
+
91
+ proc cf_of(poly f, poly g)
92
+ "USAGE: cf_of(f,g); f poly, g poly@*
93
+ ASSUME: f is a polynomial, g is a monomial@*
94
+ RETURN: poly.
95
+ THEORY: For a given polynomial f, it computes the coefficient of g in f @*
96
+
97
+ KEYWORDS: coefficient of a polynomial
98
+ EXAMPLE: example cf_of; shows an example
99
+ "
100
+ {
101
+ int i;
102
+ poly ff,r;
103
+ def v;
104
+ ff=f/g;
105
+ for(i=1;i<=size(ff);i++)
106
+ {
107
+ v=variables(ff[i]);
108
+ if(v==0)
109
+ {
110
+ r=r+ff[i];
111
+ }
112
+ }
113
+ return(r);
114
+ }
115
+ example
116
+ { "EXAMPLE:"; echo=2;
117
+ ring r=0,(x1,x2,x3,x4),dp;
118
+ poly f=3*x1^6+11*x1^4*x2^2+x1^2*x2^4+3*x2^6;
119
+ cf_of(f,x1^4*x2^2);
120
+ }
121
+
122
+ proc preim(list O, def x)
123
+ "USAGE: preim(O, x); O list, x poly/number@*
124
+ ASSUME: O is a list of ordering of the set of vertices (or indices of the vertices),
125
+ x is a monomial representing a vertex of a graph (or the index of the vertex we are interested in).
126
+ RETURN: int.
127
+ THEORY: This gives the entry number of x in list O.
128
+
129
+ KEYWORDS: preimage
130
+ EXAMPLE: example preim; shows an example
131
+ "
132
+ {
133
+ int j;
134
+ for(j=1; j<=size(O); j++)
135
+ {
136
+ if(x==O[j])
137
+ {return(j);}
138
+ }
139
+ }
140
+ example
141
+ { "EXAMPLE:"; echo=2;
142
+ ring r=0,(x1,x2,x3,x4),dp;
143
+ preim(list(x1,x3,x4,x2),x2);
144
+ }
145
+
146
+ //This gives the entry number of variable x in basering r.
147
+ static proc varnum(poly x)
148
+ {
149
+ int i;
150
+ for(i=1;i<=nvars(basering);i++)
151
+ {
152
+ if(variables(x)==var(i))
153
+ {return(i);}
154
+ }
155
+ }
156
+
157
+ //We choose poly x and poly y such that |x/y|<1 w.r.t the ordering (eqn 2,2)
158
+ //int N is one more than the degree of the cover
159
+ static proc prpcal(poly x, poly y, int N)
160
+ {
161
+ int a,w,i,j,k;
162
+ poly p1,p2,q;
163
+ list xx,ND,xx1,xx2,P,PP,Q;
164
+ for (i=1; i<=N-1; i++)
165
+ {
166
+ //pk are the constant term of propagator if a_k==0
167
+ p1= p1+i*(x^i)*(y^((N-1)-i)); //if y>x
168
+ p2= p2+i*(y^i)*(x^((N-1)-i)); //if x>y
169
+ PP=p1,p2;
170
+ }
171
+ for (a=1; a<=N-1; a++)
172
+ {
173
+ //poly q_a;
174
+ for(w=1; w<=N; w++)
175
+ {
176
+ if((a mod w)==0)
177
+ {
178
+ q=q+w*((x^(2*w)+y^(2*w))*(x*y)^(a-w));
179
+ P[a]=q;
180
+ }
181
+ }
182
+ xx[a]=(x*y)^a;
183
+ }
184
+ for(k=1;k<=size(P)-1;k++)
185
+ {
186
+ Q[1]=P[1];
187
+ Q[k+1]=P[k+1]-P[k];
188
+ }
189
+ for(j=1;j<=N-1;j++)
190
+ {
191
+ xx1[1]=y^(N-1); //if y>x
192
+ xx1[j+1]=xx[j]; //if y>x
193
+ xx2[1]=x^(N-1); //if x>y
194
+ xx2[j+1]=xx[j]; //if x>y
195
+ }
196
+ ND=PP,Q,xx1,xx2;
197
+ return(ND);
198
+ }
199
+
200
+ //Computes the propagator list for only one edge, given an ordering of the vertices
201
+ static proc propfor1(poly x, poly y, list pe, int N)
202
+ {
203
+ int u,v;
204
+ poly p;
205
+ list P,PP,ND,R,xx;
206
+ P=prpcal(x,y,N);
207
+ u=preim(pe,y);
208
+ v=preim(pe,x);
209
+ if(u>v) //i.e y>x
210
+ {
211
+ p=P[1][1];
212
+ xx=P[3];
213
+ }else //i.e x>y
214
+ {
215
+ p=P[1][2];
216
+ xx=P[4];
217
+ }
218
+ ND=list(p)+P[2];
219
+ R=pe,ND,xx;
220
+ return(R);
221
+ }
222
+
223
+ //Computes propagator function for all possible orderings of the vertices
224
+ static proc prop(poly x, poly y, list L, int N)
225
+ {
226
+ int i;
227
+ list pe,P;
228
+ pe=permute(L);
229
+ for(i=1;i<=size(pe);i++)
230
+ {P[i]=propfor1(x,y,pe[i],N);}
231
+ return(P);
232
+ }
233
+
234
+ //returns a list with numerator and denominator of the propagator for an edge of the graph.
235
+ static proc Propagatorfor1(poly x,poly y,int a, list O, int d)
236
+ {
237
+ poly f,g;
238
+ list P1,P2,PP;
239
+ P1=prpcal(x,y,d+1);
240
+ P2=propfor1(x,y,O,d+1);
241
+ if(a==0)
242
+ {
243
+ f=P2[2][1];
244
+ g=P2[3][1];
245
+ }else
246
+ {
247
+ f=P2[2][a+1];
248
+ g=P2[3][a+1];
249
+ }
250
+ PP=f,g;
251
+ return(PP);
252
+ }
253
+
254
+ //returns a list with numerator and denominator of the propagator for every edge of the graph.
255
+ static proc Propagator(graph G, list aa,list O)
256
+ {
257
+ int i,j,d;
258
+ poly x,y;
259
+ list P,E;
260
+ E=G.edges;
261
+ for(j=1;j<=size(aa);j++)
262
+ {d=d+aa[j];}
263
+ for(i=1;i<=size(aa);i++)
264
+ {
265
+ x=var(E[i][1]);
266
+ y=var(E[i][2]);
267
+ P[i]=Propagatorfor1(x,y,aa[i],O,d);
268
+ }
269
+ return(P);
270
+ }
271
+
272
+ //This function computes the coefficient of the Feynman integral for a given order of
273
+ //the vertices of the graph G.
274
+ static proc feynmanIntegral1(graph G, list aa, list pe,int n)
275
+ {
276
+ int i,j,d;
277
+ list E,P,Q;
278
+ poly x,y,f,g,c;
279
+ f=1;
280
+ g=1;
281
+ E=G.edges;
282
+ for(j=1;j<=size(aa);j++)
283
+ {d=d+aa[j];}
284
+ for(i=1;i<=size(aa);i++)
285
+ {
286
+ x=var(E[i][1]);
287
+ y=var(E[i][2]);
288
+ P[i]=Propagatorfor1(x,y,aa[i],pe,d);
289
+ f=f*P[i][1];
290
+ g=g*P[i][2];
291
+ }
292
+ c=cf_of(f,g);
293
+ Q=Q+list(pe,c);
294
+ if(n==0)
295
+ {return(c);}
296
+ else
297
+ {return(Q);}
298
+ }
299
+
300
+ //This function computes the sum of coefficients of Feynman integrals, where goes over all
301
+ //orderings of the vertices of the graph G.
302
+ static proc feynmanIntegral(graph G,list aa,int n)
303
+ {
304
+ int i,j;
305
+ poly x,s;
306
+ list pe,L,LL,P,PP,Q,QQ;
307
+ L=G.vertices;
308
+ for(j=1;j<=size(L);j++)
309
+ {
310
+ x=var(L[j]);
311
+ LL[j]=x;
312
+ }
313
+ pe=permute(LL);
314
+ for(i=1;i<=size(pe);i++)
315
+ {
316
+ P[i]=feynmanIntegral1(G,aa,pe[i],1);
317
+ PP[i]=pe[i];
318
+ while(P[i][2]!=0)
319
+ {
320
+ Q[i]=list(P[i]);
321
+ s=s+P[i][2];
322
+ break;
323
+ }
324
+ }
325
+ if(n==0)
326
+ {return(s);}
327
+ else
328
+ {
329
+ QQ=list(Q,s);
330
+ return(QQ);
331
+ }
332
+ }
333
+
334
+ //Computes sum of Feynman Integrals for a fixed ordering, where the sum goes over all aa.
335
+ static proc FeynmanInt(graph G,list O,int d,int r)
336
+ proc FeynmanInt(graph G,list O,int d,int r)
337
+ {
338
+ int i,ii,j,jj,n;
339
+ poly c;
340
+ list aa,a,Q,F,FF;
341
+ n=size(G.edges);
342
+ aa=partitions(n,d);
343
+ for(i=1;i<=size(aa);i++)
344
+ {
345
+ aa[i]=intmat(aa[i]);
346
+ for(ii=1;ii<=size(aa[i]);ii++)
347
+ {a[ii]=aa[i][ii,1];}
348
+ Q[i]=feynmanIntegral1(G,a,O,0);
349
+ F[i]=list(aa[i],Q[i]);
350
+ }
351
+ for(j=1;j<=size(F);j++)
352
+ {
353
+ if(F[j][2] != 0)
354
+ {FF=FF+list(F[j]);}
355
+ }
356
+ for(jj=1;jj<=size(Q);jj++)
357
+ {c=c+Q[jj];}
358
+ if(r==0)
359
+ {return(c);}
360
+ else
361
+ {return(list(FF,c));}
362
+ }
363
+
364
+ //returns a list of intvecs for the degree of each term of the propagator
365
+ //t=0,1,2,3 --> [BBM], [BGM1] w/o vertex contributions, [BGM1] w/ vertex contributions and [BGM2]
366
+ static proc degvec1(poly x, poly y, int a,list O, int d, int t,list #)
367
+ {
368
+ int i,j,k1,k2,r,c,k;
369
+ intvec e;
370
+ poly z1,z2;
371
+ list P,E;
372
+ k1=varnum(x);
373
+ k2=varnum(y);
374
+ if(t==0 || t==3)
375
+ {P=Propagatorfor1(x,y,a,O,d);}
376
+ if(t==1)
377
+ {
378
+ if(x==y)
379
+ {P=list(Proploop1(a));}
380
+ else
381
+ {P=Propagatorfor1(x,y,a,O,d);}
382
+ }
383
+ if(t==2)
384
+ {
385
+ z1=var(size(O)+k1);
386
+ z2=var(size(O)+k2);
387
+ if(x==y)
388
+ {P=list(ProploopNew(z1,#[k1],a));}
389
+ else
390
+ {P=PropNoloopfor1(x,y,a,O,d,z1,z2,#[k1],#[k2]);}
391
+ }
392
+ for(i=1;i<=size(P[1]);i++)
393
+ {
394
+ e=leadexp(P[1][i]);
395
+ E[i]=e;
396
+ }
397
+ return(E);
398
+ }
399
+
400
+ //List the intvec for all propagators
401
+ //t=0,1,2,3 --> [BBM], [BGM1] w/o vertex contributions, [BGM1] w/ vertex contributions and [BGM2]
402
+ static proc degvec(graph G,list aa, list O, int t, list #)
403
+ {
404
+ int i,u,d;
405
+ intvec tt;
406
+ list E,P,D,R;
407
+ poly x,y,g,z1,z2;
408
+ g=1;
409
+ E=G.edges;
410
+ P=PropagatorFunction(G,aa,O,t,#);
411
+ for(u=1;u<=size(aa);u++)
412
+ {d=d+aa[u];}
413
+ for(i=1;i<=size(aa);i++)
414
+ {
415
+ x=var(E[i][1]);
416
+ y=var(E[i][2]);
417
+ D[i]=degvec1(x,y,aa[i],O,d,t,#);
418
+ g=g*P[i][2];
419
+ }
420
+ tt=leadexp(g);
421
+ R=D,tt;
422
+ return(R);
423
+ }
424
+
425
+ //Adds two integer vectors and returns the result if the sum of the first entry is equal to
426
+ //some given integer.
427
+ static proc add1(list A,list B,int t)
428
+ {
429
+ int j,k;
430
+ intvec ad;
431
+ list L,M,N;
432
+ for(j=1;j<=size(A);j++)
433
+ {
434
+ for(k=1;k<=size(B);k++)
435
+ {
436
+ ad=A[j]+B[k];
437
+ if(ad[1]<=t)
438
+ {
439
+ L=L+list(ad);
440
+ M=M+list(j,k);
441
+ }
442
+ }
443
+ }
444
+ N=L,M;
445
+ return(N);
446
+ }
447
+
448
+ //Adds all intvecs in a list and returns the results whose first entry is equal to a given int
449
+ static proc addall(list V,int t)
450
+ {
451
+ int i;
452
+ list L,M,N,P;
453
+ L=V[1];
454
+ M[1]=add1(L[1],L[2],t)[1];
455
+ N[1]=add1(L[1],L[2],t)[2];
456
+ for(i=1;i<=size(L)-2;i++)
457
+ {
458
+ M[i+1]=add1(M[i],L[i+2],t)[1];
459
+ N[i+1]=add1(M[i],L[i+2],t)[2];
460
+ }
461
+ P=M[size(M)],N;
462
+ return(P);
463
+ }
464
+
465
+ //From a list of intvecs extracts all intvecs that are equal to a given intvect
466
+ static proc extract1(list A, intvec t)
467
+ {
468
+ int i,a,b;
469
+ list PP,P;
470
+ list val1,val2;
471
+ for(i=1;i<=size(A[1]);i++)
472
+ {
473
+ if(A[1][i]==t)
474
+ {
475
+ a=(2*i)-1;
476
+ b=2*i;
477
+ val1=A[2][size(A[2])][a];
478
+ val2=A[2][size(A[2])][b];
479
+ PP=val1+val2;
480
+ P=P+list(PP);
481
+ }
482
+ }
483
+ return(P);
484
+ }
485
+
486
+ //Generalisation of extract1 procedure
487
+ static proc extract(list A,intvec t)
488
+ {
489
+ int i,j,a,b,M1,M2;
490
+ list L,M,N,NN;
491
+ L=extract1(A,t);
492
+ for(i=1;i<=size(L);i++)
493
+ {
494
+ a=(2*L[i][1])-1;
495
+ b=2*L[i][1];
496
+ N=L[i][2];
497
+ for(j=size(A[2])-1;j>=1;j--)
498
+ {
499
+ M1=A[2][j][a];
500
+ M2=A[2][j][b];
501
+ M=M1,M2;
502
+ N=N+list(M[2]);
503
+ a=(2*M[1])-1;
504
+ b=2*M[1];
505
+ }
506
+ N=N+list(M1);
507
+ NN=NN+list(N);
508
+ }
509
+ return(NN);
510
+ }
511
+
512
+ //Reverses the entries in a given list
513
+ static proc reverselist(list L)
514
+ {
515
+ int i;
516
+ list M;
517
+ for(i=1;i<=size(L);i++)
518
+ {M[i]=L[size(L)+1-i];}
519
+ return(M);
520
+ }
521
+
522
+ //Returns a list of numerators of the propagator function whose product is equal to the
523
+ //product of the respective denominators, that is, it returns the terms whose product is
524
+ //the coefficient of q^{2aa} in the Feynman integral.
525
+ static proc bookkeep(graph G,list aa, list O,int t, list #)
526
+ {
527
+ int i,j,k,i1,j1,k1;
528
+ intvec tt;
529
+ list P,V,A,E,R,e,exp,BK;
530
+ P=PropagatorFunction(G,aa,O,t,#);
531
+ V=degvec(G,aa,O,t,#);
532
+ tt=V[2];
533
+ A=addall(V,tt[1]);
534
+ E=extract(A,tt);
535
+ for(i=1;i<=size(E);i++)
536
+ {e[i]=reverselist(E[i]);}
537
+ for(j=1;j<=size(e);j++)
538
+ {
539
+ for(k=1;k<=size(P);k++)
540
+ {
541
+ if(P[k][1][e[j][k]] != 0)
542
+ {exp[k]=P[k][1][e[j][k]];}
543
+ else
544
+ {exp[k]=string("none");}
545
+ }
546
+ R=R+list(exp);
547
+ }
548
+ for(i1=1;i1<=size(R);i1++)
549
+ {
550
+ for(j1=1;j1<=size(R[i1]);j1++)
551
+ {
552
+ if(typeof(R[i1][j1])=="string")
553
+ {R[i1]=delete(R[i1],j1);}
554
+ else
555
+ {R[i1]=R[i1];}
556
+ }
557
+ }
558
+ for(k1=1;k1<=size(R);k1++)
559
+ {
560
+ if(size(R[k1])==size(aa))
561
+ {BK=BK+list(R[k1]);}
562
+ }
563
+ return(BK);
564
+ }
565
+
566
+ proc coverTuple(graph G,list aa,list O,int t, list #)
567
+ "USAGE: coverTuple(G,aa,O,t[,l]); G graph, aa list, O list, t int, l list@*
568
+ ASSUME: G is a Feynman graph, aa is a partition of the degree of the graph G, O is a
569
+ given ordering of the vertices of G, t is an integer and l is a list of leaks in G.
570
+ RETURN: list.
571
+ THEORY: Computes a list of tuples (depending on the int t) of the form (a_k, N_k, D_k) for
572
+ all k=1,...,r, where r is the number of edges, a_k is the k-th entry in the
573
+ partition aa of the degree of G, N_k and D_k are the corresponding numerator and
574
+ denominator (respectively) of the propagator function whose product would return
575
+ the coefficient of the Feynman integral.
576
+ Every list of the tuples corresponds to a cover of the elliptic curve E.
577
+ (For t=0, we get the results for simply ramified covers [BBM]. t=1, 2 we get results
578
+ for graphs w/o vertex contributions respectively w/ vertex contributions as in [BGM1],
579
+ and for t=3 we get the results for pearl chains as in [BGM2])
580
+
581
+ KEYWORDS: tuple to compute a cover of elliptic curve
582
+ EXAMPLE: example coverTuple; shows an example
583
+ "
584
+ {
585
+ int i,j;
586
+ list P,B,T,TT;
587
+ P=PropagatorFunction(G,aa,O,t,#);
588
+ B=bookkeep(G,aa,O,t,#);
589
+ for(i=1;i<=size(B);i++)
590
+ {
591
+ for(j=1;j<=size(aa);j++)
592
+ {T[j]=list(aa[j],B[i][j],P[j][2]);}
593
+ TT=TT+list(T);
594
+ }
595
+ return(TT);
596
+ }
597
+ example
598
+ { "EXAMPLE:"; echo=2;
599
+ ring r=0,(x1,x2,x3,z1,z2,z3),dp;
600
+ graph F=makeGraph(list(1,2,3),list(list(1,1),list(1,2),list(2,3),list(1,3)));
601
+ coverTuple(F,list(1,0,0,2),list(x1,x2,x3),2,list(0,0,0));
602
+ }
603
+
604
+ //gives the list of intvecs that we are interested in
605
+ static proc bk(graph G,list aa, list O,int t, list #)
606
+ {
607
+ int i,j,k,l,m;
608
+ intvec tt,s;
609
+ list VV,V,A,E,R,e,exp;
610
+ VV=degvec(G,aa,O,t,#);
611
+ V=VV[1];
612
+ tt=VV[2];
613
+ A=addall(VV,tt[1]);
614
+ E=extract(A,tt);
615
+ for(i=1;i<=size(E);i++)
616
+ {e[i]=reverselist(E[i]);}
617
+ for(j=1;j<=size(e);j++)
618
+ {
619
+ for(k=1;k<=size(V);k++)
620
+ {exp[k]=V[k][e[j][k]];}
621
+ R=R+list(exp);
622
+ }
623
+ return(R);
624
+ }
625
+
626
+ //Converts a list of intvecs to a list of monomials
627
+ static proc degtomon1(list BB)
628
+ {
629
+ int i,j,k;
630
+ list P,PP;
631
+ poly xx=1;
632
+ for(i=1;i<=size(BB);i++)
633
+ {
634
+ for(j=1;j<=nvars(basering);j++)
635
+ {
636
+ xx=xx*var(j)^BB[i][j];
637
+ P[i]=xx;
638
+ }
639
+ }
640
+ for(k=1;k<=size(P)-1;k++)
641
+ {
642
+ PP[1]=P[1];
643
+ PP[k+1]=P[k+1]/P[k];
644
+ }
645
+ return(PP);
646
+ }
647
+
648
+ //Generalisation of degtomon1
649
+ static proc degtomon(list BB)
650
+ {
651
+ int i;
652
+ list M;
653
+ for(i=1;i<=size(BB);i++)
654
+ {M[i]=degtomon1(BB[i]);}
655
+ return(M);
656
+ }
657
+
658
+ //Computes weights of the edges of a graph
659
+ static proc wt_cf(list T,list M)
660
+ {
661
+ int i,j;
662
+ list C,W;
663
+ for(i=1;i<=size(T);i++)
664
+ {
665
+ for(j=1;j<=size(T[i]);j++)
666
+ {C[j]=T[i][j][2]/M[i][j];}
667
+ W=W+list(C);
668
+ }
669
+ return(W);
670
+ }
671
+
672
+ //Computes multiplicity of one cover given a list of weights
673
+ static proc covmult(list W)
674
+ {
675
+ int i;
676
+ poly m=1;
677
+ for(i=1;i<=size(W);i++)
678
+ {m=m*W[i];}
679
+ return(m);
680
+ }
681
+
682
+ proc CoverMult(graph G,list aa,list O,int t, list #)
683
+ "USAGE: CoverMult(G,aa,O,t[, l]); G graph, aa list, O list, t int, l list@*
684
+ ASSUME: G is a Feynman graph, aa is a partition of the degree of the graph G, O is a
685
+ given ordering of the vertices of G, l is a list of leaks of G and t is some integer between 0 and 3.
686
+ RETURN: list.
687
+ THEORY: For a given ordering of the vertices of G, this function computes a list of
688
+ multiplicity for each cover of G. Each entry in the list is a multiplicity of
689
+ a cover of G.
690
+ (For t=0, we get the results for simply ramified covers [BBM]. t=1, 2 we get results
691
+ for graphs w/o vertex contributions respectively w/ vertex contributions as in [BGM1],
692
+ and for t=3 we get the results for pearl chains as in [BGM2])
693
+
694
+
695
+ KEYWORDS: elliptic curve cover multiplicities
696
+ EXAMPLE: example CoverMult; shows an example
697
+ "
698
+ {
699
+ int i,j;
700
+ list B,M,T,W,R,RR;
701
+ B=bk(G,aa,O,t,#);
702
+ M=degtomon(B);
703
+ T=coverTuple(G,aa,O,t,#);
704
+ W=wt_cf(T,M);
705
+ for(i=1;i<=size(W);i++)
706
+ {R[i]=covmult(W[i]);}
707
+ for(j=1;j<=size(R);j++)
708
+ {
709
+ while(R[j] != 0)
710
+ {
711
+ RR=RR+list(R[j]);
712
+ break;
713
+ }
714
+ }
715
+ return(RR);
716
+ }
717
+ example
718
+ { "EXAMPLE:"; echo=2;
719
+ ring r=0, (x1,x2,x3,x4),dp;
720
+ graph G=makeGraph(list(1,2,3,4),list(list(1,3),list(1,2),list(1,2),list(2,4),list(3,4),list(3,4)));
721
+ CoverMult(G,list(0,2,1,0,0,1), list(x2,x4,x3,x1),0);
722
+ }
723
+
724
+ //Computes pre-image points on each edge of a graph given a list of weights and partition
725
+ //of the degree of the source curve
726
+ static proc intpts(list W, list aa)
727
+ {
728
+ int i;
729
+ list A;
730
+ for(i=1;i<=size(aa);i++)
731
+ {
732
+ if(aa[i]!=0)
733
+ {
734
+ if(W[i] != 0)
735
+ {A=A+list(aa[i]/W[i]);}
736
+ }
737
+ else
738
+ {A=A+list(0);}
739
+ }
740
+ return(A);
741
+ }
742
+
743
+ //returns a list of intvecs, where each intvec is for a given cover for the elliptic
744
+ //curve E and it shows how many times each edge of the cover of type G wraps around so
745
+ //that it passes through the preimage of the base point p_0.
746
+ static proc intersectionpoints(graph G,list aa,list O,int t, list #)
747
+ {
748
+ int i,j;
749
+ list T,B,M,W,A;
750
+ B=bk(G,aa,O,t,#);
751
+ T=coverTuple(G,aa,O,t,#);
752
+ M=degtomon(B);
753
+ W=wt_cf(T,M);
754
+ for(i=1;i<=size(W);i++)
755
+ {A[i]=intpts(W[i],aa);}
756
+ for(j=1;j<=size(A);j++)
757
+ {
758
+ if(size(A[j]) != size(aa))
759
+ {A=delete(A,j);}
760
+ }
761
+ return(A);
762
+ }
763
+
764
+ //extracts all the ring variables from a monomial
765
+ static proc polydiv(poly f)
766
+ {
767
+ int i;
768
+ list xx;
769
+ for(i=1;i<=nvars(basering);i++)
770
+ {
771
+ if(f/var(i)!=0)
772
+ {xx=xx+list(var(i));}
773
+ }
774
+ return(xx);
775
+ }
776
+
777
+ //extracts the ring variables from a given list of monomials
778
+ static proc numden(list T)
779
+ {
780
+ int i,j;
781
+ list V1,V2,R;
782
+ for(i=1;i<=size(T);i++)
783
+ {
784
+ V1=V1+list(polydiv(T[i][2]));
785
+ V2=V2+list(polydiv(T[i][3]));
786
+ }
787
+ R=V1,V2;
788
+ return(R);
789
+ }
790
+
791
+ //returns a list of ring variables from a list of monomials
792
+ static proc NumDen(list T)
793
+ {
794
+ int i,j;
795
+ list R,V1,V2,V;
796
+ R=numden(T);
797
+ for(i=1;i<=size(R[1]);i++)
798
+ {
799
+ if(size(R[1][i]) > 0)
800
+ {
801
+ if(size(R[1][i])==2)
802
+ {V1[i]=R[1][i];}
803
+ else
804
+ {
805
+ if(size(R[2][i])==2)
806
+ {V1[i]=R[2][i];}
807
+ else
808
+ {V1[i]=list(R[1][i][1],R[2][i][1]);}
809
+ }
810
+ }
811
+ else
812
+ {V1[i]=1;}
813
+ }
814
+ return(V1);
815
+ }
816
+
817
+ //Generalisation of NumDen procedure
818
+ static proc NumDenall(list T)
819
+ {
820
+ int i;
821
+ list N;
822
+ for(i=1;i<=size(T);i++)
823
+ {N[i]=NumDen(T[i]);}
824
+ return(N);
825
+ }
826
+
827
+ //returns a list of vertices (in terms of ring variables) for a given graph
828
+ static proc vertices(graph G,list aa,list O,int t, list #)
829
+ {
830
+ int i;
831
+ list T,V;
832
+ T=coverTuple(G,aa,O,t,#);
833
+ for(i=1;i<=size(T);i++)
834
+ {V[i]=NumDen(T[i]);}
835
+ return(V);
836
+ }
837
+
838
+ //Computes a matrix representing a single cover of an elliptic curve
839
+ static proc Tropcov(list V, list I,list O)
840
+ {
841
+ int i,j,k,l,m,n;
842
+ poly x;
843
+ matrix C[size(V)][size(O)+1];
844
+ for(i=1;i<=size(I);i++)
845
+ {C[i,1]=I[i];}
846
+ for(j=1;j<=nrows(C);j++)
847
+ {
848
+ if(size(V[j])==2)
849
+ {
850
+ for(k=1;k<=ncols(C)-1;k++)
851
+ {
852
+ for(l=1;l<=2;l++)
853
+ {
854
+ if(V[j][l]==O[k])
855
+ {C[j,k+1]=V[j][l];}
856
+ }
857
+ }
858
+ }else
859
+ {
860
+ x=O[j];
861
+ C[j,j+1]=x;
862
+ }
863
+ }
864
+ return(C);
865
+ }
866
+
867
+ proc Tropicalcover(graph G,list aa,list O,int t, list #)
868
+ "USAGE: Tropicalcover(G,aa,O,t[, l]); G graph, aa list, O list, t int, l list@*
869
+ ASSUME: G is a Feynman graph, aa is a partition of the degree of the graph G, O is a
870
+ given ordering of the vertices of G, t is an integer and l is a list of leaks of G.
871
+ RETURN: list of matrices.
872
+ THEORY: For a given ordering of the vertices of G, this function computes a list of
873
+ matrices such that each matrix in the list represents a cover of the elliptic
874
+ curve E. The first column of each matrix shows how many points on each edge of
875
+ the cover (of type G) has a preimage of the base point p_0. The rows of the
876
+ matrix represents an edge of the cover and each non-zero entry in a row
877
+ represents a vertex connected to that edge.
878
+ (For t=0, we get the results for simply ramified covers [BBM]. t=1, 2 we get results
879
+ for graphs w/o vertex contributions respectively w/ vertex contributions as in [BGM1],
880
+ and for t=3 we get the results for pearl chains as in [BGM2])
881
+
882
+
883
+ KEYWORDS: elliptic curve covers
884
+ EXAMPLE: example Tropicalcover; shows an example
885
+ "
886
+ {
887
+ int i;
888
+ list V,I,C;
889
+ V=vertices(G,aa,O,t,#);
890
+ I=intersectionpoints(G,aa,O,t,#);
891
+ for(i=1;i<=size(V);i++)
892
+ {C[i]=print(Tropcov(V[i],I[i],O));}
893
+ return(C);
894
+ }
895
+ example
896
+ { "EXAMPLE:"; echo=2;
897
+ ring r=0, (x1,x2,x3,x4),dp;
898
+ graph G=makeGraph(list(1,2,3,4),list(list(1,3),list(1,2),list(1,2),list(2,4),list(3,4),list(3,4)));
899
+ Tropicalcover(G,list(0,2,1,0,0,1), list(x2,x4,x3,x1),0);
900
+ }
901
+
902
+ //Given an integer n returns a variable q_n in the form of a string
903
+ static proc edgestr(int n)
904
+ {
905
+ int i;
906
+ list E;
907
+ for(i=1;i<=n;i++)
908
+ {E[i]=string("q",i);}
909
+ return(E);
910
+ }
911
+
912
+ //Converts the vertices of graph G into coordinates on a cartesian plane
913
+ static proc coordinategenerator(list V,list I,list O)
914
+ {
915
+ int i,j,k,l,m,n,xx;
916
+ number yy;
917
+ list cd1,cd2,cd3,ccd2,ccd3,cd;
918
+ //Step1: converting the vertices of graph G to tuples in cartesian plane
919
+ xx=2;
920
+ yy=5/2;
921
+ cd1[1]=list(xx,yy);
922
+ for(i=1;i<=size(O)-1;i++)
923
+ {
924
+ yy=yy+1/2;
925
+ cd1[i+1]=list(2*(i+1),yy);
926
+ }
927
+ //Step2: converting end points on the left and right to tuples in cartesian plane
928
+ for(j=1;j<=size(I);j++)
929
+ {
930
+ n=2*(size(O)+1);
931
+ if(I[j] != 0)
932
+ {
933
+ cd2[j]=list(0,j);
934
+ cd3[j]=list(n,j);
935
+ }
936
+ }
937
+ for(k=1;k<=size(cd2);k++)
938
+ {
939
+ if(typeof(cd2[k])=="list")
940
+ {ccd2=ccd2+list(cd2[k]);}
941
+ }
942
+ for(l=1;l<=size(cd3);l++)
943
+ {
944
+ if(typeof(cd3[l])=="list")
945
+ {ccd3=ccd3+list(cd3[l]);}
946
+ }
947
+ for(m=1;m<=size(cd1);m++)
948
+ {
949
+ if(m mod 2 == 0)
950
+ {cd1[m][2]=cd1[m][2]+1/2;}
951
+ else
952
+ {cd1[m][2]=cd1[m][2]-1/2;}
953
+ }
954
+ cd=cd1,ccd2,ccd3;
955
+ return(cd);
956
+ }
957
+
958
+ //returns the list of end points for the edges of G after it has been cut open at the base point p_0
959
+ //Generates a list of coordinates that would be our initial graph in the actual drawing code
960
+ //The 1st list are the edges connecting vertices s.t a_k = 0, The second and the third lists
961
+ //are the coordinates connecting the vertices to the left resp. right of the rectangle
962
+ //(i.e. each pair can be identified together and joined to form a cover)
963
+ //Stage 1 for drawing covers
964
+ static proc edgecoord(list V,list I,list O)
965
+ {
966
+ int i,j,k,l,ll,m,mm,p,q,r,a,b,a1,b1,u;
967
+ number v;
968
+ list e,eC,ec,eL,el,eR,er,cd;
969
+ cd=coordinategenerator(V,I,O);
970
+ for(i=1;i<=size(I);i++)
971
+ {
972
+ if(I[i]==0)
973
+ {
974
+ if(size(V[i])==2)
975
+ {
976
+ a=preim(O,V[i][1]);
977
+ b=preim(O,V[i][2]);
978
+ for(j=1;j<=size(cd[1]);j++)
979
+ {
980
+ for(k=1;k<=size(O);k++)
981
+ {
982
+ if(2*a==cd[1][j][1] && 2*b==cd[1][k][1])
983
+ {
984
+ //This is an added extra step to make sure the edges for which a_k=0 do not intersect each other
985
+ if(absValue(cd[1][j][1]-cd[1][k][1])>2)
986
+ {
987
+ if(cd[1][j][1] < cd[1][k][1])
988
+ {eC[i]=list(i,cd[1][j],cd[1][k]);}
989
+ else
990
+ {eC[i]=list(i,cd[1][k],cd[1][j]);}
991
+ }
992
+ else
993
+ {
994
+ if(cd[1][j][1] < cd[1][k][1])
995
+ {eC[i]=list(i,cd[1][j],cd[1][k]);}
996
+ else
997
+ {eC[i]=list(i,cd[1][k],cd[1][j]);}
998
+ }//Extra step ends here. If we want to remove it then just keep "eC[i]=list(cd[1][j],cd[1][k]);" and remove all the loops
999
+ }
1000
+ }
1001
+ }
1002
+ eL[i]=0;
1003
+ eR[i]=0;
1004
+ }
1005
+ else
1006
+ {
1007
+ a=i;
1008
+ b=i;
1009
+ for(j=1;j<=size(cd[1]);j++)
1010
+ {
1011
+ for(k=1;k<=size(O);k++)
1012
+ {
1013
+ if(2*a==cd[1][j][1] && 2*b==cd[1][k][1])
1014
+ {
1015
+ //This is an added extra step to make sure the edges for which a_k=0 do not intersect each other
1016
+ if(absValue(cd[1][j][1]-cd[1][k][1])>2)
1017
+ {
1018
+ if(cd[1][j][1] < cd[1][k][1])
1019
+ {eC[i]=list(i,cd[1][j],cd[1][k]);}
1020
+ else
1021
+ {eC[i]=list(i,cd[1][k],cd[1][j]);}
1022
+ }
1023
+ else
1024
+ {
1025
+ if(cd[1][j][1] < cd[1][k][1])
1026
+ {eC[i]=list(i,cd[1][j],cd[1][k]);}
1027
+ else
1028
+ {eC[i]=list(i,cd[1][k],cd[1][j]);}
1029
+ }//Extra step ends here. If we want to remove it then just keep "eC[i]=list(cd[1][j],cd[1][k]);" and remove all the loops
1030
+ }
1031
+ }
1032
+ }
1033
+ eL[i]=0;
1034
+ eR[i]=0;
1035
+ }
1036
+ }
1037
+ else
1038
+ {
1039
+ eC[i]=0;
1040
+ if(size(V[i])==2)
1041
+ {
1042
+ a1=preim(O,V[i][1]);
1043
+ b1=preim(O,V[i][2]);
1044
+ for(l=1;l<=size(cd[2]);l++)
1045
+ {
1046
+ for(ll=1;ll<=size(cd[1]);ll++)
1047
+ {
1048
+ if(a1 < b1)
1049
+ {
1050
+ if(i==cd[2][l][2] && 2*a1==cd[1][ll][1])
1051
+ {
1052
+ eL[i]=list(i,cd[2][l],cd[1][ll]);//take coordinates from cd[2] and one of the vertices v[i][1]
1053
+ }
1054
+ }
1055
+ else
1056
+ {
1057
+ if(i==cd[2][l][2] && 2*b1==cd[1][ll][1])
1058
+ {
1059
+ eL[i]=list(i,cd[2][l],cd[1][ll]);//take coordinates from cd[2] and one of the vertices v[i][1]
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ for(m=1;m<=size(cd[3]);m++)
1065
+ {
1066
+ for(mm=1;mm<=size(cd[1]);mm++)
1067
+ {
1068
+ if(a1 < b1)
1069
+ {
1070
+ if(2*b1==cd[1][mm][1] && i==cd[3][m][2])
1071
+ {eR[i]=list(i,cd[1][mm],cd[3][m]);}
1072
+ }
1073
+ else
1074
+ {
1075
+ if(2*a1==cd[1][mm][1] && i==cd[3][m][2])
1076
+ {eR[i]=list(i,cd[1][mm],cd[3][m]);}
1077
+ }
1078
+ }
1079
+ }
1080
+ }
1081
+ else
1082
+ {
1083
+ a1=i;
1084
+ b1=i;
1085
+ for(l=1;l<=size(cd[2]);l++)
1086
+ {
1087
+ for(ll=1;ll<=size(cd[1]);ll++)
1088
+ {
1089
+ if(a1 < b1)
1090
+ {
1091
+ if(i==cd[2][l][2] && 2*a1==cd[1][ll][1])
1092
+ {
1093
+ eL[i]=list(i,cd[2][l],cd[1][ll]);//take coordinates from cd[2] and one of the vertices v[i][1]
1094
+ }
1095
+ }
1096
+ else
1097
+ {
1098
+ if(i==cd[2][l][2] && 2*b1==cd[1][ll][1])
1099
+ {
1100
+ eL[i]=list(i,cd[2][l],cd[1][ll]);//take coordinates from cd[2] and one of the vertices v[i][1]
1101
+ }
1102
+ }
1103
+ }
1104
+ }
1105
+ for(m=1;m<=size(cd[3]);m++)
1106
+ {
1107
+ for(mm=1;mm<=size(cd[1]);mm++)
1108
+ {
1109
+ if(a1 < b1)
1110
+ {
1111
+ if(2*b1==cd[1][mm][1] && i==cd[3][m][2])
1112
+ {eR[i]=list(i,cd[1][mm],cd[3][m]);}
1113
+ }
1114
+ else
1115
+ {
1116
+ if(2*a1==cd[1][mm][1] && i==cd[3][m][2])
1117
+ {eR[i]=list(i,cd[1][mm],cd[3][m]);}
1118
+ }
1119
+ }
1120
+ }
1121
+ }
1122
+ }
1123
+ }
1124
+ for(p=1;p<=size(eC);p++)
1125
+ {
1126
+ if(typeof(eC[p])=="list")
1127
+ {ec=ec+list(eC[p]);}
1128
+ }
1129
+ for(q=1;q<=size(eL);q++)
1130
+ {
1131
+ if(typeof(eL[q])=="list")
1132
+ {el=el+list(eL[q]);}
1133
+ }
1134
+ for(r=1;r<=size(eR);r++)
1135
+ {
1136
+ if(typeof(eR[r])=="list")
1137
+ {er=er+list(eR[r]);}
1138
+ }
1139
+ e=ec,el,er;
1140
+ return(e);
1141
+ }
1142
+
1143
+ //returns a more refined version of a list of coordinates for each edge of the cover
1144
+ //Stage 2 for drawing covers
1145
+ static proc Edgecoord(list V,list I,list O)
1146
+ {
1147
+ int i,ii,j,k,kk,l,i1,i2,j1,j2;
1148
+ number e1,e2,ee1,ee2;
1149
+ list ed,E;
1150
+ ed=edgecoord(V,I,O);
1151
+ for(i=1;i<=size(ed[2]);i++)
1152
+ {
1153
+ for(j=2;j<=size(ed[2]);j++)
1154
+ {
1155
+ if(i < j)
1156
+ {
1157
+ if(ed[2][i][2][1]==ed[2][j][2][1] && ed[2][i][2][2]==ed[2][j][2][2])
1158
+ {
1159
+ e1=ed[2][i][3][2]+(1/2);
1160
+ e2=ed[2][i][3][2]-(1/2);
1161
+ ed[2][i][2][2]=e1;
1162
+ ed[2][j][2][2]=e2;
1163
+ }
1164
+ else
1165
+ {
1166
+ for(ii=1;ii<=size(ed[2]);ii++)
1167
+ {
1168
+ e1=ed[2][ii][3][2]+(1/2);
1169
+ //e2=ed[2][ii][3][2]-(1/2);//improve so that it has -1/2 as an option and then picks the one that suits better
1170
+ ed[2][ii][2][2]=e1;
1171
+ }
1172
+ }
1173
+ }
1174
+ }
1175
+ }
1176
+ for(k=1;k<=size(ed[3]);k++)
1177
+ {
1178
+ for(l=1;l<=size(ed[3]);l++)
1179
+ {
1180
+ if(k < l)
1181
+ {
1182
+ if(ed[3][k][2][1]==ed[3][l][2][1] && ed[3][k][2][2]==ed[3][l][2][2])
1183
+ {
1184
+ ee1=ed[3][k][2][2]+(1/2);
1185
+ ee2=ed[3][k][2][2]-(1/2);
1186
+ ed[3][k][3][2]=ee1;
1187
+ ed[3][l][3][2]=ee2;
1188
+ }
1189
+ else
1190
+ {
1191
+ for(kk=1;kk<=size(ed[3]);kk++)
1192
+ {
1193
+ ee1=ed[3][kk][2][2]+(1/2);
1194
+ //ee2=ed[3][kk][3][2]-(1/2);//improve so that it has -1/2 as an option and then picks the one that suits better
1195
+ ed[3][kk][3][2]=ee1;
1196
+ }
1197
+ }
1198
+ }
1199
+ }
1200
+ }
1201
+ for(i1=1;i1<=size(ed[2]);i1++)
1202
+ {
1203
+ for(i2=2;i2<=size(ed[2]);i2++)
1204
+ {
1205
+ if(i1<i2)
1206
+ {
1207
+ if(ed[2][i1][2][2]==ed[2][i2][2][2])
1208
+ {
1209
+ if(ed[2][i1][3][1]<ed[2][i2][3][1])
1210
+ {ed[2][i2][2][2]=ed[2][i2][2][2]+1/4;}
1211
+ else
1212
+ {ed[2][i1][2][2]=ed[2][i1][2][2]+1/4;}
1213
+ }
1214
+ }
1215
+ }
1216
+ }
1217
+ for(j1=1;j1<=size(ed[3]);j1++)
1218
+ {
1219
+ for(j2=2;j2<=size(ed[3]);j2++)
1220
+ {
1221
+ if(j1<j2)
1222
+ {
1223
+ if(ed[3][j1][3][2]==ed[3][j2][3][2])
1224
+ {
1225
+ if(ed[3][j1][2][1]<ed[3][j2][2][1])
1226
+ {ed[3][j1][3][2]=ed[3][j1][3][2]+1/4;}
1227
+ else
1228
+ {ed[3][j2][3][2]=ed[3][j2][3][2]+1/4;}
1229
+ }
1230
+ }
1231
+ }
1232
+ }
1233
+ return(ed);
1234
+ }
1235
+
1236
+ //Given a list of coordinates modifies the coordinates a little according to our requirements
1237
+ static proc cdnew(list cd,list Ed)
1238
+ {
1239
+ int i,j;
1240
+ for(i=1;i<=size(cd);i++)
1241
+ {
1242
+ for(j=1;j<=size(Ed);j++)
1243
+ {
1244
+ if(cd[i][1]==Ed[j][2][1])
1245
+ {cd[i][2]=Ed[j][2][2];}
1246
+ if(cd[i][1]==Ed[j][3][1])
1247
+ {cd[i][2]=Ed[j][3][2];}
1248
+ }
1249
+ }
1250
+ return(cd);
1251
+ }
1252
+
1253
+ //Converts the coordinates for the edges into a list of linear equations
1254
+ static proc crdToEqn(list ed1, list #)
1255
+ {
1256
+ int i,j,ii,jj,nn;
1257
+ number x1,x2,y1,y2;
1258
+ list M1,M2,M,III;
1259
+ poly xx,yy,f,g;
1260
+ ideal II,JJ;
1261
+ for(i=1;i<=size(ed1);i++)
1262
+ {
1263
+ x1=ed1[i][2][1];
1264
+ y1=ed1[i][2][2];
1265
+ x2=ed1[i][3][1];
1266
+ y2=ed1[i][3][2];
1267
+ if(x1 != x2)
1268
+ {M1[i]=(y2-y1)/(x2-x1);}
1269
+ else
1270
+ {M1[i]=(y2-y1);}
1271
+ }
1272
+ for(j=1;j<=size(#);j++)
1273
+ {
1274
+ x1=#[j][2][1];
1275
+ y1=#[j][2][2];
1276
+ x2=#[j][3][1];
1277
+ y2=#[j][3][2];
1278
+ if(x1 != x2)
1279
+ {M2[j]=(y2-y1)/(x2-x1);}
1280
+ else
1281
+ {M2[j]=(y2-y1);}
1282
+ }
1283
+ nn=nvars(basering);
1284
+ xx=var(1);
1285
+ yy=var(2);
1286
+ for(ii=1;ii<=size(M1);ii++)
1287
+ {
1288
+ x1=ed1[ii][2][1];
1289
+ y1=ed1[ii][2][2];
1290
+ f=yy-M1[ii]*xx+M1[ii]*x1-y1;
1291
+ II=II+ideal(f);
1292
+ }
1293
+ for(jj=1;jj<=size(M2);jj++)
1294
+ {
1295
+ x1=#[jj][2][1];
1296
+ y1=#[jj][2][2];
1297
+ g=yy-M2[jj]*xx+M2[jj]*x1-y1;
1298
+ JJ=JJ+g;
1299
+ }
1300
+ III=II,JJ;
1301
+ return(III);
1302
+ }
1303
+
1304
+ //Returns the intersection points between edges for a given cover
1305
+ //Local method for drawing covers
1306
+ static proc rtnIntPts(list ed1,list #)
1307
+ {
1308
+ int i,j;
1309
+ list e,E;
1310
+ ideal J,S;
1311
+ e=crdToEqn(ed1,#);
1312
+ for(i=1;i<=size(e[1]);i++)
1313
+ {
1314
+ if(size(e[2]) != 0)
1315
+ {
1316
+ for(j=1;j<=size(e[2]);j++)
1317
+ {
1318
+ J=e[1][i],e[2][j];
1319
+ S=solvelinearpart(J);
1320
+ E=E+list(S); //intersection points of each line in the list e
1321
+ }
1322
+ }
1323
+ else
1324
+ {
1325
+ for(j=1;j<=size(e[1]);j++)
1326
+ {
1327
+ while(i<j)
1328
+ {
1329
+ J=e[1][i],e[1][j];
1330
+ S=solvelinearpart(J);
1331
+ E=E+list(S); //intersection points of each line in the list e
1332
+ break;
1333
+ }
1334
+ }
1335
+ }
1336
+ }
1337
+ return(E);
1338
+ }
1339
+
1340
+ //generates coordinates that will be used to draw covers in Latex
1341
+ static proc drawcrds(list V,list I,list O)
1342
+ {
1343
+ int i,i1,i2,j,j1,j2,k,k1,k2,l,l1,l2,n;
1344
+ number a,b;
1345
+ list ed,e1,e2,e3,e4;
1346
+ poly x,y;
1347
+ n=2*(size(O)+1);
1348
+ ed=Edgecoord(V,I,O);
1349
+ e1=rtnIntPts(ed[1],ed[2]);
1350
+ e2=rtnIntPts(ed[1],ed[3]);
1351
+ for(i=1;i<=size(e1);i++)
1352
+ {
1353
+ if(size(e1[i])==2)
1354
+ {
1355
+ x=var(1)-e1[i][2];
1356
+ y=var(2)-e1[i][1];
1357
+ for(i1=1;i1<=size(ed[1]);i1++)
1358
+ {
1359
+ for(i2=1;i2<=size(ed[2]);i2++)
1360
+ {
1361
+ if(ed[2][i2][3][1] > ed[1][i1][2][1] && ed[2][i2][3][1] > ed[1][i1][3][1])
1362
+ {
1363
+ if(ed[1][i1][2][1]<x<ed[1][i1][3][1] && ed[1][i1][2][2]<y<ed[1][i1][3][2])
1364
+ {ed[2][i2][2][2]=ed[1][i1][2][2]-3/2;}
1365
+ }
1366
+ }
1367
+ }
1368
+ }
1369
+ }
1370
+ for(j=1;j<=size(e2);j++)
1371
+ {
1372
+ if(size(e2[j])==2)
1373
+ {
1374
+ x=var(1)-e2[j][2];
1375
+ y=var(2)-e2[j][1];
1376
+ for(j1=1;j1<=size(ed[1]);j1++)
1377
+ {
1378
+ for(j2=1;j2<=size(ed[3]);j2++)
1379
+ {
1380
+ if(ed[3][j2][2][1] < ed[1][j1][2][1] && ed[3][j2][2][1] < ed[1][j1][3][1])
1381
+ {
1382
+ if(ed[1][j1][2][1]<x<ed[1][j1][3][1] && ed[1][j1][2][2]<y<ed[1][j1][3][2])
1383
+ {ed[3][j2][3][2]=ed[1][j1][3][2]+3/2;}
1384
+ }
1385
+ }
1386
+ }
1387
+ }
1388
+ }
1389
+ e3=rtnIntPts(ed[2]);
1390
+ for(k=1;k<=size(e3);k++)
1391
+ {
1392
+ if(size(e3[k])==2)
1393
+ {
1394
+ x=var(1)-e3[k][2];
1395
+ for(k1=1;k1<=size(ed[2]);k1++)
1396
+ {
1397
+ for(k2=1;k2<=size(ed[2]);k2++)
1398
+ {
1399
+ while(k1<k2)
1400
+ {
1401
+ if(0<x<ed[2][k1][3][1] && 0<x<ed[2][k2][3][1])
1402
+ {
1403
+ a=ed[2][k1][2][2];
1404
+ b=ed[2][k2][2][2];
1405
+ ed[2][k1][2][2]=b;
1406
+ ed[2][k2][2][2]=a;
1407
+ }
1408
+ }
1409
+ break;
1410
+ }
1411
+ }
1412
+ }
1413
+ }
1414
+ e4=rtnIntPts(ed[3]);
1415
+ for(l=1;l<=size(e4);l++)
1416
+ {
1417
+ if(size(e4[l])==2)
1418
+ {
1419
+ x=var(1)-e4[l][2];
1420
+ //y=var(2)-e4[l][1];
1421
+ for(l1=1;l1<=size(ed[3]);l1++)
1422
+ {
1423
+ for(l2=1;l2<=size(ed[3]);l2++)
1424
+ {
1425
+ while(l1<l2)
1426
+ {
1427
+ if(size(e4[l])==2)
1428
+ {
1429
+ if(n>x>ed[3][l1][2][1] && n>x>ed[3][l2][2][1])
1430
+ {
1431
+ a=ed[3][l1][3][2];
1432
+ b=ed[3][l2][3][2];
1433
+ ed[3][l1][3][2]=b;
1434
+ ed[3][l2][3][2]=a;
1435
+ }
1436
+ }
1437
+ break;
1438
+ }
1439
+ }
1440
+ }
1441
+ }
1442
+ }
1443
+ return(ed);
1444
+ }
1445
+
1446
+ //Draws only one tropical cover of an elliptic curve that is cut open at the base point p_0
1447
+ static proc DrawinTikZ(list V,list I,list O,poly f,list #)
1448
+ {
1449
+ int i,j,jj,k,l,ll,i1,j1,i2,ii2,j2,i3,j3,i4,j4,i5,j5,i6,n,m,mm,y;
1450
+ list cd,cdn,E,L1,L2,L3,L4,L5,L6,L7,L8,L9,l6,l7,l8,Le;
1451
+ string s,r,rr,b1,b2,s1,s2,s3,S,p1,p2,p3,p4,p5,p6,R1,ll6,ll7,ll8,le,beg,en;
1452
+ cd=coordinategenerator(V,I,O);
1453
+ E=drawcrds(V,I,O);
1454
+ cdn=cdnew(cd[1],E[1]);
1455
+ //Step1+Step2:
1456
+ n=2*(size(O)+1);
1457
+ for(i=1;i<=size(I);i++)
1458
+ {
1459
+ if(I[i] >= 2)
1460
+ {
1461
+ for(jj=1;jj<=I[i]-1;jj++)
1462
+ {mm=mm+jj;}
1463
+ }
1464
+ }
1465
+ m=size(I)+mm+2;
1466
+ s=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (0,-1) -- (%s,-1);",n)+newline;
1467
+ r=sprintf("\\draw (0,0) rectangle (%s,%s);",n,m)+newline;
1468
+ rr=sprintf("\\path (0,0) -- (%s,0) node[midway,below,red] {\\Large{$mult(\\pi)=%s$}};",n,f)+newline;
1469
+ b1="\\node [below] at (0,-1) {$p_0$};"+newline;
1470
+ b2=sprintf("\\node [below] at (%s,-1) {$p_0$};",n)+newline;
1471
+
1472
+ L1[1]=string(sprintf("\\draw plot[mark=*,mark options={thick}] coordinates{(%s,-1)",2));
1473
+ L2[1]=sprintf("\\node [below] at (2,-1) {$p_1$};")+newline;//take
1474
+
1475
+ for(j=1;j<=size(O)-1;j++)
1476
+ {
1477
+ L1[j+1]=string(sprintf("(%s,-1)",2*(j+1)));
1478
+ L2[j+1]=string(sprintf("\\node [below] at (%s,-1) {$p_%s$};",2*(j+1),(j+1)))+newline; //Step2
1479
+ }
1480
+ for(k=1;k<=size(L1);k++)
1481
+ {
1482
+ p1=p1+L1[k];
1483
+ p2=p2+L2[k]; //Step2
1484
+ }
1485
+ for(l=1;l<=size(cdn);l++)
1486
+ {
1487
+ L3[l]=string(sprintf("\\draw plot[mark=*,mark options={thick}] coordinates{(%s,%s)};",cdn[l][1],cdn[l][2]))+newline;
1488
+ L4[l]=sprintf("\\node [above] at (%s,%s) {$x_%s$};",cdn[l][1],cdn[l][2],varnum(O[l]))+newline;//Step3
1489
+ L5[l]=sprintf("\\draw[dashed] (%s,%s)--(%s,-1);",cdn[l][1],cdn[l][2],cdn[l][1])+newline;//Step4
1490
+ }
1491
+ for(ll=1;ll<=size(L3);ll++)
1492
+ {
1493
+ p3=p3+L3[ll];
1494
+ p4=p4+L4[ll];
1495
+ p5=p5+L5[ll];
1496
+ }
1497
+ R1=s,r,rr,p1,"};"+newline,p2,p3,b1,b2,p4,p5;
1498
+
1499
+ for(i1=1;i1<=size(E[1]);i1++)
1500
+ {
1501
+ if(E[1][i1][2][1] != E[1][i1][3][1])
1502
+ {L6[i1]=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (%s,%s) -- (%s,%s) node [below,align=center,midway]{$q_%s$};",E[1][i1][2][1],E[1][i1][2][2],E[1][i1][3][1],E[1][i1][3][2],E[1][i1][1][1])+newline;}
1503
+ else
1504
+ {L6[i1]=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] plot [smooth cycle] coordinates {(%s,%s) (%s-0.3,%s+0.5) (%s,%s+1) (%s+0.3,%s+0.5)}; \\node [above] at (%s,%s+1) {$q_%s$};",E[1][i1][2][1],E[1][i1][2][2],E[1][i1][2][1],E[1][i1][2][2],E[1][i1][2][1],E[1][i1][2][2],E[1][i1][2][1],E[1][i1][2][2],E[1][i1][2][1],E[1][i1][2][2],E[1][i1][1][1])+newline;}
1505
+ }
1506
+ for(j1=1;j1<=size(E[2]);j1++)
1507
+ {
1508
+ L7[j1]=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (%s,%s) node[left]{$q_%s$}--(%s,%s);",E[2][j1][2][1],E[2][j1][2][2],E[2][j1][1][1],E[2][j1][3][1],E[2][j1][3][2])+newline;
1509
+ L8[j1]=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (%s,%s)--(%s,%s) node[right]{$q_%s$};",E[3][j1][2][1],E[3][j1][2][2],E[3][j1][3][1],E[3][j1][3][2],E[3][j1][1][1])+newline;
1510
+ }
1511
+ for(i3=1;i3<=size(L6);i3++)
1512
+ {s1=s1+L6[i3];}
1513
+ for(j3=1;j3<=size(L7);j3++)
1514
+ {
1515
+ s2=s2+L7[j3];
1516
+ s3=s3+L8[j3];
1517
+ }
1518
+ //Step7:
1519
+ for(i4=1;i4<=size(I);i4++)
1520
+ {
1521
+ if(I[i4]>=2)
1522
+ {
1523
+ for(j4=1;j4<=I[i4]-1;j4++)
1524
+ {
1525
+ y=y+j4;
1526
+ L9=L9+list(sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (0,%s) node[left]{$q_%s$}--(%s,%s) node[right]{$q_%s$};",size(I)+y,i4,n,size(I)+y,i4)+newline);
1527
+ }
1528
+ }
1529
+ }
1530
+ for(j5=1;j5<=size(L9);j5++)
1531
+ {p6=p6+L9[j5];}
1532
+ for(i5=1;i5<=size(#);i5++)
1533
+ {
1534
+ if(#[i5]!=0)
1535
+ {
1536
+ Le[i5]=sprintf("\\draw[thick,gray] (%s,%s)--(%s,%s); \\node[above] at (%s,%s) {$L_%s=%s$};",cdn[i5][1],cdn[i5][2],cdn[i5][1],m,cdn[i5][1],m,i5,#[i5])+newline;//leaky edges
1537
+ }
1538
+ else
1539
+ {Le[i5]="";}
1540
+ }
1541
+ for(i6=1;i6<=size(Le);i6++)
1542
+ {le=le+Le[i6];}
1543
+ beg="\\begin{tikzpicture}"+newline;
1544
+ en="\\end{tikzpicture}"+newline;
1545
+ S=beg,s1+newline,s2+newline,s3+newline,p6+newline,le+newline,R1,en;
1546
+ return(S);
1547
+ }
1548
+
1549
+ //----------------------------------------------------------------------------------------
1550
+ //Procedures for Paper on covers with leaks and self-looping edges [BGM1]
1551
+ //Returns the propagator for a looped edge in a graph from Def (2.10)
1552
+ //Prop for non-looped edges is same as the one constructed previously i.e. Propagatorfor1()
1553
+ static proc Proploop1(int a)
1554
+ {
1555
+ int w;
1556
+ poly p;
1557
+ if(a!=0)
1558
+ {
1559
+ for(w=1;w<=a;w++)
1560
+ {
1561
+ if(a mod w == 0)
1562
+ {p=p+w;}
1563
+ }
1564
+ }
1565
+ else
1566
+ {p=0;}
1567
+ return(list(p,1));
1568
+ }
1569
+
1570
+ //Computes the propagator function for every edge of a graph w/o vertex contributions
1571
+ static proc PropagatornoVC(graph G, list aa,list O)
1572
+ {
1573
+ int i,j,d;
1574
+ poly x,y;
1575
+ list P,E;
1576
+ E=G.edges;
1577
+ for(j=1;j<=size(aa);j++)
1578
+ {d=d+aa[j];}
1579
+ for(i=1;i<=size(E);i++)
1580
+ {
1581
+ if(E[i][1]==E[i][2])
1582
+ {P[i]=Proploop1(aa[i]);}
1583
+ else
1584
+ {
1585
+ x=var(E[i][1]);
1586
+ y=var(E[i][2]);
1587
+ P[i]=Propagatorfor1(x,y,aa[i],O,d);
1588
+ }
1589
+ }
1590
+ return(P);
1591
+ }
1592
+
1593
+ //Computes the Feynman Integral without vertex contributions for G given a fixed ordering
1594
+ static proc FeynmanIntnoVC1(graph G, list aa, list pe,list l, int n)
1595
+ {
1596
+ int i,j,jj,k,ll,m,d,s;
1597
+ list E,P,Q;
1598
+ poly x,y,f,ff,gg,g,h,h1,c;
1599
+ f=1;
1600
+ g=1;
1601
+ h=1;
1602
+ h1=1;
1603
+ E=G.edges;
1604
+ for(i=1;i<=size(aa);i++)
1605
+ {d=d+aa[i];}
1606
+ P=PropagatornoVC(G,aa,pe);
1607
+ for(j=1;j<=size(E)-1;j++)
1608
+ {
1609
+ f=f*P[1][1]*P[j+1][1];
1610
+ g=g*P[j+1][2];
1611
+ }
1612
+ for(m=1;m<=size(l);m++)
1613
+ {
1614
+ if(l[m]>=0)
1615
+ {h=h*var(m)^l[m];}
1616
+ else
1617
+ {h1=h1*(var(m)^(absValue(l[m])));}
1618
+ }
1619
+ ff=f*h1;
1620
+ gg=g*h;
1621
+ c=cf_of(ff,gg);
1622
+ Q=Q+list(pe,c);
1623
+ if(n==0)
1624
+ {return(c);}
1625
+ else
1626
+ {return(Q);}
1627
+ }
1628
+
1629
+ //Feynman integral of Feynman graph G over all possible orders of the vertices and its sum
1630
+ static proc FeynmanIntegralnoVC(graph G,list aa,list l,int n)
1631
+ {
1632
+ int i,j;
1633
+ poly x;
1634
+ number s;
1635
+ list pe,L,LL,P,PP,Q,QQ;
1636
+ L=G.vertices;
1637
+ for(i=1;i<=size(L);i++)
1638
+ {
1639
+ x=var(L[i]);
1640
+ LL[i]=x;
1641
+ }
1642
+ pe=permute(LL);
1643
+ for(j=1;j<=size(pe);j++)
1644
+ {
1645
+ P[j]=FeynmanIntnoVC1(G,aa,pe[j],l,1);
1646
+ PP[j]=pe[j];
1647
+ if(P[j][2]!=0)
1648
+ {Q[j]=list(pe[j],P[j][2]);}
1649
+ s=s+P[j][2];
1650
+ }
1651
+ if(n==0)
1652
+ {return(s);}
1653
+ else
1654
+ {
1655
+ QQ=list(Q,s);
1656
+ return(QQ);
1657
+ }
1658
+ }
1659
+
1660
+ //Computes Feynman Integral over all aa.
1661
+ static proc GWinvariantnoVC(graph G,list O,list l,int d,int r)
1662
+ {
1663
+ int i,ii,j,jj,n;
1664
+ number c;
1665
+ list aa,a,Q,F,FF;
1666
+ n=size(G.edges);
1667
+ aa=partitions(n,d);
1668
+ for(i=1;i<=size(aa);i++)
1669
+ {
1670
+ for(ii=1;ii<=size(aa[i]);ii++)
1671
+ {a[ii]=aa[i][ii,1];}
1672
+ Q[i]=FeynmanIntnoVC1(G,a,O,l,0);
1673
+ F[i]=list(aa[i],Q[i]);
1674
+ }
1675
+ for(j=1;j<=size(F);j++)
1676
+ {
1677
+ if(F[j][2] != 0)
1678
+ {FF=FF+list(F[j]);}
1679
+ }
1680
+ for(jj=1;jj<=size(Q);jj++)
1681
+ {c=c+Q[jj];}
1682
+ if(r==0)
1683
+ {return(c);}
1684
+ else
1685
+ {return(list(FF,c));}
1686
+ }
1687
+
1688
+ //------------------------------------------------------------------------
1689
+ //Procedures for graphs with vertex contributions
1690
+ //Need a ring with x_i and z_i variables for these procedures
1691
+
1692
+ //Computes the factorial of an integer
1693
+ static proc Factorial(int n)
1694
+ {
1695
+ int i;
1696
+ bigint j=1;
1697
+ for(i=1;i<=n;i++)
1698
+ {j=j*i;}
1699
+ return(j);
1700
+ }
1701
+
1702
+ proc sinh(poly t,int n)
1703
+ "USAGE: sinh(t,n); t poly, n int@*
1704
+ ASSUME: t is a polynomial and n is a non-zero integer
1705
+ RETURN: poly
1706
+ THEORY: Returns the power series expansion of the hyperbolic sine function up to n terms.
1707
+
1708
+ KEYWORDS: elliptic curves; hyperbolic sine series expansion
1709
+ EXAMPLE: example sinh; shows an example
1710
+ "
1711
+ {
1712
+ int i;
1713
+ poly N;
1714
+ if(n==0)
1715
+ {N=0;}
1716
+ else
1717
+ {
1718
+ for(i=1;i<=n;i++)
1719
+ {N=N+t^((2*i)-1)/Factorial((2*i)-1);}
1720
+ }
1721
+ return(N);
1722
+ }
1723
+ example
1724
+ { "EXAMPLE:"; echo=2;
1725
+ ring R=0,(x,y),dp;
1726
+ sinh(x,5);// expands sine hyperbolic function for variable x to first 5 terms
1727
+ }
1728
+
1729
+ //Returns the S-function in the form of (1+X) (where X is a taylor series expansion of
1730
+ //the sinh() upto n terms)
1731
+ proc Sfunction(poly z, int k)
1732
+ "USAGE: Sfunction(z,k); z poly, k int@*
1733
+ ASSUME: z is a polynomial and k is an integer
1734
+ RETURN: poly
1735
+ THEORY: Returns the S-function in the form of (1+X), where X is a taylor series
1736
+ expansion of the sinh function upto k terms.
1737
+
1738
+ KEYWORDS: elliptic curves; S-function
1739
+ EXAMPLE: example Sfunction; shows an example
1740
+ "
1741
+ {
1742
+ poly N,D,S;
1743
+ N=2*sinh(z/2,k);
1744
+ D=z;
1745
+ S=N/D;
1746
+ return(S);
1747
+ }
1748
+ example
1749
+ { "EXAMPLE:"; echo=2;
1750
+ ring R=0,(x,y),dp;
1751
+ Sfunction(x,3);
1752
+ }
1753
+
1754
+ //Computes the series (1+X)^(-1) where (1+X) is the Sfunction()
1755
+ static proc invrtSfunction(poly z, int n)
1756
+ {
1757
+ int i;
1758
+ poly s,S,X,N,D;
1759
+ S=Sfunction(z,n);
1760
+ X=S-1;
1761
+ for(i=1;i<=n;i++)
1762
+ {s=s+((-1)^(i-1))*(X^(i-1));}
1763
+ return(s);
1764
+ }
1765
+
1766
+ //Returns propagator for a looped edge using the S-function
1767
+ static proc ProploopNew(poly z, int g, int a)
1768
+ {
1769
+ int w;
1770
+ poly p,q,S1,S2;
1771
+ if(a != 0)
1772
+ {
1773
+ for(w=1;w<=a;w++)
1774
+ {
1775
+ if((a mod w)==0)
1776
+ {
1777
+ S1=Sfunction(w*z,a);
1778
+ p=p+(S1^2)*w;
1779
+ }
1780
+ }
1781
+ q=cf_of(p,z^(2*g))*z^(2*g);
1782
+ }
1783
+ else
1784
+ {q=0;}
1785
+ return(list(q,1));
1786
+ }
1787
+
1788
+ //merges prpcal() and propfor1() together
1789
+ static proc propNoloop1(poly x, poly y, poly z1, poly z2, int aa, list pe, int N)
1790
+ {
1791
+ int a,w,i,j,k,u,v;
1792
+ //number d1,d2;
1793
+ poly p1,p2,q,d1,d2,p,s1,s2,S1,S2,SS1,SS2;
1794
+ list xx,ND,xx1,xx2,P,PP,Q,R;
1795
+ for(i=1;i<=N-1;i++)
1796
+ {
1797
+ S1=Sfunction(i*z1,N-1);
1798
+ S2=Sfunction(i*z2,N-1);
1799
+ //pk are the constant term of propagator if a_k==0
1800
+ p1= p1+S1*S2*i*(x^i)*(y^((N-1)-i)); //if y>x
1801
+ p2= p2+S1*S2*i*(y^i)*(x^((N-1)-i)); //if x>y
1802
+ PP=p1,p2;
1803
+ }
1804
+ for (a=1;a<=N-1;a++)
1805
+ {
1806
+ //poly q_a;
1807
+ for(w=1;w<=N;w++)
1808
+ {
1809
+ if((a mod w)==0)
1810
+ {
1811
+ SS1=Sfunction(w*z1,N-1);
1812
+ SS2=Sfunction(w*z2,N-1);
1813
+ q=q+SS1*SS2*w*((x^(2*w)+y^(2*w))*(x*y)^(a-w));
1814
+ P[a]=q;
1815
+ }
1816
+ }
1817
+ xx[a]=(x*y)^a;
1818
+ }
1819
+ for(k=1;k<=size(P)-1;k++)
1820
+ {
1821
+ Q[1]=P[1];
1822
+ Q[k+1]=P[k+1]-P[k];
1823
+ }
1824
+ for(j=1;j<=N-1;j++)
1825
+ {
1826
+ xx1[1]=y^(N-1); //if y>x
1827
+ xx1[j+1]=xx[j]; //if y>x
1828
+ xx2[1]=x^(N-1); //if x>y
1829
+ xx2[j+1]=xx[j]; //if x>y
1830
+ }
1831
+ //ND=PP,Q,xx1,xx2;
1832
+ //Up to here we get a list of propagator numerator and denominator for both the possible outcomes
1833
+ //Now we convert this list into the numerator and denominator of the propagator we are interested in
1834
+ u=preim(pe,y);
1835
+ v=preim(pe,x);
1836
+ if(u>v) //i.e y>x
1837
+ {
1838
+ p=PP[1];
1839
+ xx=xx1;
1840
+ }
1841
+ else //i.e x>y
1842
+ {
1843
+ p=PP[2];
1844
+ xx=xx2;
1845
+ }
1846
+ ND=list(p)+Q;
1847
+ R=pe,ND,xx;
1848
+ return(R);
1849
+ }
1850
+
1851
+ //Propagator for non looping edges.
1852
+ //Computes the numerator and denominator for the propagator of only one edge
1853
+ static proc PropNoloopfor1(poly x,poly y,int a,list O, int d,poly z1,poly z2,int g1,int g2)
1854
+ {
1855
+ poly f,g,ff;
1856
+ list P1,P2;
1857
+ P1=propNoloop1(x,y,z1,z2,a,O,d+1);
1858
+ if(a==0)
1859
+ {
1860
+ f=P1[2][1];
1861
+ g=P1[3][1];
1862
+ }
1863
+ else
1864
+ {
1865
+ f=P1[2][a+1];
1866
+ g=P1[3][a+1];
1867
+ }
1868
+ P2=f,g;
1869
+ return(P2);
1870
+ }
1871
+
1872
+ //Propagator with vertex contributions for each edge of the graph G
1873
+ //Returns the propagator for edges of the Feynman graph G with vertex contributions as in Def (2.14) [BGM1]
1874
+ static proc PropagatorVC(graph G,list aa,list O,list gg)
1875
+ {
1876
+ int a,d,ii,i,j,jj,g,g1,g2;
1877
+ poly x,y,z,zz1,zz2;
1878
+ list E,P,Z;
1879
+ E=G.edges;
1880
+ for(jj=1;jj<=size(aa);jj++)
1881
+ {d=d+aa[jj];}
1882
+ for(ii=1;ii<=size(O);ii++)
1883
+ {Z[ii]=var(size(O)+ii);}
1884
+ for(i=1;i<=size(E);i++)
1885
+ {
1886
+ if(E[i][1]==E[i][2])
1887
+ {
1888
+ z=Z[E[i][1]];
1889
+ g=gg[E[i][1]];
1890
+ P[i]=ProploopNew(z,g,aa[i]);
1891
+ }
1892
+ else
1893
+ {
1894
+ x=var(E[i][1]);
1895
+ y=var(E[i][2]);
1896
+ zz1=Z[E[i][1]];
1897
+ zz2=Z[E[i][2]];
1898
+ g1=gg[E[i][1]];
1899
+ g2=gg[E[i][1]];
1900
+ P[i]=PropNoloopfor1(x,y,aa[i],O,d,zz1,zz2,g1,g2);
1901
+ }
1902
+ }
1903
+ return(P);
1904
+ }
1905
+
1906
+ //Computes the Feynman Integral with vertex contributions for G
1907
+ //Feynman integral for a given ordering
1908
+ static proc FeynmanIntegralVC1(graph G, list aa, list pe, list l, list gg, int r)
1909
+ {
1910
+ int ii,i,j,k,d;
1911
+ poly s,pp,p,qq,q,u,v,xx,xx1,zz,cf;
1912
+ list P,Q,Z;
1913
+ s=1;
1914
+ pp=1;
1915
+ p=1;
1916
+ q=1;
1917
+ xx=1;
1918
+ xx1=1;
1919
+ zz=1;
1920
+ for(ii=1;ii<=size(l);ii++)
1921
+ {Z[ii]=var(size(l)+ii);}
1922
+ for(i=1;i<=size(aa);i++)
1923
+ {d=d+aa[i];}
1924
+ P=PropagatorVC(G,aa,pe,gg);
1925
+ for(j=1;j<=size(Z);j++)
1926
+ {
1927
+ s=s*invrtSfunction(Z[j],gg[j]+1);
1928
+ if(l[j]>=0)
1929
+ {xx=xx*(var(j)^l[j]);}
1930
+ else
1931
+ {xx1=xx1*(var(j)^(absValue(l[j])));}
1932
+ zz=zz*Z[j]^(2*gg[j]);
1933
+ }
1934
+ for(k=1;k<=size(P);k++)
1935
+ {
1936
+ if(typeof(P[k])=="poly")
1937
+ {pp=pp*P[k];}
1938
+ else
1939
+ {
1940
+ p=p*P[k][1];
1941
+ q=q*P[k][2];
1942
+ }
1943
+ }
1944
+ u=s*pp*p*xx1;
1945
+ v=q*xx*zz;
1946
+ cf=cf_of(u,v);
1947
+ Q=Q+list(pe,cf);
1948
+ if(r==0)
1949
+ {return(cf);}
1950
+ else
1951
+ {return(Q);}
1952
+ }
1953
+
1954
+ //Feynman integral for all possible orderings and their sum
1955
+ static proc FeynmanIntegralVC(graph G,list aa, list l, list gg, int r)
1956
+ {
1957
+ int i,j;
1958
+ poly x;
1959
+ number s;
1960
+ list pe,L,LL,P,PP,Q,QQ;
1961
+ L=G.vertices;
1962
+ for(i=1;i<=size(L);i++)
1963
+ {
1964
+ x=var(L[i]);
1965
+ LL[i]=x;
1966
+ }
1967
+ pe=permute(LL);
1968
+ for(j=1;j<=size(pe);j++)
1969
+ {
1970
+ P[j]=FeynmanIntegralVC1(G,aa,pe[j],l,gg,1);
1971
+ PP[j]=pe[j];
1972
+ if(P[j][2]!=0)
1973
+ {Q[j]=list(pe[j],P[j][2]);}
1974
+ s=s+P[j][2];
1975
+ }
1976
+ if(r==0)
1977
+ {return(s);}
1978
+ else
1979
+ {
1980
+ QQ=list(Q,s);
1981
+ return(QQ);
1982
+ }
1983
+ }
1984
+
1985
+ //Computes Feynman Integral over all aa.
1986
+ static proc GWinvariantVC(graph G,list O,list l,list gg,int d,int r)
1987
+ {
1988
+ int i,ii,j,jj,n;
1989
+ number c;
1990
+ list aa,a,Q,F,FF;
1991
+ n=size(G.edges);
1992
+ aa=partitions(n,d);
1993
+ for(i=1;i<=size(aa);i++)
1994
+ {
1995
+ for(ii=1;ii<=size(aa[i]);ii++)
1996
+ {a[ii]=aa[i][ii,1];}
1997
+ Q[i]=FeynmanIntegralVC1(G,a,O,l,gg,0);
1998
+ F[i]=list(aa[i],Q[i]);
1999
+ }
2000
+ for(j=1;j<=size(F);j++)
2001
+ {
2002
+ if(F[j][2] != 0)
2003
+ {FF=FF+list(F[j]);}
2004
+ }
2005
+ for(jj=1;jj<=size(Q);jj++)
2006
+ {c=c+Q[jj];}
2007
+ if(r==0)
2008
+ {return(c);}
2009
+ else
2010
+ {return(list(FF,c));}
2011
+ }
2012
+
2013
+ //--------------------------------------------------------------------
2014
+ //Computations for results from [BGM2] (Tropical covers of E and stable maps to ExP1)
2015
+ //Propagator
2016
+ //Remains same as for [BBM]
2017
+ //Feynman Integral for a given ordering and a fixed partition of the degree d1.
2018
+ //here G is a pearl chain of type (d2,g) and degree d1.
2019
+ static proc FeynmanIntegral1(graph G,list aa,list pe, list l, int n)
2020
+ {
2021
+ int i,j,k,d;
2022
+ list E,P,Q;
2023
+ poly x,y,f,ff,g,gg,xx,xx1,c;
2024
+ f=1;
2025
+ g=1;
2026
+ xx=1;
2027
+ xx1=1;
2028
+ E=G.edges;
2029
+ for(i=1;i<=size(aa);i++)
2030
+ {d=d+aa[i];}
2031
+ for(j=1;j<=size(aa);j++)
2032
+ {
2033
+ x=var(E[j][1]);
2034
+ y=var(E[j][2]);
2035
+ P[j]=Propagatorfor1(x,y,aa[j],pe,d);
2036
+ f=f*P[j][1];
2037
+ g=g*P[j][2];
2038
+ }
2039
+ for(k=1;k<=size(l);k++)
2040
+ {
2041
+ if(l[k]>=0)
2042
+ {xx=xx*var(k)^l[k];}
2043
+ else
2044
+ {xx1=xx1*(var(k)^(absValue(l[k])));}
2045
+ }
2046
+ ff=f*xx1;
2047
+ gg=g*xx;
2048
+ c=cf_of(ff,gg);
2049
+ Q=Q+list(pe,c);
2050
+ if(n==0)
2051
+ {return(c);}
2052
+ else
2053
+ {return(Q);}
2054
+ }
2055
+
2056
+ //Feynman Integral over all possible orders for a fixed partition of the degree and their sum
2057
+ static proc FeynmanIntegral(graph G,list aa,list l,int n)
2058
+ {
2059
+ int i,j;
2060
+ poly x,s;
2061
+ list pe,L,LL,P,PP,Q,QQ;
2062
+ L=G.vertices;
2063
+ for(i=1;i<=size(L);i++)
2064
+ {
2065
+ x=var(L[i]);
2066
+ LL[i]=x;
2067
+ }
2068
+ pe=permute(LL);
2069
+ for(j=1;j<=size(pe);j++)
2070
+ {
2071
+ P[j]=FeynmanIntegral1(G,aa,pe[j],l,1);
2072
+ PP[j]=pe[j];
2073
+ while(P[j][2]!=0)
2074
+ {
2075
+ Q[j]=list(P[j]);
2076
+ s=s+P[j][2];
2077
+ break;
2078
+ }
2079
+ }
2080
+ if(n==0)
2081
+ {return(s);}
2082
+ else
2083
+ {
2084
+ QQ=list(Q,s);
2085
+ return(QQ);
2086
+ }
2087
+ }
2088
+
2089
+ //Computes Feynman Integral over all aa.
2090
+ static proc FeynmanIntgrl(graph G,list O,list l,int d, int r)
2091
+ {
2092
+ int i,ii,j,jj,n;
2093
+ number c;
2094
+ list aa,a,Q,F,FF;
2095
+ n=size(G.edges);
2096
+ aa=partitions(n,d);
2097
+ for(i=1;i<=size(aa);i++)
2098
+ {
2099
+ for(ii=1;ii<=size(aa[i]);ii++)
2100
+ {a[ii]=aa[i][ii,1];}
2101
+ Q[i]=FeynmanIntegral1(G,a,O,l,0);
2102
+ F[i]=list(aa[i],Q[i]);
2103
+ }
2104
+ for(j=1;j<=size(F);j++)
2105
+ {
2106
+ if(F[j][2] != 0)
2107
+ {FF=FF+list(F[j]);}
2108
+ }
2109
+ for(jj=1;jj<=size(Q);jj++)
2110
+ {c=c+Q[jj];}
2111
+ if(r==0)
2112
+ {return(c);}
2113
+ else
2114
+ {return(list(FF,c));}
2115
+ }
2116
+
2117
+ //draws a curled pearl chain in TikZ
2118
+ static proc DrawinTikZcpc(list V,list I,list O,poly f,list w,list L)
2119
+ {
2120
+ int i,j,jj,k,l,l1,ll,i1,j1,i2,ii2,j2,i3,j3,i4,j4,j5,i5,i6,n,m,mm,y;
2121
+ list cd,cdn,E,L1,L2,L3,L4,L5,L6,L7,L8,L9,l6,l7,l8,Le;
2122
+ string s,r,rr,b1,b2,s1,s2,s3,S,p1,p2,p3,p4,p5,p6,R1,ll6,ll7,ll8,le,beg,en;
2123
+ cd=coordinategenerator(V,I,O);
2124
+ E=drawcrds(V,I,O);
2125
+ cdn=cdnew(cd[1],E[1]);
2126
+ //Step1+Step2:
2127
+ n=2*(size(O)+1);
2128
+ for(i=1;i<=size(I);i++)
2129
+ {
2130
+ if(I[i] >= 2)
2131
+ {
2132
+ for(jj=1;jj<=I[i]-1;jj++)
2133
+ {mm=mm+jj;}
2134
+ }
2135
+ }
2136
+ m=size(I)+mm+2;
2137
+ s=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (0,-1) -- (%s,-1);",n)+newline;
2138
+ r=sprintf("\\draw (0,0) rectangle (%s,%s);",n,m)+newline;
2139
+ rr=sprintf("\\path (0,0) -- (%s,0) node[midway,below,red] {\\Large{$mult(\\pi)=%s$}};",n,f)+newline;
2140
+ b1="\\node [below] at (0,-1) {$p_0$};"+newline;
2141
+ b2=sprintf("\\node [below] at (%s,-1) {$p_0$};",n)+newline;
2142
+
2143
+ L1[1]=string(sprintf("\\draw plot[mark=*,mark options={thick}] coordinates{(%s,-1)",2));
2144
+ L2[1]=sprintf("\\node [below] at (2,-1) {$p_1$};")+newline;//take
2145
+
2146
+ for(j=1;j<=size(O)-1;j++)
2147
+ {
2148
+ L1[j+1]=string(sprintf("(%s,-1)",2*(j+1)));
2149
+ L2[j+1]=string(sprintf("\\node [below] at (%s,-1) {$p_%s$};",2*(j+1),(j+1)))+newline; //Step2
2150
+ }
2151
+ for(k=1;k<=size(L1);k++)
2152
+ {
2153
+ p1=p1+L1[k];
2154
+ p2=p2+L2[k]; //Step2
2155
+ }
2156
+ for(l=1;l<=size(cdn);l++)
2157
+ {
2158
+ L3[1]=string(sprintf("\\node[draw,fill=white,circle,inner sep=1.75pt] at (%s,%s){};",cdn[1][1],cdn[1][2]))+newline;
2159
+ for(l1=1;l1<=size(w);l1++)
2160
+ {
2161
+ if(l==w[l1])
2162
+ {L3[l]=string(sprintf("\\node[draw,fill=white,circle,inner sep=1.75pt] at (%s,%s){};",cdn[l][1],cdn[l][2]))+newline;}
2163
+ else
2164
+ {L3[l]=string(sprintf("\\draw plot[mark=*,mark options={thick}] coordinates{(%s,%s)};",cdn[l][1],cdn[l][2]))+newline;}
2165
+ }
2166
+ L4[l]=sprintf("\\node [above] at (%s,%s) {$x_%s$};",cdn[l][1],cdn[l][2],varnum(O[l]))+newline;//Step3
2167
+ L5[l]=sprintf("\\draw[dashed] (%s,%s)--(%s,-1);",cdn[l][1],cdn[l][2],cdn[l][1])+newline;//Step4
2168
+ }
2169
+ for(ll=1;ll<=size(L3);ll++)
2170
+ {
2171
+ p3=p3+L3[ll];
2172
+ p4=p4+L4[ll];
2173
+ p5=p5+L5[ll];
2174
+ }
2175
+ R1=s,r,rr,p1,"};"+newline,p4,p5,p2,p3,b1,b2;
2176
+
2177
+ for(i1=1;i1<=size(E[1]);i1++)
2178
+ {L6[i1]=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (%s,%s) -- (%s,%s) node [below,align=center,midway]{$q_%s$};",E[1][i1][2][1],E[1][i1][2][2],E[1][i1][3][1],E[1][i1][3][2],E[1][i1][1][1])+newline;}
2179
+ for(j1=1;j1<=size(E[2]);j1++)
2180
+ {
2181
+ L7[j1]=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (%s,%s) node[left]{$q_%s$}--(%s,%s);",E[2][j1][2][1],E[2][j1][2][2],E[2][j1][1][1],E[2][j1][3][1],E[2][j1][3][2])+newline;
2182
+ L8[j1]=sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (%s,%s)--(%s,%s) node[right]{$q_%s$};",E[3][j1][2][1],E[3][j1][2][2],E[3][j1][3][1],E[3][j1][3][2],E[3][j1][1][1])+newline;
2183
+ }
2184
+ for(i3=1;i3<=size(L6);i3++)
2185
+ {s1=s1+L6[i3];}
2186
+ for(j3=1;j3<=size(L7);j3++)
2187
+ {
2188
+ s2=s2+L7[j3];
2189
+ s3=s3+L8[j3];
2190
+ }
2191
+ //Step7:
2192
+ for(i4=1;i4<=size(I);i4++)
2193
+ {
2194
+ if(I[i4]>=2)
2195
+ {
2196
+ for(j4=1;j4<=I[i4]-1;j4++)
2197
+ {
2198
+ y=y+j4;
2199
+ L9=L9+list(sprintf("\\draw [thick,preaction={draw=white, line width=2pt}] (0,%s) node[left]{$q_%s$}--(%s,%s) node[right]{$q_%s$};",size(I)+y,i4,n,size(I)+y,i4)+newline);
2200
+ }
2201
+ }
2202
+ }
2203
+ for(j5=1;j5<=size(L9);j5++)
2204
+ {p6=p6+L9[j5];}
2205
+ for(i5=1;i5<=size(L);i5++)
2206
+ {
2207
+ if(L[i5]!=0)
2208
+ {Le[i5]=sprintf("\\draw[thick,gray] (%s,%s)--(%s,%s); \\node[above] at (%s,%s) {$L_%s=%s$};",cdn[i5][1],cdn[i5][2],cdn[i5][1],m,cdn[i5][1],m,i5,L[i5])+newline;}//leaky edges
2209
+ else
2210
+ {Le[i5]="";}
2211
+ }
2212
+ for(i6=1;i6<=size(Le);i6++)
2213
+ {le=le+Le[i6];}
2214
+ beg="\\begin{tikzpicture}"+newline;
2215
+ en="\\end{tikzpicture}"+newline;
2216
+ S=beg,s1+newline,s2+newline,s3+newline,p6+newline,le+newline,R1,en;
2217
+ return(S);
2218
+ }
2219
+
2220
+ //Procedures required for drawing floor diagrams of given curled pearl chains
2221
+ //STEP 1: convert the coordinates to the step points required in the floor diagram
2222
+ static proc floorcds(graph G)
2223
+ {
2224
+ int i,k,s,x,y;
2225
+ list V,R;
2226
+ V=G.vertices;
2227
+ s=size(V);
2228
+ k=s+3;
2229
+ x=2;
2230
+ y=k-2;
2231
+ R[1]=list(x,y);
2232
+ for(i=1;i<=s-1;i++)
2233
+ {
2234
+ x=2*(i+1);
2235
+ y=y-1;
2236
+ R[i+1]=list(x,y);
2237
+ }
2238
+ return(R);
2239
+ }
2240
+
2241
+ //STEP 2: Give a list of white pearls assuming the first vertex is always white
2242
+ //STEP 3: Write a drawing procedure using your construction to draw the floor diagram.
2243
+ static proc DrawfloorinTikz(graph G,list w,list L,list V, list I)
2244
+ {
2245
+ int i,ii,j,k,l,ll,i1,ii1,i2,i3,i4,j1,j2,j3,jj3,jjj3,jjjj3,j4,k1,kk1,kk2,k2,k3,m,n,a,a1,a2,aa1,b,b1,b2,bb1,c,c1,c2,d1,d2,d3,d4,x,x1,x2,y,u,v;
2246
+ list cd,p,pp,f,f1,f2,f3,e,wr,wr1;
2247
+ string r,p1,p2,R1,ff,ff1,ff2,ff3,F1,F2,R2,ee,R3,wrr,wrr1,R4,D,beg,en;
2248
+ cd=floorcds(G);
2249
+
2250
+ //part a: draw a rectangle of a given dimension
2251
+ m=size(cd)+3; //height of the rectangle
2252
+ n=2*size(cd)+2; //width of the rectangle
2253
+ r=sprintf("\\draw (0,0) rectangle (%s,%s);",n,m)+newline;
2254
+
2255
+ //part b: draw dots for floors and elevators
2256
+ for(i=1;i<=size(cd);i++)
2257
+ {
2258
+ a=cd[i][1];
2259
+ b=cd[i][2];
2260
+ pp[i]=sprintf("\\node [above] at (%s,%s) {$p_%s$};",a,b,i)+newline;
2261
+ p[i]=sprintf("\\draw plot[mark=*,mark options={thick}] coordinates{(%s,%s)};",a,b)+newline;
2262
+ for(ii=1;ii<=size(w);ii++)
2263
+ {
2264
+ while(w[ii]==i)
2265
+ {
2266
+ p[i]=sprintf("\\node[draw,fill=white,circle,inner sep=1.75pt] at (%s.5,%s){};",a,b)+newline;
2267
+ break;
2268
+ }
2269
+ }
2270
+ }
2271
+ for(j=1;j<=size(p);j++)
2272
+ {
2273
+ p1=p1+p[j];
2274
+ p2=p2+pp[j];
2275
+ }
2276
+ R1=r,p1,p2;
2277
+
2278
+ //part c: draw elevators connecting different floors depending on the edges of the cover.
2279
+ for(i1=1;i1<=size(I);i1++)
2280
+ {
2281
+ if(I[i1]==0)
2282
+ {
2283
+ a1=varnum(V[i1][1]);
2284
+ b1=varnum(V[i1][2]);
2285
+ for(i2=1;i2<=size(w);i2++)
2286
+ {
2287
+ if(a1==w[i2])
2288
+ {e[i1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s) -- (%s,%s);",cd[a1][1],cd[b1][2],cd[b1][1],cd[b1][2])+newline;}
2289
+ else
2290
+ {
2291
+ if(b1==w[i2])
2292
+ {e[i1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s) -- (%s,%s);",cd[a1][1],cd[a1][2],cd[b1][1],cd[a1][2])+newline;}
2293
+ }
2294
+ }
2295
+ }
2296
+ else
2297
+ {
2298
+ a1=varnum(V[i1][1]);
2299
+ b1=varnum(V[i1][2]);
2300
+ for(i3=1;i3<=size(w);i3++)
2301
+ {
2302
+ if(a1==w[i3])
2303
+ {
2304
+ if(i3<5)
2305
+ {e[i1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s) -- (%s,%s+0.1+0.%s5); \\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s+0.1+0.%s5)--(%s,%s+0.1+0.%s5);",cd[b1][1],cd[b1][2],n,cd[b1][2],i3,0,cd[b1][2],i3,cd[a1][1],cd[b1][2],i3)+newline;}
2306
+ else
2307
+ {e[i1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s) -- (%s,%s+0.1+0.%s5-0.5); \\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s+0.1+0.%s5-0.5)--(%s,%s+0.1+0.%s5-0.5);",cd[b1][1],cd[b1][2],n,cd[b1][2],i3,0,cd[b1][2],i3,cd[a1][1],cd[b1][2],i3)+newline;}
2308
+ }
2309
+ else
2310
+ {
2311
+ if(b1==w[i3])
2312
+ {
2313
+ if(i3<5)
2314
+ {e[i1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s) -- (%s,%s+0.%s5); \\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s+0.%s5)--(%s,%s+0.%s5);",cd[a1][1],cd[a1][2],n,cd[a1][2],i3,0,cd[a1][2],i3,cd[b1][1],cd[a1][2],i3)+newline;}
2315
+ else
2316
+ {e[i1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s) -- (%s,%s+0.%s5-0.5); \\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s+0.%s5-0.5)--(%s,%s+0.%s5-0.5);",cd[a1][1],cd[a1][2],n,cd[a1][2],i3,0,cd[a1][2],i3,cd[b1][1],cd[a1][2],i3)+newline;}
2317
+ }
2318
+ }
2319
+ }
2320
+ }
2321
+ }
2322
+
2323
+ for(i4=1;i4<=size(e);i4++)
2324
+ {ee=ee+string(e[i4]);}
2325
+ R3=ee;
2326
+
2327
+ //part d: draw floors corresponding to the white pearls
2328
+ c=2*w[1];
2329
+ d1=cd[w[1]][2];
2330
+ d2=cd[w[1]+1][2];
2331
+ if(L[1]==0)
2332
+ {f1[1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] plot [smooth] coordinates{(%s.5,%s)(%s.5,%s)(%s,%s)",c,m,c,d1,c,d2);}
2333
+ else
2334
+ {
2335
+ if(L[1]<0)
2336
+ {
2337
+ c1=c-1;
2338
+ //added a string to identify the direction of L_i
2339
+ f1[1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] plot [smooth] coordinates{(%s.5,%s)(%s.5,%s)(%s,%s)",c1,m,c,d1,c,d2)+newline;
2340
+ f3[1]=sprintf("\\node [above] at (%s,%s) {\\small{$(L_%s,1)=(%s,1)$}};",c1,m,1,L[1])+newline;
2341
+ }
2342
+ else
2343
+ {
2344
+ c1=c+1;
2345
+ //added a string to identify the direction of L_i
2346
+ f1[1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] plot [smooth] coordinates{(%s.5,%s)(%s.5,%s)(%s,%s)",c1,m,c,d1,c,d2)+newline;
2347
+ f3[1]=sprintf("\\node [above] at (%s,%s) {\\small{$(L_%s,1)=(%s,1)$}};",c1,m,1,L[1])+newline;
2348
+ }
2349
+ }
2350
+ for(j1=1;j1<=size(cd)-2;j1++)
2351
+ {f1[j1+1]=sprintf("(%s,%s)",c,cd[j1+2][2]);}
2352
+ for(j2=1;j2<=size(f1);j2++)
2353
+ {ff1=ff1+f1[j2];}
2354
+ F1=ff1,sprintf("(%s,0)};",c)+newline;
2355
+ for(k=1;k<=size(w)-1;k++)
2356
+ {
2357
+ c=2*w[k+1];
2358
+ if(L[k+1]==0)
2359
+ {f2[1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] plot [smooth] coordinates{(%s,%s)(%s,%s)",c,m,c,d2);}
2360
+ else
2361
+ {
2362
+ if(L[k+1]<0)
2363
+ {
2364
+ c1=c-1;
2365
+ //added a string to identify the direction of L_i
2366
+ f2[1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] plot [smooth] coordinates{(%s,%s)(%s,%s)",c1,m,c,d2);
2367
+ f3[k+1]=sprintf("\\node [above] at (%s.5,%s) {\\small{$(L_%s,1)=(%s,1)$}};",c1,m,k+1,L[k+1])+newline;
2368
+ }
2369
+ else
2370
+ {
2371
+ c1=c+1;
2372
+ //added a string to identify the direction of L_i
2373
+ f2[1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] plot [smooth] coordinates{(%s,%s)(%s,%s)",c1,m,c,d2);
2374
+ f3[k+1]=sprintf("\\node [above] at (%s.5,%s) {\\small{$(L_%s,1)=(%s,1)$}};",c1,m,k+1,L[k+1])+newline;
2375
+ }
2376
+ }
2377
+ for(j3=1;j3<=size(cd)-2;j3++)
2378
+ {
2379
+ for(jj3=1;jj3<=size(w);jj3++)
2380
+ {
2381
+ if((j3+2)==w[jj3])
2382
+ {f2[j3+2]=sprintf("(%s.5,%s)",c,cd[j3+2][2]);}
2383
+ else
2384
+ {f2[j3+2]=sprintf("(%s,%s+0.35) (%s,%s)",c,cd[j3+2][2],c,cd[j3+2][2]);}
2385
+ }
2386
+ }
2387
+ for(j4=1;j4<=size(f2);j4++)
2388
+ {ff2=ff2+string(f2[j4]);}
2389
+ F2=ff2,sprintf("(%s,0)};",cd[w[k+1]][1])+newline;
2390
+ f[k+1]=F2;
2391
+ }
2392
+ for(l=1;l<=size(f);l++)
2393
+ {ff=ff+string(f[l]);}
2394
+ for(ll=1;ll<=size(f3);ll++)
2395
+ {ff3=ff3+string(f3[ll]);}
2396
+ R2=F1,ff,ff3;
2397
+
2398
+ //part e: draw lines representing wrapped edges
2399
+ for(k1=1;k1<=size(I);k1++)
2400
+ {
2401
+ if(I[k1]>1)
2402
+ {
2403
+ if(I[k1]<6)
2404
+ {
2405
+ aa1=varnum(V[k1][1]);
2406
+ bb1=varnum(V[k1][2]);
2407
+ for(k2=1;k2<=size(w);k2++)
2408
+ {
2409
+ if(aa1==w[k2])
2410
+ {
2411
+ for(kk1=1;kk1<=I[k1]-1;kk1++)
2412
+ {
2413
+ wr1[kk1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s-0.%s) -- (%s,%s-0.%s);",0,cd[bb1][2],kk1,n,cd[bb1][2],kk1)+newline;
2414
+ wrr1=wrr1+wr1[kk1];
2415
+ }
2416
+ wr[k1]=wrr1;
2417
+ }
2418
+ else
2419
+ {
2420
+ if(bb1==w[k2])
2421
+ {
2422
+ for(kk1=1;kk1<=I[k]-1;kk1++)
2423
+ {
2424
+ wr1[kk1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s-0.%s) -- (%s,%s-0.%s);",0,cd[aa1][2],kk1,n,cd[aa1][2],kk1)+newline;
2425
+ wrr1=wrr1+wr1[kk1];
2426
+ }
2427
+ wr[k1]=wrr1;
2428
+ }
2429
+ }
2430
+ }
2431
+ }
2432
+ else
2433
+ {
2434
+ aa1=varnum(V[k1][1]);
2435
+ bb1=varnum(V[k1][2]);
2436
+ for(k2=1;k2<=size(w);k2++)
2437
+ {
2438
+ if(aa1==w[k2])
2439
+ {wr[k1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s-0.2) -- (%s,%s-0.2); \\node [left,blue] at (%s,%s-0.2) {$%s$};",0,cd[bb1][2],n,cd[bb1][2],0,cd[bb1][2],I[k1])+newline;}
2440
+ else
2441
+ {
2442
+ if(bb1==w[k2])
2443
+ {wr[k1]=sprintf("\\draw[thick,preaction={draw=white, line width=2pt}] (%s,%s-0.2) -- (%s,%s-0.2); \\node [left,blue] at (%s,%s-0.2) {$%s$};",0,cd[aa1][2],n,cd[aa1][2],0,cd[aa1][2],I[k1])+newline;}
2444
+ }
2445
+ }
2446
+ }
2447
+ }
2448
+ else
2449
+ {wr[k1]="";}
2450
+ }
2451
+ for(k3=1;k3<=size(wr);k3++)
2452
+ {wrr=wrr+string(wr[k3]);}
2453
+ R4=wrr;
2454
+
2455
+ beg="\\begin{tikzpicture}"+newline;
2456
+ en="\\end{tikzpicture}"+newline;
2457
+ D=beg,R2,R3,R1,R4,en;
2458
+ return(D);
2459
+ }
2460
+
2461
+ proc FloorDiagrams(graph G,list aa,list O,list Lw, int n)
2462
+ "USAGE: FloorDiagrams(G,aa,O,Lw,n); G graph,aa list, O list, Lw list,n int@*
2463
+ ASSUME: G is a pearl chain of the degree d, aa is a partition of degree d, O is an
2464
+ ordering of the vertices of G, Lw is a list where the first n terms represent
2465
+ the leaks in G and the next d2 terms is a list of white pearls (assuming the
2466
+ first pearl is always white). NOTE: Requires pdflatex to be installed.
2467
+ RETURN: Latex file.
2468
+ THEORY: If n=0: the procedure generates a Latex file for all the tropical stable maps
2469
+ to ExP1 and if n=1:the procedure generates the source file that can be executed
2470
+ in Latex to get all the stable maps of ExP1 (in the form of floor diagrams) for
2471
+ every curled pearl chain of an elliptic curve E provided similar information.
2472
+
2473
+ KEYWORDS: elliptic curves; tropical stable maps; floor diagrams
2474
+ EXAMPLE: example FloorDiagrams; shows an example
2475
+ "
2476
+ {
2477
+ int i1,i2,i3,i,j,k;
2478
+ list T,V,I,R,S,F,w,L;
2479
+ string dc,upt,utl1,utl2,up1,up3,bd,bcen,ecen,ed,pve,B,E,Fin;
2480
+ link dr;
2481
+ T=coverTuple(G,aa,O,3);
2482
+ V=NumDenall(T);
2483
+ I=intersectionpoints(G,aa,O,3);
2484
+ dc="\\documentclass[12pt]{article}"+newline;
2485
+ upt="\\usepackage{tikz}"+newline;
2486
+ utl1="\\usetikzlibrary{shapes.geometric}"+newline;
2487
+ utl2="\\usetikzlibrary{fit}"+newline;
2488
+ up1="\\usepackage[graphics, active, tightpage]{preview}"+newline;
2489
+ up3="\\usepackage[a4paper, total={6in, 8in}]{geometry}"+newline;
2490
+ pve="\\PreviewEnvironment{tikzpicture}"+newline;
2491
+ bd="\\begin{document}"+newline;
2492
+ bcen="\\begin{center}"+newline;
2493
+ ecen="\\end{center}"+newline;
2494
+ ed="\\end{document}"+newline;
2495
+ B=dc,upt,utl1,utl2,up1,up3,pve,bd,bcen;
2496
+ E=ecen,ed;
2497
+ Fin=B;
2498
+ for(i1=1;i1<=size(Lw)-size(O);i1++)
2499
+ {w[i1]=Lw[i1+size(O)];}
2500
+ for(i2=1;i2<=size(O);i2++)
2501
+ {
2502
+ for(i3=1;i3<=size(w);i3++)
2503
+ {
2504
+ if(i2==w[i3])
2505
+ {L=L+list(Lw[i2]);}
2506
+ }
2507
+ }
2508
+ for(i=1;i<=size(V);i++)
2509
+ {
2510
+ R[i]=DrawfloorinTikz(G,w,L,V[i],I[i]);
2511
+ Fin=Fin+string(R[i]);
2512
+ }
2513
+ write(":w FloorDiagrams",Fin);
2514
+ write(":a FloorDiagrams",E);
2515
+ //dr=":a FloorDiagrams";
2516
+ system("sh","pdflatex FloorDiagrams");
2517
+ if(n==0)
2518
+ {return(system("sh","open FloorDiagrams.pdf"));}
2519
+ else
2520
+ {return(system("sh","open FloorDiagrams"));}
2521
+ }
2522
+ example
2523
+ { "EXAMPLE:"; echo=2;
2524
+ ring R=0,(x1,x2,x3,x4,x5),dp;
2525
+ graph P=makeGraph(list(1,2,3,4,5),list(list(1,2),list(1,3),list(3,4),list(2,4),list(4,5),list(1,5)));
2526
+ //graph P is a pearl chain
2527
+ FloorDiagrams(P,list(0,0,2,0,0,1),list(x5,x4,x2,x1,x3),list(0,0,0,0,0,1,4),0);
2528
+ }
2529
+
2530
+ //------------------------------------------------------------------------------
2531
+ //The following procedures combines all the previous procedures for propagators and integrals.
2532
+ //t=0,1,2,3, where 0 does computations for results from [BBM], 1,2 computes results from [BGM1]
2533
+ //for no VC and VC resp. and t=3 computes for results in [BGM2]
2534
+
2535
+ proc PropagatorFunction(graph G,list aa, list O,int t, list #)
2536
+ "USAGE: PropagatorFunction(G,aa,O,t[,l]); G graph, aa list, O list, t int, l list@*
2537
+ ASSUME: G is a graph (a Feynman graph or a pearl chain) of the degree d, aa is a partition
2538
+ of degree d, O is an ordering of the vertices of G, l is a list representing the
2539
+ leaky edges of G and t is one of 0,1,2 or 3.
2540
+ RETURN: list P_t of propagator function for each edge of G as follows:
2541
+ P_0: Propagator for a Feynman graph G as in [BBM], i.e., a graph without any self-
2542
+ looping edges, leaks or vertex contributions.
2543
+ P_1: Propagator for a Feynman graph G without vertex contributions as in [BGM1],
2544
+ i.e., A graph that may have self-looping edges and leaks.
2545
+ P_2: Propagator for a Feynman graph G with vertex contributions as in [BGM1]
2546
+ possibly with self-looping edges and leaks.
2547
+ P_3: Propagator for a pearl chain G as in [BGM2], i.e., graph G may have leaks.
2548
+ THEORY: Computes the numerator and the denominator of the propagator function for every
2549
+ edge of graph G depending on the integer t.
2550
+
2551
+ KEYWORDS: elliptic curves; propagator of a graph
2552
+ EXAMPLE: example PropagatorFunction; shows an example
2553
+ "
2554
+ {
2555
+ list P;
2556
+ if(t==0)
2557
+ {P=Propagator(G,aa,O);}
2558
+ if(t==1 || t==3)
2559
+ {P=PropagatornoVC(G,aa,O);}
2560
+ if(t==2)
2561
+ {P=PropagatorVC(G,aa,O,#);}
2562
+ return(P);
2563
+ }
2564
+ example
2565
+ { "EXAMPLE:"; echo=2;
2566
+ ring r1=0, (x1,x2,x3,x4),dp;
2567
+ graph G = makeGraph(list(1,2,3,4),list(list(1,3),list(1,2),list(1,2),list(2,4),list(3,4),list(3,4)));
2568
+ PropagatorFunction(G,list (0,2,1,0,0,1), list (x1,x3,x4,x2),0);
2569
+
2570
+ //This is another example:
2571
+ ring r2=0,(x1,x2,x3,z1,z2,z3),dp;
2572
+ graph GG = makeGraph(list(1,2,3),list(list(1,1),list(1,2),list(2,3),list(3,1)));
2573
+ PropagatorFunction(GG,list(1,0,0,3),list(x1,x2,x3),1);
2574
+
2575
+ //Yet another example
2576
+ ring r3=0,(x1,x2,x3,x4,x5),dp;
2577
+ graph P=makeGraph(list(1,2,3,4),list(list(1,2),list(2,3),list(3,4),list(4,1)));
2578
+ //graph P is a pearl chain
2579
+ PropagatorFunction(P, list (1,0,0,1),list (x1,x2,x3,x4),3);
2580
+ }
2581
+
2582
+ proc FeynmanIntegralo(graph G,list aa, list O,list l,int k,int t, list #)
2583
+ "USAGE: FeynmanIntegralo(G,aa,O,l,k,t[,gg]); G graph, aa list, O list, l list, k int,
2584
+ t int, gg list@*
2585
+ ASSUME: G is a graph (a Feynman graph or a pearl chain) of the degree d, aa is a
2586
+ partition of degree d, O is an ordering of the vertices of G, l is a list
2587
+ representing the leaky edges of G, k is any integer, gg is a list representing
2588
+ the genus function and t is one of 0,1,2 or 3.
2589
+ RETURN: number or list Q_t (depending on k) of Feynman integral for a fixed ordering of
2590
+ vertices of G, the results are as follows:
2591
+ Q_0: Feynman integral for a fixed ordering of a Feynman graph G as in [BBM], i.e.,
2592
+ a graph without any self-looping edges, leaks or vertex contributions.
2593
+ Q_1: Feynman integral for a fixed ordering of a Feynman graph G without vertex
2594
+ contributions as in [BGM1], i.e. A graph that may have self-looping edges
2595
+ and leaks.
2596
+ Q_2: Feynman integral for a fixed ordering of a Feynman graph G with vertex
2597
+ contributions as in [BGM1] possibly with self-looping edges and leaks.
2598
+ Q_3: Feynman integral for a fixed ordering of a pearl chain G as in [BGM2], i.e.,
2599
+ graph G may have leaks.
2600
+ THEORY: If k is zero it returns the coefficient of the Feynman integral for a given
2601
+ ordering of the vertices of the graph G. Otherwise, returns a list showing the
2602
+ ordering and the coefficient of the Feynman integral for the corresponding ordering.
2603
+ KEYWORDS: elliptic curves; Feynman integral of a graph for a fixed ordering
2604
+ EXAMPLE: example FeynmanIntegralo; shows an example
2605
+ "
2606
+ {
2607
+ int i;
2608
+ def Q;
2609
+ list g;
2610
+ for(i=1;i<=size(#);i++)
2611
+ {g=g+list(#[i]);}
2612
+ if(t==0)
2613
+ {Q=feynmanIntegral1(G,aa,O,k);}
2614
+ if(t==1)
2615
+ {Q=FeynmanIntnoVC1(G,aa,O,l,k);}
2616
+ if(t==2)
2617
+ {Q=FeynmanIntegralVC1(G,aa,O,l,g,k);}
2618
+ if(t==3)
2619
+ {Q=FeynmanIntegral1(G,aa,O,l,k);}
2620
+ return(Q);
2621
+ }
2622
+ example
2623
+ { "EXAMPLE:"; echo=2;
2624
+ ring r1=0, (x1,x2,x3,x4),dp;
2625
+ graph G = makeGraph(list(1,2,3,4),list(list(1,3),list(1,2),list(1,2),list(2,4),list(3,4),list(3,4)));
2626
+ FeynmanIntegralo(G,list (0,2,1,0,0,1), list (x1,x3,x4,x2),list(0,0,0,0,0,0),1,0);
2627
+
2628
+ //This is another example:
2629
+ ring r2=0,(x1,x2,x3,z1,z2,z3),dp;
2630
+ graph GG = makeGraph(list(1,2,3),list(list(1,1),list(1,2),list(2,3),list(3,1)));
2631
+ FeynmanIntegralo(GG, list (2,0,0,1), list (x1,x2,x3),list (0,0,0), 0,1);
2632
+
2633
+ //Yet another example
2634
+ ring r3=0,(x1,x2,x3,x4,x5),dp;
2635
+ graph P=makeGraph(list(1,2,3,4),list(list(1,2),list(2,3),list(3,4),list(4,1)));
2636
+ //graph P is a pearl chain
2637
+ FeynmanIntegralo(P,list (1,0,0,1),list (x1,x2,x3,x4), list (0,0,0,0), 0,3);
2638
+ }
2639
+
2640
+ proc FeynmanIntegralO(graph G,list aa,list l,int k,int t, list #)
2641
+ "USAGE: FeynmanIntegralO(G,aa,l,k,t[,gg]); G graph, aa list, l list, k int, t int, gg list@*
2642
+ ASSUME: G is a graph (a Feynman graph or a pearl chain) of the degree d, aa is a partition
2643
+ of degree d, l is a list representing the leaky edges of G, k is any integer,
2644
+ gg is a list representing the genus function and t is one of 0,1,2 or 3.
2645
+ RETURN: number or list Q_t (depending on k) of Feynman integral for all possible
2646
+ orderings of vertices of G, the results are as follows:
2647
+ Q_0: Feynman integral for all orderings of a Feynman graph G as in [BBM], i.e., a
2648
+ graph without any self-looping edges, leaks or vertex contributions.
2649
+ Q_1: Feynman integral for all orderings of a Feynman graph G without vertex contributions
2650
+ as in [BGM1], i.e. A graph that may have self-looping edges and leaks.
2651
+ Q_2: Feynman integral for all orderings of a Feynman graph G with vertex contributions
2652
+ as in [BGM1] possibly with self-looping edges and leaks.
2653
+ Q_3: Feynman integral for all orderings of a pearl chain G as in [BGM2], i.e., a graph G
2654
+ may have leaks.
2655
+ THEORY: If k is zero it returns the coefficient which is a sum of Feynman integrals over
2656
+ all orderings of the vertices of the graph G. Otherwise, returns a list showing
2657
+ the ordering, the coefficient of the Feynman integral for the corresponding
2658
+ ordering and the sum.
2659
+ KEYWORDS: elliptic curves; sum of Feynman integrals
2660
+ EXAMPLE: example FeynmanIntegralO; shows an example
2661
+ "
2662
+ {
2663
+ int i;
2664
+ def Q;
2665
+ list g;
2666
+ for(i=1;i<=size(#);i++)
2667
+ {g=g+list(#[i]);}
2668
+ if(t==0)
2669
+ {Q=feynmanIntegral(G,aa,k);}
2670
+ if(t==1)
2671
+ {Q=FeynmanIntegralnoVC(G,aa,l,k);}
2672
+ if(t==2)
2673
+ {Q=FeynmanIntegralVC(G,aa,l,g,k);}
2674
+ if(t==3)
2675
+ {Q=FeynmanIntegral(G,aa,l,k);}
2676
+ return(Q);
2677
+ }
2678
+ example
2679
+ { "EXAMPLE:"; echo=2;
2680
+ ring r1=0, (x1,x2,x3,x4),dp;
2681
+ graph G = makeGraph(list(1,2,3,4),list(list(1,3),list(1,2),list(1,2),list(2,4),list(3,4),list(3,4)));
2682
+ FeynmanIntegralO(G,list (0,2,1,0,0,1),list (0,0,0,0,0,0),1,0);
2683
+ }
2684
+
2685
+ proc FeynmanIntegralA(graph G,list O,int d,list l,int k,int t,list #)
2686
+ "USAGE: FeynmanIntegralA(G,O,d,l,k,t[,gg]); G graph, O list, d int, l list, k int, t int, gg list@*
2687
+ ASSUME: G is a graph (a Feynman graph or a pearl chain) of the degree d, O is an ordering
2688
+ of vertices of G, d is the degree of G, l is a list representing the leaky edges
2689
+ of G, k is any integer, gg is a list representing the genus function and t is
2690
+ one of 0,1,2 or 3.
2691
+ RETURN: number or list Q_t (depending on k) of Feynman integral for a fixed ordering of
2692
+ vertices of G, the results are as follows:
2693
+ Q_0: sum of Feynman integrals (over all partitions of d) for a fixed ordering of a
2694
+ Feynman graph G as in [BBM], i.e. a graph without any self-looping edges, leaks
2695
+ or vertex contributions.
2696
+ Q_1: sum of Feynman integrals (over all partitions of d) for a fixed ordering of a
2697
+ Feynman graph G without vertex contributions as in [BGM1], i.e. A graph that may
2698
+ have self-looping edges and leaks.
2699
+ Q_2: sum of Feynman integrals (over all partitions of d) for a fixed ordering of a
2700
+ Feynman graph G with vertex contributions as in [BGM1] possibly with self-looping
2701
+ edges and leaks.
2702
+ Q_3: sum of Feynman integrals (over all partitions of d) for a fixed ordering of a
2703
+ pearl chain G as in [BGM2], i.e. graph G may have leaks.
2704
+ THEORY: If k is zero it returns the coefficient which is a sum of Feynman integrals over
2705
+ all partitions of d. Otherwise, returns a list showing the partition from which
2706
+ the Feynman integral is computed, the respective coefficient of the Feynman
2707
+ integral for the given ordering and the sum over all partitions.
2708
+ KEYWORDS: elliptic curves; Gromov-Witten invariants;Feynman integrals
2709
+ EXAMPLE: example FeynmanIntegralA; shows an example
2710
+ "
2711
+ {
2712
+ int i;
2713
+ def Q;
2714
+ list gg;
2715
+ for(i=1;i<=size(#);i++)
2716
+ {gg=gg+list(#[i]);}
2717
+ if(t==0)
2718
+ {Q=FeynmanInt(G,O,d,k);}
2719
+ if(t==1)
2720
+ {Q=GWinvariantnoVC(G,O,l,d,k);}
2721
+ if(t==2)
2722
+ {Q=GWinvariantVC(G,O,l,gg,d,k);}
2723
+ if(t==3)
2724
+ {Q=FeynmanIntgrl(G,O,l,d,k);}
2725
+ return(Q);
2726
+ }
2727
+ example
2728
+ { "EXAMPLE:"; echo=2;
2729
+ ring r1=0, (x1,x2,x3,x4),dp;
2730
+ graph G = makeGraph(list(1,2,3,4),list(list(1,3),list(1,2),list(1,2),list(2,4),list(3,4),list(3,4)));
2731
+ FeynmanIntegralA(G,list(x1,x3,x4,x2),4,list(0,0,0,0,0,0),0,0);
2732
+ }
2733
+
2734
+ proc DrawCovers(graph G,list aa,list O,int t,int n, list #)
2735
+ "USAGE: DrawCovers(G,aa,O,t[, lw]); G graph, aa list, O list, t int,n int and lw list@*
2736
+ ASSUME: G is a Feynman graph/pearl chain, aa is a partition of the degree of the graph G,
2737
+ O is a given ordering of the vertices of G, t is an integer between 0 and 3 and
2738
+ lw is a list where the first n entries represent the leaks in G and the remaining
2739
+ terms tells us about the white pearls of G. NOTE: Requires pdflatex to be installed.
2740
+ RETURN: if n=0: C_t is a Latex file generating all the covers of an elliptic curve and
2741
+ if n=1: C_t is the source file that can be executed in Latex to get the covers
2742
+ of an elliptic curve (given an ordering O and a partition aa).
2743
+ The results for C_t are as follows:
2744
+ C_0: returns a Latex file drawing all simply ramified covers of an elliptic curve
2745
+ given a fixed ordering of the vertices of G and a fixed partition of its degree.
2746
+ C_1: returns a Latex file drawing all covers of an elliptic curve such that G has no
2747
+ vertex contributions, given a fixed ordering of the vertices of G and a fixed
2748
+ partition of its degree.
2749
+ C_2: returns a Latex file drawing all covers of an elliptic curve such that G has
2750
+ vertex contributions, given a fixed ordering of the vertices of G and a fixed
2751
+ partition of its degree.
2752
+ C_3: returns a Latex file drawing all curled pearl chains of an elliptic curve given
2753
+ a fixed ordering of the vertices of G and a fixed partition of its degree.
2754
+ THEORY: For a given ordering of the vertices of G, this function computes Latex file
2755
+ drawing all the covers of an elliptic curve E. If G is a pearl chain then this
2756
+ procedure draws the black and white pearls of G accordingly using information
2757
+ from list lw.
2758
+ (For t=0, we get the results for simply ramified covers as in [BBM]. For t=1, 2
2759
+ we get results for graphs w/o vertex contributions respectively w/ vertex
2760
+ contributions as in [BGM1], and for t=3 we get the results for pearl chains as in [BGM2])
2761
+ KEYWORDS: elliptic curve draw covers
2762
+ EXAMPLE: example DrawCovers; shows an example
2763
+ "
2764
+ {
2765
+ int iii,ii,i,j,jj;
2766
+ list T,V,I,M,P,w,le,lle,g;
2767
+ string dc,upt,utl1,utl2,up1,up3,bd,bcen,ecen,ed,pve,B,E,Fin;
2768
+ link dr;
2769
+ for(jj=1;jj<=size(O);jj++)
2770
+ {g[jj]=#[jj];}
2771
+ T=coverTuple(G,aa,O,t,g);
2772
+ V=NumDenall(T);
2773
+ I=intersectionpoints(G,aa,O,t,g);
2774
+ M=CoverMult(G,aa,O,t,g);
2775
+ dc="\\documentclass[12pt]{article}"+newline;
2776
+ upt="\\usepackage{tikz}"+newline;
2777
+ utl1="\\usetikzlibrary{shapes.geometric}"+newline;
2778
+ utl2="\\usetikzlibrary{fit}"+newline;
2779
+ up1="\\usepackage[graphics, active, tightpage]{preview}"+newline;
2780
+ up3="\\usepackage[a4paper, total={6in, 8in}]{geometry}"+newline;
2781
+ pve="\\PreviewEnvironment{tikzpicture}"+newline;
2782
+ bd="\\begin{document}"+newline;
2783
+ bcen="\\begin{center}"+newline;
2784
+ ecen="\\end{center}"+newline;
2785
+ ed="\\end{document}"+newline;
2786
+ B=dc,upt,utl1,utl2,up1,up3,pve,bd,bcen;
2787
+ E=ecen,ed;
2788
+ Fin=B;
2789
+ for(ii=1;ii<=size(O);ii++)
2790
+ {le[ii]=#[size(O)+ii];}
2791
+ for(iii=1;iii<=size(O);iii++)
2792
+ {lle[iii]=#[iii];}
2793
+ for(j=1;j<=size(#)-size(O);j++)
2794
+ {w[j]=#[size(O)+j];}
2795
+ for(i=1;i<=size(V);i++)
2796
+ {
2797
+ if(t==3)
2798
+ {
2799
+ P[i]=DrawinTikZcpc(V[i],I[i],O,M[i],w,lle);
2800
+ Fin=Fin+string(P[i]);
2801
+ }
2802
+ else
2803
+ {
2804
+ P[i]=DrawinTikZ(V[i],I[i],O,M[i],le);
2805
+ Fin=Fin+string(P[i]);
2806
+ }
2807
+ }
2808
+ write(":w TropCovers",Fin);
2809
+ write(":a TropCovers",E);
2810
+ //dr=":a TropCovers";
2811
+ system("sh","pdflatex TropCovers");
2812
+ if(n==0)
2813
+ {return(system("sh","open TropCovers.pdf"));}
2814
+ else
2815
+ {return(system("sh","open TropCovers"));}
2816
+ }
2817
+ example
2818
+ {"EXAMPLE:"; echo=2;
2819
+ ring r1=0, (x1,x2,x3,x4),dp;
2820
+ graph G=makeGraph(list(1,2,3,4),list(list(1,3),list(1,2),list(1,2),list(2,4),list(3,4),list(3,4)));
2821
+ DrawCovers(G,list(0,2,1,0,0,1), list(x2,x4,x3,x1),0,0);
2822
+
2823
+
2824
+ //This is another example:
2825
+ ring r2=0,(x1,x2,x3,z1,z2,z3),dp;
2826
+ //F is graph with loops
2827
+ graph F=makeGraph(list(1,2,3),list(list(1,1),list(1,2),list(2,3),list(1,3)));
2828
+ DrawCovers(F,list(1,0,0,2),list(x1,x2,x3),2,0,list(0,0,0));
2829
+
2830
+ //Yet another example
2831
+ ring r3=0,(x1,x2,x3,x4,x5),dp;
2832
+ //in P vertices 1 and 3 are white, genus 2
2833
+ graph P=makeGraph(list(1,2,3,4,5),list(list(1,2),list(2,3),list(3,4),list(1,4),list(1,5),list(3,5)));
2834
+ DrawCovers(P,list(0,0,0,1,2,0),list(x1,x2,x3,x4,x5),3,1, list(0,0,0,0,0,1,3));
2835
+ }
2836
+
2837
+ proc TropCovandMaps(graph G,list aa, list O,list Lw,int n)
2838
+ "USAGE: TropCovandMaps(G,aa,O,Lw,n); G graph, aa list, O list, Lw list, n int@*
2839
+ ASSUME: G is a pearl chain, aa is a partition of the degree of the graph G, O is a given
2840
+ ordering of the vertices of G, Lw is a list of leaks and white vertices in G.
2841
+ NOTE: Requires pdflatex to be installed.
2842
+ RETURN: Depending on n this procedure returns either a pdf or a latex file for the curled
2843
+ pearl chains of an elliptic curve and their corresponding stable maps of ExP1
2844
+ for a fixed ordering of the vertices of the source curve and a fixed partition
2845
+ of its degree.
2846
+
2847
+ THEORY: For a given ordering of the vertices of G, this function computes a list of
2848
+ commands that can be executed in TikZ. Each list represents a cover of the
2849
+ elliptic curve E and its corresponding stable map of ExP1. Since G is a pearl
2850
+ chain this procedure draws the black and white pearls of G accordingly using
2851
+ information from list lw.
2852
+
2853
+
2854
+ KEYWORDS: elliptic curve draw covers
2855
+ EXAMPLE: example TropCovandMaps; shows an example
2856
+ "
2857
+ {
2858
+ int i1,i2,i3,ii,i;
2859
+ list cov,stm,row,T,V,I,M,L,w,le;
2860
+ string dc,upt,utl1,utl2,up1,up2,up3,bd,bcen,blt,cap,h1,h2,elt,ecen,ed,pve,B,E,F,Cov,Stm;
2861
+ link Tb;
2862
+ dc="\\documentclass[12pt]{article}"+newline;
2863
+ upt="\\usepackage{tikz}"+newline;
2864
+ utl1="\\usetikzlibrary{shapes.geometric}"+newline;
2865
+ utl2="\\usetikzlibrary{fit}"+newline;
2866
+ up1="\\usepackage[graphics, active, tightpage]{preview}"+newline;
2867
+ up2="\\usepackage{longtable}"+newline;
2868
+ up3="\\usepackage[a4paper, total={6in, 8in}]{geometry}"+newline;
2869
+ pve="\\PreviewEnvironment{tikzpicture}"+newline;
2870
+ bd="\\begin{document}"+newline;
2871
+ bcen="\\begin{center}"+newline;
2872
+ blt="\\begin{longtable}{|c|}"+newline;
2873
+ h1="\\hline"+newline;
2874
+
2875
+ h2="\\hline"+newline;
2876
+ elt="\\end{longtable}"+newline;
2877
+ ecen="\\end{center}"+newline;
2878
+ ed="\\end{document}"+newline;
2879
+
2880
+ B=dc,upt,utl1,utl2,up1,up2,up3,pve,bd,bcen,blt,h1;
2881
+ E=h2,elt,ecen,ed;
2882
+ T=coverTuple(G,aa,O,3);
2883
+ V=NumDenall(T);
2884
+ I=intersectionpoints(G,aa,O,3);
2885
+ M=CoverMult(G,aa,O,3);
2886
+ F=B;
2887
+ for(ii=1;ii<=size(O);ii++)
2888
+ {le[ii]=Lw[ii];}
2889
+ for(i1=1;i1<=size(Lw)-size(O);i1++)
2890
+ {w[i1]=Lw[i1+size(O)];}
2891
+ for(i2=1;i2<=size(O);i2++)
2892
+ {
2893
+ for(i3=1;i3<=size(w);i3++)
2894
+ {
2895
+ if(i2==w[i3])
2896
+ {L=L+list(Lw[i2]);}
2897
+ }
2898
+ }
2899
+ for(i=1;i<=size(V);i++)
2900
+ {
2901
+ cov[i]=DrawinTikZcpc(V[i],I[i],O,M[i],w,le);
2902
+ stm[i]=DrawfloorinTikz(G,w,L,V[i],I[i]);
2903
+ row[i]=string(cov[i])+"\\"+"\\"+string(stm[i]);
2904
+ F=F+string(row[i])+"\\"+"\\"+newline;
2905
+ }
2906
+ write(":w CoversWithStableMaps",F);
2907
+ write(":a CoversWithStableMaps",E);
2908
+ //Tb=":a CoversWithStableMaps";
2909
+ system("sh","pdflatex CoversWithStableMaps");
2910
+ if(n==0)
2911
+ {return(system("sh","open CoversWithStableMaps.pdf"));}
2912
+ else
2913
+ {return(system("sh","open CoversWithStableMaps"));}
2914
+ }
2915
+ example
2916
+ {"EXAMPLE:"; echo=2;
2917
+ ring r=0,(x1,x2,x3,x4,x5),dp;
2918
+ graph P=makeGraph(list(1,2,3,4,5),list(list(1,2),list(2,3),list(3,4),list(4,1),list(1,5),list(5,3)));
2919
+ graph P1=makeGraph(list(1,2,3,4),list(list(1,2),list(2,3),list(3,4),list(4,1)));
2920
+ //graphs P and P1 are pearl chains
2921
+ TropCovandMaps(P,list(0,0,0,1,2,0),list(x1,x2,x3,x4,x5),list(0,0,0,0,0,1,3), 0);
2922
+ }