{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $S$ be a [[set|0SJ3RX9TXA]], whose elements are called *sorts*.\nAn *$S$-sorted signature* $\\Sigma$ is a set of operation symbols, each with a type $s_1 \\cdots s_n \\to s$, where $n \\ge 0$ and $s_1, \\dots, s_n, s \\in S$.\nA *many-sorted $\\Sigma$-algebra* $A$ consists of:\n\n1. a set $A_s$ for each sort $s \\in S$, the carrier of sort $s$;\n2. for each symbol $f$ of type $s_1 \\cdots s_n \\to s$, a [[function|0EPAT51DXQ]] $f^A \\colon A_{s_1} \\times \\cdots \\times A_{s_n} \\to A_s$ on the [[Cartesian product|09CEDJYBKP]].\n\nA *homomorphism* $h \\colon A \\to B$ of $\\Sigma$-algebras is a family of maps $h_s \\colon A_s \\to B_s$ with $h_s(f^A(a_1, \\dots, a_n)) = f^B(h_{s_1}(a_1), \\dots, h_{s_n}(a_n))$ for every symbol $f$ of type $s_1 \\cdots s_n \\to s$ and all $a_i \\in A_{s_i}$.\n\n## Remarks\n\nExample: let $S = \\set{\\mathrm{scalar}, \\mathrm{vector}}$, with symbols $+ \\colon \\mathrm{vector}\\,\\mathrm{vector} \\to \\mathrm{vector}$, $\\cdot \\colon \\mathrm{scalar}\\,\\mathrm{vector} \\to \\mathrm{vector}$, and the field operations on the sort $\\mathrm{scalar}$.\nA vector space $V$ over a field $K$ gives an algebra with $A_{\\mathrm{scalar}} = K$ and $A_{\\mathrm{vector}} = V$; each operation sends arguments of the right sorts to the right sort.\n\nNon-example: the same data with a map $K \\times V \\to K$ in place of scalar multiplication fails clause 2, since the value of $\\cdot$ must lie in the carrier of sort $\\mathrm{vector}$.\n\nWith one sort, a many-sorted algebra is an ordinary algebra.\nBirkhoff and Lipson called these structures *heterogeneous algebras*.\nSome authors require each carrier $A_s$ to be nonempty.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "WAQJJ5GX68",
    "kind": "definition",
    "msc": [
      "08A68",
      "68Q65"
    ],
    "name": "Many-sorted algebra",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Many-sorted_logic"
      }
    ],
    "tag": "ZETPP2VJFJ",
    "uses": [
      "0SJ3RX9TXA",
      "0EPAT51DXQ",
      "09CEDJYBKP"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/ZETPP2VJFJ/",
  "links": [
    {
      "field": "defines",
      "target": "WAQJJ5GX68"
    },
    {
      "field": "uses",
      "target": "0SJ3RX9TXA"
    },
    {
      "field": "uses",
      "target": "0EPAT51DXQ"
    },
    {
      "field": "uses",
      "target": "09CEDJYBKP"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/ZETPP2VJFJ.md",
  "msc": [
    "08A68",
    "68Q65"
  ],
  "name": "Many-sorted algebra",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/ZET/ZETPP2VJFJ.md",
  "status": null,
  "tag": "ZETPP2VJFJ",
  "uri": "m2://ZETPP2VJFJ",
  "url": "https://tamnd.github.io/math2/wiki/many-sorted-algebra-definition/",
  "writing": {
    "tag": "ZETPP2VJFJ",
    "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
      }
    ]
  }
}
