sympy/sympy — pull request #7381 by pv (2014-04-07 12:05:50+00:00)
Title: Replace only Symbol indices in secondquant.evaluate_deltas

evaluate_deltas should consider only Symbol indices as candidates for summation, and not allow e.g. integer constants act as dummy summation variables.

As far as I understand the code here, in the intended use case for secondquant, the indices are always symbols.

Fixes gh-7380