This is my definition of linearly independent elements in an abelian group:
Let $A$ be an abelian group, let $X \subseteq A$ be a subset and $x_1,\dots,x_k \in X$ with $x_i \neq x_j$ for all $1 \leq i \neq j \leq n$. The elements $x_1,\dots,x_k$ are defined to be linearly independent if they satisfy the following condition:
\begin{equation} n_1x_1 + \dots + n_kx_k = 0 \, , \, \text{with} \hspace{2mm} n_1,\dots,n_k \in \mathbb{Z} \implies n_i = 0 \hspace{2mm} \text{for all} \hspace{2mm} 1 \leq i \leq n\end{equation}
I'm proving theorem 1.6 of Hungerford's Algebra and got stuck at "Either $G \cap H = \{0\}$, in which case $G = \langle d_1x_1 \rangle$ and the theorem is true [...]". Why is $d_1x_1$ linearly independent? I need this in order to say that $\{d_1x_1\}$ is a basis of $G$. I'm pretty sure this comes from the fact that $d_1x_1 \neq 0$, but linearly independence does not seem to be true because $nd_1x_1 = 0$ might be true even though $n \neq 0$. For example, if $d_1x_1$ is an element of order $n$. So, is the implication \begin{equation} n(d_1x_1) = 0 \quad \wedge \quad d_1x_1 \neq 0 \quad \implies \quad n = 0 \end{equation} true or false in the context of abelian groups? What if we consider free abelian groups instead? If it's always false, then how is the linearly independence proven in Hungerford's proof?


You’re correct that, for general abelian groups, any set containing finite order elements is not linearly independent.
For example, in $\mathbb{Z}/4\mathbb{Z}$ I can take $n = 2$ and $x_1 = 2$. Then neither element is zero, but $2\cdot2 = 0$. Thus $\{2\}$ is not linearly independent.
However, in the free abelian case, this fails. If $nx_1 = 0$ for $n\ne 0$ then this implies $x_1$ has finite order. No nontrivial element of any free abelian group has finite order, so this won’t occur in your case.