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

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