{
  "aliases": null,
  "backlinks": [
    {
      "field": "defines",
      "target": "53TSQ57J0H"
    }
  ],
  "body": "\n## Summary\n\nThe Kleisli category of a [[monad|FF6XXA6D1A]] $T$ on a category $\\mathcal{C}$ has the same objects as $\\mathcal{C}$.\nA morphism from $X$ to $Y$ in it is a morphism $X \\to T Y$ of $\\mathcal{C}$.\nComposition uses the multiplication of the monad to flatten $T T$ to $T$.\nIt is equivalent to the full subcategory of free algebras in the [[Eilenberg–Moore category|FEPRJR3MND]].\nAmong all adjunctions that induce the monad, it gives the initial one.\nIn computer science, Kleisli morphisms model programs with side effects, such as partiality, nondeterminism or state.\n\n## Explanations\n\n### L1 human\n\nFor the powerset monad, a morphism from $X$ to $Y$ in the Kleisli category is a map that sends each element of $X$ to a set of elements of $Y$.\nSuch a map is the same as a relation between $X$ and $Y$.\nComposing two of them means following all possible paths, which is the usual composition of relations.\nSo the Kleisli category of the powerset monad is the category of sets and relations.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "18C20",
      "18C15"
    ],
    "name": "Kleisli category",
    "same_as": {
      "wikidata": "Q1773982",
      "wikipedia": "Kleisli category"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Kleisli_category"
      }
    ],
    "specializes": [
      "A2DE66937D"
    ],
    "tag": "D9YHA46YWM"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/D9YHA46YWM/",
  "links": [
    {
      "field": "specializes",
      "target": "A2DE66937D"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/D9YHA46YWM.md",
  "msc": [
    "18C20",
    "18C15"
  ],
  "name": "Kleisli category",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/D9Y/D9YHA46YWM.md",
  "status": null,
  "tag": "D9YHA46YWM",
  "uri": "m2://D9YHA46YWM",
  "url": "https://tamnd.github.io/math2/wiki/kleisli-category/",
  "writing": {
    "tag": "D9YHA46YWM",
    "kind": "concept",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
