I have to prove the following:
Let $(G,+)$ be a finitely generated and torsion-free abelian group then $G\cong \mathbb{Z}^d$ where $d$ is the cardinality of the smallest possible generating set of $G$.
I've come up with a proof that shows $G\cong \mathbb{Z}^d$ but I dont use the fact that $G$ is a torsion-free group which is odd to say the least.
Is this hypothesis necessary ? Have I made a careless mistake in my proof ?
Here is the proof:
$G = \langle g_1, g_2, ..., g_d\rangle$
Let $f : G \rightarrow \mathbb{Z}^d : g = \sum_{i = 1}^d a_ig_i \mapsto (a_1,a_2, ..., a_d)$.
Then $f$ is a homophormism:
Let $g' = \sum_{i=1}^d a_i'g_i \in G \; $and $ g = \sum_{i = 1}^d a_ig_i \in G$
$$f(g+g') = (a_1 + a_1', ...,a_d + a_d') = (a_1,a_2, ..., a_d) + (a_1',a_2', ..., a_d') = f(g) + f(g')$$
We have $\operatorname{Ker}(f) = \{ g \in G | \; f(g) = 0 \} = \{e \}$:
Let $g = \sum_{i = 1}^d a_ig_i \in\operatorname{Ker} (f)$ then $$f(g) = (a_1, ...,a_d) = (0, ..., 0) \iff a_i = 0 \; \forall i = 1,2 , ...,d \Rightarrow g = 0.$$ Therefore $\operatorname{Ker}(f) \subseteq \{0\} \Rightarrow\operatorname{Ker}(f) = \{0\}$ and f is an injective function.
We have that $\operatorname{Im}(f) = \mathbb{Z}^d:$
Let $z =(z_1,z_2, ...,z_d) \in \mathbb{Z}^d$ and define $g = \sum_{i = 1}^d z_i g_i$ and $f(g) = z$
Therefore $f$ is an isomorphism and $G \cong \mathbb{Z}^d$