I'm trying to prove the surjectivity of $g: Y \to X$ in $g \circ f =id_X$ (with $f: X \to Y$) and would appreciate any corrections.
$$$$ Definition of surjectivity:$$\forall x \in X \exists y \in Y: g(y)=x$$
$$((g(y)=x \land g(y) \in g(Y)) \implies x \in g(Y)$$ $$\implies X \subset g(Y)$$ $$(X \subset g(Y) \land X \supset g(Y)) \Leftrightarrow (X = g(Y))$$
How can I also specify that the implication in the 2nd to last line is a result of the all quantifier in the defeinition of surjecitivity? Thanks a lot!