Chapter 3

Sums of Residues

Three Lemmas

This chapter uses the Combinatorial Nullstellensatz (Theorem 2.7) and, in §3.4, the vanishing of power sums over a finite field. It uses no counting and no multiplicity. Throughout, pp is a prime and Zp=Fp\mathbb Z_p=\mathbb F_p.

3.1 Cauchy–Davenport

Theorem 3.1 (Cauchy 1813; Davenport 1935). Let A,BZpA,B\subseteq\mathbb Z_p be nonempty. Then A+Bmin(p,A+B1)|A+B|\ge\min(p,\,|A|+|B|-1).

Proof. Let A=k|A|=k, B=l|B|=l. Suppose first that k+l1pk+l-1\le p and, for contradiction, that A+Bk+l2|A+B|\le k+l-2. Since k+l2p1k+l-2\le p-1, we can choose CZpC\subseteq\mathbb Z_p with A+BCA+B\subseteq C and C=k+l2|C|=k+l-2. Let

f(x,y)=cC(x+yc)Zp[x,y].f(x,y)=\prod_{c\in C}(x+y-c)\in\mathbb Z_p[x,y].

Then degf=k+l2=(k1)+(l1)\deg f=k+l-2=(k-1)+(l-1), and the coefficient of xk1yl1x^{k-1}y^{l-1} in ff is the coefficient of xk1yl1x^{k-1}y^{l-1} in (x+y)k+l2(x+y)^{k+l-2}, namely (k+l2k1)\binom{k+l-2}{k-1}, which is nonzero in Zp\mathbb Z_p because k+l2<pk+l-2<p and (k+l2k1)\binom{k+l-2}{k-1} is a quotient of products of integers less than pp. By Theorem 2.7(b) with S1=AS_1=A, S2=BS_2=B, t1=k1t_1=k-1, t2=l1t_2=l-1, there is (a,b)A×B(a,b)\in A\times B with f(a,b)0f(a,b)\ne0, i.e. a+bCa+b\notin C. This contradicts A+BCA+B\subseteq C.

If k+l1>pk+l-1>p, choose AAA'\subseteq A with A=k|A'|=k and BBB'\subseteq B with B=p+1k|B'|=p+1-k, which is possible since 1p+1kl1\le p+1-k\le l. The case already proved gives A+Bmin(p,p)=p|A'+B'|\ge\min(p,p)=p, so A+BA+B=ZpA+B\supseteq A'+B'=\mathbb Z_p. ∎

The theorem is due to Cauchy, who used it in his work on Fermat's polygonal number theorem; Davenport rediscovered it and later acknowledged the priority (Davenport 1947). The proof above is from Alon, Nathanson, and Ruzsa (1995). The bound is attained by arithmetic progressions with the same common difference: if A={0,1,,k1}A=\{0,1,\dots,k-1\} and B={0,1,,l1}B=\{0,1,\dots,l-1\} then A+B={0,,k+l2}A+B=\{0,\dots,k+l-2\}. Vosper (1956) showed that for 2k,l2\le k,l and k+lp1k+l\le p-1 these are essentially the only extremal pairs; the polynomial method does not give structural information of this kind, a point taken up in §8.2.

3.2 The Alon–Nathanson–Ruzsa theorem

The proof of Theorem 3.1 has an obvious generalisation: multiply ff by any polynomial h(x,y)h(x,y) and one obtains a lower bound on the set of sums a+ba+b with h(a,b)0h(a,b)\ne0.

Theorem 3.2 (Alon, Nathanson, and Ruzsa 1996). Let A,BZpA,B\subseteq\mathbb Z_p with A=k1|A|=k\ge1, B=l1|B|=l\ge1, let hZp[x,y]h\in\mathbb Z_p[x,y] have degree exactly m0m\ge0, and suppose mk+l2m\le k+l-2 and k+l1mpk+l-1-m\le p. Let

C={a+b: aA, bB, h(a,b)0}.C=\{a+b:\ a\in A,\ b\in B,\ h(a,b)\ne0\}.

