source: git/Singular/LIB/ellipticcovers.lib @ 6391eb

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