{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Statement\n\nLet $\\mathcal{V}$ be a [[variety|AJNZJD8442]] of algebras of a finitary signature, regarded as a category with homomorphisms.\nLet $U \\colon \\mathcal{V} \\to \\mathbf{Set}$ be the [[forgetful functor|WV3BPYCHVG]] and let $F \\colon \\mathbf{Set} \\to \\mathcal{V}$ be the [[free functor|N353JF8RBK]], its left adjoint.\nLet $\\mathbb{T} = (U F, \\eta, \\mu)$ be the [[monad|FF6XXA6D1A]] on $\\mathbf{Set}$ [[induced by this adjunction|DF5N0PK3ZS]], and let $\\mathbf{Set}^{\\mathbb{T}}$ be its [[Eilenberg–Moore category|FEPRJR3MND]] of [[$\\mathbb{T}$-algebras|QG1ZXRC8EH]].\nThen the comparison functor $K \\colon \\mathcal{V} \\to \\mathbf{Set}^{\\mathbb{T}}$, which sends an algebra $A$ to the $\\mathbb{T}$-algebra $(U A, U \\varepsilon_A)$ where $\\varepsilon_A \\colon F U A \\to A$ is the counit, is an isomorphism of categories.\n\n## Remarks\n\nThe underlying set of $U F(X)$ is the set of terms in the variables $X$ modulo the identities of $\\mathcal{V}$.\nThe map $U \\varepsilon_A \\colon U F U A \\to U A$ evaluates such a term at elements of $A$.\nConversely, a $\\mathbb{T}$-algebra $h \\colon U F(X) \\to X$ defines each basic operation $f$ of arity $n$ by $f(x_1, \\ldots, x_n) = h(f(x_1, \\ldots, x_n))$.\nOn the right, $h$ is applied to the term $f(x_1, \\ldots, x_n)$.\nThe unit and associativity laws of $h$ force the identities of $\\mathcal{V}$ to hold.\nAnother proof applies Beck's monadicity theorem: $U$ creates coequalizers of $U$-split pairs.\n\nExample: for the variety of monoids, $U F(X)$ is the set $X^*$ of words.\nA $\\mathbb{T}$-algebra structure $X^* \\to X$ is the same as a monoid structure on $X$: it sends a word to the product of its letters.\n\nThe monads that arise in this way are finitary, and every finitary monad on $\\mathbf{Set}$ arises from a variety, possibly with infinitely many operations of each finite arity.\nMonads that are not finitary describe infinitary structures; for instance, the algebras of the ultrafilter monad on $\\mathbf{Set}$ are the compact Hausdorff spaces.\n\n## Explanations\n\n### L1 human\n\nA variety, such as groups or rings, is usually described by operations and equations.\nThe theorem gives another description: only the free algebras and the way to evaluate formal expressions are needed.\nAn algebra of the variety is then a set with a rule that turns every formal expression in its elements into an element, consistently.\n\n### L2 human\n\nThe result says that the forgetful functor of a variety is monadic, in the strict sense that the comparison functor is an isomorphism, not only an equivalence.\nIt explains why constructions on varieties, such as limits computed on underlying sets and the existence of colimits, follow from general monad theory.\nTogether with [[Lawvere theories|NTJ94H2CNS]], it gives three equivalent views of a variety: by a presentation, by a Lawvere theory, and by a finitary monad on $\\mathbf{Set}$.\nThe [[Kleisli category|D9YHA46YWM]] of the same monad is equivalent to the full subcategory of free algebras.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "about": [
      "AJNZJD8442",
      "FEPRJR3MND"
    ],
    "kind": "statement",
    "msc": [
      "18C05",
      "18C15",
      "08C05"
    ],
    "name": "Varieties as categories of algebras over a monad",
    "role": "theorem",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Monad_(category_theory)"
      }
    ],
    "tag": "EZ21NHHAKG",
    "uses": [
      "AJNZJD8442",
      "WV3BPYCHVG",
      "N353JF8RBK",
      "FF6XXA6D1A",
      "DF5N0PK3ZS",
      "QG1ZXRC8EH",
      "FEPRJR3MND"
    ]
  },
  "kind": "statement",
  "link": "https://tamnd.github.io/math2/node/EZ21NHHAKG/",
  "links": [
    {
      "field": "about",
      "target": "AJNZJD8442"
    },
    {
      "field": "about",
      "target": "FEPRJR3MND"
    },
    {
      "field": "uses",
      "target": "AJNZJD8442"
    },
    {
      "field": "uses",
      "target": "WV3BPYCHVG"
    },
    {
      "field": "uses",
      "target": "N353JF8RBK"
    },
    {
      "field": "uses",
      "target": "FF6XXA6D1A"
    },
    {
      "field": "uses",
      "target": "DF5N0PK3ZS"
    },
    {
      "field": "uses",
      "target": "QG1ZXRC8EH"
    },
    {
      "field": "uses",
      "target": "FEPRJR3MND"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/EZ21NHHAKG.md",
  "msc": [
    "18C05",
    "18C15",
    "08C05"
  ],
  "name": "Varieties as categories of algebras over a monad",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/EZ2/EZ21NHHAKG.md",
  "status": null,
  "tag": "EZ21NHHAKG",
  "uri": "m2://EZ21NHHAKG",
  "url": "https://tamnd.github.io/math2/wiki/varieties-as-categories-of-algebras-over-a-monad/",
  "writing": {
    "tag": "EZ21NHHAKG",
    "kind": "statement",
    "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
      }
    ]
  }
}
