Rigorous proof for reordering of summation I am seek for a rigorous proof for the following identity
$\sum_{i = 0}^{T} x_i \sum_{j = 0}^{i} y_j = \sum_{i = 0}^{T}y_i\sum_{j = i}^{T} x_j$. 
By setting some small $T$ and expand the formulas, it is then clear to see the result. I am asking for help to give a formal proof of this identity, by reordering the summation. 
 A: 
The following representation might be helpful
  \begin{align*}
\sum_{i = 0}^{T}\sum_{j = 0}^{i} x_iy_j=\sum_{0\leq j\leq i\leq T} x_iy_j=\sum_{j=0}^T\sum_{i=j}^Tx_iy_j\tag{1}
\end{align*}

From (1) we obtain by applying the laws of associativity, distributivity and commutativity:
\begin{align*}
\sum_{i = 0}^{T} x_i \sum_{j = 0}^{i} y_j&=\sum_{i = 0}^{T}\sum_{j = 0}^{i} x_iy_j\\
&=\sum_{0\leq j\leq i\leq T} x_iy_j\\
&=\sum_{j=0}^T\sum_{i=j}^Tx_iy_j=\sum_{j=0}^Ty_j\sum_{i=j}^Tx_i
\end{align*}
A: The usual strategy is to "draw a triangle." Let $a_{ij}:=x_iy_j$. Then:
$a_{11}$
$a_{21},a_{22}$
$a_{31},a_{32},a_{33}$
$\vdots$
$a_{T1},a_{T2},a_{T3},\ldots ,a_{TT}.$
Since both sums are finite, there's no issue with swapping them. 
Then $\sum_{i=0}^T\sum_{j=0}^ix_iy_j=\sum_{i=0}^T\sum_{j=i}^Tx_jy_i,$
can be seem from summing the triangle above either row-wise, or column-wise.
A: Direct way
\begin{gather*}
\sum_{i = 0}^{T} x_i \sum_{j = 0}^{i} y_j=x_0 y_0+x_1(y_0+y_1)+x_2(y_0+y_1+y_2)+\cdots+x_k(y_0+y_1+\cdots+y_k)+\cdots+x_T(y_0+y_1+\cdots+y_T)=y_0(x_0+x_1+\cdots+x_T)+y_1(x_1+x_2+\cdots+x_T)+\cdots+x_T y_T=\sum_{i=0}^T y_i \sum_{j=i}^T x_j.
\end{gather*}
A: The formal approach for all such formulas is mathematical induction. Fix sequences $(x_{i})_{i=0}^{\infty}$ and $(y_{j})_{j=0}^{\infty}$ of summands from some commutative ring (e.g., the field of real numbers). (If you're only interested in your "change of index" formula up to some fixed finite number of summands, these sequences need only be finite and "long enough", and the inductive step below will only be invoked finitely many times.)
Recall that summation is defined recursively by
$$
\sum_{i=0}^{0} x_{i} = x_{0},\qquad
\sum_{i=0}^{T+1} x_{i} = \left[\sum_{i=0}^{T} x_{i}\right] + x_{T+1}.
$$
For each non-negative integer $T$, let $P(T)$ be the statement
$$
\sum_{i=0}^{T} x_{i} \sum_{j=0}^{i} y_{j} = \sum_{i=0}^{T} y_{i} \sum_{j=i}^{T} x_{j}.
\tag*{$P(T)$}
$$
The base case reads
$$
\sum_{i=0}^{0} x_{i} \sum_{j=0}^{i} y_{j}
= x_{0} y_{0}
= \sum_{i=0}^{0} y_{i} \sum_{j=i}^{0} x_{j},
\tag*{$P(0)$}
$$
which is true. Assume inductively that $P(T)$ is true for some integer $T \geq 0$. We have
\begin{align*}
  \sum_{i=0}^{T+1} x_{i} \sum_{j=0}^{i} y_{j}
  &= \left[\sum_{i=0}^{T} x_{i} \sum_{j=0}^{i} y_{j}\right] + x_{T+1} \sum_{j=0}^{T+1} y_{j} && \text{recursive definition of summation} \\
  &= \left[\sum_{i=0}^{T} y_{i} \sum_{j=i}^{T} x_{j}\right] + x_{T+1} \sum_{i=0}^{T+1} y_{i} && \text{inductive hypothesis, dummy index} \\
  &= \sum_{i=0}^{T+1} y_{i} \sum_{j=i}^{T+1} x_{j} && \text{recursive definition of summation,}
\end{align*}
so $P(T+1)$ is true.
Since the base case $P(0)$ is true, and since $P(T)$ implies $P(T+1)$ for every integer $T \geq 0$, induction guarantees $P(T)$ is true for all $T \geq 0$.
