FeynCalc / feyncalc

Mathematica package for algebraic calculations in elementary particle physics.
https://feyncalc.github.io
GNU General Public License v3.0
309 stars 87 forks source link

Issue with DiracSimplify when two 4 dimensional epsilon tensors are contracted with a D dimensional trace. #237

Closed fabianwunder closed 9 months ago

fabianwunder commented 10 months ago

<< FeynCalc` term = LC[[Mu], [Nu]][p1, p2] LC[[Rho], [Sigma]][p1, p2] DiracTrace[ FVD[p3, [Sigma]]*GAD[[Mu], [Nu], [Rho]] . GSD[p3]]; FCSetDiracGammaScheme["BMHV"]; termdiracsimplify = term // DiracSimplify; termcontractfirst = term // Contract // DiracSimplify; termdiracsimplify - termcontractfirst // Simplify

The last line should evaluate to zero because contracting and taking the trace should be interchangeable. However FeynCalc gives the result 8(SP[p1, p2]^2 - SP[p1, p1]SP[p2, p2])* (SP[p3, p3] - SPD[p3, p3]).

The error appears in termdiracsimplify. Here, the index of FVD[p3,[Sigma]] is NOT put to four dimensions by the other (four dimensional) [Sigma] and incorrectly a SPD[p3] is produced instead of SP[p3]. This behavior only appears if the external tensors are Epsilon-Tensors and if 4 and D dimensional objects are involved. Interestingly, there is no issue for

termdiracsimplify2 = term // DiracSimplify[#,DiracTraceEvaluate->False]&//DiracSimplify;

It seems as if the error only appears because of the specific order of simplifications within DiracSimplify.

Also there is no problem for termdiracsimplify3 = term/. FVD[p3, [Sigma]]-> FV[p3, [Sigma]] +FVE[p3, [Sigma]] // DiracSimplify,

so the problem seems to be specific to the combination of 4 and D dimensions.

A potential way to consistently avoid the problem should be to have a function that recognizes repeated indices with different dimensionality and makes replacements accordingly e.g. something like LorentzIndex[a,D].....LorentzIndex[a]->LorentzIndex[a].....LorentzIndex[a].

vsht commented 9 months ago

Thanks for the bug report. The property that any 4-dim index should make the whole Eps tensor equally 4-dim was already implemented but obviously not for this particular combination of arguments.

I pushed a fix into the master branch (commit 34062c9) that should take care of this. Could you please test the dev version and let me know whether there are still any relevant issues remaining? Then I could also push it to the stable version.

fabianwunder commented 9 months ago

Thank you very much for the fast bug fix. I tested the dev version, now it seems to work properly.

vsht commented 9 months ago

Thanks for the confirmation. Now the fix should be also in the stable version.