I've been working on a proof that states if $X$ is an infinite set, then there exists an injection $f: \mathbb{N} \to X$.
Here is the proof I came up with:
Let $X$ be an infinite set.
We will construct the injection $f: \mathbb{N} \to X$ inductively.
For the base case, define $f_1: \{1\} \to X$ by setting $f_1(1)=x_1$ for some $x_1 \in X$.
Now, assume that for some $n \in \mathbb{N}$, we have an injective function $f_n: \{1, \ldots, n\} \to X$.
We can extend $f_n$ to $f_{n+1}: \{1, \ldots, n+1\} \to X$ as follows: $$ f_{n+1}(k) = \begin{cases} f_n(k) & \text{if } k \in \{1, \ldots, n\} \\ x_{n+1} & \text{if } k = n+1 \end{cases} $$ where $x_{n+1}$ is an element of $X$ not in the image of $f_n$. Such an element exists because $X$ is infinite and the image of $f_n$ is finite. By construction, $f_{n+1}$ is injective.
Therefore, by the principle of induction, there exists an injection $f: \mathbb{N} \to X$.
While working on this proof, I realized, that I don't really understand Induction. For example, in the above proof, does induction imply the existence of an injective function $f: \mathbb{N} \to X$ or does it only give me an injective function $f_n: \{1, \ldots, n\} \to X$ for some arbitrary $n \in \mathbb{N}$? In other words, does induction extend the domain of the function from the finite set $\{1, \ldots, n\}$ to the infinite set $\mathbb{N}$?
The way I understand it, the proof constructs infinitely many injective functions $f_1, f_2, f_3 \ldots$ and as $n \to \infty$ the domain should eventually be $\mathbb{N}$.
I would really appreciate if you could help me understand if this is actually the case.