Are these two limits equal? The problem basically goes as follows:
Let $x_i$ be a sequence of real numbers. Let $f : \mathbf{N} \to \mathbf{N}$ be a bijection.
And finally, let $h : \mathbf{R} \to \mathbf{R}$ be some function.
I want to prove that $$\lim_{n \to \infty} \left({\sum_{i = 1}^n {h(x_i)}}\right) = \lim_{n \to \infty} \left({\sum_{i = 1}^n {h(x_{f(i)})}}\right)$$
I require this result to solve some other problem so I dont actually know if this is true or not. If it is, how do I start with the proof? I have thought of a few ways (one of them was to try to get somewhere with $\sum_{i = 1}^n ({h(x_i) + h(x_{f(i)}))}$ but that did not really help). My intuition tells me that it should be true because, roughly speaking, since $f$ is a bijection, in the limiting case, "all" of the terms will be same on both sides.
 A: The statement is not always true. But it is true if the series is absolutely convergent — that is, if the sum of absolute values converges:
$$ \sum_{i=1}^\infty |h(x_i)| < \infty $$
In particular, if $h$ is never negative and the series converges, then any permutation of the series also converges to the same value.
For a counterexample with mixed signs in the sequence, let the sequence $\{ h(x_i) \}$ be the alternating harmonic series:
$$h(x_i) = \frac{(-1)^{i+1}}{i}$$
which is known to sum to
$$ \sum_{i=1}^\infty \frac{(-1)^{i+1}}{i} = \ln 2 $$
(The $x_i$ values don't matter, since we can just look at the resulting sequence $h(x_i)$.)
For the bijection $f$, we'll use one that includes two negative terms for every positive term (like a Hilbert's Hotel rearrangement):
$$ \begin{align*} f(3k+1) &= 2k+1 \\
f(3k+2) &= 4k+2 \\
f(3k+3) &= 4k+4
\end{align*} $$
So the permuted sequence starts
$$ \{h(x_{f(i)})\}: \frac{1}{1}, -\frac{1}{2}, -\frac{1}{4}, \frac{1}{3}, -\frac{1}{6}, -\frac{1}{8}, \frac{1}{5}, -\frac{1}{10}, -\frac{1}{12}, \ldots $$
The sum of this sequence is
$$ \begin{align*}
\sum_{i=1}^\infty h(x_{f(i)}) &= \sum_{k=0}^\infty \big(h(x_{f(3k+1)}) + h(x_{f(3k+2)}) + h(x_{f(3k+3)})\big) \\
&= \sum_{k=0}^\infty \left(\frac{1}{2k+1} - \frac{1}{4k+2} - \frac{1}{4k+4}\right) \\
&= \sum_{k=0}^\infty \left(\frac{1}{4k+2} - \frac{1}{4k+4}\right) \\
&= \frac{1}{2} \sum_{k=0}^\infty \left(\frac{1}{2k+1} - \frac{1}{2k+2}\right) \\
&= \frac{1}{2} \sum_{j=0}^\infty \frac{(-1)^{j+1}}{j} \\
\sum_{i=1}^\infty h(x_{f(i)}) &= \frac{1}{2} \ln 2
\end{align*} $$
See also the Wikipedia articles on absolute convergence and the Reimann series theorem.
