{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $A$ be a [[set|0SJ3RX9TXA]], called the alphabet.\nA *word* over $A$ is a finite sequence $a_1 a_2 \\cdots a_n$ with $n \\ge 0$ and each $a_i \\in A$; the word with $n = 0$ is the empty word $\\varepsilon$.\nThe *free monoid* on $A$ is the set $A^*$ of all words over $A$ with the operation of concatenation,\n$$(a_1 \\cdots a_n)(b_1 \\cdots b_m) = a_1 \\cdots a_n b_1 \\cdots b_m,$$\nand with identity element $\\varepsilon$.\n\n## Remarks\n\nConcatenation is associative and $\\varepsilon$ is a two-sided identity, so $A^*$ is a [[monoid|0N6R902FG1]].\nUniversal property: for every monoid $M$ and every [[map|0XHDTE5YMZ]] $f \\colon A \\to M$, there is exactly one monoid homomorphism $\\bar f \\colon A^* \\to M$ with $\\bar f(a) = f(a)$ for $a \\in A$, namely $\\bar f(a_1 \\cdots a_n) = f(a_1) \\cdots f(a_n)$.\nA monoid is called free if it is isomorphic to some $A^*$.\nThe free semigroup $A^+$ is $A^*$ without the empty word.\n\nExample: for $A = \\set{a}$, the map $a^n \\mapsto n$ is an isomorphism from $A^*$ onto the monoid $(\\N, +)$ with $0 \\in \\N$.\n\nNon-example: the monoid $(\\Z, +)$ is not free.\nIn a free monoid, $uv = \\varepsilon$ forces $u = v = \\varepsilon$, because lengths add; but in $\\Z$, $1 + (-1) = 0$ with $1 \\ne 0$.\n",
  "commit": "5fc425f97f1f6b11da5892c2948ef8c5d8805665",
  "front": {
    "defines": "CV013KHVJG",
    "kind": "definition",
    "msc": [
      "20M05"
    ],
    "name": "Free monoid",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Free_monoid"
      }
    ],
    "tag": "27ZPTJP9PP",
    "uses": [
      "0N6R902FG1",
      "0SJ3RX9TXA",
      "0XHDTE5YMZ"
    ]
  },
  "kind": "definition",
  "link": "https://math2.tamnd.com/node/27ZPTJP9PP/",
  "links": [
    {
      "field": "defines",
      "target": "CV013KHVJG"
    },
    {
      "field": "uses",
      "target": "0N6R902FG1"
    },
    {
      "field": "uses",
      "target": "0SJ3RX9TXA"
    },
    {
      "field": "uses",
      "target": "0XHDTE5YMZ"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/27ZPTJP9PP.md",
  "msc": [
    "20M05"
  ],
  "name": "Free monoid",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/27Z/27ZPTJP9PP.md",
  "status": null,
  "tag": "27ZPTJP9PP",
  "uri": "m2://27ZPTJP9PP",
  "url": "https://math2.tamnd.com/wiki/free-monoid-definition/",
  "writing": {
    "tag": "27ZPTJP9PP",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
