Prove equivalence of conditions for a function 1) function $f:A\rightarrow B$ is injective function
2) function $ f:A\rightarrow B$ $\exists_{r:B\rightarrow A} fr=id_{A}$
3) function $ f:A\rightarrow B$ $\forall_{g:C\rightarrow A, h:C\rightarrow A} fg=fh \Rightarrow g=h $
Prove that the following conditions are equivalent.
I tried to do $(3)\rightarrow(1) $
suppose (3) and it is not 1-1
$\exists_{a,b \in A} f(a)=f(b) $ and $a\not= b$ then $\forall_{c \in C} f(g(c))=f(h(c))$ and $c\not= c$ contradiction.
I don't know how to do rest. Any help will be appreciated.
 A: Suppose $f\colon A\to B$ is injective. We define $r\colon B\to A$ in the following way. If $y\in B$ is such that there exists an $x\in A$ with $f(x)=y$, then set $r(y)=x$ - this is well defined because $x$ is unique by injectiveness of $f$. If no such $x$ exists, then set $f(y)=x_0$ for some arbitrary choice of $x_0\in A$. We check the required property. Let $x\in A$, then $r\circ f(x)=r(f(x))=r(y)=x=\mbox{Id}_A(x)$ and so $r\circ f=\mbox{Id}_A$.
This shows $(1)\rightarrow (2)$. (I should note that the assumption that $A$ is non-empty has been implicitly used as otherwise there exist no function $B\to A$.)
Your proof or $(3)\rightarrow (1)$ doesn't look right. Why does $f(g(c))=f(h(c))$ imply that $c\neq c$?
I would prove this in the following way. Let $a\neq b$ be such that $f(a)=f(b)$ under the assumption that $(3)$ is true and $(1)$ is false for some $f\colon A\to B$. Let $C=\{1\}$ and let $g\colon C\to A$ be given by $g(1)=a$ and $h\colon C\to A$ be given by $h(1)=b$. By construction $g\neq h$, however $f\circ g(1)=f(a)$ and $f\circ h(1)=f(b)=f(a)$ so it must be the case that $f\circ g=f\circ h$. This contradicts $(3)$ as $g$ and $h$ are not equal.
I'll leave $(2)\rightarrow (3)$ to you. Hopefully the above will help with that.
