# Generator (category theory)

In category theory in mathematics a generator (or separator) of a category $\mathcal C$ is an object G of the category, such that for any two different morphisms $f, g: X \rightarrow Y$ in $\mathcal C$, there is a morphism $h : G \rightarrow X$, such that the compositions $f \circ h \neq g \circ h$.

Generators are central to the definition of Grothendieck categories.

## Examples

• In the category of abelian groups, the group of integers $\mathbf Z$ is a generator: If f and g are different, then there is an element $x \in X$, such that $f(x) \neq g(x)$. Hence the map $\mathbf Z \rightarrow X,$ $n \mapsto n \cdot x$ suffices.
• Similarly, the one-point set is a generator for the category of sets.