Show that $g$ is injective How can one show that if
$g(f(x))$ is injective and $f$ is surjective then $g$ is injective?
Here is my attempt:
$g(f(x))$ is injective, so
$$g(f(a))=g(f(b)) \iff f(a)=f(b).$$
$f$ is surjective, so $f(x)=y$.
So $y=y'$ such that $f(b)=y'$.
So $g$ is injective.
Is my proof correct?

Assume that $g(a)=g(b)$. 
Since $f$ is surjective we can find $x,y$ such that $a=f(x)$ and $b=f(y)$. 
Then $g(f(x))=g(f(y))$. 
The injectivity of $g\circ f$ now ensures that $x=y$ and consequently $a=f(x)=f(y)=b$.
Proved is now that $g$ is injective.
