You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I independently reproduced this issue in the official FeynCalc 10.2.1 release and traced it to a duplicated pattern in SUN/SUNSimplify.m.
Environment: Mathematica 13.3, macOS ARM64. I tested untouched official release archives in fresh kernels using -noinit, without loading other packages. The same defect is present in 10.1.0.
The second SetDelayed therefore overwrites the first rule. Its sunf2 pattern appears intended to be sunf2[b_, c_SUNIndex, a_SUNIndex, d_], matching the bcad ordering in its comment.
The second identity follows from the first by exchanging the summed indices a and c and using antisymmetry of f. The second rule's existing RHS is consistent with that positive sign; it is the LHS ordering that needs correction.
Verification
Using exactly the two expressions in this issue, unmodified 10.2.1 gives respectively -SUNN^2/2 and +SUNN^2/2 times the corresponding external delta. In a separate temporary official 10.2.1 copy, changing just that pattern makes both results +SUNN^2/2 times the delta. This sign agrees with an independent direct SU(2) Levi-Civita sum.
I initially encountered the same defect in a five-structure-constant network. Rule-specific instrumentation confirmed that it fires the overwritten contraction. For 58 five-f argument-permutation/index-relabeling tests, unmodified 10.2.1 passes 17 and fails 41; the one-line correction passes all 58. All 144 simpler three-f controls (24 f2 slot orders times 6 third-f argument orders), checked against direct SU(2) sums, pass both before and after the correction.
Could you please confirm this diagnosis and the intended pattern?
This issue is already fixed in the current stable version of FeynCalc. The behaviour you describe comes from the outdated 10.2.1 release archive, not from the current code.
Status
✅ The fix has been on the hotfix-stable branch since September 2026, in commit 3efe5eca ("fix colorSimplifyGeneric"). It is also in master.
That commit corrected the colorSimplifyGeneric contraction rules for sunf2 × sunf in SUN/SUNSimplify.m:
f_2^bcad f^ace rule: now uses sunf2[b_, c_SUNIndex, a_SUNIndex, d_], so it no longer clashes with the f_2^bacd f^ace rule.
f_2^abcd f^cde / f_2^abdc f^cde rules: their index slots were swapped; this is corrected as well.
Comment signs: the comments of the cbda, bcad and badc rules now state the correct sign +N/2.
Why 10.2.1 still shows the bug
The release archives (e.g. 10.2.1) are frozen snapshots kept for reference; they are not updated after release. All bug fixes go to the hotfix-stable branch, so testing against a release archive will reproduce bugs that have long been fixed.
How to get the fix
Please install the latest stable version from the hotfix-stable branch, either
via the automatic installer, or
manually, by downloading the hotfix-stable branch from GitHub.
After updating, both expressions from the original report should give the same result.
If you still see wrong signs with the current hotfix-stable version, please let us know and post the expression. Thanks again! 🚀
Activity
wuwphy commentedon Nov 25, 2026
I independently reproduced this issue in the official FeynCalc 10.2.1 release and traced it to a duplicated pattern in
SUN/SUNSimplify.m.Environment: Mathematica 13.3, macOS ARM64. I tested untouched official release archives in fresh kernels using
-noinit, without loading other packages. The same defect is present in 10.1.0.Likely cause
In Release-10_2_1, lines 728–734, these two definitions have identical left-hand sides but opposite signs:
The second
SetDelayedtherefore overwrites the first rule. Itssunf2pattern appears intended to besunf2[b_, c_SUNIndex, a_SUNIndex, d_], matching thebcadordering in its comment.Proposed one-line correction
Change only the second pattern:
The second comment should also have a positive sign. With
f2[a,b,c,d] = Sum[f[x,a,b] f[x,c,d], x], the two contractions areThe second identity follows from the first by exchanging the summed indices
aandcand using antisymmetry off. The second rule's existing RHS is consistent with that positive sign; it is the LHS ordering that needs correction.Verification
Using exactly the two expressions in this issue, unmodified 10.2.1 gives respectively
-SUNN^2/2and+SUNN^2/2times the corresponding external delta. In a separate temporary official 10.2.1 copy, changing just that pattern makes both results+SUNN^2/2times the delta. This sign agrees with an independent direct SU(2) Levi-Civita sum.I initially encountered the same defect in a five-structure-constant network. Rule-specific instrumentation confirmed that it fires the overwritten contraction. For 58 five-f argument-permutation/index-relabeling tests, unmodified 10.2.1 passes 17 and fails 41; the one-line correction passes all 58. All 144 simpler three-f controls (24
f2slot orders times 6 third-fargument orders), checked against direct SU(2) sums, pass both before and after the correction.Could you please confirm this diagnosis and the intended pattern?
vsht commentedon Nov 25, 2026
Thank you for the detailed report! 🙏
Summary
This issue is already fixed in the current stable version of FeynCalc. The behaviour you describe comes from the outdated 10.2.1 release archive, not from the current code.
Status
✅ The fix has been on the
hotfix-stablebranch since September 2026, in commit 3efe5eca ("fix colorSimplifyGeneric"). It is also inmaster.That commit corrected the
colorSimplifyGenericcontraction rules forsunf2×sunfinSUN/SUNSimplify.m:f_2^bcad f^acerule: now usessunf2[b_, c_SUNIndex, a_SUNIndex, d_], so it no longer clashes with thef_2^bacd f^acerule.f_2^abcd f^cde/f_2^abdc f^cderules: their index slots were swapped; this is corrected as well.cbda,bcadandbadcrules now state the correct sign+N/2.Why 10.2.1 still shows the bug
The release archives (e.g. 10.2.1) are frozen snapshots kept for reference; they are not updated after release. All bug fixes go to the
hotfix-stablebranch, so testing against a release archive will reproduce bugs that have long been fixed.How to get the fix
Please install the latest stable version from the
hotfix-stablebranch, eitherhotfix-stablebranch from GitHub.After updating, both expressions from the original report should give the same result.
If you still see wrong signs with the current
hotfix-stableversion, please let us know and post the expression. Thanks again! 🚀