{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\mathcal{C}$ be a locally small [[category|A2DE66937D]], and let $[\\mathcal{C}^{\\mathrm{op}}, \\mathbf{Set}]$ be the [[functor category|1X0WKFQX8K]] of [[presheaves|AND2WHZC8P]] on $\\mathcal{C}$, with [[natural transformations|KYCPCC57FT]] as morphisms.\nThe *Yoneda embedding* is the [[functor|28NQ0KRHD3]] $y \\colon \\mathcal{C} \\to [\\mathcal{C}^{\\mathrm{op}}, \\mathbf{Set}]$ given by:\n\n1. on objects, $y(A) = \\Hom(-, A)$, the contravariant [[hom functor|VJXS8AK67E]] of $A$;\n2. on morphisms, for $f \\colon A \\to B$, $y(f) \\colon \\Hom(-, A) \\to \\Hom(-, B)$ is the natural transformation with components $y(f)_X(g) = f \\circ g$ for $g \\colon X \\to A$.\n\n## Remarks\n\nThe components $y(f)_X$ are natural in $X$ because $f \\circ (g \\circ h) = (f \\circ g) \\circ h$.\nBy the [[Yoneda lemma|D6DF1ARPVD]] with $F = \\Hom(-, B)$, the map $f \\mapsto y(f)$ is a bijection $\\Hom(A, B) \\to \\mathrm{Nat}(y(A), y(B))$, so $y$ is [[full and faithful|GRG8WEBSH5]].\nSince $y$ is fully faithful, $y(A) \\cong y(B)$ implies $A \\cong B$.\nThe dual functor $A \\mapsto \\Hom(A, -)$ embeds $\\mathcal{C}^{\\mathrm{op}}$ into $[\\mathcal{C}, \\mathbf{Set}]$.\n\nExample: let $P$ be a preorder seen as a category, with one morphism $a \\to b$ when $a \\le b$.\nThen $y(a)$ is the presheaf with $y(a)(x)$ a one-point set when $x \\le a$ and empty otherwise, so $y$ sends $a$ to the down-set $\\set{x : x \\le a}$.\nThe map $a \\mapsto \\set{x : x \\le a}$ is the classical embedding of a preorder into its down-sets ordered by inclusion.\n\nNon-example: the assignment $A \\mapsto \\Hom(A, -)$ is not a functor $\\mathcal{C} \\to [\\mathcal{C}, \\mathbf{Set}]$; a morphism $f \\colon A \\to B$ induces $\\Hom(B, -) \\to \\Hom(A, -)$, which goes the wrong way, so clause 2 fails for this assignment.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "4DKB6AQ8J7",
    "kind": "definition",
    "msc": [
      "18A25",
      "18A22"
    ],
    "name": "Yoneda embedding",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Yoneda_lemma"
      }
    ],
    "tag": "F9RQZ6EPS7",
    "uses": [
      "A2DE66937D",
      "28NQ0KRHD3",
      "VJXS8AK67E",
      "AND2WHZC8P",
      "KYCPCC57FT",
      "1X0WKFQX8K",
      "D6DF1ARPVD",
      "GRG8WEBSH5"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/F9RQZ6EPS7/",
  "links": [
    {
      "field": "defines",
      "target": "4DKB6AQ8J7"
    },
    {
      "field": "uses",
      "target": "A2DE66937D"
    },
    {
      "field": "uses",
      "target": "28NQ0KRHD3"
    },
    {
      "field": "uses",
      "target": "VJXS8AK67E"
    },
    {
      "field": "uses",
      "target": "AND2WHZC8P"
    },
    {
      "field": "uses",
      "target": "KYCPCC57FT"
    },
    {
      "field": "uses",
      "target": "1X0WKFQX8K"
    },
    {
      "field": "uses",
      "target": "D6DF1ARPVD"
    },
    {
      "field": "uses",
      "target": "GRG8WEBSH5"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/F9RQZ6EPS7.md",
  "msc": [
    "18A25",
    "18A22"
  ],
  "name": "Yoneda embedding",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/F9R/F9RQZ6EPS7.md",
  "status": null,
  "tag": "F9RQZ6EPS7",
  "uri": "m2://F9RQZ6EPS7",
  "url": "https://tamnd.github.io/math2/wiki/yoneda-embedding-definition/",
  "writing": {
    "tag": "F9RQZ6EPS7",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      },
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
