def doit(self, **hints):
        if hints.get('deep', True):
            f = self.function.doit(**hints)
        else:
            f = self.function

        if self.function.is_Matrix:
            return self.expand().doit()

        for n, limit in enumerate(self.limits):
            i, a, b = limit
            dif = a - b
            if dif.is_integer and (dif < 0) == True:
                a, b = b + 1, a - 1
                f = -f
            if isinstance(i, Idx):
                i = i.label

            newf = eval_sum(f, (i, a, b))
            if newf is None:
                if f == self.function:
                    zeta_function = self.eval_zeta_function(f, (i, a, b))
                    if zeta_function is not None:
                        return zeta_function
                    return self
                else:
                    return self.func(f, *self.limits[n:])
            f = newf

        if hints.get('deep', True):
            # eval_sum could return partially unevaluated
            # result with Piecewise.  In this case we won't
            # doit() recursively.
            if not isinstance(f, Piecewise):
                return f.doit(**hints)

        return f
dataset/ETHPy150Open sympy/sympy/sympy/concrete/summations.py/Sum.doit/swapped operands of `-`