source: git/Singular/LIB/ellipticcovers.lib @ dc8eb2

spielwiese
Last change on this file since dc8eb2 was dc8eb2, checked in by Janko Boehm <boehm@…>, 11 years ago
fixed some minor bugs in ellipticcovers.lib
  • Property mode set to 100755
File size: 16.9 KB
Line 
1///////////////////////////////////////////////////////////////////////////////
2version="$Id$";
3category="Commutative Algebra";
4info="
5LIBRARY:  ellipticCovers.lib    Gromov Witten numbers of elliptic curves
6
7AUTHORS:  J. Boehm, boehm @ mathematik.uni-kl.de
8          A. Buchholz, buchholz @ math.uni-sb.de
9          H. Markwig   hannah @ math.uni-sb.de
10
11OVERVIEW:
12
13We implement a formula for computing the number of covers of elliptic curves.
14It has beed obtained by proving mirror symmetry
15for arbitrary genus by tropical methods in [BBM]. A Feynman graph of genus
16g is a trivalent, connected graph of genus g (with 2g-2 vertices
17and 3g-3 edges). The branch type b=(b_1,...,b_(3g-3)) of a stable map is the
18multiplicity of the the edge i over a fixed base point.
19
20Given a Feynman graph G and a branch type b, we obtain the number
21N_(G,b) of stable maps of branch type b from a genus g curve of topological type G
22to the elliptic curve by computing a path integral
23over a rational function. The path integral is computed as a residue.
24
25The sum of N_(G,b) over all branch types b of sum d gives the
26Gromov-Witten invariant N_(G,d) of degree d stable maps from a genus g curve
27of topological type G to the elliptic curve.
28
29The sum of N_(G,d) over all such graphs gives the usual Gromov-Witten invariant N_(g,d)
30of degree d stable maps from a genus g curve to the elliptic curve.
31
32The key function computing the numbers N_(G,b) and N_(G,d) is gromovWitten.
33
34References:
35
36[BBM] J. Boehm, A. Buchholz, H. Markwig: Tropical mirror symmetry for elliptic curves, arXiv *** (2013).
37
38KEYWORDS:
39
40tropical geometry; mirror symmetry; tropical mirror symmetry; Gromov-Witten invariants; elliptic curves; propagator; Feynman graph; path integral
41
42TYPES:
43
44graph
45
46PROCEDURES:
47
48makeGraph(list, list)                     generate a graph from a list of vertices and a lsit of edges
49printGraph(graph)                         print procedure for graphs
50propagator(list,int)                      propagator factor of degree d in the quotient of two variables, or
51                                          propagator for fixed graph and branch type
52computeConstant(number, number)           constant coefficient in the Laurent series expansion of a rational function in a given variable
53evalutateIntegral(number, list)           path integral for a given propagator and ordered sequence of variables
54gromovWitten(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
57computeGromovWitten(graph, int, int)      compute the Gromov Witten invariants for a given graph and some branch types
58generatingFunction (graph, int)           multivariate generating function for the Gromov Witten invariants of a graph up to fixed degree
59
60partitions(int, int)                      partitions of an integer into a fixed number of summands
61permute(list)                             all permutations of a list
62sum(list)                                 sum of the elements of a list
63
64";
65
66
67LIB "parallel.lib";
68
69
70proc mod_init()
71{
72newstruct("graph","list vertices, list edges");
73newstruct("Net","list rows");
74
75system("install","graph","print",printGraph,1);
76system("install","Net","print",printNet,1);
77system("install","Net","+",catNet,2);
78
79}
80
81
82static proc max(int n, int m){
83if (n>m){return(n);}
84return(m);}
85
86
87static proc catNet(Net N, Net M)
88{
89list L;
90list LN=N.rows;
91list LM=M.rows;
92int widthN=size(LN[1]);
93int widthM=size(LM[1]);
94int nm=max(size(LN),size(LM));
95for (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}
101Net NM;
102NM.rows=L;
103return(NM);}
104
105
106static 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
117static proc printNet(Net N)
118{
119list L = N.rows;
120for (int j=1; j<=size(L); j++)
121{
122   print(L[j]);
123}
124}
125
126static 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;
134return(N);}
135
136
137
138proc printGraph(graph G)
139"USAGE:  printGraph(G); G graph@*
140ASSUME:  G is a graph.
141THEORY:  This is the print function used by Singular to print a graph.
142KEYWORDS: graph
143EXAMPLE:  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}
149example
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
158proc makeGraph(list v, list e)
159"USAGE:  makeGraph(v,e); v list, e list@*
160ASSUME:  v is a list of integers, e is a list of two element lists of v.
161RETURN:  graph with vertices v and edges e
162THEORY:  Creates a graph from a list of vertices and edges. The vertices can be any type.
163KEYWORDS: graph
164EXAMPLE:  example printGraph; shows an example
165"
166{
167  graph G;
168  G.vertices = v;
169  G.edges = e;
170  return(G);
171}
172example
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
180proc propagator(def xy, def d)
181"USAGE:  propagator(xy,d); xy list, d int@*
182         propagator(G,b); G graph, b list@*
183ASSUME:  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.
186RETURN:  number, the propagator associated to the input data.
187THEORY:  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     
199KEYWORDS: propagator; elliptic curve
200EXAMPLE:  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  }
229ERROR("wrong input type");}
230example
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
243proc computeConstant(number f,number xx)
244"USAGE:  computeConstant(f,x); f number, x number@*
245ASSUME:  f is a number in a rational function field, x is a variable of the field.@*
246RETURN:  number, the constant coefficient of the Laurent series of f in the variable x.
247THEORY:  Computes the constant coefficient of the Laurent series by iterative differentiation.
248     
249KEYWORDS: Laurent series
250EXAMPLE:  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  }
270ERROR("error in computeConstant");}
271example
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
282proc evaluateIntegral(number P, list xL)
283"USAGE:  evaluateIntegral(P,xx); P number, xx list@*
284ASSUME:  P is a number in a rational function field, xx is a list of variables of the field@*
285RETURN:  number, the constant coefficient of the Laurent series of f in the variables in the list xx.
286THEORY:  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     
292KEYWORDS: residue; Laurent series
293EXAMPLE:  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  }
300return(p);}
301example
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
310proc permute (list N)
311"USAGE:  permute(N); N list@*
312ASSUME:  N is a list@*
313RETURN:  list with all permutations of N.
314THEORY:  Computes all permutations of N.
315
316         This will eventually be deleted and become a more efficient kernel function.
317     
318KEYWORDS: permutations
319EXAMPLE:  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   }
336return(L1);}
337example
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
345proc partitions(int n, int a)
346"USAGE:  partitions(n,a); n int, a int@*
347ASSUME:  n and a  are positive integers@*
348RETURN:  list of all partitions of a into n summands.
349THEORY:  Computes all partitions of a into n summands.
350
351         This may eventually be deleted and become a more efficient kernel function.
352     
353KEYWORDS: partitions
354EXAMPLE:  example partitions; shows an example
355"
356{
357ring R = 2,(x(1..n)),dp;
358ideal I = maxideal(a);
359list L;
360for (int j=1;j<=size(I);j++){
361  L[j]=leadexp(I[j]);
362}
363return(L);}
364example
365{ "EXAMPLE:"; echo=2;
366  partitions(3,7);
367}
368
369
370
371proc 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@*
375ASSUME:  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.@*
379RETURN:  Gromov-Witten invariant.
380THEORY:  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     
389KEYWORDS: Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers
390EXAMPLE:  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}
426example
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
438proc 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@*
440ASSUME:  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.@*
443RETURN:  list L, where L[i] is gromovWitten(G,pa[i]) and all others are zero.
444THEORY:  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     
447KEYWORDS: Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers
448EXAMPLE:  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}
471example
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
481proc sum(list L)
482"USAGE:  sum(L); L list@*
483ASSUME:  L is a list of things with the binary operator + defined.@*
484RETURN:  The sum of the elements of L.
485THEORY:  Sums the elements of a list.
486
487         Eventually this will be deleted and become a more efficient kernel function.@*
488     
489KEYWORDS: sum
490EXAMPLE:  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  }
497return(s);}
498example
499{ "EXAMPLE:"; echo=2;
500  list L = 1,2,3,4,5;
501  sum(L);
502}
503
504
505
506proc generatingFunction(graph G, int d)
507"USAGE:  generatingFunction(G, d); G graph, d int@*
508ASSUME:  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.@*
510RETURN:  poly.
511THEORY:  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     
514KEYWORDS: generating function; Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers
515EXAMPLE:  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  }
528return(s);}
529example
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
Note: See TracBrowser for help on using the repository browser.