{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\mathcal{C}$ be a [[category|A2DE66937D]].\nAn object $G$ of $\\mathcal{C}$ is a *generator* (or *separator*) if it has the following property.\nFor all [[morphisms|859F0TFVA3]] $f, g \\colon X \\to Y$ with $f \\neq g$, there is a morphism $h \\colon G \\to X$ with $f \\circ h \\neq g \\circ h$.\nMore generally, a set $\\mathcal{G}$ of objects is a *generating family* if for all $f \\neq g \\colon X \\to Y$ there are $G \\in \\mathcal{G}$ and $h \\colon G \\to X$ with $f \\circ h \\neq g \\circ h$.\n\n## Remarks\n\nWhen $\\mathcal{C}$ is locally small, $G$ is a generator exactly when the [[hom functor|VJXS8AK67E]] $\\Hom(G, -) \\colon \\mathcal{C} \\to \\mathbf{Set}$ is [[faithful|GRG8WEBSH5]].\nThe dual notion is a cogenerator (or coseparator): an object $C$ such that $f \\neq g \\colon X \\to Y$ implies $k \\circ f \\neq k \\circ g$ for some $k \\colon Y \\to C$.\n\nExample: in the category of [[abelian groups|082GHNPJ53]], $\\Z$ is a generator.\nIf $f \\neq g \\colon A \\to B$, pick $a \\in A$ with $f(a) \\neq g(a)$ and let $h \\colon \\Z \\to A$ be $n \\mapsto na$; then $(f \\circ h)(1) = f(a) \\neq g(a) = (g \\circ h)(1)$.\n\nNon-example: in the same category, the trivial group $0$ is not a generator.\nThe identity and the zero map of $\\Z/2\\Z$ differ, but the only morphism $h \\colon 0 \\to \\Z/2\\Z$ is zero, and both composites with $h$ are zero.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "CK08JW32WB",
    "kind": "definition",
    "msc": [
      "18A05",
      "18A20"
    ],
    "name": "Generator",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Generator_(category_theory)"
      }
    ],
    "tag": "BQC9DW8TSZ",
    "uses": [
      "A2DE66937D",
      "859F0TFVA3",
      "VJXS8AK67E",
      "GRG8WEBSH5",
      "082GHNPJ53"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/BQC9DW8TSZ/",
  "links": [
    {
      "field": "defines",
      "target": "CK08JW32WB"
    },
    {
      "field": "uses",
      "target": "A2DE66937D"
    },
    {
      "field": "uses",
      "target": "859F0TFVA3"
    },
    {
      "field": "uses",
      "target": "VJXS8AK67E"
    },
    {
      "field": "uses",
      "target": "GRG8WEBSH5"
    },
    {
      "field": "uses",
      "target": "082GHNPJ53"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/BQC9DW8TSZ.md",
  "msc": [
    "18A05",
    "18A20"
  ],
  "name": "Generator",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/BQC/BQC9DW8TSZ.md",
  "status": null,
  "tag": "BQC9DW8TSZ",
  "uri": "m2://BQC9DW8TSZ",
  "url": "https://tamnd.github.io/math2/wiki/generator-definition/",
  "writing": {
    "tag": "BQC9DW8TSZ",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
