Chapter 6

Cap Sets

Three Lemmas

This chapter uses the counting lemma (2.2(a)) in the form of a dimension count on reduced polynomials, the rank lemma with the Croot–Lev–Pach expansion (2.9, 2.10), the support lemma (2.11), and the uniqueness of reduced representatives (Lemma 2.1(b)). It uses neither Schwartz–Zippel nor multiplicity. The bridge is the observation that on a cap set the matrix (P(x+y))(P(\mathbf x+\mathbf y)) is diagonal.

6.1 The problem

Definition 6.1. A cap set in F3n\mathbb F_3^n is a subset containing no three distinct collinear points.

A line in F3n\mathbb F_3^n is a set {a,a+r,a+2r}\{\mathbf a,\mathbf a+\mathbf r,\mathbf a+2\mathbf r\} with r0\mathbf r\ne\mathbf 0, so a cap set is the same as a set with no nontrivial three-term arithmetic progression, and the cap-set problem is the F3n\mathbb F_3^n analogue of Roth's problem on progressions in the integers. Its popular form is the card game Set, whose 8181 cards are the points of F34\mathbb F_3^4 and whose "sets" are the lines.

Lemma 6.2. Three points x,y,zF3n\mathbf x,\mathbf y,\mathbf z\in\mathbb F_3^n are collinear if and only if x+y+z=0\mathbf x+\mathbf y+\mathbf z=\mathbf 0. Moreover, if x+y+z=0\mathbf x+\mathbf y+\mathbf z=\mathbf 0 and two of the three points coincide, then all three coincide.

Proof. If {x,y,z}={a,a+r,a+2r}\{\mathbf x,\mathbf y,\mathbf z\}=\{\mathbf a,\mathbf a+\mathbf r,\mathbf a+2\mathbf r\} then the sum is 3a+3r=03\mathbf a+3\mathbf r=\mathbf 0. Conversely if x+y+z=0\mathbf x+\mathbf y+\mathbf z=\mathbf 0 with xy\mathbf x\ne\mathbf y, put a=x\mathbf a=\mathbf x, r=yx0\mathbf r=\mathbf y-\mathbf x\ne\mathbf 0; then a+2r=2yx=yx=z\mathbf a+2\mathbf r=2\mathbf y-\mathbf x=-\mathbf y-\mathbf x=\mathbf z, using 2=12=-1 in F3\mathbb F_3. For the last assertion, if x=y\mathbf x=\mathbf y then z=2x=x\mathbf z=-2\mathbf x=\mathbf x. ∎

Thus AA is a cap set iff the only solutions of x+y+z=0\mathbf x+\mathbf y+\mathbf z=\mathbf 0 with x,y,zA\mathbf x,\mathbf y,\mathbf z\in A are the trivial ones x=y=z\mathbf x=\mathbf y=\mathbf z.

Let r(n)r(n) be the largest size of a cap set in F3n\mathbb F_3^n. The trivial bounds are 2nr(n)3n2^n\le r(n)\le3^n (the lower bound from {0,1}n\{0,1\}^n, §6.5). Meshulam (1995) proved r(n)=O(3n/n)r(n)=O(3^n/n) by adapting Roth's Fourier argument, and Bateman and Katz (2012) improved this to O(3n/n1+ε)O(3^n/n^{1+\varepsilon}) with considerable effort. Whether r(n)(3δ)nr(n)\le(3-\delta)^n for some δ>0\delta>0 was a well-known open problem until Croot, Lev, and Pach (2017) proved the analogous statement for Z4n\mathbb Z_4^n in May 2016 and Ellenberg and Gijswijt (2017) adapted their argument to Fqn\mathbb F_q^n within days. The proof below follows the symmetric formulation of Tao (2016).

6.2 The diagonal matrix

Let VdV_d denote the space of reduced polynomials in F3[x1,,xn]\mathbb F_3[x_1,\dots,x_n] of degree at most dd, i.e. linear combinations of monomials xα\mathbf x^{\boldsymbol\alpha} with α{0,1,2}n\boldsymbol\alpha\in\{0,1,2\}^n and αd|\boldsymbol\alpha|\le d. Its dimension is

