1 | /////////////////////////////////////////////////////////////////////////////// |
---|
2 | version="$Id$"; |
---|
3 | category="Commutative Algebra"; |
---|
4 | info=" |
---|
5 | LIBRARY: ellipticCovers.lib Gromov Witten numbers of elliptic curves |
---|
6 | |
---|
7 | AUTHORS: J. Boehm, boehm @ mathematik.uni-kl.de |
---|
8 | A. Buchholz, buchholz @ math.uni-sb.de |
---|
9 | H. Markwig hannah @ math.uni-sb.de |
---|
10 | |
---|
11 | OVERVIEW: |
---|
12 | |
---|
13 | We implement a formula for computing the number of covers of elliptic curves. |
---|
14 | It has beed obtained by proving mirror symmetry |
---|
15 | for arbitrary genus by tropical methods in [BBM]. A Feynman graph of genus |
---|
16 | g is a trivalent, connected graph of genus g (with 2g-2 vertices |
---|
17 | and 3g-3 edges). The branch type b=(b_1,...,b_(3g-3)) of a stable map is the |
---|
18 | multiplicity of the the edge i over a fixed base point. |
---|
19 | |
---|
20 | Given a Feynman graph G and a branch type b, we obtain the number |
---|
21 | N_(G,b) of stable maps of branch type b from a genus g curve of topological type G |
---|
22 | to the elliptic curve by computing a path integral |
---|
23 | over a rational function. The path integral is computed as a residue. |
---|
24 | |
---|
25 | The sum of N_(G,b) over all branch types b of sum d gives the |
---|
26 | Gromov-Witten invariant N_(G,d) of degree d stable maps from a genus g curve |
---|
27 | of topological type G to the elliptic curve. |
---|
28 | |
---|
29 | The sum of N_(G,d) over all such graphs gives the usual Gromov-Witten invariant N_(g,d) |
---|
30 | of degree d stable maps from a genus g curve to the elliptic curve. |
---|
31 | |
---|
32 | The key function computing the numbers N_(G,b) and N_(G,d) is gromovWitten. |
---|
33 | |
---|
34 | References: |
---|
35 | |
---|
36 | [BBM] J. Boehm, A. Buchholz, H. Markwig: Tropical mirror symmetry for elliptic curves, arXiv *** (2013). |
---|
37 | |
---|
38 | KEYWORDS: |
---|
39 | |
---|
40 | tropical geometry; mirror symmetry; tropical mirror symmetry; Gromov-Witten invariants; elliptic curves; propagator; Feynman graph; path integral |
---|
41 | |
---|
42 | TYPES: |
---|
43 | |
---|
44 | graph |
---|
45 | |
---|
46 | PROCEDURES: |
---|
47 | |
---|
48 | makeGraph(list, list) generate a graph from a list of vertices and a lsit of edges |
---|
49 | printGraph(graph) print procedure for graphs |
---|
50 | propagator(list,int) propagator factor of degree d in the quotient of two variables, or |
---|
51 | propagator for fixed graph and branch type |
---|
52 | computeConstant(number, number) constant coefficient in the Laurent series expansion of a rational function in a given variable |
---|
53 | evalutateIntegral(number, list) path integral for a given propagator and ordered sequence of variables |
---|
54 | gromovWitten(number) sum of path integrals for a given propagator over all orderings of the variables, or |
---|
55 | Gromov Witten invariant for a given graph and a fixed branch type, or |
---|
56 | list of Gromov Witten invariants for a given graph and all branch types |
---|
57 | computeGromovWitten(graph, int, int) compute the Gromov Witten invariants for a given graph and some branch types |
---|
58 | generatingFunction (graph, int) multivariate generating function for the Gromov Witten invariants of a graph up to fixed degree |
---|
59 | |
---|
60 | partitions(int, int) partitions of an integer into a fixed number of summands |
---|
61 | permute(list) all permutations of a list |
---|
62 | sum(list) sum of the elements of a list |
---|
63 | |
---|
64 | "; |
---|
65 | |
---|
66 | |
---|
67 | LIB "parallel.lib"; |
---|
68 | |
---|
69 | |
---|
70 | proc mod_init() |
---|
71 | { |
---|
72 | newstruct("graph","list vertices, list edges"); |
---|
73 | newstruct("Net","list rows"); |
---|
74 | |
---|
75 | system("install","graph","print",printGraph,1); |
---|
76 | system("install","Net","print",printNet,1); |
---|
77 | system("install","Net","+",catNet,2); |
---|
78 | |
---|
79 | } |
---|
80 | |
---|
81 | |
---|
82 | static proc max(int n, int m){ |
---|
83 | if (n>m){return(n);} |
---|
84 | return(m);} |
---|
85 | |
---|
86 | |
---|
87 | static proc catNet(Net N, Net M) |
---|
88 | { |
---|
89 | list L; |
---|
90 | list LN=N.rows; |
---|
91 | list LM=M.rows; |
---|
92 | int widthN=size(LN[1]); |
---|
93 | int widthM=size(LM[1]); |
---|
94 | int nm=max(size(LN),size(LM)); |
---|
95 | for (int j=1; j<=nm; j++) |
---|
96 | { |
---|
97 | if (j>size(LN)){LN[j]=emptyString(widthN);} |
---|
98 | if (j>size(LM)){LM[j]=emptyString(widthM);} |
---|
99 | L[j]=LN[j]+LM[j]; |
---|
100 | } |
---|
101 | Net NM; |
---|
102 | NM.rows=L; |
---|
103 | return(NM);} |
---|
104 | |
---|
105 | |
---|
106 | static proc netList(list L1) |
---|
107 | { |
---|
108 | Net N=net("["); |
---|
109 | for (int j=1; j<=size(L1)-1; j++) |
---|
110 | { |
---|
111 | N=N+net(L1[j])+net(", "); |
---|
112 | } |
---|
113 | N=N+net(L1[size(L1)])+net("]"); |
---|
114 | return(N); |
---|
115 | } |
---|
116 | |
---|
117 | static proc printNet(Net N) |
---|
118 | { |
---|
119 | list L = N.rows; |
---|
120 | for (int j=1; j<=size(L); j++) |
---|
121 | { |
---|
122 | print(L[j]); |
---|
123 | } |
---|
124 | } |
---|
125 | |
---|
126 | static proc net(def M){ |
---|
127 | if (typeof(M)=="list"){ |
---|
128 | return(netList(M)); |
---|
129 | } |
---|
130 | Net N; |
---|
131 | list L; |
---|
132 | L[1]=string(M); |
---|
133 | N.rows=L; |
---|
134 | return(N);} |
---|
135 | |
---|
136 | |
---|
137 | |
---|
138 | proc printGraph(graph G) |
---|
139 | "USAGE: printGraph(G); G graph@* |
---|
140 | ASSUME: G is a graph. |
---|
141 | THEORY: This is the print function used by Singular to print a graph. |
---|
142 | KEYWORDS: graph |
---|
143 | EXAMPLE: example printGraph; shows an example |
---|
144 | " |
---|
145 | { |
---|
146 | print(netList(G.edges)); |
---|
147 | print("Graph with "+string(size(G.vertices))+" vertices and "+string(size(G.edges))+" edges") |
---|
148 | } |
---|
149 | example |
---|
150 | { "EXAMPLE:"; echo=2; |
---|
151 | ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; |
---|
152 | 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))); |
---|
153 | G; |
---|
154 | } |
---|
155 | |
---|
156 | |
---|
157 | |
---|
158 | proc makeGraph(list v, list e) |
---|
159 | "USAGE: makeGraph(v,e); v list, e list@* |
---|
160 | ASSUME: v is a list of integers, e is a list of two element lists of v. |
---|
161 | RETURN: graph with vertices v and edges e |
---|
162 | THEORY: Creates a graph from a list of vertices and edges. The vertices can be any type. |
---|
163 | KEYWORDS: graph |
---|
164 | EXAMPLE: example printGraph; shows an example |
---|
165 | " |
---|
166 | { |
---|
167 | graph G; |
---|
168 | G.vertices = v; |
---|
169 | G.edges = e; |
---|
170 | return(G); |
---|
171 | } |
---|
172 | example |
---|
173 | { "EXAMPLE:"; echo=2; |
---|
174 | ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; |
---|
175 | 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))); |
---|
176 | G; |
---|
177 | } |
---|
178 | |
---|
179 | |
---|
180 | proc propagator(def xy, def d) |
---|
181 | "USAGE: propagator(xy,d); xy list, d int@* |
---|
182 | propagator(G,b); G graph, b list@* |
---|
183 | ASSUME: xy is a list of two numbers x and y in a rational function field, d non-negative integer.@* |
---|
184 | G is a Feynman graph, a is a list of integers of length equal to the number of edges of G.@* |
---|
185 | We assume that the coefficient ring has one rational variable for each vertex of G. |
---|
186 | RETURN: number, the propagator associated to the input data. |
---|
187 | THEORY: If xy and d are specified, then the function returns x^2*y^2/(x^2-y^2)^2) for d=0, which |
---|
188 | is a associated to an edge with vertices x and y not passing above the base point. |
---|
189 | For d>0 it returns the sum of (j*x^(4*j)+j*y^(4*j))/(x*y)^(2*j) over all divisors j of d, |
---|
190 | which is associated to an edge with vertices x and y passing with multiplicity d above the base point. |
---|
191 | |
---|
192 | Essentially the variables x and y stand for the position of the base points. |
---|
193 | |
---|
194 | In the second way of using this function, G is a Feynman graph and b is a branch type |
---|
195 | over a fixed base point of a cover with source G and target an elliptic curve. It returns the |
---|
196 | product of propagator(list(v[i],w[i]),b[i]) over all edges i with multiplicity b[i] over the base point |
---|
197 | and vertices v[i] and w[i]. |
---|
198 | |
---|
199 | KEYWORDS: propagator; elliptic curve |
---|
200 | EXAMPLE: example propagator; shows an example |
---|
201 | " |
---|
202 | { |
---|
203 | if ((typeof(xy)=="list")||(typeof(d)=="int")) { |
---|
204 | number x = xy[1]; |
---|
205 | number y = xy[2]; |
---|
206 | if (d<0) {ERROR("expected non-negative degree");} |
---|
207 | if (d==0) {return(x^2*y^2/(x^2-y^2)^2);} |
---|
208 | number p=0; |
---|
209 | for (int j=1; j<=d; j++){ |
---|
210 | if (d%j==0){p=p+(j*x^(4*j)+j*y^(4*j))/(x*y)^(2*j);} |
---|
211 | } |
---|
212 | return(p); |
---|
213 | } |
---|
214 | if ((typeof(xy)=="graph")||(typeof(d)=="list")) { |
---|
215 | list xl = ringlist(basering)[1][2]; |
---|
216 | list ed = xy.edges; |
---|
217 | number f=1; |
---|
218 | for (int j=1; j<=size(ed); j++){ |
---|
219 | execute("number xx1 = "+xl[ed[j][1]]); |
---|
220 | execute("number xx2 = "+xl[ed[j][2]]); |
---|
221 | f=f*propagator(list(xx1,xx2),d[j]); |
---|
222 | kill xx1; |
---|
223 | kill xx2; |
---|
224 | } |
---|
225 | return(f); |
---|
226 | } |
---|
227 | if ((typeof(xy)=="graph")||(typeof(d)=="int")) { |
---|
228 | } |
---|
229 | ERROR("wrong input type");} |
---|
230 | example |
---|
231 | { "EXAMPLE:"; echo=2; |
---|
232 | ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; |
---|
233 | 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))); |
---|
234 | propagator(list(x1,x2),0); |
---|
235 | propagator(list(x1,x2),2); |
---|
236 | propagator(G,list(1,1,1,0,0,0)); |
---|
237 | } |
---|
238 | |
---|
239 | |
---|
240 | |
---|
241 | |
---|
242 | |
---|
243 | proc computeConstant(number f,number xx) |
---|
244 | "USAGE: computeConstant(f,x); f number, x number@* |
---|
245 | ASSUME: f is a number in a rational function field, x is a variable of the field.@* |
---|
246 | RETURN: number, the constant coefficient of the Laurent series of f in the variable x. |
---|
247 | THEORY: Computes the constant coefficient of the Laurent series by iterative differentiation. |
---|
248 | |
---|
249 | KEYWORDS: Laurent series |
---|
250 | EXAMPLE: example computeConstant; shows an example |
---|
251 | " |
---|
252 | { |
---|
253 | int tst=0; |
---|
254 | number ff=f; |
---|
255 | int k; |
---|
256 | int j; |
---|
257 | poly de; |
---|
258 | while (tst==0){ |
---|
259 | ff=f*xx^k; |
---|
260 | for (j=1; j<=k; j++){ |
---|
261 | ff=diff(ff,xx)/j; |
---|
262 | } |
---|
263 | de = subst(denominator(ff),xx,0); |
---|
264 | if (de!=0){ |
---|
265 | poly nu = subst(numerator(ff),xx,0); |
---|
266 | return(number(nu/de)); |
---|
267 | } |
---|
268 | k=k+1; |
---|
269 | } |
---|
270 | ERROR("error in computeConstant");} |
---|
271 | example |
---|
272 | { "EXAMPLE:"; echo=2; |
---|
273 | ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; |
---|
274 | 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))); |
---|
275 | number P = propagator(G,list(1,1,1,0,0,0)); |
---|
276 | computeConstant(P,x2); |
---|
277 | } |
---|
278 | |
---|
279 | |
---|
280 | |
---|
281 | |
---|
282 | proc evaluateIntegral(number P, list xL) |
---|
283 | "USAGE: evaluateIntegral(P,xx); P number, xx list@* |
---|
284 | ASSUME: P is a number in a rational function field, xx is a list of variables of the field@* |
---|
285 | RETURN: number, the constant coefficient of the Laurent series of f in the variables in the list xx. |
---|
286 | THEORY: Computes the constant coefficient of the Laurent series iteratively for the elements of xx. |
---|
287 | |
---|
288 | In the setting of covers of elliptic curves this is the path integral over the |
---|
289 | propagator divided by the product of all variables (corresponding to the vertices) |
---|
290 | computed as a residue. |
---|
291 | |
---|
292 | KEYWORDS: residue; Laurent series |
---|
293 | EXAMPLE: example evaluateIntegral; shows an example |
---|
294 | " |
---|
295 | { |
---|
296 | number p = P; |
---|
297 | for(int j=1; j<=size(xL); j++){ |
---|
298 | p=computeConstant(p,xL[j]); |
---|
299 | } |
---|
300 | return(p);} |
---|
301 | example |
---|
302 | { "EXAMPLE:"; echo=2; |
---|
303 | ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; |
---|
304 | 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))); |
---|
305 | number p = propagator(G,list(0,2,1,0,0,1)); |
---|
306 | evaluateIntegral(p,list(x1,x3,x4,x2)); |
---|
307 | } |
---|
308 | |
---|
309 | |
---|
310 | proc permute (list N) |
---|
311 | "USAGE: permute(N); N list@* |
---|
312 | ASSUME: N is a list@* |
---|
313 | RETURN: list with all permutations of N. |
---|
314 | THEORY: Computes all permutations of N. |
---|
315 | |
---|
316 | This will eventually be deleted and become a more efficient kernel function. |
---|
317 | |
---|
318 | KEYWORDS: permutations |
---|
319 | EXAMPLE: example permute; shows an example |
---|
320 | " |
---|
321 | { |
---|
322 | int i,j,k; |
---|
323 | list L,L1; |
---|
324 | if (size(N)==1){ |
---|
325 | return(list(N)); |
---|
326 | } else { |
---|
327 | k=1; |
---|
328 | for (i=1; i<=size(N); i++){ |
---|
329 | L=permute(delete(N,i)); |
---|
330 | for (j=1; j<=size(L); j++){ |
---|
331 | L1[k]=L[j]+list(N[i]); |
---|
332 | k=k+1; |
---|
333 | } |
---|
334 | } |
---|
335 | } |
---|
336 | return(L1);} |
---|
337 | example |
---|
338 | { "EXAMPLE:"; echo=2; |
---|
339 | ring R=(0,x1,x2,x3,x4),(q),dp; |
---|
340 | permute(list(x1,x2,x3,x4)); |
---|
341 | } |
---|
342 | |
---|
343 | |
---|
344 | |
---|
345 | proc partitions(int n, int a) |
---|
346 | "USAGE: partitions(n,a); n int, a int@* |
---|
347 | ASSUME: n and a are positive integers@* |
---|
348 | RETURN: list of all partitions of a into n summands. |
---|
349 | THEORY: Computes all partitions of a into n summands. |
---|
350 | |
---|
351 | This may eventually be deleted and become a more efficient kernel function. |
---|
352 | |
---|
353 | KEYWORDS: partitions |
---|
354 | EXAMPLE: example partitions; shows an example |
---|
355 | " |
---|
356 | { |
---|
357 | ring R = 2,(x(1..n)),dp; |
---|
358 | ideal I = maxideal(a); |
---|
359 | list L; |
---|
360 | for (int j=1;j<=size(I);j++){ |
---|
361 | L[j]=leadexp(I[j]); |
---|
362 | } |
---|
363 | return(L);} |
---|
364 | example |
---|
365 | { "EXAMPLE:"; echo=2; |
---|
366 | partitions(3,7); |
---|
367 | } |
---|
368 | |
---|
369 | |
---|
370 | |
---|
371 | proc gromovWitten(def P,list #) |
---|
372 | "USAGE: gromovWitten(P); P number@* |
---|
373 | gromovWitten(G,d); G graph, d int@* |
---|
374 | gromovWitten(G,b); G graph, b list@* |
---|
375 | ASSUME: P is a propagator, or @* |
---|
376 | G is a Feynman graph and d a non-negative integer, or@* |
---|
377 | G is a Feynman graph and b is a list of integers of length equal to the number of edges of G@* |
---|
378 | We assume that the coefficient ring has one rational variable for each vertex of G.@* |
---|
379 | RETURN: Gromov-Witten invariant. |
---|
380 | THEORY: Computes @* |
---|
381 | |
---|
382 | - the Gromov-Witten of a given propagator P, or @* |
---|
383 | |
---|
384 | - the invariant N_(G,d) where d is the degree of the covering, or @* |
---|
385 | |
---|
386 | - the number N_(G,b) of coverings with source G and target an elliptic curves with branch type a over a |
---|
387 | fixed base point (that is, the i-th edge passes over the base point with multiplicity b[i]).@* |
---|
388 | |
---|
389 | KEYWORDS: Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers |
---|
390 | EXAMPLE: example gromovWitten; shows an example |
---|
391 | " |
---|
392 | { |
---|
393 | if (typeof(P)=="number") { |
---|
394 | list xl = ringlist(basering)[1][2]; |
---|
395 | int j; |
---|
396 | for(j=1; j<=size(xl); j++){ |
---|
397 | execute("number n= "+xl[j]); |
---|
398 | xl[j]=n; |
---|
399 | kill n; |
---|
400 | } |
---|
401 | list pxl = permute(xl); |
---|
402 | number p = 0; |
---|
403 | for(j=1; j<=size(pxl); j++){ |
---|
404 | p=p+evaluateIntegral(P,pxl[j]); |
---|
405 | } |
---|
406 | return(p); |
---|
407 | } |
---|
408 | if (typeof(P)=="graph"){ |
---|
409 | if (size(#)>1){ |
---|
410 | return(gromovWitten(propagator(P,#))); |
---|
411 | } else { |
---|
412 | int d =#[1]; |
---|
413 | list pa = partitions(size(P.edges),d); |
---|
414 | list re; |
---|
415 | int ti; |
---|
416 | for (int j=1; j<=size(pa); j++) { |
---|
417 | ti=timer; |
---|
418 | re[j]=gromovWitten(propagator(P,pa[j])); |
---|
419 | ti=timer-ti; |
---|
420 | //print(string(j)+" / "+string(size(pa))+" "+string(pa[j])+" "+string(re[j])+" "+string(sum(re))+" "+string(ti)); |
---|
421 | } |
---|
422 | return(sum(re)); |
---|
423 | } |
---|
424 | } |
---|
425 | } |
---|
426 | example |
---|
427 | { "EXAMPLE:"; echo=2; |
---|
428 | ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; |
---|
429 | 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))); |
---|
430 | number P = propagator(G,list(0,2,1,0,0,1)); |
---|
431 | gromovWitten(P); |
---|
432 | gromovWitten(G,list(0,2,1,0,0,1)); |
---|
433 | gromovWitten(G,2); |
---|
434 | } |
---|
435 | |
---|
436 | |
---|
437 | |
---|
438 | proc computeGromovWitten(graph P,int d, int st, int en, list #) |
---|
439 | "USAGE: computeGromovWitten(G, d, st, en [, vb] ); G graph, d int, st int, en int, optional: vb int@* |
---|
440 | ASSUME: G is a Feynman graph, d a non-negative integer, st specified the start- and en the end partition |
---|
441 | in the list pa = partition(d). Specifying a positive optional integer vb leads to intermediate printout.@* |
---|
442 | We assume that the coefficient ring has one rational variable for each vertex of G.@* |
---|
443 | RETURN: list L, where L[i] is gromovWitten(G,pa[i]) and all others are zero. |
---|
444 | THEORY: This function does essentially the same as the function gromovWitten, but is designed for handling complicated examples. |
---|
445 | Eventually it will also run in parallel.@* |
---|
446 | |
---|
447 | KEYWORDS: Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers |
---|
448 | EXAMPLE: example computeGromovWitten; shows an example |
---|
449 | " |
---|
450 | { |
---|
451 | number s =0; |
---|
452 | list pararg; |
---|
453 | list re; |
---|
454 | list pa = partitions(size(P.edges),d); |
---|
455 | int vb=0; |
---|
456 | if (size(#)>0){vb=#[1];} |
---|
457 | int ti; |
---|
458 | if (vb>0){print(size(pa));} |
---|
459 | for (int j=1; j<=size(pa); j++) { |
---|
460 | if ((j>=st)&(j<=en)){ |
---|
461 | ti=timer; |
---|
462 | //pararg[j]=list(propagator(G,pa[j])); |
---|
463 | re[j]=gromovWitten(propagator(P,pa[j])); |
---|
464 | ti=timer-ti; |
---|
465 | if (vb>0){print(string(j)+" / "+string(size(pa))+" "+string(pa[j])+" "+string(re[j])+" "+string(sum(re))+" "+string(ti));} |
---|
466 | } else {re[j]=s;} |
---|
467 | } |
---|
468 | //list re = parallelWaitAll("gromovWitten", pararg, list(list(list(2)))); |
---|
469 | return(re); |
---|
470 | } |
---|
471 | example |
---|
472 | { "EXAMPLE:"; echo=2; |
---|
473 | ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; |
---|
474 | 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))); |
---|
475 | partitions(6,2); |
---|
476 | computeGromovWitten(G,2,3,7); |
---|
477 | computeGromovWitten(G,2,3,7,1); |
---|
478 | } |
---|
479 | |
---|
480 | |
---|
481 | proc sum(list L) |
---|
482 | "USAGE: sum(L); L list@* |
---|
483 | ASSUME: L is a list of things with the binary operator + defined.@* |
---|
484 | RETURN: The sum of the elements of L. |
---|
485 | THEORY: Sums the elements of a list. |
---|
486 | |
---|
487 | Eventually this will be deleted and become a more efficient kernel function.@* |
---|
488 | |
---|
489 | KEYWORDS: sum |
---|
490 | EXAMPLE: example sum; shows an example |
---|
491 | " |
---|
492 | { |
---|
493 | execute(typeof(L[1])+" s"); |
---|
494 | for(int j=1; j<=size(L); j++){ |
---|
495 | s=s+L[j]; |
---|
496 | } |
---|
497 | return(s);} |
---|
498 | example |
---|
499 | { "EXAMPLE:"; echo=2; |
---|
500 | list L = 1,2,3,4,5; |
---|
501 | sum(L); |
---|
502 | } |
---|
503 | |
---|
504 | |
---|
505 | |
---|
506 | proc generatingFunction(graph G, int d) |
---|
507 | "USAGE: generatingFunction(G, d); G graph, d int@* |
---|
508 | ASSUME: G is a Feynman graph, d a non-negative integer. The basering has one polynomial variable for each |
---|
509 | edge, and the coefficient ring has one rational variable for each vertex.@* |
---|
510 | RETURN: poly. |
---|
511 | THEORY: This function compute the multivariate generating function of all Gromov-Witten invariants up to |
---|
512 | degree d, that is, the sum of all gromovWitten(G,b)*q^b.@* |
---|
513 | |
---|
514 | KEYWORDS: generating function; Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers |
---|
515 | EXAMPLE: example generatingFunction; shows an example |
---|
516 | " |
---|
517 | { |
---|
518 | poly s =0; |
---|
519 | int j,jj; |
---|
520 | list pa,L; |
---|
521 | for (j=1; j<=d; j++){ |
---|
522 | pa = partitions(size(G.edges),j); |
---|
523 | L = computeGromovWitten(G,j,1,size(pa)); |
---|
524 | for (jj=1; jj<=size(pa); jj++) { |
---|
525 | s=s+L[jj]*monomial(pa[jj]); |
---|
526 | } |
---|
527 | } |
---|
528 | return(s);} |
---|
529 | example |
---|
530 | { "EXAMPLE:"; echo=2; |
---|
531 | ring R=(0,x1,x2),(q1,q2,q3),dp; |
---|
532 | graph G = makeGraph(list(1,2),list(list(1,2),list(1,2),list(1,2))); |
---|
533 | generatingFunction(G,3); |
---|
534 | } |
---|
535 | |
---|