In which cases does the following hold: Let $f_n$ be a sequence of functions, then $$\sup_{k\in \mathbb N}\left(\sum_{n}^if_k(n)\right) =\sum_{n}^i \sup_{k\in \mathbb N}f_k(n).$$
I guess if the $f_k(n)$ are always positive? When I can swap the supremum and the summation when I deal with infinite sums?
For simplicity, let's say you have a finite set of functions $f_k$, $k = 1 \ldots K$, and a finite set of $n$'s, $n=1..N$, and you want
$$ \sup_{k=1 \ldots K}\sum_{n=1}^N f_k(n) = \sum_{n=1}^N \sup_{k=1\ldots K} f_k(n) \tag{1}$$ Note that you always have $$f_j(n) \le \sup_{k=1\ldots K} f_k(n)\tag{2}$$ so $$ \sum_{n=1}^N f_j(n) \le \sum_{n=1}^N \sup_{k=1\ldots K} f_k(n) \tag{3}$$ and therefore $$ \sup_{k=1\ldots K}\sum_{n=1}^N f_k(n) \le \sum_{n=1}^N \sup_{k=1\ldots K} f_k(n) \tag{4}$$ Moreover, in order to have equality in (4), you need equality in (3) for some $j$, and that in turn requires equality in (2) for all $n$. That is, the necessary and sufficient condition is that there is some $j$ where the maximum is attained for all $n$.
An infinite set of $n$'s doesn't change anything, as long as the sums always converge.
For an infinite set of $k$'s, things can be rather more complicated.