{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\sigma$ be a [[signature|WDVVEYD6AT]] and $V$ a set of variables.\nThe set of first-order *formulas* over $\\sigma$ is the smallest set of strings such that:\n\n1. if $t_1$ and $t_2$ are [[terms|6D3WA7N2W4]], then $t_1 = t_2$ is a formula;\n2. if $R$ is a relation symbol of arity $n$ and $t_1, \\dots, t_n$ are terms, then $R(t_1, \\dots, t_n)$ is a formula;\n3. if $\\varphi$ and $\\psi$ are formulas, then $\\neg \\varphi$, $(\\varphi \\land \\psi)$, $(\\varphi \\lor \\psi)$, $(\\varphi \\to \\psi)$ and $(\\varphi \\leftrightarrow \\psi)$ are formulas;\n4. if $\\varphi$ is a formula and $x \\in V$, then $\\forall x \\, \\varphi$ and $\\exists x \\, \\varphi$ are formulas.\n\nThe formulas from clauses 1 and 2 are the *atomic formulas*.\n\n## Remarks\n\nIn the signature of ordered sets, $\\forall x \\, \\exists y \\, (x \u003c y)$ is a formula.\nHere $x \u003c y$ is atomic by clause 2, $\\exists y \\, (x \u003c y)$ follows by clause 4, and then $\\forall x$ by clause 4 again.\nThe string $\\forall x \\, (x \\land y)$ is not a formula: $x$ and $y$ are terms, not formulas, so clause 3 does not apply to them.\nIn propositional logic the formulas are built from variables by clause 3 alone.\nThe [[connectives|QS0XVAN9BG]] used vary between books, since some are definable from others.\nIn Mathlib formulas with bounded variables are `FirstOrder.Language.BoundedFormula`.\n",
  "commit": "5fc425f97f1f6b11da5892c2948ef8c5d8805665",
  "front": {
    "defines": "HYJ10AF6RT",
    "kind": "definition",
    "msc": [
      "03B10",
      "03B05"
    ],
    "name": "Well-formed formula",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Well-formed_formula"
      }
    ],
    "tag": "2CHENV4DCC",
    "uses": [
      "WDVVEYD6AT",
      "6D3WA7N2W4",
      "QS0XVAN9BG"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/2CHENV4DCC/",
  "links": [
    {
      "field": "defines",
      "target": "HYJ10AF6RT"
    },
    {
      "field": "uses",
      "target": "WDVVEYD6AT"
    },
    {
      "field": "uses",
      "target": "6D3WA7N2W4"
    },
    {
      "field": "uses",
      "target": "QS0XVAN9BG"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/2CHENV4DCC.md",
  "msc": [
    "03B10",
    "03B05"
  ],
  "name": "Well-formed formula",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/2CH/2CHENV4DCC.md",
  "status": null,
  "tag": "2CHENV4DCC",
  "uri": "m2://2CHENV4DCC",
  "url": "https://math2.tamnd.com/wiki/well-formed-formula-definition/",
  "writing": {
    "tag": "2CHENV4DCC",
    "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
      }
    ]
  }
}