md=#{α{0,1,2}n: αd},m_d=\#\{\boldsymbol\alpha\in\{0,1,2\}^n:\ |\boldsymbol\alpha|\le d\},

with md=0m_d=0 for d<0d<0 and md=3nm_d=3^n for d2nd\ge2n. The set of reduced monomials is closed under division, so Lemma 2.10 applies to VdV_d with Me=meM_e=m_e.

Lemma 6.3 (Symmetry). For every integer dd, 3nmd=m2nd13^n-m_d=m_{2n-d-1}.

Proof. The map α(2,,2)α\boldsymbol\alpha\mapsto(2,\dots,2)-\boldsymbol\alpha is a bijection of {0,1,2}n\{0,1,2\}^n sending α|\boldsymbol\alpha| to 2nα2n-|\boldsymbol\alpha|; it carries {αd+1}\{|\boldsymbol\alpha|\ge d+1\} onto {α2nd1}\{|\boldsymbol\alpha|\le2n-d-1\}. ∎

Lemma 6.4. Let AF3nA\subseteq\mathbb F_3^n be a cap set and let PF3[x]P\in\mathbb F_3[\mathbf x] vanish at every point of F3n(A)\mathbb F_3^n\setminus(-A), where A={a:aA}-A=\{-\mathbf a:\mathbf a\in A\}. Then the matrix M=(P(x+y))x,yAM=\big(P(\mathbf x+\mathbf y)\big)_{\mathbf x,\mathbf y\in A} is diagonal, with diagonal entries Mxx=P(x)M_{\mathbf x\mathbf x}=P(-\mathbf x).

Proof. Let xy\mathbf x\ne\mathbf y in AA. If x+yA\mathbf x+\mathbf y\in-A, say x+y=z\mathbf x+\mathbf y=-\mathbf z with zA\mathbf z\in A, then x+y+z=0\mathbf x+\mathbf y+\mathbf z=\mathbf 0 with xy\mathbf x\ne\mathbf y, so by Lemma 6.2 the three points are distinct and collinear, contradicting that AA is a cap set. Hence x+yA\mathbf x+\mathbf y\notin-A and P(x+y)=0P(\mathbf x+\mathbf y)=0. On the diagonal, x+x=2x=x\mathbf x+\mathbf x=2\mathbf x=-\mathbf x. ∎

6.3 The Ellenberg–Gijswijt bound

Theorem 6.5 (Ellenberg and Gijswijt 2017; per-degree form). Let AF3nA\subseteq\mathbb F_3^n be a cap set. Then for every integer dd with 0d2n0\le d\le2n,

Am2nd1+md/2+md/21m2nd1+2md/2.|A|\le m_{2n-d-1}+m_{\lfloor d/2\rfloor}+m_{\lceil d/2\rceil-1}\le m_{2n-d-1}+2m_{\lfloor d/2\rfloor}.

Proof. Let WVdW\subseteq V_d be the subspace of reduced polynomials of degree at most dd that vanish at every point of F3n(A)\mathbb F_3^n\setminus(-A). Vanishing at a point is one linear condition, and there are 3nA3^n-|A| points, so

dimWmd(3nA)=Am2nd1\dim W\ge m_d-(3^n-|A|)=|A|-m_{2n-d-1}

by Lemma 6.3. Consider the evaluation map WF3AW\to\mathbb F_3^{-A}, P(P(u))uAP\mapsto(P(\mathbf u))_{\mathbf u\in-A}. It is injective: a PWP\in W in its kernel vanishes on A-A and on the complement of A-A, hence on all of F3n\mathbb F_3^n, hence is zero by Lemma 2.1(b) since PP is reduced. So the image is a subspace of F3A\mathbb F_3^{-A} of dimension dimW\dim W, and by Lemma 2.11 there is PWP\in W with P(u)0P(\mathbf u)\ne0 for at least dimW\dim W points uA\mathbf u\in-A.

