{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Definition\n\nLet $(K, +, \\cdot, 0, 1)$ be an [[idempotent semiring|NA44T2NZE2]], with the order $a \\le b \\iff a + b = b$.\nLet $^*$ be a unary operation on $K$.\nThe structure $(K, +, \\cdot, ^*, 0, 1)$ is a *Kleene algebra* if for all $a, b, x \\in K$:\n\n1. $1 + a \\cdot a^* \\le a^*$;\n2. $1 + a^* \\cdot a \\le a^*$;\n3. if $b + a \\cdot x \\le x$, then $a^* \\cdot b \\le x$;\n4. if $b + x \\cdot a \\le x$, then $b \\cdot a^* \\le x$.\n\n## Remarks\n\nClauses 1 and 3 say that $a^* b$ is the least $x$ with $b + a x \\le x$.\nExample: let $\\Sigma^*$ be the [[free monoid|27ZPTJP9PP]] on an alphabet $\\Sigma$, and let $K$ be the set of languages $L \\subseteq \\Sigma^*$.\nWith union, concatenation, $0 = \\emptyset$, $1 = \\set{\\varepsilon}$ and $L^* = \\bigcup_{n \\ge 0} L^n$, this is a Kleene algebra.\nIndeed, $L^* B$ is the set of words $w_1 \\cdots w_n u$ with $w_i \\in L$ and $u \\in B$, and each such word lies in any $X$ with $B \\cup L X \\subseteq X$, by induction on $n$.\nExample: the [[binary relations|08EJC6Q25H]] on a set, with union, composition and reflexive transitive closure as $^*$, form a Kleene algebra.\nNon-example: the Boolean semiring $\\set{0, 1}$ with $a^* = a$ fails clause 1, since for $a = 0$ it says $1 + 0 \\le 0$.\nWith $a^* = 1$ for all $a$, the Boolean semiring is a Kleene algebra.\nIn every Kleene algebra $a^* = 1 + a a^*$ and $a^* a^* = a^*$.\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "defines": "BK4DDS24XC",
    "kind": "definition",
    "msc": [
      "16Y60",
      "68Q70",
      "68Q45"
    ],
    "name": "Kleene algebra",
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Kleene_algebra"
      }
    ],
    "tag": "2D4E6NY8Q4",
    "uses": [
      "NA44T2NZE2",
      "27ZPTJP9PP",
      "08EJC6Q25H"
    ]
  },
  "kind": "definition",
  "link": "https://tamnd.github.io/math2/node/2D4E6NY8Q4/",
  "links": [
    {
      "field": "defines",
      "target": "BK4DDS24XC"
    },
    {
      "field": "uses",
      "target": "NA44T2NZE2"
    },
    {
      "field": "uses",
      "target": "27ZPTJP9PP"
    },
    {
      "field": "uses",
      "target": "08EJC6Q25H"
    }
  ],
  "markdown": "https://tamnd.github.io/math2/node/2D4E6NY8Q4.md",
  "msc": [
    "16Y60",
    "68Q70",
    "68Q45"
  ],
  "name": "Kleene algebra",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/2D4/2D4E6NY8Q4.md",
  "status": null,
  "tag": "2D4E6NY8Q4",
  "uri": "m2://2D4E6NY8Q4",
  "url": "https://tamnd.github.io/math2/wiki/kleene-algebra-definition/",
  "writing": {
    "tag": "2D4E6NY8Q4",
    "kind": "definition",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
