In the book of algebra by Hungerford in the course of proof to the theorem that if,
i) $G = \bigl\langle \bigcup_{i \in I} N_i \bigl\rangle$, where $\{N_i \mid i\in I\}$ is a family of normal subgroups of $G$;
ii) for each $k \in I$, $N_k \cap \bigl\langle \bigcup_{i \neq k} N_{i} \bigl\rangle = \langle e \rangle$,
then $G \simeq \prod_{i \in I}^w N_i$.
We noticed that it is written that the map $\phi \colon \prod_{i \in I}^w N_i \rightarrow G$, given by $\phi(\{a_i\}) = \prod_{i \in I_0} a_i$ where $I_0$ is the finite set $\{i \in I \mid a_i \neq e\}$ is a homomorphism. But I failed to frame to show that it is a homomorphism. Please help me in framing the argument in an ‘easy to understand’ way. Thanks in advance.
Let $\{a_i\}, \{b_i\} \in \prod_{i \in I}^w N_i$. Then $$\phi(\{a_i\}\{b_i\}) = \phi(\{a_ib_i\}) = \prod_{i \in I} a_ib_i$$ where the right hand has $a_i, b_j = e$ for cofinitely many $i,j \in I$. On the other hand, $$\phi(\{a_i\})\phi(\{b_i\}) = \left( \prod_{i \in I} a_i \right)\left( \prod_{i \in I} b_i \right)$$ and thus, what we need to show is that $\prod_{i \in I} a_ib_i = \left( \prod_{i \in I} a_i \right)\left( \prod_{i \in I} b_i \right)$. If $I_0 \subset I$ is the set of indices $i \in I$ for which $a_i \neq e$ or $b_i \neq e$, then, we have that $I_0$ is finite of cardinality, say $n$, and after reindexing, we can write \begin{align} a_1b_1a_2b_2\cdots a_nb_n = (a_1a_2\cdots a_n)(b_1b_2\cdots b_n) \end{align} We show that terms can be shifted around to get the left hand side from the right hand side. Suppose $b_i \in N_i$ for some $1 \leq i < n$. Then $$ a_ia_{i+1}\cdots a_nb_i = a_ib_ia_{i+1} \cdots a_n$$ This is true because for each $j > i$, $N_j \cap N_i = e$ by assumption and hence $a_jb_i = b_ia_j$ (by a theorem in Hungerford). So, to obtain the "interleaving" product, we just apply this commutativity to each of the $b_i$ one-by-one until the $a_j$ with $j = i$ is directly to the left of $b_i$.