By Lemma 6.4 the matrix M=(P(x+y))x,yAM=(P(\mathbf x+\mathbf y))_{\mathbf x,\mathbf y\in A} is diagonal with entries P(x)P(-\mathbf x), so

rankM=#{xA:P(x)0}=#{uA:P(u)0}dimWAm2nd1.\operatorname{rank}M=\#\{\mathbf x\in A:P(-\mathbf x)\ne0\}=\#\{\mathbf u\in-A:P(\mathbf u)\ne0\}\ge\dim W\ge|A|-m_{2n-d-1}.

By Lemma 2.10, rankMmd/2+md/21\operatorname{rank}M\le m_{\lfloor d/2\rfloor}+m_{\lceil d/2\rceil-1}. Combining the two inequalities gives the theorem. ∎

Corollary 6.6 (Ellenberg and Gijswijt 2017). Every cap set AF3nA\subseteq\mathbb F_3^n satisfies A3m2n/3|A|\le3\,m_{\lfloor2n/3\rfloor}.

Proof. Put D=2n/3D=\lfloor2n/3\rfloor and d=2n1Dd=2n-1-D in Theorem 6.5, so that 2nd1=D2n-d-1=D. It remains to check d/2D\lfloor d/2\rfloor\le D and d/21D\lceil d/2\rceil-1\le D, since mem_e is nondecreasing in ee. Write n=3k+rn=3k+r with r{0,1,2}r\in\{0,1,2\}. If r=0r=0: D=2kD=2k, d=4k1d=4k-1, d/2=d/21=2k1\lfloor d/2\rfloor=\lceil d/2\rceil-1=2k-1. If r=1r=1: D=2kD=2k, d=4k+1d=4k+1, both quantities equal 2k2k. If r=2r=2: D=2k+1D=2k+1, d=4k+2d=4k+2, d/2=2k+1\lfloor d/2\rfloor=2k+1 and d/21=2k\lceil d/2\rceil-1=2k. In every case both are at most DD, so AmD+mD+mD|A|\le m_D+m_D+m_D. ∎

Remark 6.7. The per-degree form is slightly sharper than the corollary in small dimensions. The values of mind(m2nd1+md/2+md/21)\min_d\big(m_{2n-d-1}+m_{\lfloor d/2\rfloor}+m_{\lceil d/2\rceil-1}\big) and of 3m2n/33m_{\lfloor2n/3\rfloor} for n12n\le12 are tabulated in Appendix A (Table A.4); for n=6n=6 they are 324324 and 504504, against the true value r(6)=112r(6)=112. The two coincide when n1(mod3)n\equiv1\pmod3. Asymptotically the difference is a constant factor and does not affect the base of the exponential.

6.4 The constant

Lemma 6.8. For every t(0,1]t\in(0,1] and every D2n/3D\le2n/3,

mDt2n/3(1+t+t2)n.m_D\le t^{-2n/3}(1+t+t^2)^n.

Proof. Since t1t\le1, for every α\boldsymbol\alpha with αD|\boldsymbol\alpha|\le D we have tαtDt2n/3t^{|\boldsymbol\alpha|}\ge t^{D}\ge t^{2n/3}. Hence

mD=αD1t2n/3αDtαt2n/3α{0,1,2}ntα=t2n/3(1+t+t2)n.m_D=\sum_{|\boldsymbol\alpha|\le D}1\le t^{-2n/3}\sum_{|\boldsymbol\alpha|\le D}t^{|\boldsymbol\alpha|}\le t^{-2n/3}\sum_{\boldsymbol\alpha\in\{0,1,2\}^n}t^{|\boldsymbol\alpha|}=t^{-2n/3}(1+t+t^2)^n.\qquad\blacksquare

Theorem 6.9. Every cap set AF3nA\subseteq\mathbb F_3^n satisfies A3cn|A|\le3c^n, where

