source: git/Singular/LIB/ellipticcovers.lib @ 30bd62

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