Originally Posted by

**shilz222** Let $\displaystyle f: X \to Y $ be a function. Prove that there exists a function $\displaystyle g: Y \to X $ such that $\displaystyle f \circ g = I_Y $ if and only if $\displaystyle f $ is a surjection.

So we first construct $\displaystyle g $(using axiom of choice) by picking a point in the preimage of $\displaystyle y $ for all $\displaystyle y $( $\displaystyle \overleftarrow{f}(Y) $). If $\displaystyle f(g(y)) = f(x) = y, \ \forall x \in X $ then $\displaystyle f $ is a surjection. If $\displaystyle f $ is a surjection, then $\displaystyle \forall y \in Y, \exists x \in X, y = f(x) $. Then $\displaystyle f(g(y)) = f(x) = y $ as required.

Is this correct?