Doubt proving that $(\forall f,f' \quad g\circ f = g\circ f' \implies f=f' ) \implies g \text{ is injective}$? I am trying to understand the proof of:

(ii) The function $g : b \to c$ is mono iff the following condition holds: for any two functions $f,f' : a \to b$, $g \circ f = g \circ f'$ implies $f=f'$

Transcribed here, the text has the argument for the converse:

(ii) [...] Conversely, take $u,v \in b$ such that $g(u) = g(v)$. Define two maps $f,f' : 1 \to b$ by $f(0) = u$ and $f'(0) = v$. Then $g \circ f = g \circ f'$. So $f = f'$, but this means $u = f(0) = f'(0) = v$, therefore $g$ is injective.

I understand the forward implication well. For the converse however, I am a bit confused: We want to prove that
$$(\forall f,f' \quad g\circ f = g\circ f'  \implies f=f' ) \implies g \text{ is injective}$$

*

*So, it seems they proceed to prove that $(\forall f,f' \quad g\circ f = g\circ f'  \implies f=f' )$ is true but he picks specific functions $f,f'$ for that. Shouldn't it be for all $f,f'$?


*Now, they come to the conclusion that $g\circ f = g\circ f'$ and hence $f=f'$. But why is that?
 A: More Thorough Proof Explanation:
We already know, as given, that $g \circ f = g \circ f' \implies f = f'$ for every pair of functions $f,f'$.
This means it holds for a pair of specific functions $f,f'$ as well. It isn't this step that strictly requires that $\forall f,f'$, but the other direction instead.
So we pick a pair of functions which works conveniently for us, $f,f' : \{0\} \to b$ with $f(0) = u$ and $f'(0) = v$ (where $g(u) = g(v)$). Then
$$(g \circ f)(0) = (g \circ f')(0)$$
But, by our assumption, $f,f'$ are a pair for which that this equality gives us
$$f = f' \text{ i.e. } f(0) = f'(0)$$
But then
$$f(0) = f'(0) \implies u = v$$
which gives injectivity.

Responding to Concerns:
So, to answer your questions:

*

*Sometimes only one direction of a proof might need a $\forall$ sort of quantifier, whereas the other direction is just fine with specific items. In this case, we're ultimately showing the injectivity of $g$, so we choose two nice enough functions so that they satisfy $g \circ f = g \circ f'$. We assume that implies $f = f'$, and then that ultimately gets us $u=v$ for injectivity, on the premise $g(u) = g(v)$.


*That $g \circ f = g\circ f'$ comes easily enough. This in turn implies, by our assumption, that $f=f'$. (That is, whenever we know $g \circ f = g \circ f'$ in this direction of the proof, we automatically can conclude that $f = f'$.)
However, to elaborate more, consider what this means: two functions are equal iff they have the same domain, codomain, and take on the same values for the same inputs. The first two are clear from how we chose $f,f'$. The third must also hold though, and that we know $f(0) = f'(0)$ (since $0$ is the only element of their domains). But $u=f(0)$ and $v = f'(0)$. Therefore, $u=v$. This all starts, in effect, with the assumption that $g(u) = g(v)$, and we can derive that $u=v$. Therefore, $g$ is injective.
A: You are proving the implication $$(\forall f,f' \quad g\circ f = g\circ f'  \implies f=f' ) \implies g \text{ is injective}.$$  That means you don't need to prove $(\forall f,f' \quad g\circ f = g\circ f'  \implies f=f' )$.  Instead, you get to assume $(\forall f,f' \quad g\circ f = g\circ f'  \implies f=f' )$ is true, and use that assumption to prove that $g$ is injective.
So, you are assuming that $ g\circ f = g\circ f'  \implies f=f'$ for any $f$ and $f'$.  In particular, then, this implication holds for whatever $f$ and $f'$ you choose.  The proof proceeds by defining some specific $f$ and $f'$ (in terms of an arbitrary pair of elements $u,v\in b$ such that $g(u)=g(v)$), verifying that $g\circ f=g\circ f'$ for these specific $f$ and $f'$, and then concluding by hypothesis that $f=f'$ (and therefore that $u=v$).
