/////////////////////////////////////////////////////////////////////////////// version="version ellipticcovers.lib 4.0.0.0 Dec_2013 "; category="Commutative algebra"; info=" LIBRARY: ellipticCovers.lib Gromov-Witten numbers of elliptic curves AUTHORS: J. Boehm, boehm @ mathematik.uni-kl.de A. Buchholz, buchholz @ math.uni-sb.de H. Markwig hannah @ math.uni-sb.de OVERVIEW: We implement a formula for computing the number of covers of elliptic curves. It has beed obtained by proving mirror symmetry for arbitrary genus by tropical methods in [BBM]. A Feynman graph of genus g is a trivalent, connected graph of genus g (with 2g-2 vertices and 3g-3 edges). The branch type b=(b_1,...,b_(3g-3)) of a stable map is the multiplicity of the the edge i over a fixed base point. Given a Feynman graph G and a branch type b, we obtain the number N_(G,b) of stable maps of branch type b from a genus g curve of topological type G to the elliptic curve by computing a path integral over a rational function. The path integral is computed as a residue. The sum of N_(G,b) over all branch types b of sum d gives N_(G,d)*|Aut(G)|, with the Gromov-Witten invariant N_(G,d) of degree d stable maps from a genus g curve of topological type G to the elliptic curve. The sum of N_(G,d) over all such graphs gives the usual Gromov-Witten invariant N_(g,d) of degree d stable maps from a genus g curve to the elliptic curve. The key function computing the numbers N_(G,b) and N_(G,d) is gromovWitten. REFERENCES: [BBM] J. Boehm, A. Buchholz, H. Markwig: Tropical mirror symmetry for elliptic curves, arXiv:1309.5893 (2013). KEYWORDS: tropical geometry; mirror symmetry; tropical mirror symmetry; Gromov-Witten invariants; elliptic curves; propagator; Feynman graph; path integral TYPES: graph PROCEDURES: makeGraph(list, list) generate a graph from a list of vertices and a lsit of edges printGraph(graph) print procedure for graphs propagator(list,int) propagator factor of degree d in the quotient of two variables, or propagator for fixed graph and branch type computeConstant(number, number) constant coefficient in the Laurent series expansion of a rational function in a given variable evalutateIntegral(number, list) path integral for a given propagator and ordered sequence of variables gromovWitten(number) sum of path integrals for a given propagator over all orderings of the variables, or Gromov Witten invariant for a given graph and a fixed branch type, or list of Gromov Witten invariants for a given graph and all branch types computeGromovWitten(graph, int, int) compute the Gromov Witten invariants for a given graph and some branch types generatingFunction (graph, int) multivariate generating function for the Gromov Witten invariants of a graph up to fixed degree partitions(int, int) partitions of an integer into a fixed number of summands permute(list) all permutations of a list lsum(list) sum of the elements of a list "; LIB "parallel.lib"; proc mod_init() { newstruct("graph","list vertices, list edges"); newstruct("Net","list rows"); system("install","graph","print",printGraph,1); system("install","Net","print",printNet,1); system("install","Net","+",catNet,2); } static proc catNet(Net N, Net M) { list L; list LN=N.rows; list LM=M.rows; int widthN=size(LN[1]); int widthM=size(LM[1]); int nm=max(size(LN),size(LM)); for (int j=1; j<=nm; j++) { if (j>size(LN)){LN[j]=emptyString(widthN);} if (j>size(LM)){LM[j]=emptyString(widthM);} L[j]=LN[j]+LM[j]; } Net NM; NM.rows=L; return(NM);} static proc netList(list L1) { Net N=net("["); for (int j=1; j<=size(L1)-1; j++) { N=N+net(L1[j])+net(", "); } N=N+net(L1[size(L1)])+net("]"); return(N); } static proc printNet(Net N) { list L = N.rows; for (int j=1; j<=size(L); j++) { print(L[j]); } } static proc net(def M){ if (typeof(M)=="list"){ return(netList(M)); } Net N; list L; L[1]=string(M); N.rows=L; return(N);} proc printGraph(graph G) "USAGE: printGraph(G); G graph@* ASSUME: G is a graph. THEORY: This is the print function used by Singular to print a graph. KEYWORDS: graph EXAMPLE: example printGraph; shows an example " { print(netList(G.edges)); print("Graph with "+string(size(G.vertices))+" vertices and "+string(size(G.edges))+" edges") } example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 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))); G; } proc makeGraph(list v, list e) "USAGE: makeGraph(v,e); v list, e list@* ASSUME: v is a list of integers, e is a list of two element lists of v. RETURN: graph with vertices v and edges e THEORY: Creates a graph from a list of vertices and edges. The vertices can be any type. KEYWORDS: graph EXAMPLE: example printGraph; shows an example " { graph G; G.vertices = v; G.edges = e; return(G); } example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 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))); G; } proc propagator(def xy, def d) "USAGE: propagator(xy,d); xy list, d int@* propagator(G,b); G graph, b list@* ASSUME: xy is a list of two numbers x and y in a rational function field, d non-negative integer.@* G is a Feynman graph, a is a list of integers of length equal to the number of edges of G.@* We assume that the coefficient ring has one rational variable for each vertex of G. RETURN: number, the propagator associated to the input data. THEORY: If xy and d are specified, then the function returns x^2*y^2/(x^2-y^2)^2) for d=0, which is a associated to an edge with vertices x and y not passing above the base point. 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, which is associated to an edge with vertices x and y passing with multiplicity d above the base point. Essentially the variables x and y stand for the position of the base points. In the second way of using this function, G is a Feynman graph and b is a branch type over a fixed base point of a cover with source G and target an elliptic curve. It returns the product of propagator(list(v[i],w[i]),b[i]) over all edges i with multiplicity b[i] over the base point and vertices v[i] and w[i]. KEYWORDS: elliptic curve EXAMPLE: example propagator; shows an example " { if ((typeof(xy)=="list")||(typeof(d)=="int")) { number x = xy[1]; number y = xy[2]; if (d<0) {ERROR("expected non-negative degree");} if (d==0) {return(x^2*y^2/(x^2-y^2)^2);} number p=0; for (int j=1; j<=d; j++){ if (d%j==0){p=p+(j*x^(4*j)+j*y^(4*j))/(x*y)^(2*j);} } return(p); } if ((typeof(xy)=="graph")||(typeof(d)=="list")) { list xl = ringlist(basering)[1][2]; list ed = xy.edges; number f=1; for (int j=1; j<=size(ed); j++){ execute("number xx1 = "+xl[ed[j][1]]); execute("number xx2 = "+xl[ed[j][2]]); f=f*propagator(list(xx1,xx2),d[j]); kill xx1; kill xx2; } return(f); } if ((typeof(xy)=="graph")||(typeof(d)=="int")) { } ERROR("wrong input type");} example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 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))); propagator(list(x1,x2),0); propagator(list(x1,x2),2); propagator(G,list(1,1,1,0,0,0)); } proc computeConstant(number f,number xx) "USAGE: computeConstant(f,x); f number, x number@* ASSUME: f is a number in a rational function field, x is a variable of the field.@* RETURN: number, the constant coefficient of the Laurent series of f in the variable x. THEORY: Computes the constant coefficient of the Laurent series by iterative differentiation. KEYWORDS: Laurent series EXAMPLE: example computeConstant; shows an example " { int tst=0; number ff=f; int k; int j; poly de; while (tst==0){ ff=f*xx^k; for (j=1; j<=k; j++){ ff=diff(ff,xx)/j; } de = subst(denominator(ff),xx,0); if (de!=0){ poly nu = subst(numerator(ff),xx,0); return(number(nu/de)); } k=k+1; } ERROR("error in computeConstant");} example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 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))); number P = propagator(G,list(1,1,1,0,0,0)); computeConstant(P,x2); } proc evaluateIntegral(number P, list xL) "USAGE: evaluateIntegral(P,xx); P number, xx list@* ASSUME: P is a number in a rational function field, xx is a list of variables of the field@* RETURN: number, the constant coefficient of the Laurent series of f in the variables in the list xx. THEORY: Computes the constant coefficient of the Laurent series iteratively for the elements of xx. In the setting of covers of elliptic curves this is the path integral over the propagator divided by the product of all variables (corresponding to the vertices) computed as a residue. KEYWORDS: residue; Laurent series EXAMPLE: example evaluateIntegral; shows an example " { number p = P; for(int j=1; j<=size(xL); j++){ p=computeConstant(p,xL[j]); } return(p);} example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 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))); number p = propagator(G,list(0,2,1,0,0,1)); evaluateIntegral(p,list(x1,x3,x4,x2)); } proc permute (list N) "USAGE: permute(N); N list@* ASSUME: N is a list@* RETURN: list with all permutations of N. THEORY: Computes all permutations of N. This will eventually be deleted and become a more efficient kernel function. KEYWORDS: permutations EXAMPLE: example permute; shows an example " { int i,j,k; list L,L1; if (size(N)==1){ return(list(N)); } else { k=1; for (i=1; i<=size(N); i++){ L=permute(delete(N,i)); for (j=1; j<=size(L); j++){ L1[k]=L[j]+list(N[i]); k=k+1; } } } return(L1);} example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2,x3,x4),(q),dp; permute(list(x1,x2,x3,x4)); } proc partitions(int n, int a) "USAGE: partitions(n,a); n int, a int@* ASSUME: n and a are positive integers@* RETURN: list of all partitions of a into n summands. THEORY: Computes all partitions of a into n summands. This may eventually be deleted and become a more efficient kernel function. KEYWORDS: partitions EXAMPLE: example partitions; shows an example " { ring R = 2,(x(1..n)),dp; ideal I = maxideal(a); list L; for (int j=1;j<=size(I);j++){ L[j]=leadexp(I[j]); } return(L);} example { "EXAMPLE:"; echo=2; partitions(3,7); } proc gromovWitten(def P,list #) "USAGE: gromovWitten(P); P number@* gromovWitten(G,d); G graph, d int@* gromovWitten(G,b); G graph, b list@* ASSUME: P is a propagator, or @* G is a Feynman graph and d a non-negative integer, or@* G is a Feynman graph and b is a list of integers of length equal to the number of edges of G@* We assume that the coefficient ring has one rational variable for each vertex of G.@* RETURN: Gromov-Witten invariant. THEORY: Computes @* - the Gromov-Witten invariant of a given propagator P, or @* - the invariant N_(G,d)*|Aut(G)| where d is the degree of the covering, or @* - the number N_(G,b) of coverings with source G and target an elliptic curves with branch type a over a fixed base point (that is, the i-th edge passes over the base point with multiplicity b[i]).@* KEYWORDS: Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers EXAMPLE: example gromovWitten; shows an example " { if (typeof(P)=="number") { list xl = ringlist(basering)[1][2]; int j; for(j=1; j<=size(xl); j++){ execute("number n= "+xl[j]); xl[j]=n; kill n; } list pxl = permute(xl); number p = 0; for(j=1; j<=size(pxl); j++){ p=p+evaluateIntegral(P,pxl[j]); } return(p); } if (typeof(P)=="graph"){ if (size(#)>1){ return(gromovWitten(propagator(P,#))); } else { int d =#[1]; list pa = partitions(size(P.edges),d); list re; int ti; for (int j=1; j<=size(pa); j++) { ti=timer; re[j]=gromovWitten(propagator(P,pa[j])); ti=timer-ti; //print(string(j)+" / "+string(size(pa))+" "+string(pa[j])+" "+string(re[j])+" "+string(sum(re))+" "+string(ti)); } return(lsum(re)); } } } example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 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))); number P = propagator(G,list(0,2,1,0,0,1)); gromovWitten(P); gromovWitten(G,list(0,2,1,0,0,1)); gromovWitten(G,2); } proc computeGromovWitten(graph P,int d, int st, int en, list #) "USAGE: computeGromovWitten(G, d, st, en [, vb] ); G graph, d int, st int, en int, optional: vb int@* ASSUME: G is a Feynman graph, d a non-negative integer, st specified the start- and en the end partition in the list pa = partition(d). Specifying a positive optional integer vb leads to intermediate printout.@* We assume that the coefficient ring has one rational variable for each vertex of G.@* RETURN: list L, where L[i] is gromovWitten(G,pa[i]) and all others are zero. THEORY: This function does essentially the same as the function gromovWitten, but is designed for handling complicated examples. Eventually it will also run in parallel.@* KEYWORDS: Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers EXAMPLE: example computeGromovWitten; shows an example " { number s =0; list pararg; list re; list pa = partitions(size(P.edges),d); int vb=0; if (size(#)>0){vb=#[1];} int ti; if (vb>0){print(size(pa));} for (int j=1; j<=size(pa); j++) { if ((j>=st)&(j<=en)){ ti=timer; //pararg[j]=list(propagator(G,pa[j])); re[j]=gromovWitten(propagator(P,pa[j])); ti=timer-ti; if (vb>0){print(string(j)+" / "+string(size(pa))+" "+string(pa[j])+" "+string(re[j])+" "+string(lsum(re))+" "+string(ti));} } else {re[j]=s;} } //list re = parallelWaitAll("gromovWitten", pararg, list(list(list(2)))); return(re); } example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2,x3,x4),(q1,q2,q3,q4,q5,q6),dp; 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))); partitions(6,2); computeGromovWitten(G,2,3,7); computeGromovWitten(G,2,3,7,1); } proc lsum(list L) "USAGE: lsum(L); L list@* ASSUME: L is a list of things with the binary operator + defined.@* RETURN: The sum of the elements of L. THEORY: Sums the elements of a list. Eventually this will be deleted and become a more efficient kernel function.@* EXAMPLE: example lsum; shows an example " { execute(typeof(L[1])+" s"); for(int j=1; j<=size(L); j++){ s=s+L[j]; } return(s);} example { "EXAMPLE:"; echo=2; list L = 1,2,3,4,5; lsum(L); } proc generatingFunction(graph G, int d) "USAGE: generatingFunction(G, d); G graph, d int@* ASSUME: G is a Feynman graph, d a non-negative integer. The basering has one polynomial variable for each edge, and the coefficient ring has one rational variable for each vertex.@* RETURN: poly. THEORY: This function compute the multivariate generating function of all Gromov-Witten invariants up to degree d, that is, the sum of all gromovWitten(G,b)*q^b.@* KEYWORDS: generating function; Gromov-Witten invariants; elliptic curves; coverings; Hurwitz numbers EXAMPLE: example generatingFunction; shows an example " { poly s =0; int j,jj; list pa,L; for (j=1; j<=d; j++){ pa = partitions(size(G.edges),j); L = computeGromovWitten(G,j,1,size(pa)); for (jj=1; jj<=size(pa); jj++) { s=s+L[jj]*monomial(pa[jj]); } } return(s);} example { "EXAMPLE:"; echo=2; ring R=(0,x1,x2),(q1,q2,q3),dp; graph G = makeGraph(list(1,2),list(list(1,2),list(1,2),list(1,2))); generatingFunction(G,3); }