I've begun a course in "Real Analysis" recently and I have this trivial exercise. Could someone check if my proof is correct?
Proposition: There exists Injective function $ f: A \rightarrow B \iff $ there exists function $ g: B \rightarrow A $ is surjective
Proof: Firstly, we prove injective function $f: A \rightarrow B \Longrightarrow g: B \rightarrow A$ is surjective Suppose $\exists f: A \rightarrow B, $ such that $ f$ is injective, i. e., $ \forall x_{1}, x_{@} \in A, x_{1} \neq x_{2} \rightarrow f(x_{1}) \neq f(x_{2})$.
By hypothesis, $\exists g: B \rightarrow A$ such that $g$ is not surjective. Then,there is at least one $ x \in A $ such that $ \forall y \in B, g(y) \neq x $. But, that is not possible, because if $f$ is injective, then all $x \in A$ correspond to some $y \in B$. Contradiction!
Now, we prove surjective function $g: B \rightarrow A \Longrightarrow f: A \rightarrow B$ is injective. Suppose $g: B \rightarrow A $ is surjective, i. e., $\forall y \in B, \exists x \in A$, such that $ g(y) = x$. By hypothesis, $\exists f: A \rightarrow B$ such that f is not injective. Then, there are $x_{1}, x_{2} \in A$ such that for $x_{1} \neq x_{2}$, there are $f(x_{1}) = f(x_{2})$. By the definition of function, that only could happen, if there is $ y \in B $ such that $ y \notin Dom(g) $. Contradiction!
So, There exists Injective function $ f: A \rightarrow B \iff $ there exists function $ g: B \rightarrow A $ is surjective. Q.E.D.