c=min0<t11+t+t2t2/3=1+t0+t02t02/3,t0=3318=0.59307,c=2.755105c=\min_{0<t\le1}\frac{1+t+t^2}{t^{2/3}}=\frac{1+t_0+t_0^2}{t_0^{2/3}},\qquad t_0=\frac{\sqrt{33}-1}{8}=0.59307\ldots,\qquad c=2.755105\ldots

Proof. By Corollary 6.6 and Lemma 6.8, A3(t2/3(1+t+t2))n|A|\le3\big(t^{-2/3}(1+t+t^2)\big)^n for every t(0,1]t\in(0,1]. Let g(t)=ln(1+t+t2)23lntg(t)=\ln(1+t+t^2)-\tfrac23\ln t on (0,1](0,1]. Then

g(t)=1+2t1+t+t223t=3t(1+2t)2(1+t+t2)3t(1+t+t2)=4t2+t23t(1+t+t2),g'(t)=\frac{1+2t}{1+t+t^2}-\frac{2}{3t}=\frac{3t(1+2t)-2(1+t+t^2)}{3t(1+t+t^2)}=\frac{4t^2+t-2}{3t(1+t+t^2)},

which is negative for 0<t<t00<t<t_0 and positive for t0<t1t_0<t\le1, where t0=(331)/8t_0=(\sqrt{33}-1)/8 is the positive root of 4t2+t24t^2+t-2. So gg has its minimum on (0,1](0,1] at t0t_0, and c=eg(t0)c=e^{g(t_0)}. Numerically t0=0.593070t_0=0.593070\ldots, 1+t0+t02=1.9448031+t_0+t_0^2=1.944803\ldots, t02/3=1.416650t_0^{-2/3}=1.416650\ldots, and c=2.755105c=2.755105\ldots

Remark 6.10. The bound of Lemma 6.8 is the Chernoff bound for the number of α\boldsymbol\alpha with α2n/3|\boldsymbol\alpha|\le2n/3, and standard local limit estimates show it is sharp up to a factor Θ(n)\Theta(\sqrt n): m2n/3=cnΘ(n1/2)m_{\lfloor2n/3\rfloor}=c^n\,\Theta(n^{-1/2}). So Corollary 6.6 is Θ(cn/n)\Theta(c^n/\sqrt n) and the exponential base cc is exactly what the argument gives; the choice of dd in Corollary 6.6 is asymptotically optimal among all choices in Theorem 6.5, since m2nd1m_{2n-d-1} and md/2m_{d/2} are balanced precisely at d4n/3d\approx4n/3. It is known that the base cc cannot be improved by the slice-rank method alone (Blasiak et al. 2017; Tao 2016).

6.5 Constructions and small cases

Lemma 6.11. {0,1}n\{0,1\}^n is a cap set in F3n\mathbb F_3^n, so r(n)2nr(n)\ge2^n. If AF3aA\subseteq\mathbb F_3^a and BF3bB\subseteq\mathbb F_3^b are cap sets, so is A×BF3a+bA\times B\subseteq\mathbb F_3^{a+b}; hence r(a+b)r(a)r(b)r(a+b)\ge r(a)r(b).

Proof. If x,y,z{0,1}n\mathbf x,\mathbf y,\mathbf z\in\{0,1\}^n satisfy x+y+z=0\mathbf x+\mathbf y+\mathbf z=\mathbf 0, then in each coordinate xi+yi+zi{0,1,2,3}x_i+y_i+z_i\in\{0,1,2,3\} is divisible by 33, so it is 00 or 33, so xi=yi=zix_i=y_i=z_i; thus x=y=z\mathbf x=\mathbf y=\mathbf z and the solution is trivial. For the product, suppose (aj,bj)A×B(\mathbf a_j,\mathbf b_j)\in A\times B (j=1,2,3j=1,2,3) are distinct with zero sum. Then a1+a2+a3=0\mathbf a_1+\mathbf a_2+\mathbf a_3=\mathbf 0 and b1+b2+b3=0\mathbf b_1+\mathbf b_2+\mathbf b_3=\mathbf 0. By Lemma 6.2 each of these triples is either all-equal or all-distinct; an all-distinct triple would be three collinear points of AA or of BB, so both triples are all-equal, and then the three pairs coincide, a contradiction. ∎

