Leaklens

sympy__sympy-23824

physics.hep.kahane_simplify() incorrectly reverses order of leading uncontracted gamma matrices

Verdict: the issue points to the file or function that was changed (Tier B).

In `kahane_simplify()` the leading matrices are removed at the beginning of the function and then inserted at the start of the product at the end of the function, and the insertion loop is just backward.

The two checks disagreed (stated fix vs. points to it); the lower reading shown: “In `kahane_simplify()` the leading matrices are removed at the beginning of the function and then inserted at the start of the product at the end of…”

All SWE-bench Verified tasks · more sympy/sympy tasks · How the check works