-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmultiloop_sunset_periods.sage
More file actions
93 lines (77 loc) · 2.39 KB
/
multiloop_sunset_periods.sage
File metadata and controls
93 lines (77 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Sagemath code for computing the holomorphic period for all the sunset and it Frobenius deformation
# here t=p2
# Compute the generalised Apéry numbers
def Apery(L, Nmax):
"""
For a given list
L=[l1,...,lmax]
Returns the coefficients of the Apéry sequence
(r1+r2+...+rmax)!^2/(r1!...rmax!)^2 (l1^2)^r1...(lmax^2)^rmax
up to the order (r1+r2+..+rmax)<=Nmax
"""
R.<x> = PolynomialRing(QQ)
P = R(1)
# Precompute factorials
facts = [factorial(n) for n in range(Nmax+1)]
for a in L:
Pa = R(0)
for k in range(Nmax+1):
Pa += (a^(2*k) / facts[k]^2) * x^k
P = (P * Pa).truncate(Nmax+1)
return [facts[n]^2 * P[n] for n in range(Nmax+1)]
# Compute the holomorphic period
def Period(L, Nmax):
"""
For a given list
L=[l1,...,lmax]
Returns the truncated holomorphic period
1/t* sum_{r1,...,rmax} (r1+r2+...+rmax)!^2/(r1!...rmax!)^2 (l1^2)^r1...(lmax^2)^rmax/t^(r1+...+rmax)
up to the order (r1+r2+..+rmax)<=Nmax
"""
# compute A_n
Avals = Apery(L, Nmax)
# Laurent polynomial ring in t
R = LaurentPolynomialRing(QQ, 't')
t = R.gen()
S = R(0)
for n in range(0, Nmax+1):
S += Avals[n] / t^(n+1)
return S
# Compute the local mirror coordinate
def Q(L, Nmax):
"""
For a given list
L=[l1,...,lmax]
Returns the truncated period for Q with
d log(Q)/dt = period(L,Nmax)
1/t exp( sum_{r1,...,rmax} (r1+r2+...+rmax)!^2/(r1!...rmax!)^2 (l1^2)^r1...(lmax^2)^rmax/t^(r1+..+rmax)/(r1+..+rmax))
up to the order (r1+r2+..+rmax)<=Nmax
"""
# compute A_n
Avals = Apery(L, Nmax)
# Laurent polynomial ring in t
R = LaurentPolynomialRing(QQ, 't')
t = R.gen()
S = R(0)
for n in range(1, Nmax+1):
S += Avals[n] / t^n/n
return exp(S)/t
# Compute R=log(Q)
def R(L, Nmax):
"""
For a given list
L=[l1,...,lmax]
Returns the truncated period for Q with
d Q/dt = period(L,Nmax)
-log(t)+ sum_{r1,...,rmax} (r1+r2+...+rmax)!^2/(r1!...rmax!)^2 (l1^2)^r1...(lmax^2)^rmax/t^(r1+..+rmax)/(r1+..+rmax)
up to the order (r1+r2+..+rmax)<=Nmax
"""
# compute A_n
Avals = Apery(L, Nmax)
# Laurent polynomial ring in t
R = LaurentPolynomialRing(QQ, 't')
t = R.gen()
S = R(0)
for n in range(1, Nmax+1):
S += Avals[n] / t^n/n
return -log(t)+S