I have the following problem that I am trying to figure out.
Let $(A_{i})_{i\in I}$ be a family of abelian groups and let $(B_{i})_{i\in I}$ be a collection such that $B_{i}$ is a subgroup of $A_{i}$ for each $i\in I$. Show that $\bigoplus_{i\in I}B_{i}$ is a subgroup of $\bigoplus_{i\in I}A_{i}$ and that there exists an isomorphism of abelian groups such that $$\frac{\bigoplus_{i\in I}A_{i}}{\bigoplus_{i\in I}B_{i}}\cong \bigoplus_{i\in I}\frac{A_{i}}{B_{i}}.$$ Moreover, show that if all of the groups in consideration are $R$-modules over some ring $R$, then the isomorphism above is also one of $R$-modules.
I know that the direct sum is defined as $$\bigoplus_{i\in I}M_{I}=\left\lbrace (x_{i})_{i\in I}\::\:|\{i\in I\::\:x_{i}\neq 0\}|<\infty\right\rbrace.$$ I am having some difficulty showing that $\bigoplus_{i\in I}B_{i}\leq \bigoplus_{i\in I}A_{i}$. I'm assuming that for the isomorphism part, I want to use the natural projection $$\pi:\bigoplus_{i\in I}A_{i}\to\bigoplus_{i\in I}\frac{A_{i}}{B_{i}}, \hspace{2cm} \sum_{i\in I}a_{i}\longmapsto\sum_{i\in I}(a_{i}+B_{i})$$ and then use the first isomorphism theorem. Does this approach sound reasonable? Thanks in advance for any help/suggestions!