{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $A$ be a nonempty set.\nThe *ternary discriminator* on $A$ is the following [[ternary operation|WC47MFR6GW]] $t \\colon A^3 \\to A$.\n$$t(x, y, z) = \\begin{cases} z \u0026 \\text{if } x = y, \\\\ x \u0026 \\text{if } x \\neq y. \\end{cases}$$\nA term $s(x, y, z)$ is a *discriminator term* for an algebra $A$ if its term operation on $A$ is the ternary discriminator on $A$.\n\n## Remarks\n\nExample: on a field $F$ with $q$ elements, the polynomial $s(x, y, z) = x + (z - x)\\bigl(1 - (x - y)^{q - 1}\\bigr)$ gives the discriminator.\nCheck: if $x = y$ then $(x - y)^{q - 1} = 0$ and $s = z$; if $x \\neq y$ then $(x - y)^{q - 1} = 1$ and $s = x$.\nNon-example: on $\\set{0, 1}$ the lattice term $(x \\wedge y) \\vee (y \\wedge z) \\vee (x \\wedge z)$ is not the discriminator, since at $(0, 1, 1)$ it gives $1$ while the discriminator gives $0$.\nThe discriminator satisfies $t(x, y, y) = x$, $t(x, x, y) = y$ and $t(x, y, x) = x$, so it is a [[Pixley term|5C91SFVTY7]] operation.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "72PG6XCQ7D",
    "kind": "definition",
    "msc": [
      "08B05",
      "08A40"
    ],
    "name": "Ternary discriminator",
    "sources": [
      {
        "book": "isbn:9780387905785"
      }
    ],
    "tag": "DBWS5MMPZD",
    "uses": [
      "WC47MFR6GW",
      "5C91SFVTY7"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/DBWS5MMPZD/",
  "links": [
    {
      "field": "defines",
      "target": "72PG6XCQ7D"
    },
    {
      "field": "uses",
      "target": "WC47MFR6GW"
    },
    {
      "field": "uses",
      "target": "5C91SFVTY7"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/DBWS5MMPZD.md",
  "msc": [
    "08B05",
    "08A40"
  ],
  "name": "Ternary discriminator",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/DBW/DBWS5MMPZD.md",
  "status": null,
  "tag": "DBWS5MMPZD",
  "uri": "m2://DBWS5MMPZD",
  "url": "https://tamnd.github.io/math2/wiki/ternary-discriminator-definition/",
  "writing": {
    "tag": "DBWS5MMPZD",
    "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
      }
    ]
  }
}
