Generalized Sum with Countable Non-zero Summands

Theorem
Let $G$ be a commutative topological semigroup with identity $0_G$.

Let $I$ be an indexing set.

Let $g : I \to G$ be a mapping.

Let $\sequence{i_n}_{n \in \N}$ be a sequence in $I$:
 * $\set{g_{i_0}, g_{i_1}, g_{i_2}, \ldots} = \set{g_i \in G : i \in I, g_i \ne 0_G}$

Then:
 * the generalized sum $\ds \sum_{i \in I} g_i$ converges


 * the generalized sum $\ds \sum_{n = 1}^\infty g_{i_n}$ converges
 * the generalized sum $\ds \sum_{n = 1}^\infty g_{i_n}$ converges

In which case:
 * $\ds \sum_{i \in I} g_i = \sum_{n = 1}^\infty g_{i_n}$