Generator (category theory)

In mathematics, specifically category theory, a family of generators (or family of separators) of a category $$\mathcal C$$ is a collection $$\mathcal G \subseteq Ob(\mathcal C)$$ of objects in $$\mathcal C$$, such that for any two distinct morphisms $$f, g: X \to Y$$ in $$\mathcal{C}$$, that is with $$f \neq g$$, there is some $$G$$ in $$\mathcal G$$ and some morphism $$h : G \to X$$ such that $$f \circ h \neq g \circ h.$$ If the collection consists of a single object $$G$$, we say it is a generator (or separator).

Generators are central to the definition of Grothendieck categories.

The dual concept is called a cogenerator or coseparator.

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. In fact, any nonempty set is a generator.
 * In the category of sets, any set with at least two elements is a cogenerator.
 * In the category of modules over a ring R, a generator in a finite direct sum with itself contains an isomorphic copy of R as a direct summand. Consequently, a generator module is faithful, i.e. has zero annihilator.