Proof verification: If $gf$ is surjective and $g$ is injective, then $f$ is surjective

elementary-set-theoryfunctionsproof-verification

Proof. Let $f:A\rightarrow B$ and $g:B\rightarrow C$. Therefore, $gf:A\rightarrow C$.

According to definition, for all $c\in C$ there exists $a\in A$ such that $g(f(a))=c$.

Because $gf$ is surjective, two different values of $a$ can map the same value, hence assuming that $g(f(a_1))=g(f(a_2))$.

We know that $g$ is injective, therefore we get:

$g(f(a_1))=g(f(a_2)) \overset{def}{\Longrightarrow} f(a_1)=f(a_2)$ and thus $f$ is surjective. QED.


Is the proof correct? I have a strong sensation that I am missing something crucial…

Best Answer

You did not even try to prove that $f$ is surjective. That means that, for each $b\in B$, there is a $a\in A$ such that $f(a)=b$. Where did you prove that?

If $b\in B$, then, since $g\circ f$ is surjective, there is a $a\in A$ such that $g\bigl(f(a)\bigr)=g(b)$. But then, since $g$ is injective, $f(a)=b$.