Question about $g:A \to B$ surjective then $Hom(g,C)$ is injective

47 Views Asked by At

As I was attempting this proof, it turns out that i need to have $|C|=2$ (cardinality of $C$). Is this correct/necessary, or is it my proof wrong?

We know that $Hom(g,C) : Hom(B,C) \to Hom(A,C)$.

So if we assume that $g:A\to B$ is a surjection, then $\forall b\in B, \exists a \in A$ such that $g(a) = b$.

Now let us consider an arbitrary $a \in A$ and two functions $f, f':B\to C$, and we assume that $f\neq f'$. This means that $f(g(a))\neq f'(g(a))$ for any $a$.

Now here is where I need to assume that $C$ has at least two elements. If we do assume so, then

$Hom(g,C)(f) = f \circ g \neq f' \circ g = Hom(g,C)$ and thus we have that $f\neq f'$ implies $Hom(g,C)(f) \neq Hom(g,C)(f')$, and thus $Hom(g,C)$ is injective.

The opposite should hold as well, but for now I was focusing on this part.