-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpropagator.jl
85 lines (71 loc) · 2.97 KB
/
propagator.jl
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
@doc raw"""
constterm( x1::QQMPolyRingElem, x2::QQMPolyRingElem, N::Integer)
returns the constant term of the propagator
# Examples (without vertex contribution)
```julia
julia> R,x=polynomial_ring(QQ,:x=>1:2); # using Nemo.
julia> constterm(x[1],x[2],3)
3*x[1]^6 + 2*x[1]^5*x[2] + x[1]^4*x[2]^2
```
constterm(x1::QQMPolyRingElem, x2::QQMPolyRingElem, z1::QQMPolyRingElem, z2::QQMPolyRingElem,aa::Integer, N::Integer)
here `aa=1 ` is the order for sfunction series and `` N=\sum_{n=1}^{3g-3} a_i`` where ``a=[a_1,…,a_{3g-3}]`` is a branch type.
# Examples (with vertex contribution)
```julia
julia> R,x,z=polynomial_ring(QQ,:x=>1:2,:z=>1:2); # using Nemo.
julia> constterm(x[1],x[2],z[1],z[2],1,2)
1//18*x[1]^4*z[1]^2*z[2]^2 + 1//3*x[1]^4*z[1]^2 + 1//3*x[1]^4*z[2]^2 + 2*x[1]^4 + 1//576*x[1]^3*x[2]*z[1]^2*z[2]^2 + 1//24*x[1]^3*x[2]*z[1]^2 + 1//24*x[1]^3*x[2]*z[2]^2 + x[1]^3*x[2]
```
"""
function constterm(x1::QQMPolyRingElem, x2::QQMPolyRingElem, N::Integer)
p = 0
for i in 1:N
p = p + i * x1^(N + i) * x2^(N - i)
end
return p
end
function constterm(x1::QQMPolyRingElem, x2::QQMPolyRingElem, z1::QQMPolyRingElem, z2::QQMPolyRingElem, aa::Integer, N::Integer)
p = 0
for i in 1:N
S1 = sfunction(i * z1, aa)
S2 = sfunction(i * z2, aa)
p = p + S1 * S2 * i * x1^(N + i) * x2^(N - i)
end
return p
end
@doc raw"""
proterm( x1::QQMPolyRingElem, x2::QQMPolyRingElem, q::QQMPolyRingElem, a::Integer, N::Integer)
returns the non constant term of the propagator
# Examples (without vertex contribution)
```julia
julia> R,x,z=polynomial_ring(QQ,:x=>1:2,:q=>1:2); # using Nemo.
julia> proterm(x[1],x[2],q[1],1,2)
x[1]^3*x[2]*q[1]^2 + x[1]*x[2]^3*q[1]^2
```
# Examples (with vertex contribution)
proterm( x1::QQMPolyRingElem, x2::QQMPolyRingElem,z1::QQMPolyRingElem, z2::QQMPolyRingElem, q::QQMPolyRingElem, a::Integer,aa::Integer, N::Integer)
```julia
julia> R,x,q,z=polynomial_ring(QQ,:x=>1:2,:q=>1:2,:z=>1:2); # using Nemo.
julia> proterm(x[1],x[2],z[1],z[2],q[1],1,1,2)
1//576*x[1]^3*x[2]*q[1]^2*z[1]^2*z[2]^2 + 1//24*x[1]^3*x[2]*q[1]^2*z[1]^2 + 1//24*x[1]^3*x[2]*q[1]^2*z[2]^2 + x[1]^3*x[2]*q[1]^2 + 1//576*x[1]*x[2]^3*q[1]^2*z[1]^2*z[2]^2 + 1//24*x[1]*x[2]^3*q[1]^2*z[1]^2 + 1//24*x[1]*x[2]^3*q[1]^2*z[2]^2 + x[1]*x[2]^3*q[1]^2
```
"""
function proterm(x1::QQMPolyRingElem, x2::QQMPolyRingElem, q::QQMPolyRingElem, a::Integer, N::Integer)
p = 0
for w in 1:a
if a % w == 0
p = p + w * (x1^(N + w) * x2^(N - w) + x1^(N - w) * x2^(N + w)) * q^(2 * a)
end
end
return p
end
function proterm(x1::QQMPolyRingElem, x2::QQMPolyRingElem, z1::QQMPolyRingElem, z2::QQMPolyRingElem, q::QQMPolyRingElem, a::Integer, aa::Integer, N::Integer)
p = 0
for w in 1:a
if a % w == 0
S1 = sfunction(w * z1, aa)
S2 = sfunction(w * z2, aa)
p = p + S1 * S2 * w * (x1^(N + w) * x2^(N - w) + x1^(N - w) * x2^(N + w)) * q^(2 * a)
end
end
return p
end