{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\sigma$ be a [[signature|WDVVEYD6AT]] with only function symbols and let $X$ be a set of variables.\nLet $T(X)$ be the set of [[terms|6D3WA7N2W4]] over $\\sigma$ and $X$.\nA *substitution* is a map $\\theta \\colon X \\to T(X)$.\nIts *application* to a term $t$, written $t\\theta$, is defined by recursion on $t$:\n\n1. $x\\theta = \\theta(x)$ for each variable $x \\in X$;\n2. $c\\theta = c$ for each constant symbol $c$;\n3. $f(t_1, \\ldots, t_n)\\theta = f(t_1\\theta, \\ldots, t_n\\theta)$ for each function symbol $f$ of arity $n \\ge 1$.\n\n## Remarks\n\nUsually $\\theta(x) = x$ for all but finitely many $x$, and $\\theta$ is written $\\set{x_1 \\mapsto s_1, \\ldots, x_k \\mapsto s_k}$.\nA term $s$ is an *instance* of $t$ if $s = t\\theta$ for some substitution $\\theta$.\nThe substitutions are exactly the endomorphisms of the term algebra $T(X)$, restricted to the variables.\nFor an identity $s \\approx t$, the identity $s\\theta \\approx t\\theta$ holds in every algebra in which $s \\approx t$ holds.\n\nExample: with $\\theta = \\set{x \\mapsto z \\cdot z, \\ y \\mapsto 1}$, clause 3 and clause 1 give $(x + y)\\theta = (z \\cdot z) + 1$.\n\nNon-example: the replacement of the first occurrence of $x$ in $x + x$ by $y$ is not a substitution.\nBy clauses 1 and 3, every substitution sends $x + x$ to $\\theta(x) + \\theta(x)$, which never equals $y + x$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "NCDZ969V7X",
    "kind": "definition",
    "msc": [
      "03B10",
      "08B05"
    ],
    "name": "Substitution",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Substitution_(logic)"
      }
    ],
    "tag": "XN8TQE6SRK",
    "uses": [
      "6D3WA7N2W4",
      "WDVVEYD6AT"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/XN8TQE6SRK/",
  "links": [
    {
      "field": "defines",
      "target": "NCDZ969V7X"
    },
    {
      "field": "uses",
      "target": "6D3WA7N2W4"
    },
    {
      "field": "uses",
      "target": "WDVVEYD6AT"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/XN8TQE6SRK.md",
  "msc": [
    "03B10",
    "08B05"
  ],
  "name": "Substitution",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/XN8/XN8TQE6SRK.md",
  "status": null,
  "tag": "XN8TQE6SRK",
  "uri": "m2://XN8TQE6SRK",
  "url": "https://tamnd.github.io/math2/wiki/substitution-definition/",
  "writing": {
    "tag": "XN8TQE6SRK",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
