The coproduct of $A$ and $B$ is the pair $\webleft (A\coprod B,\webleft\{ \mathrm{inj}_{1},\mathrm{inj}_{2}\webright\} \webright )$ consisting of:
-
The Colimit. The set $A\mathchoice {\mathbin {\textstyle \coprod }}{\mathbin {\textstyle \coprod }}{\mathbin {\scriptstyle \textstyle \coprod }}{\mathbin {\scriptscriptstyle \textstyle \coprod }}B$ defined by
\begin{align*} A\mathchoice {\mathbin {\textstyle \coprod }}{\mathbin {\textstyle \coprod }}{\mathbin {\scriptstyle \textstyle \coprod }}{\mathbin {\scriptscriptstyle \textstyle \coprod }}B & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\coprod _{z\in \webleft\{ A,B\webright\} }z\\ & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft\{ \webleft (0,a\webright )\in S\ \middle |\ a\in A\webright\} \cup \webleft\{ \webleft (1,b\webright )\in S\ \middle |\ b\in B\webright\} , \end{align*}
where $S=\webleft\{ 0,1\webright\} \times \webleft (A\cup B\webright )$.
-
The Cocone. The maps
\begin{align*} \mathrm{inj}_{1} & \colon A \to A\mathchoice {\mathbin {\textstyle \coprod }}{\mathbin {\textstyle \coprod }}{\mathbin {\scriptstyle \textstyle \coprod }}{\mathbin {\scriptscriptstyle \textstyle \coprod }}B,\\ \mathrm{inj}_{2} & \colon B \to A\mathchoice {\mathbin {\textstyle \coprod }}{\mathbin {\textstyle \coprod }}{\mathbin {\scriptstyle \textstyle \coprod }}{\mathbin {\scriptscriptstyle \textstyle \coprod }}B, \end{align*}
given by
\begin{align*} \mathrm{inj}_{1}\webleft (a\webright ) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft (0,a\webright ),\\ \mathrm{inj}_{2}\webleft (b\webright ) & \mathrel {\smash {\overset {\mathclap {\scriptscriptstyle \text{def}}}=}}\webleft (1,b\webright ), \end{align*}
for each $a\in A$ and each $b\in B$.