{
  "aliases": null,
  "backlinks": [
    {
      "field": "uses",
      "target": "0BZQ6ZX584"
    },
    {
      "field": "uses",
      "target": "0FF7726C7P"
    }
  ],
  "body": "\n## Statement\n\nLet $A$ and $B$ be finite sets.\nThen\n$$|A \\cup B| + |A \\cap B| = |A| + |B|.$$\nEquivalently, $|A \\cup B| = |A| + |B| - |A \\cap B|$.\n\n## Remarks\n\nIf $A \\cap B = \\varnothing$, this is the [[rule of sum|0EE2V3CHFK]].\nFor three sets: $|A \\cup B \\cup C| = |A| + |B| + |C| - |A \\cap B| - |A \\cap C| - |B \\cap C| + |A \\cap B \\cap C|$.\nThe [[inclusion–exclusion principle|0FF7726C7P]] is the version for $n$ sets.\n\n## Explanations\n\n### L1 human\n\nWhen you add the sizes of $A$ and $B$, you count the elements of both sets twice.\nSubtract the size of $A \\cap B$ once to correct this. For example, $12$ students play football, $8$ play chess, and $3$ do both, so $17$ students do at least one.\n",
  "commit": "f591989ed15704e9d8755a7a5a6426d73de7a3ae",
  "front": {
    "kind": "statement",
    "msc": [
      "05A05"
    ],
    "name": "Inclusion–exclusion for two sets",
    "role": "theorem",
    "sources": [
      {
        "locator": "Formula",
        "url": "https://en.wikipedia.org/wiki/Inclusion–exclusion_principle"
      }
    ],
    "tag": "0C4YEQ9H5E",
    "uses": [
      "05099E1NMJ",
      "0EE2V3CHFK"
    ]
  },
  "kind": "statement",
  "link": "https://math2.tamnd.com/node/0C4YEQ9H5E/",
  "links": [
    {
      "field": "uses",
      "target": "05099E1NMJ"
    },
    {
      "field": "uses",
      "target": "0EE2V3CHFK"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/0C4YEQ9H5E.md",
  "msc": [
    "05A05"
  ],
  "name": "Inclusion–exclusion for two sets",
  "prov": null,
  "role": "theorem",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/0C4/0C4YEQ9H5E.md",
  "status": null,
  "tag": "0C4YEQ9H5E",
  "uri": "m2://0C4YEQ9H5E",
  "url": "https://math2.tamnd.com/wiki/inclusion-exclusion-for-two-sets/",
  "writing": {
    "tag": "0C4YEQ9H5E",
    "kind": "statement",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
