{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $\\mathcal{E}$ be a [[topos|6837RS7N82]] with [[subobject classifier|NKP5TPQ79X]] $\\top \\colon 1 \\to \\Omega$, and write $PX$ for the [[exponential object|RHWD8DY41R]] $\\Omega^X$.\nThe *internal language* (Mitchell–Bénabou language) of $\\mathcal{E}$ is the typed language described as follows.\n\n1. The types are the objects of $\\mathcal{E}$; the type of a [[product|S5744QZV4N]] $X \\times Y$ is the product type, and $PX$ is the power type of $X$.\n2. There are variables of each type, and each morphism $f \\colon X \\to Y$ is a function symbol from type $X$ to type $Y$.\n3. Terms are built from variables by function symbols and by pairing $\\langle \\sigma, \\tau \\rangle$.\nFor terms $\\sigma, \\tau$ of the same type, $\\sigma = \\tau$ is a term of type $\\Omega$.\nFor $\\sigma$ of type $X$ and $\\tau$ of type $PX$, the membership $\\sigma \\in \\tau$ is a term of type $\\Omega$.\nFor a term $\\varphi$ of type $\\Omega$, the comprehension $\\set{x \\in X \\mid \\varphi}$ is a term of type $PX$.\n4. A *formula* is a term of type $\\Omega$.\n\nA term $\\tau$ of type $Y$ whose free variables are $x_1 : X_1, \\dots, x_n : X_n$ is interpreted as a morphism $X_1 \\times \\cdots \\times X_n \\to Y$.\nVariables are interpreted by projections, function symbols by composition, $\\sigma = \\tau$ by the characteristic morphism of the diagonal $Y \\to Y \\times Y$, and $\\sigma \\in \\tau$ by the evaluation morphism $X \\times PX \\to \\Omega$.\nA formula $\\varphi$ is *valid* in $\\mathcal{E}$ when its interpretation equals $\\top$ composed with the unique morphism $X_1 \\times \\cdots \\times X_n \\to 1$.\n\n## Remarks\n\nThe connectives $\\wedge, \\vee, \\Rightarrow, \\neg$ and the quantifiers $\\forall, \\exists$ are definable from equality, membership and comprehension; on subobjects they act as the Heyting algebra operations and as the adjoints to [[pullback|Q05K04QJ71]].\nThe valid formulas are closed under the rules of higher-order intuitionistic logic, but not in general under the law of excluded middle.\nExample: in $\\mathbf{Set}$, a formula is valid exactly when it is true for all values of its variables in the usual sense.\nExample: a morphism $f \\colon X \\to Y$ is a monomorphism exactly when the formula $\\forall x, x' \\in X\\, (f(x) = f(x') \\Rightarrow x = x')$ is valid.\nNon-example: in the topos $\\mathrm{Sh}(\\R)$ of sheaves on the real line, the formula $\\forall p \\in \\Omega\\, (p \\vee \\neg p)$ is not valid, so excluded middle is not part of the internal logic.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "WH48X83YPJ",
    "kind": "definition",
    "msc": [
      "03G30",
      "18B25",
      "03B38"
    ],
    "name": "Internal language",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Categorical_logic"
      }
    ],
    "tag": "3CJ8XA1VAB",
    "uses": [
      "6837RS7N82",
      "NKP5TPQ79X",
      "RHWD8DY41R",
      "S5744QZV4N",
      "Q05K04QJ71"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/3CJ8XA1VAB/",
  "links": [
    {
      "field": "defines",
      "target": "WH48X83YPJ"
    },
    {
      "field": "uses",
      "target": "6837RS7N82"
    },
    {
      "field": "uses",
      "target": "NKP5TPQ79X"
    },
    {
      "field": "uses",
      "target": "RHWD8DY41R"
    },
    {
      "field": "uses",
      "target": "S5744QZV4N"
    },
    {
      "field": "uses",
      "target": "Q05K04QJ71"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/3CJ8XA1VAB.md",
  "msc": [
    "03G30",
    "18B25",
    "03B38"
  ],
  "name": "Internal language",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/3CJ/3CJ8XA1VAB.md",
  "status": null,
  "tag": "3CJ8XA1VAB",
  "uri": "m2://3CJ8XA1VAB",
  "url": "https://tamnd.github.io/math2/wiki/internal-language-definition/",
  "writing": {
    "tag": "3CJ8XA1VAB",
    "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
      }
    ]
  }
}
