Difficulty in understanding the proof concerning universal property for coproduct $\newcommand{\set}{\mathsf{Set}}\newcommand{\in}{\operatorname{in}}\newcommand{\pr}{\operatorname{pr}}$For the Theorem: below, can someone explain to me please how injectivity and surjectivity are demonstrated.  Looking at the proof, I am also not sure why the author used the sign post "conversely" in the proof since the theorem doesn't require an if and only if proof type strategy.

Theorem:  (Universal property of coproduct)  Given two sets $a$ and $b$ and any set $c$, the function
$$\gamma:\set(a\sqcup b,c)\xrightarrow{\cong}\set(a,c)\times\set(b,c)$$
Defined by $\gamma(u)=(u\circ\in_a,u\circ\in_{b})$ is a bijection.


Proof: Clearly, a map $u:a\sqcup b\rightarrow c$ is determined by its restrictions to its partitioning subsets $\{0\}\times a$ and $\{1\}\times b$, which in turn is equivalent to the pair $u\circ\in_{a}$ and $u\circ\in_{b}$ of maps.  So $\gamma$ is injective.  Conversely, if $v:a\rightarrow c$ and $w:b\rightarrow c$ are any two functions, then we define $u((0,x))=v(x)$ and $u((1,y))=w(y)$, which shows the surjectivity of $\gamma$.

I know that with the following definition coproduct for sets:
Definition a: A coproduct of $x$ and $y$ is an object $q$ with a pair of morphisms $f:x\rightarrow q$ and $g:y\rightarrow q$ with the following property:

For any choice of objects $z$ and morphisms $f'x\rightarrow z$ and $g':y\rightarrow z$, there is a unique morphism $h:q\rightarrow z$ such that $h\circ f=f'$ and $g\circ h=g'$.

With that definition (Definition a), I can prove that:

Any two coproducts of $x$ and $y$ are isomorphic.
Proof:  Let $(q,f,g)$ and $(q',f',g')$ be coproducts, and let $z=q'$.  There are morphisms $f':x\rightarrow q'$ and $g':y\rightarrow q'$; and since $q$ is a coproduct, there is a unique morphism $h:q\rightarrow q'$ such that $h\circ f=f'$ and $h\circ g=g'$.  Similarly, there is a morphism $k:q'\rightarrow q$ such that $k\circ f'=f$ and $k\circ g'=g.$  We consider the morphisms $k\circ h$ and $1_q$ from $q$ to itself.  Then $(k\circ h)\circ f=k\circ(h\circ f) =k\circ f' =1_q\circ f=f$ and $(k\circ h)\circ g=k\circ(h\circ g) =k\circ g' =1_q\circ g=g$.  By the uniqueness part of the definition of a coproduct, $k\circ h=1_q$.   We similarly consider the morphisms $h\circ k$ and $1_{q'}$ from $q'$ to itself. Then $(h\circ k)\circ f'=h\circ(k\circ f') =h\circ f =1_{q'}\circ f'=f',$ $(h\circ k)\circ g'=h\circ(k\circ g') =h\circ g =1_{q'}\circ g'=g',$ hence $h\circ k=1_{q'}$.  Again, by the uniqueness part of the definition of a coproduct, $h\circ k=1_{q'}$.  Therefore $h$ and $k$ are inverses and each is an isomorphism.

The relevant definitions/notations and proposition for the Theorem are as follows:
Definition b:  Given two sets $a$ and $b$, the disjoint sum or coproduct $a\sqcup b$ of $a$ and $b=(\{0\}\times a)\cup (\{1\}\times b),$ together with the injections ${in}_a : a\rightarrow  a\sqcup b$ and ${in}_b : b\rightarrow  a\sqcup b$, where ${in}_a(x)=(0,x)$ and ${in}_b(y)=(1,y)$ for all $x \in a$ and $y \in b$.
Proposition 1:  If $a$ and $b$ are two sets then there is a set, denoted by $\set(a,b)$, whose elements are exactly the functions $f:a\rightarrow b$.
Thank you in advance.
 A: Let $ u, v\colon a \sqcup b \to c$ be functions satisfying $ \gamma(u) = \gamma(v) $, that is, $ u \circ \text{in}_a = v \circ \text{in}_a $ and $ u \circ \text{in}_b = v \circ \text{in}_b $. Let $ (x,y) \in a \sqcup b $. If $ x = 0 $, then
$$ u((x,y)) = u(\text{in}_a(y)) = v(\text{in}_a(y)) = v((x,y)). 
$$
Similarly, if $ x = 1 $, then
$$ 
u((x,y)) = u(\text{in}_b(y)) = v(\text{in}_b(y)) = v((x,y)). 
$$
Therefore $ u = v $. This is what the "is determined by" part means. We have proven that $ \gamma $ is injective.
Regarding the surjectivity, look at the author's proof and note that for any $ x \in a $ and $ y \in b $,
$$
(u \circ \text{in}_a)(x) = 
u((0,x)) = v(x)
$$
and
$$
(u \circ \text{in}_b)(y) =
u((1,y)) = 
w(y).
$$
Therefore $ u \circ \text{in}_a = v $ and $ u \circ \text{in}_b = w $, so
$$
\gamma(u) = 
(u \circ \text{in}_a, u \circ \text{in}_b) =
(v, w).
$$
We have found an element of $ \text{Set}(a \sqcup b, c) $ which is mapped by $ \gamma $ to $ (v, w) $. This proves the surjectivity of $ \gamma $.
