-
Notifications
You must be signed in to change notification settings - Fork 9
/
FeynRul.m
420 lines (332 loc) · 11.4 KB
/
FeynRul.m
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
(* ::Package:: *)
(* ::Title:: *)
(*Package EFTofPNG version 0.99*)
(* ::Chapter:: *)
(*EFTofPNG: Feynman rules*)
(* ::Section::Closed:: *)
(*Copyright*)
(* ::Text:: *)
(*Copyright (C) 2017 Michele Levi*)
(*Copyright (C) 2017 Jan Steinhoff*)
(**)
(*This file is part of EFTofPNG.*)
(**)
(*EFTofPNG is free software: you can redistribute it and/or modify*)
(*it under the terms of the GNU General Public License as published by*)
(*the Free Software Foundation, either version 3 of the License, or*)
(*(at your option) any later version.*)
(**)
(*EFTofPNG is distributed with the intention of being widely useful,*)
(*but WITHOUT ANY WARRANTY; without even the implied warranty of*)
(*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the*)
(*GNU General Public License for more details.*)
(**)
(*You should have received a copy of the GNU General Public License*)
(*along with EFTofPNG. If not, see <http://www.gnu.org/licenses/>.*)
(* ::Section::Closed:: *)
(*xTensor setup*)
(* load xTensor package *)
Needs["xAct`xTensor`"];
(* generic number of spatial dimensions *)
DefConstantSymbol[d];
(* flat background spatial manifold *)
DefManifold[Mflat, d, {i, j, l, i1, i2, i3, i4}];
(* useful dimensional constants *)
dtld = d - 2;
cd = 2 * (d - 1) / dtld;
$PrePrint = ScreenDollarIndices;
(* d-dimensional Newton's constant *)
DefConstantSymbol[G];
(* only one metric per one manifold defined *)
(* there's an issue here with delta *)
DefMetric[+1, \[Delta][-i, -j], CD, {",", "\[PartialD]"}, FlatMetric->True];
(* time as worldline parameter *)
DefParameter[t];
(* metric as tensors on flat manifold *)
DefTensor[gtt[], {Mflat, t}];
DefTensor[guptt[], {Mflat, t}];
DefTensor[gt[i], {Mflat, t}];
DefTensor[gupt[i], {Mflat, t}];
DefTensor[g[-i, -j], {Mflat, t}, Symmetric[{-i, -j}]];
DefTensor[gup[i, j], {Mflat, t}, Symmetric[{i, j}]];
(* tetrads defined as mixed tensors *)
DefTensor[enn[], {Mflat, t}];
DefTensor[ein[i], {Mflat, t}];
DefTensor[eni[i], {Mflat, t}];
DefTensor[eij[i, j], {Mflat, t}];
(* Kaluza-Klein fields *)
DefTensor[\[Phi][], {Mflat, t}];
DefTensor[A[-i], {Mflat, t}];
DefTensor[\[Sigma][-i, -j], {Mflat, t}, Symmetric[{-i, -j}]];
DefTensor[\[Sigma]up[i, j], {Mflat, t}, Symmetric[{i, j}]];
DefTensor[det\[Gamma][], {Mflat, t}];
(* worldline tensors *)
DefConstantSymbol[m];
$Assumptions = {m > 0};
DefTensor[v[i], {Mflat, t}];
DefTensor[S[i, j], {Mflat, t}, Antisymmetric[{i, j}]];
DefTensor[St[i],{Mflat, t}];
DefTensor[a1[i],{Mflat, t}];
(* PN order parameter *)
DefConstantSymbol[
cInv, PrintAs -> "(\!\(\*SuperscriptBox[\(c\), \(-1\)]\))"
];
(* field counter parameter *)
DefConstantSymbol[Nf, PrintAs -> "(Nf)"];
(* ::Section::Closed:: *)
(*d + 1 independent of xTensor*)
(* Module with its local symbols used for dummy indices *)
Sumd1[a_][e_] := Module[{i}, ((e/.a -> i) + (e/.a -> n))];
(* recursive definition for more than 1 index to sum *)
Sumd1[a_, b__][e_] := Sumd1[b] [Sumd1[a][e]];
(* Christoffel symbol of 1st kind: all indices down *)
Chr1[a_, b_, c_] := 1/2 * (
Der[b] @ gd1[c, a] + Der[c] @ gd1[a, b] - Der[a] @ gd1[b, c]
);
(* Christoffel symbol of 2nd kind: 1st index up *)
Chr2[a_, b_, c_] := (
Module[{b1}, gd1[a, b1] * Chr1[-b1, b, c]//Sumd1[b1]]
);
Riem[c_, -a_, -c1_, -b_] := (
Der[-c1] @ Chr2[c, -a, -b] - Der[-b] @ Chr2[c, -a, -c1]
+ Module[{b1}, Sumd1[b1][(
Chr2[c, -b1, -c1] * Chr2[b1, -a, -b]
- Chr2[c, -b1, -b] * Chr2[b1, -a, -c1]
)]
]
);
(* ::Section::Closed:: *)
(*Split to d and 1 into xTensor*)
TodPlus1[e_] := e/.{
gd1[-n, -n] :> gtt[],
gd1[n, -n] :> 1,
gd1[n, n] :> guptt[],
gd1[-i_, -n] :> gt[-i],
gd1[-n, -j_] :> gt[-j],
gd1[i_, n] :> gupt[i],
gd1[n, j_] :> gupt[j],
gd1[-i_, n] :> 0,
gd1[n, -j_] :> 0,
gd1[i_, -n] :> 0,
gd1[-n, j_] :> 0,
gd1[-i_, -j_] :> g[-i, -j],
gd1[-i_, j_] :> -\[Delta][-i, j],
gd1[i_, -j_] :> -\[Delta][i, -j],
gd1[i_, j_] :> gup[i, j]
}/.{
ud1[n] :> 1,
ud1[i_] :> v[i],
ud1[-i_] :>v[-i],
Sd1[-n, -n] :> 0,
Sd1[-n, -i_] :> -St[-i],
Sd1[-i_, -n] :> St[-i] ,
Sd1[-i_, -j_] :> S[-i, -j]
}/.{
ed1[n, -n] :> enn[],
ed1[n, -i_] :> eni[-i],
ed1[i_, -n] :> ein[i],
ed1[i_, -j_] :> eij[i, -j]
}/.{
Der[-n] :> ParamD[t],
Der[n] :> ParamD[t],
Der[i_] :> CD[i]
};
(* ::Section::Closed:: *)
(*To KK*)
ToKK[e_] := e/.{
gtt[] :> Exp[2\[Phi][]],
gt[i_] :> -Exp[2\[Phi][]] * A[i],
g[i_, j_] :> (
-Exp[-2\[Phi][] / dtld] * (\[Delta][i, j]
+ \[Sigma][i, j]) + Exp[2\[Phi][]] * A[i] * A[j]
),
guptt[] :> (
Exp[-2\[Phi][]] - Exp[2\[Phi][] / dtld] * Scalar[(\[Delta][i, j]
+ \[Sigma]up[i, j]) * A[-i] * A[-j]]
),
gupt[i_] :> (
-Exp[2\[Phi][] / dtld] * Module[{j}, (\[Delta][i, j]
+ \[Sigma]up[i, j]) * A[-j]]
),
gup[i_, j_] :> -Exp[2\[Phi][] / dtld] * (\[Delta][i, j] + \[Sigma]up[i, j])
}/.{
\[Sigma]up[i_, j_] :> Module[{l}, -\[Sigma][i, j] + \[Sigma][i, l] * \[Sigma][-l, j]],
det\[Gamma][] :> (
1 + Scalar[\[Sigma][i, -i]] + 1/2 * Scalar[\[Sigma][i, -i]]^2
- 1/2 * Scalar[\[Sigma][-i, -j] * \[Sigma][i, j]]
)
}/.{
enn[] :> Exp[\[Phi][]],
ein[i_] :> 0,
eni[i_] :> -Exp[\[Phi][]] * A[i],
eij[i_, j_] :> Exp[-\[Phi][] / dtld] * (
Module[
{l}, \[Delta][i, j] + 1/2 * \[Sigma][i, j] - 1/8 * \[Sigma][i, l] * \[Sigma][-l, j]
]
)
};
(* ::Text:: *)
(*(* the inverse of \[Sigma]ij and det\[Gamma] are expanded to the specific desired order, *)
(* and in the spatial tetrad eij the symmetric root of \[Gamma]=\[Delta]+\[Sigma] is expanded *)
(* to the specific desired order, may be upgraded to exact definition *)*)
(* ::Section::Closed:: *)
(*To PN*)
ToPN[e_] := e/.{
\[Phi][] :> cInv^2 * \[Phi][],
A[i_] :> cInv^3 * A[i],
\[Sigma][i_, j_] :> cInv^4 * \[Sigma][i, j]
}/.{
v[i_] :> cInv * v[i],
S[i__] :> cInv * S[i],
St[i_] :> cInv^2 * St[i],
a1[i_] :> cInv^2 * a1[i]
}/.{
ParamD[p:t..][ex_] :> cInv^Length[{p}] * ParamD[p][ex]
};
PN[ord_][e_] := Series[e, {cInv, 0, ord}]//Normal;
CommuteParamD[e_] := e//.{
ParamD[t]@CD[i_] @ ex_ :> CD[i] @ ParamD[t] @ ex
};
SimpFast[e_] := e//CommuteParamD//ToCanonical;
Simp[e_] := Collect[e//SimpFast, {cInv, \[Phi][], \[Phi][]^_, Scalar[_]}, Simplify];
Contract[e_] := e//NoScalar//ContractMetric//PutScalar;
SetOptions[ContractMetric, {AllowUpperDerivatives -> True}];
(* ::Section::Closed:: *)
(*Field*)
NfCount[e_] := e/.{
\[Phi][] :> Nf * \[Phi][],
A[i_] :> Nf * A[i],
\[Sigma][i_, j_] :> Nf * \[Sigma][i, j]
};
NfSeries[ord_][e_] := Series[e//NfCount, {Nf, 0, ord}]//Normal;
NfInt[ord_][e_] := NfSeries[ord][e] - NfSeries[2][e]/.Nf -> 1;
FlipDer[e_] := e/.{
ParamD[t, t] @ (ex1_) * ex2_ :> -ParamD[t] @ ex1 * ParamD[t] @ ex2,
CD[i_] @ ParamD[t] @ (ex1_) * ex2_ :> -CD[i] @ ex2 * ParamD[t] @ ex1,
CD[i_] @ CD[j_] @ (ex1_) * ex2_ :> -CD[i] @ ex2 * CD[j] @ ex1
};
Sfieldint = (
-cInv^-4 / (16\[Pi] G) * Sqrt[Exp[-2(d / dtld - 1) * \[Phi][]] * det\[Gamma][]] * (
(gd1[a, c] * Riem[b, -a, -b, -c]//Sumd1[c, a, b])
- 1/2 * (
gd1[a, b1] * Chr1[-a, -b, -c] * gd1[b, c] * (
Chr1[-b1, -c1, -b2] * gd1[c1, b2]
)//Sumd1[a, b, c, b1, b2, c1]
)
)
//TodPlus1//SimpFast//ToKK//NoScalar//ToPN//PN[6]//Simp//NfInt[4]
//Expand//FlipDer//ContractMetric//PutScalar//Simp
);
(* total time derivatives can be added to simplify or modify form of
field part *)
TD = (
Module[{i, j}, cInv^6 / (16\[Pi] G) * ParamD[t][
-1/2 * A[i] * A[-i] * CD[-j][A[j]]
- 2 / (2 - d) * CD[-i][\[Phi][]] * A[-j] * \[Sigma][i, j]
+ 1 / (2 - d) * CD[-i][\[Phi][]] * A[i] * Scalar[\[Sigma][j, -j]]
]
]//SimpFast//FlipDer//Simp
);
SfieldintTD = (
(Sfieldint + TD)//SimpFast//NoScalar//Simp//Expand//ContractMetric
//PutScalar//Simp
);
(* ::Text:: *)
(*(* Pinv[i_, j_, k_, i1_] := 1/2( *)
(* delta[i, k] * delta[j, i1] + delta[i, i1] * delta[j, k] *)
(* - delta[i, j] * delta[k, i1]*)
(* ) *)
(* quadratic operator of the tensor field in action-does not depend on *)
(* the dimension d *) *)
(*(* P[i_, j_, k_, i1_] := 1/2( *)
(* delta[i, k] * delta[j, i1] + delta[i, i1] * delta[j, k] *)
(* + (2 - cd) * delta[i, j] * delta[k, i1]*)
(* )*)
(* projector-the inverse, giving the index structure of the propagtor of *)
(* the tensor field *) *)
(* ::Section::Closed:: *)
(*Mass*)
Swlmass = (
-m * cInv^-2 * Sqrt[gd1[-a, -b] * ud1[a] * ud1[b]//Sumd1[a, b]]
//TodPlus1//ToKK//ToPN//SimpFast//PN[6]//Contract//Simp
);
(* ::Section::Closed:: *)
(*Spin*)
SetOptions[MakeRule, MetricOn -> All];
(* why constant? only up to finite size effects *)
DefConstantSymbol[u];
Insertu[e_] := e/.u -> Swlmass / (-m * cInv^-2);
(* IndexSolve that follows, does not work on tensor with
contracted indices, so indices should be contracted first *)
CnnSSC = (
\[Delta][i, j] * (
Sumd1[a, b][Sd1[-j, -a] * ed1[a, -b] * ud1[b]]
+ u * Sd1[-j, -n]//TodPlus1//ToKK//ToPN
)//ContractMetric//Simp
);
(* insertu is not essential here *)
CnnRule = IndexSolve[CnnSSC == 0, St[i]]//Insertu;
InsertCnnSSC[e_] := e/.CnnRule;
(* Insertu is for the 2nd term here *)
spinv = (
cInv^-1 * (
(
-1/2 * Sd1[-a, -b] * ed1[b, -c] * gd1[c, b1] * (
Der[-c1] @ ed1[a,-b1]
- Sumd1[b2][Chr2[b2, -c1, -b1] * ed1[a, -b2]]
)* ud1[c1]//Sumd1[a, b, c, b1, c1]
)-(
Sd1[-a, -b] * ed1[b, -c] * ud1[c] * ed1[a, -b1] * (
Chr2[b1, -b2, -c1] * ud1[b2] * ud1[c1] / u^2
)//Sumd1[a, b, c, b1, b2, c1]
)
)//TodPlus1//SimpFast//ToKK//ToPN//InsertCnnSSC//Insertu//PN[7]
//Contract//Simp
);
Swlspin1 = (
spinv - (
cInv^-1 * a1[i] * ed1[a, -i] * Sd1[-a, -b] * ed1[b, -c] * (
ud1[c] / u^2
)//Sumd1[a, b, c]//TodPlus1//SimpFast//ToKK//ToPN//InsertCnnSSC
//Insertu//PN[7]
)//Contract//Simp
);
(* ::Section::Closed:: *)
(*Spin-Squared*)
SortCovDsStart[CD];
DefConstantSymbol[CES2];
DefTensor[s[i], {Mflat, t}];
ToSVec[e_] := e/.S[i_, j_] :> Module[{l}, epsilon\[Delta][i, j, l] * s[-l]];
(* ::Text:: *)
(*(* on this section the spin is not the local hatted one as assumed for *)
(* the linear in spin section, but to begin with, it is the general *)
(* covariant one *) *)
(* transforming to the local hatted spin *)
ToSHat[e_] := e/.Sd1[-a_, -b_] :> (
Sd1[-a, -b] - 1 / u^2 * Module[{c, c1}, (
Sd1[-a, -c] * ud1[c] * ud1[c1] * gd1[-c1, -b]
- Sd1[-b, -c] * ud1[c] * ud1[c1] * gd1[-c1, -a]
)//Sumd1[c, c1]]
);
ToSHLoc[e_] := e/.Sd1[-a_, -b_] :> Module[
{c, c1}, Sd1[-c, -c1] * ed1[c, -a] * ed1[c1, -b]//Sumd1[c,c1]
];
(* TermByTerm[transfo_][e_Plus] := Module[
{terms,result},terms=Expand[e];result=transfo/@terms], may speed it *)
Swlspin2 = (
1 / (2m) * Riem[c, -a, -b1, -b] * ud1[a] * ud1[b] / u * (
Sd1[-c, -b2] * gd1[b2, b3] * Sd1[-b3, -b4] * gd1[b4, b1]
)//Sumd1[a, b, c, b1, b2, b3, b4]//ToSHat//ToSHLoc//TodPlus1//ToKK
//ToPN//Insertu//InsertCnnSSC//PN[8]//Contract//Simp
);
Swlspin2vec = Swlspin2//ToSVec//Contract//Simp;
Swlspin2vec/.d -> 3;
(* ::Section:: *)
(*Cubic Spin*)
(* ::Section:: *)
(*Quartic Spin*)
(* ::Section::Closed:: *)
(*Export *)
SetDirectory[NotebookDirectory[]];
SfieldintTD >> "frules_field.dat.m";
Swlmass + Swlspin1 + CES2 * Swlspin2 >> "frules_wl.dat.m";