From 8f54fa981fe7e820b8a70c48c8a8821d1bbd0f31 Mon Sep 17 00:00:00 2001 From: Vladyslav Shtabovenko Date: Tue, 9 Apr 2024 16:07:02 +0200 Subject: [PATCH] Fixed a bug in SUNSimplify related to a wrong symmetry relation for sunf2 (issue #259). --- FeynCalc/SUN/SUNSimplify.m | 8 +++++++- FeynCalc/Shared/SharedObjects.m | 2 +- Tests/SUN/SUNSimplify.test | 22 +++++++++++++++++++++- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/FeynCalc/SUN/SUNSimplify.m b/FeynCalc/SUN/SUNSimplify.m index 02042a81..1812d893 100644 --- a/FeynCalc/SUN/SUNSimplify.m +++ b/FeynCalc/SUN/SUNSimplify.m @@ -128,6 +128,7 @@ you must also set the option SUNTraceEvaluate to False (default is Automatic) FCPrint[3, "SUNSimplify: After renaming, ", temp, FCDoControl->sunSiVerbose]; ex = temp; + listColoredObjects = Cases2[temp, sunObj]; @@ -452,6 +453,7 @@ Introducing SU(N) structure constants, this must be the last operation, since an (* ... T^a T^b T^a ... *) colorSimplifyGeneric[rest_. holdDOTColor[xx___, SUNT[a_SUNIndex], SUNT[b_SUNIndex], SUNT[a_SUNIndex], yy___]] := (-1)/(2 SUNN) colorSimplifyGeneric[rest holdDOTColor[xx, SUNT[b], yy]]; + (* [... T^a T^b T^a ...]_ij *) colorSimplifyGeneric[rest_. SUNTF[{xx___,a_SUNIndex,b_SUNIndex,a_SUNIndex,yy___},i_,j_]] := (-1)/(2 SUNN) colorSimplifyGeneric[rest SUNTF[{xx,b,yy}, i,j]]; @@ -534,6 +536,7 @@ Introducing SU(N) structure constants, this must be the last operation, since an Since we intend to catch all such SUNF*SUND products here, there is no need to consider them later when dealing with SUND2/SUNF2 symbols *) + colorSimplifyGeneric[_. sunf[___,a_SUNIndex,___,b_SUNIndex,___] sund[___,a_SUNIndex,___,b_SUNIndex,___]]:= 0; @@ -596,6 +599,7 @@ Introducing SU(N) structure constants, this must be the last operation, since an (* ---------------------------------------------------------------------- *) (* SUNTFs *) + colorSimplifyGeneric[rest_. SUNTF[{x__}, i_, j_SUNFIndex] SUNTF[{y__}, j_SUNFIndex, k_]] := colorSimplifyGeneric[rest SUNTF[{x,y}, i, k]]; @@ -656,6 +660,7 @@ Introducing SU(N) structure constants, this must be the last operation, since an colorSimplifyGeneric[rest_. sunf2[b_, c_SUNIndex, d_, a_SUNIndex] sunf[r1___,a_SUNIndex,r2___,c_SUNIndex,r3___]] := SUNN/2 (-1)^(Length[{r2}]+1) colorSimplifyGeneric[rest sunf[b,d,r2,r3,r1]]; + (* Instead of trying to work out all possible products of two sunf2 symbols, it is easier to convert one of them into a product of two sunf symbols. @@ -693,6 +698,7 @@ Introducing SU(N) structure constants, this must be the last operation, since an Can be derived using SUNSimplify[SUND[i, a, b] SUND[j, b, c] SUND[k, c, a], Explicit -> True, SUNNToCACF -> False, SUNTrace -> True] *) + colorSimplifyGeneric[rest_. sund2[l1___,a_SUNIndex,l2_,b_SUNIndex,l3___] sund[r1___,a_SUNIndex,r2___,b_SUNIndex,r3___]] := (SUNN/2 - 6/SUNN) colorSimplifyGeneric[rest sund[l1,l2,l3,r1,r2,r3]] /; Length[{l1,l2,l3}]===2; @@ -757,7 +763,7 @@ Introducing SU(N) structure constants, this must be the last operation, since an -sunf2[a,b,d,c]/; !OrderedQ[{c,d}] && FCPatternFreeQ[{a,b,c,d}]; sunf2[a_,b_,c_,d_]:= - -sunf2[c,d,a,b]/; !OrderedQ[{{a,b},{c,d}}] && FCPatternFreeQ[{a,b,c,d}]; + sunf2[c,d,a,b]/; !OrderedQ[{{a,b},{c,d}}] && FCPatternFreeQ[{a,b,c,d}]; sunf2[a_SUNIndex,b_,a_SUNIndex,c_]:= SUNN SUNDelta[b,c]; diff --git a/FeynCalc/Shared/SharedObjects.m b/FeynCalc/Shared/SharedObjects.m index 11f2271e..1cb5c0b7 100644 --- a/FeynCalc/Shared/SharedObjects.m +++ b/FeynCalc/Shared/SharedObjects.m @@ -2659,7 +2659,7 @@ ftype with (possible) Lorentz-indices lorind and $SU(N)$ indices sunind. The Length[{a,x,b,x,c}] == 3; HoldPattern[SUNF[a___, x_, y_, b___, OptionsPattern[]]] := - -SUNF[a, y, x, b] /; FreeQ[{a,x,y,b}, Pattern] && Length[{a,x,y,b}] === 3 && (!OrderedQ[{x, y}]) && + -SUNF[a, y, x, b] /; FeynCalc`FCPatternFreeQ[{a,x,y,b}] && Length[{a,x,y,b}] === 3 && (!OrderedQ[{x, y}]) && Head[x] === SUNIndex && Head[y] === SUNIndex; diff --git a/Tests/SUN/SUNSimplify.test b/Tests/SUN/SUNSimplify.test index 61e43005..762a1961 100644 --- a/Tests/SUN/SUNSimplify.test +++ b/Tests/SUN/SUNSimplify.test @@ -228,6 +228,26 @@ SUNTraceEvaluate -> False]", SUNTrace[SUNT[SUNIndex[a]] . SUNT[SUNIndex[c]] . SUNT[SUNIndex[b]]]"}, {"fcstSUNSimplify-ID66", "SUNSimplify[SUNTrace[SUNT[a, a, b, b]]]", -"CA CF^2"} +"CA CF^2"}, +{"fcstSUNSimplify-ID67", +"SUNSimplify[-(SUNF[Glu1, h1, h2]* + SUNF[Glu2, h2, + h3]*(I*SUNN*SUNTF[{Glu1}, $AL[$20], Col3]* + SUNTF[{Glu2}, Col4, $AL[$20]] - + I*SUNN*SUNTF[{Glu1}, Col4, $AL[$20]]* + SUNTF[{Glu2}, $AL[$20], Col3] + + SUNN*SUNF[Glu1, Glu2, $AL[$19]]*SUNTF[{$AL[$19]}, Col4, Col3])* + SUNTF[{h1, h3}, Col3, Col4])]", +"(I/2)*CA^4*CF"}, +{"fcstSUNSimplify-ID68", +"SUNSimplify[-(SUNF[a1, a2, Glu1]* + SUNF[a2, a3, + Glu2]*(I*SUNN*SUNTF[{Glu1}, $AL[$20], Col3]* + SUNTF[{Glu2}, Col4, $AL[$20]] - + I*SUNN*SUNTF[{Glu1}, Col4, $AL[$20]]* + SUNTF[{Glu2}, $AL[$20], Col3] + + SUNN*SUNF[Glu1, Glu2, $AL[$19]]*SUNTF[{$AL[$19]}, Col4, Col3])* + SUNTF[{a1, a3}, Col3, Col4])]", +"(I/2)*CA^4*CF"} };