Formula:
$$ \begin{aligned} \mathbb{E}(N) & =\sum_{n \geq 1} \overbrace{n}^{\sum_{m=1}^n 1} \mathbb{P}(N=n) \\ & =\sum_{1 \leq m \leq n} \mathbb{P}(N=n)=\sum_{1 \leq m} \overbrace{\sum_{m \leq n} \mathbb{P}(N=n)}^{\mathbb{P}(N \geq m)}=\sum_{1 \leq m} \mathbb{P}(N \geq m) \end{aligned} $$
Question
I don't understand how $\sum_{n \geq 1} \overbrace{n}^{\sum_{m=1}^n 1} \mathbb{P}(N=n)$ is equal to $\sum_{1 \leq m \leq n} \mathbb{P}(N=n)$. Also, the notation below the sum in $\sum_{1 \leq m \leq n} $ doesn't make sense to me. How are we exactly summing and how does it follow up more directly from $\sum_{n \geq 1} \overbrace{n}^{\sum_{m=1}^n 1} \mathbb{P}(N=n)$? And what the above little sum serve to explain because for me, it is just the expectation formula (given the context, $N$ takes integer values), why do we also need to see that $n$ as a sum ?
The second one, $\sum_{1 \leq m} \sum_{m \leq n}$ makes more sense with what the sum actually is, like when we are at the iteration $m=1$ at the first sum, we sum all $ \mathbb{P}(N=k)$ for $k \geq 1$ , then for $m=2$ we sum again $ \mathbb{P}(N=k)$ for $k \geq 2$, etc.
The sum actually looks like :
$$ 1 \mathbb{P}(N=1) + 2 \mathbb{P}(N=2) + 3 \mathbb{P}(N=3) + ... $$
Which is what the fist line is but I don't see how the first line is equal to $\sum_{1 \leq m \leq n} \mathbb{P}(N=n)$.
Thank you.
In this context, I interpret $\sum_{1\le m\le n}$ as being a double sum over two indices $m$ and $n$. I don't love that notation though. I would write this calculation as $$ \mathbb{E}(N) = \sum_{n=1}^\infty \mathbb{P}(N=n) \cdot n = \sum_{n=1}^\infty \mathbb{P}(N=n) \sum_{m=1}^n 1 = \sum_{m=1}^\infty \sum_{n=m}^\infty \mathbb{P}(N=n) =\sum_{m=1}^\infty \mathbb{P}(N \geq m). $$