{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $A$ and $B$ be sets and let $n \\ge 0$ be an integer.\nWrite $A^n$ for the [[Cartesian product|09CEDJYBKP]] of $n$ copies of $A$, the set of $n$-tuples of elements of $A$.\nHere $A^0$ is the set whose only element is the empty tuple.\n\n1. A [[function|0EPAT51DXQ]] $f \\colon A^n \\to B$ has *arity* $n$.\n2. A relation $R \\subseteq A^n$ has *arity* $n$.\n\nA function or relation of arity $n$ is called $n$-ary.\n\n## Remarks\n\nExample: the map $(x, y, z) \\mapsto x y + z$ from $\\R^3$ to $\\R$ has arity $3$, because its domain is $\\R^3$.\n\nNon-example: the map $\\R \\to \\R^2$, $x \\mapsto (x, x)$, has arity $1$ and not $2$, because the arity counts the factors of the domain, not of the codomain.\n\nThe arity of a function depends on how its domain is written as a power.\nA map on $\\R^2$ can be seen as a binary function on $\\R$ or as a unary function on the set $\\R^2$.\nThe words nullary, unary, binary and ternary are used for arities $0$, $1$, $2$ and $3$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "MSXX2P86CY",
    "kind": "definition",
    "msc": [
      "08A02",
      "03C07"
    ],
    "name": "Arity",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Arity"
      }
    ],
    "tag": "YZXPWC2MT1",
    "uses": [
      "0EPAT51DXQ",
      "09CEDJYBKP"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/YZXPWC2MT1/",
  "links": [
    {
      "field": "defines",
      "target": "MSXX2P86CY"
    },
    {
      "field": "uses",
      "target": "0EPAT51DXQ"
    },
    {
      "field": "uses",
      "target": "09CEDJYBKP"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/YZXPWC2MT1.md",
  "msc": [
    "08A02",
    "03C07"
  ],
  "name": "Arity",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/YZX/YZXPWC2MT1.md",
  "status": null,
  "tag": "YZXPWC2MT1",
  "uri": "m2://YZXPWC2MT1",
  "url": "https://tamnd.github.io/math2/wiki/arity-definition/",
  "writing": {
    "tag": "YZXPWC2MT1",
    "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
      }
    ]
  }
}
