Q:

Constructing a colimit

Consider a functor $F: \mathcal{I} \rightarrow \textrm{Sets}$ where $\mathcal{I}$ is small. Then the colimit of $F$ is given by $\amalg_{i \in \textrm{Ob}(\mathcal{I})}F(i)/{\sim}$ where $\sim$ is the equivalence relation generated by: $x \in F(i) \sim y \in F(j)$ if there exist an $\alpha \in \textrm{Mor}_{\mathcal{I}}(i, j)$ such that $F(\alpha)(x) = y$.
I am trying to mimic the same argument to find the colimit of $F$ when $F: \mathcal{I} \rightarrow \textrm{AbelianGrps}$. My first guess was $S := \oplus_{i \in \textrm{Ob}(\mathcal{I})}F(i)/{\sim}$ where $\sim$ is defined as above. The problem is I don't think $S$ is even a group. Suppose $a, b \in S$, then there exists a representative element $r_{1}, r_{2}$ such that $a \sim r_{1}$ and $b \sim r_{2}$. Then there exists $\alpha_{1}, \alpha_{2}$ such that $F(\alpha_{1})(a) = r_{1}$ and $F(\alpha_{2})(b) = r_{2}$. This doesn't seem to tell me anything on what $a + b$ is equivalent to.
My next idea was that maybe the colimit is $\oplus_{i \in \textrm{Ob}(\mathcal{I})}F(i)/H$ for some subgroup $H$. Furthermore, $H$ needs to have the property that $x \in F(i)$, $y \in F(j)$ belong to the same coset of $\oplus_{i \in \textrm{Ob}(\mathcal{I})}F(i)/H$ when there exists an $\alpha \in \textrm{Mor}_{\mathcal{I}}(i, j)$ such that $F(\alpha)(x) = y$. How would I go about constructing such an $H$?

A:

In the construction of the colimit of sets, you have to define $\sim$ as the equivalence relation generated by the relation which you have defined.
Similarly, in order to construct the colimit of algebraic structures of any type, you have to define $\sim$ as the smallest congruence relation generated by the relation (this ensures that the quotient will be again an algebraic structure of the same type). In case of abelian groups, this means that $H$ is generated by elements of the form $y-F(\alpha)(x)$ where $x \in F(i)$ and $y \in F(j)$ and $\alpha : i \to j$. The quotient by $H$ has clearly the desired universal property of a colimit.
Notice that all this is a special case of the general result that colimits may be constructed via coequalizers and coproducts.