If the coefficient of xk1yl1x^{k-1}y^{l-1} in h(x,y)(x+y)k+l2mh(x,y)\,(x+y)^{k+l-2-m} is nonzero, then Ck+l1m|C|\ge k+l-1-m.

Proof. Suppose Ck+l2m|C|\le k+l-2-m. Since k+l2mp1k+l-2-m\le p-1, choose CCC'\supseteq C with C=k+l2m|C'|=k+l-2-m and let

f(x,y)=h(x,y)cC(x+yc),degf=m+(k+l2m)=k+l2.f(x,y)=h(x,y)\prod_{c\in C'}(x+y-c),\qquad\deg f=m+(k+l-2-m)=k+l-2.

The homogeneous part of ff of degree k+l2k+l-2 is hm(x,y)(x+y)k+l2mh_m(x,y)(x+y)^{k+l-2-m}, where hmh_m is the degree-mm homogeneous part of hh; the lower-degree parts of hh and the constants cc contribute only to monomials of lower degree. Hence the coefficient of xk1yl1x^{k-1}y^{l-1} in ff equals its coefficient in hm(x+y)k+l2mh_m(x+y)^{k+l-2-m}, which equals its coefficient in h(x+y)k+l2mh(x+y)^{k+l-2-m}, since xk1yl1x^{k-1}y^{l-1} has degree k+l2k+l-2 and the parts of hh of degree less than mm produce only monomials of degree less than k+l2k+l-2. By hypothesis this coefficient is nonzero. Theorem 2.7(b) with S1=AS_1=A, S2=BS_2=B, t1=k1t_1=k-1, t2=l1t_2=l-1 gives (a,b)A×B(a,b)\in A\times B with f(a,b)0f(a,b)\ne0, so h(a,b)0h(a,b)\ne0 and a+bCCa+b\notin C'\supseteq C; but then a+bCa+b\in C, a contradiction. ∎

Theorem 3.1 is the case h=1h=1. The next two corollaries are the cases h=xyh=x-y; they concern the restricted sumset A+^B={a+b:aA,bB,ab}A\mathbin{\hat+}B=\{a+b:a\in A,b\in B,a\ne b\}.

3.3 Restricted sums and the Erdős–Heilbronn conjecture

Erdős and Heilbronn (1964) conjectured that A+^Amin(p,2A3)|A\mathbin{\hat+}A|\ge\min(p,2|A|-3) for AZpA\subseteq\mathbb Z_p. The conjecture was proved by Dias da Silva and Hamidoune (1994) by an argument in the exterior algebra (Grassmann derivatives); Alon, Nathanson, and Ruzsa (1995, 1996) gave the polynomial proof reproduced here, which also handles sets of different sizes.

Corollary 3.3 (Alon, Nathanson, and Ruzsa 1996). Let A,BZpA,B\subseteq\mathbb Z_p be nonempty with A=kl=B|A|=k\ne l=|B|. Then A+^Bmin(p,k+l2)|A\mathbin{\hat+}B|\ge\min(p,k+l-2).

Proof. Suppose first k+l2pk+l-2\le p. Apply Theorem 3.2 with h=xyh=x-y, m=1m=1. The coefficient of xk1yl1x^{k-1}y^{l-1} in (xy)(x+y)k+l3=x(x+y)k+l3y(x+y)k+l3(x-y)(x+y)^{k+l-3}=x(x+y)^{k+l-3}-y(x+y)^{k+l-3} is

(k+l3k2)(k+l3k1)=(k+l3)!(k1)!(l1)![(k1)(l1)]=(k+l3)!(kl)(k1)!(l1)!,\binom{k+l-3}{k-2}-\binom{k+l-3}{k-1}=\frac{(k+l-3)!}{(k-1)!\,(l-1)!}\,\big[(k-1)-(l-1)\big]=\frac{(k+l-3)!\,(k-l)}{(k-1)!\,(l-1)!},

where a binomial with a negative lower index is 00 and the identity is checked by putting both terms over the common denominator (k1)!(l1)!(k-1)!(l-1)!. This is an integer (a difference of binomial coefficients) and its numerator (k+l3)!(kl)(k+l-3)!\,(k-l) is not divisible by pp, because k+l3<pk+l-3<p and 0<kl<p0<|k-l|<p; its denominator is likewise prime to pp. So the coefficient is nonzero in Zp\mathbb Z_p, and the theorem gives A+^Bk+l2|A\mathbin{\hat+}B|\ge k+l-2.

If k+l2>pk+l-2>p, then k+lp+3k+l\ge p+3 and we choose AAA'\subseteq A, BBB'\subseteq B with A+B=p+2|A'|+|B'|=p+2; since pp is odd (the case p=2p=2 being trivial), p+2p+2 is odd and AB|A'|\ne|B'| automatically. The first case gives A+^Bp|A'\mathbin{\hat+}B'|\ge p, so A+^B=ZpA\mathbin{\hat+}B=\mathbb Z_p. ∎

When k=lk=l the coefficient above is 00, and the argument must choose a different monomial.

Corollary 3.4 (Erdős–Heilbronn conjecture; Dias da Silva and Hamidoune 1994). Let AZpA\subseteq\mathbb Z_p with A=k2|A|=k\ge2. Then A+^Amin(p,2k3)|A\mathbin{\hat+}A|\ge\min(p,2k-3).

Proof. Suppose first 2k3p2k-3\le p and, for contradiction, that A+^A2k4|A\mathbin{\hat+}A|\le2k-4. Since 2k4p12k-4\le p-1, choose CA+^AC'\supseteq A\mathbin{\hat+}A with C=2k4|C'|=2k-4, and let

f(x,y)=(xy)cC(x+yc),degf=2k3=(k1)+(k2).f(x,y)=(x-y)\prod_{c\in C'}(x+y-c),\qquad\deg f=2k-3=(k-1)+(k-2).

The coefficient of xk1yk2x^{k-1}y^{k-2} in ff is its coefficient in (xy)(x+y)2k4(x-y)(x+y)^{2k-4}, namely

(2k4k2)(2k4k1)=(2k4)!(k1)!(k2)![(k1)(k2)]=(2k4)!(k1)!(k2)!=1k1(2k4k2),\binom{2k-4}{k-2}-\binom{2k-4}{k-1}=\frac{(2k-4)!}{(k-1)!\,(k-2)!}\big[(k-1)-(k-2)\big]=\frac{(2k-4)!}{(k-1)!\,(k-2)!}=\frac{1}{k-1}\binom{2k-4}{k-2},

the (k2)(k-2)-nd Catalan number, an integer whose numerator (2k4)!(2k-4)! is prime to pp because 2k4<p2k-4<p. So the coefficient is nonzero in Zp\mathbb Z_p. Apply Theorem 2.7(b) with S1=S2=AS_1=S_2=A, t1=k1t_1=k-1, t2=k2t_2=k-2; the hypotheses S1k|S_1|\ge k and S2k1|S_2|\ge k-1 hold. There is (a,b)A×A(a,b)\in A\times A with f(a,b)0f(a,b)\ne0, i.e. aba\ne b and a+bCa+b\notin C', contradicting CA+^AC'\supseteq A\mathbin{\hat+}A.

If 2k3>p2k-3>p, then k(p+4)/2>(p+3)/2k\ge(p+4)/2>(p+3)/2, so we may choose AAA'\subseteq A with A=k=(p+3)/2|A'|=k'=(p+3)/2 (an integer since pp is odd). Then 2k3=p2k'-3=p, and the first case gives A+^Ap|A'\mathbin{\hat+}A'|\ge p. ∎

The bound is attained by arithmetic progressions: for A={0,1,,k1}A=\{0,1,\dots,k-1\} the restricted sumset is {1,,2k3}\{1,\dots,2k-3\}, since 00 and 2k22k-2 arise only from 0+00+0 and (k1)+(k1)(k-1)+(k-1). The exact minimum of A+^A|A\mathbin{\hat+}A| over all kk-subsets of Zp\mathbb Z_p has been computed for p17p\le17 (Appendix A, Table A.1) and equals min(p,2k3)\min(p,2k-3) for every k2k\ge2; likewise the minimum of A+^B|A\mathbin{\hat+}B| over pairs with AB|A|\ne|B| equals min(p,k+l2)\min(p,k+l-2) for p11p\le11. Both bounds are therefore sharp for every kk, not merely asymptotically.

The general form of Theorem 3.2 allows other restrictions. Taking h(x,y)=δD(xyδ)h(x,y)=\prod_{\delta\in D}(x-y-\delta) for a set DD of forbidden differences gives {a+b:abD}k+l1D|\{a+b: a-b\notin D\}|\ge k+l-1-|D| whenever the corresponding coefficient is nonzero, which Alon, Nathanson, and Ruzsa verify for A=B|A|=|B| and DD of size less than pp; I do not reproduce the coefficient computation.

3.4 Chevalley–Warning

The second application of the zeros principle in this chapter uses not the Nullstellensatz but the following property of power sums.

Lemma 3.5. For an integer a0a\ge0 (with 00=10^0=1),

tFqta={1if a1 and (q1)a,0otherwise.\sum_{t\in\mathbb F_q}t^a=\begin{cases}-1&\text{if }a\ge1\text{ and }(q-1)\mid a,\\ 0&\text{otherwise.}\end{cases}

Consequently, if a monomial xα\mathbf x^{\boldsymbol\alpha} has α<n(q1)|\boldsymbol\alpha|<n(q-1) then xFqnxα=0\sum_{\mathbf x\in\mathbb F_q^n}\mathbf x^{\boldsymbol\alpha}=0, and the same holds for any polynomial of degree less than n(q1)n(q-1).

Proof. If a=0a=0 the sum is q1=0q\cdot1=0. If a1a\ge1 and (q1)a(q-1)\mid a, then ta=1t^a=1 for t0t\ne0 and the sum is q1=1q-1=-1. Otherwise let gg generate the cyclic group Fq×\mathbb F_q^\times; then ga1g^a\ne1 and t0ta=j=0q2gaj=ga(q1)1ga1=0\sum_{t\ne0}t^a=\sum_{j=0}^{q-2}g^{aj}=\frac{g^{a(q-1)}-1}{g^a-1}=0. For the consequence, xxα=ixixiαi\sum_{\mathbf x}\mathbf x^{\boldsymbol\alpha}=\prod_i\sum_{x_i}x_i^{\alpha_i}; if α<n(q1)|\boldsymbol\alpha|<n(q-1) then some αi<q1\alpha_i<q-1, and the ii-th factor is 00 by the first part (whether αi=0\alpha_i=0 or 1αiq21\le\alpha_i\le q-2). ∎

Theorem 3.6 (Chevalley 1935; Warning 1935). Let f1,,frFq[x1,,xn]f_1,\dots,f_r\in\mathbb F_q[x_1,\dots,x_n] with i=1rdegfi<n\sum_{i=1}^r\deg f_i<n. Then the number NN of common zeros of f1,,frf_1,\dots,f_r in Fqn\mathbb F_q^n is divisible by pp. In particular, if the fif_i have a common zero, they have another.

Proof. Let F(x)=i=1r(1fi(x)q1)F(\mathbf x)=\prod_{i=1}^r\big(1-f_i(\mathbf x)^{q-1}\big). For xFqn\mathbf x\in\mathbb F_q^n, F(x)=1F(\mathbf x)=1 if every fi(x)=0f_i(\mathbf x)=0 and F(x)=0F(\mathbf x)=0 otherwise, since tq1=1t^{q-1}=1 for t0t\ne0. Hence NxFqnF(x)(modp)N\equiv\sum_{\mathbf x\in\mathbb F_q^n}F(\mathbf x)\pmod p. But degF(q1)degfi<(q1)n\deg F\le(q-1)\sum\deg f_i<(q-1)n, so the sum vanishes by Lemma 3.5. ∎

Warning's paper proves the stronger statement NqndegfiN\ge q^{n-\sum\deg f_i} when N>0N>0; Ax (1964) proved that NN is divisible by qn/degfi1q^{\lceil n/\sum\deg f_i\rceil-1}. Neither is needed here.

3.5 Erdős–Ginzburg–Ziv

Theorem 3.7 (Erdős, Ginzburg, and Ziv 1961). Among any 2n12n-1 integers there are nn whose sum is divisible by nn.

Proof. First let n=pn=p be prime, and let a1,,a2p1a_1,\dots,a_{2p-1} be the integers, regarded in Fp\mathbb F_p. Consider

f1=i=12p1aixip1,f2=i=12p1xip1Fp[x1,,x2p1].f_1=\sum_{i=1}^{2p-1}a_ix_i^{p-1},\qquad f_2=\sum_{i=1}^{2p-1}x_i^{p-1}\quad\in\mathbb F_p[x_1,\dots,x_{2p-1}].

Here degf1+degf22p2<2p1\deg f_1+\deg f_2\le2p-2<2p-1, the number of variables, so by Theorem 3.6 the number of common zeros is divisible by pp. The origin is a common zero, so there is another, x0\mathbf x\ne\mathbf 0. Let I={i:xi0}I=\{i:x_i\ne0\}, so II\ne\emptyset. Since xip1=1x_i^{p-1}=1 for iIi\in I and 00 otherwise, f2(x)=I0(modp)f_2(\mathbf x)=|I|\equiv0\pmod p with 1I2p11\le|I|\le2p-1, whence I=p|I|=p; and f1(x)=iIai0(modp)f_1(\mathbf x)=\sum_{i\in I}a_i\equiv0\pmod p. So the pp integers aia_i, iIi\in I, have sum divisible by pp.

For composite n=uvn=uv with u,v2u,v\ge2, assume the theorem for uu and for vv. Given 2uv12uv-1 integers, extract disjoint uu-subsets with sum divisible by uu as long as at least 2u12u-1 integers remain: after jj extractions, 2uv1ju2u12uv-1-ju\ge2u-1 iff j2v2j\le2v-2, so we obtain 2v12v-1 disjoint subsets I1,,I2v1I_1,\dots,I_{2v-1}, each of size uu with sum usjus_j. By the theorem for vv, some vv of the integers sjs_j have sum divisible by vv; the union of the corresponding IjI_j has uv=nuv=n elements and sum usju\sum s_j divisible by uvuv. Induction on nn completes the proof. ∎

The theorem is sharp: n1n-1 zeros and n1n-1 ones contain no nn terms with sum divisible by nn. The original proof of Erdős, Ginzburg, and Ziv (1961) uses the Cauchy–Davenport theorem; the proof of the prime case through Chevalley–Warning given above is due to Bailey and Richter (1989), and Alon (1999, §8) gives a third proof, through his permanent lemma. The theorem has been verified by exhaustive computation over all multisets of 2n12n-1 residues for n9n\le9 (Appendix A). Its two-dimensional analogue, Kemnitz's conjecture (1983) that any 4n34n-3 points of Z2\mathbb Z^2 contain nn whose sum is divisible by nn in both coordinates, was proved by Reiher (2007) by an elaboration of the same method.

3.6 What the chapter shows

Every result in this chapter has the same shape. A set of sums is supposed small; a product c(x+yc)\prod_c(x+y-c) over the supposed sumset, times a restriction polynomial hh, is a polynomial of degree exactly ti\sum t_i whose value on A×BA\times B is forced to be zero by the smallness of the sumset; a single monomial coefficient, computed by a binomial identity, is nonzero; and the Nullstellensatz says the two are incompatible. The only place where number theory enters is in checking that the coefficient is nonzero modulo pp, which reduces to the observation that factorials of numbers less than pp are prime to pp. The method gives exact constants (the bounds are sharp for every kk, as the computations of Appendix A confirm) but no structure: it does not say which sets attain the bounds.