Does this proof look fine or contain gaps? Do you have suggestions? Many thanks for your dedicated help!
Suppose that $f$ is a mapping from a set $A$ to a finite set $B$. If $A$ is finite and $|A| > |B|$, then $f$ is not injective. If $A$ is infinite, then there exists $b \in B$ such that $f^{−1}[\{b\}]$ is infinite.
- If $A$ is finite and $|A| > |B|$, then $f$ is not injective
Lemma: Suppose that $B$ is finite and that $g:B\to A$ is surjective. Then $A$ is finite and $|A|\le|B|$. (I presented a proof here)
Assume the contrary that $f$ is injective. We define a mapping $g$ from $B$ to $A$ by $g(b)=f^{-1}(b)$ for all $b\in\operatorname{ran}f$ and $g(b)=\bar a$ for all $b \in B\setminus \operatorname{ran}f$ for some $\bar a \in A$. We have $f^{-1}[\operatorname{ran}f]= \operatorname{dom}f$ $=A$. Thus $g[\operatorname{ran}f]=A$. Hence $g:B\to A$ is surjective. Moreover, $B$ is finite, then $A$ is finite and $|A|\le|B|$ by Lemma. This contradicts the fact that $|A|>|B|$. Hence $f$ is not injective.
- If $A$ is infinite, then there exists $b \in B$ such that $f^{−1}[\{b\}]$ is infinite
Lemma: Finite union of finite sets is finite
Assume the contrary that $f^{−1}[\{b\}]$ is finite for all $b\in B$. It's clear that $\bigcup\limits_{b\in B}f^{−1}[\{b\}]=A$. Furthermore, $\bigcup\limits_{b\in B}f^{−1}[\{b\}]$ is a finite union of finite sets. It follows from the Lemma that $A=\bigcup\limits_{b\in B}f^{−1}[\{b\}]$ is finite. This contradicts the fact that $A$ is infinite. Hence there exists $b\in B$ such that $f^{−1}[\{b\}]$ is infinite.