Hi I am trying to formulate a proof for this proposition:
Let $A$ and $B$ be sets and $f$ a map such that $f:A \to B$
$f$ has a right inverse $\implies$ $f$ is surjective
The statement $f$ has a right inverse $\implies$ $\exists$ a function $g:B\to A$
such that $f\circ g(b) = id_B$ $\forall b \in B$
I'm concerned about my logic here:
"This statement implies that every element of $B$ lies in the pre-image of $f$
thus $f$ is surjective as $\forall b \in B$ $\exists$ $a \in A $ such that $f(a) = b$"
I feel this logic is not water tight and don't know how to formulate it.