{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $F \\colon \\mathcal{C} \\to \\mathcal{C}$ be a [[functor|28NQ0KRHD3]].\nAn $F$-algebra is a pair $(A, a)$ of an object $A$ and a morphism $a \\colon F(A) \\to A$.\nA morphism of $F$-algebras $h \\colon (A, a) \\to (B, b)$ is a morphism $h \\colon A \\to B$ with $h \\circ a = b \\circ F(h)$.\nIf $(I, i)$ is an [[initial object|EK85VSSRMR]] of the category of $F$-algebras, then $i \\colon F(I) \\to I$ is an isomorphism.\n\n## Remarks\n\nThe pair $(F(I), F(i))$ is an $F$-algebra, so by initiality there is a unique algebra morphism $j \\colon (I, i) \\to (F(I), F(i))$.\nThen $i \\circ j$ is an algebra morphism from $(I, i)$ to itself, so it equals $\\id_I$ by uniqueness.\nAlso $j \\circ i = F(i) \\circ F(j) = F(i \\circ j) = \\id_{F(I)}$, using that $j$ is an algebra morphism.\nSo $j$ is the inverse of $i$.\n\nExample: on the category of sets let $F(X) = 1 + X$, where $1 = \\set{*}$.\nThe initial $F$-algebra is the set of [[natural numbers|0MWKJ44V5A]] with the map sending $*$ to $0$ and $n$ to $n + 1$.\nThe lemma says that this map $1 + \\N \\to \\N$ is a bijection: every natural number is either $0$ or a successor, in exactly one way.\n\nExample of a consequence: the [[power set|00E0YZCERH]] functor on sets has no initial algebra.\nAn initial algebra would give a bijection between a set and its power set, which Cantor's theorem rules out.\n\nThe dual statement holds as well: the structure map of a terminal $F$-coalgebra is an isomorphism.\n\n## Explanations\n\n### L1 human\n\nAn initial algebra is the smallest structure built by a recipe $F$, like the natural numbers built from zero and successor.\nThe lemma says that such a structure is a fixed point of the recipe: applying the recipe once more gives nothing new.\nFor lists, it says that every list is either empty or an element followed by a list, in a unique way.\n\n### L2 human\n\nThe lemma is the starting point of the theory of inductive and coinductive data types.\nIt shows that an initial algebra, when it exists, is a fixed point $F(I) \\cong I$ of the functor.\nIt also gives quick non-existence results, as with the power set functor.\nIts dual, for terminal coalgebras, says that infinite streams over $A$ satisfy $A \\times S \\cong S$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "28NQ0KRHD3"
    ],
    "kind": "statement",
    "msc": [
      "18C10"
    ],
    "name": "Lambek's lemma",
    "role": "lemma",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Initial_algebra"
      }
    ],
    "tag": "S9FVESJ0CS",
    "uses": [
      "28NQ0KRHD3",
      "EK85VSSRMR",
      "0MWKJ44V5A",
      "00E0YZCERH"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/S9FVESJ0CS/",
  "links": [
    {
      "field": "about",
      "target": "28NQ0KRHD3"
    },
    {
      "field": "uses",
      "target": "28NQ0KRHD3"
    },
    {
      "field": "uses",
      "target": "EK85VSSRMR"
    },
    {
      "field": "uses",
      "target": "0MWKJ44V5A"
    },
    {
      "field": "uses",
      "target": "00E0YZCERH"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/S9FVESJ0CS.md",
  "msc": [
    "18C10"
  ],
  "name": "Lambek's lemma",
  "prov": null,
  "role": "lemma",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/S9F/S9FVESJ0CS.md",
  "status": null,
  "tag": "S9FVESJ0CS",
  "uri": "m2://S9FVESJ0CS",
  "url": "https://tamnd.github.io/math2/wiki/lambeks-lemma/",
  "writing": {
    "tag": "S9FVESJ0CS",
    "kind": "statement",
    "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
      }
    ]
  }
}
