Changing summation order Let $N,M,R \geq 0$ be positive integers with $N \leq M$. I want to rewrite a summation of the form $$\sum_{i=0}^R \sum_{j=N}^M \sum_{\ell=0}^{M+i-j} \lambda_{i,j,\ell} $$ as $$\sum_{\ell =0}^{M+R-N} \sum_{?=?}^? \sum_{?=?}^? \lambda_{i,j,\ell}.$$ I have only been able to do so by splitting the sum in four blocks, namely by rewriting the sum as something like $$\sum_{\ell =?}^{?} \sum_{?=?}^? \sum_{?=?}^? \lambda_{i,j,\ell} + \sum_{\ell =?}^{?} \sum_{?=?}^? \sum_{?=?}^? \lambda_{i,j,\ell} + \sum_{\ell =?}^{?} \sum_{?=?}^? \sum_{?=?}^? \lambda_{i,j,\ell} + \sum_{\ell =?}^{?} \sum_{?=?}^? \sum_{?=?}^? \lambda_{i,j,\ell}$$ but this is far from being useful for my purposes.
 A: Think of it like this. The summation bounds you have imply the following inequalities for the summation indices:
$$
0\le i\le R\\
N\le j\le M\\
0\le \ell \le M+i-j
$$
You want to switch the order of summation so that $\ell$ is the outermost variable, so we need bounds for $\ell$ not in terms of $i$ or $j$. This is achieved by taking the upper bound $M+i-j$ for $\ell$, and replacing $i$ and $-j$ with their upper bounds:
$$
0\le \ell \le M+i-j\le M+R-N,
$$
so the outer summation should be $\sum_{\ell=0}^{M+R-N}$.
Now, we just need to work out the bounds on $i$ and $j$. It seems you do not care about the order of these two, so let's start with $i$. All of the inequalities we have involving $i$ are
$$
0\le i\le R,\qquad \ell-M+j\le i
$$
Our bound for $i$ can depend on $\ell$, but not on $j$, so we need to replace $j$ with its most extreme case:
$$
i\ge \ell-M+j\ge \ell-M+N
$$
Finally, we need to combine these three inequalities into an upper and lower bound. Since we have two lower bounds for $i$, the lower bound is the maximum of these two, resulting in
$$
\sum_{i=\max(\ell-M+N,0)}^{R}
$$
If you do the same thing with the $j$ variable, this time allowing dependence on $i$ and $\ell$, and then put it all together, the result is
$$
\sum_{\ell=0}^{M+R-N}\sum_{i=\max(\ell-M+N,0)}^{R}\sum_{j=N}^{\min(M,M+i-\ell)}\lambda_{i,j,\ell}
$$
It is also further possible to break this into four summations, which would eliminate the need for $\max$'s and $\min$'s in the bounds.
A: Just doing some algebraic massage of indices bounds we get
$$
\eqalign{
  & \left\{ \matrix{
  0 \le l \le M + i - j \hfill \cr 
  N \le j \le M \hfill \cr 
  0 \le i \le R \hfill \cr}  \right. \Rightarrow   \cr 
  &  \Rightarrow \quad \left\{ \matrix{
  0 \le l + \left( {R - i} \right) + \left( {j - N} \right) \le M + R - N \hfill \cr 
  0 \le j - N \le M - N \hfill \cr 
  0 \le R - i \le R \hfill \cr}  \right.\quad  \Rightarrow   \cr 
  &  \Rightarrow \quad \left\{ \matrix{
  0 \le l + \left( {R - i} \right) + \left( {j - N} \right) \le M + R - N \hfill \cr 
  0 \le \left( {R - i} \right) + \left( {j - N} \right) \le M + R - N \hfill \cr 
  0 \le j - N \le M - N \hfill \cr 
  0 \le R - i \le R \hfill \cr}  \right.\quad  \Rightarrow   \cr 
  &  \Rightarrow \quad \left\{ \matrix{
  0 \le l \le M + R - N \hfill \cr 
   - l \le \left( {R - i} \right) + \left( {j - N} \right) \le M + R - N - l \hfill \cr 
  0 \le \left( {R - i} \right) + \left( {j - N} \right) \le M + R - N \hfill \cr 
  0 \le j - N \le M - N \hfill \cr 
  0 \le R - i \le R \hfill \cr}  \right.\quad  \Rightarrow   \cr 
  &  \Rightarrow \quad \left\{ \matrix{
  0 \le l \le M + R - N \hfill \cr 
  0 \le \left( {R - i} \right) + \left( {j - N} \right) \le M + R - N - l \hfill \cr 
  0 \le j - N \le M - N \hfill \cr 
  0 \le R - i \le R \hfill \cr}  \right.\quad  \Rightarrow   \cr 
  &  \Rightarrow \quad \left\{ \matrix{
  0 \le l \le M + R - N \hfill \cr 
  0 \le j - N \le M + R - N - l - \left( {R - i} \right) \hfill \cr 
  0 \le j - N \le M - N \hfill \cr 
  0 \le R - i \le \min \left( {R,\;M + R - N - l} \right) \hfill \cr}  \right.\quad  \Rightarrow   \cr 
  &  \Rightarrow \quad \left\{ \matrix{
  0 \le l \le M + R - N \hfill \cr 
  0 \le j - N \le \min \left( {M - N,\;M - N - l + i} \right) \hfill \cr 
  0 \le R - i \le \min \left( {R,\;M + R - N - l} \right) \hfill \cr}  \right.\quad  \Rightarrow   \cr 
  &  \Rightarrow \quad \left\{ \matrix{
  0 \le l \le M + R - N \hfill \cr 
  \max \left( {0,\;l - \left( {M - N} \right)} \right) \le i \le R \hfill \cr 
  0 \le j \le \min \left( {M,\;M - l + i} \right) \hfill \cr}  \right. \cr} 
$$
and we can read the last system as the limits of the outer down to the inner summation.
I attach a graphic scheme which relates to the last but one inequality
