Solution (source code)

= Solution

If $f(a)=f(a')$, applying $g$ gives $(g\circ f)(a)=(g\circ f)(a')$. The <injectivity> of $g\circ f$ implies $a=a'$, so $f$ is <injective>.