# Free abelian groups clarification

I'm having troubles understanding the following definition of a free abelian group: $$\mathbb{Z}^{(A)} := \{f: A\rightarrow \mathbb{Z} \ |\ f(a)\ne 0\ \ \text{for finitely many elements}\ a \in A\}$$

I don't get how to write an element of this set as a formal sum. On the internet I could find such a representation: $$f = \sum_{a \in A}{n_a\phi_a}$$ Where $\phi_a(x) = \begin{cases} \text{1,} &\quad\text{if x}\ = \text{a} \\ \text{0,} &\quad\text{if x}\ \ne \text{a}\\ \end{cases}$

The problem is, I don't udnerstand what $n_a$ is here, many resources don't mention what this is. For example, on Wikipedia it's writtten as a function, but this doesn't feel natural to me. Is $n_a\phi_a$ a function composition then? An integer value seems to fit here more.

I am totally fine with less general definition of a free group $\mathbb{Z}^{\oplus n} = \underbrace{\mathbb{Z}\oplus\ .\ .\ .\ \oplus\mathbb{Z}}_\text{n-times}$. With an element of $\mathbb{Z}^{\oplus n}$ being a tuple $(m_1, ..., m_n)$ that can be written in a unique way as a sum: $$\sum_{i = 1}^n{m_i\phi(i)}$$ With $\phi(i) := \underset{\text{i-th place}}{(0,\ .\ .\ .,\ 0,\ 1,\ 0,\ .\ .\ .\ ,\ 0)} \in \mathbb{Z}^{\oplus n}$ and $m_i$ being some integer coefficient.

I understand that $\mathbb{Z}^{(A)}\cong \mathbb{Z}^{\oplus n}$ if, for example, if $A =\{1,\ .\ .\ .\ , n\}$, then $(m_1, ..., m_n)$ may be identified with a function $A\rightarrow \mathbb{Z}$ taking $i$ to $m_i$. But I don't understand how to put this information together and define an element of $\mathbb{Z}^{(A)}$ via sum.

Moreover, should group homomorphism $\psi:\mathbb{Z}^{(A)} \rightarrow G$ ($G$ is an arbitrary abelian group) be defined as $$\psi(\sum_{a \in A}{n_a\phi_a}):= \sum_{a \in A}{n_af(a)}$$ where $f:A\rightarrow G$ is a set function (a forgetful functor, in fact). Again, only integer value $n_a$ feels ok for me.

Another point of confusion is the fact that only finite sums are used, $\mathbb{Z}^{(A)}$ is defined to have function with only finitely many non-zero values. Why is that? I don't have an intuitive understanding in what way infinities could 'break' free groups as I was only given a definition but no explanation why.

$\mathbb{Z}^{(A)}$ is not the definition of a free abelian group, but rather an explicit construction.
A basis for $\mathbb{Z}^{(A)}$ is given by $\{\phi_a : a \in A\}$. The representation of elements in that basis is explicit: $$f = \sum_{a \in A}{f(a)\phi_a}$$ Since $f$ is zero at almost every point of $A$, this is a finite sum. So, the answer to your first question is that $n_a$ is just an integer: $n_a=f(a)$.
About your last point, the simplest example is the Baer–Specker group $\mathbb Z ^{\mathbb N}$ of all integer sequences. This is the same as the set of all functions $\mathbb N \to \mathbb Z$ with componentwise addition. Baer proved that the Baer–Specker group is not free abelian, a nontrivial theorem.*