{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nFix a countably infinite set $V$ of variables.\nThe *lambda terms* are the strings defined by these rules:\n\n1. every variable $x \\in V$ is a term;\n2. if $M$ is a term and $x \\in V$, then $(\\lambda x.\\, M)$ is a term, called an *abstraction*;\n3. if $M$ and $N$ are terms, then $(M\\, N)$ is a term, called an *application*.\n\nIn $\\lambda x.\\, M$ the variable $x$ is bound in $M$.\nTerms that differ only in the names of bound variables are identified ($\\alpha$-equivalence).\nLet $M[x := N]$ be the term obtained from $M$ by replacing the free occurrences of $x$ by $N$.\nBefore the replacement, bound variables of $M$ are renamed so that no free variable of $N$ gets bound.\nThe *untyped lambda calculus* is the set of terms together with *$\\beta$-reduction*.\nThis is the relation generated by the rule\n$$(\\lambda x.\\, M)\\, N \\to_\\beta M[x := N],$$\napplied to any subterm of a term.\n\n## Remarks\n\nExample: $(\\lambda x.\\, x\\, x)(\\lambda y.\\, y)$ is a term by rules 1 to 3, and\n$$(\\lambda x.\\, x\\, x)(\\lambda y.\\, y) \\to_\\beta (\\lambda y.\\, y)(\\lambda y.\\, y) \\to_\\beta \\lambda y.\\, y.$$\nThe last term has no further reduction, so it is a *normal form*.\n\nNon-example: the string $\\lambda x$ alone is not a term, since rule 2 requires a body $M$ after the dot.\n\nThe term $\\Omega = (\\lambda x.\\, x\\, x)(\\lambda x.\\, x\\, x)$ reduces only to itself, so it has no normal form.\nBy the Church–Rosser theorem, a term has at most one normal form up to $\\alpha$-equivalence.\n",
  "commit": "547b6eddb8f2feb8d579f2d633d22a27b7e132fc",
  "front": {
    "defines": "BD756KR8FM",
    "kind": "definition",
    "msc": [
      "03B40",
      "68N18"
    ],
    "name": "Lambda calculus",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Lambda_calculus"
      }
    ],
    "tag": "HD5KCKVPS8"
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/HD5KCKVPS8/",
  "links": [
    {
      "field": "defines",
      "target": "BD756KR8FM"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/HD5KCKVPS8.md",
  "msc": [
    "03B40",
    "68N18"
  ],
  "name": "Lambda calculus",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/HD5/HD5KCKVPS8.md",
  "status": null,
  "tag": "HD5KCKVPS8",
  "uri": "m2://HD5KCKVPS8",
  "url": "https://math2.tamnd.com/wiki/lambda-calculus-definition/",
  "writing": {
    "tag": "HD5KCKVPS8",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
