Let $X : \Omega \to \mathbb{R}$ be a discrete random variable in a discrete probability space with countable sample space $\Omega$. Let $P(\omega)$ be the probability of an outcome $\omega \in \Omega$, and $X(\omega)$ the assignment of outcome $w$ to a real number. There are 2 definitions for the expectation of $X$.
$$E(X) = \sum_{\omega \in \Omega} P(\omega)X(\omega)$$
and
$$E'(X) = \sum_{u \in \text{range}(X)} \sum_{X(\omega) = u} P(\omega)X(\omega)$$
The former is just an unordered sum over a countable set $\Omega$ and the latter is a double sum over countable subsets of $\Omega$. The expected value only exists if the unordered sum converges. How can we show that the two definitions are equivalent? That is, $E(X)$ exists if and only if $E'(X)$ exists (and both converge to the same value). I am using the following definition of unordered sum:
We say that $\sum_{\omega \in S} f(\omega) = T$ (converges to $T$) if for each $\varepsilon > 0$, there exists a finite subset $F \subseteq S$ such that for all finite $G$ satisfying $F \subseteq G \subseteq S$ we have $$\left|\sum_{\omega \in G} f(\omega) - T\right| < \varepsilon.$$
This question shows an attempt to prove a more general result about splitting an unordered sum. We can prove that $E(X)$ exists implies $E'(X)$ exists. But for the other direction, a nice counterexample was given. Thus, is there something special about the expectation function that makes the definitions equivalent?
The point is that all summands in the inner sum of $E'$ have the smae sign.
Suppose $E'$ exists. Given $\epsilon>0$ find a finite subset of the range that takes you within $\epsilon/4$ of the limit, then within each of the ($n$, say) used summands pick a finite subset that takes you within $\epsilon/4n$ of the limit of that summand. We obtain a finite subset that takes us within $\epsilon/2$ of the limit; adding more summands from "within" (the picked finite subset of the range) cannot takes us further away than another $\epsilon/4$; the same holds for adding summands from "without". All in all we stay withon $\epsilon$ of the limit.