Proof verification (sets & logic) Question:
Let $f$: $\mathbb{N} \rightarrow \mathbb{Z}$ be a function that is eventually zero. i.e: There exists some $N \in \mathbb{N}$ s.t  $f(n)=0$ for all $n \geq \mathbb{N}$. Prove that the set of such functions is countable.
Proof:
Define $g$: $\mathbb{N} \rightarrow \mathbb{Z}$ s.t $$
g(i) = \left\{
        \begin{array}{ll}
            f(i) & \quad i \in \{0,1…N-1\} \\
            0 & \quad  , otherwise
        \end{array}
    \right.
$$
Let $B_n=\{h|h: \{0,1…N-1\}\rightarrow \mathbb{Z}$}. Clearly, $B_n$ is equal to $N$ copies of $\mathbb{Z}$. Hence, it's countable.
Let $G=\{f|f: \mathbb{N}\rightarrow \mathbb{Z}\}$ is eventually zero}.
So, $G = \cup_{N=1}^{\infty} B_n$. Countable union of countable sets is countable. So is $G$.
Is my approach correct?

Your proof is correct. Here are some points of feedback.


*

*Your definition of $g$ depends on a specific $f$ and is actually just the same as that $f$. It does not really do anything in your proof, so just leave it out.

*It is not quite true that $G = \bigcup_{N=1}^\infty B_n$, because the maps in $B_n$ do not have domain $\mathbb{N}$. They can however easily be made into maps with domain $\mathbb{N}$ (which is clearly what you mean), you should say this (and how).

*A few small issues with notation, it is a bit sloppy. There is a $\}$ too many in the definition of $G$. The set $B_n$ depends on $n$ not on $N$ in its notation. That kind of thing. Not really a problem here, but in bigger proofs it will get confusing.

