-
Notifications
You must be signed in to change notification settings - Fork 1
/
HardToSoft.m
2588 lines (1931 loc) · 95.7 KB
/
HardToSoft.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
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* ::Package:: *)
(* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ *)
(* :Title: HardToSoft *)
(*
This software is covered by the GNU General Public License 3.
Copyright (C) 2021-2023 Andreas Ekstedt
Copyright (C) 2021-2023 Philipp Schicho
Copyright (C) 2021-2023 Tuomas V.I. Tenkanen
*)
(* :Summary: Dimensonal reduction from hard to soft scale. *)
(* ------------------------------------------------------------------------ *)
(* ::Section::Closed:: *)
(*Help routines*)
(*
Rewrites short-hand constants with Lb and Lf.
*)
ReplaceLb={
Lbb->2Lb+2(12Log[Glaisher]-EulerGamma),
Lbbb->Lb/12+1/6(12Log[Glaisher]-EulerGamma),
LBF->5/2Lb-1/2Lf+2(12Log[Glaisher]-EulerGamma),
LFF->1/2Lf+3/2Lb+2(12Log[Glaisher]-EulerGamma),
LFB->Lb+Lf+2(12Log[Glaisher]-EulerGamma),
Lfff->1/2Lf-3/2Lb-2(12Log[Glaisher]-EulerGamma),
LbbM->2Lb+2(12Log[Glaisher]-EulerGamma)};
Contract[tensor1_,tensor2_,indices_]:=Activate @ TensorContract[
Inactive[TensorProduct][tensor1,tensor2], indices]
Contract[tensor1_,tensor2_,tensor3_,indices_]:=Activate @ TensorContract[
Inactive[TensorProduct][tensor1,tensor2,tensor3], indices]
Contract[tensor1_,tensor2_,tensor3_,tensor4_,indices_]:=Activate @ TensorContract[
Inactive[TensorProduct][tensor1,tensor2,tensor3,tensor4], indices]
(*
Trick to simplify tensors because Mathematica 13 sucks.
*)
SimplifySparse[s_SparseArray] := With[
{
elem =Simplify[s["NonzeroValues"]],
pos=s["NonzeroPositions"],
dim = Dimensions[s]
},
SparseArray[pos->elem,dim,0]
]
(*
Finds relations between parameters in two different basis.
*)
CompareInvariants[Tens1I_,Tens2I_]:=Module[{Tens1P=Tens1I,Tens2P=Tens2I},
Sol1=Flatten[Tens1P,{{3},{4},{1,2}}] . Flatten[Tens1P,{{1,2}}]//Normal;
Sol2=Flatten[Tens2P,{{3},{4},{1,2}}] . Flatten[Tens2P,{{1,2}}]//Normal//ReplaceAll[#,PrintIdentification[]]&;
dimHelp=Dimensions[Tens1P];
If[dimHelp[[1]]==dimHelp[[2]],
Sol3=TensorContract[Tens1P,{1,2}]//Normal;
Sol4=TensorContract[Tens2P,{1,2}]//Normal//ReplaceAll[#,PrintIdentification[]]&;
Sol5=Activate@TensorContract[Inactive@TensorProduct[Tens1P,Tens1P,Tens1P],{{2,5},{6,9},{10,1}}]//Normal;
Sol6=Activate@TensorContract[Inactive@TensorProduct[Tens2P,Tens2P,Tens2P],{{2,5},{6,9},{10,1}}]//Normal//ReplaceAll[#,PrintIdentification[]]&;
SolInvariants=Solve[Sol1==Sol2&&Sol3==Sol4&&Sol5==Sol6,Sol5//Variables][[1]];
,
SolInvariants=Solve[Sol1==Sol2,Sol1//Variables][[1]];
];
Return[SolInvariants]
];
(*
Comparing symbolic with numeric tensors
*)
CompareTensors[mat1I_,mat2I_]:=Module[{mat1P=mat1I,mat2P=mat2I},
VarMat1=#->RandomInteger[10000]&/@(Normal[mat1P]//Variables);
VarMat2=#->RandomInteger[10000]&/@(Normal[mat2P]//Variables);
mat1P=Normal[mat1P]/.VarMat1;
mat2P=Normal[mat2P]/.VarMat2;
Return[mat1P==mat2P]
];
(*
Creates tensors used in intermediate steps
*)
CreateHelpTensors[]:=Module[{},
(*Ahh, you were at my side, all along... My true mentor... My guiding moonlight...*)
If[verbose,Print["Creating Help Tensors"]];
(*Tensors that are built from two scalar-vector trillinear couplings*)
Habij=Contract[gvss,gvss,{{3,5}}]//Transpose[#,{1,3,2,4}]&//SimplifySparse;
Hg=TensorContract[Habij,{{3,4}}]//SimplifySparse;
\[CapitalLambda]g=TensorContract[Habij,{{1,2}}]//SimplifySparse;
HabijV=Habij+Transpose[Habij,{2,1,3,4}]//SparseArray//SimplifySparse;
(*Tensor that is built from two structure constants*)
GabcdV=gvvv . gvvv//SparseArray//SimplifySparse;
(*Tensor that is built from two fermion-vector trillinear couplings*)
HabIJF=Contract[gvff,gvff,{{3,5}}]//Transpose[#,{1,3,2,4}]&//SimplifySparse;
(*Tensors that is built from two Yukawa couplings*)
Ysij=Contract[Ysff,YsffC,{{2, 5},{3,6}}]//SimplifySparse;
YsijC=Contract[YsffC,Ysff,{{2, 5},{3,6}}]//SimplifySparse;
If[mode>=1,
(*Tensor that is built from two scalar quartics*)
\[CapitalLambda]\[Lambda] =Flatten[\[Lambda]4,{{1},{2},{3,4}}] . Flatten[\[Lambda]4,{1,2}]//SparseArray//SimplifySparse;
(*Invariant tensors built from two Yukawa couplings*)
YTemp=Ysff . Transpose[YsffC]//Transpose[#,{1,3,2,4}]&//Transpose[#,{1,2,4,3}]&//SimplifySparse;
YTempC=YsffC . Transpose[Ysff]//Transpose[#,{1,3,2,4}]&//Transpose[#,{1,2,4,3}]&//SimplifySparse;
Yhelp=Flatten[YTemp,{{1},{2},{3,4}}] . Flatten[YTemp,{4,3}]//SparseArray//SimplifySparse;
YhelpC=Flatten[YTempC,{{1},{2},{3,4}}] . Flatten[YTempC,{4,3}]//SparseArray//SimplifySparse;
];
];
(* ::Section::Closed:: *)
(*Pressure calculations*)
(*
Calculates the preassure in the soft theory. Only the preassure in the symmetric
phae is calculated.
*)
SymmetricPhaseEnergy[]:=Module[{},
(*
Counterterms are needed to calculate
SymmetricPhaseNLO and SymmetricPhaseNNLO
*)
CounterTerm[];
(*The minus signs is a convention to get the pressure*)
Tot={-SymmetricPhaseLO[],-SymmetricPhaseNLO[],-SymmetricPhaseNNLO[]};
SymmEnergy=Tot;
];
(*
Calculates the 1-loop pressure in the soft theory.
*)
SymmetricPhaseLO[]:=Module[{},
If[verbose,Print["Calculating Leading-Order \!\(\*SuperscriptBox[\(T\), \(4\)]\) Terms"]];
(*Scalar Contribution*)
TestQ=NumericQ[#]&/@Flatten[gvss]//Normal;
Test2=ConstantArray[True,Length[TestQ]];
(*This checks if the all scalar tensors are empty*)
If[TestQ==Test2,
If[CompareTensors[gvss,EmptyArray[{nv,nf,nf}]]&&CompareTensors[Ysff,EmptyArray[{ns,nf,nf}]]&&CompareTensors[\[Mu]ij,EmptyArray[{ns,ns}]]&&CompareTensors[\[Lambda]4,EmptyArray[{ns,ns,ns,ns}]]&&CompareTensors[\[Lambda]3,EmptyArray[{ns,ns,ns}]]&&CompareTensors[\[Lambda]1,EmptyArray[{ns}]],
ContriScalars=0;
,
ContriScalars=Sum[-( (\[Pi]^2)/90) T^4,{a,1,ns}];
];,
ContriScalars=Sum[-( (\[Pi]^2)/90) T^4,{a,1,ns}];
];
(*Vector contribution*)
(*This checks if the all vector tensors are empty*)
TestQ=NumericQ[#]&/@Flatten[{gvss,gvff}//Flatten[#,1]&]//Normal;
Test2=ConstantArray[True,Length[TestQ]];
If[TestQ==Test2,
If[CompareTensors[gvss,EmptyArray[{nv,nf,nf}]]&&CompareTensors[gvvv,EmptyArray[{nv,nv,nv}]]&&CompareTensors[gvff,EmptyArray[{nv,nf,nf}]],
ContriVectors=0;
,
ContriVectors=Sum[-( (\[Pi]^2)/90) T^4*2,{a,1,nv}];
];,
ContriVectors=Sum[-( (\[Pi]^2)/90) T^4*2,{a,1,nv}];
];
(*Fermion contribution*)
TestQ=NumericQ[#]&/@Flatten[gvff]//Normal;
Test2=ConstantArray[True,Length[TestQ]];
(*This checks if the all fermion tensors are empty*)
If[TestQ==Test2,
If[CompareTensors[gvff,EmptyArray[{nv,nf,nf}]]&&CompareTensors[Ysff,EmptyArray[{ns,nf,nf}]]&&CompareTensors[\[Mu]IJF,EmptyArray[{nf,nf}]],
ContriFermions=0;
,
ContriFermions=Sum[-7 \[Pi]^2/720 T^4*2*NFMat[[a,a]],{a,1,nf}];
];,
ContriFermions=Sum[-7 \[Pi]^2/720 T^4*2*NFMat[[a,a]],{a,1,nf}];
];
ToExpression[StringReplace[ToString[StandardForm[ContriScalars+ContriVectors+ContriFermions]],"DRalgo`Private`"->""]]
];
(*
Calculates the 2-loop pressure in the soft theory.
*)
SymmetricPhaseNLO[]:=Module[{},
If[verbose,Print["Calculating NLO \!\(\*SuperscriptBox[\(T\), \(4\)]\) Terms"]];
(*Follows Martin's notation arXiv:1808.07615*)
(*Contribution from two-loop diagrams*)
I1Temp=1/144 T^4;
Vss=1/8*I1Temp*TensorContract[\[Lambda]4,{{1,2},{3,4}}];
I1Temp=-(1/144) T^4;
Vssv=1/4I1Temp*Total[Flatten[gvss] Flatten[gvss]];
I1Temp=1/48 T^4;
Vvs=1/2*I1Temp*Total[Flatten[gvss] Flatten[gvss]];
I1Temp=3/64 T^4;
Vvv=1/4*I1Temp*Total[Flatten[gvvv] Flatten[gvvv]];
I1Temp=-(13/192) T^4;
Vvvv=1/12*I1Temp*Total[Flatten[gvvv] Flatten[gvvv]];
I1Temp=1/288 T^4;
Vggv=1/4*I1Temp*Total[Flatten[gvvv] Flatten[gvvv]];
I1Temp=5/576 T^4;
VFFs=1/2*I1Temp*TensorContract[Ysij,{{1,2}}];
(*Generic nF modification*)
HabIJFnF=HabIJF . NFMat;
(************************)
I1Temp=5/288 T^4;
VFFv=1/2*I1Temp*TensorContract[HabIJFnF,{{1,2},{3,4}}];
(*Contributions from mass-insertions in one-loop diagrams*)
ContriMass=1/2Tr[\[Mu]ij]*T^2/12;
ContriMassFermion=1/2*T^2/12 Tr[\[Mu]IJF . \[Mu]IJFC];
If[mode>=3,
(*Contribution from higher-dimensional operators*)
VSS\[Lambda]6=1/82944*T^6*TensorContract[\[Lambda]6,{{1,2},{3,4},{5,6}}];
,
VSS\[Lambda]6=0;
];
ToExpression[StringReplace[ToString[StandardForm[ContriMass+ContriMassFermion+Vss+Vssv+Vvs+Vvv+Vvvv+Vggv+VFFs+VFFv+VSS\[Lambda]6//FullSimplify]],"DRalgo`Private`"->""]]
];
(*
Calculates the 3-loop pressure in the soft theory.
*)
SymmetricPhaseNNLO[]:=Module[{},
If[verbose,Print["Calculating NNLO \!\(\*SuperscriptBox[\(T\), \(4\)]\) Terms"]];
(*From the fish to you.*)
\[Kappa]=1/(16 \[Pi]^2);
I1=T^2/(12 \[Epsilon])+T^2 Lbbb;
I2M2=T^2/(24 )(-1/\[Epsilon]- 12Lbbb+2);
I1I2=\[Kappa] T^2/(12 \[Epsilon]b);
dI1I2=3\[Kappa] T^2/(12 \[Epsilon]b)-\[Kappa] T^2/6;
I211M020=T^2/(192 \[Pi]^2);
I2M2I2=T^2/(192 \[Pi]^2)-T^2/(384 \[Pi]^2 \[Epsilon]bbM);
I3M2I1=T^2/(768 \[Pi]^2 \[Epsilon]bbM)+T^2/(384 \[Pi]^2);
Clear[LbbM];
I1p=T^2/(12 )+\[Epsilon] T^2 Lbbb;
I3M2p=1/(64 \[Pi]^2 \[Epsilon]bp)+1/(32 \[Pi]^2);
I2p=1/(16 \[Pi]^2 \[Epsilon]bp);
I4M4p=1/(128 \[Pi]^2 \[Epsilon]bp)+1/(48 \[Pi]^2);
I2M2p=-T^2/24+T^2 (((-1/24)LbbM - (-1)*1/24 Lb )+1/12)\[Epsilon];
IF1p=-T^2/(24)+1/24 T^2 Lfff \[Epsilon];
IF2p=1/(16 (\[Pi]^2) ) (1/\[Epsilon]+Lf);
IF3M2p=1/(64 \[Pi]^2)(1/\[Epsilon]+Lf+2);
IF2M2p=(-T^2/24-T^2 1/48* Lfff)\[Epsilon]+T^2/48;
(*These integrals are given in 9408276 and 9410360*)
EPre=1/(24*16 \[Pi]^2) T^4*(\[Mu]/(4 \[Pi] T))^(6 \[Epsilon]) (1/\[Epsilon]+91/15+8( Derivative[1][Zeta][-1])/Zeta[-1]-2 Derivative[1][Zeta][-3]/Zeta[-3]);
Series[EPre,{\[Epsilon],0,0}]//Normal//FullSimplify;
M00=Series[EPre,{\[Epsilon],0,0}]//Normal;
LInt=(T^4 Log[Glaisher])/(48 \[Pi]^2)+(T^4 Log[\[Mu]^2])/(768 \[Pi]^2)+T^4/(2304 \[Pi]^2 \[Epsilon])+(EulerGamma T^4)/(1152 \[Pi]^2)-(T^4 Log[\[Pi] T])/(384 \[Pi]^2)-(T^4 Log[2])/(192 \[Pi]^2);
EFPre=1/(96*16 \[Pi]^2) T^4*(\[Mu]/(4 \[Pi] T))^(6 \[Epsilon]) (1/\[Epsilon]+173/30-42/5 Log[2]+8( Derivative[1][Zeta][-1])/Zeta[-1]-2 Derivative[1][Zeta][-3]/Zeta[-3]);
EFInt=Series[EFPre,{\[Epsilon],0,0}]//Normal//FullSimplify//Expand;
N00=EFInt;
MF1M1=Series[-1/(192*16 \[Pi]^2) T^4*(\[Mu]/(4 \[Pi] T))^(6 \[Epsilon]) (1/\[Epsilon]+361/60+76/5 Log[2]+6EulerGamma-4( Derivative[1][Zeta][-1])/Zeta[-1]+4Derivative[1][Zeta][-3]/Zeta[-3]),{\[Epsilon],0,0}]//Normal;
MF00=Series[-1/(192*16 \[Pi]^2) T^4*(\[Mu]/(4 \[Pi] T))^(6 \[Epsilon]) (1/\[Epsilon]+179/30-34/5 Log[2]+8( Derivative[1][Zeta][-1])/Zeta[-1]-2Derivative[1][Zeta][-3]/Zeta[-3]),{\[Epsilon],0,0}]//Normal;
MFM2P2=Series[-29/(1728*16 \[Pi]^2) T^4*(\[Mu]/(4 \[Pi] T))^(6 \[Epsilon]) (1/\[Epsilon]+89/29-90/29 Log[2]+48/29EulerGamma+136/29( Derivative[1][Zeta][-1])/Zeta[-1]-10/29Derivative[1][Zeta][-3]/Zeta[-3]),{\[Epsilon],0,0}]//Normal;
N2M2=Series[1/(108*16 \[Pi]^2) T^4*(\[Mu]/(4 \[Pi] T))^(6 \[Epsilon]) (1/\[Epsilon]+35/8+3/2EulerGamma-63/10 Log[2]+5( Derivative[1][Zeta][-1])/Zeta[-1]-1/2Derivative[1][Zeta][-3]/Zeta[-3]),{\[Epsilon],0,0}]//Normal;
MP2M2=Series[11/(216*16 \[Pi]^2) T^4*(\[Mu]/(4 \[Pi] T))^(6 \[Epsilon]) (1/\[Epsilon]+73/22+12/11EulerGamma+64/11( Derivative[1][Zeta][-1])/Zeta[-1]-10/11Derivative[1][Zeta][-3]/Zeta[-3]),{\[Epsilon],0,0}]//Normal;
(*Note that some contractions are inefficent. Will fix later but they are anyway not bottlenecks*)
(*The names of all diagrams follow Martin's notation arXiv:1709.02397*)
(*
Pure Scalar
*)
Temp=TensorContract[\[Lambda]4,{3,4}];
I1Temp=-LInt;
LSSSS=1/16 *I1Temp*Activate@TensorContract[Inactive@TensorProduct[Temp,Temp],{{1,3},{2,4}}];
I1Temp=-M00;
ESSSS=1/48I1Temp*TensorContract[\[CapitalLambda]\[Lambda],{{1,3},{2,4}}];
(*
Scalar-Vector
*)
I1Temp=1/2Activate@TensorContract[Inactive@TensorProduct[\[CapitalLambda]g,\[Lambda]4],{{1,3},{2,4},{5,6}}];
LSSVS=I1Temp/2*D I1p^2 I2p;
I1Temp= 1/2Activate@TensorContract[Inactive@TensorProduct[\[CapitalLambda]g,\[Lambda]4],{{1,3},{2,4},{5,6}}];
JSSVSS=-1/2I1Temp I1p^2 I2p;
(*
Yukawa-Scalar
*)
Temp1=Activate@TensorContract[Inactive@TensorProduct[Ysij,Ysij],{{1,3},{2,4}}]+Activate@TensorContract[Inactive@TensorProduct[Ysij,YsijC],{{1,3},{2,4}}];
KSSFFFF=-Temp1/8*(4*IF1p^2 I2p + N00);
Help1=Activate@TensorContract[Inactive@TensorProduct[Ysff,YsffC],{{1,4},{3,5}}];
Temp1=Activate@TensorContract[Inactive@TensorProduct[Help1,Help1],{{1,4},{2,3}}];
KFFSFSF=-1/2*(-1)*Temp1*( MF1M1+ MF00+(I1p-IF1p)^2 IF2p);
(*
Yukawa-Scalar \[Lambda]
*)
help1=TensorContract[\[Lambda]4,{{3,4}}];
help2=Activate@TensorContract[Inactive@TensorProduct[Ysff,YsffC],{{2,5},{3,6}}]//SparseArray;
Temp1=Activate@TensorContract[Inactive@TensorProduct[help1,help2],{{1,3},{2,4}}];
JSSFFS=1/4*2Temp1*I1p IF1p I2p;
(*
Yukawa-Vector
*)
Temp1=Activate@TensorContract[Inactive@TensorProduct[Ysij,\[CapitalLambda]g],{{1,3},{2,4}}];
KSSSVFF=-Temp1/2*2*(MF00-I1p IF1p I2p);
JSSFFV=-Temp1*D I1p IF1p I2p/.D->4-2\[Epsilon];
Help1=Flatten[Ysff,{{3},{1,2}}] . Flatten[YsffC,{1,2}];
Temp1=Total[Flatten[TensorContract[HabIJF,{1,2}]]Flatten[Help1]];
KFFFSVF=Temp1/2(2D-4)(MF1M1+MF00+(I1p-IF1p)^2 IF2p)/.D->4-2\[Epsilon];
Help1=Transpose[Transpose[gvff,{2,1,3}],{1,3,2}] . gvff;
Help2=Transpose[Transpose[Ysff,{2,1,3}],{1,3,2}] . YsffC;
Temp1=Total[Flatten[Help1]Flatten[Help2,{4,1,3,2}]];
HFFSVFF=Temp1/2*((2D-4)MF00+(3-D)N00)/.D->4-2\[Epsilon];
Help1=Flatten[TensorProduct[YsffC,Ysff],{{2},{3},{5},{6},{1,4}}] . Flatten[gvss,{2,3}];
Temp1=-I Flatten[Help1,{{1,4},{5,2,3}}] . Flatten[gvff]//Tr[#]&//Simplify;
HSSFVFF=Temp1*(MF00);
(*
Fermion-Vector
*)
(*General nF modification*)
gvffnF=gvff . NFMat;
(***********)
Help1=Flatten[HabIJF,{{1},{2},{4,3}}] . Flatten[gvffnF,{2,3}];
Temp1=6*I/3*Total[Flatten[Help1]Flatten[gvvv]];
HFFFVVV=1/2(D-2)Temp1 MF00/.D->4-2\[Epsilon];
(*General nF modification*)
gvffnF=gvff . NFMat;
(***********)
Temp1=8*1/4Sum[Tr[gvffnF[[a]] . gvff[[b]] . gvff[[a]] . gvff[[b]]],{a,1,nv},{b,1,nv}]//Simplify//Expand;
HFFVVFF=1/8*(D-2)*(2*(4-D)*MF00+(D-6)N00)*Temp1/.D->4-2\[Epsilon];
GabV=TensorContract[GabcdV,{{2,4}}]//SparseArray;
(*General nF modification*)
HabIJFnF=HabIJF . NFMat;
(***********)
Temp1=-4*1/4*Tr[Flatten[GabV] . Flatten[HabIJFnF,{1,2}]];
KGaugeFF=-1/2*Temp1*(D-2)*(2 MFM2P2+MF00+2(D-6)IF1p I2p I1p)/.D->4-2\[Epsilon];
(*General nF modification*)
HabIJFnF=HabIJF . NFMat;
(***********)
Help1=TensorContract[HabIJFnF,{3,4}]//SparseArray;
Temp1=-1*Flatten[Help1] . Flatten[Help1];
KVVFFFF=Temp1/4*(4N2M2+(D-4)N00-4(6-D)IF1p^2 I2p)/.D->4-2\[Epsilon];
(*General nF modification*)
gvffNf=gvff . NFMat;
(***********)
Temp1=-1/2Sum[Tr[gvffNf[[a]] . gvff[[a]] . gvff[[b]] . gvff[[b]]],{a,1,nv},{b,1,nv}]//Simplify//Expand;
KFFFVVF=-(2-D)^2Temp1*(MF1M1+MF00+(IF1p-I1p)^2 IF2p)/.D->4-2\[Epsilon];
(*
Vector-Scalar
*)
Help1=Table[Tr[gvss[[a]] . gvss[[b]] . gvss[[c]]],{a,1,nv},{b,1,nv},{c,1,nv}]//SparseArray;
Temp1=-1*Total[Flatten[Help1]Flatten[gvvv]];
HSSSVVV=5/8Temp1 M00;
Temp1=-Sum[Tr[gvss[[a]] . gvss[[b]] . gvss[[a]] . gvss[[b]]],{a,1,nv},{b,1,nv}];
HSSVVSS=Temp1*5/8*M00;
Temp1=-1/2*Total[Flatten[HabijV]Flatten[HabijV]];
EVVSS=1/4 D Temp1*M00;
Temp1=-1/2Total[Flatten[HabijV]Flatten[HabijV]];
GSSVVS=-9/8*Temp1*M00;
GHelp=TensorContract[GabcdV,{2,4}];
Temp1=1/2Total[Flatten[GHelp]Flatten[Hg]];
KGaugeSS=Temp1/2*(2*(D-2)MP2M2-(D+2)/2M00-8(D-2)I1p^2 I2p);
KGaugeS=Temp1*(D-2)^2 I1p^2 I2p;
Temp1=-1/4Total[Flatten[Hg]Flatten[Hg]];
KVVSSSS=Temp1*1/4*(4MP2M2-M00+4(D-6)I1p^2 I2p);
Temp1=-1/2Total[Flatten[\[CapitalLambda]g]Flatten[\[CapitalLambda]g]];
JSSSVV=Temp1*(-D I1p^2 I2p+2 M00+1/2 I1p^2 I2p+D^2/2 I1p^2 I2p);
(*
Pure Vector
*)
Help1=Flatten[GabcdV,{{1},{3},{2,4}}] . Flatten[gvvv,{2,3}];
Temp1=-2*Total[Flatten[Help1]Flatten[gvvv]];
HGauge=SerEnergyHelp[(1/8*(5D-5-3/4)-1/16-1/32+3/16(D-1)*D-27/16*(D-1))*M00]*Temp1;
GHelp=TensorContract[GabcdV,{2,4}];
Temp1=-Total[Flatten[GHelp]Flatten[GHelp]];
KGauge=Temp1*SerEnergyHelp[1/4*((D-2)^2 MP2M2-((D+2)^2/4-4D)M00+(D-6)(D-2)^2 I1p^2 I2p)];
KGhost=-1/8 M00*Temp1;
(*
Fermion-Vector-Scalar
*)
(*General nF modification*)
HabIJFnF=HabIJF . NFMat;
(***********)
HFab=TensorContract[HabIJFnF,{{3,4}}];
Temp1=2*Total[Flatten[Hg]Flatten[HFab]];
KVVFFSS=-1/2*Temp1*(MFM2P2-1/2 MF00+(D-6)I1p IF1p I2p);
(*
Counter-Terms
*)
Temp=1/2*\[Gamma]ij . \[Lambda]4;
\[Lambda]4Eff=\[Epsilon]*Z\[Lambda]ijkl;
I1Temp=1/3 T^4 \[Epsilon] Log[Glaisher]+1/72 T^4 \[Epsilon] Log[\[Mu]^2]-1/36 T^4 \[Epsilon] Log[4 \[Pi] T]+T^4/144;
VssZ=1/8* \[Epsilon]^-1 I1Temp*TensorContract[\[Lambda]4Eff,{{1,2},{3,4}}];
V2SV=I1p^2 (D+\[Xi]-1)/.\[Xi]->1;
V2SSV=-I1p^2 (2 \[Xi]+1)/.\[Xi]->1;
V2VV=1/2 (2 (I1p (D+\[Xi]-2)+I2M2p (-\[Xi])+I2M2p) (I1p ((D+\[Xi]-2)D -2 \[Xi]+2)+D I2M2p (\[Xi]-1)))/(D-1)/.\[Xi]->1;
V2VVV=-((3 (I1p^2 (2 (D-2) \[Xi]^2+ (4 D-11) \[Xi] D+ (2 D-3)D+11 \[Xi]-1)-2 D I2M2p^2 (\[Xi]-1)^2+4 I1p I2M2p (\[Xi]-1)^2))/(2 (D-1)))/.\[Xi]->1;
V2ggV=2 1/4 I1p^2 (\[Xi]+1)/.\[Xi]->1;
V2FFV=-(D-2) IF1p (2 I1p-IF1p)/.\[Xi]->1;
V2FFS=IF1p (IF1p-2 I1p);
VssvZ=1/4(-1)*2/4V2SSV*TensorContract[Zgvvss,{{1,2},{3,4}}];
VvsZ=1/2*(-1)*2/4*V2SV*TensorContract[Zgvvss,{{1,2},{3,4}}];
Temp=2Total[Flatten[Zgvvv]Flatten[gvvv]];
VvvZ=1/4*\[Epsilon]^-1 V2VV*Temp;
VvvvZ=1/12*\[Epsilon]^-1 V2VVV*Temp;
VggvZ=1/4*\[Epsilon]^-1 V2ggV*Temp;
Temp=Flatten[ZYsij,{{1},{2,3}}] . Flatten[YsffC,{2,3}]+Flatten[Ysff,{{1},{2,3}}] . Flatten[ZYsijC,{2,3}];
VFFsZ=1/2*\[Epsilon]^-1 V2FFS*Tr[Temp];
(*General nF modification*)
gvffnF=gvff . NFMat;
(*************************)
Temp=Transpose[Zgvff . Transpose[gvffnF,{2,1,3}]+gvffnF . Transpose[Zgvff,{2,1,3}],{1,3,2,4}];
VFFvZ=1/2*\[Epsilon]^-1*V2FFV*Tr[Flatten[Temp,{{1,3},{2,4}}]];
(*
Contribution from Scalar Mass
*)
\[Lambda]Help=TensorContract[\[Lambda]4,{3,4}];
V\[Mu]SS=Tr[\[Lambda]Help . \[Mu]ij]/4* I1p I2p*(-1);
V\[Mu]FFS=-2*1/2 IF1p I2p*Tr[Ysij . \[Mu]ij]*(-1);
V\[Mu]SV=-2/4*(D-1)*Tr[\[Mu]ij . \[CapitalLambda]g]I2p I1p*(-1);
VLOtoNLOCT=-1/2Tr[\[Beta]mij]/2*I1p*\[Epsilon]^-1*(-1);
VLOtoNNLO=-1/4Tr[\[Mu]ij . \[Mu]ij]*1/(16 (\[Pi]^2) ) Lb*(-1);
ContriMass=VLOtoNNLO+ VLOtoNLOCT+V\[Mu]SS+V\[Mu]FFS+ V\[Mu]SV;
(*
Contribution from Fermion Mass
*)
VLOtoNNLOF=1/2*Tr[\[Mu]IJ . \[Mu]IJC . \[Mu]IJ . \[Mu]IJC]*1/(16 (\[Pi]^2) ) Lf;
(*Result*)
DiaCT=SerEnergyHelp[VssvZ+ VvsZ+ VssZ+ VvvZ+ VvvvZ+ VggvZ+ VFFsZ + VFFvZ]//Simplify;
DiaScalar\[Lambda]=SerEnergyHelp[LSSSS+ESSSS]//Simplify;
DiaScalarVector\[Lambda]=SerEnergyHelp[LSSVS+JSSVSS]//Simplify;
DiaYukawaScalar=SerEnergyHelp[KSSFFFF+KFFSFSF]//Simplify;
DiaYukawaScalar\[Lambda]=SerEnergyHelp[JSSFFS]//Simplify;
DiaYukawaVector=SerEnergyHelp[KSSSVFF+JSSFFV+KFFFSVF+HFFSVFF+HSSFVFF]//Simplify;
DiaFermionVector= SerEnergyHelp[ HFFFVVV+ HFFVVFF + KGaugeFF + KVVFFFF+ KFFFVVF]//Simplify;
DiaScalarVector=SerEnergyHelp[HSSSVVV+ EVVSS+ GSSVVS+ KGaugeSS+ KGaugeS+ KVVSSSS+ JSSSVV+ HSSVVSS]//Simplify;
DiaPureVector= SerEnergyHelp[HGauge+ KGauge+ KGhost]//Simplify;
DiaFermionScalarVector=SerEnergyHelp[KVVFFSS]//Simplify;
DiaFermionMass=VLOtoNNLOF;
DiaTot=VLOtoNNLOF+ContriMass+DiaCT+DiaFermionScalarVector+DiaPureVector+DiaScalarVector+DiaFermionVector+DiaYukawaVector+DiaYukawaScalar\[Lambda]+DiaScalar\[Lambda]+DiaScalarVector\[Lambda]+DiaYukawaScalar;
AE=Series[DiaTot/.D->4-2\[Epsilon]/.\[Epsilon]bp->(1/\[Epsilon]+Lb)^-1/.\[Epsilon]b->(1/\[Epsilon]+Lbb)^-1/.\[Epsilon]BF->(1/\[Epsilon]+LBF)^-1/.\[Epsilon]F->(1/\[Epsilon]+LFF)^-1/.\[Epsilon]FB->(1/\[Epsilon]+LFB)^-1/.\[Epsilon]bbM->(1/\[Epsilon]+LbbM)^-1/.ReplaceLb,{\[Epsilon],0,0}]//Normal;
ToExpression[StringReplace[ToString[StandardForm[Coefficient[Simplify[AE],\[Epsilon],0]]],"DRalgo`Private`"->""]]
];
(* ::Section::Closed:: *)
(*Scalar masses*)
(*
Calculates the 1-loop scalar mass in the soft theory.
*)
ScalarMass[]:=Module[{},
If[verbose,Print["Calculating 1-Loop Scalar Mass"]];
ContriSS=-T^2/(24)TensorContract[\[Lambda]4, {{3, 4}}]//SimplifySparse;
ContriVV=T^2/4 \[CapitalLambda]g;
(*Self-energy contribution*)
SelfEnergyFF=-T^2/(12);
ContriFF=1/2SelfEnergyFF( Ysij+YsijC)//SimplifySparse;
If[mode>=3,
(*Minus signs from the matching*)
ContriSS\[Lambda]6=T^4/1152*TensorContract[\[Lambda]6,{{1,2},{3,4}}];
aS3D=\[Mu]ij-ContriSS-ContriVV-ContriFF+ContriSS\[Lambda]6//Normal//FullSimplify//Expand;
,
(*Minus signs from the matching*)
aS3D=\[Mu]ij-ContriSS-ContriVV-ContriFF//Normal//FullSimplify//Expand;
];
];
(*
Scalar self-energy in the soft theory.
*)
ScalarSelfEnergy[]:=Module[{},
If[verbose,Print["Calculating Scalar-Field Renormalization"]];
(*Scalars are nice. I like scalars. They don't abuse me with twenty-index tensor integrals.*)
(*This is the reason why I never like to adjust prices*)
ContriVV=-3/(16 \[Pi]^2 )Lb \[CapitalLambda]g;
SelfEnergyFF=-Lf/(16 \[Pi]^2);
ContriFF=1/2SelfEnergyFF (( Ysij+YsijC));
ZijS=-ContriVV/2-ContriFF/2//SimplifySparse;
];
(*
Calculates the scalar mass to 2 loops in the soft theory
*)
ScalarMass2Loop[]:=Module[{},
If[verbose,Print["Calculating 2-Loop Scalar Mass"]];
(*Just temp variables. Except for all the way they're reused throughout the code.*)
(*Somebody should grant me some eys...*)
\[Kappa]=1/(16 \[Pi]^2);
I1I2=\[Kappa] T^2/(12 \[Epsilon]b);
dI1I2=3\[Kappa] T^2/(12 \[Epsilon]b)-\[Kappa] T^2/6;
I1=T^2/(12 \[Epsilon])+T^2 Lbbb;
I2I3m1=T^2/(512 \[Pi]^2 \[Epsilon]b)-T^2/(768 \[Pi]^2);
I1FI2F=-((T^2) /(384 \[Pi]^2))/\[Epsilon]F;
I1BI2F=((T^2) /(192 \[Pi]^2))/\[Epsilon]FB;
I1FI2B=-((T^2) /(384 \[Pi]^2))/\[Epsilon]BF;
I1FI2FD=(3-2\[Epsilon]F)I1FI2F;
I1BI2FD=(3-2\[Epsilon]FB)I1BI2F;
I1FI2BT1=I1FI2B(-4)-T^2/(96 \[Pi]^2);
I1F=-T^2/(24\[Epsilon])+1/24 T^2 Lfff; (*This one is my favorite*)
(*
The indexing of diagrams follow a genius-level system.
It is so genius, words can't properly describe it.
*)
Contri1=1/4 I1I2 Simplify[TensorContract[\[CapitalLambda]\[Lambda],{3,4}]];
Contri2=1/2 I1 *Flatten[\[Gamma]ij] . Flatten[\[Lambda]4,{1,2}];
Contri21=1/(16 \[Pi]^2)Lb *1/2 *Flatten[\[Mu]ij] . Flatten[\[Lambda]4,{1,2}];
Contri3=-1/2 I1 \[Epsilon] *TensorContract[Z\[Lambda]ijkl,{3,4}];
Contri31=-1/2 I1 *Flatten[\[Gamma]ij] . Flatten[\[Lambda]4,{1,2}];
Contri32=-1/4 I1 *(\[Gamma]ij . TensorContract[\[Lambda]4,{1,2}]+TensorContract[\[Lambda]4,{1,2}] . \[Gamma]ij);
Contri4=-1/2 dI1I2 *(Flatten[\[CapitalLambda]g] . Flatten[\[Lambda]4,{1,2}]);
Contri5=1/2 dI1I2 *Contract[Hg,HabijV, {{1,3},{2,4}}]//SimplifySparse;
Contri6= (3-2\[Epsilon]) I1 \[Epsilon]*1/2 TensorContract[Zgvvss,{1,2}];
Contri61=(3-2\[Epsilon]) I1*1/2*Contract[\[Gamma]ab,HabijV, {{1,3},{2,4}}]//SimplifySparse;
Contri62=(3-2\[Epsilon]) I1*1/2*(Contract[\[Gamma]ij,Habij, {{3,4},{2,5}}]+Contract[\[Gamma]ij,Habij, {{3,4},{2,6}}])//SimplifySparse;
Contri7=-1/2 I1 (3-2\[Epsilon])*Contract[\[Gamma]ab,HabijV,{{1,3},{2,4}}]//SimplifySparse;
Contri8=-1/2 I1I2*Contract[Hg,HabijV,{{1,3},{2,4}}]//SimplifySparse;
Contri9=T^2 1/4*(-1)*(9 /(8 \[Epsilon]b)-13 /8)1/(16 \[Pi]^2)Contract[GabcdV,HabijV,{{2,4},{1,5},{3,6}}]//SimplifySparse;
help=Contract[GabcdV,HabijV,{{1,5},{2,3},{4,6}}]//SimplifySparse;
Contri10=(I1I2/4)*help;
Contri11=T^2 (-1)1/4*(13/(24 \[Epsilon]b)-7/24)/(16 \[Pi]^2)*help;
Contri12= (-1/2)(-1)2(I1FI2F-I1BI2F)*(Flatten[TensorContract[YTemp,{1,2}]] . Flatten[YTemp,{4,3}]+Flatten[TensorContract[YTempC,{1,2}]] . Flatten[YTempC,{4,3}]);
Contri13= (-2 I1FI2B)*1/4*(Flatten[Ysij] . Flatten[\[Lambda]4,{1,2}]+Flatten[YsijC] . Flatten[\[Lambda]4,{1,2}]);
(*Kos, or some say Kosm*)
help1=Flatten[Ysff,{{1},{2,3}}] . Flatten[ZYsijC,{2,3}]+Flatten[YsffC,{{1},{2,3}}] . Flatten[ZYsij,{2,3}];
Contri14=I1F*(help1+Transpose[help1,{2,1}])//Simplify;
help1=Ysij . \[Gamma]ij;
Contri141=I1F (help1+Transpose[help1])//Simplify;
(*General nF modifcation*)
help=TensorContract[HabIJF . NFMat,{3,4}];
(**********************)
Contri15=2I1FI2BT1(-1)*1/4 *(Flatten[help] . Flatten[HabijV,{1,2}]);
help=TensorContract[HabIJF,{1,2}];
help2=Flatten[help] . Flatten[YTemp,{3,4}]+Flatten[help] . Flatten[YTempC,{3,4}];
Contri16=(-1)( I1FI2FD-I1BI2FD)(-1)*2/3(1-1 \[Epsilon]/3)*help2;
(*Self-energy contribution*)
ContriF=-(ZijS . aS3D+Transpose[ZijS . aS3D]);
(*Contribution from Cubics*)
ContriCubic=1/2*1/(16 \[Pi]^2)Lb Contract[\[Lambda]3,\[Lambda]3,{{2,5},{3,6}}]//SimplifySparse;
(*Contribution from Fermion Masses*)
Fac=1/(8 \[Pi]^2) Lf;
Temp1=Activate@TensorContract[Inactive@TensorProduct[Ysff,\[Mu]IJFC,\[Mu]IJFC,Ysff],{{2,4},{3,6},{5,9},{7,10}}]//Normal;
Temp1C=Activate@TensorContract[Inactive@TensorProduct[YsffC,\[Mu]IJF,\[Mu]IJF,YsffC],{{2,4},{3,6},{5,9},{7,10}}]//Normal;
ContriFFMass1=-1/2Fac*(Temp1+Temp1C)//Simplify//PowerExpand;
Temp1=Activate@TensorContract[Inactive@TensorProduct[Ysff,YsffC,\[Mu]IJFC,\[Mu]IJF],{{3,5},{2,7},{6,10},{8,9}}]//Normal;
Temp1C=Activate@TensorContract[Inactive@TensorProduct[YsffC,Ysff,\[Mu]IJF,\[Mu]IJFC],{{3,5},{2,7},{6,10},{8,9}}]//Normal;
ContriFFMass2=-Fac*(Temp1+Temp1C)//Simplify//PowerExpand;
(*Grant us eyes*)
\[Mu]SijNLO=SerEnergyHelp[ContriF//Normal]-SerEnergyHelp[ContriCubic//Normal]-SerEnergyHelp[(ContriFFMass1+ContriFFMass2)//Normal]-SerEnergyHelp[(Contri1+Contri2+Contri3+Contri31+ Contri32+Contri4+Contri5)//Normal]-SerEnergyHelp[(Contri6+Contri61+Contri62+Contri7+Contri8+ Contri9+ Contri10+ Contri11)//Normal]-SerEnergyHelp[(Contri21+Contri12+Contri13+ Contri14+ Contri141+ Contri15+ Contri16)//Normal]//Simplify;
];
(* ::Section::Closed:: *)
(*Temporal masses*)
(*
1-loop Debye mass in the soft theory.
*)
VectorMass[]:=Module[{},
If[verbose,Print["Calculating 1-Loop Vector Mass"]];
ContriSS=T^2/(12)*Hg;
ContriVV=T^2/(12)*Hg;
fac=T^2/24-T^2/4-1/2 T^2/4//Simplify;
ContriVVV=fac*TensorContract[GabcdV,{{2,4}}];
SelfEnergyFF=(-1)T^2/(6);
(*General nF modification*)
HabIJFnF=HabIJF . NFMat;
(************************)
ContriFF=SelfEnergyFF*Simplify[TensorContract[HabIJFnF,{{3,4}}]//Normal];
(*Minus sign due to matching*)
aV3D=-ContriSS- ContriVV- ContriVVV- ContriFF //Normal//FullSimplify//Expand;
];
(*
Vector self-energy in the soft theory.
*)
VectorSelfEnergy[]:=Module[{},
If[verbose,Print["Calculating Vector-Field Renormalization"]];
SelfEnergySS=-1/2*1/(16 \[Pi]^2)*(-1/3 Lb);
ContriSS=SelfEnergySS*Hg;
fac=1/(16 \[Pi]^2)(1/12 Lb+1/2(25/6Lb+2/3));
ContriVVV=fac*Simplify[TensorContract[GabcdV,{{2,4}}]];
SelfEnergyFF=(-1)(2/3 Lf)/(16 \[Pi]^2);
(*General nF modification*)
HabIJFnF=HabIJF . NFMat;
(************************)
ContriFF=SelfEnergyFF*Simplify[TensorContract[HabIJFnF,{{3,4}}]//Normal];
ZabT=-(ContriSS+ ContriVVV+ContriFF)/2//Normal//Simplify;(*Transverse vectors*)
SelfEnergySS=-1/2*1/(16 \[Pi]^2)*(-1)(1/3 Lb+2/3);
ContriSS=SelfEnergySS*Hg;
fac=1/(16 \[Pi]^2)(1/12 Lb+1/6 +1/2(25/6Lb- 3));
ContriVVV=fac*Simplify[TensorContract[GabcdV,{{2,4}}]];
SelfEnergyFF=(-1)(2/3 Lf-2/3)/(16 \[Pi]^2);
(*General nF modification*)
HabIJFnF=HabIJF . NFMat;
(************************)
ContriFF=SelfEnergyFF*Simplify[TensorContract[HabIJFnF,{{3,4}}]//Normal];
ZabL=-( ContriSS +ContriVVV+ContriFF)/2//Normal//Simplify;(*Temporal/Longitudional vectors*)
];
(*
Calculations of the 2-loop Debye mass in the soft theory.
*)
VectorMass2Loop[]:=Module[{},
If[verbose,Print["Calculating 2-Loop Debye Mass"]];
(*Using the result from 2302.04894 to make the result neater*)
(*General nF modification*)
gvffnF=gvff . NFMat;
(***********)
TrSS=Table[Tr[a . b],{a,gvss},{b,gvss}]//SparseArray;
TrFF=Table[Tr[a . b],{a,gvff},{b,gvffnF}]//SparseArray;
TrVV=Table[Tr[a . b],{a,gvvv},{b,gvvv}]//SparseArray;
Gabij=Table[a . b,{a,gvss},{b,gvss}]//SparseArray;
Gabcd= gvvv . gvvv//SparseArray;
GabIJ=Table[a . b,{a,gvff},{b,gvff}]//SparseArray;
GroupFacVVVV=-Flatten[Gabcd,{{1},{2,3,4}}] . Flatten[Gabcd,{1,3,2}];
GroupTheoryFacm2=Flatten[\[Mu]ij] . Flatten[Gabij,{3,4}];
GroupTheoryFac\[Lambda]=Flatten[TensorContract[\[Lambda]4,{{1,2}}]] . Flatten[Gabij,{3,4}];
GroupTheoryFacTrSSTrSS=TrSS . TrSS;
GroupTheoryFacSSSS=Table[Sum[Tr[c . d . a . a],{a,gvss}],{c,gvss},{d,gvss}];
GroupTheoryFacVVTrSS=Flatten[TrSS] . Flatten[Gabcd,{2,4}];
GroupTheoryFacTrVVTrSS=TrSS . TrVV+TrVV . TrSS;
GroupTheoryFacVVTrFF= Flatten[TrFF] . Flatten[Gabcd,{2,4}];
GroupTheoryFacTrVVTrFF=(TrFF . TrVV+TrVV . TrFF);
GroupTheoryFacFFFF= Table[Sum[Tr[a . a . c . d],{a,gvff}],{c,gvff},{d,gvffnF}]//SparseArray;
GroupFacTrSSTrFF=(TrSS . TrFF+TrFF . TrSS);
GroupTheoryFacTrFFTrFF=TrFF . TrFF;
GroupTheoryYuk1= Flatten[TensorContract[TensorProduct[Ysff,YsffC],{{1,4},{3,5}}]] . Flatten[GabIJ,{3,4}];
GroupTheoryYuk2=Flatten[Table[Tr[a . b+b . a],{a,Ysff},{b,YsffC}]//SparseArray] . Flatten[Gabij,{3,4}];
\[CapitalPi]V=GroupFacVVVV( T^2 (11Log[\[Mu]/(4 \[Pi] T)]+11EulerGamma-1/2)/(36 \[Pi]^2)+T^2/(12 \[Pi]^2));
\[CapitalPi]S=-GroupTheoryFac\[Lambda] T^2/(192 \[Pi]^2)-GroupTheoryFacm2/(8 \[Pi]^2)-GroupTheoryFacTrSSTrSS (T^2 (Log[\[Mu]/(4 \[Pi])]-Log[T]+EulerGamma+1))/(288 \[Pi]^2)+ GroupTheoryFacSSSS T^2/(32 \[Pi]^2) -(T^2 (Log[\[Mu]]-Log[T]+EulerGamma-Log[\[Pi]]-2 Log[2]))/(24 \[Pi]^2) GroupTheoryFacVVTrSS-GroupTheoryFacVVTrSS T^2/(48 \[Pi]^2)+(T^2 (8 Log[\[Mu]]-8 Log[T]+8 EulerGamma-3-8 Log[\[Pi]]-16 Log[2]))/(576 \[Pi]^2) GroupTheoryFacTrVVTrSS;
\[CapitalPi]F=(T^2 (Log[\[Mu]]-Log[T]+EulerGamma-Log[\[Pi]]-2 Log[2]))/(24 \[Pi]^2) GroupTheoryFacVVTrFF-(T^2 (2 Log[\[Mu]]-2 Log[T]+2 EulerGamma-1-2 Log[\[Pi]]))/(144 \[Pi]^2) GroupTheoryFacTrFFTrFF-(T^2 (2 Log[\[Mu]]-2 Log[T]+2 EulerGamma+3-2 Log[\[Pi]]-20 Log[2]))/(576 \[Pi]^2) GroupTheoryFacTrVVTrFF- GroupTheoryFacFFFF T^2/(16 \[Pi]^2)+ GroupTheoryFacVVTrFF T^2/(48 \[Pi]^2);
\[CapitalPi]SF=(T^2 (5 Log[\[Mu]/(4 \[Pi] T)]+5 EulerGamma-1+8 Log[2]))/(576 \[Pi]^2) GroupFacTrSSTrFF-1/(32 \[Pi]^2) T^2 GroupTheoryYuk1-T^2/(192 \[Pi]^2)GroupTheoryYuk2;
\[Mu]VabNLO=\[CapitalPi]V+\[CapitalPi]S+\[CapitalPi]F+\[CapitalPi]SF//Normal//Simplify//FullSimplify;
];
(* ::Section::Closed:: *)
(*Effective couplings*)
(*
Calculates non-abelian couplings from ghost-renormalization.
*)
NonAbelianCoupling[]:=Module[{},
fac=3/4 Lb/(16 \[Pi]^2);
ContriVVV=fac*Table[-Tr[a . b],{a,gvvv},{b,gvvv}]//SparseArray//SimplifySparse;
Zab\[Eta]=-1/2(ContriVVV);
ContriAnomVV= gvvv . ZabT+Zab\[Eta] . gvvv+Table[Zab\[Eta] . a,{a,gvvv}]//SparseArray;
Ggvvv=-ContriAnomVV;
];
(*
Calculates 1-loop scalar cubics in the soft theory.
*)
ScalarCubic[]:=Module[{},
If[verbose,Print["Calculating Scalar-Cubic Couplings"]];
(*Let's be honest, nobody cares about cubic couplings*)
SelfEnergySSC=1/(16 \[Pi]^2)Lb *1/2;
ContriSSCTemp=Contract[\[Lambda]4,\[Lambda]3, {{3, 5},{4,6}}];
ContriSSC=SelfEnergySSC(ContriSSCTemp+Transpose[ContriSSCTemp,{1,3,2}]+Transpose[ContriSSCTemp,{3,2,1}]);
(*Fermion mass contributions*)
Contri1=Table[Tr[a . \[Mu]IJFC . b . c],{a,Ysff},{b,Ysff},{c,YsffC}];
Contri2=Table[Tr[a . \[Mu]IJF . b . c],{a,YsffC},{b,YsffC},{c,Ysff}];
ContriFF=-1/(8 \[Pi]^2)Lf 3 Symmetrize[(Contri1+Contri2),Symmetric[{1,2,3}]];
(*Self-energy contribution*)
ContriSETemp=-ZijS . \[Lambda]3;
ContriSE=ContriSETemp+Transpose[ContriSETemp,{2,1,3}]+Transpose[ContriSETemp,{3,1,2}]//Simplify;
\[Lambda]3CS=-ContriSSC-ContriFF+ContriSE//Simplify;
];
(*
Calculates temporal-vector quartics ~(V^4). Note that all terms are finite.
*)
LongitudionalVVVV[]:=Module[{},
If[verbose,Print["Calculating Temporal-Vector Quartics"]];
(*
ContriSSSS is the sum of bubbles, triangles, and boxes with internal scalars.
*)
CouplingSSSS=-(1/(24 \[Pi]^2));
ContriSSSSTemp=Flatten[HabijV,{{1},{2},{3,4}}] . Flatten[HabijV,{3,4}];
Help=Simplify[ContriSSSSTemp+Transpose[ContriSSSSTemp,{1,3,2,4}]+Transpose[ContriSSSSTemp,{1,4,3,2}]]//SparseArray//SimplifySparse;
ContriSSSS=CouplingSSSS*Help//SparseArray;
CouplingVV=-(1/(6 \[Pi]^2));
ContriVVTemp=Flatten[GabcdV,{{1},{3},{2,4}}] . Flatten[GabcdV,{2,4}];
ContriVVTemp2=ContriVVTemp+Transpose[ContriVVTemp,{1,2,4,3}]//Simplify;
Help=Simplify[(ContriVVTemp2+Transpose[ContriVVTemp2,{1,3,2,4}]+Transpose[ContriVVTemp2,{1,4,3,2}])]//SparseArray//SimplifySparse;
ContriVV=CouplingVV*Help//SparseArray;
(*General nF modification*)
HabIJFnF=HabIJF . NFMat;
(************************)
(*
ContriFFFF is the sum of boxes with internal fermions.
*)
helpF=Flatten[HabIJFnF,{{1},{2},{3,4}}] . Flatten[Transpose[HabIJF,{1,2,4,3}],{3,4}]//SimplifySparse;
ContriFFFF=1/(3 \[Pi]^2)*(helpF+Transpose[helpF,{1,3,2,4}]+Transpose[helpF,{1,2,4,3}])//SparseArray;(*Check this one after changed*)
(* Minus sign from matching*)
\[Lambda]AA= -(ContriSSSS+ContriVV+ ContriFFFF )//SimplifySparse//SparseArray;
];
(*
Calculates cubics between two temporal-vectors and one scalar.
No tree-level contribution.
*)
LongitudionalVVS[]:=Module[{},
If[verbose,Print["Calculating Temporal-Vector-Scalar Cubics"]];
CouplingSSSS=1/(8 \[Pi]^2);
ContriSSSSTemp=CouplingSSSS*Contract[Habij,\[Lambda]3, {{3, 5},{4,6}}];
(*Minus sign from matching*)
GvvsL=-ContriSSSSTemp;
];
(*
Calculates Scalar quartics in the soft theory
*)
ScalarQuartic[]:=Module[{},
If[verbose,Print["Calculating Scalar Quartic"]];
(*Changes Made*)
ContriSS=1/(16 \[Pi]^2)Lb*1/2*Simplify[(\[CapitalLambda]\[Lambda]+Transpose[\[CapitalLambda]\[Lambda],{1,4,3,2}]+Transpose[\[CapitalLambda]\[Lambda],{1,3,2,4}])];
ContriVVTemp=Transpose[Flatten[HabijV,{1,2}],{3,2,1}] . Flatten[HabijV,{1,2}]//SimplifySparse;
ContriVVTemp2=ContriVVTemp+Transpose[ContriVVTemp,{1,3,2,4}]+Transpose[ContriVVTemp,{1,4,2,3}];
ContriVV=1/(16 \[Pi]^2)(3 Lb-2)/2*ContriVVTemp2;
CouplingFF=2*1/(16 \[Pi]^2)(2 Lf)(-1)*1/4;
ContriFF=CouplingFF*12*Symmetrize[Yhelp,Symmetric[{1,2,3,4}]]//SparseArray//SimplifySparse;
ContriSETemp=-ZijS . \[Lambda]4;
ContriSE=ContriSETemp+Transpose[ContriSETemp,{2,1,3,4}]+Transpose[ContriSETemp,{3,1,2,4}]+Transpose[ContriSETemp,{4,1,2,3}]//Simplify;
If[mode>=3,
(*Minus sign from matching*)
ContriSS\[Lambda]6=-T^2/24*TensorContract[\[Lambda]6,{1,2}];
\[Lambda]3D=- ContriSS- ContriVV+ ContriSE- ContriFF-ContriSS\[Lambda]6;
,
(*Minus sign from matching*)
\[Lambda]3D=- ContriSS- ContriVV+ ContriSE- ContriFF;
];
];
(*
Calculates Scalar quartics in the soft theory
*)
ScalarSextic[]:=Module[{},
If[verbose,Print["Calculating Scalar Sextic"]];
(*Scalar loops*)
\[CapitalLambda]\[Lambda]6tem=Flatten[\[Lambda]4 . \[Lambda]4,{{1},{2},{4},{5},{3,6}}];
\[CapitalLambda]\[Lambda]6tot=\[CapitalLambda]\[Lambda]6tem . Flatten[\[Lambda]4,{1,2}];
Prefac=-Zeta[3]15/(128 \[Pi]^4 T^2);
ContriSS=Prefac*Symmetrize[\[CapitalLambda]\[Lambda]6tot,Symmetric]//SparseArray//SimplifySparse;
(*Scalar loop with mixed \[Lambda]6 and \[Lambda]4 vertices*)
\[CapitalLambda]\[Lambda]6tot=Flatten[\[Lambda]4,{{1},{2},{3,4}}] . Flatten[\[Lambda]6,{1,2}]//SimplifySparse;
Prefac=15/2*1/(16 \[Pi]^2)Lb;
SymHelp=Symmetrize[\[CapitalLambda]\[Lambda]6tot,Symmetric]//SparseArray;
ContriSSS=Prefac*SymHelp;
(*Vector loops*)
\[CapitalLambda]\[Lambda]6tem=Flatten[Transpose[HabijV,{1,4,3,2}] . HabijV,{{2},{3},{5},{6},{1,4}}];
\[CapitalLambda]\[Lambda]6tot=\[CapitalLambda]\[Lambda]6tem . Flatten[HabijV,{{1,2},{3},{4}}];
Prefac=3*15*Zeta[3]/(128 \[Pi]^4 T^2);
ContriVV=Prefac*Symmetrize[\[CapitalLambda]\[Lambda]6tot,Symmetric]//SparseArray//SimplifySparse;
(*Fermion loops*)
\[CapitalLambda]\[Lambda]6tot1=Table[Tr[a . b . c . d . e . f],{a,Ysff},{b,YsffC},{c,Ysff},{d,YsffC},{e,Ysff},{f,YsffC}]//SparseArray;
\[CapitalLambda]\[Lambda]6totC=Table[Tr[a . b . c . d . e . f],{a,YsffC},{b,Ysff},{c,YsffC},{d,Ysff},{e,YsffC},{f,Ysff}]//SparseArray;
\[CapitalLambda]\[Lambda]6tot=\[CapitalLambda]\[Lambda]6tot1+ \[CapitalLambda]\[Lambda]6totC;
Prefac=((7 Zeta[3])*15*4/(64 \[Pi]^4 T^2));
ContriFF=Prefac*Symmetrize[\[CapitalLambda]\[Lambda]6tot,Symmetric]//SparseArray//SimplifySparse;
(*Field-strength renormalization*)
ContriSETemp=-ZijS . \[Lambda]6;
ContriSE=6*Symmetrize[ContriSETemp,Symmetric]//SparseArray//SimplifySparse;
(*Minus sign from matching*)
\[Lambda]6D=ContriSE- ContriSS- ContriVV- ContriFF-ContriSSS//SparseArray;
];
(*
Calculates Scalar-Vector gauge couplings in the soft theory.
*)
TransverseSSVV[]:=Module[{},
If[verbose,Print["Calculating Transverse-Vector Couplings"]];