Let $f:B \rightarrow C$ be a function. Assume that for every pair of functions $g, h:A \rightarrow B$ such that $f \circ g=f \circ h$, we know that $g=h$. Prove that $f$ is injective.
I'm questioning about the validity of the theorem, if this theorem is true, I'm gonna try to show it:
Let $y_1,y_2 \in B$ such that $f(y_1)=f(y_2)$, I need show that $y_1=y_2$, but how i can show this?, I canĀ“t say:
Let $y_1=g(x_1)$ and $y_2=h(x_2)$ for some $x_1, x_2 \in A$ because the theorem don't say me if $g$ and $h$ are surjective functions.
I appreciate your help.
Best Answer
Take two elements in $B$, $a$ and $b$, presume that $A$ is not empty, and presume that $f(a)=f(b)$.
Define functions $h,g$ from $A$, such that $h(x)=a$ and $g(x)=b$ for all $x$ in $A$. $f \circ g = f \circ h$, and so from the assumption we know $g=h$, and therefore $a=b$, proving that $f$ is injective.