# Sperner's theorem

## Statement of the theorem

Sperner's theorem as originally stated is a result about set systems. Suppose that you want to find the largest collection of sets $\mathcal{A}$ such that no set in $\mathcal{A}$ is a proper subset of any other. Then the best you can do is choose all the sets of some fixed size---and of course the best size to pick is $\lfloor n/2\rfloor$, since the binomial coefficient $\binom nm$ is maximized when $m=\lfloor n/2\rfloor.$

Sperner's theorem is closely related to the density Hales-Jewett theorem: in fact, it is nothing other than DHJ(2) with the best possible bound. To see this, we associate each set $A\subset[n]$ with its characteristic function (that is, the sequence that is 0 outside A and 1 in A). If we have a pair of sets $A\subset B,$ then the two sequences form a combinatorial line in $[2]^n.$ For example, if n=6 and A and B are the sets $\{2,3\}$ and $\{2,3,4,6\}$, then we get the combinatorial line that consists of the two points 011000 and 011101, which we can denote by 011*0* (so the wildcard set is $\{4,6\}$).

## Proof of the theorem

There are several proofs, but perhaps the most enlightening is a very simple averaging argument that proves a stronger result. Let $\mathcal{A}$ be a collection of subsets of [n]. For each k, let $\delta_k$ denote the density of $\mathcal{A}$ in the kth layer of the cube: that is, it is the number of sets in $\mathcal{A}$ of size k, divided by $\binom nk.$ The equal-slices measure of $\mathcal{A}$ is defined to be $\delta_0+\dots+\delta_n.$

Now the equal-slices measure of $\mathcal{A}$ is easily seen to be equal to the following quantity. Let $\pi$ be a random permutation of [n], let $U_0,U_1,U_2\dots,U_n$ be the sets $\emptyset, \{\pi(1)\},\{\pi(1),\pi(2)\},\dots,[n],$ and let $\mu(\mathcal{A})$ be the expected number of the sets $U_i$ that belong to $\mathcal{A}.$ This is the same by linearity of expectation and the fact that the probability that $U_k$ belongs to $\mathcal{A}$ is $\delta_k.$

Therefore, if the equal-slices measure of $\mathcal{A}$ is greater than 1, then the expected number of sets $U_k$ in $\mathcal{A}$ is greater than 1, so there must exist a permutation for which it is at least 2, and that gives us a pair of sets with one contained in the other.

To see that this implies Sperner's theorem, one just has to make the simple observation that a set with equal-slices measure at most 1 must have cardinality at most $\binom n{\lfloor n/2\rfloor}.$ (If n is odd, so that there are two middle layers, then it is not quite so obvious that to have an extremal set you must pick one or other of the layers, but this is the case.) This stronger version of the statement is called the LYM inequality

## Multidimensional version

The following proof is a variant of the Gunderson-Rodl-Sidorenko result. Its parameters are a little worse, but the proof is a little simpler.

Proposition 1: Let $A \subseteq \{0,1\}^n$ have density $\delta$. Let $Y_1, \dots, Y_d$ be a partition of $[n]$ with $|Y_i| \geq r$ for each $i$. If

$\delta^{2^d} - \frac{d}{\sqrt{\pi r}} \gt 0,$ (1)

then $A$ contains a nondegenerate combinatorial subspace of dimension $d$, with its $i$th wildcard set a subset of $Y_i$.

Proof: Let $C_i$ denote a random chain from $0^{|Y_i|}$ up to $1^{|Y_i|}$, thought of as residing in the coordinates $Y_i$, with the $d$ chains chosen independently. Also, let $s_i, t_i$ denote independent Binomial[/itex](|Y_i|, 1/2)[/itex] random variables, $i \in [d]$. Note that $C_i(s_i)$ and $C_i(t_i)$ are (dependent) uniform random strings in $\{0,1\}^{Y_i}$. We write, say,

$(C_1(s_1), C_2(t_2), C_3(t_3), \dots, C_d(s_d))$ (2)

for the string in $\{0,1\}^n$ formed by putting $C_1(s_1)$ into the $Y_1$ coordinates, $C_2(t_2)$ into the $Y_2$ coordinates, etc. Note that each string of this form is also uniformly random, since the chains are independent.

If all $2^d$ strings of the form in (2) are simultaneously in $A$ then we have a $d$-dimensional subspace inside $A$ with wildcard sets that are \emph{subsets} of $Y_1, \dots, Y_d$. All $d$ dimensions are nondegenerate iff $s_i \neq t_i$ for all $i$. Since $s_i$ and $t_i$ are independent Binomial$(|Y_i|, 1/2)$'s with $|Y_i| \geq r$, we have

$\Pr[s_i = t_i] \leq \frac{1}{\sqrt{\pi r}}.$

Thus to complete the proof, it suffices to show that with probability at least $\delta^{2^d}$, all $2^d$ strings of the form in (2) are in $A$.

This is easy: writing $f$ for the indicator of $A$, the probability is

