// My precious functions // ===================== /* This function computes the PERIODIC contribution to Hilbert series of an isolated orbifold point 1/r(a,b..). It assumes that the univariate polynomial ring Q[t] is defined and that the input list L = [a1,a2,.. ] consists of coprime elements. */ function Pc(r,L) if &or[GreatestCommonDivisor([r,a]) ne 1 : a in L] // other mugtrap then error "Error: Not Coprime"; end if; A := (t^r-1) div (t-1); B := t*&*[1-t^i : i in L]; h_throwaway, al_throwaway, be := XGCD(A,B); return r*t*be; end function; function Pper(r,L) if &or[GreatestCommonDivisor([r,a]) ne 1 : a in L] // other mugtrap then error "Error: Not Coprime"; end if; A := (t^r-1) div (t-1); B := t*&*[1-t^i : i in L]; h_throwaway, al_throwaway, be := XGCD(A,B); return t*be/(1-t^r); end function; /* This function computes the GROWING contribution to Hilbert series of an isolated orbifold point 1/r(a,b..). It assumes that the univariate polynomial ring Q[t] is defined and that the input list L = [a1,a2,.. ] consists of coprime elements. */ function Pd(r,L) n := #L; f := (1-t)^(n+1)*Pc(r,L); return &+ [-Coefficient(f,k)*t^i where k is Min(i,n+1-i) : i in [1..n] ] / (1-t)^(n+1); end function; function Pa(n1,n2) /* Part I of Hilbert series of CY 3-fold depending on n1 = number of 1, n2 = number of 2. (1-t)^4*(1 + P1*t + P2*t^2) = (1 + a1*t + a2*t^2) mod t^3. where P1 is n1 and P2 is (n1 + 1 chews 2) + n2. */ a1 := n1-4; a2 := Binomial(n1+1,2) + n2 - 4*a1 - 10; return (1 + a1*t+ a2*t^2 + a1*t^3 + t^4)/(1-t)^4; end function; function PA(A) /* the same as Pa */ n1:= #[a : a in A | a eq 1]; n2:= #[a : a in A | a eq 2]; return Pa(n1,n2); end function; function Pb(B) S := [ FieldOfFractions(R) | 1/r*(1/(1-t^r)*Pc(r,L) + Pd(r,L)) where r is b[1] where L is b[2..#b] : b in B]; return &+S; end function; function P(d,A) return (1-t^d)/&*[1-t^i : i in A]; end function; /* Contr of a 1/r(1,r-1) curve Ga is a * t^3 * ((1-t^(r-2)) div (1-t)) * ((1-t^r) div (1-t)) - b * t^{r+1} all over the standard denom 1/&*[1-t^i : i in [1,1,r,r]]. Note the funny way of putting in the parameters: b = deg Ga and deg_Ga(E1-E{r-1}) = 2*r*a - 2*b. Comment. */ function Ppc(r,a,b) X := t^3*((1-t^(r-2)) div (1-t)) * ((1-t^r) div (1-t)); Y := -t^(r+1); denom := &*[1-t^i : i in [1,1,r,r]]; return (a*X+b*Y)/denom; end function; /* The contr of a curve of 1/2 of deg 1. (Multiply by deg Ga.) */ function Phalfc() return (-4*t^3)/&*[1-t^i : i in [1,1,2,2]]; end function; /* The contr of an emb 1/2r(1,1,2r-2). (Note the parameter is r.) */ function Pemb2(r) return -(r-1)/(4*r)*Phalfc() + &+[t^(2*i) : i in [2..r]]/&*[1-t^i: i in [1,1,2,2*r]]; end function; c2 := (-4*t^3)/&*[1-t^i : i in [1,1,2,2]]; c4 := (1/2*t^5 + t^4 + 1/2*t^3)/&*[1-t^i : i in [1,1,2,4]]; c6 := (2/3*t^7 + t^6 + 2/3*t^5 + t^4 + 2/3*t^3)/&*[1-t^i : i in [1,1,2,6]]; c8 := (3/4*t^9 + t^8 + 3/4*t^7 + t^6 + 3/4*t^5 + t^4 + 3/4*t^3)/ &*[1-t^i : i in [1,1,2,8]]; c10 := 1/10*(8*t^10+2*t^9+6*t^8+4*t^7 +4*t^6+6*t^5+2*t^4+8*t^3)/&*[1-t^i : i in [1,1,1,10]]; c12 := (5/6*t^13 + t^12 + 5/6*t^11 + t^10 + 5/6*t^9 + t^8 + 5/6*t^7 + t^6 + 5/6*t^5 + t^4 + 5/6*t^3)/&*[1-t^i : i in [1,1,2,12]]; c8125 := (-3/4*t^9+1/4*t^7-t^6+1/4*t^5-3/4*t^3)/&*[1-t^i : i in [1,1,1,8]]; c8125 eq 3/16*c2*(1+t) + (t^5-t^6+t^7)/&*[1-t^i : i in [1,1,1,8]]; c8233 := - 9/16*Phalfc() + (t^8-2*t^7+3*t^6-2*t^5+t^4)/&*[1-t^i : i in [1,1,2,8]]; c10136 := -1/10*(6*t^10+4*t^9-8*t^8+8*t^7+8*t^6 -8*t^5+4*t^4+6*t^3)/&*[1-t^i: i in [1,1,1,10]]; c10136 eq 3/20*c2 + (-t^4+t^5-t^7+t^9-t^10)/&*[1-t^i : i in [1,1,2,10]]; c10136 := 9/52*Phalfc() + (-t^10+t^9-t^7+t^5-t^4)/&*[1-t^i : i in [1,1,2,10]]; c10127 := (t^4+t^7+t^10)/&*[1-t^i : i in [1,1,2,10]]; c141310 := (t^15+t^13+t^12+2*t^9+t^6+t^5+t^3)/&*[1-t^i : i in [1,1,2,10]]; c14158 := (t^14+t^13+t^10+t^8+t^5+t^4)/&*[1-t^i : i in [1,1,2,14]]); c221912 := 5/11*Phalfc() + (-t^24+2*t^23+t^21-t^20+2*t^19+t^17-t^16+t^15 +t^13-t^12+t^11+2*t^9-t^8+t^7+2*t^5-t^4)/&*[1-t^i: i in [1,2,3,22]]; c201217 := - 11/40*Phalfc() + (-2*t^21-t^19-t^18-t^17-2*t^15-t^13-t^12 -t^11-2*t^9-t^7-t^6-t^5-2*t^3)/&*[1-t^i : i in [1,1,2,20]]; c3411023 := (t^34+t^33+t^32+t^30+t^29+t^28+t^26+t^23+t^22+t^20+t^19+ t^18+t^16+t^15+t^12+t^10+t^9+t^8+t^6+t^5+t^4)&*[1-t^i : i in [1,1,2,34]]; c4 := -1/8*c2 + (t^4)/&*[1-t^i: i in [1,1,2,4]]; c6 := -1/6*c2 + (t^4+t^6)/&*[1-t^i: i in [1,1,2,6]]; c8 := -3/8*c2 + (t^4+t^6+t^8)/&*[1-t^i: i in /[1,1,2,8]]; c10 := -1/5*c2 + (t^4+t^6+t^8+t^10)/&*[1-t^i: i in [1,1,2,10]]; c12 := -5/24*c2 + (t^4+t^6+t^8+t^10+t^12)/&*[1-t^i: i in [1,1,2,12]]; c18 := -2/9*c2 + (t^4 + t^6 + t^8 + t^10 + t^12 + t^14 + t^16 + t^18)/&*[1-t^i: i in [1,1,2,18]]; c2r := -(r-1)/(4*r)*c2 + &+[t^(2*i) : i in [2..r]]/&*[1-t^i: i in [1,1,2,2*r]]; -(r-1)/(4*r)*Phalfc() + (t^4-t^(2*r+2))/&*[1-t^i: i in [1,1,2,2,2*r]]; function Pc(r,L) if &or[GreatestCommonDivisor([r,a]) ne 1 : a in L] // other mugtrap then error "Error: Not Coprime"; end if; A := (t^r-1) div (t-1); B := t*&*[1-t^i : i in L]; h_throwaway, al_throwaway, be := XGCD(A,B); return r*t*be; end function; function Pper(r,L) if &or[GreatestCommonDivisor([r,a]) ne 1 : a in L] // other mugtrap then error "Error: Not Coprime"; end if; A := (t^r-1) div (t-1); B := t*&*[1-t^i : i in L]; h_throwaway, al_throwaway, be := XGCD(A,B); return t*be/(1-t^r); end function; /* This function computes the GROWING contribution to Hilbert series of an isolated orbifold point 1/r(a,b..). It assumes that the univariate polynomial ring Q[t] is defined and that the input list L = [a1,a2,.. ] consists of coprime elements. */ function Pd(r,L) n := #L; f := (1-t)^(n+1)*Pc(r,L); return &+ [-Coefficient(f,k)*t^i where k is Min(i,n+1-i) : i in [1..n] ] / (1-t)^(n+1); end function; function Ptot(r,L,k) if &or[GreatestCommonDivisor([r,a]) ne 1 : a in L] // other mugtrap then error "Error: Not Coprime"; end if; if (k + &+[i : i in L]) mod r ne 0 then error "Error: Canonical weight not compatible"; end if; A := (t^r-1) div (t-1); l:=Ceiling((k+#L+1)/2); if l ge 0 then B := t^l*&*[(1-t^i) div (1-t) : i in L]; h_throwaway, al_throwaway, be := XGCD(A,B); return t^l*be/((1-t)^#L*(1-t^r)); else // this is a kludge to avoid programming Laurent polynomials properly de := Ceiling(-l/r); m := l + de*r; B := t^m*&*[(1-t^i) div (1-t) : i in L]; h_throwaway, al_throwaway, be := XGCD(A,B); return t^m*be/((1-t)^#L*(1-t^r)*t^(de*r)); end if; end function; /* This function calculates the FRACTIONAL contribution of an isolated orbifold point 1/r(a1,.. an) on a polarised n-fold X with K_X = kA. The result has denom (1-t)^n*(1-t^r) and numerator a symmetric Laurent polynomial of symmetric degree c+n+r supported in [c/2, c/2+r). */ function Porb(r,L,k) if &or[GreatestCommonDivisor([r,a]) ne 1 : a in L] // other mugtrap then error "Error: Not Coprime"; end if; if (k + &+[i : i in L]) mod r ne 0 then error "Error: Canonical weight not compatible"; end if; A := (t^r-1) div (t-1); l:=Ceiling((k+#L+1)/2); de := Maximum(0,Ceiling(-l/r)); // this is a kludge to avoid programming Laurent polynomials properly m := l + de*r; B := t^m*&*[(1-t^i) div (1-t) : i in L]; h_throwaway, al_throwaway, be := XGCD(A,B); return t^m*be/((1-t)^#L*(1-t^r)*t^(de*r)); end function; // Test 1: when n = 1, this is just a translate of Scores(b/r). [Porb(13,[i],13-i) : i in [1..12]]; /* gives t^13/(t^14 - t^13 - t + 1), .. (t^13 + t^12 + t^11 + t^10 + t^9 + t^8 + t^7 + t^6 + t^5 + t^4 + t^3 + t^2)/(t^14 - t^13 - t + 1) */ // Test 2: PP(7,9,23) has 1/7(2,2), 1/9(7,5), 1/23(7,9) in k = -39 // and PP(3,4,5,7) has k = -19 Porb(7,[2,2],-39) + Porb(9,[5,7],-39) + Porb(23,[7,9],-39); $1 eq 1/&*[1-t^i : i in [7,9,23]]; Porb(3,[1,2,1],-19) + Porb(4,[3,1,3],-19) + Porb(5,[3,4,2],-19) + Porb(7,[3,4,5],-19); $1 eq 1/&*[1-t^i : i in [3,4,5,7]]; // Test 3: Fano with k = -2 PI := (1-2*t+t^2)/(1-t)^4; X := PI + Porb(5,[1,2,4],-2); X*&*[1-t^i: i in [1,1,2,3,4,5]]; // t^14 - t^8 - t^6 + 1