{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "BV2GCXPDDJ"
    },
    {
      "field": "uses",
      "target": "DJEK11CXXJ"
    },
    {
      "field": "defines",
      "target": "DBWS5MMPZD"
    }
  ],
  "body": "\n## Summary\n\nThe ternary discriminator on a set $A$ is the operation $t(x, y, z)$ that returns $z$ when $x = y$ and returns $x$ otherwise.\nIt tests whether two elements are equal and chooses its output accordingly.\nAlgebras in which this operation is a term operation are called quasi-primal when they are finite.\nClasses of algebras sharing a term for it generate [[discriminator varieties|MC9MX40Z7S]], which have a very clear structure theory.\n\n## Explanations\n\n### L1 human\n\nThe discriminator is an \"if equal, then this, else that\" operation.\nIt looks at its first two arguments: if they are the same, it outputs the third, and if they differ, it outputs the first.\nOn $\\set{0, 1, 2}$, for example, $t(1, 1, 2) = 2$ and $t(1, 0, 2) = 1$.\nMany logical and algebraic structures can express this test with their own operations, and this has strong consequences.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "08B05",
      "08A40"
    ],
    "name": "Ternary discriminator",
    "sources": [
      {
        "book": "isbn:9780387905785"
      }
    ],
    "tag": "72PG6XCQ7D"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/72PG6XCQ7D/",
  "links": null,
  "markdown": "https://tamnd.github.io/math2/node/72PG6XCQ7D.md",
  "msc": [
    "08B05",
    "08A40"
  ],
  "name": "Ternary discriminator",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/72P/72PG6XCQ7D.md",
  "status": null,
  "tag": "72PG6XCQ7D",
  "uri": "m2://72PG6XCQ7D",
  "url": "https://tamnd.github.io/math2/wiki/ternary-discriminator/",
  "writing": {
    "tag": "72PG6XCQ7D",
    "kind": "concept",
    "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
      }
    ]
  }
}
