Injective function -surjective If I have an injective function h: A→ $\mathbb{N}$ and I want to create a surjective function f:$\mathbb{N}$ → A. Have I to restrict its domain? Or only by definition I have it.
Thanks.
 A: Define the image of $h$ by $h(A) := \{n \in \mathbb N : \text{ there is } a  \in A \text{ with } h(a)=n \}\subseteq \mathbb N$. Then we see $$N = h(A) \cup h(A)^c.$$ Since $h$ is a injective, there is a well-defined inverse map $h^{-1} :h(A) \to A$. Then the map $f: \mathbb N \to A$ given by $$f(n) = \left\{\begin{matrix} h^{-1}(n), & n \in h(A), \\ 1, & n \in h(A)^c,\end{matrix} \right.$$ is a surjection from $\mathbb N\to A$.
EDIT 1: it is interesting to note that we can reverse the process (i.e.: given a surjection from $\mathbb N \to A$, we can construct an injection from $A \to \mathbb N$) if we assume  the axiom of choice. Indeed, if $f : \mathbb N \to A$ is a surjection, then we can define the pre-image of $a \in A$ under $f$ by $$f^{-1}(\{a\}) = \{n \in \mathbb N : f(n) = a\}.$$ Since $f$ is a surjection, $f^{-1}(\{a\})$ is non-empty for each $a \in A$ and these sets form a disjoint partition of $\mathbb N$. By the axiom of choice, for each $a \in A$, we can choose a single $n_a \in f^{-1}(\{a\})$ and the map $a \mapsto n_a$ is a injection from $A \to \mathbb N$.
EDIT 2: While the general construction in EDIT 1 requires the axiom of choice, I believe that since $\mathbb N$ is well-ordered, we don't actually need the axiom of choice since, in this case, we can take $n_a$ to be the least element of $f^{-1}(\{a\}).$ 
A: it doesn't mather which way you choose, you'd better restrict its domain on $f(A)$, if not, you can just put other elements in N to someone in A.
