A __sub__ method needs to be defined for Sum. Something like this can
get you started:
```
def __sub__(self, other):
if not isinstance(other, Sum):
raise ValueError
if self.variables == other.variables and \
self.function == other.function and \
self.limits[0][1] == other.limits[0][1]:
x, _, s = self.limits[0]
_, _, o = other.limits[0]
dif = s - o
if dif.is_Number:
if dif is S.One:
return self.function.subs(x, s)
elif dif > 0:
return Sum(self.function, (x, o + 1, o + dif))
raise NotImplementedError
```
```
>>> from sympy import *
>>> var('x')
x
>>>
>>> f=Function('f')
>>> Sum(f(x),(x, 1, x + 1)) - Sum(f(x),(x, 1, x))
f(x + 1)
>>> Sum(f(x),(x, 1, x + 3)) - Sum(f(x),(x, 1, x))
Sum(f(x), (x, x + 1, x + 3))
>>> Sum(f(x),(x, 1, x + 3)) - Sum(f(x),(x, 1, x+1))
Sum(f(x), (x, x + 2, x + 3))
>>> Sum(f(x),(x, 1, x + 3)) - Sum(f(x),(x, 1, x+2))
f(x + 3)
>>>
```
Then you think about what __add__ might be...whether Number or only
Integer should be handled...what to do if the lower limits are not the
same or if diff is negative, etc...
/c