{
  "aliases": null,
  "backlinks": null,
  "body": "\n## Proof\n\nWe count pairs of a full chain and a member of $\\mathcal{S}$ on it (Lubell's method). Then we examine when equality holds.\n\n*Setup.*\n\n1. Let $E$ be a set with $n$ elements and let $m = \\floor{n/2}$. Let $\\mathcal{S}$ be a family of subsets of $E$ in which no set is a proper subset of another. Write $\\binom{n}{k}$ for the [[binomial coefficient|092GEF38YD]].\n2. A *listing* of $E$ is a sequence $(x_1, \\dots, x_n)$ in which each element of $E$ appears exactly once. There are $n!$ listings, by the [[number of permutations|0CEBCS0E0E]].\n3. A listing $\\sigma = (x_1, \\dots, x_n)$ has the *chain* $C_\\sigma = \\set{\\set{x_1, \\dots, x_k} : 0 \\le k \\le n}$. It has exactly one set of each size $k$, namely its first $k$ elements.\n\n*The binomial coefficients.*\n\n4. By the [[factorial formula|033KTKKRV6]], $\\binom{n}{k+1} \\big/ \\binom{n}{k} = (n-k)/(k+1)$ for $0 \\le k \u003c n$. This ratio is greater than $1$ when $2k \u003c n - 1$, equal to $1$ when $2k = n - 1$, and less than $1$ when $2k \u003e n - 1$.\n5. So $\\binom{n}{k}$ strictly increases for $0 \\le k \\le \\floor{n/2}$, strictly decreases for $\\ceil{n/2} \\le k \\le n$, and $\\binom{n}{\\floor{n/2}} = \\binom{n}{\\ceil{n/2}}$.\n6. Hence $\\binom{n}{k} \\le \\binom{n}{m}$ for all $0 \\le k \\le n$, with equality exactly when $k \\in \\set{\\floor{n/2}, \\ceil{n/2}}$.\n\n*The LYM inequality.*\n\n7. Let $A \\subseteq E$ with $\\abs{A} = k$. Then $A \\in C_\\sigma$ exactly when the first $k$ entries of $\\sigma$ list $A$ and the others list $E \\setminus A$. By Step 2, there are $k!\\,(n-k)!$ such listings.\n8. Each chain $C_\\sigma$ contains at most one member of $\\mathcal{S}$. Indeed, of two distinct sets of $C_\\sigma$, one is a proper subset of the other.\n9. [[Double count|0F8YBHF2W3]] the pairs $(\\sigma, A)$ with $A \\in \\mathcal{S} \\cap C_\\sigma$. By Step 7 there are $\\sum_{A \\in \\mathcal{S}} \\abs{A}!\\,(n - \\abs{A})!$ pairs. By Step 8 there are at most $n!$ of them.\n10. Divide by $n!$ and use the factorial formula: $\\sum_{A \\in \\mathcal{S}} 1 \\big/ \\binom{n}{\\abs{A}} \\le 1$.\n\n*The bound.*\n\n11. By Step 6, each term satisfies $1 \\big/ \\binom{n}{\\abs{A}} \\ge 1 \\big/ \\binom{n}{m}$. So $\\abs{\\mathcal{S}} \\big/ \\binom{n}{m} \\le \\sum_{A \\in \\mathcal{S}} 1 \\big/ \\binom{n}{\\abs{A}} \\le 1$.\n12. Hence $\\abs{\\mathcal{S}} \\le \\binom{n}{m}$.\n\n*The two extremal families attain the bound.*\n\n13. Let $k \\in \\set{\\floor{n/2}, \\ceil{n/2}}$, and let $\\mathcal{L}_k$ be the family of all subsets of $E$ of size $k$. Two distinct sets of the same size are not proper subsets of each other. So $\\mathcal{L}_k$ has the property of $\\mathcal{S}$.\n14. By the [[number of $k$-element subsets|0BFMR2FQ8B]] and Step 5, $\\abs{\\mathcal{L}_k} = \\binom{n}{k} = \\binom{n}{m}$.\n\n*Equality forces an extremal family.*\n\n15. Suppose now $\\abs{\\mathcal{S}} = \\binom{n}{m}$. Then both inequalities of Step 11 are equalities.\n16. The first equality and Step 6 show that every $A \\in \\mathcal{S}$ has $\\abs{A} \\in \\set{\\floor{n/2}, \\ceil{n/2}}$.\n17. The second equality means that the count of Step 9 is exactly $n!$. By Step 8, every chain $C_\\sigma$ contains exactly one member of $\\mathcal{S}$.\n18. If $n$ is even, every member of $\\mathcal{S}$ has size $n/2$. So $\\mathcal{S} \\subseteq \\mathcal{L}_{n/2}$, and both have $\\binom{n}{m}$ elements by Step 14. Hence $\\mathcal{S} = \\mathcal{L}_{n/2}$.\n19. Let $n$ be odd. Since $\\binom{n}{m} \\ge 1$, the family $\\mathcal{S}$ has a member $A$. Let $k = \\abs{A}$, so $k \\in \\set{m, m+1}$.\n20. *Swap step.* Let $A \\in \\mathcal{S}$ with $\\abs{A} = k$. Let $A' = (A \\setminus \\set{x}) \\cup \\set{y}$ with $x \\in A$ and $y \\notin A$, and put $D = A \\setminus \\set{x}$. We show $A' \\in \\mathcal{S}$.\n21. If $k = m$, choose a listing that starts with the elements of $D$, then $y$, then $x$. Its chain contains $A' = D \\cup \\set{y}$, of size $m$, and $B = D \\cup \\set{x, y}$, of size $m + 1$.\n22. By Steps 16 and 17, exactly one of $A'$ and $B$ lies in $\\mathcal{S}$. But $A \\subsetneq B$ and $A \\in \\mathcal{S}$, so $B \\notin \\mathcal{S}$. Hence $A' \\in \\mathcal{S}$.\n23. If $k = m + 1$, choose a listing that starts with the elements of $D$, then $y$. Its chain contains $D$, of size $m$, and $A' = D \\cup \\set{y}$, of size $m + 1$.\n24. Exactly one of them lies in $\\mathcal{S}$. But $D \\subsetneq A$ and $A \\in \\mathcal{S}$, so $D \\notin \\mathcal{S}$. Hence $A' \\in \\mathcal{S}$.\n25. Let $A''$ be any subset of $E$ of size $k$, and let $t = \\abs{A \\setminus A''}$. Replacing elements one at a time, we get sets $A = A_0, A_1, \\dots, A_t = A''$ of size $k$, each obtained from the previous one as in Step 20.\n26. By Step 20 and induction on $t$, $A'' \\in \\mathcal{S}$. So $\\mathcal{L}_k \\subseteq \\mathcal{S}$.\n27. By Step 14, $\\abs{\\mathcal{L}_k} = \\binom{n}{m} = \\abs{\\mathcal{S}}$. Hence $\\mathcal{S} = \\mathcal{L}_k$, the family of all subsets of size $\\floor{n/2}$ or of all subsets of size $\\ceil{n/2}$.\n28. By Steps 13, 14 and 15 to 27, equality holds exactly for these families.\n\n## Idea\n\nA random ordering of $E$ builds a chain of $n+1$ nested sets, and an antichain can meet it at most once. A set of size $k$ lies on a fraction $1/\\binom{n}{k}$ of these chains, so these fractions add up to at most $1$. For equality, every chain must meet the family at a middle size, and a swapping argument then fills a whole middle level.\n",
  "commit": "4a3290d299c8b2cd6493fce2296920ba7f82d942",
  "front": {
    "kind": "proof",
    "msc": [
      "05D05"
    ],
    "name": "Proof of Sperner's theorem by Lubell's chain counting",
    "proves": "0J87V9K1GE",
    "sources": [
      {
        "url": "https://kam.mff.cuni.cz/~chvatal/est.pdf"
      },
      {
        "locator": "Proof",
        "url": "https://en.wikipedia.org/wiki/Sperner's_theorem"
      }
    ],
    "tag": "57DD99JPR1",
    "uses": [
      "092GEF38YD",
      "033KTKKRV6",
      "0BFMR2FQ8B",
      "0CEBCS0E0E",
      "0F8YBHF2W3"
    ]
  },
  "kind": "proof",
  "link": "https://math2.tamnd.com/node/57DD99JPR1/",
  "links": [
    {
      "field": "proves",
      "target": "0J87V9K1GE"
    },
    {
      "field": "uses",
      "target": "092GEF38YD"
    },
    {
      "field": "uses",
      "target": "033KTKKRV6"
    },
    {
      "field": "uses",
      "target": "0BFMR2FQ8B"
    },
    {
      "field": "uses",
      "target": "0CEBCS0E0E"
    },
    {
      "field": "uses",
      "target": "0F8YBHF2W3"
    }
  ],
  "markdown": "https://math2.tamnd.com/node/57DD99JPR1.md",
  "msc": [
    "05D05"
  ],
  "name": "Proof of Sperner's theorem by Lubell's chain counting",
  "prov": null,
  "role": "",
  "source": "https://github.com/tamnd/math2/blob/main/nodes/57D/57DD99JPR1.md",
  "status": null,
  "tag": "57DD99JPR1",
  "uri": "m2://57DD99JPR1",
  "url": "https://math2.tamnd.com/wiki/proof-of-sperners-theorem-by-lubells-chain-counting/",
  "writing": {
    "tag": "57DD99JPR1",
    "kind": "proof",
    "level": "W0",
    "next": [
      {
        "what": "an inventory row",
        "note": "the row of the inventory that the node accounts for",
        "have": 0,
        "want": 1
      }
    ]
  }
}
