{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $F$ be a set of [[Boolean functions|0X05GS525E]], that is, of operations on $\\set{0, 1}$ of arity at least $1$.\nThen $F$ is [[functionally complete|TDZVCWYJ9F]] if and only if $F$ has the following five properties.\n\n1. Some $f \\in F$ does not preserve $0$, that is, $f(0, \\dots, 0) = 1$.\n2. Some $f \\in F$ does not preserve $1$, that is, $f(1, \\dots, 1) = 0$.\n3. Some $f \\in F$ is not [[monotone|0A7KV2WB7A]] for the order $0 \\le 1$ applied coordinatewise.\n4. Some $f \\in F$ is not self-dual, where $f$ is self-dual if $f(\\neg x_1, \\dots, \\neg x_n) = \\neg f(x_1, \\dots, x_n)$ for all inputs.\n5. Some $f \\in F$ is not affine, where $f$ is affine if $f(x_1, \\dots, x_n) = c_0 + c_1 x_1 + \\cdots + c_n x_n$ modulo $2$ for some $c_i \\in \\set{0, 1}$.\n\n## Remarks\n\nEach of the five classes is a clone and does not contain all Boolean functions, so a complete $F$ cannot lie inside one of them.\nThe converse is the real content: these five clones are the maximal clones of [[Post's lattice|MA20X7JCET]].\nOne can also prove it directly by building $\\neg$ and the constants from the functions that escape the first four classes, and then $\\wedge$ from a non-affine function.\nExample: the NAND operation $x \\uparrow y = \\neg(x \\wedge y)$ maps $(0, 0)$ to $1$ and $(1, 1)$ to $0$.\nIt is not monotone, since $0 \\uparrow 0 = 1 \u003e 0 = 1 \\uparrow 1$, it is not self-dual, since $0 \\uparrow 1 = 1 = 1 \\uparrow 0$, and it is not affine.\nSo $\\set{\\uparrow}$ is functionally complete.\n\n## Explanations\n\n### L1 human\n\nThe theorem gives five simple tests for a set of logic gates.\nThe gates can build every truth table exactly when, for each test, at least one gate fails it.\nThe tests ask whether gates keep all-zeros at zero, keep all-ones at one, respect the order $0 \u003c 1$, commute with negation, or are sums modulo $2$.\n\n### L2 human\n\nThe result comes from Emil Post's study of the lattice of clones on $\\set{0, 1}$.\nIt is the two-element case of a general picture: a set of operations on a finite set is complete exactly when it is contained in no maximal clone.\nFor larger finite sets the maximal clones are listed by [[Rosenberg's classification|GF1RK91VED]], and the analogue of the theorem has more cases.\nIt explains at once why $\\set{\\wedge, \\vee}$ and $\\set{\\wedge, \\vee, \\to}$ are not complete, while $\\set{\\to, 0}$ is, with $0$ read as a constant unary function.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "TDZVCWYJ9F"
    ],
    "kind": "statement",
    "msc": [
      "06E30",
      "08A40",
      "03B05"
    ],
    "name": "Post's functional completeness theorem",
    "role": "theorem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Functional_completeness"
      }
    ],
    "tag": "WGBR7JHBV4",
    "uses": [
      "TDZVCWYJ9F",
      "0X05GS525E",
      "0A7KV2WB7A"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/WGBR7JHBV4/",
  "links": [
    {
      "field": "about",
      "target": "TDZVCWYJ9F"
    },
    {
      "field": "uses",
      "target": "TDZVCWYJ9F"
    },
    {
      "field": "uses",
      "target": "0X05GS525E"
    },
    {
      "field": "uses",
      "target": "0A7KV2WB7A"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/WGBR7JHBV4.md",
  "msc": [
    "06E30",
    "08A40",
    "03B05"
  ],
  "name": "Post's functional completeness theorem",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/WGB/WGBR7JHBV4.md",
  "status": null,
  "tag": "WGBR7JHBV4",
  "uri": "m2://WGBR7JHBV4",
  "url": "https://tamnd.github.io/math2/wiki/posts-functional-completeness-theorem/",
  "writing": {
    "tag": "WGBR7JHBV4",
    "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
      }
    ]
  }
}
