Proof by contradiction that if $f$ and $f\circ g$ are injective, then $g$ is injective

discrete mathematicselementary-set-theoryfunctionssolution-verification

I would like to see if this proof by contradiction is correct.

Prove by contradiction that if $f$ and $f\circ g$ are injective, then $g$ is injective.

The premise for contradiction is:

$f$ and $f\circ g$ are injective, and $g$ is not injective.

Proof: Let $g : A\to B$ and $f:B\to C$.
Suppose $g$ is not injective and $f\circ g$ is injective.

Because $g$ is not injective, there exists $m$ and $n$ in $A$ such that $m\neq n$ and $g(m)=g(n)$.
Clearly, $f(g(m)) = f(g(n))$. Hence $$(f\circ g)(m) = (f\circ g)(n)\tag{1}$$

Because $f\circ g$ is injective. Thus, universal instantiation on the definition, give us:
$$(f\circ g)(m) = (f\circ g)(n) \implies m=n.\tag{2}$$
Modus Ponens on $(1)$ and $(2)$, we conclude that $m=n$. This contradicts the fact that $m\neq n$.

Best Answer

In this context, "Because $f\circ g$ is injective" is a sentence fragment.

Also, there is no need to argue by contradiction. Your proof is fine, sure, but it can be rewritten as follows.

Suppose $f\circ g$ is injective. Consider $m,n$ such that $g(m)=g(n)$. We have

$$\begin{align} (f\circ g)(m)&=f(g(m))\\ &=f(g(n))\\ &=(f\circ g)(n), \end{align}$$

so that $m=n$. Thus $g$ is injective.


Note that we do not need $f$ to be injective.