Given that $m\ge k$, why the range of $$\sum\_{\ell=0}^k\sum\_{j=\ell}^m$$ is the same as

$$\sum\_{j=0}^m\sum\_{\ell=0}^{\min(j,k)}$$

Instead of write down all to check, is there any systematical way?

I thought the latter would be $\displaystyle\sum\limits\_{j=0}^m\sum\limits\_{\ell=0}^{j[j\le k]+(-1)[j>k]}$, but it seems like this is wrong, can anyone help me point out way? ($\textrm{if P is True, }[P]=1, \textrm{otherwise }[P]=0$.)