FeynCalc objects relevant for the color algebra are
[a] SUNT
T^a
[a, b, c] SUNF
f^{abc}
[a, b, c] SUND
d^{abc}
[a, b] SUNDelta
\delta ^{ab}
SUNN
N
CA
C_A
CF
C_F
There are two main functions to deal with colored objects: SUNSimplify
and SUNTrace
[a, a]
SUNT[%] SUNSimplify
T^a.T^a
C_F
[a, b, a, b]
SUNT[%] SUNSimplify
T^a.T^b.T^a.T^b
-\frac{1}{2} C_F \left(C_A-2 C_F\right)
[b, d, a, b, d]
SUNT[%] SUNSimplify
T^b.T^d.T^a.T^b.T^d
\frac{T^a \left(C_A^2+1\right)}{4 C_A^2}
The color factors C_A and C_F are reconstructed from N_c using heuristics. The reconstruction can be disabled by setting the option SUNNToCACF
to False
[SUNT[b, d, a, b, d], SUNNToCACF -> False] SUNSimplify
\frac{\left(N^2+1\right) T^a}{4 N^2}
The color traces are not evaluated by default. The evaluation can be forced either by applying SUNSimplify
or setting the option SUNTraceEvaluate
to True
[SUNT[a, b]] SUNTrace
\text{tr}\left(T^a.T^b\right)
[SUNT[a, b, b, a]] SUNTrace
\text{tr}\left(T^a.T^b.T^b.T^a\right)
[SUNT[a, b]] // SUNSimplify SUNTrace
\frac{\delta ^{ab}}{2}
[SUNT[a, b, b, a]] // SUNSimplify SUNTrace
C_A C_F^2
[SUNT[a, b], SUNTraceEvaluate -> True] SUNTrace
\frac{\delta ^{ab}}{2}
Use SUNTF
to get color matrices with explicit fundamental indices
[{a, b, c}, i, j] SUNTrace[SUNT[b, a]]
SUNTF% // SUNSimplify
\text{tr}\left(T^b.T^a\right) \left(T^aT^bT^c\right){}_{ij}
\frac{1}{2} C_F T_{ij}^c
Color traces with more than 3 matrices are not evaluated by default (assuming that no other simplifications are possible). The evaluation can be forced using the option SUNTraceEvaluate
set to True
[SUNT[a, b, c, d]] // SUNSimplify[#, SUNTraceEvaluate -> True] & SUNTrace
\frac{1}{4} \delta ^{ad} \left(C_A-2 C_F\right) \delta ^{bc}-\frac{1}{4} \delta ^{ac} \left(C_A-2 C_F\right) \delta ^{bd}+\frac{1}{4} \delta ^{ab} \left(C_A-2 C_F\right) \delta ^{cd}-\frac{1}{8} i f^{ad\text{FCGV}(\text{sun941})} d^{bc\text{FCGV}(\text{sun941})}+\frac{1}{8} i d^{ad\text{FCGV}(\text{sun941})} f^{bc\text{FCGV}(\text{sun941})}+\frac{1}{8} d^{ad\text{FCGV}(\text{sun941})} d^{bc\text{FCGV}(\text{sun941})}-\frac{1}{8} d^{bd\text{FCGV}(\text{sun941})} d^{ac\text{FCGV}(\text{sun941})}+\frac{1}{8} d^{cd\text{FCGV}(\text{sun941})} d^{ab\text{FCGV}(\text{sun941})}
One can automatically rename dummy indices using the SUNIndexNames
option
[SUNT[a, b, c, d]] // SUNSimplify[#, SUNTraceEvaluate -> True, SUNIndexNames -> {j}] & SUNTrace
\frac{1}{4} \delta ^{ad} \left(C_A-2 C_F\right) \delta ^{bc}-\frac{1}{4} \delta ^{ac} \left(C_A-2 C_F\right) \delta ^{bd}+\frac{1}{4} \delta ^{ab} \left(C_A-2 C_F\right) \delta ^{cd}-\frac{1}{8} i f^{adj} d^{bcj}+\frac{1}{8} i d^{adj} f^{bcj}+\frac{1}{8} d^{adj} d^{bcj}-\frac{1}{8} d^{bdj} d^{acj}+\frac{1}{8} d^{cdj} d^{abj}