$\mathbf{E}_{C_1, \dots, C_d} \left[\mathbf{E}_{s_1, \dots, t_d}[f(C_1(s_1), \dots, C_d(s_d)) \cdots f(C_1(t_1), \dots, C_d(t_d))]\right].$

Since $s_1, \dots, t_d$ are independent, the inside expectation-of-a-product can be changed to a product of expectations. But for fixed $C_1, \dots, C_d$, each string of the form in (2) has the same distribution. Hence the above equals

$\mathbf{E}_{C_1, \dots, C_d} \left[\mathbf{E}_{s_1, \dots, s_d}[f(C_1(s_1), \dots, C_d(s_d))]^{2^d}\right].$

By Jensen (or repeated Cauchy-Schwarz), this is at least

$\left(\mathbf{E}_{C_1, \dots, C_d} \mathbf{E}_{s_1, \dots, s_d}[f(C_1(s_1), \dots, C_d(s_d))]\right)^{2^d}.$

But this is just $\delta^{2^d}$, since $(C_1(s_1), \dots, C_d(s_d))$ is uniformly distributed. []

As an aside: Corollary 2: If $A \subseteq [n]$ has density $\Omega(1)$, then $A$ contains a nondegenerate combinatorial subspace of dimension at least $\log_2 \log n - O(1)$.

If we are willing to sacrifice significantly more probability, we can find a $d$-dimensional subspace randomly.

Corollary 3: In the setting of Proposition 1, assume $\delta \lt 2/3$ and

$r \geq \exp(4 \ln(1/\delta) 2^d).$ (3)

Suppose we choose a random nondegenerate $d$-dimensional subspace of $[n]$ with wildcard sets $Z_i \subseteq Y_i$. By this we mean choosing, independently for each $i$, a random combinatorial line within $\{0,1\}^{Y_i}$, uniformly from the $3^r - 1$ possibilities. Then this subspace is entirely contained within $A$ with probability at least $3^{-dr}$.

This follows immediately from Proposition~\ref{prop:1}: having $r$ as in (3) achieves (1), hence the desired nondengenerate combinatorial subspace exists and we pick it with probability $1/(3^r-1)^d$.

We can further conclude: Corollary 4: Let $A \subseteq \{0,1\}^n$ have density $\delta \lt 2/3$ and let $Y_1, \dots, Y_d$ be disjoint subsets of $[n]$ with each $|Y_i| \geq r$,

$r \geq \exp(4 \ln(1/\delta) 2^d).$

Choose a nondegenerate combinatorial subspace at random by picking uniformly nondegenerate combinatorial lines in each of $Y_1, \dots, Y_d$, and filling in the remaining coordinates outside of the $Y_i$'s uniformly at random. Then with probability at least $\exp(-r^{O(1)})$, this combinatorial subspace is entirely contained within $A$.

This follows because for a random choice of the coordinates outside the $Y_i$'s, there is a $\delta/2$ chance that $A$ has density at least $\delta/2$ over the $Y$ coordinates. We then apply the previous corollary, noting that $\exp(-r^{O(1)}) \ll (\delta/2)3^{-dr}$, even with $\delta$ replaced by $\delta/2$ in the lower bound demanded of $r$.

### Strong version

An alternative argument deduces the multidimensional Sperner theorem from the density Hales-Jewett theorem. We can think of $[2]^n$ as $[2^k]^{n/k}.$ If we do so and apply DHJ(2^k) and translate back to $[2]^n,$ then we find that we have produced a k-dimensional combinatorial subspace. This is obviously a much more sophisticated proof, since DHJ(2^k) is a very hard result, but it gives more information, since the wildcard sets turn out to have the same size. A sign that this strong version is genuinely strong is that it implies Szemerédi's theorem. For instance, suppose you take as your set $\mathcal{A}$ the set of all sequences such that the number of 0s plus the number of 1s in even places plus twice the number of 1s in odd places belongs to some dense set in $[3n].$ Then if you have a 2D subspace with both wildcard sets of size d, one wildcard set consisting of odd numbers and the other of even numbers (which this proof gives), then this implies that in your dense set of integers you can find four integers of the form a, a+d, a+2d, a+d+2d, which is an arithmetic progression of length 4.

One can also prove the above strong form of Sperner theorem by using the multidimensional Szemerédi theorem which has combinatorial proofs. (reference!) It states that large dense high dimensional grids contain corners. Given a dense subset of $[2]^n,$ denoted by $\mathcal{A}$. Take a random permutation of [n]. An element of $\mathcal{A}$ is “$d-$nice” after the permutation if it consists of $d$ intervals, each of length between $\frac{n}{2d}\pm \sqrt{n},$ and each interval begins at position $id$ for some $0\leq i\lt \frac{n}{d}.$ (Suppose that $d$ divides $n$) Any interval like this can be represented as a point in a $d-$dimensional $[\sqrt{n}]^d$ cube. If it’s dense then multidimensional Szemerédi gives us the strong version of Sperner.(cont.)

## Further remarks

The k=3 generalisation of the LYM inequality is the hyper-optimistic conjecture.

Sperner's theorem is also related to the Kruskal-Katona theorem.