The book I am using for my Introduction of Topology course is Principles of Topology by Fred H. Croom.
I was given the following problem:
Prove that a set $E$ is countable if and only if there is a surjection from $\mathbb{N}$ to $E$.
I have a rough idea on how to prove this. Though the converse is tricky and I am having a hard time coming up with a proof to justify my claim.
$P \rightarrow Q$: Let $E$ be a nonempty countable set. By definition of a countable set, this implies there is a bijection between $\mathbb{N}$ and $E$. Therefore there is a surjection from $\mathbb{N}$ to $E$.
$Q \rightarrow P$: Let there be a surjection from $\mathbb{N}$ to $E$. Thus we have a function $f$ such that $f(\mathbb{N})=E$. Seeking to prove $E$ is countable, we have two cases: if $E$ is finite or if $E$ is infinite.
This is where I am stuck. How would I take the two cases of a finite or infinite $E$? Would I need to find (create) such a function $f$ that makes the bijection from $E$ to $\mathbb{N}$, making $E$ countable? Am I on the right track? Any suggestions?
Sorry for the rather long question. If is it rather confusing, let me know so I can clarify. I sincerely thank you for taking the time to read this question. I greatly appreciate any assistance you may provide.
As a disclaimer, I put the General-Topology tag because this question was given in a topology course.
Your definition of "countable" is inconsistent - does "countable" mean "bijectable with $\mathbb{N}$" or "maps injectively into $\mathbb{N}$" - that is, is a finite set countable?
(Let's say we're treating finite sets as countable - this is certainly the definition I'm used to, although I've seen the other used.)
Then I claim we don't need to split into cases to prove $Q\implies P$. Suppose we have a surjection $f: \mathbb{N}\rightarrow E$. I want to build an injection of $E$ into $\mathbb{N}$.
So, given $e\in E$, I need to pick some $n\in\mathbb{N}$ to match up with $e$. My naive idea is to set $n=f^{-1}(e)$, but since $f$ might not be an injection, $f^{-1}(e)$ might not be meaningful: $e$ might have more than one preimage.
Still, if only there were a way of picking a specific element of $A_e=\{m: f(m)=e\}$ . . . If all I know about $A_e$ is that it's a nonempty set of natural numbers, is there a "most efficient" element of $A_e$ I can pick?