{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $A$ be a set, let $m, n \\ge 1$, and let $R \\subseteq A^m$ be an $m$-ary relation on $A$.\nAn $n$-ary [[operation|EJ8YJVM9BW]] $f \\colon A^n \\to A$ is a *polymorphism* of $R$ if for all tuples\n$$(a_{1 1}, \\dots, a_{m 1}), \\; \\dots, \\; (a_{1 n}, \\dots, a_{m n}) \\in R$$\nthe tuple\n$$\\bigl(f(a_{1 1}, \\dots, a_{1 n}), \\dots, f(a_{m 1}, \\dots, a_{m n})\\bigr)$$\nis also in $R$.\nFor a set $\\Gamma$ of finitary relations on $A$, $\\operatorname{Pol}(\\Gamma)$ denotes the set of operations that are polymorphisms of every $R \\in \\Gamma$.\nFor a set $F$ of finitary operations on $A$, $\\operatorname{Inv}(F)$ denotes the set of finitary relations on $A$ of which every $f \\in F$ is a polymorphism.\n\n## Remarks\n\nExample: on $\\set{0, 1}$, the majority operation $m$ is a polymorphism of the [[binary relation|05AVARPXA2]] $R = \\set{(0, 1), (1, 0)}$.\nCheck: given three pairs $(a_j, 1 - a_j)$ in $R$, the second coordinates are the complements of the first, so $m(1 - a_1, 1 - a_2, 1 - a_3) = 1 - m(a_1, a_2, a_3)$ and the result lies in $R$.\nNon-example: the operation $\\wedge$ on $\\set{0, 1}$ is not a polymorphism of the same $R$, since applying it to $(0, 1)$ and $(1, 0)$ gives $(0, 0) \\notin R$.\nFor a unary relation $B \\subseteq A$, the polymorphisms are the operations under which $B$ is closed, so $B$ is a subuniverse.\nFor an equivalence relation, the polymorphisms are the operations compatible with it, as in the definition of a congruence.\nIf $A$ carries a relational structure, its polymorphisms are the homomorphisms from its $n$-th power to itself.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "A0K9EZRM7E",
    "kind": "definition",
    "msc": [
      "08A40",
      "08A02"
    ],
    "name": "Polymorphism of a relation",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Clone_(algebra)"
      }
    ],
    "tag": "A1MRBS3Z5C",
    "uses": [
      "EJ8YJVM9BW",
      "09CEDJYBKP",
      "05AVARPXA2"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/A1MRBS3Z5C/",
  "links": [
    {
      "field": "defines",
      "target": "A0K9EZRM7E"
    },
    {
      "field": "uses",
      "target": "EJ8YJVM9BW"
    },
    {
      "field": "uses",
      "target": "09CEDJYBKP"
    },
    {
      "field": "uses",
      "target": "05AVARPXA2"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/A1MRBS3Z5C.md",
  "msc": [
    "08A40",
    "08A02"
  ],
  "name": "Polymorphism of a relation",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/A1M/A1MRBS3Z5C.md",
  "status": null,
  "tag": "A1MRBS3Z5C",
  "uri": "m2://A1MRBS3Z5C",
  "url": "https://tamnd.github.io/math2/wiki/polymorphism-of-a-relation-definition/",
  "writing": {
    "tag": "A1MRBS3Z5C",
    "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
      }
    ]
  }
}
