If I define summation recursively, how do I prove formally that both of the following definitions are equivalent? First definition:
$\sum_{x=a}^{b} f(x)=f(b)+\sum_{x=a}^{b-1} f(x)$ if $a\leq b$, and equals $0$ otherwise
Second definition:
$\sum_{x=a}^{b} f(x)=f(a)+\sum_{x=a+1}^{b} f(x)$ if $a\leq b$, and equals $0$ otherwise
Intuitively, I have no doubt that both statements are always equal, but I am struggling to come up with a formal proof for it. I tried induction over $b$, but only got so far on working with the second definition:
$\sum_{x=a}^{b+1} f(x)=f(b+1)+\sum_{x=a}^{b}$

First, we assume $a,b$ are integers (and so must be finite). If $a > b$, both sums yield $0$ (and thus agree), so assume $a \le b$.

A, intuitive direct approach is to apply the recursion. You have with the first definition:
$$
\begin{split}
\sum_{x=a}^b f(x)
 &= f(a) + \sum_{x=a+1}^b f(x) \\
 &= f(a) + f(a+1) + \sum_{x=a+2}^b f(x) \\
 &= f(a) + f(a+1) + \ldots + f(b-1) + \sum_{x=b}^b f(x) \\
 &= f(a) + f(a+1) + \ldots + f(b-1) + f(b) + \sum_{x=b+1}^b f(x) \\
 &= f(a) + f(a+1) + \ldots + f(b-1) + f(b) + 0 \\
 &= f(a) + f(a+1) + \ldots + f(b-1) + f(b)
\end{split}
$$
The second definition yields
$$
\begin{split}
\sum_{x=a}^b f(x)
 &= f(b) + \sum_{x=a}^{b-1} f(x) \\
 &= f(b-1) + f(b) + \sum_{x=a}^{b-2} f(x) \\
 &= f(a+1) + \ldots + f(b-1) + f(b) + \sum_{x=a}^a f(x) \\
 &= f(a) + f(a+1) + \ldots + f(b-1) + f(b) + \sum_{x=a-1}^a f(x) \\
 &= f(a) + f(a+1) + \ldots + f(b-1) + f(b) + 0 \\
 &= f(a) + f(a+1) + \ldots + f(b-1) + f(b)
\end{split}
$$
so the sums agree.

A more formal approach is to use induction on the number of terms.
