{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "PGZSNWS5VN"
    },
    {
      "field": "defines",
      "target": "ZS5TMX4G8P"
    }
  ],
  "body": "\n## Summary\n\nA Horn clause is a disjunction of literals in which at most one literal is unnegated.\nSuch a clause can be read as a rule: \"if all of these hold, then that holds\".\nWith no unnegated literal, it is a constraint: \"these do not all hold\".\nSatisfiability of a [[conjunctive normal form|0B3D4C8YF2]] made of Horn clauses can be decided in polynomial time, unlike general [[satisfiability|QN7M1JCGT9]].\nHorn clauses are the basis of logic programming, and their first-order universal forms axiomatize [[universal Horn classes|9A4CYWXPEA]] and [[quasivarieties|WRXEKT4NQS]].\n\n## Explanations\n\n### L1 human\n\nThe clause $\\neg p \\vee \\neg q \\vee r$ says the same as \"if $p$ and $q$, then $r$\".\nRules of this shape can be chained: from known facts one keeps deriving new facts until nothing changes.\nThis is why Horn formulas are easy to solve, while clauses such as $p \\vee q$, which allow a choice, make satisfiability hard in general.\nA clause with no positive literal, such as $\\neg p \\vee \\neg q$, says \"not both $p$ and $q$\".\n",
  "commit": "ff8a40749dc16545e3d2fc637f6b0196e81d0bfa",
  "front": {
    "kind": "concept",
    "msc": [
      "03B05",
      "03B70",
      "08C15"
    ],
    "name": "Horn clause",
    "same_as": {
      "wikidata": "Q933932",
      "wikipedia": "Horn clause"
    },
    "sources": [
      {
        "url": "https://en.wikipedia.org/wiki/Horn_clause"
      }
    ],
    "tag": "QR92EZDTKF"
  },
  "kind": "concept",
  "link": "https://tamnd.github.io/math2/node/QR92EZDTKF/",
  "links": null,
  "markdown": "https://tamnd.github.io/math2/node/QR92EZDTKF.md",
  "msc": [
    "03B05",
    "03B70",
    "08C15"
  ],
  "name": "Horn clause",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/QR9/QR92EZDTKF.md",
  "status": null,
  "tag": "QR92EZDTKF",
  "uri": "m2://QR92EZDTKF",
  "url": "https://tamnd.github.io/math2/wiki/horn-clause/",
  "writing": {
    "tag": "QR92EZDTKF",
    "kind": "concept",
    "level": "W0",
    "next": [
      {
        "what": "a source with a locator",
        "have": 0,
        "want": 1
      }
    ]
  }
}
