{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\sigma$ be a signature with only function symbols, let $X$ be a set of variables, and let $s, t$ be [[terms|6D3WA7N2W4]] over $\\sigma$ and $X$.\nA *unifier* of $s$ and $t$ is a [[substitution|NCDZ969V7X]] $\\theta$ with $s\\theta = t\\theta$, equality meaning identical terms.\nA unifier $\\theta$ is a *most general unifier* if the following holds for every unifier $\\eta$ of $s$ and $t$.\nThere is a substitution $\\rho$ with $x\\eta = (x\\theta)\\rho$ for every variable $x$.\n*Unification* is the problem of deciding whether two given terms have a unifier and of finding a most general one.\n\n## Remarks\n\nIf $s$ and $t$ have a unifier, then they have a most general unifier, unique up to renaming of variables, and Robinson's algorithm finds it.\nThe same notions apply to finite sets of pairs of terms, which are unified simultaneously.\nIn $E$-unification one asks instead for $s\\theta \\approx t\\theta$ to follow from a set $E$ of identities.\n\nExample: $s = f(x, b)$ and $t = f(a, y)$, with constants $a, b$, have the unifier $\\theta = \\set{x \\mapsto a, \\ y \\mapsto b}$.\nIndeed $s\\theta = f(a, b) = t\\theta$, and $\\theta$ is most general because every unifier must send $x$ to $a$ and $y$ to $b$.\n\nNon-example: $x$ and $f(x)$ have no unifier.\nFor every substitution $\\theta$, the term $f(x)\\theta = f(x\\theta)$ has one more symbol than $x\\theta$, so they are never identical.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "RJJ9D0WF53",
    "kind": "definition",
    "msc": [
      "68V15",
      "03B35",
      "08B05"
    ],
    "name": "Unification",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Unification_(computer_science)"
      }
    ],
    "tag": "MKY6BQHRJM",
    "uses": [
      "NCDZ969V7X",
      "6D3WA7N2W4"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/MKY6BQHRJM/",
  "links": [
    {
      "field": "defines",
      "target": "RJJ9D0WF53"
    },
    {
      "field": "uses",
      "target": "NCDZ969V7X"
    },
    {
      "field": "uses",
      "target": "6D3WA7N2W4"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/MKY6BQHRJM.md",
  "msc": [
    "68V15",
    "03B35",
    "08B05"
  ],
  "name": "Unification",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/MKY/MKY6BQHRJM.md",
  "status": null,
  "tag": "MKY6BQHRJM",
  "uri": "m2://MKY6BQHRJM",
  "url": "https://tamnd.github.io/math2/wiki/unification-definition/",
  "writing": {
    "tag": "MKY6BQHRJM",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
