{
  "aliases": null,
  "backlinks": [
    {
      "field": "about",
      "target": "4YN1TB9CXN"
    },
    {
      "field": "uses",
      "target": "4YN1TB9CXN"
    }
  ],
  "body": "\n## Example\n\nLet $X$ be a set.\nThe *free magma* $M(X)$ on $X$ is defined inductively.\nEvery $x \\in X$ is an element of $M(X)$, and if $u, v \\in M(X)$, then the formal product $(u v)$ is an element of $M(X)$.\nTwo elements are equal only when they are built in the same way.\nThe [[binary operation|0M418FE7BB]] is $u \\cdot v = (u v)$.\nSo $M(X)$ is a [[magma|9689SFPVE9]].\nIts elements are the fully parenthesised nonempty words in $X$, or equivalently the binary trees with leaves labelled by $X$.\n\nIt is an [[absolutely free algebra|TTTEV3NWWM]] of the signature with one binary operation.\nCheck: $M(X)$ is generated by $X$ by construction.\nGiven a magma $N$ and a map $f \\colon X \\to N$, define $h(x) = f(x)$ and $h((u v)) = h(u) \\cdot h(v)$ by recursion on the construction.\nThis is well defined because each element has exactly one construction, and it is the only homomorphism that extends $f$.\nSo $M(X)$ is the [[free algebra|GTS4DRRMZR]] on $X$ of the variety of all magmas.\n\nFor $X = \\set{x}$, the elements with three leaves are $((x x) x)$ and $(x (x x))$, and they are different.\nThe number of elements with $n$ leaves is the Catalan number $C_{n-1}$, the number of ways to bracket a product of $n$ factors.\nIn Mathlib the free magma is `FreeMagma`.\n\n## Explanations\n\n### L1 human\n\nThe free magma is what one gets by multiplying letters without any rule at all, not even associativity.\nEvery way of putting brackets around a product gives a different element.\nFor one letter $x$ and three factors there are two elements, $(xx)x$ and $x(xx)$; for four factors there are five.\nImposing associativity on it gives the free semigroup of nonempty words.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "instance_of": [
      "TTTEV3NWWM",
      "9689SFPVE9"
    ],
    "kind": "example",
    "msc": [
      "08B20",
      "20N02"
    ],
    "name": "Free magma",
    "sources": [
      {
        "locator": "Free magma",
        "url": "https://en.wikipedia.org/wiki/Magma_(algebra)"
      }
    ],
    "tag": "ZZF8XPBG3Z",
    "uses": [
      "9689SFPVE9",
      "TTTEV3NWWM",
      "GTS4DRRMZR",
      "0M418FE7BB"
    ]
  },
  "kind": "example",
  "link": "https://tamnd.github.io/math2/node/ZZF8XPBG3Z/",
  "links": [
    {
      "field": "instance_of",
      "target": "TTTEV3NWWM"
    },
    {
      "field": "instance_of",
      "target": "9689SFPVE9"
    },
    {
      "field": "uses",
      "target": "9689SFPVE9"
    },
    {
      "field": "uses",
      "target": "TTTEV3NWWM"
    },
    {
      "field": "uses",
      "target": "GTS4DRRMZR"
    },
    {
      "field": "uses",
      "target": "0M418FE7BB"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/ZZF8XPBG3Z.md",
  "msc": [
    "08B20",
    "20N02"
  ],
  "name": "Free magma",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/ZZF/ZZF8XPBG3Z.md",
  "status": null,
  "tag": "ZZF8XPBG3Z",
  "uri": "m2://ZZF8XPBG3Z",
  "url": "https://tamnd.github.io/math2/wiki/free-magma/",
  "writing": {
    "tag": "ZZF8XPBG3Z",
    "kind": "example",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
