# Infinite abelian group splits over pure subgroup

Given an abelian group $G$ with pure subgroup $A$ with $[G:A]<\infty$. Show that we can find a subgroup $B$ such that $G$ is the direct sum of $A$ and $B$.

I can see how to do it for a divisible subgroup (by showing that the subgroup is injective), but I can't get that approach to work in the pure case.

$G/A$ is a finite abelian group, so it is a direct product of cyclic groups: $G/A=C_1\times C_2\times\dots\times C_r$. Let $Ag_i$ be a generator of $C_i$. Suppose $C_i$ is order $k_i$. Then $g_i^{k_i}\in A$ (and is the lowest such power), so we can find $a_i\in A$ such that $g_i^{k_i}=a_i^{k_i}$. Put $h_i=g_ia_i^{-1}$. Then $Ag_i=Ah_i$ and $h_i^{k_i}=1$. The subgroup generated by $h_i$ is a cyclic subgroup of $G$ of order $k_i$. Let $B$ be the product of these cyclic groups (for $i=1,2,\dots,r$). We claim that $G$ is the direct product of $A$ and $B$.
For any $g\in G$, we have $Ag\in G/A$ so we have $g=ah_1^{n_1}h_2^{n_2}\dots h_r^{n_r}$ for some $a\in A$ and positive integers $n_1,\dots,n_r$, and hence $g\in AB$.
Suppose $g\in A\cap B$. Since $g\in B$ we have $g=h_1^{n_1}h_2^{n_2}\dots h_r^{n_r}$ for some $n_i$ where $0\le n_i<k_i$ (for each $i$) and hence $Ag=(Ah_1^{n_1})\dots(Ah_r^{n_r})$. But $g\in A$, so $Ag=A$, the identity element of $G/A$ and hence each $h_i^{n_i}\in A$ and so must be 1. Hence $g=1$. So $A\cap B=1$ and hence $G$ is the direct product of $A$ and $B$. $\Box$