The product construction from the known small values gives r(n)112n/62.1955nr(n)\ge112^{n/6}\approx2.1955^n. Edel (2004) obtained 2.2174n2.2174^n by a more elaborate product of caps in F362\mathbb F_3^{62} and F3480\mathbb F_3^{480}, Tyrrell (2023) improved this to 2.218n2.218^n, and a computer search guided by a language model (Romera-Paredes et al. 2024) found constructions giving 2.2202n2.2202^n. The exact values of r(n)r(n) are known for n6n\le6:

nn123456
r(n)r(n)2492045112
2n2^n248163264
Theorem 6.5, best dd371845123324
Corollary 6.6393045153504
3n3^n392781243729

The values r(n)r(n) for n5n\le5 are surveyed by Bierbrauer and Edel (2002) and Edel, Ferret, Landjev, and Storme (2002); r(6)=112r(6)=112 is due to Potechin (2008). The values for n3n\le3 were reproduced by exhaustive search (Appendix A), and for n=4n=4 the search found a cap of size 2020 without completing (Table A.3). The gap between the polynomial bound and the truth is a factor of about three at n=6n=6, and it grows like (c/2.2202)n1.24n(c/2.2202)^n\approx1.24^n if the best constructions are near the truth.

6.6 Beyond F3\mathbb F_3

Ellenberg and Gijswijt prove the analogous bound over every finite field: for q=pkq=p^k and AFqnA\subseteq\mathbb F_q^n containing no three-term progression x,x+r,x+2r\mathbf x,\mathbf x+\mathbf r,\mathbf x+2\mathbf r with r0\mathbf r\ne\mathbf 0, Acqn|A|\le c_q^{\,n} for an explicit cq<qc_q<q. For odd qq the proof above transfers with one change: a progression is a solution of x+z=2y\mathbf x+\mathbf z=2\mathbf y, so one takes PP vanishing outside 2A2A instead of A-A; the matrix (P(x+z))x,zA(P(\mathbf x+\mathbf z))_{\mathbf x,\mathbf z\in A} is then diagonal with entries P(2x)P(2\mathbf x), reduced polynomials have exponents in {0,,q1}\{0,\dots,q-1\}, mdm_d counts α{0,,q1}n\boldsymbol\alpha\in\{0,\dots,q-1\}^n with αd|\boldsymbol\alpha|\le d, and Lemma 6.3 becomes qnmd=m(q1)nd1q^n-m_d=m_{(q-1)n-d-1}. The optimal dd is about 23(q1)n\tfrac23(q-1)n and the constant is cq=min0<t1t(q1)/3(1+t++tq1)c_q=\min_{0<t\le1}t^{-(q-1)/3}(1+t+\dots+t^{q-1}). In characteristic 22 the equation x+z=2y\mathbf x+\mathbf z=2\mathbf y degenerates and a different encoding is needed; Croot, Lev, and Pach's original argument for Z4n\mathbb Z_4^n and Ellenberg and Gijswijt's treatment of F2k\mathbb F_{2^k} handle it, and I do not reproduce them.

The wider significance of the argument is that it bounds not only cap sets but the rank of a three-variable tensor, the indicator of x+y+z=0\mathbf x+\mathbf y+\mathbf z=\mathbf 0, in the sense of slice rank introduced by Tao (2016); any set on which such a tensor is diagonal with nonzero diagonal has size at most the slice rank. This reformulation has since been applied to sunflower-free sets, to the group-theoretic approach to matrix multiplication (Blasiak et al. 2017), and elsewhere. The three-lemma architecture of this dissertation covers it exactly: the slice rank bound is Lemma 2.10, the diagonal structure is the bridge, and the counting is the dimension of VdV_d.