It is known that if $f:A\to B$ is injective, then the $\mathrm{Card}(A)\leq\mathrm{Card}(B)$. Similarly if $f$ is surjective, the opposite inequality holds. Can one please show me how to write down a rigorous proof for these facts?
In the particular case of one of the sets being the natural numbers $\mathbb{N}$, how can one proceed to show countability of the other set? Specifically, how to prove the following two statements?
- Suppose there exists a function $f:\mathbb{N}\to A$ which is onto. This means that for every $x\in A$ there exists $n\in\mathbb{N}$ such that $f(n)=x$. Prove that $A$ is countable.
- Suppose there exists a function $f:A\to\mathbb{N}$ which is one-to-one. This means that if $x$ and $y$ are in $A$ and $x\neq y$, then $f(x)\neq f(y)$. Prove that $A$ is countable.